SWILIB API (X75)    
Loading...
Searching...
No Matches
GUI

Detailed Description

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)
 

Enumerations

enum  ThemePeletteColorID {
  TPC_FOREGROUND = 100 ,
  TPC_BACKGROUND = 101 ,
  TPC_HEADER_FOREGROUND = 102 ,
  TPC_HEADER_BACKGROUND = 103 ,
  TPC_EXTRA_HEADER_FOREGROUND = 104 ,
  TPC_BOTTOM_FOREGROUND = 105 ,
  TPC_DISABLED_TEXT_FOREGROUND = 107 ,
  TPC_SELECT_FOREGROUND = 115 ,
  TPC_SELECT_BACKGROUND = 116 ,
  TPC_SELECT_BORDER = 117 ,
  TPC_SELECT_SHADOW = 118 ,
  TPC_UNSELECT_FOREGOUND = 119 ,
  TPC_LIGHT_TEXT_FOREGROUND = 122 ,
  TPC_LIGHT_TEXT_BACKGROUND = 123 ,
  TPC_SEPARATOR = 125 ,
  TPC_SCROLL_BAR_SLIDER = 127 ,
  TPC_SCROLL_BAR = 128 ,
  TPC_WINDOW_FOREGROUND = 129 ,
  TPC_WINDOW_BACKGROUND = 130 ,
  TPC_WINDOW_HEADER_FOREGROUND = 131 ,
  TPC_BORDER = 133 ,
  TPC_BORDER_SHADOW = 134 ,
  TPC_POPUP_SELECT_FOREGROUD = 135 ,
  TPC_POPUP_SELECT_BACKGROUD = 136 ,
  TPC_PROGRESS_BAR_BACKGROUND = 138 ,
  TPC_PROGRESS_BAR_FOREGROUND = 139 ,
  TPC_PROGRESS_BAR_BORDER = 140 ,
  TPC_CALENDAR_DAY_BACKGROUND = 145 ,
  TPC_CALENDAR_WEEKEND_BACKGROUND = 146 ,
  TPC_CALENDAR_EVENT_BACKGROUND = 147 ,
  TPC_CALENDAR_FOREGROUND = 151 ,
  TPC_EDIT_HEADER_FOREGROUND = 155 ,
  TPC_EDIT_FOREGROUND = 156
}
 Colors indexes in the .col. More...
 
enum  SystemFontID {
  FONT_LARGE = 0 ,
  FONT_LARGE_BOLD = 1 ,
  FONT_LARGE_ITALIC = 0 ,
  FONT_LARGE_ITALIC_BOLD = 1 ,
  FONT_MEDIUM = 2 ,
  FONT_MEDIUM_BOLD = 3 ,
  FONT_MEDIUM_ITALIC = 2 ,
  FONT_MEDIUM_ITALIC_BOLD = 3 ,
  FONT_NUMERIC_SMALL = 4 ,
  FONT_NUMERIC_SMALL_BOLD = 5 ,
  FONT_NUMERIC_XSMALL = 6 ,
  FONT_SMALL = 7 ,
  FONT_SMALL_BOLD = 8 ,
  FONT_SMALL_ITALIC = 7 ,
  FONT_SMALL_ITALIC_BOLD = 8 ,
  FONT_NUMERIC_LARGE = 9 ,
  FONT_NUMERIC_MEDIUM = 10
}
 Font IDs. More...
 
enum  UnicodeControlChars {
  UTF16_UNDERLINE = 0xE001 ,
  UTF16_NO_UNDERLINE = 0xE002 ,
  UTF16_BG_INVERTION = 0xE003 ,
  UTF16_BG_INVERTION2 = 0xE005 ,
  UTF16_NO_INVERTION = 0xE004 ,
  UTF16_TEXT_COLOR_RGBA = 0xE006 ,
  UTF16_BG_COLOR_RGBA = 0xE007 ,
  UTF16_TEXT_COLOR = 0xE008 ,
  UTF16_BG_COLOR = 0xE009 ,
  UTF16_FONT_RESET = 0xE010 ,
  UTF16_FONT_SMALL = 0xE012 ,
  UTF16_FONT_SMALL_BOLD = 0xE013 ,
  UTF16_FONT_MEDIUM = 0xE014 ,
  UTF16_FONT_MEDIUM_BOLD = 0xE015 ,
  UTF16_FONT_LARGE_BOLD = 0xE017 ,
  UTF16_FONT_LARGE = 0xE018 ,
  UTF16_FONT_UNK0 = 0xE011 ,
  UTF16_FONT_UNK1 = 0xE016 ,
  UTF16_FONT_UNK2 = 0xE019 ,
  UTF16_FONT_UNK3 = 0xE01A ,
  UTF16_FONT_UNK4 = 0xE01B ,
  UTF16_ALIGN_NONE = 0xE01C ,
  UTF16_ALIGN_RIGHT = 0xE01D ,
  UTF16_ALIGN_LEFT = 0xE01E ,
  UTF16_ALIGN_CENTER = 0xE01F
}
 UTF-16 control chars for DrawString, DrawScrollString and standart UI. More...
 
