|
MoSync 3.0.1
|
An event; a message indicating that something has happened, e.g. that a key has been pressed. More...
#include <maapi.h>
Public Attributes | |
| int | type |
| union { | |
| struct { | |
| int key | |
| int nativeKey | |
| } | |
| uint character | |
| struct { | |
| MAPoint2d point | |
| int touchId | |
| } | |
| int state | |
| MAConnEventData conn | |
| struct { | |
| int textboxResult | |
| int textboxLength | |
| } | |
| struct { | |
| int imagePickerState | |
| MAHandle imagePickerItem | |
| } | |
| int optionsBoxButtonIndex | |
| int alertButtonIndex | |
| int status | |
| MASensor sensor | |
| MANFCEventData nfc | |
| MAAdsEventData adsData | |
| MAHandle localNotificationHandle | |
| MAHandle pushNotificationHandle | |
| MACaptureEventData captureData | |
| void * data | |
| MAAudioInstance audioInstance | |
| }; | |
An event; a message indicating that something has happened, e.g. that a key has been pressed.
| int MAEvent::type |
One of the EVENT_TYPE constants.
| int MAEvent::key |
In KEY events, this will be one of the MAK constants.
In KEY events, this will be the native keycode.
| uint MAEvent::character |
In CHAR events, this is the Unicode character that was received.
In POINTER events, this will be the location of the pointer.
| int MAEvent::touchId |
In POINTER events, this will be the finger triggering the event.
| int MAEvent::state |
Valid only in CONN events.
One of the MA_TB_RES codes.
The length, in characters, of the finished text. Does not include the terminating zero.
EVENT_TYPE_IMAGE_PICKER events, this will be 0 if canceled or 1 if Ok was pressed.
EVENT_TYPE_IMAGE_PICKER event, contains the new handle to the selected image.
EVENT_TYPE_OPTIONS_BOX_BUTTON_CLICKED event, contains the index of the selected option.
EVENT_TYPE_ALERT event. The index of the selected button. If button1 is pressed, the value is 1. If button2 is pressed, the value is 2. If button3 is pressed, the value is 3.
| int MAEvent::status |
In EVENT_TYPE_SMS events, this will be one of the MA_SMS_RESULT_* constants.
Valid in SENSOR events.
NFC event data
Ads event data.
Local notification's handle that send the event. Valid only if the event type is LOCAL_NOTIFICATION .
Push notification's handle that send the event. Valid only if the event type is PUSH_NOTIFICATION .
Store the result for a capture action. Valid only if the event type is CAPTURE .
| void* MAEvent::data |
Used by custom events. See invididual event descriptions.
Contains the prepared audio instance. Valid only if the event type is AUDIO_PREPARED or AUDIO_COMPLETED .
| union { ... } |