|
MoSync 2.7
|
Syscall declarations. These system calls and low-level functions provide access to the basic features of a device. They are implemented by the MoSync runtimes in code native to the device. More...
#include "maapi_defs.h"Classes | |
| struct | MAPoint2d |
| A structure representing a two-dimensional point, with coordinates 'x' and 'y'. More... | |
| struct | MARect |
| A structure representing a rectangle. More... | |
| struct | MACopyData |
| Parameters for the maCopyData() function. More... | |
| struct | MAConnAddrInet4 |
| An address for the TCP/IPv4 protocol. More... | |
| struct | MABtAddr |
| A Bluetooth device address. More... | |
| struct | MAConnAddrBt |
| An address for the Bluetooth Serial Port protocol. More... | |
| struct | MAConnAddr |
| A connection address. More... | |
| struct | MAConnEventData |
| Data for a connection event, including an indicator or success or failure. More... | |
| struct | MASensor |
| A structure containing the sensor type and the data sent to the event. More... | |
| struct | MANFCEventData |
| An event containing the result of an NFC asynchronous operation. More... | |
| struct | MAEvent |
| An event; a message indicating that something has happened, e.g. that a key has been pressed. More... | |
| struct | MAPanicReport |
| A MoSync Panic or other unrecoverable error. More... | |
| struct | MABtDevice |
| Information about a Bluetooth device. More... | |
| struct | MAUUID |
| A Universally Unique Identifier. More... | |
| struct | MABtServiceSize |
| Information about an MABtService object. More... | |
| struct | MABtService |
| Information about a Bluetooth service. More... | |
| struct | MALocation |
| A geographical location specified by latitude and longitude, horizontal and vertical accuracy, and altitude. More... | |
| struct | MAFrameBufferInfo |
| A structure containing information about the native framebuffer, including color format and resolution. More... | |
| struct | MA_CAMERA_FORMAT |
| The camera format, in pixels. More... | |
Defines | |
| #define | MAIDL_HASH ((int)0xc3164193) |
| A hash of the abstract representation of the API described in this file. Identifiers, declarations and definitions are included in the calculation of the hash, but documentation is not. | |
| #define | _WCHAR_DEFINED |
| #define | _SYSV_TYPES_DEFINED |
| #define | EXTENT_Y(e) ((short)(e)) |
| Returns the height of an MAExtent. | |
| #define | EXTENT_X(e) ((short)((e) >> 16)) |
| Returns the width of an MAExtent. | |
| #define | EXTENT(x, y) ((MAExtent)((((int)(x)) << 16) | ((y) & 0xFFFF))) |
| Creates an MAExtent. | |
| #define | TRANS_NONE 0 |
| The image is copied unchanged. | |
| #define | TRANS_ROT90 5 |
| The image is rotated clockwise by 90 degrees. | |
| #define | TRANS_ROT180 3 |
| The image is rotated clockwise by 180 degrees. | |
| #define | TRANS_ROT270 6 |
| The image is rotated clockwise by 270 degrees. | |
| #define | TRANS_MIRROR 2 |
| The image is reflected about its vertical center. | |
| #define | TRANS_MIRROR_ROT90 7 |
| The image is reflected about its vertical center, then rotated clockwise by 90 degrees. | |
| #define | TRANS_MIRROR_ROT180 1 |
| The image is reflected about its vertical center, then rotated clockwise by 180 degrees. | |
| #define | TRANS_MIRROR_ROT270 4 |
| The image is reflected about its vertical center, then rotated clockwise by 270 degrees. | |
| #define | HANDLE_SCREEN 0 |
| This handle refers to the back buffer, which is initially black. | |
| #define | HANDLE_LOCAL 0 |
| #define | RES_OUT_OF_MEMORY -1 |
| #define | RES_BAD_INPUT -2 |
| #define | RES_OK 1 |
| #define | MAS_CREATE_IF_NECESSARY 1 |
| #define | STERR_GENERIC -2 |
| Generic error. | |
| #define | STERR_FULL -3 |
| The storage medium is full. | |
| #define | STERR_NONEXISTENT -5 |
| The store does not exist. | |
| #define | CONNERR_GENERIC -2 |
| Generic error. | |
| #define | CONNERR_MAX -3 |
| The maximum number of open connections allowed has been reached. | |
| #define | CONNERR_DNS -4 |
| DNS resolution error. | |
| #define | CONNERR_INTERNAL -5 |
| Internal error. Please report any occurrences. | |
| #define | CONNERR_CLOSED -6 |
| The connection was closed by the remote peer. | |
| #define | CONNERR_READONLY -7 |
| You attempted to write to a read-only connection. | |
| #define | CONNERR_FORBIDDEN -8 |
| The OS does not trust you enough to let you open this connection. | |
| #define | CONNERR_UNINITIALIZED -9 |
| No operation has been started yet. | |
| #define | CONNERR_CONLEN -10 |
| The Content-Length header could not be found. | |
| #define | CONNERR_URL -11 |
| You supplied a malformed URL. | |
| #define | CONNERR_UNAVAILABLE -12 |
| #define | CONNERR_CANCELED -13 |
| You canceled the operation. | |
| #define | CONNERR_PROTOCOL -14 |
| The server gave an invalid response. | |
| #define | CONNERR_NETWORK -15 |
| The network connection could not be established. | |
| #define | CONNERR_NOHEADER -16 |
| The requested header could not be found. | |
| #define | CONNERR_NOTFOUND -17 |
| The requested object could not be found. | |
| #define | CONNERR_SSL -18 |
| An error occurred during SSL negotiation. | |
| #define | CONNERR_USER -1000000 |
| #define | CONNOP_READ 1 |
| #define | CONNOP_WRITE 2 |
| #define | CONNOP_CONNECT 7 |
| #define | CONNOP_FINISH 11 |
| #define | CONNOP_ACCEPT 16 |
| #define | CONN_MAX 32 |
| The maximum number of open connections allowed. | |
| #define | BTADDR_LEN 6 |
| #define | CONN_FAMILY_INET4 1 |
| #define | CONN_FAMILY_BT 2 |
| #define | HTTP_GET 1 |
| #define | HTTP_POST 2 |
| #define | HTTP_HEAD 3 |
| #define | HTTP_PUT 4 |
| #define | HTTP_DELETE 5 |
| #define | MAK_UNKNOWN 0 |
| #define | MAK_FIRST 0 |
| #define | MAK_BACKSPACE 8 |
| #define | MAK_TAB 9 |
| #define | MAK_CLEAR 12 |
| #define | MAK_RETURN 13 |
| #define | MAK_PAUSE 19 |
| #define | MAK_ESCAPE 27 |
| #define | MAK_SPACE 32 |
| #define | MAK_EXCLAIM 33 |
| #define | MAK_QUOTEDBL 34 |
| #define | MAK_POUND 35 |
| #define | MAK_HASH 35 |
| #define | MAK_GRID 35 |
| #define | MAK_DOLLAR 36 |
| #define | MAK_AMPERSAND 38 |
| #define | MAK_QUOTE 39 |
| #define | MAK_LEFTPAREN 40 |
| #define | MAK_RIGHTPAREN 41 |
| #define | MAK_ASTERISK 42 |
| #define | MAK_STAR 42 |
| #define | MAK_PLUS 43 |
| #define | MAK_COMMA 44 |
| #define | MAK_MINUS 45 |
| #define | MAK_PERIOD 46 |
| #define | MAK_SLASH 47 |
| #define | MAK_0 48 |
| #define | MAK_1 49 |
| #define | MAK_2 50 |
| #define | MAK_3 51 |
| #define | MAK_4 52 |
| #define | MAK_5 53 |
| #define | MAK_6 54 |
| #define | MAK_7 55 |
| #define | MAK_8 56 |
| #define | MAK_9 57 |
| #define | MAK_COLON 58 |
| #define | MAK_SEMICOLON 59 |
| #define | MAK_LESS 60 |
| #define | MAK_EQUALS 61 |
| #define | MAK_GREATER 62 |
| #define | MAK_QUESTION 63 |
| #define | MAK_AT 64 |
| #define | MAK_LEFTBRACKET 91 |
| #define | MAK_BACKSLASH 92 |
| #define | MAK_RIGHTBRACKET 93 |
| #define | MAK_CARET 94 |
| #define | MAK_UNDERSCORE 95 |
| #define | MAK_BACKQUOTE 96 |
| #define | MAK_A 97 |
| #define | MAK_B 98 |
| #define | MAK_C 99 |
| #define | MAK_D 100 |
| #define | MAK_E 101 |
| #define | MAK_F 102 |
| #define | MAK_G 103 |
| #define | MAK_H 104 |
| #define | MAK_I 105 |
| #define | MAK_J 106 |
| #define | MAK_K 107 |
| #define | MAK_L 108 |
| #define | MAK_M 109 |
| #define | MAK_N 110 |
| #define | MAK_O 111 |
| #define | MAK_P 112 |
| #define | MAK_Q 113 |
| #define | MAK_R 114 |
| #define | MAK_S 115 |
| #define | MAK_T 116 |
| #define | MAK_U 117 |
| #define | MAK_V 118 |
| #define | MAK_W 119 |
| #define | MAK_X 120 |
| #define | MAK_Y 121 |
| #define | MAK_Z 122 |
| #define | MAK_DELETE 127 |
| #define | MAK_KP0 256 |
| #define | MAK_KP1 257 |
| #define | MAK_KP2 258 |
| #define | MAK_KP3 259 |
| #define | MAK_KP4 260 |
| #define | MAK_KP5 261 |
| #define | MAK_KP6 262 |
| #define | MAK_KP7 263 |
| #define | MAK_KP8 264 |
| #define | MAK_KP9 265 |
| #define | MAK_KP_PERIOD 266 |
| #define | MAK_KP_DIVIDE 267 |
| #define | MAK_KP_MULTIPLY 268 |
| #define | MAK_KP_MINUS 269 |
| #define | MAK_KP_PLUS 270 |
| #define | MAK_KP_ENTER 271 |
| #define | MAK_KP_EQUALS 272 |
| #define | MAK_UP 273 |
| #define | MAK_DOWN 274 |
| #define | MAK_RIGHT 275 |
| #define | MAK_LEFT 276 |
| #define | MAK_INSERT 277 |
| #define | MAK_HOME 278 |
| #define | MAK_END 279 |
| #define | MAK_PAGEUP 280 |
| #define | MAK_PAGEDOWN 281 |
| #define | MAK_FIRE 284 |
| #define | MAK_SOFTLEFT 285 |
| #define | MAK_SOFTRIGHT 286 |
| #define | MAK_PEN 291 |
| #define | MAK_BACK 292 |
| #define | MAK_MENU 293 |
| #define | MAK_RSHIFT 303 |
| #define | MAK_LSHIFT 304 |
| #define | MAK_RCTRL 305 |
| #define | MAK_LCTRL 306 |
| #define | MAK_RALT 307 |
| #define | MAK_LALT 308 |
| #define | MAK_SEARCH 309 |
| #define | MAKB_LEFT 0x00001 |
| #define | MAKB_UP 0x00002 |
| #define | MAKB_RIGHT 0x00004 |
| #define | MAKB_DOWN 0x00008 |
| #define | MAKB_FIRE 0x00010 |
| #define | MAKB_SOFTLEFT 0x00020 |
| #define | MAKB_SOFTRIGHT 0x00040 |
| #define | MAKB_0 0x00080 |
| #define | MAKB_1 0x00100 |
| #define | MAKB_2 0x00200 |
| #define | MAKB_3 0x00400 |
| #define | MAKB_4 0x00800 |
| #define | MAKB_5 0x01000 |
| #define | MAKB_6 0x02000 |
| #define | MAKB_7 0x04000 |
| #define | MAKB_8 0x08000 |
| #define | MAKB_9 0x10000 |
| #define | MAKB_ASTERISK 0x20000 |
| #define | MAKB_STAR 0x20000 |
| #define | MAKB_HASH 0x40000 |
| #define | MAKB_POUND 0x40000 |
| #define | MAKB_GRID 0x40000 |
| #define | MAKB_CLEAR 0x80000 |
| #define | EVENT_BUFFER_SIZE 256 |
| #define | EVENT_CLOSE_TIMEOUT 2000 |
| In milliseconds. | |
| #define | EVENT_TYPE_CLOSE 1 |
| #define | EVENT_TYPE_KEY_PRESSED 2 |
| #define | EVENT_TYPE_KEY_RELEASED 3 |
| #define | EVENT_TYPE_CONN 4 |
| Connection. | |
| #define | EVENT_TYPE_BT 5 |
| Bluetooth discovery. | |
| #define | EVENT_TYPE_POINTER_PRESSED 8 |
| #define | EVENT_TYPE_POINTER_RELEASED 9 |
| #define | EVENT_TYPE_POINTER_DRAGGED 10 |
| #define | EVENT_TYPE_FOCUS_LOST 13 |
| #define | EVENT_TYPE_FOCUS_GAINED 14 |
| #define | EVENT_TYPE_LOCATION 16 |
| Has MAEvent::data point to an MALocation. | |
| #define | EVENT_TYPE_LOCATION_PROVIDER 17 |
| MAEvent::state is one of the MA_LPS constants. | |
| #define | EVENT_TYPE_SCREEN_CHANGED 21 |
| The size of the screen has changed. Use maGetScrSize() to get the new size. | |
| #define | EVENT_TYPE_CHAR 22 |
| Character input. Uses MAEvent::character. | |
| #define | EVENT_TYPE_TEXTBOX 23 |
| The text box created by maTextBox() was just closed. Uses MAEvent::textboxResult and MAEvent::textboxLength. | |
| #define | EVENT_TYPE_HOMESCREEN_SHOWN 24 |
| The home screen became visible. Currently implemented only on Android. | |
| #define | EVENT_TYPE_HOMESCREEN_HIDDEN 25 |
| The home screen was hidden because an application came to front. Currently implemented only on Android. | |
| #define | EVENT_TYPE_SCREEN_STATE_ON 26 |
| The screen was turned on (the device went out of sleep state). Currently implemented only on Android. | |
| #define | EVENT_TYPE_SCREEN_STATE_OFF 27 |
| The screen was turned off (the device went into sleep state). Currently implemented only on Android. | |
| #define | EVENT_TYPE_WIDGET 28 |
| An event sent from a native widget. | |
| #define | EVENT_TYPE_BLUETOOTH_TURNED_OFF 29 |
| The bluetooth chip was turned off. Bluetooth functions will return CONNERR_UNAVAILABLE. Currently implemented only on Android. | |
| #define | EVENT_TYPE_BLUETOOTH_TURNED_ON 30 |
| The bluetooth chip was turned on. Bluetooth functions will now work normally again. Currently implemented only on Android. | |
| #define | EVENT_TYPE_IMAGE_PICKER 31 |
| The ImagePicker dialog was dismissed either by Cancel, either by OK. | |
| #define | EVENT_TYPE_SMS 32 |
| SMS result message. The field status contains one of the This event is sent on Android and iOS. | |
| #define | EVENT_TYPE_SENSOR 33 |
| Provides data from active sensors. | |
| #define | EVENT_TYPE_ALERT 34 |
| #define | EVENT_TYPE_NFC_TAG_RECEIVED 35 |
| A new NFC tag was received A new tag has been received, use maGetNextTag to retreive it. | |
| #define | EVENT_TYPE_NFC_TAG_DATA_READ 36 |
| New tag data was read An asynchronous NFC tag read operation was completed. | |
| #define | EVENT_TYPE_NFC_TAG_DATA_WRITTEN 37 |
| New tag data was written An asynchronous NFC tag write operation was completed. | |
| #define | EVENT_TYPE_NFC_BATCH_OP 38 |
| A batch operation was performed. | |
| #define | EVENT_TYPE_NFC_TAG_AUTH_COMPLETE 39 |
| Tag authentication was performed An asynchronous NFC tag authentication read was completed. | |
| #define | EVENT_TYPE_NFC_TAG_READ_ONLY 40 |
| Tag was made read only An asynchronous NFC tag read only operation was completed. | |
| #define | EVENT_TYPE_OPTIONS_BOX_BUTTON_CLICKED 41 |
| #define | RUNTIME_MORE 1 |
| The MoSync Reference Environment, also known as the Emulator. | |
| #define | RUNTIME_JAVA 2 |
| Java ME. | |
| #define | RUNTIME_SYMBIAN 3 |
| Symbian. | |
| #define | RUNTIME_WINCE 4 |
| Windows CE, also known as Windows Mobile. | |
| #define | REPORT_PANIC 1 |
| Caused by a MoSync Panic. MAPanicReport::code is the panic code. | |
| #define | REPORT_EXCEPTION 2 |
| Caused by a native exception. MAPanicReport::string describes the exception. | |
| #define | REPORT_PLATFORM_CODE 3 |
| Caused by a platform-specific error. MAPanicReport::code is valid. | |
| #define | REPORT_USER_PANIC 4 |
| #define | REPORT_TIMEOUT 5 |
| Caused by the Close event timeout. Neither code or string are valid. | |
| #define | FONT_TYPE_SERIF 0 |
| #define | FONT_TYPE_SANS_SERIF 1 |
| #define | FONT_TYPE_MONOSPACE 2 |
| #define | FONT_STYLE_NORMAL 0 |
| #define | FONT_STYLE_BOLD 1 |
| #define | FONT_STYLE_ITALIC 2 |
| #define | RES_FONT_OK 1 |
| Indicates that the call to a font syscall was successful. | |
| #define | RES_FONT_INVALID_HANDLE -1 |
| Indicates that an invalid font handle was passed. | |
| #define | RES_FONT_INDEX_OUT_OF_BOUNDS -2 |
| Indicates that the index was off the list size. | |
| #define | RES_FONT_NO_TYPE_STYLE_COMBINATION -3 |
| Indicates that a default font with that combination does not exist. | |
| #define | RES_FONT_NAME_NONEXISTENT -4 |
| Indicates that there is no font with that name on the device. | |
| #define | RES_FONT_LIST_NOT_INITIALIZED -5 |
| Indicates that maFontGetCount() was not called first. | |
| #define | RES_FONT_INSUFFICIENT_BUFFER -6 |
| Indicates that the buffer is not big enough to store the font name. | |
| #define | RES_FONT_INVALID_SIZE -7 |
| Indicates that an invalid size was passed. | |
| #define | RES_FONT_DELETE_DENIED -8 |
| Indicates that the font cannot be deleted because it is in use. maFontDelete(handle) fails with this return code. | |
| #define | MA_LOC_NONE 1 |
| #define | MA_LOC_INVALID 2 |
| #define | MA_LOC_UNQUALIFIED 3 |
| #define | MA_LOC_QUALIFIED 4 |
| #define | MA_LPS_AVAILABLE 1 |
| #define | MA_LPS_TEMPORARILY_UNAVAILABLE 2 |
| #define | MA_LPS_OUT_OF_SERVICE 3 |
| #define | MA_ACCESS_READ 1 |
| #define | MA_ACCESS_READ_WRITE 3 |
| #define | MA_SEEK_SET 0 |
| Beginning of file. | |
| #define | MA_SEEK_CUR 1 |
| Current position. | |
| #define | MA_SEEK_END 2 |
| End of file. | |
| #define | MA_FL_SORT_NONE 0 |
| Don't sort the files. | |
| #define | MA_FL_SORT_DATE 1 |
| Sort the files by date. See maFileDate(). | |
| #define | MA_FL_SORT_NAME 2 |
| Sort the files by name. Case-sensitive? | |
| #define | MA_FL_SORT_SIZE 3 |
| Sort the files by size. See maFileSize(). | |
| #define | MA_FL_ORDER_ASCENDING 0x10000 |
| Oldest / smallest / A first. | |
| #define | MA_FL_ORDER_DESCENDING 0x20000 |
| Newest / biggest / Z first. | |
| #define | MA_FERR_GENERIC -2 |
| #define | MA_FERR_NOTFOUND -3 |
| #define | MA_FERR_FORBIDDEN -4 |
| #define | MA_FERR_RENAME_FILESYSTEM -5 |
| #define | MA_FERR_RENAME_DIRECTORY -6 |
| #define | MA_FERR_WRONG_TYPE -7 |
| #define | MA_FERR_SORTING_UNSUPPORTED -8 |
| The sorting method requested is unsupported on the current platform. | |
| #define | MA_SMS_RESULT_SENT 1 |
| The SMS was sent. | |
| #define | MA_SMS_RESULT_NOT_SENT 2 |
| The SMS was NOT sent. | |
| #define | MA_SMS_RESULT_DELIVERED 3 |
| The SMS was delivered. | |
| #define | MA_SMS_RESULT_NOT_DELIVERED 4 |
| The SMS was NOT delivered. | |
| #define | MA_CAMERA_CONST_BACK_CAMERA 0 |
| A constant that represents the flash being on. | |
| #define | MA_CAMERA_CONST_FRONT_CAMERA 1 |
| A constant that represents the flash being in the automatic mode. | |
| #define | MA_CAMERA_RES_OK 1 |
| A constant that represents successful camera operation. | |
| #define | MA_CAMERA_RES_FAILED -2 |
| A constant that represents a failed camera operation. | |
| #define | MA_CAMERA_RES_NOT_STARTED -3 |
| A constant that represents a camera failing to start. | |
| #define | MA_CAMERA_RES_PROPERTY_NOTSUPPORTED -4 |
| A constant that represents a property not supported by the device. | |
| #define | MA_CAMERA_RES_INVALID_PROPERTY_VALUE -5 |
| A constant that represents an invalid value for that property. | |
| #define | MA_CAMERA_RES_VALUE_NOTSUPPORTED -6 |
| A constant that represents a property value not supported by the device. | |
| #define | MA_CAMERA_FLASH_ON "on" |
| A constant that represents the flash being on. | |
| #define | MA_CAMERA_FLASH_AUTO "auto" |
| A constant that represents the flash being in the automatic mode. | |
| #define | MA_CAMERA_FLASH_OFF "off" |
| A constant that represents the flash being off. | |
| #define | MA_CAMERA_FLASH_TORCH "torch" |
| A constant that represents the flash being in the torch mode. | |
| #define | MA_CAMERA_FOCUS_AUTO "auto" |
| A constant that represents the focus mode being automatic. | |
| #define | MA_CAMERA_FOCUS_INFINITY "infinity" |
| A constant that turns the camera to focus to infinity. | |
| #define | MA_CAMERA_FOCUS_MACRO "macro" |
| A constant that turns the camera to macro mode. | |
| #define | MA_CAMERA_FOCUS_FIXED "fixed" |
| A constant that sets the camera to fixed focus mode. | |
| #define | MA_CAMERA_IMAGE_JPEG "jpeg" |
| A constant that represents JPEG image format. | |
| #define | MA_CAMERA_IMAGE_RAW "raw" |
| A constant that represents RAW image format. | |
| #define | MA_CAMERA_FLASH_MODE "flash-mode" |
| Sets the flash mode for the camera. | |
| #define | MA_CAMERA_FOCUS_MODE "focus-mode" |
| Sets the focus mode for the camera. | |
| #define | MA_CAMERA_IMAGE_FORMAT "image-format" |
| Sets the image format for the camera. | |
| #define | MA_CAMERA_ZOOM "zoom" |
| Sets the zoom level for the camera. | |
| #define | MA_CAMERA_MAX_ZOOM "max-zoom" |
| Provides the information about the maximum supported zoom level on the device. | |
| #define | MA_CAMERA_ZOOM_SUPPORTED "zoom-supported" |
| Indicates that if the device supports zoom or not. | |
| #define | MA_CAMERA_FLASH_SUPPORTED "flash-supported" |
| Indicates that if the device has a flash or not. | |
| #define | MA_TB_TYPE_ANY 0 |
| The user is allowed to enter any text, including line breaks. | |
| #define | MA_TB_TYPE_EMAILADDR 1 |
| The user is allowed to enter an e-mail address. | |
| #define | MA_TB_TYPE_NUMERIC 2 |
| The user is allowed to enter an integer value. | |
| #define | MA_TB_TYPE_PHONENUMBER 3 |
| The user is allowed to enter a phone number. | |
| #define | MA_TB_TYPE_URL 4 |
| The user is allowed to enter a URL. | |
| #define | MA_TB_TYPE_DECIMAL 5 |
| #define | MA_TB_TYPE_SINGLE_LINE 100 |
| The user is allowed to enter any text, except for line breaks. Unavailable on some platforms. In that case, maTextBox() will return MA_TB_RES_TYPE_UNAVAILABLE. You can use MA_TB_TYPE_ANY instead. | |
| #define | MA_TB_TYPE_MASK 0xFFFF |
| #define | MA_TB_RES_OK 1 |
| The user chose OK. | |
| #define | MA_TB_RES_CANCEL 2 |
| The user chose Cancel. | |
| #define | MA_TB_RES_TYPE_UNAVAILABLE -3 |
| The specified type is unavailable on this platform. | |
| #define | MA_TB_FLAG_PASSWORD 0x10000 |
| #define | MA_TB_FLAG_UNEDITABLE 0x20000 |
| Indicates that editing is disallowed. | |
| #define | MA_TB_FLAG_SENSITIVE 0x40000 |
| #define | MA_TB_FLAG_NON_PREDICTIVE 0x80000 |
| #define | MA_TB_FLAG_INITIAL_CAPS_WORD 0x100000 |
| #define | MA_TB_FLAG_INITIAL_CAPS_SENTENCE 0x200000 |
| #define | NOTIFICATION_TYPE_APPLICATION_LAUNCHER 1 |
| #define | SCREEN_ORIENTATION_LANDSCAPE 1 |
| Landscape screen orientation. | |
| #define | SCREEN_ORIENTATION_PORTRAIT 2 |
| Portrait screen orientation. | |
| #define | SCREEN_ORIENTATION_DYNAMIC 3 |
| Screen orientation is based on device sensor. | |
| #define | SENSOR_TYPE_ACCELEROMETER 1 |
| #define | SENSOR_TYPE_MAGNETIC_FIELD 2 |
| #define | SENSOR_TYPE_ORIENTATION 3 |
| #define | SENSOR_TYPE_GYROSCOPE 4 |
| #define | SENSOR_TYPE_PROXIMITY 5 |
| #define | SENSOR_RATE_FASTEST 0 |
| #define | SENSOR_RATE_GAME -1 |
| #define | SENSOR_RATE_NORMAL -2 |
| #define | SENSOR_RATE_UI -3 |
| #define | SENSOR_ERROR_NONE 0 |
| #define | SENSOR_ERROR_NOT_AVAILABLE -1 |
| #define | SENSOR_ERROR_INTERVAL_NOT_SET -2 |
| #define | SENSOR_ERROR_ALREADY_ENABLED -3 |
| #define | SENSOR_ERROR_NOT_ENABLED -4 |
| #define | SENSOR_ERROR_CANNOT_DISABLE -5 |
| #define | UIDEVICE_ORIENTATION_UNKNOWN 0 |
| #define | UIDEVICE_ORIENTATION_PORTRAIT 1 |
| #define | UIDEVICE_ORIENTATION_PORTRAIT_UPSIDE_DOWN 2 |
| #define | UIDEVICE_ORIENTATION_LANDSCAPE_LEFT 3 |
| #define | UIDEVICE_ORIENTATION_LANDSCAPE_RIGHT 4 |
| #define | UIDEVICE_ORIENTATION_FACE_UP 5 |
| #define | UIDEVICE_ORIENTATION_FACE_DOWN 6 |
| #define | SENSOR_PROXIMITY_VALUE_FAR 0 |
| #define | SENSOR_PROXIMITY_VALUE_NEAR 1 |
| #define | MA_NFC_NOT_AVAILABLE -1 |
| #define | MA_NFC_NOT_ENABLED -2 |
| #define | MA_NFC_INVALID_TAG_TYPE -2 |
| #define | MA_NFC_TAG_CONNECTION_LOST -3 |
| #define | MA_NFC_TAG_NOT_CONNECTED -4 |
| #define | MA_NFC_FORMAT_FAILED -5 |
| #define | MA_NFC_TAG_IO_ERROR -127 |
| #define | MA_NFC_TAG_TYPE_NDEF 1 |
| #define | MA_NFC_TAG_TYPE_MIFARE_CL 2 |
| #define | MA_NFC_TAG_TYPE_MIFARE_UL 3 |
| #define | MA_NFC_TAG_TYPE_NFC_A 4 |
| #define | MA_NFC_TAG_TYPE_NFC_B 5 |
| #define | MA_NFC_TAG_TYPE_ISO_DEP 6 |
| #define | MA_NFC_TAG_TYPE_NDEF_FORMATTABLE 128 |
| #define | MA_NFC_NDEF_TNF_EMPTY 0 |
| #define | MA_NFC_NDEF_TNF_WELL_KNOWN 1 |
| #define | MA_NFC_NDEF_TNF_MIME_MEDIA 2 |
| #define | MA_NFC_NDEF_TNF_ABSOLUTE_URI 3 |
| #define | MA_NFC_NDEF_TNF_EXTERNAL_TYPE 4 |
| #define | MA_NFC_NDEF_TNF_UNKNOWN 5 |
| #define | MA_NFC_NDEF_TNF_UNCHANGED 6 |
| #define | MA_NFC_NDEF_TNF_RESERVED 7 |
| #define | MA_NFC_MIFARE_KEY_A 1 |
| #define | MA_NFC_MIFARE_KEY_B 2 |
| #define | IOCTL_UNAVAILABLE -1 |
Typedefs | |
| typedef wchar_t | wchar |
| typedef unsigned short | ushort |
| typedef unsigned int | uint |
| typedef char * | MAString |
| typedef wchar * | MAWString |
| typedef void * | MAAddress |
| typedef int | MAHandle |
| typedef int | MAExtent |
| typedef unsigned char | byte |
| typedef unsigned long | ulong |
| typedef long long | longlong |
| typedef struct MAPoint2d | MAPoint2d |
| A structure representing a two-dimensional point, with coordinates 'x' and 'y'. | |
| typedef struct MARect | MARect |
| A structure representing a rectangle. | |
| typedef struct MACopyData | MACopyData |
| Parameters for the maCopyData() function. | |
| typedef struct MAConnAddrInet4 | MAConnAddrInet4 |
| An address for the TCP/IPv4 protocol. | |
| typedef struct MABtAddr | MABtAddr |
| A Bluetooth device address. | |
| typedef struct MAConnAddrBt | MAConnAddrBt |
| An address for the Bluetooth Serial Port protocol. | |
| typedef struct MAConnAddr | MAConnAddr |
| A connection address. | |
| typedef struct MAConnEventData | MAConnEventData |
| Data for a connection event, including an indicator or success or failure. | |
| typedef struct MASensor | MASensor |
| A structure containing the sensor type and the data sent to the event. | |
| typedef struct MANFCEventData | MANFCEventData |
| An event containing the result of an NFC asynchronous operation. | |
| typedef struct MAEvent | MAEvent |
| An event; a message indicating that something has happened, e.g. that a key has been pressed. | |
| typedef struct MAPanicReport | MAPanicReport |
| A MoSync Panic or other unrecoverable error. | |
| typedef struct MABtDevice | MABtDevice |
| Information about a Bluetooth device. | |
| typedef struct MAUUID | MAUUID |
| A Universally Unique Identifier. | |
| typedef struct MABtServiceSize | MABtServiceSize |
| Information about an MABtService object. | |
| typedef struct MABtService | MABtService |
| Information about a Bluetooth service. | |
| typedef struct MALocation | MALocation |
| A geographical location specified by latitude and longitude, horizontal and vertical accuracy, and altitude. | |
| typedef struct MAFrameBufferInfo | MAFrameBufferInfo |
| A structure containing information about the native framebuffer, including color format and resolution. | |
| typedef struct MA_CAMERA_FORMAT | MA_CAMERA_FORMAT |
| The camera format, in pixels. | |
Functions | |
| int | maCheckInterfaceVersion (int hash) |
| void | maExit (int result) __attribute__((noreturn)) |
| void | maPanic (int result, const char *message) __attribute__((noreturn)) |
| void * | memset (void *dst, int val, ulong size) |
| void * | memcpy (void *dst, const void *src, ulong size) |
| int | strcmp (const char *str1, const char *str2) |
| char * | strcpy (char *dst, const char *src) |
| double | __adddf3 (double a, double b) |
| double | __subdf3 (double a, double b) |
| double | __muldf3 (double a, double b) |
| double | __divdf3 (double a, double b) |
| double | __negdf2 (double a) |
| int | __fixdfsi (double a) |
| uint | __fixunsdfsi (double a) |
| double | __floatsidf (int a) |
| double | __extendsfdf2 (float a) |
| int | dcmp (double a, double b) |
| float | __addsf3 (float a, float b) |
| float | __subsf3 (float a, float b) |
| float | __mulsf3 (float a, float b) |
| float | __divsf3 (float a, float b) |
| float | __negsf2 (float a) |
| int | __fixsfsi (float a) |
| uint | __fixunssfsi (float a) |
| float | __floatsisf (int a) |
| float | __truncdfsf2 (double a) |
| int | fcmp (float a, float b) |
| double | sin (double x) |
| double | cos (double x) |
| double | tan (double x) |
| double | sqrt (double x) |
| int | maSetColor (int rgb) |
| void | maSetClipRect (int left, int top, int width, int height) |
| void | maGetClipRect (MARect *out) |
| void | maPlot (int posX, int posY) |
| void | maLine (int startX, int startY, int endX, int endY) |
| void | maFillRect (int left, int top, int width, int height) |
| void | maFillTriangleStrip (const MAPoint2d *points, int count) |
| void | maFillTriangleFan (const MAPoint2d *points, int count) |
| MAExtent | maGetTextSize (const char *str) |
| MAExtent | maGetTextSizeW (const wchar *str) |
| void | maDrawText (int left, int top, const char *str) |
| void | maDrawTextW (int left, int top, const wchar *str) |
| void | maUpdateScreen (void) |
| void | maResetBacklight (void) |
| MAExtent | maGetScrSize (void) |
| void | maDrawImage (MAHandle image, int left, int top) |
| void | maDrawRGB (const MAPoint2d *dstPoint, const void *src, const MARect *srcRect, int scanlength) |
| void | maDrawImageRegion (MAHandle image, const MARect *srcRect, const MAPoint2d *dstPoint, int transformMode) |
| MAExtent | maGetImageSize (MAHandle image) |
| void | maGetImageData (MAHandle image, void *dst, const MARect *srcRect, int scanlength) |
| MAHandle | maSetDrawTarget (MAHandle image) |
| int | maFindLabel (const char *name) |
| int | maCreateImageFromData (MAHandle placeholder, MAHandle data, int offset, int size) |
| int | maCreateImageRaw (MAHandle placeholder, const void *src, MAExtent size, int alpha) |
| int | maCreateDrawableImage (MAHandle placeholder, int width, int height) |
| int | maCreateData (MAHandle placeholder, int size) |
| MAHandle | maCreatePlaceholder (void) |
| void | maDestroyObject (MAHandle handle) |
| int | maGetDataSize (MAHandle data) |
| void | maReadData (MAHandle data, void *dst, int offset, int size) |
| void | maWriteData (MAHandle data, const void *src, int offset, int size) |
| void | maCopyData (const MACopyData *params) |
| MAHandle | maOpenStore (const char *name, int flags) |
| int | maWriteStore (MAHandle store, MAHandle data) |
| int | maReadStore (MAHandle store, MAHandle placeholder) |
| void | maCloseStore (MAHandle store, int _delete) |
| MAHandle | maConnect (const char *url) |
| void | maConnClose (MAHandle conn) |
| void | maConnRead (MAHandle conn, void *dst, int size) |
| void | maConnWrite (MAHandle conn, const void *src, int size) |
| void | maConnReadToData (MAHandle conn, MAHandle data, int offset, int size) |
| void | maConnWriteFromData (MAHandle conn, MAHandle data, int offset, int size) |
| int | maConnGetAddr (MAHandle conn, MAConnAddr *addr) |
| MAHandle | maHttpCreate (const char *url, int method) |
| void | maHttpSetRequestHeader (MAHandle conn, const char *key, const char *value) |
| int | maHttpGetResponseHeader (MAHandle conn, const char *key, char *buffer, int bufSize) |
| void | maHttpFinish (MAHandle conn) |
| int | maLoadResources (MAHandle data) |
| void | maLoadProgram (MAHandle data, int reload) |
| int | maGetKeys (void) |
| int | maGetEvent (MAEvent *event) |
| void | maWait (int timeout) |
| int | maTime (void) |
| int | maLocalTime (void) |
| int | maGetMilliSecondCount (void) |
| int | maFreeObjectMemory (void) |
| int | maTotalObjectMemory (void) |
| int | maVibrate (int ms) |
| int | maSoundPlay (MAHandle sound_res, int offset, int size) |
| void | maSoundStop (void) |
| int | maSoundIsPlaying (void) |
| int | maSoundGetVolume (void) |
| void | maSoundSetVolume (int vol) |
| longlong | maInvokeExtension (int function, int a, int b, int c MA_IOCTL_ELLIPSIS) |
| longlong | maIOCtl (int function, int a, int b, int c MA_IOCTL_ELLIPSIS) |
| MAHandle | maFontLoadDefault (int type, int style, int size) |
| MAHandle | maFontSetCurrent (MAHandle font) |
| int | maFontGetCount (void) |
| int | maFontGetName (int index, char *buffer, int bufferLen) |
| MAHandle | maFontLoadWithName (const char *postScriptName, int size) |
| int | maFontDelete (MAHandle font) |
| int | maReportCallStack (void) |
| int | maDumpCallStackEx (const char *str, int data) |
| void | maProtectMemory (const void *start, int length) |
| void | maUnprotectMemory (const void *start, int length) |
| void | maSetMemoryProtection (int enable) |
| int | maGetMemoryProtection (void) |
| int | maGetBatteryCharge (void) |
| int | maLockKeypad (void) |
| int | maUnlockKeypad (void) |
| int | maKeypadIsLocked (void) |
| int | maWriteLog (const void *src, int size) |
| int | maBtStartDeviceDiscovery (int names) |
| int | maBtGetNewDevice (MABtDevice *d) |
| int | maBtStartServiceDiscovery (const MABtAddr *address, const MAUUID *uuid) |
| int | maBtGetNextServiceSize (MABtServiceSize *dst) |
| int | maBtGetNewService (MABtService *dst) |
| int | maBtCancelDiscovery (void) |
| int | maLocationStart (void) |
| int | maLocationStop (void) |
| int | maPlatformRequest (const char *url) |
| MAHandle | maFileOpen (const char *path, int mode) |
| int | maFileExists (MAHandle file) |
| int | maFileClose (MAHandle file) |
| int | maFileCreate (MAHandle file) |
| int | maFileDelete (MAHandle file) |
| int | maFileSize (MAHandle file) |
| int | maFileAvailableSpace (MAHandle file) |
| int | maFileTotalSpace (MAHandle file) |
| int | maFileDate (MAHandle file) |
| int | maFileRename (MAHandle file, const char *newName) |
| int | maFileTruncate (MAHandle file, int offset) |
| int | maFileWrite (MAHandle file, const void *src, int len) |
| int | maFileWriteFromData (MAHandle file, MAHandle data, int offset, int len) |
| int | maFileRead (MAHandle file, void *dst, int len) |
| int | maFileReadToData (MAHandle file, MAHandle data, int offset, int len) |
| int | maFileTell (MAHandle file) |
| int | maFileSeek (MAHandle file, int offset, int whence) |
| MAHandle | maFileListStart (const char *path, const char *filter, int sorting) |
| int | maFileListNext (MAHandle list, char *nameBuf, int bufSize) |
| int | maFileListClose (MAHandle list) |
| int | maSendTextSMS (const char *dst, const char *msg) |
| int | maFrameBufferGetInfo (MAFrameBufferInfo *info) |
| int | maFrameBufferInit (const void *data) |
| int | maFrameBufferClose (void) |
| int | maAccept (MAHandle serv) |
| int | maSendToBackground (void) |
| int | maBringToForeground (void) |
| int | maGetSystemProperty (const char *key, char *buf, int size) |
| int | maCameraFormatNumber (void) |
| int | maCameraFormat (int index, MA_CAMERA_FORMAT *fmt) |
| int | maCameraStart (void) |
| int | maCameraStop (void) |
| int | maCameraSetPreview (MAHandle widgetHandle) |
| int | maCameraSelect (int cameraNumber) |
| int | maCameraNumber (void) |
| int | maCameraSnapshot (int formatIndex, MAHandle placeholder) |
| int | maCameraRecord (int stopStartFlag) |
| int | maCameraSetProperty (const char *property, const char *value) |
| int | maCameraGetProperty (const char *property, char *value, int bufSize) |
| int | maShowVirtualKeyboard (void) |
| int | maTextBox (const wchar *title, const wchar *inText, wchar *outText, int maxSize, int constraints) |
| int | maKeyCaptureStart (int keyCode) |
| int | maKeyCaptureStop (void) |
| int | maHomeScreenEventsOn (void) |
| int | maHomeScreenEventsOff (void) |
| int | maHomeScreenShortcutAdd (const char *name) |
| int | maHomeScreenShortcutRemove (const char *name) |
| int | maNotificationAdd (int type, int id, const char *title, const char *text) |
| int | maNotificationRemove (int id) |
| int | maScreenSetOrientation (int orientation) |
| int | maScreenSetFullscreen (int fullscreen) |
| int | maScreenStateEventsOn (void) |
| int | maScreenStateEventsOff (void) |
| void | maReportResourceInformation (void) |
| void | maMessageBox (const char *title, const char *message) |
| void | maAlert (const char *title, const char *message, const char *button1, const char *button2, const char *button3) |
| void | maImagePickerOpen (void) |
| void | maOptionsBox (const wchar *title, const wchar *destructiveButtonTitle, const wchar *cancelButtonTitle, const void *otherButtonTitles, int otherButtonTitlesSize) |
| int | maSensorStart (int sensor, int interval) |
| Enables a sensor and starts sending events if the sensor is available. If the sensor is already enabled this call will have no effect. | |
| int | maSensorStop (int sensor) |
| Disables a sensor so that it doesn't send any further events. | |
| int | maNFCStart (void) |
| void | maNFCStop (void) |
| MAHandle | maNFCReadTag (MAHandle nfcContext) |
| void | maNFCDestroyTag (MAHandle tagHandle) |
| void | maNFCConnectTag (MAHandle tagHandle) |
| void | maNFCCloseTag (MAHandle tagHandle) |
| int | maNFCIsType (MAHandle tagHandle, int type) |
| MAHandle | maNFCGetTypedTag (MAHandle tagHandle, int type) |
| int | maNFCBatchStart (MAHandle tagHandle) |
| void | maNFCBatchCommit (MAHandle tagHandle) |
| void | maNFCBatchRollback (MAHandle tagHandle) |
| int | maNFCTransceive (MAHandle tag, const void *src, int srcLen, void *dst, int *dstLen) |
| int | maNFCSetReadOnly (MAHandle tag) |
| int | maNFCIsReadOnly (MAHandle tag) |
| int | maNFCGetSize (MAHandle tag) |
| int | maNFCReadNDEFMessage (MAHandle tag) |
| int | maNFCWriteNDEFMessage (MAHandle tag, MAHandle ndefMessage) |
Syscall declarations. These system calls and low-level functions provide access to the basic features of a device. They are implemented by the MoSync runtimes in code native to the device.
With these syscalls it should be possible to do most things, although, there may still be some functionality missing. If you would like a specific function added, please send us a mail.
In future versions of MoSync an extension API will be provided that will allow you to create your own custom syscalls.
Some Caveats:
The Runtime expects alignment rules to be followed. Writing or reading to unaligned memory will cause a MoSync Panic.
Some functions may also cause a panic if they are passed incorrect parameters. A complete reference of these panics can be found here.
The codepage for functions that use strings is platform-dependent beyond 7-bit ASCII. Most use Latin-1, but you should still be wary.
Additional notes:
There are different types of handles: Connection, Store and Resource. They are all represented as positive signed integers. When a handle is passed to a function, it must have the proper type.
Each MoSync program has a Resource array. It is acccessed and manipulated by certain syscalls, but it cannot be accessed directly. Each resource (aka Object) is represented by a handle. There are different types of resources, for example Image, Binary data, Sound or Placeholder. A placeholder object is not a real object, but just a handle which you can use to construct new objects dynamically. Resources can also be defined at compile time, by using MoSync's resource compiler. Placeholders can either be defined at compile time using a resource compiler directive or created dynamically at runtime using maCreatePlaceholder(). See the tutorials, examples and the resource compiler reference documentation for more information.
There is an event queue which contains keypad events and results from asynchronous operations. Use maWait() and maGetEvent() to handle it.
MoSync socket/Bluetooth/HTTP connections are asynchronous. Read all about it here.
| #define MAIDL_HASH ((int)0xc3164193) |
A hash of the abstract representation of the API described in this file. Identifiers, declarations and definitions are included in the calculation of the hash, but documentation is not.
| #define _WCHAR_DEFINED |
| #define _SYSV_TYPES_DEFINED |
| #define EXTENT_Y | ( | e | ) | ((short)(e)) |
Returns the height of an MAExtent.
| #define EXTENT_X | ( | e | ) | ((short)((e) >> 16)) |
Returns the width of an MAExtent.
| #define EXTENT | ( | x, | |
| y | |||
| ) | ((MAExtent)((((int)(x)) << 16) | ((y) & 0xFFFF))) |
Creates an MAExtent.
| #define TRANS_NONE 0 |
The image is copied unchanged.
| #define TRANS_ROT90 5 |
The image is rotated clockwise by 90 degrees.
| #define TRANS_ROT180 3 |
The image is rotated clockwise by 180 degrees.
| #define TRANS_ROT270 6 |
The image is rotated clockwise by 270 degrees.
| #define TRANS_MIRROR 2 |
The image is reflected about its vertical center.
| #define TRANS_MIRROR_ROT90 7 |
The image is reflected about its vertical center, then rotated clockwise by 90 degrees.
| #define TRANS_MIRROR_ROT180 1 |
The image is reflected about its vertical center, then rotated clockwise by 180 degrees.
| #define TRANS_MIRROR_ROT270 4 |
The image is reflected about its vertical center, then rotated clockwise by 270 degrees.
| #define HANDLE_SCREEN 0 |
This handle refers to the back buffer, which is initially black.
| #define HANDLE_LOCAL 0 |
| #define RES_OUT_OF_MEMORY -1 |
| #define RES_BAD_INPUT -2 |
| #define RES_OK 1 |
| #define MAS_CREATE_IF_NECESSARY 1 |
| #define STERR_GENERIC -2 |
Generic error.
| #define STERR_FULL -3 |
The storage medium is full.
| #define STERR_NONEXISTENT -5 |
The store does not exist.
| #define CONNERR_GENERIC -2 |
Generic error.
| #define CONNERR_MAX -3 |
The maximum number of open connections allowed has been reached.
| #define CONNERR_DNS -4 |
DNS resolution error.
| #define CONNERR_INTERNAL -5 |
Internal error. Please report any occurrences.
| #define CONNERR_CLOSED -6 |
The connection was closed by the remote peer.
Happens when HTTP servers finish sending data.
| #define CONNERR_READONLY -7 |
You attempted to write to a read-only connection.
| #define CONNERR_FORBIDDEN -8 |
The OS does not trust you enough to let you open this connection.
| #define CONNERR_UNINITIALIZED -9 |
No operation has been started yet.
| #define CONNERR_CONLEN -10 |
The Content-Length header could not be found.
| #define CONNERR_URL -11 |
You supplied a malformed URL.
| #define CONNERR_UNAVAILABLE -12 |
The protocol is not available. If a Bluetooth function returns this, the Bluetooth chip is turned off.
| #define CONNERR_CANCELED -13 |
You canceled the operation.
| #define CONNERR_PROTOCOL -14 |
The server gave an invalid response.
| #define CONNERR_NETWORK -15 |
The network connection could not be established.
| #define CONNERR_NOHEADER -16 |
The requested header could not be found.
| #define CONNERR_NOTFOUND -17 |
The requested object could not be found.
| #define CONNERR_SSL -18 |
An error occurred during SSL negotiation.
| #define CONNERR_USER -1000000 |
If you wish to share the CONNERR codespace, use values below this for your own error codes.
| #define CONNOP_READ 1 |
| #define CONNOP_WRITE 2 |
| #define CONNOP_CONNECT 7 |
| #define CONNOP_FINISH 11 |
| #define CONNOP_ACCEPT 16 |
| #define CONN_MAX 32 |
The maximum number of open connections allowed.
| #define BTADDR_LEN 6 |
| #define CONN_FAMILY_INET4 1 |
| #define CONN_FAMILY_BT 2 |
| #define HTTP_GET 1 |
| #define HTTP_POST 2 |
| #define HTTP_HEAD 3 |
| #define HTTP_PUT 4 |
| #define HTTP_DELETE 5 |
| #define MAK_UNKNOWN 0 |
| #define MAK_FIRST 0 |
| #define MAK_BACKSPACE 8 |
| #define MAK_TAB 9 |
| #define MAK_CLEAR 12 |
| #define MAK_RETURN 13 |
| #define MAK_PAUSE 19 |
| #define MAK_ESCAPE 27 |
| #define MAK_SPACE 32 |
| #define MAK_EXCLAIM 33 |
| #define MAK_QUOTEDBL 34 |
| #define MAK_POUND 35 |
| #define MAK_HASH 35 |
| #define MAK_GRID 35 |
| #define MAK_DOLLAR 36 |
| #define MAK_AMPERSAND 38 |
| #define MAK_QUOTE 39 |
| #define MAK_LEFTPAREN 40 |
| #define MAK_RIGHTPAREN 41 |
| #define MAK_ASTERISK 42 |
| #define MAK_STAR 42 |
| #define MAK_PLUS 43 |
| #define MAK_COMMA 44 |
| #define MAK_MINUS 45 |
| #define MAK_PERIOD 46 |
| #define MAK_SLASH 47 |
| #define MAK_0 48 |
| #define MAK_1 49 |
| #define MAK_2 50 |
| #define MAK_3 51 |
| #define MAK_4 52 |
| #define MAK_5 53 |
| #define MAK_6 54 |
| #define MAK_7 55 |
| #define MAK_8 56 |
| #define MAK_9 57 |
| #define MAK_COLON 58 |
| #define MAK_SEMICOLON 59 |
| #define MAK_LESS 60 |
| #define MAK_EQUALS 61 |
| #define MAK_GREATER 62 |
| #define MAK_QUESTION 63 |
| #define MAK_AT 64 |
| #define MAK_LEFTBRACKET 91 |
| #define MAK_BACKSLASH 92 |
| #define MAK_RIGHTBRACKET 93 |
| #define MAK_CARET 94 |
| #define MAK_UNDERSCORE 95 |
| #define MAK_BACKQUOTE 96 |
| #define MAK_A 97 |
| #define MAK_B 98 |
| #define MAK_C 99 |
| #define MAK_D 100 |
| #define MAK_E 101 |
| #define MAK_F 102 |
| #define MAK_G 103 |
| #define MAK_H 104 |
| #define MAK_I 105 |
| #define MAK_J 106 |
| #define MAK_K 107 |
| #define MAK_L 108 |
| #define MAK_M 109 |
| #define MAK_N 110 |
| #define MAK_O 111 |
| #define MAK_P 112 |
| #define MAK_Q 113 |
| #define MAK_R 114 |
| #define MAK_S 115 |
| #define MAK_T 116 |
| #define MAK_U 117 |
| #define MAK_V 118 |
| #define MAK_W 119 |
| #define MAK_X 120 |
| #define MAK_Y 121 |
| #define MAK_Z 122 |
| #define MAK_DELETE 127 |
| #define MAK_KP0 256 |
| #define MAK_KP1 257 |
| #define MAK_KP2 258 |
| #define MAK_KP3 259 |
| #define MAK_KP4 260 |
| #define MAK_KP5 261 |
| #define MAK_KP6 262 |
| #define MAK_KP7 263 |
| #define MAK_KP8 264 |
| #define MAK_KP9 265 |
| #define MAK_KP_PERIOD 266 |
| #define MAK_KP_DIVIDE 267 |
| #define MAK_KP_MULTIPLY 268 |
| #define MAK_KP_MINUS 269 |
| #define MAK_KP_PLUS 270 |
| #define MAK_KP_ENTER 271 |
| #define MAK_KP_EQUALS 272 |
| #define MAK_UP 273 |
| #define MAK_DOWN 274 |
| #define MAK_RIGHT 275 |
| #define MAK_LEFT 276 |
| #define MAK_INSERT 277 |
| #define MAK_HOME 278 |
| #define MAK_END 279 |
| #define MAK_PAGEUP 280 |
| #define MAK_PAGEDOWN 281 |
| #define MAK_FIRE 284 |
| #define MAK_SOFTLEFT 285 |
| #define MAK_SOFTRIGHT 286 |
| #define MAK_PEN 291 |
| #define MAK_BACK 292 |
| #define MAK_MENU 293 |
| #define MAK_RSHIFT 303 |
| #define MAK_LSHIFT 304 |
| #define MAK_RCTRL 305 |
| #define MAK_LCTRL 306 |
| #define MAK_RALT 307 |
| #define MAK_LALT 308 |
| #define MAK_SEARCH 309 |
| #define MAKB_LEFT 0x00001 |
| #define MAKB_UP 0x00002 |
| #define MAKB_RIGHT 0x00004 |
| #define MAKB_DOWN 0x00008 |
| #define MAKB_FIRE 0x00010 |
| #define MAKB_SOFTLEFT 0x00020 |
| #define MAKB_SOFTRIGHT 0x00040 |
| #define MAKB_0 0x00080 |
| #define MAKB_1 0x00100 |
| #define MAKB_2 0x00200 |
| #define MAKB_3 0x00400 |
| #define MAKB_4 0x00800 |
| #define MAKB_5 0x01000 |
| #define MAKB_6 0x02000 |
| #define MAKB_7 0x04000 |
| #define MAKB_8 0x08000 |
| #define MAKB_9 0x10000 |
| #define MAKB_ASTERISK 0x20000 |
| #define MAKB_STAR 0x20000 |
| #define MAKB_HASH 0x40000 |
| #define MAKB_POUND 0x40000 |
| #define MAKB_GRID 0x40000 |
| #define MAKB_CLEAR 0x80000 |
| #define EVENT_BUFFER_SIZE 256 |
| #define EVENT_CLOSE_TIMEOUT 2000 |
In milliseconds.
| #define EVENT_TYPE_CLOSE 1 |
This event is posted when the operating system sends MoSync a command to exit. Causes include the OS shutting down and OS-controlled user commands.
| #define EVENT_TYPE_KEY_PRESSED 2 |
| #define EVENT_TYPE_KEY_RELEASED 3 |
| #define EVENT_TYPE_CONN 4 |
Connection.
| #define EVENT_TYPE_BT 5 |
Bluetooth discovery.
| #define EVENT_TYPE_POINTER_PRESSED 8 |
| #define EVENT_TYPE_POINTER_RELEASED 9 |
| #define EVENT_TYPE_POINTER_DRAGGED 10 |
| #define EVENT_TYPE_FOCUS_LOST 13 |
While MoSync doesn't have focus, no key events will arrive and the screen will not be updated. If the keypad is locked, no application will have focus.
| #define EVENT_TYPE_FOCUS_GAINED 14 |
| #define EVENT_TYPE_LOCATION 16 |
Has MAEvent::data point to an MALocation.
| #define EVENT_TYPE_LOCATION_PROVIDER 17 |
MAEvent::state is one of the MA_LPS constants.
| #define EVENT_TYPE_SCREEN_CHANGED 21 |
The size of the screen has changed. Use maGetScrSize() to get the new size.
If the screen is the current draw target, the clipping rectangle is removed. Use maSetClipRect() to reset it.
| #define EVENT_TYPE_CHAR 22 |
Character input. Uses MAEvent::character.
| #define EVENT_TYPE_TEXTBOX 23 |
The text box created by maTextBox() was just closed. Uses MAEvent::textboxResult and MAEvent::textboxLength.
| #define EVENT_TYPE_HOMESCREEN_SHOWN 24 |
The home screen became visible. Currently implemented only on Android.
| #define EVENT_TYPE_HOMESCREEN_HIDDEN 25 |
The home screen was hidden because an application came to front. Currently implemented only on Android.
| #define EVENT_TYPE_SCREEN_STATE_ON 26 |
The screen was turned on (the device went out of sleep state). Currently implemented only on Android.
| #define EVENT_TYPE_SCREEN_STATE_OFF 27 |
The screen was turned off (the device went into sleep state). Currently implemented only on Android.
| #define EVENT_TYPE_WIDGET 28 |
An event sent from a native widget.
MAWidgetEventData* widgetEventData = (MAWidgetEventData*) event.data;
| #define EVENT_TYPE_BLUETOOTH_TURNED_OFF 29 |
The bluetooth chip was turned off. Bluetooth functions will return CONNERR_UNAVAILABLE. Currently implemented only on Android.
| #define EVENT_TYPE_BLUETOOTH_TURNED_ON 30 |
The bluetooth chip was turned on. Bluetooth functions will now work normally again. Currently implemented only on Android.
| #define EVENT_TYPE_IMAGE_PICKER 31 |
The ImagePicker dialog was dismissed either by Cancel, either by OK.
| #define EVENT_TYPE_SMS 32 |
SMS result message. The field status contains one of the This event is sent on Android and iOS.
| #define EVENT_TYPE_SENSOR 33 |
Provides data from active sensors.
| #define EVENT_TYPE_ALERT 34 |
The maAlert message box was dismissed by one of the available buttons. See EVENT_TYPE_ALERT for the event.
| #define EVENT_TYPE_NFC_TAG_RECEIVED 35 |
A new NFC tag was received A new tag has been received, use maGetNextTag to retreive it.
| #define EVENT_TYPE_NFC_TAG_DATA_READ 36 |
New tag data was read An asynchronous NFC tag read operation was completed.
| #define EVENT_TYPE_NFC_TAG_DATA_WRITTEN 37 |
New tag data was written An asynchronous NFC tag write operation was completed.
| #define EVENT_TYPE_NFC_BATCH_OP 38 |
A batch operation was performed.
| #define EVENT_TYPE_NFC_TAG_AUTH_COMPLETE 39 |
Tag authentication was performed An asynchronous NFC tag authentication read was completed.
| #define EVENT_TYPE_NFC_TAG_READ_ONLY 40 |
Tag was made read only An asynchronous NFC tag read only operation was completed.
| #define EVENT_TYPE_OPTIONS_BOX_BUTTON_CLICKED 41 |
Send by maOptionsBox dialog when one of the option buttons is clicked.
| #define RUNTIME_MORE 1 |
The MoSync Reference Environment, also known as the Emulator.
| #define RUNTIME_JAVA 2 |
Java ME.
| #define RUNTIME_SYMBIAN 3 |
Symbian.
| #define RUNTIME_WINCE 4 |
Windows CE, also known as Windows Mobile.
| #define REPORT_PANIC 1 |
Caused by a MoSync Panic. MAPanicReport::code is the panic code.
| #define REPORT_EXCEPTION 2 |
Caused by a native exception. MAPanicReport::string describes the exception.
| #define REPORT_PLATFORM_CODE 3 |
Caused by a platform-specific error. MAPanicReport::code is valid.
| #define REPORT_USER_PANIC 4 |
Caused by a call to maPanic(). MAPanicReport::code and MAPanicReport::string are the parameters from the call.
| #define REPORT_TIMEOUT 5 |
Caused by the Close event timeout. Neither code or string are valid.
| #define FONT_TYPE_SERIF 0 |
| #define FONT_TYPE_SANS_SERIF 1 |
| #define FONT_TYPE_MONOSPACE 2 |
| #define FONT_STYLE_NORMAL 0 |
| #define FONT_STYLE_BOLD 1 |
| #define FONT_STYLE_ITALIC 2 |
| #define RES_FONT_OK 1 |
Indicates that the call to a font syscall was successful.
The available result codes for fonts.
| #define RES_FONT_INVALID_HANDLE -1 |
Indicates that an invalid font handle was passed.
| #define RES_FONT_INDEX_OUT_OF_BOUNDS -2 |
Indicates that the index was off the list size.
| #define RES_FONT_NO_TYPE_STYLE_COMBINATION -3 |
Indicates that a default font with that combination does not exist.
| #define RES_FONT_NAME_NONEXISTENT -4 |
Indicates that there is no font with that name on the device.
| #define RES_FONT_LIST_NOT_INITIALIZED -5 |
Indicates that maFontGetCount() was not called first.
| #define RES_FONT_INSUFFICIENT_BUFFER -6 |
Indicates that the buffer is not big enough to store the font name.
| #define RES_FONT_INVALID_SIZE -7 |
Indicates that an invalid size was passed.
| #define RES_FONT_DELETE_DENIED -8 |
Indicates that the font cannot be deleted because it is in use. maFontDelete(handle) fails with this return code.
| #define MA_LOC_NONE 1 |
| #define MA_LOC_INVALID 2 |
| #define MA_LOC_UNQUALIFIED 3 |
| #define MA_LOC_QUALIFIED 4 |
| #define MA_LPS_AVAILABLE 1 |
Availability status code: the location provider is available.
| #define MA_LPS_TEMPORARILY_UNAVAILABLE 2 |
Availability status code: the location provider is temporarily unavailable. Temporary unavailability means that the method is unavailable due to reasons that can be expected to possibly change in the future and the provider to become available. An example is not being able to receive the signal because the signal used by the location method is currently being obstructed, e.g. when deep inside a building for satellite based methods. However, a very short transient obstruction of the signal should not cause the provider to toggle quickly between TEMPORARILY_UNAVAILABLE and AVAILABLE.
| #define MA_LPS_OUT_OF_SERVICE 3 |
Availability status code: the location provider is out of service. Being out of service means that the method is unavailable and the implementation is not able to expect that this situation would change in the near future. An example is when using a location method implemented in an external device and the external device is detached.
| #define MA_ACCESS_READ 1 |
| #define MA_ACCESS_READ_WRITE 3 |
| #define MA_SEEK_SET 0 |
Beginning of file.
| #define MA_SEEK_CUR 1 |
Current position.
| #define MA_SEEK_END 2 |
End of file.
| #define MA_FL_SORT_NONE 0 |
Don't sort the files.
| #define MA_FL_SORT_DATE 1 |
Sort the files by date. See maFileDate().
| #define MA_FL_SORT_NAME 2 |
Sort the files by name. Case-sensitive?
| #define MA_FL_SORT_SIZE 3 |
Sort the files by size. See maFileSize().
| #define MA_FL_ORDER_ASCENDING 0x10000 |
Oldest / smallest / A first.
| #define MA_FL_ORDER_DESCENDING 0x20000 |
Newest / biggest / Z first.
| #define MA_FERR_GENERIC -2 |
| #define MA_FERR_NOTFOUND -3 |
| #define MA_FERR_FORBIDDEN -4 |
| #define MA_FERR_RENAME_FILESYSTEM -5 |
| #define MA_FERR_RENAME_DIRECTORY -6 |
| #define MA_FERR_WRONG_TYPE -7 |
| #define MA_FERR_SORTING_UNSUPPORTED -8 |
The sorting method requested is unsupported on the current platform.
| #define MA_SMS_RESULT_SENT 1 |
The SMS was sent.
Values for the status field in the EVENT_TYPE_SMS event. This event is sent on Android and iOS.
| #define MA_SMS_RESULT_NOT_SENT 2 |
The SMS was NOT sent.
| #define MA_SMS_RESULT_DELIVERED 3 |
The SMS was delivered.
| #define MA_SMS_RESULT_NOT_DELIVERED 4 |
The SMS was NOT delivered.
| #define MA_TB_TYPE_ANY 0 |
The user is allowed to enter any text, including line breaks.
| #define MA_TB_TYPE_EMAILADDR 1 |
The user is allowed to enter an e-mail address.
| #define MA_TB_TYPE_NUMERIC 2 |
The user is allowed to enter an integer value.
| #define MA_TB_TYPE_PHONENUMBER 3 |
The user is allowed to enter a phone number.
| #define MA_TB_TYPE_URL 4 |
The user is allowed to enter a URL.
| #define MA_TB_TYPE_DECIMAL 5 |
The user is allowed to enter a real number value. This extends MA_TB_TYPE_NUMERIC by allowing a decimal point.
| #define MA_TB_TYPE_SINGLE_LINE 100 |
The user is allowed to enter any text, except for line breaks. Unavailable on some platforms. In that case, maTextBox() will return MA_TB_RES_TYPE_UNAVAILABLE. You can use MA_TB_TYPE_ANY instead.
| #define MA_TB_TYPE_MASK 0xFFFF |
Use this to separate types from flags in the constraints parameter. This is not a valid type value.
| #define MA_TB_RES_OK 1 |
The user chose OK.
| #define MA_TB_RES_CANCEL 2 |
The user chose Cancel.
| #define MA_TB_RES_TYPE_UNAVAILABLE -3 |
The specified type is unavailable on this platform.
| #define MA_TB_FLAG_PASSWORD 0x10000 |
Indicates that the text entered is confidential data that should be obscured whenever possible. This implies MA_TB_FLAG_SENSITIVE.
| #define MA_TB_FLAG_UNEDITABLE 0x20000 |
Indicates that editing is disallowed.
| #define MA_TB_FLAG_SENSITIVE 0x40000 |
Indicates that the text entered is sensitive data that the implementation must never store into a dictionary or table for use in predictive, auto-completing, or other accelerated input schemes. A credit card number is an example of sensitive data.
| #define MA_TB_FLAG_NON_PREDICTIVE 0x80000 |
Indicates that the text entered does not consist of words that are likely to be found in dictionaries typically used by predictive input schemes.
| #define MA_TB_FLAG_INITIAL_CAPS_WORD 0x100000 |
This flag is a hint to the implementation that during text editing, the initial letter of each word should be capitalized.
| #define MA_TB_FLAG_INITIAL_CAPS_SENTENCE 0x200000 |
This flag is a hint to the implementation that during text editing, the initial letter of each sentence should be capitalized.
| #define NOTIFICATION_TYPE_APPLICATION_LAUNCHER 1 |
A persistent notification that will launch the application when selected.
| #define SCREEN_ORIENTATION_LANDSCAPE 1 |
Landscape screen orientation.
| #define SCREEN_ORIENTATION_PORTRAIT 2 |
Portrait screen orientation.
| #define SCREEN_ORIENTATION_DYNAMIC 3 |
Screen orientation is based on device sensor.
| #define IOCTL_UNAVAILABLE -1 |
| typedef wchar_t wchar |
| typedef unsigned short ushort |
| typedef unsigned int uint |
| typedef char* MAString |
| typedef void* MAAddress |
| typedef int MAHandle |
| typedef int MAExtent |
| typedef unsigned char byte |
| typedef unsigned long ulong |
| typedef long long longlong |
A structure representing a two-dimensional point, with coordinates 'x' and 'y'.
A structure representing a rectangle.
The x and y coordinate of the top-left corner are defined by 'left' and 'top'. The dimensions of the rectangle are defined by 'width' and 'height'.
| typedef struct MACopyData MACopyData |
Parameters for the maCopyData() function.
| typedef struct MAConnAddrInet4 MAConnAddrInet4 |
An address for the TCP/IPv4 protocol.
| typedef struct MAConnAddrBt MAConnAddrBt |
An address for the Bluetooth Serial Port protocol.
| typedef struct MAConnAddr MAConnAddr |
A connection address.
| typedef struct MAConnEventData MAConnEventData |
Data for a connection event, including an indicator or success or failure.
A structure containing the sensor type and the data sent to the event.
| typedef struct MANFCEventData MANFCEventData |
An event containing the result of an NFC asynchronous operation.
An event; a message indicating that something has happened, e.g. that a key has been pressed.
| typedef struct MAPanicReport MAPanicReport |
A MoSync Panic or other unrecoverable error.
In MoSync Debug builds, when such an error occurs, the runtime writes an instance of this structure to a Store named "panic.report".
The length of that instance may be greater than sizeof(MAPanicReport), because of the variable-length string that may appear at its end. The member string can, then, be longer than the one byte that is declared.
To properly read an instance of this struct from a store, you should allocate a chunk of memory whose size is equal to the size of the store, then read the entire store into that chunk of memory. Then you should make a pointer of type MAPanicReport and point it to the chunk. Then you can read normally, using that pointer.
| typedef struct MABtDevice MABtDevice |
Information about a Bluetooth device.
A Universally Unique Identifier.
Common Bluetooth UUID values can be found in MAUtil/mauuid.h.
| typedef struct MABtServiceSize MABtServiceSize |
Information about an MABtService object.
| typedef struct MABtService MABtService |
Information about a Bluetooth service.
| typedef struct MALocation MALocation |
A geographical location specified by latitude and longitude, horizontal and vertical accuracy, and altitude.
Only if state equals MA_LOC_QUALIFIED do the other members contain valid data.
Coordinates are in the WGS84 datum.
The horizontal accuracy is the RMS (root mean square) of east accuracy (latitudinal error in meters, 1-sigma standard deviation), north accuracy (longitudinal error in meters, 1-sigma).
The vertical accuracy is in meters in vertical direction (orthogonal to ellipsoid surface, 1-sigma standard deviation).
Accuracy values may be NaN, if accuracy is unknown.
| typedef struct MAFrameBufferInfo MAFrameBufferInfo |
A structure containing information about the native framebuffer, including color format and resolution.
The 'sizeInBytes' field is the amount of bytes that should be used to allocate the offscreen framebuffer (a backbuffer).
| int maCheckInterfaceVersion | ( | int | hash | ) |
Compares the runtime's interface version with yours, using a hash of the interface's contents.
If the versions do not match, a MoSync Panic is generated.
This function returns the runtime's hash. However, if there is a version mismatch, syscall and IOCTL numbers may differ between the runtime and your version of the header files, causing a different function than this to be called.
The hash appears as a 32-bit random number, so it is very unlikely that the return value from any other function is the same as the runtime's hash.
Therefore, you should always compare the return value from this function to your hash and exit your program, preferably using maPanic(), if they don't match.
| hash | Your hash. Pass MAIDL_HASH. |
| void maExit | ( | int | result | ) |
Shuts down the system. This function does not return.
| result | Passed to the operating system, where applicable. Ignored otherwise. |
| void maPanic | ( | int | result, |
| const char * | message | ||
| ) |
Displays a message to the user, then shuts down the system. This function does not return.
| result | Passed to the operating system, where applicable. Ignored otherwise. |
| message | The message should be short, not more than 40 characters, to ensure its visibility on all screen sizes. |
| void* memset | ( | void * | dst, |
| int | val, | ||
| ulong | size | ||
| ) |
Sets size bytes, starting at dst, to the specified value, interpreted as an unsigned char.
Referenced by MAUtil::Dictionary< Key, Storage >::DictNode::DictNode(), and MAUtil::HashDict< Key, Storage >::HashNode::HashNode().
| void* memcpy | ( | void * | dst, |
| const void * | src, | ||
| ulong | size | ||
| ) |
Copies the values of size bytes from the location pointed by src directly to the memory block pointed by dst.
The underlying type of the objects pointed by both the source and destination pointers are irrelevant for this function; The result is a binary copy of the data.
The function does not check for any terminating null character in source - it always copies exactly size bytes.
To avoid overflows, the size of the arrays pointed by both the destination and source parameters, shall be at least size bytes, and should not overlap (for overlapping memory blocks, memmove() is a safe approach).
| int strcmp | ( | const char * | str1, |
| const char * | str2 | ||
| ) |
Compares the C string str1 to the C string str2.
This function starts comparing the first character of each string. If they are equal to each other, it continues with the following pairs until the characters differ or until a terminanting null-character is reached.
| char* strcpy | ( | char * | dst, |
| const char * | src | ||
| ) |
Copies the C string pointed by src into the array pointed by dst, including the terminating null character.
To avoid overflows, the size of the array pointed by dst shall be long enough to contain the same C string as src (including the terminating null character), and should not overlap in memory with src.
| double __adddf3 | ( | double | a, |
| double | b | ||
| ) |
Returns a + b.
| double __subdf3 | ( | double | a, |
| double | b | ||
| ) |
Returns a - b.
| double __muldf3 | ( | double | a, |
| double | b | ||
| ) |
Returns a * b.
| double __divdf3 | ( | double | a, |
| double | b | ||
| ) |
Returns a / b. If b == 0, a MoSync Panic is thrown.
| double __negdf2 | ( | double | a | ) |
Returns -a.
| int __fixdfsi | ( | double | a | ) |
Returns the integer part of a.
| uint __fixunsdfsi | ( | double | a | ) |
Returns the unsigned integer part of a. Negative values become zero.
| double __floatsidf | ( | int | a | ) |
Returns the double representation of a.
| double __extendsfdf2 | ( | float | a | ) |
Returns the double representation of a.
| int dcmp | ( | double | a, |
| double | b | ||
| ) |
Returns >0 if a > b, 0 if a == b and <0 if a < b. If either argument is Not a Number, the result is undefined.
| float __addsf3 | ( | float | a, |
| float | b | ||
| ) |
Returns a + b.
| float __subsf3 | ( | float | a, |
| float | b | ||
| ) |
Returns a - b.
| float __mulsf3 | ( | float | a, |
| float | b | ||
| ) |
Returns a * b.
| float __divsf3 | ( | float | a, |
| float | b | ||
| ) |
Returns a / b. If b == 0, a MoSync Panic is thrown.
| float __negsf2 | ( | float | a | ) |
Returns -a.
| int __fixsfsi | ( | float | a | ) |
Returns the integer part of a.
| uint __fixunssfsi | ( | float | a | ) |
Returns the unsigned integer part of a. Negative values become zero.
| float __floatsisf | ( | int | a | ) |
Returns the float representation of a.
| float __truncdfsf2 | ( | double | a | ) |
Returns the float representation of a.
| int fcmp | ( | float | a, |
| float | b | ||
| ) |
Returns >0 if a > b, 0 if a == b and <0 if a < b. If either argument is Not a Number, the result is undefined.
| double sin | ( | double | x | ) |
Returns the sine of x.
| x | An angle in radians. |
| double cos | ( | double | x | ) |
Returns the cosine of x.
| x | An angle in radians. |
| double tan | ( | double | x | ) |
Returns the tangent of x.
| x | An angle in radians. |
| double sqrt | ( | double | x | ) |
Returns the square root of x.
| int maSetColor | ( | int | rgb | ) |
Sets the color used by drawing functions. Returns previous color. Initial color is 0 (black).
| rgb | A color in RGB8 format (0xRRGGBB). The top byte is ignored. |
| void maSetClipRect | ( | int | left, |
| int | top, | ||
| int | width, | ||
| int | height | ||
| ) |
Sets the clipping rectangle for the current draw target. The screen and every drawable image each maintains a clipping rectangle. Drawing operations have no effect outside the clipping rectangle. The default clipping rectangle covers the entire draw target, so that clipping occurs at the draw target's edges.
| void maGetClipRect | ( | MARect * | out | ) |
Returns the clipping rectangle for the current draw target.
| void maPlot | ( | int | posX, |
| int | posY | ||
| ) |
Draws a single pixel using the current color.
| void maLine | ( | int | startX, |
| int | startY, | ||
| int | endX, | ||
| int | endY | ||
| ) |
Draws a line using the current color.
| void maFillRect | ( | int | left, |
| int | top, | ||
| int | width, | ||
| int | height | ||
| ) |
Draws a filled rectangle using the current color. Width and height must be greater than zero.
| void maFillTriangleStrip | ( | const MAPoint2d * | points, |
| int | count | ||
| ) |
Draws a filled triangle strip using the current color.
| points | A pointer to an array of count MAPoint2d:s representing the vertices of the strip. |
| count | The count of vertices in the strip. Must be at least 3. |
| void maFillTriangleFan | ( | const MAPoint2d * | points, |
| int | count | ||
| ) |
Draws a filled triangle fan using the current color.
| points | A pointer to an array of count MAPoint2d:s representing the vertices of the fan. |
| count | The count of vertices in the fan. Must be at least 3. |
| MAExtent maGetTextSize | ( | const char * | str | ) |
Returns the size in pixels of Latin-1 text as it would appear on-screen.
Returns the size in pixels of Unicode text as it would appear on-screen.
| void maDrawText | ( | int | left, |
| int | top, | ||
| const char * | str | ||
| ) |
Draws Latin-1 text using the current color. The coordinates are the top-left corner of the text's bounding box.
| void maDrawTextW | ( | int | left, |
| int | top, | ||
| const wchar * | str | ||
| ) |
Draws Unicode text using the current color. The coordinates are the top-left corner of the text's bounding box.
| void maUpdateScreen | ( | void | ) |
Copies the back buffer to the physical screen.
| void maResetBacklight | ( | void | ) |
Normally, a phone's backlight turns itself off after a few seconds of the user not pressing any keys. To avoid this behaviour, call this function periodically. As the timeout period is different for every device, and sometimes even user-configurable, it's recommended that you call this function at least once every 500 milliseconds to ensure that the light stays on at all times.
| MAExtent maGetScrSize | ( | void | ) |
Returns the screen size.
| void maDrawImage | ( | MAHandle | image, |
| int | left, | ||
| int | top | ||
| ) |
Draws an image. It it placed on the draw target with the top left corner according to the parameters.
| void maDrawRGB | ( | const MAPoint2d * | dstPoint, |
| const void * | src, | ||
| const MARect * | srcRect, | ||
| int | scanlength | ||
| ) |
Draws an image. The source is an array of ints that represent pixels in XRGB format.
| dstPoint | The top-left point on the draw target. |
| src | The address to the source image. |
| srcRect | The portion of the source image to be drawn. |
| scanlength | The width, in pixels, of the image represented by the source array. |
| void maDrawImageRegion | ( | MAHandle | image, |
| const MARect * | srcRect, | ||
| const MAPoint2d * | dstPoint, | ||
| int | transformMode | ||
| ) |
Draws a portion of an image using a transformation.
| image | The source image. |
| srcRect | The portion of the source image to be drawn. Must not exceed the bounds of the source image. |
| dstPoint | The top-left point on the draw target. |
| transformMode | One of the TRANS constants. |
Copies an image into an array of ints that represent pixels in ARGB format. The destination rectangle is defined as { 0,0, srcRect.width, srcRect.height }. Parts of the destination array that are outside the destination rectangle are not modified. If srcRect is outside the bounds of the source image, or if srcRect.width is greater than scanlength, a MoSync Panic is thrown.
| image | The handle to the source image. |
| dst | The address of the destination array. |
| scanlength | The width of the image, in pixels, represented by the destination array. |
| srcRect | The portion of the source image to be copied. |
Sets the current draw target. The handle must be a drawable image or HANDLE_SCREEN, which represents the back buffer. The initial draw target is the back buffer. If an image is set as draw target, its object handle goes into flux, which prevents its destruction or use as a source in maDrawImage. When a different draw target is set, the image's handle is restored. Returns the the previously set draw target.
| int maFindLabel | ( | const char * | name | ) |
Finds the label resource with the specified name and returns its index. If it is not found, -1 is returned.
Creates an image object using encoded data from a data object. All platforms support the PNG format. Some platforms may also support JPEG and/or GIF.
| placeholder | The placeholder for the image object that is to be created. |
| data | The data object that holds the encoded data. |
| offset | The offset in the data object where the encoded data begins. |
| size | The size in bytes of the encoded data. |
Creates an image object using raw ARGB data.
| placeholder | The placeholder for the image object that is to be created. |
| src | Address of the raw data. 4 bytes per pixel, format 0xAARRGGBB. |
| size | The size in pixels of the image, constructed using the EXTENT() macro. |
| alpha | Non-zero if the resulting image should have an alpha channel, zero otherwise. |
| int maCreateDrawableImage | ( | MAHandle | placeholder, |
| int | width, | ||
| int | height | ||
| ) |
Creates a drawable image of the specified size. A drawable image has no alpha channel, which is to say, no transparency. Its initial contents are undefined, so you should draw onto the entire surface to be sure what will happen when you draw this image onto something else.
| placeholder | The resource handle of the new image. |
| width | Width, in pixels, of the new image. Must be > 0. |
| height | Height, in pixels, of the new image. Must be > 0. |
| int maCreateData | ( | MAHandle | placeholder, |
| int | size | ||
| ) |
Creates a data object of the specified size, in bytes. Its initial contents are undefined.
| MAHandle maCreatePlaceholder | ( | void | ) |
Creates a new placeholder and returns the handle to it.
| void maDestroyObject | ( | MAHandle | handle | ) |
Destroys an object of any type. The handle becomes a placeholder.
| int maGetDataSize | ( | MAHandle | data | ) |
Returns the size, in bytes, of a data object.
| void maReadData | ( | MAHandle | data, |
| void * | dst, | ||
| int | offset, | ||
| int | size | ||
| ) |
Reads size bytes from a data object, starting at offset, into memory pointed to by dst.
Referenced by MAUtil::DataHandler::read().
| void maWriteData | ( | MAHandle | data, |
| const void * | src, | ||
| int | offset, | ||
| int | size | ||
| ) |
Writes size bytes to a data object, starting at offset, from memory pointed to by src.
Referenced by MAUtil::DataHandler::write().
| void maCopyData | ( | const MACopyData * | params | ) |
Copies size bytes from data object src to dst, at the specified offsets.
| MAHandle maOpenStore | ( | const char * | name, |
| int | flags | ||
| ) |
Opens a permanent data store, optionally creates one if it doesn't exist already.
Returns a Store MAHandle on success. Returns STERR_NONEXISTENT if !(flags & MAS_CREATE_IF_NECESSARY) and the store does not exist. Returns another STERR code if the store could not be opened for another reason.
| name | The name of the store. A store name must have from 1 to 32 characters, and must not contain any of the following characters: "/\:;?*' |
| flags | A combination of MAS flags, or zero. |
Writes the contents of a data object to a store. Destroys any data previously in the store. Returns > 0 on success, STERR_FULL if the storage system is full, or another STERR code if the write failed for another reason.
| store | The store to write to. |
| data | The data object to read from. |
Creates a data object and copies the contents of a store to it. Use maGetDataSize to get the size of the data.
| store | The store to read from. |
| placeholder | The placeholder handle where a data object will be created. |
| void maCloseStore | ( | MAHandle | store, |
| int | _delete | ||
| ) |
Closes a store. Also deletes that store if _delete is non-zero.
| MAHandle maConnect | ( | const char * | url | ) |
Asynchronously opens a connection using the specified URL. A URL takes the following form: <protocol>://<address>[:<port>]<parameters>
The following protocols are supported:
socket, which is TCP. It has no parameters.
ssl, which is an encrypted TCP connection. It has no parameters.
http, which is HTTP/1.0 GET. When using HTTP, you need not specify the port; it defaults to port 80.
Its parameters is the document path (for example, "/index.html"). You must specify a path, or this function will fail with CONNERR_URL. The minimal path ("/") is acceptable.
Writing to a http connection is not allowed.
https, which is an encrypted HTTP GET. It has the same parameters as http.
btspp, which is Bluetooth Serial Port. It has no parameters.
For the socket and http protocols, <address> can be either a decimal, dot-delimited (.) IPv4 address or a standard Domain Name, while <port> is a decimal number from 1 to 65535.
In the socket protocol, certain ports are protected on certain platforms and cannot be used, most notably port 80 on Java ME. In this case, use http instead.
On a few devices, using ports numbered below 1024 may cause system crashes. Therefore, it is advisable to use ports above 1024 if you can choose.
On some J2ME devices, connections to port 443 (except from https) is not allowed and might cause a system exception.
For the btspp protocol, <address> is 12 hexadecimal digits and <port> is a decimal number from 1 to 30.
Example TCP url: socket://www.example.com:23
Example SSL url: ssl://www.example.com:22
Example HTTP url: http://www.example.com/directory/document.html
Example HTTPS url: https://www.example.com/directory/document.html
Example Bluetooth url: btspp://001dbe15e455:9
You can also use MAUtil::BluetoothConnection to connect via Bluetooth service uuid.
To find useful Bluetooth addresses, use the Bluetooth discovery API. See maBtStartDeviceDiscovery().
The result of the operation will be delivered in a CONN event, with MAConnEventData::opType set to CONNOP_CONNECT.
The success value is > 0. For the http protocol, the success value is the HTTP response code.
When you're done with the connection, maConnClose() must be called to free the resources associated with the handle. This must be done even if the connect operation failed.
There is a limit of CONN_MAX open connection handles at any time, so if you keep opening connections without closing them, you'll eventually receive the CONNERR_MAX error code instead of new connection handles.
Alternatively, this function can be called with one of these url types to create a Server Connection:
socket://[:<port>], for TCP.
btspp://localhost:<uuid>[;name=<YourServiceName>], for Bluetooth.
<uuid> is a 32-digit hexadecimal number. It will be used to create the service record. Its MAUUID representation can be used by clients to search for this service.
Example Bluetooth server url: btspp://localhost:0000110100001000800000805F9B34FB;name=Serial Port
Server connections are created synchronously; no CONN event is generated, and as soon as this function returns, it's done.
A server connection can not be read from or written to, but it can be closed. You can also use it in calls to maAccept() and maConnGetAddr().
| void maConnClose | ( | MAHandle | conn | ) |
Closes a connection, freeing any resources associated with the handle.
Cancels any active operations on the connection. Such operations will finish with CONNERR_CANCELED.
| void maConnRead | ( | MAHandle | conn, |
| void * | dst, | ||
| int | size | ||
| ) |
Asynchronously reads at least one and at most size bytes from a connection to memory.
The result of the operation will be delivered in a CONN event, with MAConnEventData::opType set to CONNOP_READ. The success value is the number of bytes read.
| void maConnWrite | ( | MAHandle | conn, |
| const void * | src, | ||
| int | size | ||
| ) |
Asynchronously writes size bytes to a connection from memory.
The result of the operation will be delivered in a CONN event, with MAConnEventData::opType set to CONNOP_WRITE. The success value is > 0.
Asynchronously reads at least one and at most size bytes from a connection to a data object, starting at the specified offset. During the read, the data object being written to will be in flux. Any attempt to access it will result in a Panic.
The result of the operation will be delivered in a CONN event, with MAConnEventData::opType set to CONNOP_READ. The success value is is the number of bytes read.
Asynchronously writes size bytes to a connection from a data object, starting at the specified offset. During the write, the data object being read from will be in flux. Any attempt to access it will result in a Panic.
The result of the operation will be delivered in a CONN event, with MAConnEventData::opType set to CONNOP_WRITE. The success value is > 0.
| int maConnGetAddr | ( | MAHandle | conn, |
| MAConnAddr * | addr | ||
| ) |
Retrieves the address of a connection. On server connections, you'll get the local address. On normal connections, you'll get the remote address.
You can pass HANDLE_LOCAL to retrieve the local address. In that case, you must set MAConnAddr::family before calling this function, to tell it which address to retrieve. Also, the port member is not set.
| MAHandle maHttpCreate | ( | const char * | url, |
| int | method | ||
| ) |
Creates an unfinished HTTP/1.0 connection. You cannot read from this connection until it's been Finished. Before then, you can set request headers. After, you can get response headers.
POST connections are special; they let you write to the connection before it's Finished. The first write causes the underlying TCP connection to be established and request headers transmitted. After the first write has begun, you may no longer set request headers.
| url | An HTTP or HTTPS URL. See maConnect() for the exact form. |
| method | HTTP_GET, HTTP_POST, HTTP_HEAD, HTTP_PUT or HTTP_DELETE. |
| void maHttpSetRequestHeader | ( | MAHandle | conn, |
| const char * | key, | ||
| const char * | value | ||
| ) |
Sets a request header of an HTTP connection.
Overwrites any existing header with the same key. The keys is case-insensitive.
If the connection's method is HTTP_POST, it must not have been written to.
| conn | An unfinished HTTP connection handle. |
| key | The name of the header. |
| value | The new value of the header. |
| int maHttpGetResponseHeader | ( | MAHandle | conn, |
| const char * | key, | ||
| char * | buffer, | ||
| int | bufSize | ||
| ) |
Stores an HTTP response header in the specified buffer.
The buffer may be too small to contain the header and the terminating zero; in that case, the buffer will not be filled and you should create a bigger buffer and call this function again. Use the return value to determine how long the buffer needs to be.
| conn | A finished HTTP connection handle. |
| key | The name of the header. Case-insensitive. |
| buffer | A string buffer. |
| bufSize | The size of the buffer, in bytes. |
| void maHttpFinish | ( | MAHandle | conn | ) |
Asynchronously finishes an HTTP connection. This entails making the underlying TCP connection and sending request headers, unless that has already been done by a HTTP_POST write, and receiving the response headers.
The result of the operation will be delivered in a CONN event, with MAConnEventData::opType set to CONNOP_FINISH. The success value is the HTTP response code.
| conn | An unfinished HTTP connection handle. |
| int maLoadResources | ( | MAHandle | data | ) |
Loads a new object array from the a data object. The old object array is overwritten, except where the new array has SKIP objects. In those cases, the old objects are saved. Returns zero on error, >0 on success. On error, the old object array remains unchanged.
| data | The data object containing new resources, in the format of a MoSync compiled resource file. |
| void maLoadProgram | ( | MAHandle | data, |
| int | reload | ||
| ) |
Loads a new program from the a data object, closes the running program, and starts the new one. The format of the data object is a MoSync program file concatenated with a resource file. If this function returns, there was an error.
| data | The data object containing the new program. |
| reload | If non-zero, the original program will be reloaded after the new program has exited. If zero, MoSync will exit when the loaded program exists, unless that program, or one of its sub-programs, calls this function with reload set to non-zero. |
| int maGetKeys | ( | void | ) |
Returns a bitmask consisting of MAKB flags describing the current key state.
| int maGetEvent | ( | MAEvent * | event | ) |
There is a FIFO buffer that contains up to EVENT_BUFFER_SIZE events. Each event has a type. Some types have additional data.
This function retrieves the next event, unless the queue is empty. Use maWait() to wait until more events are available.
| event | Pointer to an MAEvent struct that will be filled with the next event. |
When the Close event is posted, you must call maExit as soon as possible, or your program will be forcibly terminated. The timeout is device-dependent, but never longer than EVENT_CLOSE_TIMEOUT milliseconds.
After the Close event has been posted, most syscalls will stop working, returning default values and doing nothing. Only the following groups of functions are guaranteed to remain operational: Memory management, math, Resource management, Store, time, logging, maExit() and maPanic().
| void maWait | ( | int | timeout | ) |
Suspends execution until there is an event in the buffer, or timeout milliseconds have passed. A timeout <= 0 is considered infinite. Timer accuracy is platform-specific, but should be better than 20 ms.
Use this function rather than idle loops to save CPU/battery power.
| int maTime | ( | void | ) |
Returns the number of seconds that have passed since 00:00:00, Jan 1st, 1970, UTC, according to the device clock.
| int maLocalTime | ( | void | ) |
Returns the number of seconds that have passed since 00:00:00, Jan 1st, 1970, local time, according to the device clock.
| int maGetMilliSecondCount | ( | void | ) |
Returns the number of milliseconds that has passed since some unknown point in time. Accuracy is platform-specific, but should be better than 20 ms.
Referenced by MAP::MapTile::getMilliSecondsSinceCreated(), MAP::TraceScope::TraceScope(), and MAP::TraceScope::~TraceScope().
| int maFreeObjectMemory | ( | void | ) |
Returns an approximation to the amount of memory currently available for allocating new objects, measured in bytes.
There may be more memory available than reported by this function. Conversely, in the time between calling this function and allocating an object, another program may have allocated an object of its own, decreasing the available memory.
The amount of memory required to allocate any specific object is device-dependent.
When using this function to determine whether or not to allocate an object, always leave some memory alone for use by the system, preferably about 10% of the device's total memory, as reported by maTotalObjectMemory().
| int maTotalObjectMemory | ( | void | ) |
Returns the total amount of memory available to MoSync, measured in bytes. May change over time, even as the program is running.
| int maVibrate | ( | int | ms | ) |
Switches on the vibrator for the requested number of milliseconds, or switches it off if the requested duration is zero. A call to this function will override the previous call. Returns non-zero if the operation was allowed, zero if it wasn't.
On devices which has no vibrator, this function will always return zero. The user may turn vibration off in phone settings. In that case, calling this function with a duration of zero may return non-zero, but a non-zero duration will return zero. In any case, the only way to conclusively determine if vibration is currently supported or not is to call this function with a duration of at least 1(one) ms. On iPhone the argument won't be taken into account.
| int maSoundPlay | ( | MAHandle | sound_res, |
| int | offset, | ||
| int | size | ||
| ) |
Starts playing a sound.
If a sound was already playing, it is stopped.
The sound data is formatted as follows: <mime type><null terminator byte><encoded data>.
The .media directive in the MoSync resource compiler creates this formatting.
If you download or generate sound clips dynamically, you'll have to take care of the formatting yourself, or use a library that does it for you, for example MAUtil::AudioDownloader.
To play .media resources, use offset 0 and maGetDataSize().
Do not touch the resource while it's playing, or there will be... trouble.
| sound_res | The data object in which the sound is stored. |
| offset | The offset in the data object where the sound is stored. |
| size | The size of the sound data. |
| void maSoundStop | ( | void | ) |
Stops the sound and rewinds it.
| int maSoundIsPlaying | ( | void | ) |
Returns > 0 if sound is playing, zero if it's not.
| int maSoundGetVolume | ( | void | ) |
Returns the volume, in the range 0-100, used by the sound engine. The initial volume is 100.
| void maSoundSetVolume | ( | int | vol | ) |
Sets the volume, which is a value in the range 0-100. All other values will be clamped to the allowed range.
| longlong maInvokeExtension | ( | int | function, |
| int | a, | ||
| int | b, | ||
| int c | MA_IOCTL_ELLIPSIS | ||
| ) |
Invokes an extension function. Normally you don't call this function directly.
| longlong maIOCtl | ( | int | function, |
| int | a, | ||
| int | b, | ||
| int c | MA_IOCTL_ELLIPSIS | ||
| ) |
These functions are available only on certain platforms. Returns -1 if the function is not available.
Referenced by glActiveTexture(), glAlphaFunc(), glAlphaFuncx(), glAttachShader(), glBindAttribLocation(), glBindBuffer(), glBindFramebuffer(), glBindFramebufferOES(), glBindRenderbuffer(), glBindRenderbufferOES(), glBindTexture(), glBlendColor(), glBlendEquation(), glBlendEquationSeparate(), glBlendFunc(), glBlendFuncSeparate(), glBufferData(), glBufferSubData(), glCheckFramebufferStatus(), glCheckFramebufferStatusOES(), glClear(), glClearColor(), glClearColorx(), glClearDepthf(), glClearDepthx(), glClearStencil(), glClientActiveTexture(), glClipPlanef(), glClipPlanex(), glColor4f(), glColor4ub(), glColor4x(), glColorMask(), glColorPointer(), glCompileShader(), glCompressedTexImage2D(), glCompressedTexSubImage2D(), glCopyTexImage2D(), glCopyTexSubImage2D(), glCreateProgram(), glCreateShader(), glCullFace(), glDeleteBuffers(), glDeleteFramebuffers(), glDeleteFramebuffersOES(), glDeleteProgram(), glDeleteRenderbuffers(), glDeleteRenderbuffersOES(), glDeleteShader(), glDeleteTextures(), glDepthFunc(), glDepthMask(), glDepthRangef(), glDepthRangex(), glDetachShader(), glDisable(), glDisableClientState(), glDisableVertexAttribArray(), glDrawArrays(), glDrawElements(), glEnable(), glEnableClientState(), glEnableVertexAttribArray(), glFinish(), glFlush(), glFogf(), glFogfv(), glFogx(), glFogxv(), glFramebufferRenderbuffer(), glFramebufferRenderbufferOES(), glFramebufferTexture2D(), glFramebufferTexture2DOES(), glFrontFace(), glFrustumf(), glFrustumx(), glGenBuffers(), glGenerateMipmap(), glGenerateMipmapOES(), glGenFramebuffers(), glGenFramebuffersOES(), glGenRenderbuffers(), glGenRenderbuffersOES(), glGenTextures(), glGetActiveAttrib(), glGetActiveUniform(), glGetAttachedShaders(), glGetAttribLocation(), glGetBooleanv(), glGetBufferParameteriv(), glGetClipPlanef(), glGetClipPlanex(), glGetError(), glGetFixedv(), glGetFloatv(), glGetFramebufferAttachmentParameteriv(), glGetFramebufferAttachmentParameterivOES(), glGetIntegerv(), glGetLightfv(), glGetLightxv(), glGetMaterialfv(), glGetMaterialxv(), glGetPointerv(), glGetProgramInfoLog(), glGetProgramiv(), glGetRenderbufferParameteriv(), glGetRenderbufferParameterivOES(), glGetShaderInfoLog(), glGetShaderiv(), glGetShaderPrecisionFormat(), glGetShaderSource(), glGetStringHandle(), glGetTexEnvfv(), glGetTexEnviv(), glGetTexEnvxv(), glGetTexParameterfv(), glGetTexParameteriv(), glGetTexParameterxv(), glGetUniformfv(), glGetUniformiv(), glGetUniformLocation(), glGetVertexAttribfv(), glGetVertexAttribiv(), glGetVertexAttribPointerv(), glHint(), glIsBuffer(), glIsEnabled(), glIsFramebuffer(), glIsFramebufferOES(), glIsProgram(), glIsRenderbuffer(), glIsRenderbufferOES(), glIsShader(), glIsTexture(), glLightf(), glLightfv(), glLightModelf(), glLightModelfv(), glLightModelx(), glLightModelxv(), glLightx(), glLightxv(), glLineWidth(), glLineWidthx(), glLinkProgram(), glLoadIdentity(), glLoadMatrixf(), glLoadMatrixx(), glLogicOp(), glMaterialf(), glMaterialfv(), glMaterialx(), glMaterialxv(), glMatrixMode(), glMultiTexCoord4f(), glMultiTexCoord4x(), glMultMatrixf(), glMultMatrixx(), glNormal3f(), glNormal3x(), glNormalPointer(), glOrthof(), glOrthox(), glPixelStorei(), glPointParameterf(), glPointParameterfv(), glPointParameterx(), glPointParameterxv(), glPointSize(), glPointSizePointerOES(), glPointSizex(), glPolygonOffset(), glPolygonOffsetx(), glPopMatrix(), glPushMatrix(), glReadPixels(), glReleaseShaderCompiler(), glRenderbufferStorage(), glRenderbufferStorageOES(), glRotatef(), glRotatex(), glSampleCoverage(), glSampleCoveragex(), glScalef(), glScalex(), glScissor(), glShadeModel(), glShaderBinary(), glShaderSource(), glStencilFunc(), glStencilFuncSeparate(), glStencilMask(), glStencilMaskSeparate(), glStencilOp(), glStencilOpSeparate(), glTexCoordPointer(), glTexEnvf(), glTexEnvfv(), glTexEnvi(), glTexEnviv(), glTexEnvx(), glTexEnvxv(), glTexImage2D(), glTexParameterf(), glTexParameterfv(), glTexParameteri(), glTexParameteriv(), glTexParameterx(), glTexParameterxv(), glTexSubImage2D(), glTranslatef(), glTranslatex(), glUniform1f(), glUniform1fv(), glUniform1i(), glUniform1iv(), glUniform2f(), glUniform2fv(), glUniform2i(), glUniform2iv(), glUniform3f(), glUniform3fv(), glUniform3i(), glUniform3iv(), glUniform4f(), glUniform4fv(), glUniform4i(), glUniform4iv(), glUniformMatrix2fv(), glUniformMatrix3fv(), glUniformMatrix4fv(), glUseProgram(), glValidateProgram(), glVertexAttrib1f(), glVertexAttrib1fv(), glVertexAttrib2f(), glVertexAttrib2fv(), glVertexAttrib3f(), glVertexAttrib3fv(), glVertexAttrib4f(), glVertexAttrib4fv(), glVertexAttribPointer(), glVertexPointer(), glViewport(), maAccept(), maAddDataSize(), maAlert(), maAudioBufferClose(), maAudioBufferInit(), maAudioBufferReady(), maBringToForeground(), maBtCancelDiscovery(), maBtGetNewDevice(), maBtGetNewService(), maBtGetNextServiceSize(), maBtStartDeviceDiscovery(), maBtStartServiceDiscovery(), maCallAnswer(), maCallDial(), maCallHangup(), maCameraFormat(), maCameraFormatNumber(), maCameraGetProperty(), maCameraNumber(), maCameraRecord(), maCameraSelect(), maCameraSetPreview(), maCameraSetProperty(), maCameraSnapshot(), maCameraStart(), maCameraStop(), maDumpCallStackEx(), maFileAvailableSpace(), maFileClose(), maFileCreate(), maFileDate(), maFileDelete(), maFileExists(), maFileListClose(), maFileListNext(), maFileListStart(), maFileOpen(), maFileRead(), maFileReadToData(), maFileRename(), maFileSeek(), maFileSize(), maFileTell(), maFileTotalSpace(), maFileTruncate(), maFileWrite(), maFileWriteFromData(), maFontDelete(), maFontGetCount(), maFontGetName(), maFontLoadDefault(), maFontLoadWithName(), maFontSetCurrent(), maFrameBufferClose(), maFrameBufferGetInfo(), maFrameBufferInit(), maGetBatteryCharge(), maGetCellInfo(), maGetMemoryProtection(), maGetSystemProperty(), maHomeScreenEventsOff(), maHomeScreenEventsOn(), maHomeScreenShortcutAdd(), maHomeScreenShortcutRemove(), maImagePickerOpen(), maKeyCaptureStart(), maKeyCaptureStop(), maKeypadIsLocked(), maLocationStart(), maLocationStop(), maLockKeypad(), maMessageBox(), maNFCBatchCommit(), maNFCBatchRollback(), maNFCBatchStart(), maNFCCloseTag(), maNFCConnectTag(), maNFCDestroyTag(), maNFCGetSize(), maNFCGetTypedTag(), maNFCIsReadOnly(), maNFCIsType(), maNFCReadNDEFMessage(), maNFCReadTag(), maNFCSetReadOnly(), maNFCStart(), maNFCStop(), maNFCTransceive(), maNFCWriteNDEFMessage(), maNotificationAdd(), maNotificationRemove(), maOpenGLCloseFullscreen(), maOpenGLInitFullscreen(), maOpenGLTexImage2D(), maOpenGLTexSubImage2D(), maOptionsBox(), maPimFieldType(), maPimItemAddValue(), maPimItemClose(), maPimItemCount(), maPimItemCreate(), maPimItemFieldCount(), maPimItemGetAttributes(), maPimItemGetField(), maPimItemGetLabel(), maPimItemGetValue(), maPimItemRemove(), maPimItemRemoveValue(), maPimItemSetLabel(), maPimItemSetValue(), maPimListClose(), maPimListNext(), maPimListOpen(), maPlatformRequest(), maProtectMemory(), maRecordPause(), maRecordSetup(), maRecordStart(), maReportCallStack(), maReportResourceInformation(), maScreenSetFullscreen(), maScreenSetOrientation(), maScreenStateEventsOff(), maScreenStateEventsOn(), maSendTextSMS(), maSendToBackground(), maSensorStart(), maSensorStop(), maSetMemoryProtection(), maShowVirtualKeyboard(), maSoundPlayConn(), maStreamClose(), maStreamLength(), maStreamPause(), maStreamPos(), maStreamResume(), maStreamSetPos(), maStreamVideoSetFrame(), maStreamVideoSize(), maStreamVideoStart(), maTextBox(), maUnlockKeypad(), maUnprotectMemory(), maWidgetAddChild(), maWidgetCreate(), maWidgetDestroy(), maWidgetGetProperty(), maWidgetInsertChild(), maWidgetModalDialogHide(), maWidgetModalDialogShow(), maWidgetRemoveChild(), maWidgetScreenShow(), maWidgetSetProperty(), maWidgetStackScreenPop(), maWidgetStackScreenPush(), maWlanGetNewAp(), maWlanStartDiscovery(), and maWriteLog().
| MAHandle maFontLoadDefault | ( | int | type, |
| int | style, | ||
| int | size | ||
| ) |
Returns a handle to one of the default fonts of the device, in the style and size you specify.
| 'type' | The type of the font, can be FONT_TYPE_[SANS_SERIF,SERIF,MONOSPACE]. |
| 'style' | The style of the font, can be FONT_STYLE_[NORMAL,BOLD,ITALIC]. |
| 'size' | The size of the font. |
References maIOCtl().
Sets the font to be used with maDrawText and maDrawTextW, and returns the handle to the previous font.
| 'font' | an MAHandle for a font object. |
References maIOCtl().
| int maFontGetCount | ( | void | ) |
Returns the number of fonts that are available in the system.
References maIOCtl().
| int maFontGetName | ( | int | index, |
| char * | buffer, | ||
| int | bufferLen | ||
| ) |
Copies the font postscript name of the given index to the buffer. You must have first called maFontGetCount() at least once before calling this function.
| 'index' | A 0-based index to the font. |
| 'buffer' | An empty char buffer that will receive the font name. |
| 'bufferLen' | The size of the buffer. |
References maIOCtl().
| MAHandle maFontLoadWithName | ( | const char * | postScriptName, |
| int | size | ||
| ) |
Returns a handle to a font with the specific postscript name and size.
| 'postScriptName' | The postscript name of the font. |
| 'size' | The size of the font. |
References maIOCtl().
| int maFontDelete | ( | MAHandle | font | ) |
Deletes a loaded font
| 'font' | A font handle |
References maIOCtl().
| int maReportCallStack | ( | void | ) |
Sends the current call stack to the report pipe. Returns 0 if succeeded.
References maIOCtl().
| int maDumpCallStackEx | ( | const char * | str, |
| int | data | ||
| ) |
Dumps a string, an int, and the current call stack to the log file. Returns 0 if succeeded.
References maIOCtl().
| void maProtectMemory | ( | const void * | start, |
| int | length | ||
| ) |
Protects a piece of the data memory. Any attempt to write to that piece of memory will raise a panic.
| 'start' | The start address of the memory piece to protect. |
| 'length' | The length of the memory piece to protect. |
References maIOCtl().
| void maUnprotectMemory | ( | const void * | start, |
| int | length | ||
| ) |
Unprotects a piece of the data memory.
| 'start' | The start address of the memory piece to unprotect. |
| 'length' | The length of the memory piece to unprotect. |
References maIOCtl().
| void maSetMemoryProtection | ( | int | enable | ) |
Toggles memory protection.
| 'enable' | If 1 turns on memory protection, if 0 turns of memory protection. |
References maIOCtl().
| int maGetMemoryProtection | ( | void | ) |
Returns if memory protection is enabled or not.
References maIOCtl().
| int maGetBatteryCharge | ( | void | ) |
Returns the percentage of battery power remaining. This is an integer between 0 and 100. Currently only available on some Symbian and Windows Mobile phones.
References maIOCtl().
| int maLockKeypad | ( | void | ) |
Calls on the operating system to lock the phone's keypad. Returns > 0 if successful.
References maIOCtl().
| int maUnlockKeypad | ( | void | ) |
Calls on the operating system to unlock the phone's keypad. Returns > 0 if successful.
References maIOCtl().
| int maKeypadIsLocked | ( | void | ) |
Returns > 0 if the phone's keypad is locked by the operating system, zero otherwise.
References maIOCtl().
| int maWriteLog | ( | const void * | src, |
| int | size | ||
| ) |
Writes data to the MoSync system log file. Useful only for debugging purposes.
References maIOCtl().
| int maBtStartDeviceDiscovery | ( | int | names | ) |
Starts a device discovery operation.
| names | Set this to non-zero to retrieve the names of remote devices. This takes extra time, so set it to zero for faster scanning. |
References maIOCtl().
| int maBtGetNewDevice | ( | MABtDevice * | d | ) |
Fills an MABtDevice structure with information about a device. Removes the data from an internal queue filled by maBtStartDeviceDiscovery().
If the names parameter of maBtStartDeviceDiscovery() was zero, all members of d except address are ignored and unchanged.
The space needed to store the device name and its terminating zero may be greater than a nameBufSize. In that case, the copy is truncated. The maximum length of a device name according to the Bluetooth 2.0 specification is 248 bytes, excluding the terminating zero. However, it's recommended that you don't provide buffers larger than what your application has a use for.
Note that you need to fill the MABtDevice structure before passing it as a parameter, otherwise you will get memory access problems.
References maIOCtl().
Starts a service discovery operation. Takes a device address and the UUID of the service class to search for. For example, pass RFCOMM_PROTOCOL_MAUUID and you'll get all connectable services. Pass SerialPort_Service_MAUUID and you'll get only that type of service.
References maIOCtl().
| int maBtGetNextServiceSize | ( | MABtServiceSize * | dst | ) |
Fills an MABtServiceSize structure with meta-data about the next service. Does not remove the service from the queue.
References maIOCtl().
| int maBtGetNewService | ( | MABtService * | dst | ) |
Fills an MABtService structure with information about the next service. Removes the data from the internal queue filled by maBtStartServiceDiscovery().
References maIOCtl().
| int maBtCancelDiscovery | ( | void | ) |
Cancels any active discovery operation. If an operation was canceled, its last BT event will have the state CONNERR_CANCELED. This is an asynchronous operation. If this function returns 1, it is not safe to start another discovery before you've received the CONNERR_CANCELED event.
References maIOCtl().
| int maLocationStart | ( | void | ) |
Starts collecting location information. Does nothing if collection is already active. May cause a system popup asking for the user's permission.
LOCATION events will be generated as the estimated location is updated.
LOCATION_PROVIDER events will be generated when the location provider state changes.
In particular, it is unsupported on the MoSync Emulator. Implementation details are likely to change in the future.
References maIOCtl().
| int maLocationStop | ( | void | ) |
Stops collecting location information, and stops generating events. Does nothing if collection is not active.
References maIOCtl().
| int maPlatformRequest | ( | const char * | url | ) |
Requests that the operating system handle (for example, display or install) the indicated URL.
If the platform has the appropriate capabilities and resources available, it SHOULD bring the appropriate application to the foreground and let the user interact with the content, while keeping the MoSync application running in the background. If the platform does not have appropriate capabilities or resources available, it MAY wait to handle the request until after the MoSync application exits. In this case, when the requesting MoSync application exits, the platform MUST then bring the appropriate application (if one exists) to the foreground to let the user interact with the content.
The URL can be of the form http://<address>, in which case the usual response is to launch the built-in web browser.
The URL can also be of the form tel:<number>, in which case the request is interpreted as a request to initiate a voice call to the specified number.
If the URL refers to a packaged application (a .JAR file on Java platforms, .SIS on Symbian or .CAB on Windows Mobile), the request is interpreted as a request to install that application.
The application being requested can be an update of the calling application. In that case, the calling application must always exit before the request can be processed.
| url | The URL for the platform to load. An empty string or NULL cancels any pending requests. |
References maIOCtl().
| MAHandle maFileOpen | ( | const char * | path, |
| int | mode | ||
| ) |
Opens a file handle. If the file exists, the file will be accessible according to the mode specified. If the file does not exist, a handle will still be returned and maFileExists() will return false. The file may then be created by calling maFileCreate().
Directories may be opened with this function. They cannot be read or written, but they can be created and deleted, and their existence can be queried. Directory paths must end with a slash('/').
Attempting to open an existing directory without ending its path with a slash will fail. Likewise, attempting to open an existing file while ending its path with a slash will also fail. Either case will return MA_FERR_WRONG_TYPE.
| path | The absolute path to the file. |
| mode | The access mode. Either MA_ACCESS_READ or MA_ACCESS_READ_WRITE. Directories also use these access modes. MA_ACCESS_READ lets you see if the directory exists. MA_ACCESS_READ_WRITE also lets you create or delete it. |
References maIOCtl().
| int maFileExists | ( | MAHandle | file | ) |
Returns 1 if the file exists, 0 if it doesn't, or < 0 on error.
References maIOCtl().
| int maFileClose | ( | MAHandle | file | ) |
Closes a file handle. Returns 0. Panics on error.
References maIOCtl().
| int maFileCreate | ( | MAHandle | file | ) |
Creates a file or directory, given an file handle opened with MA_ACCESS_READ_WRITE. The file must not exist prior to calling this function. After creation, the file will be accessible for writing and reading. Returns 0 on success, or < 0 on error.
References maIOCtl().
| int maFileDelete | ( | MAHandle | file | ) |
Deletes a file or directory. The file must exist prior to calling this function. If it's a directory, it must be empty. Returns 0 on success, or < 0 on error.
References maIOCtl().
| int maFileSize | ( | MAHandle | file | ) |
Returns the size of the file, or < 0 on error.
| file | A file handle. The file must exist and must not be a directory. |
References maIOCtl().
| int maFileAvailableSpace | ( | MAHandle | file | ) |
Returns the number of free bytes on the file system on which file resides. Note that due to file system overhead, it is not possible to use all of this space for file data. Returns < 0 on error.
References maIOCtl().
| int maFileTotalSpace | ( | MAHandle | file | ) |
Returns the total size, in bytes, of the file system on which file resides. Returns < 0 on error.
References maIOCtl().
| int maFileDate | ( | MAHandle | file | ) |
| int maFileRename | ( | MAHandle | file, |
| const char * | newName | ||
| ) |
Renames a file.
If newName does not contain a slash, the file stays in its original directory.
If newName does contain a slash, it must be a complete pathname, and the file is moved to that path. The new path must be on the same file system as the original path. If it is not, this function fails with MA_FERR_RENAME_FILESYSTEM. Moving a file to another directory is not supported on Java ME. If it is attempted, this function fails with MA_FERR_RENAME_DIRECTORY.
References maIOCtl().
| int maFileTruncate | ( | MAHandle | file, |
| int | offset | ||
| ) |
Truncates the file.
If offset is less than the file's current size, the file's new size is equal to the offset. All data after the offset is discarded.
If offset is equal to the file's current size, this function does nothing.
If offset is greater than the file's current size, this function MAY increase the size of the file. You can determine if it did so by calling maFileSeek() with MA_SEEK_END.
If the file's current position is greater than offset, it is reset to be equal to offset.
The file must exist prior to calling this function. Returns 0 on success, or < 0 on error.
References maIOCtl().
| int maFileWrite | ( | MAHandle | file, |
| const void * | src, | ||
| int | len | ||
| ) |
Write from memory to file. Returns 0 on success, or < 0 on error.
References maIOCtl().
Write from data object to file. Returns 0 on success, or < 0 on error.
References maIOCtl().
| int maFileRead | ( | MAHandle | file, |
| void * | dst, | ||
| int | len | ||
| ) |
Read from file to memory. Returns 0 on success, or < 0 on error.
References maIOCtl().
Read from file to data object. Returns 0 on success, or < 0 on error.
References maIOCtl().
| int maFileTell | ( | MAHandle | file | ) |
Returns the file's current position, or < 0 on error.
| file | A file handle. The file must exist and must not be a directory. |
References maIOCtl().
| int maFileSeek | ( | MAHandle | file, |
| int | offset, | ||
| int | whence | ||
| ) |
| MAHandle maFileListStart | ( | const char * | path, |
| const char * | filter, | ||
| int | sorting | ||
| ) |
Creates a listing of names of files and directories, or file systems. Call maFileListNext() repeatedly to retrieve the names. Call maFileListClose() to free the resources used.
It is often useful to begin by listing the file systems.
| path | The full path to a directory, or the empty string, which specifies that the root file systems should be listed. Which root file systems are listed vary between platforms. |
| filter | A string to match names with. May include an asterisk ('*') wildcard to represent 0 or more characters. Ignored if path is empty. |
| sorting | One of the MA_FL_SORT flags, OR'd with one of the MA_FL_ORDER flags. MA_FL_SORT_NONE must not be combined with an MA_FL_ORDER flag. |
References maIOCtl().
| int maFileListNext | ( | MAHandle | list, |
| char * | nameBuf, | ||
| int | bufSize | ||
| ) |
Writes the name of the next file in the list to the specified buffer.
The buffer may be too small to contain the name and the terminating zero; in that case, the internal list pointer remains unchanged, the buffer will not be filled, and you should allocate a bigger buffer and call this function again. You may call this function with NULL and 0 to simply retrieve the length of the name.
If the name ends with a slash('/'), it is a directory.
References maIOCtl().
| int maFileListClose | ( | MAHandle | list | ) |
| int maSendTextSMS | ( | const char * | dst, |
| const char * | msg | ||
| ) |
Sends a text SMS. Since this may cost money for the user, some platforms ask the user for permission, by displaying a modal Yes/No message box.
| dst | The phone number to send the message to. |
| msg | The message to send. Only printable 7-bit ASCII characters are guaranteed to arrive unaltered. 8-bit Latin-1 characters should work in most cases. |
References maIOCtl().
| int maFrameBufferGetInfo | ( | MAFrameBufferInfo * | info | ) |
Get frame buffer info. Use info.sizeInBytes to allocate memory for framebuffer.
| info | A pointer to an MAFrameBufferInfo structure, which the information will be written to. |
References maIOCtl().
| int maFrameBufferInit | ( | const void * | data | ) |
Pass a pointer to your framebuffer here. Each time an maUpdateScreen is performed, this piece of memory will be copied to the actual screen memory.
| data | A pointer to the custom framebuffer. |
References maIOCtl().
| int maFrameBufferClose | ( | void | ) |
Close the framebuffer. The graphics sub-system will be set to use the standard framebuffer.
References maIOCtl().
| int maAccept | ( | MAHandle | serv | ) |
Asynchronously accepts and opens a remote connection to a service.
When a connection is accepted, a CONN event with CONNOP_ACCEPT will be generated. If the accept was successful, MAConnEventData::result will be a handle to the new, normal connection. MAConnEventData::handle will be the server connection specified in the call to this function.
To accept another connection after such an event, call this function again.
| serv | A server connection, opened with maConnect. |
References maIOCtl().
| int maSendToBackground | ( | void | ) |
Sends the application to the background, unless it's already there. Generates a FOCUS_LOST event.
References maIOCtl().
| int maBringToForeground | ( | void | ) |
Brings the application to the foreground, unless it's already there. Generates a FOCUS_GAINED event.
References maIOCtl().
| int maGetSystemProperty | ( | const char * | key, |
| char * | buf, | ||
| int | size | ||
| ) |
Retrieves the value of a Java System Property, or a MoSync System Property.
There are a few MoSync System Properties. They are unavailable on some devices. "mosync.imei" and "mosync.imsi" is the device's IMEI and IMSI number, respectively. The format of these numbers is not specified. It varies from device to device.
"mosync.iso-639-1" and "mosync.iso-639-2" is the current language used by the system's UI. Multi-language applications should use this to determine which language to use.
"mosync.winmobile.locale.SABBREVLANGNAME" is a windows mobile specific property. See http://msdn.microsoft.com/en-us/library/dd373831%28VS.85%29.aspx.
See http://www.loc.gov/standards/iso639-2/php/code_list.php - The official list of valid ISO-639 codes (online).
"mosync.device" is a description of the device. May include vendor, model name and firmware version. The format of this description is not specified. It varies from device to device.
"mosync.path.local" is the absolute path to the local file system, on devices that have a local file system. The returned path has a trailing slash character ('/').
| key | The property's key. |
| buf | A buffer where the value should be written. |
| size | The size of the buffer, in bytes. |
References maIOCtl().
| int maShowVirtualKeyboard | ( | void | ) |
Shows the virtual keyboard.
References maIOCtl().
| int maTextBox | ( | const wchar * | title, |
| const wchar * | inText, | ||
| wchar * | outText, | ||
| int | maxSize, | ||
| int | constraints | ||
| ) |
Displays a NativeUI text box, with "OK" and "Cancel" buttons (or equivalent command items if the OS uses other input methods). The user can enter text using the native input system.
This function returns immediately, leaving the text box on-screen. While the text box is active, it will consume all key events. Other events, like networking, will still be handled normally.
When the user activates one of the command items ("OK" or "Cancel"), a number of things will happen in order:
The box's text will be copied to the buffer specified by outText. The text box will disappear. An event (EVENT_TYPE_TEXTBOX) will be posted.
The text box will allow input of up to (maxSize - 1) characters, but no more. Additional keypresses at that point may be ignored, or may cause an error message, at the discretion of the underlying implementation.
| title | The box's title. |
| inText | When the text box is created, it is populated with this string. |
| outText | Pointer to a buffer. When the text box closes, the contents are copied to this buffer. |
| maxSize | The size of the buffer, in characters. Includes the terminating zero. |
| constraints | Rules for how text is entered into the box. Must be exactly one of the MA_TB_TYPE constants, or'd with zero or more of the MA_TB_FLAG constants. |
References maIOCtl().
| int maKeyCaptureStart | ( | int | keyCode | ) |
Make MoSync send key-events for the specified key, even when the application does not have focus. Can only capture one key at a time.
| keyCode | The MAK code for the key to capture. |
References maIOCtl().
| int maKeyCaptureStop | ( | void | ) |
Stops any key capture in progress.
References maIOCtl().
| int maHomeScreenEventsOn | ( | void | ) |
| int maHomeScreenEventsOff | ( | void | ) |
| int maHomeScreenShortcutAdd | ( | const char * | name | ) |
Add shortcut icon to the device home screen. Available on Android only.
| name | The name (label) of the shortcut to add. |
References maIOCtl().
| int maHomeScreenShortcutRemove | ( | const char * | name | ) |
Remove shortcut icon from the device home screen. Available on Android only.
| name | The name (label) of the shortcut to remove. |
References maIOCtl().
| int maNotificationAdd | ( | int | type, |
| int | id, | ||
| const char * | title, | ||
| const char * | text | ||
| ) |
Add a notification item.
Note that there can only be one notification of type NOTIFICATION_TYPE_APPLICATION_LAUNCHER. Additional notification types may be added in the future. This syscall is available on Android only.
| type | The NOTIFICATION_TYPE_APPLICATION_LAUNCHER constant. |
| id | The id of the notification. The id must be unique within the application. |
| title | Title of the notification. |
| text | String to be displayed as part of the notification. |
References maIOCtl().
| int maNotificationRemove | ( | int | id | ) |
Remove a notification item. Currently implemented only on Android.
| id | The id of the notification. |
References maIOCtl().
| int maScreenSetOrientation | ( | int | orientation | ) |
Set the screen orientation. Currently implemented only on Android.
| orientation | One of the #SCREEN_ORIENTATION_PORTRAIT #SCREEN_ORIENTATION_DYNAMIC constants. |
References maIOCtl().
| int maScreenSetFullscreen | ( | int | fullscreen | ) |
Enable/disable fullscreen mode. Currently implemented only on Android.
| fullscreen | 1 for fullscreen on, 0 for fullscreen off. |
References maIOCtl().
| int maScreenStateEventsOn | ( | void | ) |
Turn on sending of screen state events. Off by default. Currently implemented only on Android.
References maIOCtl().
| int maScreenStateEventsOff | ( | void | ) |
Turn off sending of screen state events. Off by default. Currently implemented only on Android.
References maIOCtl().
| void maReportResourceInformation | ( | void | ) |
Logs information about the state of all current resources.
References maIOCtl().
| void maMessageBox | ( | const char * | title, |
| const char * | message | ||
| ) |
| title | The title of the message box shown |
| message | The message should be short, not more than 40 characters, to ensure its visibility on all screen sizes. |
References maIOCtl().
| void maAlert | ( | const char * | title, |
| const char * | message, | ||
| const char * | button1, | ||
| const char * | button2, | ||
| const char * | button3 | ||
| ) |
Displays a message to the user. It contains optional title, message and 3 buttons for selection. On Android the buttons point to a positive, negative or neutral action. When one of the buttons are clicked the alert is automatically dismissed. When a selection is made a EVENT_TYPE_ALERT event is sent with the button index.
| title | The title of the message box shown. |
| message | The message should be short, not more than 40 characters, to ensure its visibility on all screen sizes. The text on the first button. On Android it indicates a positive selection. The text on the second button. On Android it indicates a neutral selection. The text on the third button. On Android it indicates that a negative selection. |
References maIOCtl().
| void maImagePickerOpen | ( | void | ) |
Displays an image picker to the user. It's display depends on the platform. Note: when a selection is made a EVENT_TYPE_IMAGE_PICKER event is sent.
References maIOCtl().
| void maOptionsBox | ( | const wchar * | title, |
| const wchar * | destructiveButtonTitle, | ||
| const wchar * | cancelButtonTitle, | ||
| const void * | otherButtonTitles, | ||
| int | otherButtonTitlesSize | ||
| ) |
Displays a special kind of dialog that has a list of possible choices. The list of options is displayed as buttons on iOS, and as text views on Android. By clicking any option the dialog gets dismissed and a EVENT_TYPE_OPTIONS_BOX_BUTTON_CLICKED event is sent back.
| title | The dialog title. |
| destructiveButtonTitle | The destructive button text. This is an iOS specific feature: it has different color than the other options, and it indicates that it's action has destructive behaviour. On Android it is treated and it looks like a normal option. |
| cancelButtonTitle | The dialog's Cancel button text. If left empty, the dialog is not cancelable. |
| otherButtonTitles | The address to the buffer that stores the list of options. |
| otherButtonTitlesSize | The size of the buffer, in bytes. |
References maIOCtl().