API Guide Home (Online version only) |

# VMFontLibCommon.h

Go to the documentation of this file.

    00001 /*******************************************************************************
    00002  * Copyright (c) 2004-2005 palmOne, Inc. or its subsidiaries.
    00003  * All rights reserved.
    00004  ******************************************************************************/
    00005 /**
    00006  * @defgroup    Versamail Versamail Library
    00007  * @brief       This library provide supports for application that wish to
    00008  *              provide users with the Versamail Font Picker dialog and support
    00009  *              the font from with the app.
    00010  *
    00011  * This library also allows application to programmatically manage style and size
    00012  * for the font types that Versamail support. Other VersaMail supports include
    00013  * launching VersaMail to add a new email with attachment and also the ability
    00014  * to create a plugin to send/view attachments.
    00015  *
    00016  * @{
    00017  * @}
    00018  */
    00019 /**
    00020  * @ingroup Versamail
    00021  */
    00022
    00023 /**
    00024  * @file    VMFontLibCommon.h
    00025  * @version 1.0
    00026  * @brief   Public common header file for the Versamail Font Library.
    00027  *
    00028  * This file contains the constants and structures for the palmOne VersaMail
    00029  * Font Picker / Font Manager Service.
    00030  */
    00031
    00032 #ifndef __PALMONEVMFONTLIBCOMMON_H__
    00033 #define __PALMONEVMFONTLIBCOMMON_H__
    00034
    00035 #include <PalmTypes.h>
    00036 #include <Font.h>
    00037 #include <DataMgr.h>
    00038
    00039 /********************************************************************
    00040  * Traps
    00041  ********************************************************************/
    00042 /**
    00043  * @name Function Traps
    00044  */
    00045 /*@{*/
    00046 #define  flTrapAPIVersion               (sysLibTrapCustom + 0)
    00047 #define  flTrapAPIGetFont               (sysLibTrapCustom + 1)
    00048 #define  flTrapAPIGetFontByID           (sysLibTrapCustom + 2)
    00049 #define  flTrapAPIFontExists            (sysLibTrapCustom + 3)
    00050 #define  flTrapAPIFontToString          (sysLibTrapCustom + 4)
    00051 #define  flTrapAPIFontCountStyleAndSize (sysLibTrapCustom + 5)
    00052 #define  flTrapAPISetFontUIRules        (sysLibTrapCustom + 6)
    00053 #define  flTrapAPIInitFontUI            (sysLibTrapCustom + 7)
    00054 #define  flTrapAPIDoFontDialog          (sysLibTrapCustom + 8)
    00055 #define  flTrapAPIClearCache            (sysLibTrapCustom + 9)
    00056 /*@}*/
    00057
    00058 /********************************************************************
    00059  * Library type and creator
    00060  ********************************************************************/
    00061
    00062 #define fontPickerLibName           "PalmSGFontLib.Lib" /**< Font library name. */
    00063 #define fontPickerType              'appl'              /**< Font library Type. */
    00064 #define fontPickerCreatorID         'MA10'              /**< Font library Creator ID. */
    00065
    00066
    00067 /********************************************************************
    00068  * Typedefs and constants used in Font Picker lib
    00069  ********************************************************************/
    00070
    00071 /** A parameter passed was Invalid */
    00072 #define VMFontErrParam          (appErrorClass | 1)
    00073
    00074 /** Error meaning that the library is not open */
    00075 #define VMFontErrNotOpen        (appErrorClass | 2)
    00076
    00077 /** Error returned from VMFontClose() if the library is still open */
    00078 #define VMFontErrStillOpen  (appErrorClass | 3)
    00079
    00080 /**
    00081  * Font Face
    00082  *
    00083  */
    00084 enum _VMFontFace {
    00085     gillSans  = 0,          /**< Gill Sans MT Font  */
    00086     sabon,                  /**< Sabon MT Font  */
    00087     //segoe,                /**< Segoe MT Font  */
    00088     //thorndale,            /**< ThornDale MT Font  */
    00089     palm                    /**< Palm  */
    00090 };
    00091
    00092 typedef UInt8 VMFontFace; /**< Used with _VMFontFace */
    00093
    00094 /**
    00095  * Font Size
    00096  *
    00097  */
    00098 enum _VMFontSize {
    00099     size6  = 0,         /**< Size = 6  */
    00100     size9  = 1,         /**< Size = 9  */
    00101     size12 = 2          /**< Size = 12  */
    00102 };
    00103
    00104 typedef UInt8 VMFontSize; /**< Used with _VMFontSize */
    00105
    00106 /**
    00107  * Font Style
    00108  *
    00109  */
    00110 enum _VMFontStyle {
    00111     normal = 0,         /**< Normal Fonts */
    00112     bold   = 1,         /**< Bold Fonts */
    00113     italic = 2          /**< Italic Fonts */
    00114 };
    00115
    00116 typedef UInt8 VMFontStyle; /**< Used with _VMFontStyle */
    00117
    00118 /**
    00119  * Font Size Rule
    00120  *
    00121  */
    00122 enum _VMFontSizeRule {
    00123     allSize,            /**< Both small and large fonts  */
    00124     smallFonts,         /**< Only Small fonts  */
    00125     largeFonts          /**< Only large fonts  */
    00126 };
    00127
    00128 typedef UInt8 VMFontSizeRule; /**< Used with _VMFontSizeRule */
    00129
    00130 /**
    00131  * Font Style Rule
    00132  *
    00133  */
    00134 enum _VMFontStyleRule {
    00135     allStyle,           /**< All font Styles supported */
    00136     plainOnly           /**< Only Normal Fonts */
    00137 };
    00138
    00139 typedef UInt8 VMFontStyleRule; /**< Used with _VMFontStyleRule */
    00140
    00141 /**
    00142  * @brief Font UI rules structure used for the font picker setting
    00143  *
    00144  */
    00145 typedef struct {
    00146     Boolean fontFaceVisible;    /**< Shows/Hides Font face  */
    00147     Boolean fontStyleVisible;   /**< Shows/Hides Font Style */
    00148     Boolean fontSizeVisible;    /**< Shows/Hides Font Size */
    00149     VMFontSizeRule sizeRule;    /**< Shows the size selected: allSize, smallFonts, largeFonts */
    00150     VMFontStyleRule styleRule;  /**< Shows the style selected: allStyle, plainOnly */
    00151 } VMFontUIRules;
    00152 typedef VMFontUIRules *VMFontUIRulesPtr;
    00153
    00154 /**
    00155  * @brief Font characteristics structure used to describe a font
    00156  *
    00157  */
    00158 typedef struct {
    00159     VMFontFace  face;   /**< Font face. */
    00160     VMFontSize  size;   /**< Size of Font. */
    00161     VMFontStyle style;  /**< Font Style */
    00162 } VMFontType;
    00163 typedef VMFontType *VMFontPtr;
    00164
    00165
    00166
    00167
    00168
    00169
    00170 #endif

Top | Palm Developer Network © 2004-2008, Palm, Inc. All rights reserved. Generated on Fri Jun 13 10:06:55 2008 for Palm API Guide