|
SWILIB API (NSG)
|
GUI-related stuff.
Usage: #include <swilib.h> or #include <swilib/gui.h>
Data Structures | |
| struct | DRWOBJ |
| Drawing object. More... | |
| struct | RECT |
| Rectangle region. More... | |
| struct | GUI_MSG |
| GUI GBS message for onKey callback. More... | |
| struct | GUI_METHODS |
| GUI callbacks. More... | |
| struct | GUI_RAM |
| GUI RAM representation. More... | |
| struct | GUI |
| GUI description and state. More... | |
| struct | LCDLAYER |
| LCD drawing layer. More... | |
| struct | LCDLAYER_LIST |
| LCD drawing layer container. More... | |
| struct | RAP_LCDLAYER_LIST |
| LCD drawing layer container (RAP). More... | |
Typedefs | |
| typedef struct RECT | RECT |
| typedef struct GUI | GUI |
| typedef struct GUI | WIDGET |
| typedef struct GUI_RAM | GUI_RAM |
| typedef struct GUI_MSG | GUI_MSG |
| typedef struct GUI_METHODS | GUI_METHODS |
| typedef struct DRWOBJ | DRWOBJ |
| typedef struct LCDLAYER | LCDLAYER |
| typedef struct LCDLAYER_LIST | LCDLAYER_LIST |
| typedef struct RAP_LCDLAYER_LIST | RAP_LCDLAYER_LIST |
| typedef int(* | KeybMsgHookProc) (int submsg, int msg) |
| typedef void(* | GUI_TimerProc) (void *gui) |
Information functions | |
| int | ScreenW (void) |
| Phone screen width. | |
| int | ScreenH (void) |
| Phone screen height. | |
| int | HeaderH (void) |
| Header height (iconbar). | |
| int | SoftkeyH (void) |
| Softkeys height. | |
| char * | RamPressedKey () |
| Pointer to the last pressed key. | |
| void * | RamScreenBuffer () |
| Pointer to the current LCD buffer. | |
Color utils | |
| char * | GetPaletteAdrByColorIndex (int index) |
| Get color from the phone theme. | |
| void | getRGBcolor (int index, void *color) |
| Get color from the phone theme. | |
| void | getRGBbyPaletteAdr (const void *src_color, void *dst_color) |
| Copy color from the theme palette. | |
| void | setColor (int a, int r, int g, int b, void *dst) |
| Initialize color by individual values. | |
| int | RscMgr_CsSetColor (int id, const uint8_t *color) |
| Set a color for a theme color scheme element. | |
| void | RscMgr_CsUpdate () |
| Update all theme colors. | |
RECT utils | |
| void | StoreXYWHtoRECT (RECT *rect, int x, int y, int w, int h) |
| Initialize RECT by coordinates and size. | |
| void | StoreXYXYtoRECT (RECT *rect, int x, int y, int x2, int y2) |
| Initialize RECT by two points. | |
General GUI functions | |
| int | IsGuiOnTop (int id) |
| Check if the GUI is in focus on the screen. | |
| int | GetCurGuiID () |
| Get current focused GUI. | |
| int | CreateGUI (void *gui) |
| Create new GUI. | |
| int | CreateGUI_ID (void *gui, int id) |
| Create new GUI with specified ID. | |
| int | CreateGUI_30or2 (void *gui) |
| Create new GUI. | |
| int | CreateGUIWithDummyCSM (void *gui, int flag) |
| Create new GUI with dummy CSM. | |
| int | CreateGUIWithDummyCSM_30or2 (void *gui, int flag) |
| Create new GUI with dummy CSM. | |
| void | GeneralFuncF1 (int cmd) |
| Request closing of the focused GUI. | |
| void | GeneralFuncF0 (int cmd) |
| Unknown function. | |
| void | GeneralFunc_flag1 (int id, int cmd) |
| Request closing of the GUI with given ID. | |
| void | GeneralFunc_flag0 (int id, int cmd) |
| Unknown function. | |
| GUI * | GetTopGUI (void) |
| Get pointer to the currently focused GUI. | |
| void * | FindGUIbyId (int id, CSM_RAM **csm) |
| Find GUI by ID. | |
| void | FocusGUI (int id) |
| Focus GUI by ID. | |
| void | UnfocusGUI (void) |
| Unfocus focused GUI. | |
Redrawing | |
| void | REDRAW (void) |
| Request redraw of the GUI. | |
| void | DirectRedrawGUI (void) |
| Immediate redraw the GUI. | |
| void | DirectRedrawGUI_ID (int id) |
| Immediate redraw the GUI (by ID). | |
| void | PendedRedrawGUI (void) |
| Request redraw of the GUI. | |
Global keyhook | |
| void | AddKeybMsgHook (KeybMsgHookProc callback) |
| Add global keyhook to the beginning of the list. | |
| int | AddKeybMsgHook_end (KeybMsgHookProc callback) |
| Add global keyhook to the end of the list. | |
| void | RemoveKeybMsgHook (KeybMsgHookProc callback) |
| Remove global keyhook from the list. | |
Fonts | |
| int | GetFontYSIZE (int font_id) |
| Get a char height in the specified font. | |
| int | GetSymbolWidth (int character, int font_id) |
| Get a char width in the specified font. | |
| int | Get_WS_width (const WSHDR *text, int font_id) |
| Measure string width with the specified font. | |
| void | Get_WS_extent (WSHDR *ws, int text_flags, int flags, int font_id, int *w, int *h) |
| Get the size of a rendered string. | |
Painting | |
| void | DrawIMGHDR (int x, int y, const IMGHDR *img) |
| Draw image. | |
| void | DrawCroppedIMGHDR (int x, int y, int offset_x, int offset_y, int w, int h, int flags, const IMGHDR *img) |
| Draw cropped image. | |
| void | DrawImg (int x, int y, int picture) |
| Draw image from the PIT table. | |
| void | DrawImgBW (int x, int y, int picture, const char *pen, const char *brush) |
| Draw BW image from the PIT table. | |
| void | DrawPixel (int x, int y, const char *color) |
| Draw single pixel. | |
| void | DrawTriangle (int x1, int y1, int x2, int y2, int x3, int y3, int flags, const char *pen, const char *brush) |
| Draw a triangle polygon. | |
| void | DrawArc (int x1, int y1, int x2, int y2, int start_angle, int end_start, int flags, const char *pen, const char *brush) |
| Draw an arc or pie. | |
| void | DrawLine (int x1, int y1, int x2, int y2, int flags, const char *pen) |
| Draw a single line between two points. | |
| void | DrawRectangle (int x1, int y1, int x2, int y2, int flags, const char *pen, const char *brush) |
| Draw a rectangle. | |
| void | DrawRoundedFrame (int x1, int y1, int x2, int y2, int x_round, int y_round, int flags, const char *pen, const char *brush) |
| Draw a rounded rectangle. | |
| void | DrawString (WSHDR *text, int x1, int y1, int x2, int y2, int font, int text_flags, const char *pen, const char *brush) |
| Draw a multi-line string. | |
| void | DrawScrollString (WSHDR *text, int x1, int y1, int x2, int y2, int xdisp, int font, int text_flags, const char *pen, const char *brush) |
| Draw a one-line string with optional x-scrolling offset. | |
| void * | BuildCanvas (void) |
| Build "Canvas" with IDLE Wallpaper. | |
| void | DrawCanvas (void *data, int x, int y, int x2, int y2, int flag_one) |
| "Canvas" is a really meaning for standard UI background. | |
| void | DrawObject (DRWOBJ *drwobj) |
| Draw DRWOBJ to the screen buffer. | |
DrwObj | |
Low-level drawing framework. Use this function for constructing objects which can be drawn with DrawObject. | |
| void | DrwObj_InitRect (DRWOBJ *drwobj, const RECT *rect, int flags) |
| Init DRWOBJ which draw rectangle. | |
| void | DrwObj_InitRectEx (DRWOBJ *drwobj, const RECT *rect, int flags, int fill_type, int fill_pattern) |
| Init DRWOBJ which draw rectangle with custom filling. | |
| void | DrwObj_InitText (DRWOBJ *drwobj, const RECT *rect, int flags, const WSHDR *text, int font, int text_flags) |
| Init DRWOBJ which draw text. | |
| void | DrwObj_InitImage (DRWOBJ *drwobj, const RECT *rect, int flags, const IMGHDR *img) |
| Init DRWOBJ which draw image. | |
| void | DrwObj_InitTiledImage (DRWOBJ *drwobj, const RECT *rect, int flags, const IMGHDR *img, int offset_x, int offset_y) |
| Init DRWOBJ which draw tiled image. | |
| void | DrwObj_InitTiledImageEx (DRWOBJ *drwobj, const RECT *rect, int flags, const EIMGHDR *img, int offset_x, int offset_y) |
| Init DRWOBJ which draw tiled image (without 255x255 limit). | |
| void | DrwObj_SetColor (DRWOBJ *drwobj, const char *pen, const char *brush) |
| Set color to the DRWOBJ. | |
| void | DrwObj_GetWH (DRWOBJ *drwobj, int *w, int *h) |
| Get WxH of the draw object. | |
| void | DrwObj_Free (DRWOBJ *drwobj) |
| Free draw object internal resources. | |
GUI timers | |
| int | GUI_NewTimer (void *gui) |
| Create new GUI timer. | |
| int | GUI_DeleteTimer (void *gui, int id) |
| Delete GUI timer. | |
| void | GUI_StartTimerProc (void *gui, int id, long timeout, GUI_TimerProc callback) |
| Schedule GUI timer. | |
LCD layers | |
| LCDLAYER * | LCD_GetCurrentLayer () |
| Get an LCD layer which is associated with the current CEPID. | |
| void | LCD_SetDrawingRegion (int x, int y, int x2, int y2) |
| Limit drawing region on current LCDLAYER (selected by current CEPID). | |
| void | LCD_SetBufferDepth (char depth) |
| Set LCDLAYER buffer depth on current LCDLAYER (selected by current CEPID). | |
| void | LCDLAYER_SetBufferDepth (LCDLAYER *layer, char depth) |
| Set LCDLAYER buffer depth. | |
| void | LCDLAYER_Redraw (LCDLAYER *layer) |
| Request redrawing of the given LCDLAYER (delayed). | |
| void | LCDLAYER_Flush (LCDLAYER *layer) |
| Do redrawing of the given LCDLAYER (immediate). | |
| void | DrawObject2Layer (LCDLAYER *layer, DRWOBJ *drwobj) |
| Push DRWOBJ to the given LCDLAYER (with redraw!) | |
| int | PushDRWOBJOnLAYER (DRWOBJ *drwobj, LCDLAYER *layer) |
| Push DRWOBJ to the given LCDLAYER (without redraw!) | |
| LCDLAYER_LIST * | RamLcdMainLayersList () |
| Pointer to the list of the LCDLAYER's (main). | |
| RAP_LCDLAYER_LIST * | RamLcdRapLayersList () |
| Pointer to the list of the LCDLAYER's (RAP). | |
| LCDLAYER * | Ram_LCD_Overlay_Layer () |
| Overlay layer of the display. | |
Deprecated | |
| void | SetPixel (int x, int y, const char *color) |
| Draw single pixel. | |
| void | fillTriangle (int x1, int y1, int x2, int y2, int x3, int y3, int flags, const char *pen, const char *brush) |
| Draw a triangle polygon. | |
| void | drawArc (int x1, int y1, int x2, int y2, int start_angle, int end_start, int flags, const char *pen, const char *brush) |
| Draw an arc or pie. | |
| void | SetPropTo_Obj5 (DRWOBJ *drwobj, const RECT *rect, int flags, const IMGHDR *img) |
| Init DRWOBJ which draw image. | |
| void | SetPropTo_Obj1 (DRWOBJ *drwobj, const RECT *rect, int flags, const WSHDR *text, int font, int text_flags) |
| Init DRWOBJ which draw text. | |
| void | SetProp2ImageOrCanvas (DRWOBJ *drwobj, const RECT *rect, int flags, const IMGHDR *img, int offset_x, int offset_y) |
| Init DRWOBJ which draw tiled image. | |
| void | SetPropTo_obj0x17 (DRWOBJ *drwobj, const RECT *rect, int flags, const EIMGHDR *img, int offset_x, int offset_y) |
| Init DRWOBJ which draw tiled image (without 255x255 limit). | |
| void | SetProp2Square_v1 (DRWOBJ *drwobj, const RECT *rect, int flags, int fill_type, int fill_pattern) |
| Init DRWOBJ which draw rectangle with custom filling. | |
| void | SetColor (DRWOBJ *drwobj, const char *pen, const char *brush) |
| Set color to the DRWOBJ. | |
| void | Get_Obj1_WH (DRWOBJ *drwobj, int *w, int *h) |
| Get WxH of the draw object. | |
| void | FreeDrawObject_subobj (DRWOBJ *drwobj) |
| Free draw object internal resources. | |
| void | SetDepthBufferOnLCDLAYER (LCDLAYER *layer, char depth) |
| Set LCDLAYER buffer depth. | |
| LCDLAYER * | GetLCDLAYERByCurCepID () |
| Get an LCD layer which is associated with the current CEPID. | |
| void | LCDRedrawLAYER (LCDLAYER *layer) |
| Request redrawing of the given LCDLAYER (delayed). | |
| void | SetDrawingCanvas (int x, int y, int x2, int y2) |
| Limit drawing region on current LCDLAYER (selected by current CEPID). | |
| struct DRWOBJ |
| struct RECT |
| struct GUI_MSG |
| struct GUI_METHODS |
| struct GUI_RAM |
| struct GUI |
| struct LCDLAYER |
| struct LCDLAYER_LIST |
| struct RAP_LCDLAYER_LIST |
| enum ThemePeletteColorID |
Colors indexes in the .col.
| enum SystemFontID |
Font IDs.
| enum UnicodeControlChars |
UTF-16 control chars for DrawString, DrawScrollString and standart UI.
| enum TextAttributesFlags |
Flags for the DrawString and DrawScrollString.
| Enumerator | |
|---|---|
| TEXT_ALIGNLEFT | Text align: LEFT. |
| TEXT_ALIGNMIDDLE | Text align: CENTER. |
| TEXT_ALIGNRIGHT | Text align: RIGHT. |
| TEXT_UNDERLINE | Underline text. |
| TEXT_INVERT | Invert color and background of the text. |
| TEXT_OUTLINE | Add an outline to each character in the text. |
| TEXT_PASSWORD | Replace all character to the |
| TEXT_NOFORMAT | Disable text formatting using UnicodeControlChars. |
| TEXT_INVERT2 | Invert color and background of the text. |
| enum LineDrawingFlags |
| enum RectDrawingFlags |
Flags for the DrawRectangle and others.
| Enumerator | |
|---|---|
| RECT_DOT_OUTLINE | Border is dotted. |
| RECT_FILL_WITH_PEN | File rectangle with the same color as the border. |
| RECT_DRAW_INVERT | Invert previously painted content in area within the rectangle. |
| enum DrwObjRectFillTypeID |
| enum LcdLayerDepth |
| enum GbsKeyEventID |
| enum GbsKeyCodeID |
Key scancodes (onKey).
Keypad buttons passed '*', '#', '0'-'9' as charcode.
| enum KeyHookReturnCode |
Return codes for global KeyHook.
| enum CsmGuiState |
| int ScreenW | ( | void | ) |
Phone screen width.
| int ScreenH | ( | void | ) |
Phone screen height.
| int HeaderH | ( | void | ) |
Header height (iconbar).
| int SoftkeyH | ( | void | ) |
Softkeys height.
| char * RamPressedKey | ( | ) |
Pointer to the last pressed key.
| void * RamScreenBuffer | ( | ) |
Pointer to the current LCD buffer.
Useful for screenshots, but not for direct rendering.
| char * GetPaletteAdrByColorIndex | ( | int | index | ) |
Get color from the phone theme.
| index | color index in .col, see ThemePeletteColorID |
| void getRGBcolor | ( | int | index, |
| void * | color ) |
Get color from the phone theme.
| index | color index in .col, see ThemePeletteColorID | |
| [out] | color | pointer to the char[4] array for RGBA |
| void getRGBbyPaletteAdr | ( | const void * | src_color, |
| void * | dst_color ) |
Copy color from the theme palette.
| src_color | color returned by GetPaletteAdrByColorIndex | |
| [out] | dst_color | pointer to the char[4] array for RGBA |
| void setColor | ( | int | a, |
| int | r, | ||
| int | g, | ||
| int | b, | ||
| void * | dst ) |
Initialize color by individual values.
| a | alpha channel 0-100 |
| r,g,b | colors 0-255 |
| dst | pointer to the char[4] array for RGBA |
| int RscMgr_CsSetColor | ( | int | id, |
| const uint8_t * | color ) |
Set a color for a theme color scheme element.
| id | color element ID, calculated as (ThemePeletteColorID - 100) |
| color | pointer to a 4‑byte RGBA array (RR, GG, BB, AA) |
| void RscMgr_CsUpdate | ( | ) |
Update all theme colors.
After one or more calls to RscMgr_CsSetColor, call this function to make the new colors take effect immediately.
| void StoreXYWHtoRECT | ( | RECT * | rect, |
| int | x, | ||
| int | y, | ||
| int | w, | ||
| int | h ) |
Initialize RECT by coordinates and size.
| rect | pointer to the rect |
| x,y | rect coordinates |
| w,h | rect size |
| void StoreXYXYtoRECT | ( | RECT * | rect, |
| int | x, | ||
| int | y, | ||
| int | x2, | ||
| int | y2 ) |
Initialize RECT by two points.
| rect | pointer to the rect |
| x,y | 1-st point: top + left |
| x2,y2 | 2-nd point: bottom + right |
| int IsGuiOnTop | ( | int | id | ) |
| int CreateGUI | ( | void * | gui | ) |
| int CreateGUI_ID | ( | void * | gui, |
| int | id ) |
| int CreateGUI_30or2 | ( | void * | gui | ) |
| int CreateGUIWithDummyCSM | ( | void * | gui, |
| int | flag ) |
| int CreateGUIWithDummyCSM_30or2 | ( | void * | gui, |
| int | flag ) |
Create new GUI with dummy CSM.
| gui | pointer to the GUI description. |
| flag | unknown |
The difference between CreateGUIWithDummyCSM is unknown.
| void GeneralFuncF1 | ( | int | cmd | ) |
Request closing of the focused GUI.
| cmd | code which bypassed the MSG_GUI_DESTROYED event |
| void GeneralFuncF0 | ( | int | cmd | ) |
Unknown function.
| cmd | unknown |
| void GeneralFunc_flag1 | ( | int | id, |
| int | cmd ) |
Request closing of the GUI with given ID.
| id | GUI ID |
| cmd | code which bypassed the MSG_GUI_DESTROYED event |
| void GeneralFunc_flag0 | ( | int | id, |
| int | cmd ) |
Unknown function.
| id | GUI ID |
| cmd | unknown |
| void * FindGUIbyId | ( | int | id, |
| CSM_RAM ** | csm ) |
| void UnfocusGUI | ( | void | ) |
Unfocus focused GUI.
| void REDRAW | ( | void | ) |
Request redraw of the GUI.
| void DirectRedrawGUI | ( | void | ) |
Immediate redraw the GUI.
| void DirectRedrawGUI_ID | ( | int | id | ) |
| void PendedRedrawGUI | ( | void | ) |
Request redraw of the GUI.
| void AddKeybMsgHook | ( | KeybMsgHookProc | callback | ) |
Add global keyhook to the beginning of the list.
| callback | int callback(int submsg, int msg) |
| int AddKeybMsgHook_end | ( | KeybMsgHookProc | callback | ) |
Add global keyhook to the end of the list.
| callback | int callback(int submsg, int msg) |
| void RemoveKeybMsgHook | ( | KeybMsgHookProc | callback | ) |
Remove global keyhook from the list.
| callback | int callback(int submsg, int msg) |
| int GetFontYSIZE | ( | int | font_id | ) |
| int GetSymbolWidth | ( | int | character, |
| int | font_id ) |
Get a char width in the specified font.
| character | UTF-16 codepoint |
| font_id | see SystemFontID |
Measure string width with the specified font.
| text | text to be measured |
| font_id | see SystemFontID |
| void Get_WS_extent | ( | WSHDR * | ws, |
| int | text_flags, | ||
| int | flags, | ||
| int | font_id, | ||
| int * | w, | ||
| int * | h ) |
Get the size of a rendered string.
The input values of w and h specify the maximum available width/height. On return, they are replaced with the actual width/height needed to render the string.
| ws | text to be measured |
| text_flags | text attributes bitmask, see TextAttributesFlags |
| flags | drawing flags |
| font_id | see SystemFontID |
| w | pointer to int: input = max width, output = actual width |
| h | pointer to int: input = max height, output = actual height |
Draw image.
| x,y | image coordinates |
| img | pointer to the IMGHDR |
| void DrawCroppedIMGHDR | ( | int | x, |
| int | y, | ||
| int | offset_x, | ||
| int | offset_y, | ||
| int | w, | ||
| int | h, | ||
| int | flags, | ||
| const IMGHDR * | img ) |
Draw cropped image.
| x,y | coordinates |
| offset_x,offset_y | offsets |
| w | width |
| h | height |
| flags | drawing flags |
| img | pointer to the IMGHDR |
| void DrawImg | ( | int | x, |
| int | y, | ||
| int | picture ) |
Draw image from the PIT table.
| x,y | image coordinates |
| picture | image number |
Draw BW image from the PIT table.
| x,y | image coordinates |
| picture | image number |
| pen | replace black color or NULL |
| brush | replace white color or NULL |
| void DrawPixel | ( | int | x, |
| int | y, | ||
| const char * | color ) |
Draw single pixel.
| x,y | coordinates |
| color | pixel color |
| void DrawTriangle | ( | int | x1, |
| int | y1, | ||
| int | x2, | ||
| int | y2, | ||
| int | x3, | ||
| int | y3, | ||
| int | flags, | ||
| const char * | pen, | ||
| const char * | brush ) |
Draw a triangle polygon.
| x1,y1 | 1st point of the triangle |
| x2,y2 | 2nd point of the triangle |
| x3,y3 | 3rd point of the triangle |
| flags | drawing flags, see RectDrawingFlags |
| pen | stroke color |
| brush | fill color |
| void DrawArc | ( | int | x1, |
| int | y1, | ||
| int | x2, | ||
| int | y2, | ||
| int | start_angle, | ||
| int | end_start, | ||
| int | flags, | ||
| const char * | pen, | ||
| const char * | brush ) |
Draw an arc or pie.
| x1,y1 | left+top coordinates |
| x2,y2 | right+bottom coordinates |
| start_angle | start angle of pie or arc |
| end_start | end angle of pie or arc |
| flags | drawing flags, see RectDrawingFlags |
| pen | stroke color |
| brush | fill color |
| void DrawLine | ( | int | x1, |
| int | y1, | ||
| int | x2, | ||
| int | y2, | ||
| int | flags, | ||
| const char * | pen ) |
Draw a single line between two points.
| x1,y1 | 1-st point coordinates |
| x2,y2 | 2-nd point coordinates |
| flags | drawing flags bitmask, see LineDrawingFlags |
| pen | stroke color |
| void DrawRectangle | ( | int | x1, |
| int | y1, | ||
| int | x2, | ||
| int | y2, | ||
| int | flags, | ||
| const char * | pen, | ||
| const char * | brush ) |
Draw a rectangle.
| x1,y1 | left+top coordinates |
| x2,y2 | right+bottom coordinates |
| flags | drawing flags bitmask, see RectDrawingFlags |
| pen | stroke color |
| brush | fill color |
| void DrawRoundedFrame | ( | int | x1, |
| int | y1, | ||
| int | x2, | ||
| int | y2, | ||
| int | x_round, | ||
| int | y_round, | ||
| int | flags, | ||
| const char * | pen, | ||
| const char * | brush ) |
Draw a rounded rectangle.
| x1,y1 | left+top coordinates |
| x2,y2 | right+bottom coordinates |
| x_round | horizontal round |
| y_round | vertical round |
| flags | drawing flags bitmask, see RectDrawingFlags |
| pen | stroke color |
| brush | fill color |
| void DrawString | ( | WSHDR * | text, |
| int | x1, | ||
| int | y1, | ||
| int | x2, | ||
| int | y2, | ||
| int | font, | ||
| int | text_flags, | ||
| const char * | pen, | ||
| const char * | brush ) |
Draw a multi-line string.
You can use UnicodeControlChars for custom formatting of the text.
| text | UTF-16 text of the string |
| x1,y1 | left+top coordinates |
| x2,y2 | right+bottom coordinates |
| font | font ID, see SystemFontID |
| text_flags | text attributes bitmask, see TextAttributesFlags |
| pen | stroke color |
| brush | fill color |
| void DrawScrollString | ( | WSHDR * | text, |
| int | x1, | ||
| int | y1, | ||
| int | x2, | ||
| int | y2, | ||
| int | xdisp, | ||
| int | font, | ||
| int | text_flags, | ||
| const char * | pen, | ||
| const char * | brush ) |
Draw a one-line string with optional x-scrolling offset.
You can use UnicodeControlChars for custom formatting of the text.
| text | UTF-16 text of the string |
| x1,y1 | left+top coordinates |
| x2,y2 | right+bottom coordinates |
| xdisp | horizontal scrolling offset + 1 |
| font | font ID, see SystemFontID |
| text_flags | text attributes bitmask, see TextAttributesFlags |
| pen | stroke color |
| brush | fill color |
| void * BuildCanvas | ( | void | ) |
Build "Canvas" with IDLE Wallpaper.
"Canvas" is a really meaning for standard UI background.
| void DrawCanvas | ( | void * | data, |
| int | x, | ||
| int | y, | ||
| int | x2, | ||
| int | y2, | ||
| int | flag_one ) |
"Canvas" is a really meaning for standard UI background.
This function can draw any part of this "canvas".
| data | pointer to the canvas created by BuildCanvas |
| x,y,x2,y2 | region for pain |
| flag_one | unknown, set to 1 |
Init DRWOBJ which draw rectangle.
| drwobj | draw object |
| rect | area on the screen |
| flags | drawing flags |
| void DrwObj_InitRectEx | ( | DRWOBJ * | drwobj, |
| const RECT * | rect, | ||
| int | flags, | ||
| int | fill_type, | ||
| int | fill_pattern ) |
Init DRWOBJ which draw rectangle with custom filling.
| drwobj | draw object |
| rect | area on the screen |
| flags | drawing flags |
| fill_type | filling type, see DrwObjRectFillTypeID |
| fill_pattern | bit pattern, for example: 0b10101010 |
| void DrwObj_InitText | ( | DRWOBJ * | drwobj, |
| const RECT * | rect, | ||
| int | flags, | ||
| const WSHDR * | text, | ||
| int | font, | ||
| int | text_flags ) |
Init DRWOBJ which draw text.
| drwobj | draw object |
| rect | area on the screen |
| flags | drawing flags |
| text | UTF-16 text of the string |
| font | font ID, see SystemFontID |
| text_flags | drawing flags bitmask, see TextAttributesFlags |
Init DRWOBJ which draw image.
| drwobj | draw object |
| rect | area on the screen |
| flags | image drawing flags |
| img | pointer to the image |
Set color to the DRWOBJ.
| drwobj | draw object |
| pen | stroke color |
| brush | fill color |
| void DrwObj_GetWH | ( | DRWOBJ * | drwobj, |
| int * | w, | ||
| int * | h ) |
Get WxH of the draw object.
| drwobj | draw object | |
| [out] | w | width |
| [out] | h | height |
| void DrwObj_Free | ( | DRWOBJ * | drwobj | ) |
Free draw object internal resources.
| drwobj | draw object |
| int GUI_NewTimer | ( | void * | gui | ) |
| int GUI_DeleteTimer | ( | void * | gui, |
| int | id ) |
| void GUI_StartTimerProc | ( | void * | gui, |
| int | id, | ||
| long | timeout, | ||
| GUI_TimerProc | callback ) |
| LCDLAYER * LCD_GetCurrentLayer | ( | ) |
Get an LCD layer which is associated with the current CEPID.
| void LCD_SetDrawingRegion | ( | int | x, |
| int | y, | ||
| int | x2, | ||
| int | y2 ) |
Limit drawing region on current LCDLAYER (selected by current CEPID).
| x,y,x2,y2 | drawing region |
| void LCD_SetBufferDepth | ( | char | depth | ) |
Set LCDLAYER buffer depth on current LCDLAYER (selected by current CEPID).
| depth | buffer depth, see LcdLayerDepth |
| void LCDLAYER_SetBufferDepth | ( | LCDLAYER * | layer, |
| char | depth ) |
Set LCDLAYER buffer depth.
| layer | pointer to the LCDLAYER |
| depth | buffer depth, see LcdLayerDepth |
| void LCDLAYER_Redraw | ( | LCDLAYER * | layer | ) |
| void LCDLAYER_Flush | ( | LCDLAYER * | layer | ) |
Push DRWOBJ to the given LCDLAYER (without redraw!)
| LCDLAYER_LIST * RamLcdMainLayersList | ( | ) |
Pointer to the list of the LCDLAYER's (main).
| RAP_LCDLAYER_LIST * RamLcdRapLayersList | ( | ) |
Pointer to the list of the LCDLAYER's (RAP).
| LCDLAYER * Ram_LCD_Overlay_Layer | ( | ) |
Overlay layer of the display.
| void SetPixel | ( | int | x, |
| int | y, | ||
| const char * | color ) |
| void fillTriangle | ( | int | x1, |
| int | y1, | ||
| int | x2, | ||
| int | y2, | ||
| int | x3, | ||
| int | y3, | ||
| int | flags, | ||
| const char * | pen, | ||
| const char * | brush ) |
Draw a triangle polygon.
| x1,y1 | 1st point of the triangle |
| x2,y2 | 2nd point of the triangle |
| x3,y3 | 3rd point of the triangle |
| flags | drawing flags, see RectDrawingFlags |
| pen | stroke color |
| brush | fill color |
| void drawArc | ( | int | x1, |
| int | y1, | ||
| int | x2, | ||
| int | y2, | ||
| int | start_angle, | ||
| int | end_start, | ||
| int | flags, | ||
| const char * | pen, | ||
| const char * | brush ) |
Draw an arc or pie.
| x1,y1 | left+top coordinates |
| x2,y2 | right+bottom coordinates |
| start_angle | start angle of pie or arc |
| end_start | end angle of pie or arc |
| flags | drawing flags, see RectDrawingFlags |
| pen | stroke color |
| brush | fill color |
Init DRWOBJ which draw image.
| drwobj | draw object |
| rect | area on the screen |
| flags | image drawing flags |
| img | pointer to the image |
| void SetPropTo_Obj1 | ( | DRWOBJ * | drwobj, |
| const RECT * | rect, | ||
| int | flags, | ||
| const WSHDR * | text, | ||
| int | font, | ||
| int | text_flags ) |
Init DRWOBJ which draw text.
| drwobj | draw object |
| rect | area on the screen |
| flags | drawing flags |
| text | UTF-16 text of the string |
| font | font ID, see SystemFontID |
| text_flags | drawing flags bitmask, see TextAttributesFlags |
| void SetProp2ImageOrCanvas | ( | DRWOBJ * | drwobj, |
| const RECT * | rect, | ||
| int | flags, | ||
| const IMGHDR * | img, | ||
| int | offset_x, | ||
| int | offset_y ) |
| void SetPropTo_obj0x17 | ( | DRWOBJ * | drwobj, |
| const RECT * | rect, | ||
| int | flags, | ||
| const EIMGHDR * | img, | ||
| int | offset_x, | ||
| int | offset_y ) |
| void SetProp2Square_v1 | ( | DRWOBJ * | drwobj, |
| const RECT * | rect, | ||
| int | flags, | ||
| int | fill_type, | ||
| int | fill_pattern ) |
Init DRWOBJ which draw rectangle with custom filling.
| drwobj | draw object |
| rect | area on the screen |
| flags | drawing flags |
| fill_type | filling type, see DrwObjRectFillTypeID |
| fill_pattern | bit pattern, for example: 0b10101010 |
Set color to the DRWOBJ.
| drwobj | draw object |
| pen | stroke color |
| brush | fill color |
| void Get_Obj1_WH | ( | DRWOBJ * | drwobj, |
| int * | w, | ||
| int * | h ) |
Get WxH of the draw object.
| drwobj | draw object | |
| [out] | w | width |
| [out] | h | height |
| void FreeDrawObject_subobj | ( | DRWOBJ * | drwobj | ) |
| void SetDepthBufferOnLCDLAYER | ( | LCDLAYER * | layer, |
| char | depth ) |
Set LCDLAYER buffer depth.
| layer | pointer to the LCDLAYER |
| depth | buffer depth, see LcdLayerDepth |
| LCDLAYER * GetLCDLAYERByCurCepID | ( | ) |
Get an LCD layer which is associated with the current CEPID.
| void LCDRedrawLAYER | ( | LCDLAYER * | layer | ) |
| void SetDrawingCanvas | ( | int | x, |
| int | y, | ||
| int | x2, | ||
| int | y2 ) |
Limit drawing region on current LCDLAYER (selected by current CEPID).
| x,y,x2,y2 | drawing region |