API Guide Home
(Online version only)

palmOneLcdOverlayCommon.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    LcdOverlay LCD Overlay Library
00007  * @brief       This library provide support for displaying YCbCr images directly
00008  *              on the screen.
00009  *
00010  * Note that the image that is drawn on the screen will always sit on top of the
00011  * form above everything else.
00012  *
00013  * @{
00014  * @}
00015  */
00016 /**
00017  * @ingroup LcdOverlay
00018  */
00019 
00020 /**
00021  *
00022  * @file    palmOneLcdOverlayCommon.h
00023  * @version 1.0
00024  * @brief   Public 68k common header file for LCDOverlay API.
00025  *
00026  * This file contains the common constants and error codes for the LCDOverlay library.
00027  */
00028 
00029 #ifndef _PALMONELCDOVERLAYCOMMON_H_
00030 #define _PALMONELCDOVERLAYCOMMON_H_
00031 
00032 #include <PalmTypes.h>
00033 #include <ErrorBase.h>
00034 #include <SystemMgr.h>
00035 
00036 /***********************************************************************
00037  * Library trap
00038  ***********************************************************************/
00039 /**
00040  * @name Function Traps
00041  */
00042 /*@{*/
00043 #define kLcdOverlayLibTrapGetVersion        (sysLibTrapCustom + 0)
00044 #define kLcdOverlayLibTrapControl           (sysLibTrapCustom + 1)
00045 /*@}*/
00046 
00047 /***********************************************************************
00048  * Type and creator of the Library
00049  ***********************************************************************/
00050 
00051 #define     kLcdOverlayLibName      "LcdOverlayManager" /**< LcdOverlay library name. */
00052 #define     kLcdOverlayLibType      'libr'              /**< LcdOverlay Type. */
00053 #define     kLcdOverlayLibCreator   'Povl'              /**< LcdOverlay Creator ID. */
00054 
00055 /***********************************************************************
00056  * Library versioning
00057  ***********************************************************************/
00058 
00059 #define     kLcdOverlayLibVersion1  sysMakeROMVersion(1, 0, 0, sysROMStageRelease, 0) /**< LcdOverlay lib version */
00060 #define     kLcdOverlayLibVersion   kLcdOverlayLibVersion1 /**< LcdOverlay lib version */
00061 
00062 /***********************************************************************
00063  * LCD Overlay result codes
00064  ***********************************************************************/
00065 /**
00066  * @name Error Codes
00067  */
00068 /*@{*/
00069 /** Lcd Overlay error base number */
00070 #define kLcdOverlayLibErrorClass            (oemErrorClass + 0x200)
00071 /** invalid parameter */
00072 #define kLcdOverlayLibErrBadParam           (kLcdOverlayLibErrorClass | 0x01)
00073 /** Memory error */
00074 #define kLcdOverlayLibErrNoMemory           (kLcdOverlayLibErrorClass | 0x02)
00075 /** library is not open */
00076 #define kLcdOverlayLibErrNotOpen            (kLcdOverlayLibErrorClass | 0x03)
00077 /** returned from LcdOverlayLibClose() if the library is still open */
00078 #define kLcdOverlayLibErrStillOpen          (kLcdOverlayLibErrorClass | 0x04)
00079 /** Internal error */
00080 #define kLcdOverlayLibErrInternal           (kLcdOverlayLibErrorClass | 0x05)
00081 /** Unsupported function */
00082 #define kLcdOverlayLibErrNotSupported       (kLcdOverlayLibErrorClass | 0x06)
00083 /** Bad Version */
00084 #define kLcdOverlayLibErrNotCompatible      (kLcdOverlayLibErrorClass | 0x07)
00085 /*@}*/
00086 
00087 /***********************************************************************
00088  * Constants - control commands
00089  ***********************************************************************/
00090 /**
00091  * @name Control Commands
00092  */
00093 /*@{*/
00094 /** Parameter is LcdOverlayLibFormatType*. Set the format type of the overlay. */
00095 #define kLcdOverlayLibCtrlFormatSet         0x01
00096 /** Parameter is LcdOverlayLibFormatType*. Get  the format type of the overlay.*/
00097 #define kLcdOverlayLibCtrlFormatGet         0x02
00098 /** Parameter is LcdOverlayLibFormatType*. Query the type of format types supported. */
00099 #define kLcdOverlayLibCtrlFormatQuery       0x03
00100 /** Parameter is RectangleType* (low res coords). Set the overlay draw rectangle size*/
00101 #define kLcdOverlayLibCtrlRectSet           0x04
00102 /** Parameter is RectangleType* (low res coords). Get the overlay draw rectangle size*/
00103 #define kLcdOverlayLibCtrlRectGet           0x05
00104 /** Turn Overlay on before you do a draw. Takes no parameters */
00105 #define kLcdOverlayLibCtrlStart             0x06
00106 /** Draw picture using Overlay lib. void* pointer to image data */
00107 #define kLcdOverlayLibCtrlDraw              0x07
00108 /** Turn Overlay off usually after drawing is done. Takes no parameters */
00109 #define kLcdOverlayLibCtrlStop              0x08
00110 /*@}*/
00111 typedef UInt16 LcdOverlayLibControlType; /**< Used with the kLcdOverlayLibCtrl defines */
00112 
00113 /***********************************************************************
00114  * Constants - Capabilities Settings
00115  ***********************************************************************/
00116 
00117 /**
00118  * @brief Structure used in LcdOverlayLibControl() for setting parameters
00119           Currently only type is used to specify the format type (seelist
00120           below) when used with kLcdOverlayLibCtrlFormatSet/Get/Query.
00121  */
00122 
00123 typedef struct LcdOverlayLibSettingTag
00124 {
00125     UInt32 type;         /**< Overlay (Image ) format type */
00126     Int32 value;         /**< Not used currently */
00127     Int32 minValue;      /**< Not used currently */
00128     Int32 maxValue;      /**< Not used currently */
00129 } LcdOverlayLibSettingType;
00130 
00131 /**
00132  * @brief Struct used in LcdOverlayLibControl() calls.
00133  * @see LcdOverlayLibSettingTag
00134  */
00135 typedef struct LcdOverlayLibSettingTag      LcdOverlayLibFormatType;
00136 
00137 /**
00138  * @name Data Formats
00139  * @brief Format types for overlay.
00140  *
00141  * Not all of the formats may be supported, please do a query to find
00142  * the supported formats.
00143  */
00144 /*@{*/
00145 #define kLcdOverlayLibDataFormatYCbCr444        0x02
00146 #define kLcdOverlayLibDataFormatYCbCr422        0x04
00147 #define kLcdOverlayLibDataFormatYCbCr420        0x08
00148 #define kLcdOverlayLibDataFormatYCbCr444Planar  0x10
00149 #define kLcdOverlayLibDataFormatYCbCr422Planar  0x20
00150 #define kLcdOverlayLibDataFormatYCbCr420Planar  0x40
00151 #define kLcdOverlayLibDataFormatRGB565          0x80 /**< This is actually RGB555 with 1 bit for transperancy, may change in future */
00152 /*@}*/
00153 
00154 #endif  // _PALMONELCDOVERLAYCOMMON_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