|
Documentation
|
|||
|
CGapiInputOverviewGapiInput locks all hardware keys and maps the up/down/left/right keys to the correct orientation of the display. This document has been updated for use with GapiDraw 4.2 or later.
CGapiInput::OpenInputEnables a full, exclusive lock of all hardware keys on the mobile device.
ParametersNone Return valuesIf this method succeeds, the return value is GD_OK. If the method fails, the return value may be one of the following return values: GDERR_LOCKEDKEYS RemarksWhen destroying the CGapiInput object, the keyboard lock will be released automatically. In the GapiDraw builds for Windows Mobile 5.0 and later devices, CGapiInput will use the AllKeys API to lock the keys of the mobile device. In the GapiDraw builds for Pocket PC 2003 devices, CGapiInput will use the GAPI library "gx.dll" to lock the keys of the mobile device. For CGapiInput to find the file "gx.dll" it needs to be placed in the \Windows folder or the application folder of your program. If the file gx.dll should not be available CGapiDisplay::OpenDisplay will return GDERR_NOGAPI, but you will still be able to use CGapiInput for mapping the directional keys. CGapiInput::CloseInputReleases the exclusive lock on all hardware keys. This is automatically done in the destructor.
ParametersNone Return valuesIf this method succeeds, the return value is GD_OK. If the method fails, the return value may be one of the following return values: GDERR_NOTLOCKED CGapiInput::GetKeyListReturns a list of virtual key codes matching the current display orientation.
Parameters
Return valuesIf this method succeeds, the return value is GD_OK. If the method fails, the return value may be one of the following return values: GDERR_INVALIDPARAMS RemarksThe list of virtual key codes contains values for
The orientation of the arrow keys (up/down/left/right) will be adjusted to match the display orientation. "Up" will for example always be -Y. In the GapiDraw builds for Windows Mobile 5.0 and later devices the key mapping is defined as follows: In the GapiDraw builds for Pocket PC 2003, the values of vkA, vkB, vkC and vkStart will be set by the GAPI library (gx.dll).
|