Muteki
EABI code execution on Besta® RTOS devices.
Loading...
Searching...
No Matches
event.h File Reference

Event constants. More...

Go to the source code of this file.

Enumerations

enum  ui_keycode_e {
  KEY_ESC = 0x01 , KEY_LEFT , KEY_UP , KEY_RIGHT ,
  KEY_DOWN , KEY_PGUP , KEY_PGDN , KEY_CAPS = 0x0a ,
  KEY_DEL = 0xc , KEY_ENTER = 0x0d , KEY_MENU = 0x11 , KEY_FUNC_MENU = 0x11 ,
  KEY_FONT = 0x12 , KEY_SPACE = ' ' , KEY_EXCL = '!' , KEY_TAB = 0x22 ,
  KEY_HASH = '#' , KEY_DOLLAR = '$' , KEY_PERCENT = '' , KEY_LPAREN = '(' ,
  KEY_RPAREN = ')' , KEY_STAR = '*' , KEY_COMMA = ',' , KEY_DASH = '-' ,
  KEY_DOT = '.' , KEY_0 = '0' , KEY_1 = '1' , KEY_2 = '2' ,
  KEY_3 = '3' , KEY_4 = '4' , KEY_5 = '5' , KEY_6 = '6' ,
  KEY_7 = '7' , KEY_8 = '8' , KEY_9 = '9' , KEY_QUESTION = '?' ,
  KEY_AT = '@' , KEY_A = 'A' , KEY_B = 'B' , KEY_C = 'C' ,
  KEY_D = 'D' , KEY_E = 'E' , KEY_F = 'F' , KEY_G = 'G' ,
  KEY_H = 'H' , KEY_I = 'I' , KEY_J = 'J' , KEY_K = 'K' ,
  KEY_L = 'L' , KEY_M = 'M' , KEY_N = 'N' , KEY_O = 'O' ,
  KEY_P = 'P' , KEY_Q = 'Q' , KEY_R = 'R' , KEY_S = 'S' ,
  KEY_T = 'T' , KEY_U = 'U' , KEY_V = 'V' , KEY_W = 'W' ,
  KEY_X = 'X' , KEY_Y = 'Y' , KEY_Z = 'Z' , KEY_LANG_CHN = 0x80 ,
  KEY_LANG_YUE = 0x81 , KEY_LANG_ENG = 0x82 , KEY_POWER = 0x83 , KEY_F1 = 0x84 ,
  KEY_F2 , KEY_F3 , KEY_F4 , KEY_F5 ,
  KEY_APP_REC = 0x89 , KEY_SHIFT = 0x8b , KEY_IME = 0x8e , KEY_LANG_JPN = 0x8f ,
  KEY_SYMBOL = 0x91 , KEY_HOME = 0x93 , KEY_HOME_MENU = 0x93 , KEY_PRIME_MENU = 0x93 ,
  KEY_TOGGLE_SC_TC = 0x94 , KEY_HELP = 0x95 , KEY_SAVE = 0x96 , KEY_APP_MP3_PLAYER = 0x98 ,
  KEY_VOL_BACKLIGHT = 0x9c , KEY_SYLLABLE = 0x9e , KEY_ORIGINAL_INPUT = 0x9f , KEY_APP_MISC_3 = 0xa3 ,
  KEY_APP_FLASHCARD = 0xa3 , KEY_APP_MISC_5 = 0xa5 , KEY_APP_DICT_JA_DAJIRIN = 0xa5 , KEY_APP_GAMES = 0xa5 ,
  KEY_APP_MISC_6 = 0xa6 , KEY_APP_DICT_JA_SHINMEIKAI = 0xa6 , KEY_APP_ALBUM = 0xa6 , KEY_APP_MISC_7 = 0xa7 ,
  KEY_APP_DICT_EN_LONGMAN = 0xa7 , KEY_APP_DICT_JA_EN_GENIUS = 0xa7 , KEY_APP_MISC_8 = 0xa8 , KEY_APP_DICT_EN_JA_GENIUS = 0xa8 ,
  KEY_PRIME_APPS = 0xb1 , KEY_PRIME_PLOT , KEY_PRIME_NUM , KEY_PRIME_VIEW ,
  KEY_PRIME_CAS , KEY_PRIME_ALPHA , KEY_PRIME_MINUS , KEY_PRIME_DECIMAL_POINT ,
  KEY_PRIME_PLUS , KEY_FAV = 0xc0 , KEY_APP_VIDEO_PLAYER = 0xd0 , KEY_AUX_MENU = 0xd1 ,
  KEY_APP_TRANSLATOR_EN_ZH = 0xd2 , KEY_APP_TRANSLATOR_ZH_EN = 0xd3 , KEY_APP_DICT_EN_PRO = 0xd4 , KEY_APP_DICT_ZH_EN_BESTA = 0xe8 ,
  KEY_APP_DICT_JA_ZH_BESTA = 0xe9 , KEY_APP_DICT_ZH_JA_BESTA = 0xea , KEY_APP_DICT_EN_OXFORD = 0xf2 , KEY_APP_DICT_EN_ZH_BESTA = 0xf3 ,
  KEY_EDIT = 0xf5 , KEY_SEARCH = 0xf6 , KEY_BACKLIGHT = 0xf8 , KEY_COMPARE = 0xf9 ,
  KEY_VOL = 0xfa , KEY_BATTERY = 0xfb , KEY_CONTRAST = 0xfc , KEY_USB_INSERTION = 0xfe ,
  KEY_REPEAT = 0xff , KEY_INS = 0x101 , KEY_SCROLL_WHEEL_EVENT = 0x102 , KEY_TTS = 0x104 ,
  KEY_SHIFT_PGUP = 0xe047 , KEY_PRIME_HOME = 0xe047 , KEY_SHIFT_PGDN = 0xe04f
}
 List of available keycodes. More...