enum  TextAttributesFlags {
  TEXT_ALIGNLEFT = 1 ,
  TEXT_ALIGNMIDDLE = 2 ,
  TEXT_ALIGNRIGHT = 4 ,
  TEXT_UNDERLINE = 8 ,
  TEXT_INVERT = 16 ,
  TEXT_OUTLINE = 32 ,
  TEXT_PASSWORD = 64 ,
  TEXT_NOFORMAT = 128 ,
  TEXT_INVERT2 = 256
}
 Flags for the DrawString and DrawScrollString. More...
 
enum  LineDrawingFlags {
  LINE_DOTTED = 1 ,
  LINE_DOTTED2 = 2
}
 Flags for the DrawLine. More...
 
enum  RectDrawingFlags {
  RECT_DOT_OUTLINE = 1 ,
  RECT_FILL_WITH_PEN = 2 ,
  RECT_DRAW_INVERT = 4
}
 Flags for the DrawRectangle and others. More...
 
enum  DrwObjRectFillTypeID {
  DRWOBJ_RECT_FILL_TYPE_NONE = 0 ,
  DRWOBJ_RECT_FILL_TYPE_BRUSH = 1 ,
  DRWOBJ_RECT_FILL_TYPE_PEN = 2 ,
  DRWOBJ_RECT_FILL_TYPE_PATTERN = 9
}
 Types of the rectangle filling. More...
 
enum  DrwObjEllipseSectionID {
  DRWOBJ_ELLIPSE_SECTION_UPPER_RIGHT = 1 ,
  DRWOBJ_ELLIPSE_SECTION_UPPER_LEFT ,
  DRWOBJ_ELLIPSE_SECTION_LOWER_LEFT ,
  DRWOBJ_ELLIPSE_SECTION_LOWER_RIGHT
}
 Types of the ellipse sections. More...
 
enum  LcdLayerDepth {
  LCDLAYER_DEPTH_WB = 1 ,
  LCDLAYER_DEPTH_RGB332 = 2 ,
  LCDLAYER_DEPTH_BGRA4444 = 3 ,
  LCDLAYER_DEPTH_RGB565 = 4 ,
  LCDLAYER_DEPTH_ARGB8888 = 5
}
 
enum  GbsKeyEventID {
  KEY_DOWN = 0x193 ,
  KEY_UP = 0x194 ,
  LONG_PRESS = 0x195
}
 Key event types (onKey). More...
 
enum  GbsKeyCodeID {
  LEFT_SOFT = 0x01 ,
  RIGHT_SOFT = 0x04 ,
  GREEN_BUTTON = 0x0B ,
  RED_BUTTON = 0x0C ,
  VOL_UP_BUTTON = 0x14 ,
  VOL_DOWN_BUTTON = 0x15 ,
  UP_BUTTON = 0x3B ,
  DOWN_BUTTON = 0x3C ,
  LEFT_BUTTON = 0x3D ,
  RIGHT_BUTTON = 0x3E ,
  ENTER_BUTTON = 0x1A ,
  INTERNET_BUTTON = 0x11 ,
  PTT_BUTTON = 0x27
}
 Key scancodes (onKey). More...
 
enum  KeyHookReturnCode {
  KEYHOOK_NEXT = 0 ,
  KEYHOOK_NEXT_NOT2GUI = 1 ,
  KEYHOOK_BREAK = 2 ,
  KEYHOOK_ENDQ = 3
}
 Return codes for global KeyHook. More...
 
enum  CsmGuiState {
  CSM_GUI_STATE_CLOSED = 0 ,
  CSM_GUI_STATE_UNFOCUSED = 1 ,
  CSM_GUI_STATE_FOCUSED = 2
}
 GUI state. More...
 

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).
 

Data Structure Documentation

◆ DRWOBJ

struct DRWOBJ

◆ RECT

struct RECT

◆ GUI_MSG

struct GUI_MSG

◆ GUI_METHODS

struct GUI_METHODS

◆ GUI_RAM

struct GUI_RAM

◆ GUI

struct GUI

◆ LCDLAYER

struct LCDLAYER

◆ LCDLAYER_LIST

struct LCDLAYER_LIST

◆ RAP_LCDLAYER_LIST

struct RAP_LCDLAYER_LIST

Typedef Documentation

◆ RECT

typedef struct RECT RECT

Definition at line 21 of file gui.h.

◆ GUI

typedef struct GUI GUI

Definition at line 22 of file gui.h.

◆ WIDGET

typedef struct GUI WIDGET

Definition at line 23 of file gui.h.

◆ GUI_RAM

typedef struct GUI_RAM GUI_RAM

Definition at line 24 of file gui.h.

◆ GUI_MSG

typedef struct GUI_MSG GUI_MSG

Definition at line 25 of file gui.h.

◆ GUI_METHODS

typedef struct GUI_METHODS GUI_METHODS

Definition at line 26 of file gui.h.

◆ DRWOBJ

typedef struct DRWOBJ DRWOBJ

Definition at line 27 of file gui.h.

◆ LCDLAYER

typedef struct LCDLAYER LCDLAYER

Definition at line 28 of file gui.h.

◆ LCDLAYER_LIST

typedef struct LCDLAYER_LIST LCDLAYER_LIST

Definition at line 29 of file gui.h.

◆ RAP_LCDLAYER_LIST

typedef struct RAP_LCDLAYER_LIST RAP_LCDLAYER_LIST

Definition at line 30 of file gui.h.

◆ KeybMsgHookProc

typedef int(* KeybMsgHookProc) (int submsg, int msg)

Definition at line 32 of file gui.h.

