API Guide Home
(Online version only)

PalmPin.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  * @defgroup PIN Pen Input Manager Library
00007  *
00008  * @{
00009  * @}
00010  */
00011 /** 
00012  * @ingroup PIN
00013  *
00014  */
00015  
00016 /**
00017  * @file    PalmPin.h
00018  * @version 1.0
00019  *
00020  * @brief  Public API for the Pen Input Manager Library
00021  * 
00022  *
00023  * <hr>
00024  */
00025 
00026 
00027 #ifndef __PINLIB_H__ 
00028 #define __PINLIB_H__
00029 
00030 #include <PalmTypes.h>
00031 #include <LibTraps.h>
00032 
00033 /** 
00034  * @name Library type and creator
00035  *
00036  */
00037 /*@{*/
00038 #define pinLibType          sysFileTLibrary     /**<        */
00039 #define pinLibCreator           'pinM'          /**<        */  
00040 #define pinLibName          "PinLib"        /**<        */
00041 #define pinFtrNumVersion        0           /**<        */
00042 /*@}*/
00043 
00044 /** 
00045  * @name Pinlet IDs
00046  *
00047  */
00048 /*@{*/
00049 #define pinClassic          "Classic"   /**<        */
00050 #define pinTriCell          "Tri Cell"  /**<        */
00051 #define pinStdKeyboard          "StdKB"     /**<        */
00052 #define pinletStdKbNum          "StdKBNum"  /**<        */
00053 #define pinletStdKbIntl         "StdKBIntl" /**<        */
00054 /*@}*/
00055 
00056 /** 
00057  * @name PIN Manager Errors
00058  *
00059  */
00060 /*@{*/
00061 #define pinErrorClass           (appErrorClass | 0x0A00)    /**<        */
00062 #define pinErrInvalidState      (pinErrorClass + 1)     /**<        */
00063 #define pinErrUnknownID         (pinErrorClass + 2)     /**<        */
00064 #define pinErrInvalidInputMode      (pinErrorClass + 3)     /**<        */
00065 /*@}*/
00066 
00067 /** 
00068  * @name Input area states
00069  *
00070  */
00071 /*@{*/
00072 #define pinInputAreaNone        0   /**<        */
00073 #define pinInputAreaShow        1   /**<        */
00074 #define pinInputAreaHide        2   /**<        */
00075 #define pinInputAreaLegacyMode      3   /**<        */
00076 #define pinInputAreaFullScreen      4   /**<        */
00077 /*@}*/
00078 
00079 /** 
00080  * @name Input Modes
00081  *
00082  */
00083 /*@{*/
00084 #define pinInputModeNormal      0   /**<        */
00085 #define pinInputModeShift       1   /**<        */
00086 #define pinInputModeCapsLock        2   /**<        */
00087 #define pinInputModePunctuation     3   /**<        */
00088 #define pinInputModeNumeric     4   /**<        */
00089 #define pinInputModeExtended        5   /**<        */
00090 #define pinInputModeHiragana        6   /**<        */
00091 #define pinInputModeKatakana        7   /**<        */
00092 /*@}*/
00093 
00094 /** 
00095  * @name AIA event and notification
00096  *
00097  */
00098 /*@{*/
00099 #define sysNotifyAiaEvent       'Aian'      /**<        */
00100 #define AiaExtentChangedEvent       0x5000      /**<        */
00101 /*@}*/
00102 
00103 typedef struct AiaExtentChangedEventDataType
00104 {
00105     RectangleType newDim;       /**<        */
00106     RectangleType oldDim;       /**<        */
00107 } AiaExtentChangedEventDataType;
00108 
00109 /**
00110  * Macro to simplify getting the data out of the event structure.
00111  * 
00112  * Example:
00113  * yDiff = AiaExtentChangedData(eventP)->newDim->extent.y -
00114  *         aiaExtentChangedData(eventP)->oldDim->extent.y;
00115  **/
00116 #define aiaExtentChangedData(eventP) ((AiaExtentChangedEventDataType *)(&((eventP)->data.generic))) /**<        */
00117 
00118 
00119 /** 
00120  * @name Library Traps
00121  *
00122  */
00123 /*@{*/
00124 #define kPinLibTrapOpen             sysLibTrapOpen          /**<        */
00125 #define kPinLibTrapClose            sysLibTrapClose         /**<        */
00126 #define kPinLibTrapPinGetInputAreaState     (sysLibTrapCustom + 17)     /**<        */
00127 #define kPinLibTrapPinSetInputAreaState     (sysLibTrapCustom + 18)     /**<        */
00128 #define kPinLibTrapPinResetInputState       (sysLibTrapCustom + 24)     /**<        */
00129 #define kPinLibTrapPinGetCurrentPinletID    (sysLibTrapCustom + 20)     /**<        */
00130 #define kPinLibTrapPinSwitchToPinlet        (sysLibTrapCustom + 21)     /**<        */
00131 #define kPinLibTrapPinGetInputMode      (sysLibTrapCustom + 23)     /**<        */
00132 #define kPinLibTrapPinSetInputMode      (sysLibTrapCustom + 22)     /**<        */
00133 #define kPinLibTrapPINShowReferenceDialog   (sysLibTrapCustom + 25)     /**<        */
00134 /*@}*/
00135 
00136 /**
00137  * Prototypes
00138  **/
00139 #ifdef __cplusplus
00140 extern "C" {
00141 #endif
00142 
00143 /**
00144  * @brief
00145  *
00146  * @param refnum:   IN:  
00147  * @retval Err error code.
00148  **/
00149 Err PinLibOpen(UInt16 refnum)
00150                 SYS_TRAP(kPinLibTrapOpen);
00151 
00152 /**
00153  * @brief
00154  *
00155  * @param refnum:   IN:  
00156  * @retval Err error code.
00157  **/
00158 Err PinLibClose(UInt16 refnum)
00159                 SYS_TRAP(kPinLibTrapClose);
00160 
00161 /**
00162  * @brief
00163  *
00164  * @param refnum:   IN:  
00165  * @retval Err error code.
00166  **/
00167 UInt16 PinGetInputAreaState(UInt16 refnum)
00168                 SYS_TRAP(kPinLibTrapPinGetInputAreaState);
00169                 
00170 /**
00171  * @brief
00172  *
00173  * @param refnum:   IN:  
00174  * @param state:    IN:  
00175  * @retval Err error code.
00176  **/
00177 Err PinSetInputAreaState(UInt16 refnum, UInt16 state)
00178                 SYS_TRAP(kPinLibTrapPinSetInputAreaState);
00179 
00180 /**
00181  * @brief
00182  *
00183  * @param refnum:   IN:  
00184  * @retval Err error code.
00185  **/
00186 void PinResetInputState(UInt16 refnum)
00187                 SYS_TRAP(kPinLibTrapPinResetInputState);
00188                 
00189 /**
00190  * @brief
00191  *
00192  * @param refnum:   IN:  
00193  * @retval Err error code.
00194  **/
00195 const char* PinGetCurrentPinletID(UInt16 refnum)
00196                 SYS_TRAP(kPinLibTrapPinGetCurrentPinletID);
00197             
00198 /**
00199  * @brief
00200  *
00201  * @param refnum:   IN:  
00202  * @param pinletID: IN:  
00203  * @param initialInputMode: IN:  
00204  * @retval Err error code.
00205  **/    
00206 Err PinSwitchToPinlet(UInt16 refnum, const char* pinletID, UInt16 initialInputMode)
00207                 SYS_TRAP(kPinLibTrapPinSwitchToPinlet);
00208 
00209 /**
00210  * @brief
00211  *
00212  * @param refnum:   IN:  
00213  * @retval Err error code.
00214  **/
00215 UInt16 PinGetInputMode(UInt16 refnum)
00216                 SYS_TRAP(kPinLibTrapPinGetInputMode);
00217             
00218 /**
00219  * @brief
00220  *
00221  * @param refnum:   IN:  
00222  * @param inputMode:    IN:  
00223  * @retval Err error code.
00224  **/    
00225 void PinSetInputMode(UInt16 refnum, UInt16 inputMode)
00226                 SYS_TRAP(kPinLibTrapPinSetInputMode);
00227     
00228                 
00229                 
00230 #ifdef __cplusplus
00231 }
00232 #endif
00233 
00234 
00235 #endif  //__PINLIB_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