enum  scroll_wheel_e { SCROLL_DOWN , SCROLL_UP }
 Scroll wheel direction. More...
enum  ui_event_type_e {
  UI_EVENT_TYPE_INVALID = 0 , UI_EVENT_TYPE_TOUCH_BEGIN = 1 , UI_EVENT_TYPE_TOUCH_MOVE = 2 , UI_EVENT_TYPE_TOUCH_END = 8 ,
  UI_EVENT_TYPE_KEY = 16 , UI_EVENT_TYPE_SPECIAL = 32 , UI_EVENT_TYPE_COMPONENT_CMD = 0x0100 , UI_EVENT_TYPE_INTERNAL = 0x4000 ,
  UI_EVENT_TYPE_COMPONENT_CALL = 0x40000 , UI_EVENT_TYPE_KEY_UP = 0x100000
}
 UI event types. More...
enum  ui_event_internal_e { UI_EVENT_INTERNAL_FLAG = 0 , UI_EVENT_INTERNAL_BATTERY_CHECK_REQUEST = 1 , UI_EVENT_INTERNAL_BYPASS = 2 }
 Internal system UI event types. More...
enum  ui_event_component_call_e { UI_EVENT_COMPONENT_CALL_ERASE_BG = 1 , UI_EVENT_COMPONENT_CALL_DRAW = 2 , UI_EVENT_COMPONENT_CALL_SET_STATE = 3 }
 Internal UI component call request types. More...
enum  ui_event_source_e { UI_EVENT_SOURCE_SYSTEM = 0 , UI_EVENT_SOURCE_SEND_MESSAGE = 1 , UI_EVENT_SOURCE_PUT_EVENT = 2 }
 Event source. More...

Detailed Description

Event constants.

Enumeration Type Documentation

◆ scroll_wheel_e

Scroll wheel direction.

Only confirmed on BA802.

Enumerator
SCROLL_DOWN 

Scroll down (clockwise direction).

SCROLL_UP 

Scroll up (counter-clockwise direction).

◆ ui_event_component_call_e

Internal UI component call request types.