◆ GUI_TimerProc

typedef void(* GUI_TimerProc) (void *gui)

Definition at line 33 of file gui.h.

Enumeration Type Documentation

◆ ThemePeletteColorID

Colors indexes in the .col.

Enumerator
TPC_FOREGROUND 
TPC_BACKGROUND 
TPC_HEADER_FOREGROUND 
TPC_HEADER_BACKGROUND 
TPC_EXTRA_HEADER_FOREGROUND 
TPC_BOTTOM_FOREGROUND 
TPC_DISABLED_TEXT_FOREGROUND 
TPC_SELECT_FOREGROUND 
TPC_SELECT_BACKGROUND 
TPC_SELECT_BORDER 
TPC_SELECT_SHADOW 
TPC_UNSELECT_FOREGOUND 
TPC_LIGHT_TEXT_FOREGROUND 
TPC_LIGHT_TEXT_BACKGROUND 
TPC_SEPARATOR 
TPC_SCROLL_BAR_SLIDER 
TPC_SCROLL_BAR 
TPC_WINDOW_FOREGROUND 
TPC_WINDOW_BACKGROUND 
TPC_WINDOW_HEADER_FOREGROUND 
TPC_BORDER 
TPC_BORDER_SHADOW 
TPC_POPUP_SELECT_FOREGROUD 
TPC_POPUP_SELECT_BACKGROUD 
TPC_PROGRESS_BAR_BACKGROUND 
TPC_PROGRESS_BAR_FOREGROUND 
TPC_PROGRESS_BAR_BORDER 
TPC_CALENDAR_DAY_BACKGROUND 
TPC_CALENDAR_WEEKEND_BACKGROUND 
TPC_CALENDAR_EVENT_BACKGROUND 
TPC_CALENDAR_FOREGROUND 
TPC_EDIT_HEADER_FOREGROUND 
TPC_EDIT_FOREGROUND 

Definition at line 38 of file gui.h.

◆ SystemFontID

Font IDs.

Enumerator
FONT_LARGE 
FONT_LARGE_BOLD 
FONT_LARGE_ITALIC 
FONT_LARGE_ITALIC_BOLD 
FONT_MEDIUM 
FONT_MEDIUM_BOLD 
FONT_MEDIUM_ITALIC 
FONT_MEDIUM_ITALIC_BOLD 
FONT_NUMERIC_SMALL 
FONT_NUMERIC_SMALL_BOLD 
FONT_NUMERIC_XSMALL 
FONT_SMALL 
FONT_SMALL_BOLD 
FONT_SMALL_ITALIC 
FONT_SMALL_ITALIC_BOLD 
FONT_NUMERIC_LARGE 
FONT_NUMERIC_MEDIUM 

Definition at line 101 of file gui.h.

◆ UnicodeControlChars

UTF-16 control chars for DrawString, DrawScrollString and standart UI.

Enumerator
UTF16_UNDERLINE 

Set TEXT_UNDERLINE.

UTF16_NO_UNDERLINE 

Clear TEXT_UNDERLINE.

UTF16_BG_INVERTION 

Set TEXT_INVERT.

UTF16_BG_INVERTION2 

Set TEXT_INVERT2.

UTF16_NO_INVERTION 

Clear TEXT_INVERT | TEXT_INVERT2.

UTF16_TEXT_COLOR_RGBA 

Example: { UTF16_TEXT_COLOR_RGBA, 0xRRGG, 0xBBAA }.

UTF16_BG_COLOR_RGBA 

Example: { UTF16_BG_COLOR_RGBA, 0xRRGG, 0xBBAA }.

UTF16_TEXT_COLOR 

Example: { UTF16_TEXT_COLOR, PC_FOREGROUND }.

UTF16_BG_COLOR 

Example: { UTF16_BG_COLOR, PC_BACKGROUND }.

UTF16_FONT_RESET 

Reset font to the default.

UTF16_FONT_SMALL 

Set font ot FONT_SMALL.

UTF16_FONT_SMALL_BOLD 

Set font ot FONT_SMALL_BOLD.

UTF16_FONT_MEDIUM 

Set font ot FONT_MEDIUM.

UTF16_FONT_MEDIUM_BOLD 

Set font ot FONT_MEDIUM_BOLD.

UTF16_FONT_LARGE_BOLD 

Set font ot FONT_LARGE_BOLD.

UTF16_FONT_LARGE 

Set font ot FONT_LARGE.

UTF16_FONT_UNK0 

Set font ot FONT_SMALL.

UTF16_FONT_UNK1 

Set font ot FONT_LARGE_BOLD.

UTF16_FONT_UNK2 

Set font ot FONT_SMALL.

UTF16_FONT_UNK3 

Set font ot FONT_SMALL_BOLD.

UTF16_FONT_UNK4 

Set font ot FONT_SMALL.

UTF16_ALIGN_NONE 

Clear TEXT_ALIGNLEFT | TEXT_ALIGNMIDDLE | TEXT_ALIGNRIGHT.

UTF16_ALIGN_RIGHT 

Set TEXT_ALIGNRIGHT.

UTF16_ALIGN_LEFT 

Set TEXT_ALIGNLEFT.

UTF16_ALIGN_CENTER 

Set TEXT_ALIGNMIDDLE.

Definition at line 162 of file gui.h.

◆ 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.

Definition at line 202 of file gui.h.

