API Guide Home
(Online version only)

PmKeyLibCommon.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    PmKeyLib Key Library
00007  * @brief       This library provides support for the key-related functionalities.
00008  *
00009  * Application can use this library to detect the state of particular keys, whether
00010  * they are pressed or released. This library can also be used to enable/disable
00011  * a certain key programmatically, translate keycodes to characters, and also manage
00012  * the different settings of the keypad.
00013  *
00014  * @{
00015  * @}
00016  */
00017 /**
00018  * @ingroup PmKeyLib
00019  */
00020 
00021 /**
00022  * @file  PmKeyLibCommon.h
00023  * @brief Public 68k common header file for system library that exports key-related APIs.
00024  *
00025  * This library is based on key APIs from HsExtensions and was broken apart from
00026  * HsExtensions so the APIs could be ported to other platforms.
00027  */
00028 
00029 #ifndef __PMKEYLIBCOMMON_H__
00030 #define __PMKEYLIBCOMMON_H__
00031 
00032 #include <palmOneSystemCommon.h>    // for sysMakeLibAPIVersion
00033 
00034 /********************************************************************
00035  * Constants and Enums
00036  ********************************************************************/
00037 
00038 #define kPmKeyLibType               sysFileTLibrary /**< standard library type */
00039 #define kPmKeyLibCreator            pmFileCKeyLib   /**< PmKeyLib creator ID */
00040 #define kPmKeyLibName               "PmKeyLib-PmKe" /**< PmKeyLib database name */
00041 #define kPmKeyLibAPIMajorVersion    3   /**< Major version incremented when API
00042                                              changes */
00043 #define kPmKeyLibAPIMinorVersion    0   /**< Minor version incremented with
00044                                              each release of library that
00045                                              doesn't change the API */ 
00046 #define kPmKeyLibAPIVersion         sysMakeLibAPIVersion(kPmKeyLibAPIMajorVersion, kPmKeyLibAPIMinorVersion)
00047 
00048 
00049 /**
00050  * @name Feature values
00051  */
00052 /*@{*/
00053 #define kPmKeyLibFtrValAPIVersion   0   /**< Feature value used to get/set
00054                                              library API version
00055                                              (kPmKeyLibAPIVersion).  Note
00056                                              that the first release of the
00057                                              library did not set this feature.
00058                                              Therefore, if the library does
00059                                              exist but the feature does not,
00060                                              you can assume the major version
00061                                              of the library is 1.  Note also
00062                                              that the feature is not set
00063                                              until library is loaded so you
00064                                              must load PmKeyLib before getting
00065                                              the feature */
00066 /*@}*/
00067 
00068 
00069 
00070 // Add in once we need public attributes
00071 enum PmKeyAttrEnumTag
00072 { 
00073   /*
00074    * End of enums in API version 1 (no enums defined in version 1)
00075    */
00076 
00077 
00078   pmKeyAttrPagingMode,          /**< Whether currently pressed key is in page mode */
00079 
00080   /*
00081    * End of enums in API version 2
00082    */
00083 
00084   pmKeyAttrGetLauncherKeyCode,  /**< Returns the key code for the Launcher key */
00085   pmKeyAttrGetMenuKeyCode,      /**< Returns the key code for the Menu key */
00086   pmKeyAttrGetSendKeyCode,      /**< Returns the key code for the Send key */
00087   pmKeyAttrGetEndKeyCode,       /**< Returns the key code for the End key */
00088   pmKeyAttrGetPhoneKeyCode      /**< Returns the key code for the Phone key */
00089 
00090   /*
00091    * End of enums in API version 3
00092    */
00093 
00094 
00095   /*
00096    * Attributes greater than 0x9000 are defined for internal use
00097    * in Prv/PmPrvKeyLibCommon.h
00098    */
00099 };
00100 typedef UInt16 PmKeyAttrEnum;
00101 
00102 
00103 /********************************************************************
00104  * Traps
00105  ********************************************************************/
00106 /**
00107  * @name Function Traps
00108  */
00109 /*@{*/
00110 #define kPmKeyLibTrapOpen                     sysLibTrapOpen
00111 #define kPmKeyLibTrapClose                    sysLibTrapClose
00112 #define kPmKeyLibTrapKeysPressed              (sysLibTrapCustom)
00113 #define kPmKeyLibTrapStop                     (sysLibTrapCustom+1)
00114 #define kPmKeyLibTrapEnableKey                (sysLibTrapCustom+2)
00115 #define kPmKeyLibTrapChrCodeToKeyCode         (sysLibTrapCustom+3)
00116 #define kPmKeyLibTrapKeyCodeToChrCode         (sysLibTrapCustom+4)
00117 #define kPmKeyLibTrapEventIsFromKeyboard      (sysLibTrapCustom+5)
00118 #define kPmKeyLibTrapAttrGet                  (sysLibTrapCustom+6)
00119 #define kPmKeyLibTrapAttrSet                  (sysLibTrapCustom+7)
00120 /*
00121  * End of traps in API version 1
00122  */
00123 
00124 /*@}*/
00125 
00126 #endif // __PMKEYLIBCOMMON_H__

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