These values may go into the ui_event_t::value field when ui_event_t::event_type is UI_EVENT_TYPE_COMPONENT_CALL.

Enumerator
UI_EVENT_COMPONENT_CALL_ERASE_BG 

Erase the background of the component.

This runs the ui_component_s::on_erase_bg callback.

UI_EVENT_COMPONENT_CALL_DRAW 

Draw the component.

This runs the ui_component_s::on_draw callback and sets the ui_event_sys_s::user_data to 0x5a5a5a5a.

UI_EVENT_COMPONENT_CALL_SET_STATE 

Set state.

This runs the ui_component_s::on_set_state callback with the mask and set value set in the event.

Warning
The event format must be the extended ui_event_state_change_t, which is 4 bytes larger than the standard ui_event_t, and having the parameters that will be passed to ui_component_s::on_set_state packed into the ui_event_state_change_t::state_change property.
See also
ui_event_state_change_t::state_change

◆ ui_event_internal_e

Internal system UI event types.

These values may go into the ui_event_t::value field when ui_event_t::event_type is UI_EVENT_TYPE_INTERNAL.

Unlisted values behave similarly to UI_EVENT_INTERNAL_FLAG.

Enumerator
UI_EVENT_INTERNAL_FLAG 

Set a flag but do not queue the event.

UI_EVENT_INTERNAL_BATTERY_CHECK_REQUEST 

Request GetEvent() to do a low battery check.

UI_EVENT_INTERNAL_BYPASS 

Queue this event normally into the system event queue. Exact purpose is unclear.

◆ ui_event_source_e

Event source.

Describes how the event is produced and where it is being produced.

Note
This can be unreliable sometimes as certain functions like PutEvent() have rules that bypass this value.
Enumerator
UI_EVENT_SOURCE_SYSTEM 

Event is a system event (from the system event queue).

UI_EVENT_SOURCE_SEND_MESSAGE 

Event is a message (produced via SendMessage()).

UI_EVENT_SOURCE_PUT_EVENT 

Event is a regular event and not a UI_EVENT_TYPE_KEY or UI_EVENT_TYPE_SPECIAL (from the main event queue).

◆ ui_event_type_e

UI event types.

Enumerator
UI_EVENT_TYPE_INVALID 

Invalid/cleared.

UI_EVENT_TYPE_TOUCH_BEGIN 

Beginning of touch/pen down event.

UI_EVENT_TYPE_TOUCH_MOVE 

Touch/pen move event.

UI_EVENT_TYPE_TOUCH_END 

End of touch/pen up event.

UI_EVENT_TYPE_KEY 

Key(s) pressed.

UI_EVENT_TYPE_SPECIAL 

Special event. Bypasses the queues and sets a flag instead. Exact purpose is unclear.

UI_EVENT_TYPE_COMPONENT_CMD 

Inter-component communication.

UI_EVENT_TYPE_INTERNAL 

Internal system event. Exact purpose is unclear.

See also
ui_event_internal_e
UI_EVENT_TYPE_COMPONENT_CALL 

Internal UI component call request.

See also
ui_event_component_call_e
UI_EVENT_TYPE_KEY_UP 

Key(s) released.

Available on S3C and TCC boards.

◆ ui_keycode_e

List of available keycodes.

Keycodes starting with KEY_PRIME_ are extended keycodes exclusive to HP Prime G1 (EA656).

Enumerator
KEY_MENU 

Bring up the function menu of the current scene.

Not to be confused with the function menu.

KEY_FUNC_MENU 

Bring up the function menu of the current scene.

Alias of KEY_MENU.

KEY_FONT 

Change font size.

KEY_LANG_CHN 

Trigger TTS in Mandarin Chinese.

KEY_LANG_YUE 

Trigger TTS in Cantonese.

KEY_LANG_ENG 

Trigger TTS in English.

KEY_POWER 

Power button event.

KEY_APP_REC 

Launch voice recorder.

KEY_IME 

Switch input method.

KEY_LANG_JPN 

Trigger TTS in Japanese.

KEY_SYMBOL 