◆ LineDrawingFlags

Flags for the DrawLine.

Enumerator
LINE_DOTTED 

Dotted line.

LINE_DOTTED2 

Dotted line (?)

Definition at line 217 of file gui.h.

◆ 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.

Definition at line 225 of file gui.h.

◆ DrwObjRectFillTypeID

Types of the rectangle filling.

Enumerator
DRWOBJ_RECT_FILL_TYPE_NONE 

Transparent.

DRWOBJ_RECT_FILL_TYPE_BRUSH 

Fill rectangle with brush color.

DRWOBJ_RECT_FILL_TYPE_PEN 

Fill rectangle with pen color.

DRWOBJ_RECT_FILL_TYPE_PATTERN 

Fill rectangle with brush color using pattern.

Definition at line 234 of file gui.h.

◆ DrwObjEllipseSectionID

Types of the ellipse sections.

Enumerator
DRWOBJ_ELLIPSE_SECTION_UPPER_RIGHT 
DRWOBJ_ELLIPSE_SECTION_UPPER_LEFT 
DRWOBJ_ELLIPSE_SECTION_LOWER_LEFT 
DRWOBJ_ELLIPSE_SECTION_LOWER_RIGHT 

Definition at line 244 of file gui.h.

◆ LcdLayerDepth

Enumerator
LCDLAYER_DEPTH_WB 
LCDLAYER_DEPTH_RGB332 
LCDLAYER_DEPTH_BGRA4444 
LCDLAYER_DEPTH_RGB565 
LCDLAYER_DEPTH_ARGB8888 

Definition at line 254 of file gui.h.

◆ GbsKeyEventID

Key event types (onKey).

Enumerator
KEY_DOWN 

Key down.

KEY_UP 

Key up.

LONG_PRESS 

Key longpress.

Definition at line 265 of file gui.h.

◆ GbsKeyCodeID

Key scancodes (onKey).

Keypad buttons passed '*', '#', '0'-'9' as charcode.

Enumerator
LEFT_SOFT 

Left softkey.

RIGHT_SOFT 

Right softkey.

GREEN_BUTTON 

Green button.

RED_BUTTON 

Red button.

VOL_UP_BUTTON 

Volume+.

VOL_DOWN_BUTTON 

Volume-.

UP_BUTTON 

UP navkey.

DOWN_BUTTON 

DOWN navkey.

LEFT_BUTTON 

LEFT navkey.

RIGHT_BUTTON 

RIGHT navkey.

ENTER_BUTTON 

CENTER navkey.

INTERNET_BUTTON 

Browser key.

PTT_BUTTON 

PTT key.

Definition at line 278 of file gui.h.

◆ KeyHookReturnCode

Return codes for global KeyHook.

Enumerator
KEYHOOK_NEXT 

Process key to next keyhook and to gui.

KEYHOOK_NEXT_NOT2GUI 

Process key only to next keyhook, not to gui.

KEYHOOK_BREAK 

Break process and exit without processing in gui.

KEYHOOK_ENDQ 

Break process and exit with or not processing in gui (selected by prev values 0/1)

Definition at line 326 of file gui.h.

◆ CsmGuiState

GUI state.

Enumerator
CSM_GUI_STATE_CLOSED 

GUI closed.

CSM_GUI_STATE_UNFOCUSED 

GUI not in focus.

CSM_GUI_STATE_FOCUSED 

GUI in focus.

Definition at line 336 of file gui.h.

Function Documentation

◆ ScreenW()

int ScreenW ( void )

Phone screen width.

Returns
width in px

◆ ScreenH()

int ScreenH ( void )

Phone screen height.

Returns
height in px

◆ HeaderH()

int HeaderH ( void )

Header height (iconbar).

Returns
height in px

◆ SoftkeyH()

int SoftkeyH ( void )

Softkeys height.

Returns
height in px

◆ RamPressedKey()

char * RamPressedKey ( )

Pointer to the last pressed key.

Returns
pointer to the keycode value
int last_pressed_keycode = *RamPressedKey();
char * RamPressedKey()
Pointer to the last pressed key.
Note
Useless for ELF's, use onKey callback in the GUI.

◆ RamScreenBuffer()

void * RamScreenBuffer ( )

Pointer to the current LCD buffer.

Useful for screenshots, but not for direct rendering.

Returns
RGB565 screen buffer

◆ GetPaletteAdrByColorIndex()

char * GetPaletteAdrByColorIndex ( int index)

Get color from the phone theme.

Parameters
indexcolor index in .col, see ThemePeletteColorID
Returns
pointer to the char[4] array (RR, GG, BB, AA)

◆ getRGBcolor()

void getRGBcolor ( int index,
void * color )

Get color from the phone theme.

Parameters
indexcolor index in .col, see ThemePeletteColorID
[out]colorpointer to the char[4] array for RGBA

◆ getRGBbyPaletteAdr()

void getRGBbyPaletteAdr ( const void * src_color,
void * dst_color )

Copy color from the theme palette.

Parameters
src_colorcolor returned by GetPaletteAdrByColorIndex
[out]dst_colorpointer to the char[4] array for RGBA
memcpy(src_color, dst_color, 4); // functional analog
void * memcpy(void *destination, const void *source, size_t num)
Copy block of memory.

◆ setColor()

void setColor ( int a,
int r,
int g,
int b,
void * dst )

Initialize color by individual values.

