76 PC_HEADERFOREGROUND = 102,
77 PC_HEADERBACKGROUND = 103,
78 PC_SELECTFOREGROUND = 115,
79 PC_SELECTBACKGROUND = 116,
80 PC_SELECTBORDER = 117,
81 PC_SELECTSHADOW = 118,
82 PC_LIGHTTEXTFOREGROUND = 122,
83 PC_LIGHTTEXTBACKGROUND = 123,
84 PC_SCROLLBARSLIDER = 127,
86 PC_WINDOWFOREGROUND = 129,
87 PC_WINDOWBACKGROUND = 130,
89 PC_BORDERSHADOW = 134,
90 PC_POPUPSELECTFOREGROUD = 135,
91 PC_POPUPSELECTBACKGROUD = 136,
92 PC_PROGRESSBACKGROUND = 138,
93 PC_PROGRESSFOREGROUND = 139,
94 PC_PROGRESSBORDER = 140,
120#elif defined(NEWSGOLD)
296 INTERNET_BUTTON = 0x11,
318 INTERNET_BUTTON = 0x11,
466#elif defined(NEWSGOLD)
604void setColor(
int a,
int r,
int g,
int b,
void *dst)
1004__swi_end(0x202,
DrawTriangle, (x1, y1, x2, y2, x3, y3, flags, pen, brush));
1017void DrawArc(
int x1,
int y1,
int x2,
int y2,
int start_angle,
int end_start,
int flags,
const char *pen,
const char *brush)
1018__swi_end(0x204,
DrawArc, (x1, y1, x2, y2, start_angle, end_start, flags, pen, brush));
1055__swi_end(0x150,
DrawRoundedFrame, (x1, y1, x2, y2, x_round, y_round, flags, pen, brush));
1070__swi_end(0x14C,
DrawString, (text, x1, y1, x2, y2, font, text_flags, pen, brush));
1086__swi_end(0x207,
DrawScrollString, (text, x1, y1, x2, y2, xdisp, font, text_flags, pen, brush));
1108void DrawCanvas(
void *data,
int x,
int y,
int x2,
int y2,
int flag_one)
1135void DrwObj_InitLine(
DRWOBJ *drwobj,
RECT *rect,
int flags,
int x,
int y,
int x2,
int y2)
1136__swi_end(0xXXX, DrwObj_InitLine, (drwobj, rect, flags, x, y, x2, y2));
1149void DrwObj_InitTriangle(
DRWOBJ *drwobj,
int x1,
int y1,
int x2,
int y2,
int x3,
int y3,
int flags,
char *pen,
char *brush)
1150__swi_end(0xXXX, DrwObj_InitTriangle, (drwobj, x1, y1, x2, y2, x3, y3, flags, pen, brush));
1413__swi_end(0x202,
fillTriangle, (x1, y1, x2, y2, x3, y3, flags, pen, brush));
1420void drawArc(
int x1,
int y1,
int x2,
int y2,
int start_angle,
int end_start,
int flags,
const char *pen,
const char *brush)
1421__swi_end(0x204,
drawArc, (x1, y1, x2, y2, start_angle, end_start, flags, pen, brush));
#define __swi_end(number, func, call)
#define __swi_begin(number)
RECT * canvas
Region on the screen.
void(* onRedraw)(GUI *)
Method for the drawing.
void * buffer
Layer buffer.
GUI_METHODS * methods
Pointer to the GUI_METHODS, union with GUI.methods.
int allocated_size
Layer allocated buffer size.
void(* onUnfocus)(GUI *, mfree_func_t)
GUI not in focus.
RECT rect
Rectangle region on the LCD.
RECT invalidate
Layer region to invalidate.
malloc_func_t malloc_func
void(* onClose)(GUI *, mfree_func_t)
Destructor.
uint8_t depth
Color depth, see LcdLayerDepth.
char state
GUI state, see CsmGuiState.
int(* onKey)(GUI *, GUI_MSG *)
Keyboard handler.
void(* onCreate)(GUI *, malloc_func_t)
Constructor.
int redraw_requested
1 when redraw is requested
void(* onDestroy)(void *, mfree_func_t)
Free resources.
void(* onFocus)(GUI *, malloc_func_t, mfree_func_t)
GUI is in focus.
void FocusGUI(int id)
Focus GUI by ID.
void * BuildCanvas(void)
Build "Canvas" with IDLE Wallpaper.
int GetFontYSIZE(int font_id)
Get a char height in the specified font.
LCDLAYER * GetLCDLAYERByCurCepID()
Get an LCD layer which is associated with the current CEPID.
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 DirectRedrawGUI_ID(int id)
Immediate redraw the GUI (by ID).
void DrawObject2Layer(LCDLAYER *layer, DRWOBJ *drwobj)
Push DRWOBJ to the given LCDLAYER (with redraw!)
void AddKeybMsgHook(KeybMsgHookProc callback)
Add global keyhook to the beginning of the list.
int ScreenH(void)
Phone screen height.
void(* GUI_TimerProc)(void *gui)
void DrwObj_SetColor(DRWOBJ *drwobj, const char *pen, const char *brush)
Set color to the DRWOBJ.
GUI * GetTopGUI(void)
Get pointer to the currently focused GUI.
LCDLAYER * Ram_LCD_Overlay_Layer()
Overlay layer of the display.
void SetPropTo_Obj1(DRWOBJ *drwobj, const RECT *rect, int flags, const WSHDR *text, int font, int text_flags)
Init DRWOBJ which draw text.
void DrawPixel(int x, int y, const char *color)
Draw single pixel.
void * RamScreenBuffer()
Pointer to the current LCD buffer.
void PendedRedrawGUI(void)
Request redraw of the GUI.
DrwObjEllipseSectionID
Types of the ellipse sections.
void Get_Obj1_WH(DRWOBJ *drwobj, int *w, int *h)
Get WxH of the draw object.
RAP_LCDLAYER_LIST * RamLcdRapLayersList()
Pointer to the list of the LCDLAYER's (RAP).
int GetSymbolWidth(int character, int font_id)
Get a char width in the specified font.
int IsGuiOnTop(int id)
Check if the GUI is in focus on the screen.
void GUI_StartTimerProc(void *gui, int id, long timeout, GUI_TimerProc callback)
Schedule GUI timer.
GbsKeyEventID
Key event types (onKey).
void GeneralFunc_flag0(int id, int cmd)
Unknown function.
void GeneralFunc_flag1(int id, int cmd)
Request closing of the GUI with given ID.
void DrawObject(DRWOBJ *drwobj)
Draw DRWOBJ to the screen buffer.
int CreateGUIWithDummyCSM(void *gui, int flag)
Create new GUI with dummy CSM.
int GUI_NewTimer(void *gui)
Create new GUI timer.
void setColor(int a, int r, int g, int b, void *dst)
Initialize color by individual values.
void REDRAW(void)
Request redraw of the GUI.
int Get_WS_width(const WSHDR *text, int font_id)
Measure string width with the specified font.
void SetColor(DRWOBJ *drwobj, const char *pen, const char *brush)
Set color to the DRWOBJ.
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 SetPropTo_Obj5(DRWOBJ *drwobj, const RECT *rect, int flags, const IMGHDR *img)
Init DRWOBJ which draw image.
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 LCDLAYER_Flush(LCDLAYER *layer)
Do redrawing of the given LCDLAYER (immediate).
RectDrawingFlags
Flags for the DrawRectangle and others.
void DrawLine(int x1, int y1, int x2, int y2, int flags, const char *pen)
Draw a single line between two points.
DrwObjRectFillTypeID
Types of the rectangle filling.
int GUI_DeleteTimer(void *gui, int id)
Delete GUI timer.
void DirectRedrawGUI(void)
Immediate redraw the GUI.
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 DrawImg(int x, int y, int picture)
Draw image from the PIT table.
void FreeDrawObject_subobj(DRWOBJ *drwobj)
Free draw object internal resources.
void DrawRectangle(int x1, int y1, int x2, int y2, int flags, const char *pen, const char *brush)
Draw a rectangle.
ThemePeletteColorID
Colors indexes in the .col.
int CreateGUIWithDummyCSM_30or2(void *gui, int flag)
Create new GUI with dummy CSM.
TextAttributesFlags
Flags for the DrawString and DrawScrollString.
int ScreenW(void)
Phone screen width.
void getRGBcolor(int index, void *color)
Get color from the phone theme.
GbsKeyCodeID
Key scancodes (onKey).
void SetPixel(int x, int y, const char *color)
Draw single pixel.
LCDLAYER * LCD_GetCurrentLayer()
Get an LCD layer which is associated with the current CEPID.
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 DrawImgBW(int x, int y, int picture, const char *pen, const char *brush)
Draw BW image from the PIT table.
void DrawIMGHDR(int x, int y, const IMGHDR *img)
Draw image.
int HeaderH(void)
Header height (iconbar).
void DrawCroppedIMGHDR(int x, int y, int offset_x, int offset_y, int w, int h, int flags, const IMGHDR *img)
Draw cropped image.
KeyHookReturnCode
Return codes for global KeyHook.
void LCDLAYER_SetBufferDepth(LCDLAYER *layer, char depth)
Set LCDLAYER buffer depth.
int AddKeybMsgHook_end(KeybMsgHookProc callback)
Add global keyhook to the end of the list.
void LCDLAYER_Redraw(LCDLAYER *layer)
Request redrawing of the given LCDLAYER (delayed).
void DrwObj_GetWH(DRWOBJ *drwobj, int *w, int *h)
Get WxH of the draw object.
void StoreXYWHtoRECT(RECT *rect, int x, int y, int w, int h)
Initialize RECT by coordinates and size.
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 SetProp2Square_v1(DRWOBJ *drwobj, const RECT *rect, int flags, int fill_type, int fill_pattern)
Init DRWOBJ which draw rectangle with custom filling.
int SoftkeyH(void)
Softkeys height.
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_InitRect(DRWOBJ *drwobj, const RECT *rect, int flags)
Init DRWOBJ which draw rectangle.
void DrwObj_InitImage(DRWOBJ *drwobj, const RECT *rect, int flags, const IMGHDR *img)
Init DRWOBJ which draw 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 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 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 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.
int GetCurGuiID()
Get current focused GUI.
int CreateGUI_ID(void *gui, int id)
Create new GUI with specified ID.
LineDrawingFlags
Flags for the DrawLine.
void getRGBbyPaletteAdr(const void *src_color, void *dst_color)
Copy color from the theme palette.
char * GetPaletteAdrByColorIndex(int index)
Get color from the phone theme.
int(* KeybMsgHookProc)(int submsg, int msg)
void StoreXYXYtoRECT(RECT *rect, int x, int y, int x2, int y2)
Initialize RECT by two points.
int RscMgr_CsSetColor(int id, const uint8_t *color)
Set a color for a theme color scheme element.
void RemoveKeybMsgHook(KeybMsgHookProc callback)
Remove global keyhook from the list.
void LCD_SetDrawingRegion(int x, int y, int x2, int y2)
Limit drawing region on current LCDLAYER (selected by current CEPID).
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 DrawCanvas(void *data, int x, int y, int x2, int y2, int flag_one)
"Canvas" is a really meaning for standard UI background.
LCDLAYER_LIST * RamLcdMainLayersList()
Pointer to the list of the LCDLAYER's (main).
void RscMgr_CsUpdate()
Update all theme colors.
UnicodeControlChars
UTF-16 control chars for DrawString, DrawScrollString and standart UI.
int CreateGUI_30or2(void *gui)
Create new GUI.
int PushDRWOBJOnLAYER(DRWOBJ *drwobj, LCDLAYER *layer)
Push DRWOBJ to the given LCDLAYER (without redraw!)
void DrwObj_Free(DRWOBJ *drwobj)
Free draw object internal resources.
void LCD_SetBufferDepth(char depth)
Set LCDLAYER buffer depth on current LCDLAYER (selected by current CEPID).
void SetDrawingCanvas(int x, int y, int x2, int y2)
Limit drawing region on current LCDLAYER (selected by current CEPID).
void LCDRedrawLAYER(LCDLAYER *layer)
Request redrawing of the given LCDLAYER (delayed).
void GeneralFuncF1(int cmd)
Request closing of the focused GUI.
void SetDepthBufferOnLCDLAYER(LCDLAYER *layer, char depth)
Set LCDLAYER buffer depth.
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 * FindGUIbyId(int id, CSM_RAM **csm)
Find GUI by ID.
int CreateGUI(void *gui)
Create new GUI.
char * RamPressedKey()
Pointer to the last pressed key.
void UnfocusGUI(void)
Unfocus focused GUI.
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.
void GeneralFuncF0(int cmd)
Unknown function.
@ FONT_MEDIUM_ITALIC_BOLD
@ FONT_NUMERIC_SMALL_BOLD
@ DRWOBJ_ELLIPSE_SECTION_LOWER_RIGHT
@ DRWOBJ_ELLIPSE_SECTION_UPPER_RIGHT
@ DRWOBJ_ELLIPSE_SECTION_UPPER_LEFT
@ DRWOBJ_ELLIPSE_SECTION_LOWER_LEFT
@ LONG_PRESS
Key longpress.
@ 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.
@ CSM_GUI_STATE_FOCUSED
GUI in focus.
@ CSM_GUI_STATE_CLOSED
GUI closed.
@ CSM_GUI_STATE_UNFOCUSED
GUI not in focus.
@ DRWOBJ_RECT_FILL_TYPE_PEN
Fill rectangle with pen color.
@ DRWOBJ_RECT_FILL_TYPE_NONE
Transparent.
@ DRWOBJ_RECT_FILL_TYPE_PATTERN
Fill rectangle with brush color using pattern.
@ DRWOBJ_RECT_FILL_TYPE_BRUSH
Fill rectangle with brush color.
@ TPC_POPUP_SELECT_FOREGROUD
@ TPC_PROGRESS_BAR_BACKGROUND
@ TPC_CALENDAR_FOREGROUND
@ TPC_LIGHT_TEXT_FOREGROUND
@ TPC_DISABLED_TEXT_FOREGROUND
@ TPC_CALENDAR_WEEKEND_BACKGROUND
@ TPC_EDIT_HEADER_FOREGROUND
@ TPC_POPUP_SELECT_BACKGROUD
@ TPC_CALENDAR_DAY_BACKGROUND
@ TPC_CALENDAR_EVENT_BACKGROUND
@ TPC_PROGRESS_BAR_BORDER
@ TPC_EXTRA_HEADER_FOREGROUND
@ TPC_LIGHT_TEXT_BACKGROUND
@ TPC_PROGRESS_BAR_FOREGROUND
@ TPC_WINDOW_HEADER_FOREGROUND
@ TEXT_UNDERLINE
Underline text.
@ TEXT_PASSWORD
Replace all character to the *
@ TEXT_OUTLINE
Add an outline to each character in the text.
@ TEXT_NOFORMAT
Disable text formatting using UnicodeControlChars.
@ TEXT_ALIGNRIGHT
Text align: RIGHT.
@ TEXT_INVERT
Invert color and background of the text.
@ TEXT_INVERT2
Invert color and background of the text.
@ TEXT_ALIGNLEFT
Text align: LEFT.
@ TEXT_ALIGNMIDDLE
Text align: CENTER.
@ RIGHT_BUTTON
RIGHT navkey.
@ RIGHT_SOFT
Right softkey.
@ DOWN_BUTTON
DOWN navkey.
@ GREEN_BUTTON
Green button.
@ MEDIA_BUTTON
Player key.
@ POC_BUTTON
Direct line key (EL71)
@ EL_PLAY_BUTTON
Player key (EL71)
@ ENTER_BUTTON
CENTER navkey.
@ VOL_DOWN_BUTTON
Volume-.
@ LEFT_BUTTON
LEFT navkey.
@ CAMERA_BUTTON
Camera key.
@ LCDLAYER_DEPTH_BGRA4444
@ LCDLAYER_DEPTH_ARGB8888
@ KEYHOOK_NEXT_NOT2GUI
Process key only to next keyhook, not to gui.
@ KEYHOOK_ENDQ
Break process and exit with or not processing in gui (selected by prev values 0/1)
@ KEYHOOK_BREAK
Break process and exit without processing in gui.
@ KEYHOOK_NEXT
Process key to next keyhook and to gui.
@ LINE_DOTTED
Dotted line.
@ LINE_DOTTED2
Dotted line (?)
@ UTF16_FONT_UNK4
Set font ot FONT_SMALL.
@ UTF16_ALIGN_RIGHT
Set TEXT_ALIGNRIGHT.
@ UTF16_NO_INVERTION
Clear TEXT_INVERT | TEXT_INVERT2.
@ UTF16_BG_COLOR_RGBA
Example: { UTF16_BG_COLOR_RGBA, 0xRRGG, 0xBBAA }.
@ UTF16_ALIGN_LEFT
Set TEXT_ALIGNLEFT.
@ UTF16_FONT_LARGE
Set font ot FONT_LARGE.
@ UTF16_FONT_SMALL_BOLD
Set font ot FONT_SMALL_BOLD.
@ UTF16_BG_COLOR
Example: { UTF16_BG_COLOR, PC_BACKGROUND }.
@ UTF16_FONT_UNK0
Set font ot FONT_SMALL.
@ UTF16_ALIGN_NONE
Clear TEXT_ALIGNLEFT | TEXT_ALIGNMIDDLE | TEXT_ALIGNRIGHT.
@ UTF16_BG_INVERTION2
Set TEXT_INVERT2.
@ UTF16_UNDERLINE
Set TEXT_UNDERLINE.
@ UTF16_FONT_UNK3
Set font ot FONT_SMALL_BOLD.
@ UTF16_BG_INVERTION
Set TEXT_INVERT.
@ UTF16_FONT_LARGE_BOLD
Set font ot FONT_LARGE_BOLD.
@ UTF16_FONT_UNK2
Set font ot FONT_SMALL.
@ UTF16_TEXT_COLOR
Example: { UTF16_TEXT_COLOR, PC_FOREGROUND }.
@ UTF16_FONT_SMALL
Set font ot FONT_SMALL.
@ UTF16_FONT_MEDIUM_BOLD
Set font ot FONT_MEDIUM_BOLD.
@ UTF16_TEXT_COLOR_RGBA
Example: { UTF16_TEXT_COLOR_RGBA, 0xRRGG, 0xBBAA }.
@ UTF16_FONT_RESET
Reset font to the default.
@ UTF16_ALIGN_CENTER
Set TEXT_ALIGNMIDDLE.
@ UTF16_NO_UNDERLINE
Clear TEXT_UNDERLINE.
@ UTF16_FONT_UNK1
Set font ot FONT_LARGE_BOLD.
@ UTF16_FONT_MEDIUM
Set font ot FONT_MEDIUM.
GUI description and state.
GUI GBS message for onKey callback.
LCD drawing layer container.
LCD drawing layer container (RAP).
Extended image header (without 255x255 limitation).
void *(* malloc_func_t)(size_t size)
malloc()
void(* mfree_func_t)(void *ptr)
free()