Activate the symbol selection input method.

KEY_HOME 

Return to home menu.

KEY_HOME_MENU 

Return to home menu.

Alias of KEY_HOME

KEY_PRIME_MENU 

The MENU key on HP Prime.

Alias of KEY_HOME

KEY_TOGGLE_SC_TC 

Toggle simplified/traditional Chinese.

KEY_HELP 

Show in-app help.

KEY_SAVE 

Save current change and exit.

KEY_APP_MP3_PLAYER 

Launch MP3 player.

KEY_VOL_BACKLIGHT 

Open the Volume + Backlight adjustment menu.

KEY_SYLLABLE 

Dictionary: Pronounce the current word syllable-by-syllable.

KEY_ORIGINAL_INPUT 

Dictionary and search: Go back to the first screen the user initiated a search (with input memorized).

KEY_APP_MISC_3 

Board-specific app launching shortcut.

KEY_APP_FLASHCARD 

Launch the flashcard app.

Available on CA743.

KEY_APP_MISC_5 

Board-specific app launching shortcut.

KEY_APP_DICT_JA_DAJIRIN 

Launch Daijirin Japanese dictionary.

Available on JA738.

KEY_APP_GAMES 

Launch the Games app.

Available on CA743.

KEY_APP_MISC_6 

Board-specific app launching shortcut.

KEY_APP_DICT_JA_SHINMEIKAI 

Launch Shin-Meikai Japanese dictionary.

Available on JA738.

KEY_APP_ALBUM 

Launch the album app.

Available on CA743.

KEY_APP_MISC_7 

Board-specific app launching shortcut.

KEY_APP_DICT_EN_LONGMAN 

Launch Longman dictionary.

Available on CA743.

KEY_APP_DICT_JA_EN_GENIUS 

Launch Genius Japanese-English dictionary.

Available on JA738.

KEY_APP_MISC_8 

Board-specific app launching shortcut.

KEY_APP_DICT_EN_JA_GENIUS 

Launch Genius English-Japanese dictionary.

Available on JA738.

KEY_FAV 

Show the Favorites menu.

KEY_APP_VIDEO_PLAYER 

Launch video player app.

KEY_AUX_MENU 

Open the global auxilary menu on touchscreen-only devices.

KEY_APP_TRANSLATOR_EN_ZH 

Open the English to Chinese translator app.

KEY_APP_TRANSLATOR_ZH_EN 

Open the Chinese to English translator app.

KEY_APP_DICT_EN_PRO 

Launch Besta professional vocabulary dictionary.

KEY_APP_DICT_ZH_EN_BESTA 

Launch Besta Chinese-English dictionary.

KEY_APP_DICT_JA_ZH_BESTA 

Launch Besta Japanese-Chinese dictionary.

KEY_APP_DICT_ZH_JA_BESTA 

Launch Besta Chinese-Japanese dictionary.

KEY_APP_DICT_EN_OXFORD 

Launch Oxford dictionary.

KEY_APP_DICT_EN_ZH_BESTA 

Launch Besta English-Chinese dictionary.

KEY_EDIT 

Show the edit menu (cut/copy/paste).

KEY_SEARCH 

Launch the unified search app.

KEY_BACKLIGHT 

Open the Backlight adjustment menu.

May be an alias to KEY_VOL_BACKLIGHT.

KEY_COMPARE 

Dictionary: Parrot the current word and compare the pronunciations.

KEY_VOL 

Open the Volume adjustment menu.

May be an alias to KEY_VOL_BACKLIGHT.

KEY_BATTERY 

Display battery indicator popup.

KEY_CONTRAST 

Open LCD backlight and contrast adjustment menu.

KEY_USB_INSERTION 

Event on USB cable insertion.

KEY_REPEAT 

Dictionary: Repeatedly read out the current word.

KEY_SCROLL_WHEEL_EVENT 

Scroll wheel event.

KEY_TTS 

Trigger TTS.

Some models may have this key instead of the usual KEY_LANG_* series keys for triggering TTS.