Parameters
aalpha channel 0-100
r,g,bcolors 0-255
dstpointer to the char[4] array for RGBA

◆ RscMgr_CsSetColor()

int RscMgr_CsSetColor ( int id,
const uint8_t * color )

Set a color for a theme color scheme element.

Parameters
idcolor element ID, calculated as (ThemePeletteColorID - 100)
colorpointer to a 4‑byte RGBA array (RR, GG, BB, AA)
Returns
1: success, 0: error

◆ RscMgr_CsUpdate()

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.

◆ StoreXYWHtoRECT()

void StoreXYWHtoRECT ( RECT * rect,
int x,
int y,
int w,
int h )

Initialize RECT by coordinates and size.

Parameters
rectpointer to the rect
x,yrect coordinates
w,hrect size

◆ StoreXYXYtoRECT()

void StoreXYXYtoRECT ( RECT * rect,
int x,
int y,
int x2,
int y2 )

Initialize RECT by two points.

Parameters
rectpointer to the rect
x,y1-st point: top + left
x2,y22-nd point: bottom + right

◆ IsGuiOnTop()

int IsGuiOnTop ( int id)

Check if the GUI is in focus on the screen.

Parameters
idGUI ID
Returns
1 or 0

◆ GetCurGuiID()

int GetCurGuiID ( )

Get current focused GUI.

Returns
GUI ID

◆ CreateGUI()

int CreateGUI ( void * gui)

Create new GUI.

Parameters
guipointer to the GUI description.
Returns
ID of created GUI

It can be called only within created CSM.

Note
Always use this function if possible.

◆ CreateGUI_ID()

int CreateGUI_ID ( void * gui,
int id )

Create new GUI with specified ID.

Parameters
guipointer to the GUI description.
idGUI ID
Returns
ID of created GUI
Deprecated
Don't use this function!

◆ CreateGUI_30or2()

int CreateGUI_30or2 ( void * gui)

Create new GUI.

Parameters
guipointer to the GUI description.
Returns
ID of created GUI

It can be called only within created CSM. The difference between CreateGUI is unknown.

◆ CreateGUIWithDummyCSM()

int CreateGUIWithDummyCSM ( void * gui,
int flag )

Create new GUI with dummy CSM.

Parameters
guipointer to the GUI description.
flagunknown
Returns
ID of created GUI

◆ CreateGUIWithDummyCSM_30or2()

int CreateGUIWithDummyCSM_30or2 ( void * gui,
int flag )

Create new GUI with dummy CSM.

Parameters
guipointer to the GUI description.
flagunknown
Returns
ID of created GUI

The difference between CreateGUIWithDummyCSM is unknown.

◆ GeneralFuncF1()

void GeneralFuncF1 ( int cmd)

Request closing of the focused GUI.

Parameters
cmdcode which bypassed the MSG_GUI_DESTROYED event

◆ GeneralFuncF0()

void GeneralFuncF0 ( int cmd)

Unknown function.

Parameters
cmdunknown

◆ GeneralFunc_flag1()

void GeneralFunc_flag1 ( int id,
int cmd )

Request closing of the GUI with given ID.

Parameters
idGUI ID
cmdcode which bypassed the MSG_GUI_DESTROYED event

◆ GeneralFunc_flag0()

void GeneralFunc_flag0 ( int id,
int cmd )

Unknown function.

Parameters
idGUI ID
cmdunknown

◆ GetTopGUI()

GUI * GetTopGUI ( void )

Get pointer to the currently focused GUI.

Returns
pointer to the GUI

◆ FindGUIbyId()

void * FindGUIbyId ( int id,
CSM_RAM ** csm )

Find GUI by ID.

Parameters
idGUI ID
csmlist of the CSM_RAM pointers where GUI can be located.
Returns
pointer to the GUI

◆ FocusGUI()

void FocusGUI ( int id)

Focus GUI by ID.

Parameters
idGUI ID

◆ UnfocusGUI()

void UnfocusGUI ( void )

Unfocus focused GUI.

◆ REDRAW()

void REDRAW ( void )

Request redraw of the GUI.

Note
Platform independent function. Use it where possible.
Builtin on platforms:
ELKA, NSG, X75, SG

◆ DirectRedrawGUI()

void DirectRedrawGUI ( void )

Immediate redraw the GUI.

Warning
Low-level function, use only if you know what the doing.
Call only from MMI! (not SUBPROC)

◆ DirectRedrawGUI_ID()

void DirectRedrawGUI_ID ( int id)

Immediate redraw the GUI (by ID).

Parameters
idid of the GUI
Warning
Low-level function, use only if you know what the doing.
Call only from MMI! (not SUBPROC)

◆ PendedRedrawGUI()

void PendedRedrawGUI ( void )

Request redraw of the GUI.

Warning
Low-level function, use only if you know what the doing.
Note
It can be called in the SUBPORC.

◆ AddKeybMsgHook()

void AddKeybMsgHook ( KeybMsgHookProc callback)

Add global keyhook to the beginning of the list.

Parameters
callbackint callback(int submsg, int msg)
Builtin on platforms:
X75, SG

◆ AddKeybMsgHook_end()

int AddKeybMsgHook_end ( KeybMsgHookProc callback)

Add global keyhook to the end of the list.

Parameters
callbackint callback(int submsg, int msg)
Returns
1: success, 0: error
Builtin on platforms:
X75, SG

