MoSync 3.0.1
MAEvent Struct Reference

An event; a message indicating that something has happened, e.g. that a key has been pressed. More...

#include <maapi.h>

List of all members.

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
}; 

Detailed Description

An event; a message indicating that something has happened, e.g. that a key has been pressed.


Member Data Documentation

One of the EVENT_TYPE constants.

In KEY events, this will be one of the MAK constants.

In KEY events, this will be the native keycode.

In CHAR events, this is the Unicode character that was received.

In POINTER events, this will be the location of the pointer.

In POINTER events, this will be the finger triggering the event.

In BT events, this will be a value >= 0 or one of the CONNERR constants.

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.

In EVENT_TYPE_SMS events, this will be one of the MA_SMS_RESULT_* constants.

Valid in SENSOR events.

NFC 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 .

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 { ... }
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines