/** @file * Header file for GUI engine interfaces and structures. * * @author mandy.wu 2010/12/06 (Add duplicate controls' core struct) * @author tzungming.lin 2011/03/21 (Icon rotation support) * @version 0.1 */ #ifndef _WINDEF_H #define _WINDEF_H #include "gui_eng/stddefs.h" #define ICON_ID_INVALID (-1) /**< Invalid icon ID. */ #define STRING_ID_INVALID (-1) /**< Invalid string ID. */ #define DISABLED_LAST (0x77) #define ICON_LAST (0x7FFF) /**< Indicate the last element of icon ID list. */ #define STRING_LAST (0x7FFFFFFF) /**< Indicate the last element of string list. */ #define GEL_IGNORE_CHAR (0x11) /**< Code that is ignored while parsing a string. */ #define GEL_AA_ANCHOR_LAST (0xFF) /**< Indicate the last element of start indices of AA groups. */ #define INVILID_BLOCKID (0) /* */ /* State */ #define WIN_ACTIVE (1 << 0) #define WIN_NORMAL (1 << 1) #define STATE_NORMAL (1 << 0) #define STATE_FOCUSED (1 << 1) #define STATE_DISABLED (1 << 2) #define STATE_CLICKED (1 << 3) #define STATE_INVISIBLE (1 << 4) #define STATE_MAX (4) /* Styles for Menu/Popup */ /* Gray levels of Anti-aliasing for vector font support */ #define WS_AA_LEVEL_NONE (0) // Do not apply AA on 8bpp region. #define WS_AA_LEVEL_4 (1) // Use last (4-2) grayscale colors of palette. #define WS_AA_LEVEL_8 (1 << 1) // Use last (8-2) grayscale colors of palette. #define WS_AA_LEVEL_FULL (1 << 2) // Use full 256 color of palette. #define WS_AA_DISABLED (1 << 3) // Force AA to be disabled on all kind of region. #define WS_AA_MASK (0x0000000F) /* Number of groups of gray level colors for 8bpp anti-aliasing - 5-8 bits */ #define WS_AA_GROUP_NUM_MASK (0x000000F0) /* Common Styles - 0~20 bits*/ /* Grouped control direction */ #define CS_CTR_V (1) // Vitical #define CS_CTR_H (1 << 1) // Horizontal /* Icon style */ #define CS_SIDE_V (1 << 2) // Side icon virtical repeat #define CS_SIDE_H (1 << 3) // Side icon horizontal repeat #define CS_PIC_REPEAT (0x10 << 0) // Icon style: repeat #define CS_PIC_MIRROR (0x10 << 1) // Icon style: rot mirror #define CS_PIC_FLIP (0x10 << 2) // Icon style: rot flip /* Text alignment in horizontal */ #define CS_FONT_LEFT (0x10 << 3) // Text align: left in horizontal #define CS_FONT_CENTER (0x100 << 0) // Text align: center in horizontal #define CS_FONT_RIGHT (0x100 << 1) // Text align: right in horizontal #define CS_FONT_CP_DIR (0x100 << 2) // Text align: codepage display direction /* Text alignment in vertical */ #define CS_FONT_V_TOP (0x100 << 3) // Text align: top in vertical #define CS_FONT_V_CENTER (0x1000 << 0) // Text align: center in vertical #define CS_FONT_V_BOTTOM (0x1000 << 1) // Text align: bottom in vertical /* Text style */ #define CS_FONT_MARQUEE (0x1000 << 2) // Text style: marquee #define CS_DYN_STRING_NATIVE (0x1000 << 3) #define CS_DYN_STRING_EPG (0x10000 << 0) #define CS_DYN_STRING_UTF8 (0x10000 << 1) #define CS_DYN_STRING_UTF16_LE (0x10000 << 2) #define CS_DYN_STRING_UTF16_BE (0x10000 << 3) #define CS_DYN_STRING_UNICODE (CS_DYN_STRING_UTF8|CS_DYN_STRING_UTF16_LE|CS_DYN_STRING_UTF16_BE) #define CS_MARQUEE_STYLE_BITS (0xF0000000) #define CS_TEXT_STYLE_BOLD (0x100000) #define CS_TEXT_STYLE_ITALIC (0x100000 << 1) #define CS_AA_GROUP_IDX_MASK (0x0F000000) // Indicate the group index of AA. #define CS_SHADOW (0x10000000 << 0) /* Widget styles - 16bits */ /* CLASS_BACKGROUND */ #define S_BG_COLOR (0x1) #define S_BG_PICTURE (0x1 << 1) #define S_BG_MIX (0x1 << 2) /* CLASS_ICON */ #define S_ICON_H_LEFT (0x1) #define S_ICON_H_CENTER (0x1 << 1) #define S_ICON_H_RIGHT (0x1 << 2) #define S_ICON_V_TOP (0x1 << 3) #define S_ICON_V_CENTER (0x10) #define S_ICON_V_BOTTOM (0x10 << 1) #define S_ICON_ALL_ALIGN (0x3F) //(S_ICON_H_LEFT | S_ICON_H_CENTER | S_ICON_H_RIGHT | S_ICON_V_TOP | S_ICON_V_CENTER | S_ICON_V_BOTTOM) #define S_ICON_ROTATE_90 (0x10 << 2) #define S_ICON_ROTATE_180 (0x10 << 3) #define S_ICON_ROTATE_270 (0x100) #define S_ICON_ROTATE_ALL (0x1C0) // (S_ICON_ROTATE_90 | S_ICON_ROTATE_180 | S_ICON_ROTATE_270) #define S_ICON_MULTI_LINE_MODE (0x1000) /* CLASS_TEXT */ #define S_TXT_MULTI (0x1) #define S_TXT_EBK (0x1 << 1) #define S_TXT_EPG_DAILY (0X1 << 2) #define S_TXT_END_NO_POINT (0x10) #define S_TXT_END_3_POINT (0x20) #define S_TXT_END_NOT_ENOUGH (0x30) #define S_TXT_END_MASK (0x00000030) /* CLASS_ANIMATION */ #define S_ANIM_SWITCH (0X1) #define S_ANIM_STRETCH (0X1 << 1) #define S_ANIM_BLEND (0X1 << 2) #define S_ANIM_REPEAT (0X1 << 3) #define S_ANIM_SWITCH_PIC (0X1 << 4) /* CLASS_BORDER */ /* CLASS_BUTTON/ CLASS_BUTTON_GROUP*/ #define S_BTN_TEXT (0x1) #define S_BTN_ICON (0x1 << 1) #define S_BTN_MIX (0x1 << 2) #define S_BTNG_ROLLBACK (0x1 << 3) #define S_BTNG_ONEBYONE (0x10) #define S_BTNG_ACTIVE_MODE (0x10 << 1) #define S_BTNG_PAGE_MODE (0x10 << 2) /* Text style of each state of CLASS_BUTTON_GROUP */ #define S_BTNG_NORMAL_BOLD (0x100) #define S_BTNG_NORMAL_ITALIC (0x100 << 1) #define S_BTNG_FOCUS_BOLD (0x100 << 2) #define S_BTNG_FOCUS_ITALIC (0x100 << 3) #define S_BTNG_CLICK_BOLD (0x1000) #define S_BTNG_CLICK_ITALIC (0x1000 << 1) #define S_BTNG_DISABLE_BOLD (0x1000 << 2) #define S_BTNG_DISABLE_ITALIC (0x1000 << 3) /* CLASS_LISTVIEW */ #define S_LIST_ROLLBACK (0x1) #define S_LIST_ONEBYONE (0x1 << 1) #define S_LIST_ACTIVE_MODE (0x1 << 2) #define S_LIST_PAGE_MODE (0x1 << 3) /* Text style of each state of CLASS_LISTVIEW */ #define S_LIST_NORMAL_BOLD (0x10) #define S_LIST_NORMAL_ITALIC (0x10 << 1) #define S_LIST_FOCUS_BOLD (0x10 << 2) #define S_LIST_FOCUS_ITALIC (0x10 << 3) #define S_LIST_CLICK_BOLD (0x100) #define S_LIST_CLICK_ITALIC (0x100 << 1) #define S_LIST_DISABLE_BOLD (0x100 << 2) #define S_LIST_DISABLE_ITALIC (0x100 << 3) /* CLASS_COMBO */ #define S_COMBO_NUMBER (0x1) /* Item numbers */ #define S_COMBO_STRING_ID (0x1 << 1) /* Static assigned strings */ #define S_COMBO_TEXT (0x1 << 2) /* Dynamic assigned strings */ #define S_COMBO_SCROLL_LOCK (0x1 << 3) #define S_COMBO_ROLLBACK (0x10) /* CLASS_PROGRESS */ #define S_PROG_BASIC (0x1) #define S_PROG_PICTURE (0x1 << 1) #define S_PROG_FILL_BLOCKS (0x1 << 2) #define S_PROG_FILL_CONTINOUS (0x1 << 3) #define S_PROG_ROLLBACK (0x10) #define S_PROG_DISPLAY_NULL (0x10 << 1) #define S_PROG_DISPLAY_VALUE (0x10 << 2) #define S_PROG_DISPLAY_PERCENT (0x10 << 3) /* CLASS_SCROLL */ #define S_SCROLL_BASIC (0x1) #define S_SCROLL_PICTURE (0x1 << 1) #define S_SCROLL_SLIDER (0x1 << 2) /* CLASS_EDIT */ #define S_EDIT_HIDE_DIGITS (0x1) #define S_EDIT_UNDER_LINE (0x1 << 1) #define S_EDIT_DISP_MODE (0x1 << 2) #define S_EDIT_CURSOR_TWINKLE (0x1 << 3) #define CS_SHOW_STR_BORDER (0x1 << 0) #define CS_SHOW_ITEM_BORDER (0x1 << 1) /* Popup style */ typedef enum { NO_CAPTURE, CAPTURE = WIN_ACTIVE }pop_up_state_t; /** Return values of GEL APIs. */ typedef enum { /** Invalid parameter type in GEL_Get/SetParam(). */ GUI_PARAMTYPE = -7, /** Invalid pixel format. */ GUI_FORMAT = -6, /** Error related to initialization. */ GUI_INIT = -5, /** Unexpective NULL pointer. */ GUI_NULL = -4, /** Invalid input argument. */ GUI_INVARG = -3, /** Error occurs at memory allocation. */ GUI_MEMALLOC = -2, /** Error occurs. */ GUI_FAILURE = -1, /** No error occurs. */ GUI_SUCCESS = 0, /** Invalid input area or coordinates. */ GUI_AREA, /** Enabled region is overlap with others. */ GUI_REGION_OVERLAP, /** * Special used for CLASS_BUTTON_GROUP, CLASS_LISTVIEW and CLASS_COMBO to * indicate the selected index is disabled. */ GUI_ITEMDISABLE } GUIResult_e; /** Class type enumeration. */ typedef enum { CLASS_WINDOW = 0, /**< Menu */ CLASS_POPUP, /**< Popup menu */ CLASS_BACKGROUND, /**< Background */ CLASS_ICON, /**< Icon */ CLASS_TEXT, /**< Text box */ CLASS_ANIMATION, /**< Animation */ CLASS_BORDER, /**< Border */ CLASS_BUTTON, /**< Button */ CLASS_BUTTON_GROUP, /**< Button group */ CLASS_LISTVIEW, /**< Listview */ CLASS_PROGRESS, /**< Progress bar*/ CLASS_SCROLL, /**< Scroll bar*/ CLASS_COMBO, /**< Combo box */ CLASS_EDIT /**< Edit box */ } ClassType_e; /** Five states of GUI control. */ typedef enum { NORMAL_STATE = STATE_NORMAL, /**< */ FOCUS_STATE = STATE_FOCUSED, /**< */ DISABLED_STATE = STATE_DISABLED, /**< */ CLICK_STATE = STATE_CLICKED, /**< */ INVISIBLE_STATE = STATE_INVISIBLE /**< */ } State_e; /** Horizontal and vertical alignment. */ typedef enum { /* Basic alignemnt, do not use them */ _V_TOP = 10, _V_CENTER = 20, _V_BOTTOM = 30, _H_LEFT = 1, _H_CENTER = 2, _H_RIGHT = 3, /************************************/ TOP_LEFT = _V_TOP + _H_LEFT, /**< Vertical TOP and horizontal LEFT */ TOP_CENTER = _V_TOP + _H_CENTER, /**< Vertical TOP and horizontal CENTER */ TOP_RIGHT = _V_TOP + _H_RIGHT, /**< Vertical TOP and horizontal RIGHT */ MID_LEFT = _V_CENTER + _H_LEFT, /**< Vertical MIDDLE and horizontal LEFT */ MID_CENTER = _V_CENTER + _H_CENTER, /**< Vertical MIDDLE and horizontal CENTER */ MID_RIGHT = _V_CENTER + _H_RIGHT, /**< Vertical MIDDLE and horizontal RIGHT */ BOTTOM_LEFT = _V_BOTTOM + _H_LEFT, /**< Vertical BOTTOM and horizontal LEFT */ BOTTOM_CENTER = _V_BOTTOM + _H_CENTER, /**< Vertical BOTTOM and horizontal CENTER */ BOTTOM_RIGHT = _V_BOTTOM + _H_RIGHT /**< Vertical BOTTOM and horizontal RIGHT */ } Alignment_e; /** * Window Messages used by GEL_SendMsg().
* Note: The third parameter of GEL_SendMsg() is only applicable for WM_KEYDOWN. * Please fill 0 otherwise. */ typedef enum _window_message { /* Do nothing. */ WM_NULL = 0, /* * Attention: Following 3 window messages are not applicable for AP to use!! */ WM_CREATE, WM_DESTROY, WM_RESTORE_BG, /** Paint a widget according to the current attributes setting. */ WM_PAINT, WM_SETNORMAL, /**< Change state to NORMAL and repaint control. */ WM_SETFOCUS, /**< Change state to FOCUSED and repaint control. */ WM_SETCLICK, /**< Change state to CLICKED and repaint control. */ WM_SETDISABLE, /**< Change state to DISABLED and repaint control. */ WM_SETINVISIBLE,/**< Change state to INVISIBLE and repaint control. */ /** * Change the selected item to the previous one. If roll back style is enabled, it * would roll back to the last item if it is currently focused at first one.
* Support control types:
* CLASS_BUTTON_GROUP, CLASS_COMBO, CLASS_LISTVIEW, CLASS_PROGRESS, * CLASS_SCROLL, CLASS_TEXT with S_TXT_MULTI style. */ WM_SELECT_PREV, /** * Change the selected item to the next one. If roll back style is enabled, it * would roll back to the first item if it is currently focused at last one.
* Support control types:
* CLASS_BUTTON_GROUP, CLASS_COMBO, CLASS_LISTVIEW, CLASS_PROGRESS, * CLASS_SCROLL, CLASS_TEXT with S_TXT_MULTI style. */ WM_SELECT_NEXT, /** * Switch to the previous page. If ROLLBACK style is enabled, it would * roll back to the last page if it is currently focused at first page.
* Support control types:
* CLASS_BUTTON_GROUP, CLASS_LISTVIEW. */ WM_PAGE_UP, /** * Switch to the next page. If ROLLBACK style is enabled, it would * roll back to the first page if it is currently focused at last page.
* Support control types:
* CLASS_BUTTON_GROUP, CLASS_LISTVIEW. */ WM_PAGE_DOWN, /** * Performs the key down effect on CLASS_EDIT. It must catches a key value * at the third parameter in the GEL_SendMsg().
* Support key values: Please refer to #input_key_t. */ WM_KEYDOWN, /* * Performs Editbox cursor twinkling */ WM_TWINKLE, /* For update the block id */ WM_UPDATE, WM_ROLL_PREV, WM_ROLL_NEXT, WM_MARQUEE, /* Countinue change A vaule of widget color space to make the shadow effect*/ WM_SHADOW, /* Preserved message. */ WM_RESERVE, /* Indicate the count of all the window messages. */ WM_MSG_MAX } window_message_t; /** Enumeration of parameter types used for GEL_SetParam() or GEL_GetParam(). */ typedef enum _param_type { PARAM_SETNORMAL = 0, /**< Description: Modify the current state of a control to be NORMAL. */ PARAM_SETFOCUSED, /**< Description: Modify the current state of a control to be FOCUSED. */ PARAM_SETDISABLED, /**< Description: Modify the current state of a control to be DISABLED. */ PARAM_SETCLICKED, /**< Description: Modify the current state of a control to be CLICKED. */ PARAM_SETINVISIBLE, /**< Description: Modify the current state of a control to be INVISIBLE. */ /** * Description: Get the current state of target control.
* Type: #State_e* */ PARAM_STATE, /** * Description: Get the absolute area of target widget. That is, x and y coordinate, width and height.
* Type: RECT* */ PARAM_AREA, /** * Description: Get the relative area of target widget to the menu it belongs to. That is, x and y coordinate, width and height.
* Type: RECT* */ PARAM_REL_AREA, /** * Description: Get the text area of target widget.
* Type: RECT* */ PARAM_TEXT_AREA, /** * Description: Get the area of current focused item.
* Support: CLASS_LISTVIEW, CLASS_BUTTON_GROUP
* Type: RECT* */ PARAM_ITEM_AREA, /** * Description: Access the FPS of desired animation control.
* Support: CLASS_ANIMATION
* Type: INT32* */ PARAM_ANIM_FPS, /** * Description: Access first index attribute. Nagative value is legal, but it must be larger than -(page_count - 1). * That is, the legal range of first index is [-(page_count-1),total_count-1].
* Support: CLASS_LISTVIEW, CLASS_BUTTON_GROUP
* Type: INT32* */ PARAM_FIRST_INDEX, /** * Description: Access current index attribute. The legal range of current index is [0,total_count].
* Support: CLASS_LISTVIEW, CLASS_BUTTON_GROUP, CLASS_COMBO, CLASS_EDIT
* Type: INT32* */ PARAM_CURRENT_INDEX, /** * Description: Access clicked index of buttongroup or listview. The legal range of current index is [0,total_count].
* Support: CLASS_LISTVIEW, CLASS_BUTTON_GROUP
* Type: INT32* */ PARAM_CLICK_INDEX, /** * Description: Access first can be focused index of listview. The legal range of current index is [0,total_count].
* Support: CLASS_LISTVIEW
* Type: INT32* */ PARAM_FIRST_CAN_BE_FOCUS_INDEX, /** * Description: Access last can be focused index of listview. The legal range of current index is [0,total_count].
* Support: CLASS_LISTVIEW
* Type: INT32* */ PARAM_LAST_CAN_BE_FOCUS_INDEX, /** * Description: Access page count attribute.
* Support: CLASS_SCROLL, CLASS_LISTVIEW, CLASS_BUTTON_GROUP, CLASS_COMBO
* Type: INT32* */ PARAM_PAGE_COUNT, /** * Description: Access total count attribute.
* Support: CLASS_SCROLL, CLASS_LISTVIEW, CLASS_BUTTON_GROUP, CLASS_COMBO
* Type: INT32* */ PARAM_TOTAL_COUNT, /*************************************************/ /** * Description: Access minimum value.
* Support: CLASS_PROGRESS
* Type: INT32* */ PARAM_MIN_VALUE, /** * Description: Access maximum value attribute.
* Support: CLASS_PROGRESS
* Type: INT32* */ PARAM_MAX_VALUE, /** * Description: Access current value attribute of progress bar or scroll bar. * Negative value is illegal in CLASS_SCROLL.
* Support: CLASS_PROGRESS, CLASS_SCROLL
* Type: INT32* */ PARAM_CURRENT_VALUE, /** * Description: Access step value attribute of progress bar.
* Support: CLASS_PROGRESS
* Type: INT32* */ PARAM_STEP_VALUE, /*************************************************/ /** * Description: Access dynamic string (list). * - Add STRING_LAST at the end of the dynamic string list. Here is an example * of setting STRING_LAST:
* memcpy(dynStr[last], &string_last, sizeof(STRING_LAST)); * - AP must keeps dynamic string list, please make sure that the list * should not be released or falsified unexpectedly. * * Support: CLASS_TEXT, CLASS_LISTVIEW, CLASS_COMBO
* Type: UINT8* for CLASS_TEXT. UINT8** for CLASS_LISTVIEW and CLASS_COMBO. */ PARAM_DYNAMIC_STRING, /** * Description: Access static string ID. * - Add STRING_LAST at the end of the string ID list. * - Please make sure that each string ID must not be larger than maximum * language count of your UI project. * - AP must keeps static string ID list, please make sure that the list * should not be released or falsified unexpectedly. * * Support: CLASS_BUTTON, CLASS_BUTTON_GROUP, CLASS_LISTVIEW, CLASS_TEXT, CLASS_COMBO
* Type: String_id_t** for CLASS_COMBO and CLASS_LISTVIEW (reference to a list of String_id_t*) * String_id_t* otherwise. (reference to a String_id_t) */ PARAM_STATIC_STRING, /** * Description: Fix width of each character displayed on OSD. It would not be applied if * such value is 0. The range is expected to be [0,255]
* Support: CLASS_BUTTON, CLASS_BUTTON_GROUP, CLASS_COMBO, CLASS_EDIT, * CLASS_LISTVIEW, CLASS_PROG, CLASS_TEXT
* Type: INT32* */ PARAM_FIX_CHAR_WIDTH, /** * Description: Access foreground icon ID.
* Support: CLASS_BUTTON, CLASS_BUTTON_GROUP, CLASS_ANIMATION
* Type: INT16* * Note: CLASS_BUTTON would regart input parameter as a pointer to an icon id, * but CLASS_BUTTON_GROUP/CLASS_ANIMATION would regart it as a dynamic array of icon ids. */ PARAM_ICON_ID, PARAM_FOCUSED_ICON_ID, PARAM_FOCUSED_ICON, /** * Description: Access foreground icon ID of each state.
* Support: CLASS_ICON
* type: icon_info_t* */ PARAM_ICON_INFO, /** * Description: Access both vertical and horizontal alignment of an icon widget.
* Support: CLASS_ICON
* Type: Alignment_e* */ PARAM_ICON_ALIGNMENT, /** * Description: Access both vertical and horizontal alignment of text widget.
* Support: Which has text alignment(only for setting)
* Type: Alignment_e* */ PARAM_TEXT_ALIGNMENT, /** * Description: Get the current text of EditBox.
* Support: CLASS_EDIT
* Type: UINT8* */ PARAM_CURRENT_TEXT, /** * Description: Access the pattern text of EditBox. The length of pattern should NOT be changed.
* Support: CLASS_EDIT
* Type: UINT8* */ PARAM_PATTERN_TEXT, /** * Description: Get the max number of digit of a EditBox.
* Support: CLASS_EDIT
* Type: INT32* */ PARAM_MAX_DIGIT, /** * Description: Enable/disable display mode of EditBox.
* Support: CLASS_EDIT
* Type: BOOLEAN*, set TRUE to enable the display mode, FALSE otherwise. */ PARAM_DISPLAY_MODE, /** * Description: Set specific item to be enable. * Input paramter is the index of target item. * The legal range of input index is [0,total_count]
* Support: CLASS_BUTTON_GROUP, CLASS_LISTVIEW
* Type: INT32* , the index of target item. */ PARAM_ITEM_ENABLE, /** * Description: Set specific item to be disable. * Input paramter is the index of target item. * The legal range of input index is [0,total_count]
* Support: CLASS_BUTTON_GROUP, CLASS_LISTVIEW
* Type: INT32* , the index of target item. */ PARAM_ITEM_DISABLE, /** * Description: Enable active mode or not.
* Support: CLASS_BUTTON_GROUP, CLASS_LISTVIEW
* Type: BOOLEAN* */ PARAM_ACTIVE_MODE, /** * Description: Enable active mode or not.
* Support: CLASS_BUTTON_GROUP, CLASS_LISTVIEW
* Type: BOOLEAN* */ PARAM_PAGE_MODE, /** * Description: Set current line of a multiline-style text box.
* Support: CLASS_TEXT
* Type: INT32* */ PARAM_CURRENT_LINE, /** * Description: Set step lines of a multiline-style text box.
* Support: CLASS_TEXT
* Type: INT32* */ PARAM_STEP_LINES, /** * Description: Get total lines of a multiline-style text box.
* Support: CLASS_TEXT
* Type: INT32* */ PARAM_TOTAL_LINES, /** * Description: Get page lines of a multiline-style text box.
* Support: CLASS_TEXT
* Type: INT32* */ PARAM_PAGE_LINES, /** * Description: Get lines positions of a multiline-style text box.
* Support: CLASS_TEXT
* Type: UINT8*** */ PARAM_LINES_POSITION, /** * Description: Access the fixed line height of a multiline-style text box. * It would not be applied if such value is set to be 0. * The range of input value is expected to be [0,255].
* Support: CLASS_TEXT
* Type: INT32* */ PARAM_FIX_LINE_HEIGHT, /** * Description: Get the string width according to current state of widget.
* Support: CLASS_TEXT
* Type: INT32* */ PARAM_STRING_WIDTH, /** * Description: Get the string height according to current state of widget.
* Support: CLASS_TEXT
* Type: INT32* */ PARAM_STRING_HEIGHT, /** * Description: Get the string height according to current state of widget.
* Support: CLASS_TEXT
* Type: GEL_TextEndStyle_e* */ PARAM_END_STYLE, /** * Description: Access foreground text color of related widgets.
* Support: CLASS_BUTTON, CLASS_BUTTON_GROUP, CLASS_COMBO, CLASS_EDIT, CLASS_LISTVIEW, CLASS_PROGRESS, CLASS_TEXT
* Type: text_color_info_t* for SET, #text_color_info_t** for GET */ PARAM_FGTEXT_COLOR, /** * Description: Access background color of all kinds of widget except CLASS_ANIMATION, CLASS_BORDER and CLASS_ICON.
* Type: color_info_t* for SET, #color_info_t** for GET */ PARAM_BGCOLOR, /*************************************************/ /* Ebook Related Parameter Types */ /*************************************************/ /** * Description: Access the single string buffer size. This value is assigned by user. Default is 0.
* Support: CLASS_TEXT with S_TXT_EBK.
* Type: INT32* (in byte) */ PARAM_EBK_BUF_SIZE, /** * Description: Get the current page displayed at this textbox.
* Support: CLASS_TEXT with S_TXT_EBK.
* Type: INT32* */ PARAM_EBK_CURRENT_PAGE, /** * Description: Get the total page of this textbox.
* Support: CLASS_TEXT with S_TXT_EBK.
* Type: INT32* */ PARAM_EBK_TOTAL_PAGES, /** * Description: Set/Get the index of AA group.
* Support: All kinds of control except CLASS_WINDOW and CLASS_POPUP. * Type: INT32*, but the valid range of input is [0,14]. */ PARAM_AA_GROUP_IDX, /** * Description: Set/Get the number of level of gray scale colors for AA.
* Support: CLASS_WINDOW or CLASS_POPUP * Type: FONT_AA_Level_e* */ PARAM_WIN_AA_LEVEL, #if 0 /** * Description: Set/Get the number of groups of gray level colors for AA.
* Support: CLASS_WINDOW or CLASS_POPUP * Type: INT32*, but the legal range is [0,15]. */ PARAM_WIN_AA_GROUP_NUM, #else /** * Description: Set the start indices of each AA group, put GEL_AA_ANCHOR_LAST at the end * so that engine can.
* Support: CLASS_WINDOW or CLASS_POPUP * Type: INT32*, list of start indices. */ PARAM_WIN_AA_ANCHORS, #endif /** * Description: Enable/Disable AA on target menu.
* Support: CLASS_WINDOW or CLASS_POPUP * Type: BOOLEAN* */ PARAM_WIN_AA_ENABLE, /* * Description: Set particular Style of the widget.
*/ PARAM_PARTICULAR_SYSTLE, /* * Description: Set enter multi-line mode.
*/ PARAM_ENTER_MULTI_LINE, /* * Description: Set one line count of multi-line mode
*/ PARAM_LINE_BLOCK_NUM, /* * Description: Set current block index multi-line mode .
*/ PARAM_CURRENT_BLOCK_INDEX, /* * Description:Release the line blocks of multi-line mode.
*/ PARAM_FREE_LINE_BLOCK, /** * Description: Set textbox ebook unkown char.
* Support: CLASS_TEXT only ebook.
* Type: UINT16* */ PARAM_UNKNOWN_CHAR, /** * Description: Set textbox ebook show ellipsis at last line if total line is big than page line.
* Support: CLASS_TEXT multi-line.
* Type: UINT8* */ PARAM_SHOW_ELLIPSIS, /** * Description: Set string char space in the widget.
* Support: Current only support edit.
* Type: UINT16* */ PARAM_CHAR_SPACE, /** * Description: Set the widget to make shadow effect.
* Support: Current only support board.
* Type: UINT8* */ PARAM_SHADOW, /** * Description: Set the widget max alpha value for shadow effect.
* Support: Current only support board.
* Type: UINT8* */ PARAM_MAX_ALPHA, /** * Description: Set the widget min alpha value.
* Support: Current only support board.
* Type: UINT8* */ PARAM_MIN_ALPHA, /** * Description: Set the widget alpha change step for shadow effect.
* Support: Current only support board.
* Type: UINT8* */ PARAM_ALPHA_STEP, /** * Description: Set button group item space in the widget.
* Support: Current only support button group.
* Type: UINT16* */ PARAM_ITEM_SPACE, /** * Description: Set button group , listview, text, button , edit control * focused state string border .
* Type: UINT8* */ PARAM_FOCUSED_STR_BORDER, /** * Description: Set button group , listview, text, button , edit control * focused state item border .
* Type: UINT8* */ PARAM_FOCUSED_BORDER, PARAM_ROLL_STATE, /* * Preserved parameter type. It is not used. */ PARAM_PRESERVE, /* Specify the last element of ParamType_e. Not a valid parameter type. */ PARAM_MAX } ParamType_e; typedef enum { ROLL_NULL, ROLL_PREV, ROLL_NEXT, }RollType; /* Object types */ typedef enum { OBJ_PEN = 0, OBJ_BRUSH, } obj_type_t; /* Brush Styles */ typedef enum { BS_SOLID = 0, BS_NULL }brush_style_t; /* Pen Styles */ typedef enum { PS_SOLID = 0, PS_NULL }pen_style_t; /* GDI object hdr */ typedef struct { obj_type_t type; /* object type */ BOOLEAN stockobj; /* TRUE if stock (unallocated) object */ } GDIOBJHDR; typedef struct { GDIOBJHDR hdr; pen_style_t style; /* pen style*/ Color_t color; /* pen color*/ INT32 width; } PENOBJ; typedef struct { GDIOBJHDR hdr; brush_style_t style; /* brush style */ Color_t color; /* brush color */ } BRUSHOBJ; struct hgdiobj { GDIOBJHDR hdr; /* all gdi object start with this hdr*/ }; /* Different types of object types */ typedef struct hgdiobj *obj_ptr; typedef struct hgdiobj *brush_ptr; typedef struct hgdiobj *pen_ptr; /* Handle to window */ typedef struct hwnd *HWND; typedef struct hdc *HDC; typedef struct _win_control_struct_t_ WinControl_t; typedef struct _win_control_struct_ex_t_ WinControlEx_t; typedef INT32 (*WNDPROC)(HWND hwin, window_message_t mesg, UINT32 dWinFlags, UINT32 dKeyInput); typedef struct _shadow_param { UINT8 max_alpha; UINT8 min_alpha; UINT8 alpha_step; UINT16 timer_accumulator; }shadow_param; typedef struct _WNDCLASS { LIST link; /* microwin*/ UINT32 style; WNDPROC wind_proc; ClassType_e type; } WNDCLASS, *PWNDCLASS; struct hwnd { WNDCLASS *class_ptr; /* window class*/ HWND parent; /* parent object */ HWND child; /* child object */ HWND next; /* next obj in a control list */ HWND prev; /* prev obj in a control list */ HWND focus; /* focused obj in a control list */ HWND focus_border; /* focused item border*/ HDC owndc; UINT8 *tempAddr; /* The addr of the temp buffer */ RECT tempSurfPos; /* The pos of tempSurf to be drawn on OSD. */ UINT8 *marqTempBgAddr; /* To save marquee bg during rendering control on rgn buf. */ INT16 ctrlOffsetX; /* Used for rendering control to a region buffer */ INT16 ctrlOffsetY; /* Used for rendering control to a region buffer */ INT16 scaledWidth; /* Desired width */ INT16 scaledHeight; /* Desired height */ WinControl_t *control; PALENTRY *pDynPal; /* Dynamic assigned palette to the handle */ INT32 sdBlitId; /* blit id */ UINT32 status; /* window had WM_PAINT PostMessage*/ void *pDefaultWinCtl; /* Pointer to the default win control struct */ INT32 *pBlockID; /* pointer to its block ids */ UINT8 char_space; /* Color of select character */ UINT32 showBorder; /* Show focused border */ UINT32 uiBlockNum; LIST regionLink; /* linking all controls belong to one region */ shadow_param shadow; /* shadow effect parameter */ UINT8 isFlipHoriz; }; /* Device Context */ struct hdc { RegionHandle_t region_handle; /* region handle index*/ HWND hwnd; /* associated window*/ Color_t fgColor; /* foreground color */ Color_t bgColor; /* text background color*/ INT32 bgMode; /* background mode, not used now */ BRUSHOBJ *brush; /* current brush*/ PENOBJ *pen; /* current pen*/ UiLANGName_t privateLang; /* language info */ }; /* Window and Controls common data structure */ struct _win_control_struct_t_ { HWND handle; /* Dynamic generated handle */ ClassType_e type; /* Type of the widget */ UINT32 c_style; /* Common styles of the widget */ UINT16 p_style; /* Particular styles of the widget */ UINT16 state; /* States of the widget */ struct { UINT8 normal_font_style; UINT8 focus_font_style; UINT8 click_font_style; UINT8 disable_font_style; } win_control_str_style_t; INT16 x; /* X coordinate of the widget */ INT16 y; /* Y coordinate of the widget */ UINT16 width; /* Width of a rectangular area to be drawn */ UINT16 height; /* Height of a rectangular area to be drawn */ UINT32 region; /* Region index */ void *param; /* Pointer to its specific params */ void *subparam; /* Pointer to its child control list */ }; /* Extented version of Window and Controls common data structure */ struct _win_control_struct_ex_t_ { HWND handle; /* Dynamic generated handle */ ClassType_e type; /* Type of the widget */ UINT32 c_style; /* Common styles of the widget */ UINT16 p_style; /* Particular styles of the widget */ UINT16 state; /* States of the widget */ struct { UINT8 normal_font_style; UINT8 focus_font_style; UINT8 click_font_style; UINT8 disable_font_style; } win_control_str_style_t; INT16 x; /* X coordinate of the widget */ INT16 y; /* Y coordinate of the widget */ UINT16 width; /* Width of a rectangular area to be drawn */ UINT16 height; /* Height of a rectangular area to be drawn */ UINT32 region; /* Region index */ void *param; /* Pointer to its specific params */ void *subparam; /* Pointer to its child control list */ struct { FONTSize_t normal_font_size; FONTSize_t focus_font_size; FONTSize_t click_font_size; FONTSize_t disable_font_size; } win_control_font_size_t; }; /* Applet */ typedef struct _STRUCT_APPLET { UINT16 focused_item; /* The focused child widget */ UINT16 no_of_controls; /* Number of the child widgets */ WinControl_t *control_list; /* Point to a child control list */ } STRUCT_APPLET; /* Common core structure */ typedef struct _icon_info_t_ { INT16 normal_id; /* The icon for STATE_NORMAL */ INT16 focused_id; /* The icon for STATE_FOCUSED */ INT16 clicked_id; /* The icon for STATE_CLICKED */ INT16 disabled_id; /* The icon for STATE_DISABLED */ } icon_info_t; typedef struct _color_info_t_ { Color_t normal_color; /* The color for STATE_NORMAL */ Color_t focused_color; /* The color for STATE_FOCUSED */ Color_t clicked_color; /* The color for STATE_CLICKED */ Color_t disabled_color; /* The color for STATE_DISABLED */ } color_info_t; typedef struct _text_color_info_t_ { UINT8 normal_color; /* The index of the region palette for STATE_NORMAL */ UINT8 focused_color; /* The index of the region palette for STATE_FOCUSED */ UINT8 clicked_color; /* The index of the region palette for STATE_CLICKED */ UINT8 disabled_color; /* The index of the region palette for STATE_DISABLED */ } text_color_info_t; typedef struct _marquee_info_t_ { RECT string_area; /* Indicate current displayed area to the whole string buffer */ RECT bg_area; /* Indicate the string displayed area to a hdc */ RECT bgScale_area; /* */ RECT circle_area; /* The second half src rect for GEL_MARQUEE_CIRCLE */ UINT8 *fg_data; /* Pointer to capture whole foreground text */ UINT8 *bg_data; /* Pointer to capture the background */ UINT16 interval; /* Update interval to record how long to update once */ UINT16 timer_accumulator; /* Accumulate timer update times for the animation control */ const PALENTRY *pMarqPal; /* Palette for anti-aliased marquee on16/32 bit region. */ BOOL isL2Rstr; #ifdef CONFIG_FONT_ENGINE_HARFBUZZ UINT8 bFgColor; /* The index value of text filling color. */ UINT8 bBgColor; /* The index value of text bg color. */ #endif } marquee_info_t; /* CLASS_BACKGROUND */ typedef struct _background_t { color_info_t *color; /* background color */ icon_info_t *icon; /* background bitmap id */ } bg_t; /* CLASS_ICON */ typedef struct _icon_t { icon_info_t *icon; IMAGEHDR image[STATE_MAX]; UINT32 line_num; UINT32 block_index; } icon_t; #define PARTIALCODE_LENGH 2048 /* CLASS_TEXT */ typedef struct _text_box_single_line_t { INT32 lang_name; /* Language to be shown for the text box */ color_info_t *bg_color; /* Background of the text box */ text_color_info_t *text_color; /* Text color */ RECT text_pos; /* Text position */ String_id_t string_id; /* Static string */ UINT8 *string; /* Dynamic assigned string*/ marquee_info_t *marquee_info; /* If CS_FONT_MARQUEE is enabled, point to a marquee_info_t struct */ UINT8 bFixCharWidth; /* Fix width of each character displayed on screen */ UINT32 line_num; UINT32 block_index; } text_box_t; typedef struct _text_box_ebook_t { UINT16 *pFcpOffset; /* FCP table that stores byte offset of each FCP related to text file */ UINT16 *pBufOffset; UINT32 dBufSize; /* String buffer size decided by AP */ UINT32 dBufNum; /* Total buffer number of this ebook text file */ UINT32 dCurrentPage; /* Current rendered page number */ UINT32 dTotalLines; /* Accumulated total lines of string buffers sent by AP */ UINT16 wReservWidth; UINT8 bSync; UINT16 unknownChar; /* text unknown char */ BOOLEAN bReady; /* Indicate that WM_SELECT_NEXT/PREV had been done */ struct { UINT8 pPartialCode[PARTIALCODE_LENGH]; /* The front part of an incomplete code. */ UINT32 bCodeLength; /* The actual length of this incomplete code. */ } stCodeFragment; } text_box_ebk_t; typedef struct { UINT16 usTotalLine; UINT16 usPageLine; UINT16 usCurrLine; UINT16 usDrwaLine;//witch line has draw. UINT32 usCurrCharOffset; UINT16 usReservWidth; /* input the reserved width of the first line, and output the width of last line */ void* TxtInfo; } pgrhInfo_t, *PPgrhInfo_t; typedef struct _text_box_dyn_info_t { UINT16 wStepLines; /**< Step of line index while scrolling. */ UINT8 bFixLineHeight; /**< Fix line height setting. */ UINT8 bMaxLineHeight; /**< Max line height. */ UINT8 bMaxBaseDist; /**< Max distance from top of a glyph to baseline. */ UINT8 bShowEllipsis; pgrhInfo_t stPgrhInfo; } text_box_dyn_t; typedef struct _text_box_multi_line_t { text_box_t *text_info; /* Text info */ text_box_ebk_t *ebk_info; /* Information about ebook */ text_box_dyn_t *dyn_info; /**< Dynamically created attributes. */ UINT8 line_spacing; /* Spacing between lines */ } text_box_multi_t; /* CLASS_ANIMATION */ typedef struct _animation_into_t { INT16 icon_id; /* The icon id */ UINT16 total_frame_count; /* Total frame count of the animation */ UINT16 fps; /* Frame per second of the animation (must be 1~30) */ UINT16 current_frame_count; /* Total frame count of the animation */ UINT16 interval; /* Update interval to record how long to update once */ UINT16 timer_accumulator; /* Accumulate timer update times for the animation control */ void *pBufSurf; /* Buffer that restore a frame while performing animation */ INT16 *icon_list; /* The switch icon list */ } anim_info_t; typedef struct _animation_switch_t { anim_info_t *anim_info; /* Pointer to a anim_info_t */ UINT16 frame_width; /* Width per frame */ UINT16 frame_height; /* Height per frame */ UINT16 frame_num; /* Number of frames in the icon to be switched */ UINT16 frame_index; /* 0 as default. Index of current focused frame in the icon */ } anim_switch_t; typedef struct _animation_stretch_t { anim_info_t *anim_info; /* Pointer to a anim_info_t */ RECT initial_size; /* Initial size of an icon animation */ RECT target_size; /* Target size of an icon animation */ } anim_stretch_t; typedef struct _animation_blend_t { anim_info_t *anim_info; /* Pointer to a anim_info_t */ UINT8 initial_alpha_value; /* Initial alpha value from 0 ~ 255 */ UINT8 target_alpha_value; /* Target alpha value from 0 ~ 255 */ } anim_blend_t; /* CLASS_BORDER */ typedef struct _border_t { color_info_t *color; /* Border color */ icon_info_t *icon; /* Icon for the angles */ UINT16 thickness; /* Border thickness */ } border_t; /* CLASS_BUTTON */ typedef struct _button_text_t { RECT btn_pos; /* Position of the button */ color_info_t *bg_color; /* Background color */ icon_info_t *bg_icon; /* Background icon */ UINT16 side_size; /* Size of a single side icon */ UINT8 bFixCharWidth; text_color_info_t *text_color; /* Foreground text color */ RECT text_pos; /* Position of foreground text */ String_id_t string_id; /* Foreground text */ marquee_info_t *marquee_info; /* If CS_FONT_MARQUEE is enabled, point to a marquee_info_t struct */ IMAGEHDR image[STATE_MAX]; } btn_text_t; typedef struct _button_icon_t { RECT btn_pos; /* Position of the button */ color_info_t *bg_color; /* Background color */ icon_info_t *bg_icon; /* Background icon */ UINT16 side_size; /* Size of a single side icon */ INT16 fg_icon_id; /* Foreground icon */ IMAGEHDR image[STATE_MAX]; } btn_icon_t; typedef struct _button_mix_t { RECT btn_pos; /* Position of the button */ color_info_t *bg_color; /* Background color */ icon_info_t *bg_icon; /* Background icon */ UINT16 side_size; /* Size of a single side icon */ UINT8 bFixCharWidth; /* Fix width of each character displayed on screen */ text_color_info_t *text_color; /* Foreground text color */ String_id_t string_id; /* Foreground text */ INT16 fg_icon_id; /* Foreground icon */ RECT fg_text_pos; /* Position of the foreground text */ RECT fg_icon_pos; /* Position of the foreground icon */ marquee_info_t *marquee_info; /* If CS_FONT_MARQUEE is enabled, point to a marquee_info_t struct */ IMAGEHDR image[STATE_MAX]; } btn_mix_t; /* CLASS_BUTTON_GROUP */ typedef struct _button_group_text_t { color_info_t *bg_color; /* Background color */ icon_info_t *bg_icon; /* Background icon for buttons */ UINT16 side_size; /* Size of a single side icon */ RECT first_item_pos; /* Position of the first item */ RECT text_pos; /* Position of the foreground of the first item of normal state. */ INT16 focus_text_offset; /* Offset related to text_pos for focused item */ text_color_info_t *text_color; /* Foreground string color */ String_id_t *string_id; /* Foreground string list for buttons */ UINT16 space; /* Space between buttons */ UINT16 page_count; /* Buttons count per page */ UINT16 total_count; /* Total buttons count */ INT16 first_index; /* First button index */ INT16 btn_index; /* Focused button index */ INT16 btn_clicked_index; /* Clicked button index */ UINT8 bFixCharWidth; /* Fix width of each character displayed on screen */ marquee_info_t *marquee_info; /* If CS_FONT_MARQUEE is enabled, point to a marquee_info_t struct */ UINT8 *disabled_list; /* List to indicate disabled items */ IMAGEHDR image[STATE_MAX]; } btng_text_t; typedef struct _button_group_icon_t { color_info_t *bg_color; /* Background color */ icon_info_t *bg_icon; /* Background icon for buttons */ UINT16 side_size; /* Size of a single side icon */ RECT first_item_pos; /* Position of the first item */ INT16 *fg_icon_id; /* Foreground icon list for buttons */ UINT16 space; /* Space between buttons */ UINT16 page_count; /* Buttons count per page */ UINT16 total_count; /* Total buttons count */ INT16 first_index; /* First button index */ INT16 btn_index; /* Focused button index */ INT16 btn_clicked_index; /* Clicked button index */ UINT8 *disabled_list; /* List to indicate disabled items */ INT8 roll_type; /* roll type */ INT16 offset; /* offset when do roll */ INT16 *focused_icon_id; /* Foreground Focused icon list for buttons */ UINT32 interval; IMAGEHDR image[STATE_MAX]; } btng_icon_t; typedef struct _button_group_mix_t { color_info_t *bg_color; /* Background color */ icon_info_t *bg_icon; /* Background icon for buttons */ UINT16 side_size; /* Size of a single side icon */ RECT first_item_pos; /* Position of the first item */ text_color_info_t *text_color; /* Foreground string color */ String_id_t *string_id; /* Foreground string list for buttons */ INT16 *fg_icon_id; /* Foreground icon list for buttons */ RECT fg_text_pos; /* Position of the foreground text */ RECT fg_icon_pos; /* Position of the foreground icon */ UINT16 space; /* Space between buttons */ UINT16 page_count; /* Buttons count per page */ UINT16 total_count; /* Total buttons count */ INT16 first_index; /* First button index */ INT16 btn_index; /* Focused button index */ INT16 btn_clicked_index; /* Clicked button index */ UINT8 bFixCharWidth; /* Fix width of each character displayed on screen */ marquee_info_t *marquee_info; /* If CS_FONT_MARQUEE is enabled, point to a marquee_info_t struct */ UINT8 *disabled_list; /* List to indicate disabled items */ INT8 roll_type; /* roll type */ INT16 offset; /* offset when do roll */ INT16 *focused_icon_id; /* Foreground Focused icon list for buttons */ UINT32 interval; IMAGEHDR image[STATE_MAX]; } btng_mix_t; /* CLASS_LISTVIEW */ typedef struct _listview_color_t { Color_t bg_color_odd; /* Background color for odd items */ Color_t bg_color_even; /* Background color for even items */ Color_t focus_color; /* Background color for the focused item */ Color_t click_color; /* Background color for the clicked item */ } list_color_t; typedef struct _listview_t { list_color_t *color; /* Color information */ INT16 focus_icon; /* An icon to show on the focused item */ INT16 click_icon; /* An icon to show on the clicked item */ UINT16 side_size; /* Size of a single side icon */ RECT first_item_pos; /* Position of the first item */ RECT focus_color_pos; /* Pos of the rect on the focused item */ RECT focus_icon_pos; /* Pos of the icon on the focused item */ RECT text_pos; /* Pos of the foreground text of unfocused items */ INT16 focus_text_offset; /* Offset related to text_pos for focused item */ text_color_info_t *text_color; /* Fg text color */ String_id_t *string_id; /* Static string list */ UINT8 **string; /* Dynamic string list */ UINT16 space; /* Space between lists */ UINT16 page_count; /* List count per page */ UINT16 total_count; /* Total list count */ INT16 first_index; /* First list index */ INT16 list_index; /* Focused list index */ INT16 list_clicked_index; /* Clicked button index */ UINT8 bFixCharWidth; /* Fix width of each character displayed on screen */ marquee_info_t *marquee_info; /* If CS_FONT_MARQUEE is enabled, point to a marquee_info_t struct */ UINT8* disabled_list; /* List to indicate disabled items */ IMAGEHDR image[STATE_MAX]; } listview_t; /* CLASS_PROGRESS */ typedef struct _progress_bar_color_t { Color_t focus_fill_color; Color_t focus_clear_color; Color_t disable_fill_color; Color_t disable_clear_color; Color_t normal_fill_color; Color_t normal_clear_color; Color_t click_fill_color; Color_t click_clear_color; } prog_color_t; typedef struct _progress_bar_icon_t { INT16 focus_fill_id; INT16 focus_clear_id; INT16 disable_fill_id; INT16 disable_clear_id; INT16 normal_fill_id; INT16 normal_clear_id; INT16 click_fill_id; INT16 click_clear_id; } prog_icon_t; /* Structure progress bar */ typedef struct _progress_bar_basic_t { RECT bar_pos; /* Position of the progress bar */ INT16 max_value; /* Maximum setting value */ INT16 min_value; /* Minimum setting value */ INT16 value; /* Current value */ INT16 step_value; /* Change value for a step */ prog_color_t *bar_color; /* Color of a progress bar */ UINT8 block_thickness; /* Block thickness if PROG_FILL_BLOCKS */ UINT8 block_gap; /* Block gap if PROG_FILL_BLOCKS */ UINT8 bFixCharWidth; /* Fix width of each character displayed on screen */ text_color_info_t *text_color; /* Color of the displayed text */ RECT text_pos; /* Position of the displayed text */ } prog_basic_t; typedef struct _progress_bar_picture_t { RECT bar_pos; /* Position of the progress bar */ INT16 max_value; /* Maximum setting value */ INT16 min_value; /* Minimum setting value */ INT16 value; /* Current value */ INT16 step_value; /* Change value for a step */ prog_icon_t *bar_icon; /* Icon of a progress bar */ UINT16 side_size; /* Size of a single side icon */ UINT8 bFixCharWidth; /* Fix width of each character displayed on screen */ text_color_info_t *text_color; /* Color of the displayed text */ RECT text_pos; /* Position of the display text */ } prog_pic_t; /* CLASS_SCROLL */ typedef struct _scroll_bar_basic_t { RECT bar_pos; /* Position of the scroll bar */ INT16 total_count; /* Total items */ INT16 page_count; /* Items count per page */ INT16 value; /* Current value */ INT16 slider_size; /* H: slider width, V: slider height */ prog_color_t *bar_color; /* Color of a scroll bar */ } scroll_basic_t; typedef struct _scroll_bar_picture_t { RECT bar_pos; /* Position of the scroll bar */ INT16 total_count; /* Total items */ INT16 page_count; /* Items count per page */ INT16 value; /* Current value */ INT16 slider_size; /* H: slider width, V: slider height */ prog_icon_t *bar_icon; /* Icon of a scroll bar */ UINT16 side_size; /* Size of a single side icon */ } scroll_pic_t; /* CLASS_COMBO */ typedef struct _combo_box_t { RECT combo_pos; /* Position of the combo box */ color_info_t *bg_color; /* Background color */ icon_info_t *bg_icon; /* Background icon */ UINT16 side_size; /* Size of a single side icon */ UINT8 bFixCharWidth; /* Fix width of each character displayed on screen */ text_color_info_t *text_color; /* Foreground text color */ RECT text_pos; /* Position of foreground text */ INT16 total_count; /* Total item count */ INT16 combo_index; /* Focused item index */ marquee_info_t *marquee_info; /* If CS_FONT_MARQUEE is enabled, point to a marquee_info_t struct */ String_id_t *string_id; /* Static string id list */ UINT8 **string; /* Foreground string */ IMAGEHDR image[STATE_MAX]; } combo_t; // typedef struct _twinkling_info_t_ { RECT cursorSize; /* Size for EditBox cursor*/ UINT8 *twinkling_app_back; /* Pointer to capture region buffer background(appear) */ UINT8 *twinkling_dis_back; /* Pointer to capture region buffer background(disappear) */ INT16 timer_accumulator; /* accumulator for cursor twinkling*/ } twinkling_info_t; // // #define OSD 0x0 #define RGN 0x1 // /* CLASS_EDIT */ typedef struct _edit_box_t { RECT edit_pos; /* Position of the edit box */ color_info_t *bg_color; /* Background color */ icon_info_t *bg_icon; /* Background icon */ text_color_info_t *text_color; /* Text color */ RECT text_pos; /* Position of foreground text */ UINT16 side_size; /* Size of a single side icon */ UINT8 bFixCharWidth; /* Fix width of each character displayed on screen */ UINT8 *text; /* Current text */ UINT8 *pattern_text; /* Text of pattern */ INT16 seek_pointer; /* Current index that cursor points at */ UINT8 max_digit; /* Max number of digits */ UINT8 hide_character; /* Character to be drawn if style is S_EDIT_HIDE_DIGITS */ INT8 default_char; /* Default character */ Color_t cursor_color; /* Color of cursor */ UINT8 select_char_color; /* Color of select character */ // //twinkling_info_t *twinkling_info_OSD; //twinkling_info_t *twinkling_info_RGN; twinkling_info_t *twinkling_info[2]; // IMAGEHDR image[STATE_MAX]; } edit_t; #endif