muteki
Loading...
Searching...
No Matches
common.h
Go to the documentation of this file.
1/*
2 * Copyright 2024 dogtopus
3 * SPDX-License-Identifier: MIT
4 */
5
11#ifndef __MUTEKI_UI_COMMON_H__
12#define __MUTEKI_UI_COMMON_H__
13
14#include <muteki/common.h>
15#include <muteki/threading.h>
16
17#ifdef __cplusplus
18extern "C" {
19#endif
20
45
64
82
131
170
184
202
215 DASH_8_8_16_0,
216 DASH_4,
217 DASH_0_4_16_4_4_4,
218 DASH_12_4_4_4_4_4,
219 DASH_1,
220 DASH_2,
221 DASH_16,
222 DASH_0_1_8_1_8_1_8_1_4_0 = 12,
223 DASH_4_1_8_1_7_1_9_1,
224 DASH_3_1_7_1_7_1_4_8,
225 DASH_3_1_7_1_7_1_7_1_4_0,
226 DASH_0_1_6_1_1_1_4_1_3_1_2_1_5_2_3_0,
227 DASH_3_2_5_1_2_1_3_1_4_1_1_1_6_1,
228 DASH_7_1_6_1_6_1_6_1_3_0,
229 DASH_3_1_6_1_6_1_6_1_7_0,
230 DASH_24_8 = 22,
234 DASH_CUSTOM = 0x100,
235};
236
242 /* 0x00 */
243 KEY_ESC = 0x01,
244 KEY_LEFT,
245 KEY_UP,
246 KEY_RIGHT,
247 KEY_DOWN,
248 KEY_PGUP,
249 KEY_PGDN,
250 KEY_CAPS = 0x0a,
251 KEY_DEL = 0xc,
252 KEY_ENTER = 0x0d,
253 /* 0x10 */
258 KEY_MENU = 0x11,
267 KEY_FONT = 0x12,
268 /* 0x20 */
269 KEY_SPACE = ' ',
270 KEY_EXCL = '!',
271 KEY_TAB = 0x22,
272 KEY_HASH = '#',
273 KEY_DOLLAR = '$',
274 KEY_PERCENT = '%',
275 KEY_LPAREN = '(',
276 KEY_RPAREN = ')',
277 KEY_STAR = '*',
278 KEY_COMMA = ',',
279 KEY_DASH = '-',
280 KEY_DOT = '.',
281 /* 0x30 */
282 KEY_0 = '0',
283 KEY_1 = '1',
284 KEY_2 = '2',
285 KEY_3 = '3',
286 KEY_4 = '4',
287 KEY_5 = '5',
288 KEY_6 = '6',
289 KEY_7 = '7',
290 KEY_8 = '8',
291 KEY_9 = '9',
292 KEY_QUESTION = '?',
293 /* 0x40 */
294 KEY_AT = '@',
295 KEY_A = 'A',
296 KEY_B = 'B',
297 KEY_C = 'C',
298 KEY_D = 'D',
299 KEY_E = 'E',
300 KEY_F = 'F',
301 KEY_G = 'G',
302 KEY_H = 'H',
303 KEY_I = 'I',
304 KEY_J = 'J',
305 KEY_K = 'K',
306 KEY_L = 'L',
307 KEY_M = 'M',
308 KEY_N = 'N',
309 KEY_O = 'O',
310 /* 0x50 */
311 KEY_P = 'P',
312 KEY_Q = 'Q',
313 KEY_R = 'R',
314 KEY_S = 'S',
315 KEY_T = 'T',
316 KEY_U = 'U',
317 KEY_V = 'V',
318 KEY_W = 'W',
319 KEY_X = 'X',
320 KEY_Y = 'Y',
321 KEY_Z = 'Z',
322 /* 0x80 */
338 KEY_POWER = 0x83,
339 KEY_F1 = 0x84,
340 KEY_F2,
341 KEY_F3,
342 KEY_F4,
343 KEY_F5,
348 KEY_SHIFT = 0x8b,
352 KEY_IME = 0x8e,
357 /* 0x90 */
365 KEY_HOME = 0x93,
383 KEY_HELP = 0x95,
387 KEY_SAVE = 0x96,
404 /* 0xa0 */
465 /* 0xb0 */
466 KEY_PRIME_APPS = 0xb1,
467 KEY_PRIME_PLOT,
468 KEY_PRIME_NUM,
469 KEY_PRIME_VIEW,
470 KEY_PRIME_CAS,
471 KEY_PRIME_ALPHA,
472 KEY_PRIME_MINUS,
473 KEY_PRIME_DECIMAL_POINT,
474 KEY_PRIME_PLUS,
475 /* 0xc0 */
479 KEY_FAV = 0xc0,
480 /* 0xd0 */
501 /* 0xe0 */
514 /* 0xf0 */
526 KEY_EDIT = 0xf5,
544 KEY_VOL = 0xfa,
561 /* 0x100+ */
562 KEY_INS = 0x101,
571 KEY_TTS = 0x104,
572 KEY_SHIFT_PGUP = 0xe047,
573 KEY_PRIME_HOME = 0xe047,
574 KEY_SHIFT_PGDN = 0xe04f,
575};
576
591
622
641 SANS_TINY_CJK_NORMAL = 0,
642 SANS_BOLD_TINY_CJK_NORMAL,
643 SANS_ITALIC_TINY_CJK_REGULAR_NORMAL,
644 SANS_BOLDITALIC_TINY_CJK_REGULAR_NORMAL,
645 SERIF_SMALL_CJK,
646 SERIF_BOLD_SMALL_CJK,
647 SERIF_ITALIC_SMALL_CJK_REGULAR,
648 SERIF_BOLDITALIC_SMALL_CJK_REGULAR,
649 SERIF_CJK,
650 SERIF_BOLD_CJK,
651 SERIF_ITALIC_CJK_REGULAR,
652 SERIF_BOLDITALIC_CJK_REGULAR,
653 SERIF_LARGE_CJK,
654 SERIF_BOLD_LARGE_CJK,
655 SERIF_ITALIC_LARGE_CJK,
656 SERIF_BOLDITALIC_LARGE_CJK,
657 MONOSPACE_CJK,
658 MONOSPACE_TINY_NOCJK,
659 SERIF_CJK_18,
660 SERIF_BOLD_CJK_19,
661 SERIF_SMALL_CJK_20,
662 SANS_TINY_NOCJK,
663 SANS_BOLD_TINY_NOCJK,
664 SANS_ITALIC_TINY_NOCJK,
665 SANS_BOLDITALIC_TINY_NOCJK,
666 SERIF_SMALL_CJK_25,
667 SERIF_BOLD_SMALL_CJK_26,
668 SERIF_ITALIC_SMALL_CJK_REGULAR_27,
669 SERIF_BOLDITALIC_SMALL_CJK_REGULAR_28,
670 SERIF_CJK_29,
671 SERIF_BOLD_CJK_30,
672 SERIF_ITALIC_CJK_REGULAR_31,
673 SERIF_BOLDITALIC_CJK_REGULAR_32,
674 SERIF_HUGE_CJK_LARGE,
675 SANS_HUGE_CJK_LARGE,
676 SERIF_ITALIC_HUGE_CJK_LARGE,
677 SANS_ITALIC_HUGE_CJK_LARGE,
678};
679
680struct lcd_surface_s;
681struct lcd_cursor_s;
682struct ui_rect_s;
683struct lcd_draw_s;
684struct lcd_font_s;
685struct lcd_lock_s;
686struct lcd_base_s;
687struct lcd_thread_safe_s;
688struct ui_event_base_s;
689struct ui_event_prime_s;
690struct ui_message_s;
691struct ui_component_s;
693
694typedef struct lcd_surface_s lcd_surface_t;
695typedef struct lcd_cursor_s lcd_cursor_t;
696typedef struct ui_rect_s ui_rect_t;
697typedef struct lcd_draw_s lcd_draw_t;
698typedef struct lcd_font_s lcd_font_t;
699typedef struct lcd_lock_s lcd_lock_t;
700typedef struct lcd_base_s lcd_base_t;
702typedef struct ui_event_base_s ui_event_base_t;
704typedef struct ui_message_s ui_message_t;
705typedef struct ui_component_s ui_component_t;
707
708#if defined(MUTEKI_HAS_PRIME_UI_EVENT) && MUTEKI_HAS_PRIME_UI_EVENT == 1
709#define ui_event_s ui_event_prime_s
710typedef struct ui_event_prime_s ui_event_t;
711#else
712#define ui_event_s ui_event_base_s
713typedef struct ui_event_base_s ui_event_t;
714#endif
715
716#if defined(MUTEKI_HAS_THREAD_SAFE_LCD) && MUTEKI_HAS_THREAD_SAFE_LCD == 1
717#define lcd_s lcd_thread_safe_s
718typedef struct lcd_thread_safe_s lcd_t;
719#else
720#define lcd_s lcd_base_s
721typedef struct lcd_base_s lcd_t;
722#endif
723
733 char magic[2]; // 0:2
737 short width; // 2:4
741 short height; // 4:6
746 short depth; // 6:8
751 short xsize; // 8:10
756 short encoding; // 10:12
761 int *palette; // 12:16
766 void *buffer; // 16:20
767}; // 20 bytes
768
774 short x; // 0x0:0x2 (lcd_t[0x5c:0x5e])
776 short y; // 0x2:0x4 (lcd_t[0x5e:0x60])
778 unsigned int size; // 0x4:0x8 (lcd_t[0x60:0x64])
783 short type; // 0x8:0xa (lcd_t[0x64:0x66])
785 short unk_0xa; // 0xa:0xc (lcd_t[0x66:0x68])
787 short grab_count; // 0xc:0xe (lcd_t[0x68:0x6a])
789 short unk_0xe; // 0xe:0x10 (lcd_t[0x6a:0x6c])
790}; // 0x10 bytes
791
796struct ui_rect_s {
798 short x0; // (lcd_t[0x6c:0x6e])
800 short y0; // (lcd_t[0x6e:0x70])
802 short x1; // (lcd_t[0x70:0x72])
804 short y1; // (lcd_t[0x72:0x74])
805}; // 0x8 bytes
806
812 int unk_0x0; // 0x0:0x4 (lcd_t[0x14:0x18])
814 int fg_color; // 0x4:0x8 (lcd_t[0x18:0x1c])
816 unsigned int stroke_dash_pattern; // 0x8:0xc (lcd_t[0x1c:0x20])
818 short stroke_size; // 0xc:0xe (lcd_t[0x20:0x22])
820 short stroke_dash; // 0xe:0x10 (lcd_t[0x22:0x24])
822 int unk_0x10; // 0x10:0x14 (lcd_t[0x24:0x28])
824 int unk_0x14; // 0x14:0x18 (lcd_t[0x28:0x2c])
826 int unk_0x18; // 0x18:0x1c (lcd_t[0x2c:0x30])
828 int unk_0x1c; // 0x1c:0x20 (lcd_t[0x30:0x34])
829}; // 0x20 bytes
830
839 short type; // 0x0:0x2 (lcd[0x34:0x36])
841 short height; // 0x2:0x4 (lcd[0x36:0x38])
846 short unk_0x4; // 0x4:0x6 (lcd[0x38:0x3a])
848 short unk_0x6; // 0x6:0x8 (lcd[0x3a:0x3c])
850 short unk_0x8; // 0x8:0xa (lcd[0x3c:0x3e])
855 short unk_0xa; // 0xa:0xc (lcd[0x3e:0x40])
860 short unk_0xc; // 0xc:0xe (lcd[0x40:0x42])
861 short unk_0xe[13]; // 0xe:0x28 (lcd[0x42:0x5c])
862}; // 0x28 bytes
863
871 int unk_0x0; // 0x0:0x4 (lcd_thread_safe_t[0x94:0x98])
873 critical_section_t *cs; // 0x4:0x8 (lcd_thread_safe_t[0x98:0x9c])
875 void (*lock)(void); // 0x8:0xc (lcd_thread_safe_t[0x9c:0xa0])
877 void (*unlock)(void); // 0xc:0x10 (lcd_thread_safe_t[0xa0:0xa4])
879 int unk_0xa4[23]; // 0x10:0x6c (lcd_thread_safe_t[0xa4:0x100])
880}; // 0x6c bytes
881
895typedef int (*lcd_rotate_callback_t)(lcd_t *self, int rotation);
896
905 void *pixel_end; // 0x4:0x8
907 size_t pixel_size; // 0x8:0xc
909 int bg_color; // 0xc:0x10
911 int transparent_color; // 0x10:0x14
913 lcd_draw_t draw; // 0x14:0x34
915 lcd_font_t font; // 0x34:0x5c
921 int unk_0x74[3]; // 0x74:0x80
923 lcd_cursor_t *cursor; // 0x80:0x84
925 short width; // 0x84:0x86
927 short height; // 0x86:0x88
932 int rotation; // 0x88:0x8c
938 short depth_bytes; // 0x8c:0x8e
943 short xsize; // 0x8e:0x90
949}; // 0x94 bytes
950
959 void *pixel_end; // 0x4:0x8
961 size_t pixel_size; // 0x8:0xc
963 int bg_color; // 0xc:0x10
965 int transparent_color; // 0x10:0x14
967 lcd_draw_t draw; // 0x14:0x34
969 lcd_font_t font; // 0x34:0x5c
975 int unk_0x74[3]; // 0x74:0x80
977 lcd_cursor_t *cursor; // 0x80:0x84
979 short width; // 0x84:0x86
981 short height; // 0x86:0x88
986 int rotation; // 0x88:0x8c
992 short depth_bytes; // 0x8c:0x8e
997 short xsize; // 0x8e:0x90
1004 int unk_0x94; // 0x94:0x98
1006 critical_section_t *cs; // 0x98:0x9c
1008 void (*lock)(void); // 0x9c:0xa0
1010 void (*unlock)(void); // 0xa0:0xa4
1012 int unk_0xa4[23]; // 0xa4:0x100
1013};
1014
1025 unsigned int type;
1029 unsigned short finger_id;
1030 union {
1031 struct {
1035 unsigned short key_code0;
1039 unsigned short key_code1;
1040 };
1041 struct {
1047 unsigned short touch_x;
1053 unsigned short touch_y;
1054 };
1055 };
1059 unsigned short unk_0xb;
1060};
1061
1077 int event_type; // 4-8 16: key (?).
1078 union {
1079 struct {
1084 unsigned short key_code0; // 8-10
1091 unsigned short key_code1; // 10-12 sometimes set when 2 keys are pressed simultaneously. Does not always work.
1092 };
1093 struct {
1099 unsigned short touch_x;
1105 unsigned short touch_y;
1106 };
1107 };
1108 union {
1113 void *usb_data; // 12-16 pointer that only shows up on USB insertion event.
1118 unsigned int scroll_wheel;
1119 };
1120
1125 void *unk16; // 16-20 sometimes a pointer especially on unstable USB connection? junk data?
1131 void *unk20; // 20-24 seems to be always 0. Unused?
1132};
1133
1149 int event_type; // 4-8 16: key (?).
1150 union {
1151 struct {
1156 unsigned short key_code0; // 8-10
1163 unsigned short key_code1; // 10-12 sometimes set when 2 keys are pressed simultaneously. Does not always work.
1164 };
1165 struct {
1171 unsigned short touch_x;
1177 unsigned short touch_y;
1178 };
1179 };
1180 union {
1185 void *usb_data; // 12-16 pointer that only shows up on USB insertion event.
1190 unsigned int scroll_wheel;
1191 };
1196 void *unk16; // 16-20 sometimes a pointer especially on unstable USB connection? junk data?
1202 void *unk20; // 20-24 seems to be always 0. Unused?
1206 unsigned short available_multipress_events; // 24-26
1210 unsigned short unk_0x1a; // 26-28
1215};
1216
1224 ui_event_t event; // 0x0:0x18
1228 int unk_0x18; // 0x18:0x1c
1229}; // 0x1c bytes
1230
1252 unsigned short state; // 0x8:0xa
1256 short unk_0xa; // 0xa:0xc
1265 void (*on_change_state)(ui_component_t *self, unsigned short mask, bool value); // 0x14:0x18
1270 void (*on_erase_bg)(ui_component_t *self); // 0x18:0x1c
1274 void (*on_draw)(ui_component_t *self); // 0x1c:0x20
1278 void (*on_event)(ui_component_t *self, ui_event_t *event); // 0x20:0x24
1282 void *unk_0x24; // 0x24:0x2a
1290 short unk_0x2a; // 0x2a:0x2c
1294 int unk_0x2c; // 0x2c:0x30
1298 unsigned short tag; // 0x30:0x32
1302 short unk_0x32; // 0x32:0x34
1303};
1304
1311#define RGB_FROM_U8(r, g, b) ((r & 0xff) << 16 | ((g & 0xff) << 8) | (b & 0xff))
1312
1313#ifdef __cplusplus
1314} // extern "C"
1315#endif
1316
1317#endif // __MUTEKI_UI_COMMON_H__
Common include file for all muteki-shims headers.
Native threading API.
Critical section descriptor structure.
Definition threading.h:203
The LCD descriptor.
Definition common.h:901
int rotation
Current canvas rotation.
Definition common.h:932
lcd_cursor_t * cursor
Cursor states.
Definition common.h:923
lcd_rotate_callback_t rotate
Rotation callback.
Definition common.h:948
short depth_bytes
Integer size of each pixel in bytes.
Definition common.h:938
ui_rect_t drawing_area
Usable drawing area of the LCD.
Definition common.h:919
lcd_draw_t draw
Per-LCD states shared by drawing routines.
Definition common.h:913
void * pixel_end
End address of the pixel/framebuffer.
Definition common.h:905
size_t pixel_size
Total size of the pixel/framebuffer in bytes.
Definition common.h:907
short width
Width of the LCD in pixels.
Definition common.h:925
int unk_0x74[3]
Unknown.
Definition common.h:921
short xsize
Pixel row size in bytes.
Definition common.h:943
int transparent_color
Current transparent color.
Definition common.h:911
lcd_font_t font
Per-LCD states shared by specifically font rendering routines.
Definition common.h:915
short height
Height of the LCD in pixels.
Definition common.h:927
lcd_surface_t * surface
Surface linked to the LCD.
Definition common.h:903
lcd_cursor_t saved_cursor
A copy of the cursor states when the LCD descriptor was created.
Definition common.h:917
int bg_color
Current background color.
Definition common.h:909
Cursor states usually linked to an LCD descriptor.
Definition common.h:772
short x
X coordinate of the cursor.
Definition common.h:774
short type
Type of the cursor.
Definition common.h:783
short unk_0xe
Unknown.
Definition common.h:789
short unk_0xa
Unknown.
Definition common.h:785
unsigned int size
Size of the cursor.
Definition common.h:778
short y
Y coordinate of the cursor.
Definition common.h:776
short grab_count
Number of times this cursor has been locked/grabbed by other code.
Definition common.h:787
Drawing routine common states.
Definition common.h:810
int unk_0x18
Unknown.
Definition common.h:826
unsigned int stroke_dash_pattern
Dash bit pattern.
Definition common.h:816
int unk_0x14
Unknown.
Definition common.h:824
int unk_0x0
Unknown.
Definition common.h:812
short stroke_size
Size of stroke.
Definition common.h:818
short stroke_dash
Predefined dash pattern.
Definition common.h:820
int unk_0x10
Unknown.
Definition common.h:822
int fg_color
Current foreground color.
Definition common.h:814
int unk_0x1c
Unknown.
Definition common.h:828
Font rendering routine common states.
Definition common.h:834
short unk_0xa
Unknown.
Definition common.h:855
short type
Font type.
Definition common.h:839
short unk_0xc
Unknown.
Definition common.h:860
short height
Height of the font.
Definition common.h:841
short unk_0x6
Unknown.
Definition common.h:848
short unk_0x4
Unknown.
Definition common.h:846
short unk_0x8
Unknown.
Definition common.h:850
An extended part of the LCD descriptor that implements descriptor locking.
Definition common.h:869
int unk_0x0
Unknown.
Definition common.h:871
void(* lock)(void)
Shortcut to lock the descriptor.
Definition common.h:875
int unk_0xa4[23]
Unknown.
Definition common.h:879
critical_section_t * cs
A critical section descriptor. It's unclear where it is used.
Definition common.h:873
void(* unlock)(void)
Shortcut to unlock the descriptor.
Definition common.h:877
Descriptor of an LCD drawing surface or hardware framebuffer.
Definition common.h:728
int * palette
Palette used to pack RGBA color into pixels.
Definition common.h:761
short xsize
Pixel row size in bytes (aka. pitch if you know SDL).
Definition common.h:751
char magic[2]
Header magic.
Definition common.h:733
short height
Height of the framebuffer.
Definition common.h:741
short depth
Depth of the color in bits.
Definition common.h:746
short encoding
Pixel buffer encoding.
Definition common.h:756
short width
Width of the framebuffer.
Definition common.h:737
void * buffer
The actual framebuffer/surface pixel buffer region.
Definition common.h:766
A thread-safe variant of the LCD descriptor used on some versions of Besta RTOS.
Definition common.h:955
ui_rect_t drawing_area
Usable drawing area of the LCD.
Definition common.h:973
void(* unlock)(void)
Shortcut to unlock the descriptor.
Definition common.h:1010
lcd_surface_t * surface
Surface linked to the LCD.
Definition common.h:957
int transparent_color
Current transparent color.
Definition common.h:965
int bg_color
Current background color.
Definition common.h:963
lcd_draw_t draw
Per-LCD states shared by drawing routines.
Definition common.h:967
int rotation
Current canvas rotation.
Definition common.h:986
lcd_font_t font
Per-LCD states shared by specifically font rendering routines.
Definition common.h:969
critical_section_t * cs
A critical section descriptor. It's unclear where it is used.
Definition common.h:1006
int unk_0xa4[23]
Unknown.
Definition common.h:1012
short depth_bytes
Integer size of each pixel in bytes.
Definition common.h:992
int unk_0x94
Unknown.
Definition common.h:1004
int unk_0x74[3]
Unknown.
Definition common.h:975
lcd_cursor_t * cursor
Cursor states.
Definition common.h:977
void(* lock)(void)
Shortcut to lock the descriptor.
Definition common.h:1008
short height
Height of the LCD in pixels.
Definition common.h:981
size_t pixel_size
Total size of the pixel/framebuffer in bytes.
Definition common.h:961
void * pixel_end
End address of the pixel/framebuffer.
Definition common.h:959
lcd_rotate_callback_t rotate
Rotation callback.
Definition common.h:1002
short width
Width of the LCD in pixels.
Definition common.h:979
lcd_cursor_t saved_cursor
A copy of the cursor states when the LCD descriptor was created.
Definition common.h:971
short xsize
Pixel row size in bytes.
Definition common.h:997
Common part of all widgets and views.
Definition common.h:1236
int unk_0x2c
Unknown.
Definition common.h:1294
ui_component_t * parent
Parent component.
Definition common.h:1247
short unk_0x28
Unknown.
Definition common.h:1286
void(* on_erase_bg)(ui_component_t *self)
Component callback for erasing background.
Definition common.h:1270
unsigned short tag
Definition common.h:1298
ui_rect_t footprint
Component visual footprint.
Definition common.h:1261
short unk_0x2a
Unknown. Set to 0x65 on buttons.
Definition common.h:1290
short unk_0x32
Unknown. Probably padding.
Definition common.h:1302
void(* on_change_state)(ui_component_t *self, unsigned short mask, bool value)
Component state change callback.
Definition common.h:1265
short unk_0xa
Unknown. Set to 1 on buttons and 0xfd01 on deskbox views.
Definition common.h:1256
void(* on_event)(ui_component_t *self, ui_event_t *event)
Component event callback.
Definition common.h:1278
void(* on_draw)(ui_component_t *self)
Component draw callback.
Definition common.h:1274
void * unk_0x24
Unknown. Used in MessageBox().
Definition common.h:1282
ui_component_t * next
Next component in a component ring or list.
Definition common.h:1242
unsigned short state
Component state bit field.
Definition common.h:1252
Structure for low level UI events.
Definition common.h:1066
unsigned short touch_x
The X coordinate of where the touch event is located, in pixels.
Definition common.h:1099
void * unk20
Unknown.
Definition common.h:1131
unsigned int scroll_wheel
Scroll wheel direction, either SCROLL_DOWN or SCROLL_UP.
Definition common.h:1118
unsigned short touch_y
The Y coordinate of where the touch event is located, in pixels.
Definition common.h:1105
unsigned short key_code0
Keycode for the first pressed key.
Definition common.h:1084
unsigned short key_code1
Keycode for the second pressed key.
Definition common.h:1091
int event_type
The type of event (0x10 being key event)
Definition common.h:1077
ui_component_t * recipient
Event recipient.
Definition common.h:1072
void * unk16
Unknown.
Definition common.h:1125
void * usb_data
Unknown.
Definition common.h:1113
Structure for low level UI events (Prime G1 extension).
Definition common.h:1138
ui_component_t * recipient
Event recipient.
Definition common.h:1144
unsigned short touch_x
The X coordinate of where the touch event is located, in pixels.
Definition common.h:1171
ui_multipress_event_t multipress_events[8]
The multipress events.
Definition common.h:1214
unsigned short touch_y
The Y coordinate of where the touch event is located, in pixels.
Definition common.h:1177
unsigned short key_code0
Keycode for the first pressed key.
Definition common.h:1156
void * unk16
Unknown.
Definition common.h:1196
void * usb_data
Unknown.
Definition common.h:1185
unsigned short unk_0x1a
Unknown. Sometimes can be 0x2 on startup.
Definition common.h:1210
int event_type
The type of event (0x10 being key event)
Definition common.h:1149
void * unk20
Unknown.
Definition common.h:1202
unsigned short available_multipress_events
Number of valid multipress events available for processing.
Definition common.h:1206
unsigned short key_code1
Keycode for the second pressed key.
Definition common.h:1163
unsigned int scroll_wheel
Scroll wheel direction, either SCROLL_DOWN or SCROLL_UP.
Definition common.h:1190
Event struct used by SendMessage().
Definition common.h:1220
int unk_0x18
Unknown.
Definition common.h:1228
ui_event_t event
The event struct.
Definition common.h:1224
Multipress/multitouch event.
Definition common.h:1020
unsigned short unk_0xb
Unknown. Maybe unused and probably padding.
Definition common.h:1059
unsigned short touch_x
The X coordinate of where the touch event is located, in pixels.
Definition common.h:1047
unsigned short finger_id
Finger ID of a touch event.
Definition common.h:1029
unsigned short key_code1
Keycode for the second pressed key (maybe unused).
Definition common.h:1039
unsigned short touch_y
The Y coordinate of where the touch event is located, in pixels.
Definition common.h:1053
unsigned short key_code0
Keycode for the first pressed key.
Definition common.h:1035
unsigned int type
Type of event.
Definition common.h:1025
Rectangle used to represent usable drawing area in an LCD descriptor.
Definition common.h:796
short x1
Definition common.h:802
short y0
Definition common.h:800
short y1
Definition common.h:804
short x0
Definition common.h:798
scroll_wheel_e
Scroll wheel direction.
Definition common.h:581
@ SCROLL_DOWN
Scroll down (clockwise direction).
Definition common.h:585
@ SCROLL_UP
Scroll up (counter-clockwise direction).
Definition common.h:589
print_flag_e
Process flags for string and character printing.
Definition common.h:25
@ PRINT_NONE
No extra process.
Definition common.h:29
@ PRINT_UNDERSCORE_ONLY
Draw underscores only.
Definition common.h:43
@ PRINT_INVERT_ALT
Seems to be an alternative version of PRINT_INVERT.
Definition common.h:38
@ PRINT_INVERT
Invert colors.
Definition common.h:34
stroke_predefined_dash_e
Predefined dash patterns.
Definition common.h:210
@ DASH_NONE
Solid line.
Definition common.h:214
@ DASH_CUSTOM
Custom dash pattern.
Definition common.h:234
blit_flag_e
Process flags for blit operations.
Definition common.h:90
@ BLIT_XOR
Perform XOR operation between source line and destination line.
Definition common.h:111
@ BLIT_OR
Perform OR operation between source line and destination line.
Definition common.h:106
@ BLIT_ALPHA_BLENDING
Perform alpha blending (when supported).
Definition common.h:122
@ BLIT_AND
Perform AND operation between source line and destination line.
Definition common.h:100
@ BLIT_TRANSPARENT
Honor transparent color settings on the current LCD canvas.
Definition common.h:117
@ BLIT_NONE
Nothing.
Definition common.h:95
@ BLIT_ALPHA_BLENDING_FAST
Perform alpha blending (when supported).
Definition common.h:129
print_str_flag_e
Process flags for string printing only.
Definition common.h:49
@ PRINT_STR_ENCODING_BIG5
Assume text encoding to be BIG5 instead of UTF-16.
Definition common.h:54
@ PRINT_STR_ENCODING_TIS_620
Assume text encoding to be TIS-620 instead of UTF-16.
Definition common.h:62
@ PRINT_STR_ENCODING_GB18030
Assume text encoding to be GB18030 instead of UTF-16.
Definition common.h:58
font_type_e
Font types.
Definition common.h:640
rotation_value_e
Rotation values used by lcd_rotate_callback_t.
Definition common.h:188
@ ROTATION_APPLY
Actually rotate the buffer. Used internally.
Definition common.h:200
@ ROTATION_TOP_SIDE_FACING_UP
Set the rotation so the top side of the canvas is facing up.
Definition common.h:190
@ ROTATION_TOP_SIDE_FACING_DOWN
Set the rotation so the top side of the canvas is facing down.
Definition common.h:194
@ ROTATION_TOP_SIDE_FACING_RIGHT
Set the rotation so the top side of the canvas is facing right.
Definition common.h:196
@ ROTATION_QUERY
Query the current rotation. Will not change the current location.
Definition common.h:198
@ ROTATION_TOP_SIDE_FACING_LEFT
Set the rotation so the top side of the canvas is facing left.
Definition common.h:192
int(* lcd_rotate_callback_t)(lcd_t *self, int rotation)
Callback type for handling canvas rotation.
Definition common.h:895
lcd_surface_pixfmt_e
Valid pixel formats for LCD surfaces.
Definition common.h:136
@ LCD_SURFACE_PIXFMT_L4
4-bit index color.
Definition common.h:144
@ LCD_SURFACE_PIXFMT_L1
1-bit index color.
Definition common.h:140
@ LCD_SURFACE_PIXFMT_RGB444
12-bit RGB444.
Definition common.h:152
@ LCD_SURFACE_PIXFMT_RGB565
16-bit RGB565.
Definition common.h:156
@ LCD_SURFACE_PIXFMT_L8
8-bit index color.
Definition common.h:148
@ LCD_SURFACE_PIXFMT_RGB
24-bit RGB.
Definition common.h:160
@ LCD_SURFACE_PIXFMT_XRGB
32-bit XRGB.
Definition common.h:164
@ LCD_SURFACE_PIXFMT_ARGB
32-bit ARGB (alias of LCD_SURFACE_PIXFMT_XRGB).
Definition common.h:168
lcd_surface_encoding_e
Valid pixel buffer encoding for LCD surfaces.
Definition common.h:174
@ LCD_SURFACE_ENCODING_RAW
Pixel buffer is in raw format.
Definition common.h:182
@ LCD_SURFACE_ENCODING_HCA
Pixel buffer is contained in HCA container.
Definition common.h:178
ui_event_type_e
UI event types.
Definition common.h:595
@ UI_EVENT_TYPE_TOUCH_MOVE
Touch/pen move event.
Definition common.h:607
@ UI_EVENT_TYPE_TOUCH_END
End of touch/pen up event.
Definition common.h:611
@ UI_EVENT_TYPE_INVALID
Invalid/cleared.
Definition common.h:599
@ UI_EVENT_TYPE_TOUCH_BEGIN
Beginning of touch/pen down event.
Definition common.h:603
@ UI_EVENT_TYPE_KEY
Key(s) pressed.
Definition common.h:615
@ UI_EVENT_TYPE_KEY_UP
Key(s) released.
Definition common.h:620
keycode_e
List of available keycodes.
Definition common.h:241
@ KEY_MENU
Bring up the function menu of the current scene.
Definition common.h:258
@ KEY_BACKLIGHT
Open the Backlight adjustment menu.
Definition common.h:535
@ KEY_APP_DICT_ZH_EN_BESTA
Launch Besta Chinese-English dictionary.
Definition common.h:505
@ KEY_APP_MISC_3
Board-specific app launching shortcut.
Definition common.h:408
@ KEY_SYMBOL
Activate the symbol selection input method.
Definition common.h:361
@ KEY_APP_DICT_EN_LONGMAN
Launch Longman dictionary.
Definition common.h:450
@ KEY_APP_TRANSLATOR_ZH_EN
Open the Chinese to English translator app.
Definition common.h:496
@ KEY_HOME_MENU
Return to home menu.
Definition common.h:370
@ KEY_APP_DICT_JA_ZH_BESTA
Launch Besta Japanese-Chinese dictionary.
Definition common.h:509
@ KEY_PRIME_MENU
The MENU key on HP Prime.
Definition common.h:375
@ KEY_APP_DICT_JA_DAJIRIN
Launch Daijirin Japanese dictionary.
Definition common.h:422
@ KEY_APP_DICT_EN_PRO
Launch Besta professional vocabulary dictionary.
Definition common.h:500
@ KEY_FONT
Change font size.
Definition common.h:267
@ KEY_TTS
Trigger TTS.
Definition common.h:571
@ KEY_AUX_MENU
Open the global auxilary menu on touchscreen-only devices.
Definition common.h:488
@ KEY_VOL_BACKLIGHT
Open the Volume + Backlight adjustment menu.
Definition common.h:395
@ KEY_SCROLL_WHEEL_EVENT
Scroll wheel event.
Definition common.h:566
@ KEY_APP_MP3_PLAYER
Launch MP3 player.
Definition common.h:391
@ KEY_SYLLABLE
Dictionary: Pronounce the current word syllable-by-syllable.
Definition common.h:399
@ KEY_REPEAT
Dictionary: Repeatedly read out the current word.
Definition common.h:560
@ KEY_APP_DICT_EN_OXFORD
Launch Oxford dictionary.
Definition common.h:518
@ KEY_SEARCH
Launch the unified search app.
Definition common.h:530
@ KEY_APP_MISC_7
Board-specific app launching shortcut.
Definition common.h:445
@ KEY_APP_MISC_6
Board-specific app launching shortcut.
Definition common.h:431
@ KEY_APP_GAMES
Launch the Games app.
Definition common.h:427
@ KEY_APP_REC
Launch voice recorder.
Definition common.h:347
@ KEY_LANG_YUE
Trigger TTS in Cantonese.
Definition common.h:330
@ KEY_COMPARE
Dictionary: Parrot the current word and compare the pronunciations.
Definition common.h:539
@ KEY_APP_TRANSLATOR_EN_ZH
Open the English to Chinese translator app.
Definition common.h:492
@ KEY_POWER
Power button event.
Definition common.h:338
@ KEY_IME
Switch input method.
Definition common.h:352
@ KEY_LANG_CHN
Trigger TTS in Mandarain Chinese.
Definition common.h:326
@ KEY_APP_MISC_8
Board-specific app launching shortcut.
Definition common.h:459
@ KEY_APP_MISC_5
Board-specific app launching shortcut.
Definition common.h:417
@ KEY_TOGGLE_SC_TC
Toggle simplified/traditional Chinese.
Definition common.h:379
@ KEY_BATTERY
Display battery indicator popup.
Definition common.h:548
@ KEY_LANG_JPN
Trigger TTS in Japanese.
Definition common.h:356
@ KEY_LANG_ENG
Trigger TTS in English.
Definition common.h:334
@ KEY_APP_DICT_EN_ZH_BESTA
Launch Besta English-Chinese dictionary.
Definition common.h:522
@ KEY_APP_DICT_EN_JA_GENIUS
Launch Genius English-Japanese dictionary.
Definition common.h:464
@ KEY_ORIGINAL_INPUT
Dictionary and search: Go back to the first screen the user initiated a search (with input memorized)...
Definition common.h:403
@ KEY_APP_ALBUM
Launch the album app.
Definition common.h:441
@ KEY_APP_DICT_JA_EN_GENIUS
Launch Genius Japanese-English dictionary.
Definition common.h:455
@ KEY_APP_DICT_JA_SHINMEIKAI
Launch Shin-Meikai Japanese dictionary.
Definition common.h:436
@ KEY_HOME
Return to home menu.
Definition common.h:365
@ KEY_HELP
Show in-app help.
Definition common.h:383
@ KEY_FUNC_MENU
Bring up the function menu of the current scene.
Definition common.h:263
@ KEY_CONTRAST
Open LCD backlight and contrast adjustment menu.
Definition common.h:552
@ KEY_VOL
Open the Volume adjustment menu.
Definition common.h:544
@ KEY_APP_VIDEO_PLAYER
Launch video player app.
Definition common.h:484
@ KEY_FAV
Show the Favorites menu.
Definition common.h:479
@ KEY_USB_INSERTION
Event on USB cable insertion.
Definition common.h:556
@ KEY_EDIT
Show the edit menu (cut/copy/paste).
Definition common.h:526
@ KEY_APP_FLASHCARD
Launch the flashcard app.
Definition common.h:413
@ KEY_APP_DICT_ZH_JA_BESTA
Launch Besta Chinese-Japanese dictionary.
Definition common.h:513
@ KEY_SAVE
Save current change and exit.
Definition common.h:387
str_align_e
String alignment types.
Definition common.h:68
@ STR_ALIGN_CENTER
Align to top-center.
Definition common.h:80
@ STR_ALIGN_LEFT
Align to top-left.
Definition common.h:72
@ STR_ALIGN_RIGHT
Align to top-right.
Definition common.h:76