API Guide Home (Online version only) |

# PalmLcdOverlay.h

Go to the documentation of this file.

    00001 /******************************************************************************
    00002  * Copyright (c) 2005 palmOne, Inc. or its subsidiaries.
    00003  * All rights reserved.
    00004  *****************************************************************************/
    00005 /**
    00006  * @ingroup LcdOverlay
    00007  *
    00008  */
    00009
    00010 /**
    00011  * @file    PalmLcdOverlay.h
    00012  * @version 1.0
    00013  *
    00014  * @brief Exported LCD Overlay functions
    00015  *
    00016  *
    00017  * <hr>
    00018  */
    00019
    00020
    00021 #ifndef __PalmLcdOverlay_H__
    00022 #define __PalmLcdOverlay_H__
    00023
    00024 // Palm OS common definitions
    00025 #include <PalmTypes.h>
    00026 #include <ErrorBase.h>
    00027 #include <SystemMgr.h>
    00028
    00029
    00030 /**
    00031  * @name To Define when building the library
    00032  *
    00033  */
    00034 /*@{*/
    00035 #if (CPU_TYPE != CPU_68K) || (defined BUILDING_OVLY_LIB)
    00036     #define ARM_NATIVECODE          /**<        */
    00037     #define OVLY_LIB_TRAP(trapNum)      /**<        */
    00038 #else
    00039     #include <LibTraps.h>
    00040     #define OVLY_LIB_TRAP(trapNum) SYS_TRAP(trapNum)    /**<        */
    00041 #endif
    00042 /*@}*/
    00043
    00044
    00045 /**
    00046  * @name Type and creator of the Library
    00047  *
    00048  */
    00049 /*@{*/
    00050 #define     kLcdOverlayLibType      'libr'      /**< database type */
    00051 #define     kLcdOverlayLibCreator   'Povl'          /**< database creator */
    00052 /*@}*/
    00053
    00054 /**
    00055  * @name Internal library name which can be passed to SysLibFind()
    00056  *
    00057  */
    00058 /*@{*/
    00059 #define     kLcdOverlayLibName      "LcdOverlayManager" /**<        */
    00060 /*@}*/
    00061
    00062 /**
    00063  * @name Library versionning
    00064  *
    00065  */
    00066 /*@{*/
    00067 #define     kLcdOverlayLibVersion1  sysMakeROMVersion(1, 0, 0, sysROMStageRelease, 0)   /**<        */
    00068 #define     kLcdOverlayLibVersion   kLcdOverlayLibVersion1                  /**<        */
    00069 /*@}*/
    00070
    00071 /**
    00072  * @name LCD Overlay result codes
    00073  *    (appErrorClass is reserved for 3rd party apps/libraries.
    00074  *    It is defined in SystemMgr.h)
    00075  *
    00076  */
    00077 /*@{*/
    00078 #define kLcdOverlayLibErrorClass    (oemErrorClass + 0x200)                 /**<        */
    00079 #define kLcdOverlayLibErrBadParam           (kLcdOverlayLibErrorClass | 0x01)   /**< invalid parameter */
    00080 #define kLcdOverlayLibErrNoMemory           (kLcdOverlayLibErrorClass | 0x02)   /**< Memory error */
    00081 #define kLcdOverlayLibErrNotOpen            (kLcdOverlayLibErrorClass | 0x03)   /**< library is not open */
    00082 #define kLcdOverlayLibErrStillOpen          (kLcdOverlayLibErrorClass | 0x04)   /**< returned from LcdOverlayLibClose() if the library is still open */
    00083 #define kLcdOverlayLibErrInternal           (kLcdOverlayLibErrorClass | 0x05)   /**< Internal error */
    00084 #define kLcdOverlayLibErrNotSupported       (kLcdOverlayLibErrorClass | 0x06)       /**< Unsupported function */
    00085 #define kLcdOverlayLibErrNotCompatible      (kLcdOverlayLibErrorClass | 0x07)       /**< Bad Version */
    00086 /*@}*/
    00087
    00088 /***********************************************************************
    00089  * Constants - control commands
    00090  ***********************************************************************/
    00091
    00092 /**
    00093  * @name Command definition
    00094  *
    00095  */
    00096 /*@{*/
    00097 #define kLcdOverlayLibCtrlFormatSet         0x01    /**< Parameter as LcdOverlayLibFormatType* */
    00098 #define kLcdOverlayLibCtrlFormatGet         0x02    /**< Parameter as LcdOverlayLibFormatType* */
    00099 #define kLcdOverlayLibCtrlFormatQuery           0x03    /**< Parameter as LcdOverlayLibFormatType* */
    00100
    00101 #define kLcdOverlayLibCtrlRectSet           0x04    /**< Parameter as RectangleType* (low res coords) */
    00102 #define kLcdOverlayLibCtrlRectGet           0x05    /**< Parameter as RectangleType* (low res coords) */
    00103
    00104 #define kLcdOverlayLibCtrlStart             0x06    /**< No parameter */
    00105 #define kLcdOverlayLibCtrlDraw              0x07    /**< Parameter as void* */
    00106 #define kLcdOverlayLibCtrlStop              0x08    /**< No parameter */
    00107 /*@}*/
    00108
    00109 typedef UInt16 LcdOverlayLibControlType;        /**<        */
    00110
    00111 /***********************************************************************
    00112  * Constants - Capabilities Settings
    00113  ***********************************************************************/
    00114
    00115 /**
    00116  * @brief Generic settings
    00117  *        For settings without manual values, only type is used
    00118  **/
    00119 typedef struct LcdOverlayLibSettingTag
    00120 {
    00121     UInt32 type;        /**< For Manual, use constant below */
    00122     Int32 value;        /**< For manual only */
    00123     Int32 minValue;     /**< This value is used for Get/Query Only and is valid for Manual value */
    00124     Int32 maxValue;     /**< This value is used for Get/Query Only and is valid for Manual value */
    00125 } LcdOverlayLibSettingType;
    00126
    00127 /**
    00128  * @name Overlay data format
    00129  *
    00130  */
    00131 /*@{*/
    00132 #define kLcdOverlayLibDataFormatYCbCr444        0x02    /**<        */
    00133 #define kLcdOverlayLibDataFormatYCbCr422        0x04    /**<        */
    00134 #define kLcdOverlayLibDataFormatYCbCr420        0x08    /**<        */
    00135
    00136 #define kLcdOverlayLibDataFormatYCbCr444Planar  0x10        /**<        */
    00137 #define kLcdOverlayLibDataFormatYCbCr422Planar  0x20        /**<        */
    00138 #define kLcdOverlayLibDataFormatYCbCr420Planar  0x40        /**<        */
    00139
    00140 #define kLcdOverlayLibDataFormatRGB565          0x80    /**<        */
    00141 /*@}*/
    00142
    00143 typedef struct LcdOverlayLibSettingTag      LcdOverlayLibFormatType;    /**<        */
    00144
    00145 /**
    00146  * @name Library trap
    00147  *
    00148  */
    00149 /*@{*/
    00150 #define kLcdOverlayLibTrapGetVersion        (sysLibTrapCustom + 0)      /**<        */
    00151 #define kLcdOverlayLibTrapControl       (sysLibTrapCustom + 1)      /**<        */
    00152 /*@}*/
    00153
    00154 /***********************************************************************
    00155  * API Prototypes
    00156  ***********************************************************************/
    00157
    00158 #ifdef __cplusplus
    00159 extern "C" {
    00160 #endif
    00161
    00162 #ifndef ARM_NATIVECODE
    00163
    00164 /**
    00165  * @brief Standard library open function
    00166  *
    00167  * @param refNum:   IN:
    00168  * @retval Err error code.
    00169  **/
    00170 extern Err LcdOverlayLibOpen(UInt16 refNum)
    00171     OVLY_LIB_TRAP(sysLibTrapOpen);
    00172
    00173 /**
    00174  * @brief Standard library close function
    00175  *
    00176  * @param refNum:   IN:
    00177  * @retval Err error code.
    00178  **/
    00179 extern Err LcdOverlayLibClose(UInt16 refNum)
    00180     OVLY_LIB_TRAP(sysLibTrapClose);
    00181
    00182 /**
    00183  * @brief
    00184  *
    00185  * @param refNum:   IN:
    00186  * @retval Err error code.
    00187  **/
    00188 extern Err LcdOverlayLibSleep(UInt16 refNum)
    00189     OVLY_LIB_TRAP(sysLibTrapSleep);
    00190
    00191 /**
    00192  * @brief
    00193  *
    00194  * @param refNum:   IN:
    00195  * @retval Err error code.
    00196  **/
    00197 extern Err LcdOverlayLibWake(UInt16 refNum)
    00198     OVLY_LIB_TRAP(sysLibTrapWake);
    00199
    00200 /**
    00201  * @brief Custom library API functions
    00202  *
    00203  * @param refNum:   IN:
    00204  * @param sdkVersion:   IN:
    00205  * @param libVersionP:  IN:
    00206  * @retval Err error code.
    00207  **/
    00208 extern Err LcdOverlayLibGetVersion(UInt16 refNum, UInt32 sdkVersion, UInt32* libVersionP)
    00209     OVLY_LIB_TRAP(kLcdOverlayLibTrapGetVersion);
    00210
    00211 /**
    00212  * @brief
    00213  *
    00214  * @param refNum:   IN:
    00215  * @param cmdId:    IN:
    00216  * @param parameterP:   IN:
    00217  * @retval Err error code.
    00218  **/
    00219 extern Err LcdOverlayLibControl(UInt16 refNum, LcdOverlayLibControlType cmdId, void* parameterP)
    00220     OVLY_LIB_TRAP(kLcdOverlayLibTrapControl);
    00221
    00222 #else
    00223
    00224 /**
    00225  * Prototype used when building ARM Native Library.
    00226  **/
    00227 /**
    00228  * @brief
    00229  *
    00230  * @retval Err error code.
    00231  **/
    00232 extern Err LcdOverlayLibOpen(void);
    00233
    00234 /**
    00235  * @brief
    00236  *
    00237  * @retval Err error code.
    00238  **/
    00239 extern Err LcdOverlayLibClose(void);
    00240
    00241 /**
    00242  * @brief
    00243  *
    00244  * @retval Err error code.
    00245  **/
    00246 extern Err LcdOverlayLibSleep(void);
    00247
    00248 /**
    00249  * @brief
    00250  *
    00251  * @retval Err error code.
    00252  **/
    00253 extern Err LcdOverlayLibWake(void);
    00254
    00255 /**
    00256  * @brief Custom library API functions
    00257  *
    00258  * @param sdkVersion:   IN:
    00259  * @param libVersionP:  IN:
    00260  * @retval Err error code.
    00261  **/
    00262 extern Err LcdOverlayLibGetVersion(UInt32 sdkVersion, UInt32* libVersionP);
    00263
    00264 /**
    00265  * @brief
    00266  *
    00267  * @param cmdId:    IN:
    00268  * @param parameterP:   IN:
    00269  * @retval Err error code.
    00270  **/
    00271 extern Err LcdOverlayLibControl(LcdOverlayLibControlType cmdId, void* parameterP);
    00272
    00273 #endif
    00274
    00275
    00276 #ifdef __cplusplus
    00277 }
    00278 #endif
    00279
    00280 #endif // __PalmLcdOverlay_H__

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