◆ RemoveKeybMsgHook()

void RemoveKeybMsgHook ( KeybMsgHookProc callback)

Remove global keyhook from the list.

Parameters
callbackint callback(int submsg, int msg)
Builtin on platforms:
X75, SG

◆ GetFontYSIZE()

int GetFontYSIZE ( int font_id)

Get a char height in the specified font.

Parameters
font_idsee SystemFontID
Returns
height in px

◆ GetSymbolWidth()

int GetSymbolWidth ( int character,
int font_id )

Get a char width in the specified font.

Parameters
characterUTF-16 codepoint
font_idsee SystemFontID
Returns
width in px

◆ Get_WS_width()

int Get_WS_width ( const WSHDR * text,
int font_id )

Measure string width with the specified font.

Parameters
texttext to be measured
font_idsee SystemFontID
Returns
width in px

◆ Get_WS_extent()

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.

Parameters
wstext to be measured
text_flagstext attributes bitmask, see TextAttributesFlags
flagsdrawing flags
font_idsee SystemFontID
wpointer to int: input = max width, output = actual width
hpointer to int: input = max height, output = actual height

◆ DrawIMGHDR()

void DrawIMGHDR ( int x,
int y,
const IMGHDR * img )

Draw image.

Parameters
x,yimage coordinates
imgpointer to the IMGHDR

◆ DrawCroppedIMGHDR()

void DrawCroppedIMGHDR ( int x,
int y,
int offset_x,
int offset_y,
int w,
int h,
int flags,
const IMGHDR * img )

Draw cropped image.

Parameters
x,ycoordinates
offset_x,offset_yoffsets
wwidth
hheight
flagsdrawing flags
imgpointer to the IMGHDR

◆ DrawImg()

void DrawImg ( int x,
int y,
int picture )

Draw image from the PIT table.

Parameters
x,yimage coordinates
pictureimage number

◆ DrawImgBW()

void DrawImgBW ( int x,
int y,
int picture,
const char * pen,
const char * brush )

Draw BW image from the PIT table.

Parameters
x,yimage coordinates
pictureimage number
penreplace black color or NULL
brushreplace white color or NULL

◆ DrawPixel()

void DrawPixel ( int x,
int y,
const char * color )

Draw single pixel.

Parameters
x,ycoordinates
colorpixel color

◆ DrawTriangle()

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.

Parameters
x1,y11st point of the triangle
x2,y22nd point of the triangle
x3,y33rd point of the triangle
flagsdrawing flags, see RectDrawingFlags
penstroke color
brushfill color

◆ DrawArc()

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.

Parameters
x1,y1left+top coordinates
x2,y2right+bottom coordinates
start_anglestart angle of pie or arc
end_startend angle of pie or arc
flagsdrawing flags, see RectDrawingFlags
penstroke color
brushfill color

◆ DrawLine()

void DrawLine ( int x1,
int y1,
int x2,
int y2,
int flags,
const char * pen )

Draw a single line between two points.

Parameters
x1,y11-st point coordinates
x2,y22-nd point coordinates
flagsdrawing flags bitmask, see LineDrawingFlags
penstroke color

◆ DrawRectangle()

void DrawRectangle ( int x1,
int y1,
int x2,
int y2,
int flags,
const char * pen,
const char * brush )

Draw a rectangle.

Parameters
x1,y1left+top coordinates
x2,y2right+bottom coordinates
flagsdrawing flags bitmask, see RectDrawingFlags
penstroke color
brushfill color

◆ DrawRoundedFrame()

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.

Parameters
x1,y1left+top coordinates
x2,y2right+bottom coordinates
x_roundhorizontal round
y_roundvertical round
flagsdrawing flags bitmask, see RectDrawingFlags
penstroke color
brushfill color

◆ DrawString()

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.

Parameters
textUTF-16 text of the string
x1,y1left+top coordinates
x2,y2right+bottom coordinates
fontfont ID, see SystemFontID
text_flagstext attributes bitmask, see TextAttributesFlags
penstroke color
brushfill color

◆ DrawScrollString()

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.

Parameters
textUTF-16 text of the string
x1,y1left+top coordinates
x2,y2right+bottom coordinates
xdisphorizontal scrolling offset + 1
fontfont ID, see SystemFontID
text_flagstext attributes bitmask, see TextAttributesFlags
penstroke color
brushfill color

◆ BuildCanvas()

void * BuildCanvas ( void )

Build "Canvas" with IDLE Wallpaper.

"Canvas" is a really meaning for standard UI background.

Note
Useful for painting widgets to the IDLE screen.
On ELKA the canvas is drawn only while the IDLE UI is on top (IsIdleUiOnTop).
Returns
pointer to the "canvas" object for DrawCanvas
Pointer to the memory:
FLASH

◆ DrawCanvas()

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".

Parameters
datapointer to the canvas created by BuildCanvas
x,y,x2,y2region for pain
flag_oneunknown, set to 1

◆ DrawObject()

void DrawObject ( DRWOBJ * drwobj)

Draw DRWOBJ to the screen buffer.

Parameters
drwobjdraw object

◆ DrwObj_InitRect()

void DrwObj_InitRect ( DRWOBJ * drwobj,
const RECT * rect,
int flags )

Init DRWOBJ which draw rectangle.

Parameters
drwobjdraw object
rectarea on the screen
flagsdrawing flags

