|
SWILIB API (ELKA)
|
Go to the source code of this file.
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) |
Functions | |
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). | |