◆ DrwObj_InitRectEx()

void DrwObj_InitRectEx ( DRWOBJ * drwobj,
const RECT * rect,
int flags,
int fill_type,
int fill_pattern )

Init DRWOBJ which draw rectangle with custom filling.

Parameters
drwobjdraw object
rectarea on the screen
flagsdrawing flags
fill_typefilling type, see DrwObjRectFillTypeID
fill_patternbit pattern, for example: 0b10101010

◆ DrwObj_InitText()

void DrwObj_InitText ( DRWOBJ * drwobj,
const RECT * rect,
int flags,
const WSHDR * text,
int font,
int text_flags )

Init DRWOBJ which draw text.

Parameters
drwobjdraw object
rectarea on the screen
flagsdrawing flags
textUTF-16 text of the string
fontfont ID, see SystemFontID
text_flagsdrawing flags bitmask, see TextAttributesFlags

◆ DrwObj_InitImage()

void DrwObj_InitImage ( DRWOBJ * drwobj,
const RECT * rect,
int flags,
const IMGHDR * img )

Init DRWOBJ which draw image.

Parameters
drwobjdraw object
rectarea on the screen
flagsimage drawing flags
imgpointer to the image

◆ DrwObj_InitTiledImage()

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.

Parameters
drwobjdraw object
rectarea on the screen
flagsimage drawing flags
imgpointer to the image IMGHDR
offset_x,offset_ytile offset in image

◆ DrwObj_InitTiledImageEx()

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).

Parameters
drwobjdraw object
rectarea on the screen
flagsimage drawing flags
imgpointer to the extended image EIMGHDR
offset_x,offset_ytile offset in image

◆ DrwObj_SetColor()

void DrwObj_SetColor ( DRWOBJ * drwobj,
const char * pen,
const char * brush )

Set color to the DRWOBJ.

Parameters
drwobjdraw object
penstroke color
brushfill color

◆ DrwObj_GetWH()

void DrwObj_GetWH ( DRWOBJ * drwobj,
int * w,
int * h )

Get WxH of the draw object.

Parameters
drwobjdraw object
[out]wwidth
[out]hheight

◆ DrwObj_Free()

void DrwObj_Free ( DRWOBJ * drwobj)

Free draw object internal resources.

Parameters
drwobjdraw object

◆ GUI_NewTimer()

int GUI_NewTimer ( void * gui)

Create new GUI timer.

Parameters
guipointer to the GUI
Returns
ID of the created GUI timer.

◆ GUI_DeleteTimer()

int GUI_DeleteTimer ( void * gui,
int id )

Delete GUI timer.

Parameters
guipointer to the GUI
idtimer ID
Returns
0 on success

◆ GUI_StartTimerProc()

void GUI_StartTimerProc ( void * gui,
int id,
long timeout,
GUI_TimerProc callback )

Schedule GUI timer.

Parameters
guipointer to the GUI
idtimer ID
timeouttimeout in ms
callbacktimer callback

◆ LCD_GetCurrentLayer()

LCDLAYER * LCD_GetCurrentLayer ( )

Get an LCD layer which is associated with the current CEPID.

Returns
pointer to the LCDLAYER

◆ LCD_SetDrawingRegion()

void LCD_SetDrawingRegion ( int x,
int y,
int x2,
int y2 )

Limit drawing region on current LCDLAYER (selected by current CEPID).

Parameters
x,y,x2,y2drawing region

◆ LCD_SetBufferDepth()

void LCD_SetBufferDepth ( char depth)

Set LCDLAYER buffer depth on current LCDLAYER (selected by current CEPID).

Parameters
depthbuffer depth, see LcdLayerDepth

◆ LCDLAYER_SetBufferDepth()

void LCDLAYER_SetBufferDepth ( LCDLAYER * layer,
char depth )

Set LCDLAYER buffer depth.

Parameters
layerpointer to the LCDLAYER
depthbuffer depth, see LcdLayerDepth

◆ LCDLAYER_Redraw()

void LCDLAYER_Redraw ( LCDLAYER * layer)

Request redrawing of the given LCDLAYER (delayed).

Parameters
layerpointer to the LCDLAYER

◆ LCDLAYER_Flush()

void LCDLAYER_Flush ( LCDLAYER * layer)

Do redrawing of the given LCDLAYER (immediate).

Parameters
layerpointer to the LCDLAYER

◆ DrawObject2Layer()

void DrawObject2Layer ( LCDLAYER * layer,
DRWOBJ * drwobj )

Push DRWOBJ to the given LCDLAYER (with redraw!)

Parameters
drwobjsource DRWOBJ
layerdestination LCDLAYER

◆ PushDRWOBJOnLAYER()

int PushDRWOBJOnLAYER ( DRWOBJ * drwobj,
LCDLAYER * layer )

Push DRWOBJ to the given LCDLAYER (without redraw!)

while (PushDRWOBJOnLAYER(drwobj, layer) != 0);
int PushDRWOBJOnLAYER(DRWOBJ *drwobj, LCDLAYER *layer)
Push DRWOBJ to the given LCDLAYER (without redraw!)
Parameters
drwobjsource DRWOBJ
layerdestination LCDLAYER
Returns
zero if success, not zero if need restart

◆ RamLcdMainLayersList()

LCDLAYER_LIST * RamLcdMainLayersList ( )

Pointer to the list of the LCDLAYER's (main).

Returns
pointer to the array of LCDLAYER_LIST

◆ RamLcdRapLayersList()

RAP_LCDLAYER_LIST * RamLcdRapLayersList ( )

Pointer to the list of the LCDLAYER's (RAP).

Returns
pointer to the array of 5 RAP_LCDLAYER_LIST

◆ Ram_LCD_Overlay_Layer()

LCDLAYER * Ram_LCD_Overlay_Layer ( )

Overlay layer of the display.

Returns
pointer to the layer

◆ SetPixel()

void SetPixel ( int x,
int y,
const char * color )

Draw single pixel.

Parameters
x,ycoordinates
colorpixel color
Deprecated
Use DrawPixel

◆ fillTriangle()

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.

Parameters
x1,y11st point of the triangle
x2,y22nd point of the triangle
x3,y33rd point of the triangle
flagsdrawing flags, see RectDrawingFlags
penstroke color
brushfill color
Deprecated
Use DrawTriangle

◆ drawArc()

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.

Parameters
x1,y1left+top coordinates
x2,y2right+bottom coordinates
start_anglestart angle of pie or arc
end_startend angle of pie or arc
flagsdrawing flags, see RectDrawingFlags
penstroke color
brushfill color
Deprecated
Use DrawArc

◆ SetPropTo_Obj5()

void SetPropTo_Obj5 ( DRWOBJ * drwobj,
const RECT * rect,
int flags,
const IMGHDR * img )

Init DRWOBJ which draw image.

Parameters
drwobjdraw object
rectarea on the screen
flagsimage drawing flags
imgpointer to the image
Deprecated
Use DrwObj_InitImage

◆ SetPropTo_Obj1()

void SetPropTo_Obj1 ( DRWOBJ * drwobj,
const RECT * rect,
int flags,
const WSHDR * text,
int font,
int text_flags )

Init DRWOBJ which draw text.

Parameters
drwobjdraw object
rectarea on the screen
flagsdrawing flags
textUTF-16 text of the string
fontfont ID, see SystemFontID
text_flagsdrawing flags bitmask, see TextAttributesFlags
Deprecated
Use DrwObj_InitText

◆ SetProp2ImageOrCanvas()

void SetProp2ImageOrCanvas ( DRWOBJ * drwobj,
const RECT * rect,
int flags,
const IMGHDR * img,
int offset_x,
int offset_y )

Init DRWOBJ which draw tiled image.

Parameters
drwobjdraw object
rectarea on the screen
flagsimage drawing flags
imgpointer to the image IMGHDR
offset_x,offset_ytile offset in image
Deprecated
Use DrwObj_InitTiledImage

◆ SetPropTo_obj0x17()

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).

Parameters
drwobjdraw object
rectarea on the screen
flagsimage drawing flags
imgpointer to the extended image EIMGHDR
offset_x,offset_ytile offset in image
Deprecated
Use DrwObj_InitTiledImageEx

◆ SetProp2Square_v1()

void SetProp2Square_v1 ( DRWOBJ * drwobj,
const RECT * rect,
int flags,
int fill_type,
int fill_pattern )

Init DRWOBJ which draw rectangle with custom filling.

Parameters
drwobjdraw object
rectarea on the screen
flagsdrawing flags
fill_typefilling type, see DrwObjRectFillTypeID
fill_patternbit pattern, for example: 0b10101010
Deprecated
Use DrwObj_InitRectEx

◆ SetColor()

void SetColor ( DRWOBJ * drwobj,
const char * pen,
const char * brush )

Set color to the DRWOBJ.

Parameters
drwobjdraw object
penstroke color
brushfill color
Deprecated
Use DrwObj_SetColor

◆ Get_Obj1_WH()

void Get_Obj1_WH ( DRWOBJ * drwobj,
int * w,
int * h )

Get WxH of the draw object.

Parameters
drwobjdraw object
[out]wwidth
[out]hheight
Deprecated
Use DrwObj_GetWH

◆ FreeDrawObject_subobj()

void FreeDrawObject_subobj ( DRWOBJ * drwobj)

Free draw object internal resources.

Parameters
drwobjdraw object
Deprecated
Use DrwObj_Free

◆ SetDepthBufferOnLCDLAYER()

void SetDepthBufferOnLCDLAYER ( LCDLAYER * layer,
char depth )

Set LCDLAYER buffer depth.

Parameters
layerpointer to the LCDLAYER
depthbuffer depth, see LcdLayerDepth
Deprecated
use LCDLAYER_SetBufferDepth

◆ GetLCDLAYERByCurCepID()

LCDLAYER * GetLCDLAYERByCurCepID ( )

Get an LCD layer which is associated with the current CEPID.

Returns
pointer to the LCDLAYER
Deprecated
use LCD_GetCurrentLayer

◆ LCDRedrawLAYER()

void LCDRedrawLAYER ( LCDLAYER * layer)

Request redrawing of the given LCDLAYER (delayed).

Parameters
layerpointer to the LCDLAYER
Deprecated
use LCDLAYER_Redraw

◆ SetDrawingCanvas()

void SetDrawingCanvas ( int x,
int y,
int x2,
int y2 )

Limit drawing region on current LCDLAYER (selected by current CEPID).

Parameters
x,y,x2,y2drawing region
Deprecated
use LCD_SetDrawingRegion