1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465 |
- /** @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().<br>
- * <b>Note:</b> 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.<br>
- * Support control types:<br>
- * <i>CLASS_BUTTON_GROUP, CLASS_COMBO, CLASS_LISTVIEW, CLASS_PROGRESS,
- * CLASS_SCROLL, CLASS_TEXT with S_TXT_MULTI style.</i>
- */
- 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.<br>
- * Support control types:<br>
- * <i>CLASS_BUTTON_GROUP, CLASS_COMBO, CLASS_LISTVIEW, CLASS_PROGRESS,
- * CLASS_SCROLL, CLASS_TEXT with S_TXT_MULTI style.</i>
- */
- 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.<br>
- * Support control types:<br>
- * <i>CLASS_BUTTON_GROUP, CLASS_LISTVIEW.</i>
- */
- 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.<br>
- * Support control types:<br>
- * <i>CLASS_BUTTON_GROUP, CLASS_LISTVIEW.</i>
- */
- WM_PAGE_DOWN,
- /**
- * Performs the key down effect on <i>CLASS_EDIT</i>. It must catches a key value
- * at the third parameter in the GEL_SendMsg().<br>
- * 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, /**< <b>Description:</b> Modify the current state of a control to be NORMAL. */
- PARAM_SETFOCUSED, /**< <b>Description:</b> Modify the current state of a control to be FOCUSED. */
- PARAM_SETDISABLED, /**< <b>Description:</b> Modify the current state of a control to be DISABLED. */
- PARAM_SETCLICKED, /**< <b>Description:</b> Modify the current state of a control to be CLICKED. */
- PARAM_SETINVISIBLE, /**< <b>Description:</b> Modify the current state of a control to be INVISIBLE. */
- /**
- * <b>Description:</b> Get the current state of target control.<br>
- * <b>Type:</b> #State_e*
- */
- PARAM_STATE,
- /**
- * <b>Description:</b> Get the absolute area of target widget. That is, x and y coordinate, width and height.<br>
- * <b>Type:</b> RECT*
- */
- PARAM_AREA,
- /**
- * <b>Description:</b> Get the relative area of target widget to the menu it belongs to. That is, x and y coordinate, width and height.<br>
- * <b>Type:</b> RECT*
- */
- PARAM_REL_AREA,
- /**
- * <b>Description:</b> Get the text area of target widget.<br>
- * <b>Type:</b> RECT*
- */
- PARAM_TEXT_AREA,
- /**
- * <b>Description:</b> Get the area of current focused item.<br>
- * <b>Support:</b> CLASS_LISTVIEW, CLASS_BUTTON_GROUP<br>
- * <b>Type:</b> RECT*
- */
- PARAM_ITEM_AREA,
- /**
- * <b>Description:</b> Access the FPS of desired animation control.<br>
- * <b>Support:</b> CLASS_ANIMATION<br>
- * <b>Type:</b> INT32*
- */
- PARAM_ANIM_FPS,
- /**
- * <b>Description:</b> 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].<br>
- * <b>Support:</b> CLASS_LISTVIEW, CLASS_BUTTON_GROUP<br>
- * <b>Type:</b> INT32*
- */
- PARAM_FIRST_INDEX,
- /**
- * <b>Description:</b> Access current index attribute. The legal range of current index is [0,total_count].<br>
- * <b>Support:</b> CLASS_LISTVIEW, CLASS_BUTTON_GROUP, CLASS_COMBO, CLASS_EDIT<br>
- * <b>Type:</b> INT32*
- */
- PARAM_CURRENT_INDEX,
- /**
- * <b>Description:</b> Access clicked index of buttongroup or listview. The legal range of current index is [0,total_count].<br>
- * <b>Support:</b> CLASS_LISTVIEW, CLASS_BUTTON_GROUP<br>
- * <b>Type:</b> INT32*
- */
- PARAM_CLICK_INDEX,
- /**
- * <b>Description:</b> Access first can be focused index of listview. The legal range of current index is [0,total_count].<br>
- * <b>Support:</b> CLASS_LISTVIEW<br>
- * <b>Type:</b> INT32*
- */
- PARAM_FIRST_CAN_BE_FOCUS_INDEX,
-
- /**
- * <b>Description:</b> Access last can be focused index of listview. The legal range of current index is [0,total_count].<br>
- * <b>Support:</b> CLASS_LISTVIEW<br>
- * <b>Type:</b> INT32*
- */
- PARAM_LAST_CAN_BE_FOCUS_INDEX,
- /**
- * <b>Description:</b> Access page count attribute.<br>
- * <b>Support:</b> CLASS_SCROLL, CLASS_LISTVIEW, CLASS_BUTTON_GROUP, CLASS_COMBO<br>
- * <b>Type:</b> INT32*
- */
- PARAM_PAGE_COUNT,
- /**
- * <b>Description:</b> Access total count attribute.<br>
- * <b>Support:</b> CLASS_SCROLL, CLASS_LISTVIEW, CLASS_BUTTON_GROUP, CLASS_COMBO<br>
- * <b>Type:</b> INT32*
- */
- PARAM_TOTAL_COUNT,
- /*************************************************/
- /**
- * <b>Description:</b> Access minimum value.<br>
- * <b>Support:</b> CLASS_PROGRESS<br>
- * <b>Type:</b> INT32*
- */
- PARAM_MIN_VALUE,
- /**
- * <b>Description:</b> Access maximum value attribute.<br>
- * <b>Support:</b> CLASS_PROGRESS<br>
- * <b>Type:</b> INT32*
- */
- PARAM_MAX_VALUE,
- /**
- * <b>Description:</b> Access current value attribute of progress bar or scroll bar.
- * Negative value is illegal in CLASS_SCROLL.<br>
- * <b>Support:</b> CLASS_PROGRESS, CLASS_SCROLL<br>
- * <b>Type:</b> INT32*
- */
- PARAM_CURRENT_VALUE,
- /**
- * <b>Description:</b> Access step value attribute of progress bar.<br>
- * <b>Support:</b> CLASS_PROGRESS<br>
- * <b>Type:</b> INT32*
- */
- PARAM_STEP_VALUE,
- /*************************************************/
- /**
- * <b>Description:</b> Access dynamic string (list).
- * - Add STRING_LAST at the end of the dynamic string list. Here is an example
- * of setting STRING_LAST:<br>
- * 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.
- *
- * <b>Support:</b> CLASS_TEXT, CLASS_LISTVIEW, CLASS_COMBO<br>
- * <b>Type:</b> UINT8* for CLASS_TEXT. UINT8** for CLASS_LISTVIEW and CLASS_COMBO.
- */
- PARAM_DYNAMIC_STRING,
- /**
- * <b>Description:</b> 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.
- *
- * <b>Support:</b> CLASS_BUTTON, CLASS_BUTTON_GROUP, CLASS_LISTVIEW, CLASS_TEXT, CLASS_COMBO<br>
- * <b>Type:</b> 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,
- /**
- * <b>Description:</b> 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]<br>
- * <b>Support:</b> CLASS_BUTTON, CLASS_BUTTON_GROUP, CLASS_COMBO, CLASS_EDIT,
- * CLASS_LISTVIEW, CLASS_PROG, CLASS_TEXT<br>
- * <b>Type:</b> INT32*
- */
- PARAM_FIX_CHAR_WIDTH,
- /**
- * <b>Description:</b> Access foreground icon ID.<br>
- * <b>Support:</b> CLASS_BUTTON, CLASS_BUTTON_GROUP, CLASS_ANIMATION<br>
- * <b>Type:</b> 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,
- /**
- * <b>Description:</b> Access foreground icon ID of each state.<br>
- * Support: CLASS_ICON <br>
- * <b>type:</b> icon_info_t*
- */
- PARAM_ICON_INFO,
- /**
- * <b>Description:</b> Access both vertical and horizontal alignment of an icon widget.<br>
- * <b>Support:</b> CLASS_ICON<br>
- * <b>Type:</b> Alignment_e*
- */
- PARAM_ICON_ALIGNMENT,
- /**
- * <b>Description:</b> Access both vertical and horizontal alignment of text widget.<br>
- * <b>Support:</b> Which has text alignment(only for setting)<br>
- * <b>Type:</b> Alignment_e*
- */
- PARAM_TEXT_ALIGNMENT,
- /**
- * <b>Description:</b> Get the current text of EditBox.<br>
- * <b>Support:</b> CLASS_EDIT<br>
- * <b>Type:</b> UINT8*
- */
- PARAM_CURRENT_TEXT,
- /**
- * <b>Description:</b> Access the pattern text of EditBox. The length of pattern should NOT be changed.<br>
- * <b>Support:</b> CLASS_EDIT <br>
- * <b>Type:</b> UINT8*
- */
- PARAM_PATTERN_TEXT,
- /**
- * <b>Description:</b> Get the max number of digit of a EditBox.<br>
- * <b>Support:</b> CLASS_EDIT <br>
- * <b>Type:</b> INT32*
- */
- PARAM_MAX_DIGIT,
- /**
- * <b>Description:</b> Enable/disable display mode of EditBox.<br>
- * <b>Support:</b> CLASS_EDIT <br>
- * <b>Type:</b> BOOLEAN*, set TRUE to enable the display mode, FALSE otherwise.
- */
- PARAM_DISPLAY_MODE,
- /**
- * <b>Description:</b> Set specific item to be enable.
- * Input paramter is the index of target item.
- * The legal range of input index is [0,total_count]<br>
- * <b>Support:</b> CLASS_BUTTON_GROUP, CLASS_LISTVIEW <br>
- * <b>Type:</b> INT32* , the index of target item.
- */
- PARAM_ITEM_ENABLE,
- /**
- * <b>Description:</b> Set specific item to be disable.
- * Input paramter is the index of target item.
- * The legal range of input index is [0,total_count]<br>
- * <b>Support:</b> CLASS_BUTTON_GROUP, CLASS_LISTVIEW<br>
- * <b>Type:</b> INT32* , the index of target item.
- */
- PARAM_ITEM_DISABLE,
- /**
- * <b>Description:</b> Enable active mode or not.<br>
- * <b>Support:</b> CLASS_BUTTON_GROUP, CLASS_LISTVIEW <br>
- * <b>Type:</b> BOOLEAN*
- */
- PARAM_ACTIVE_MODE,
- /**
- * <b>Description:</b> Enable active mode or not.<br>
- * <b>Support:</b> CLASS_BUTTON_GROUP, CLASS_LISTVIEW <br>
- * <b>Type:</b> BOOLEAN*
- */
- PARAM_PAGE_MODE,
- /**
- * <b>Description:</b> Set current line of a multiline-style text box.<br>
- * <b>Support:</b> CLASS_TEXT <br>
- * <b>Type:</b> INT32*
- */
- PARAM_CURRENT_LINE,
- /**
- * <b>Description:</b> Set step lines of a multiline-style text box.<br>
- * <b>Support:</b> CLASS_TEXT <br>
- * <b>Type:</b> INT32*
- */
- PARAM_STEP_LINES,
- /**
- * <b>Description:</b> Get total lines of a multiline-style text box.<br>
- * <b>Support:</b> CLASS_TEXT<br>
- * <b>Type:</b> INT32*
- */
- PARAM_TOTAL_LINES,
- /**
- * <b>Description:</b> Get page lines of a multiline-style text box.<br>
- * <b>Support:</b> CLASS_TEXT <br>
- * <b>Type:</b> INT32*
- */
- PARAM_PAGE_LINES,
- /**
- * <b>Description:</b> Get lines positions of a multiline-style text box.<br>
- * <b>Support:</b> CLASS_TEXT <br>
- * <b>Type:</b> UINT8***
- */
- PARAM_LINES_POSITION,
- /**
- * <b>Description:</b> 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].<br>
- * <b>Support:</b> CLASS_TEXT <br>
- * <b>Type:</b> INT32*
- */
- PARAM_FIX_LINE_HEIGHT,
- /**
- * <b>Description:</b> Get the string width according to current state of widget.<br>
- * <b>Support:</b> CLASS_TEXT<br>
- * <b>Type:</b> INT32*
- */
- PARAM_STRING_WIDTH,
- /**
- * <b>Description:</b> Get the string height according to current state of widget.<br>
- * <b>Support:</b> CLASS_TEXT<br>
- * <b>Type:</b> INT32*
- */
- PARAM_STRING_HEIGHT,
- /**
- * <b>Description:</b> Get the string height according to current state of widget.<br>
- * <b>Support:</b> CLASS_TEXT<br>
- * <b>Type:</b> GEL_TextEndStyle_e*
- */
- PARAM_END_STYLE,
- /**
- * <b>Description:</b> Access foreground text color of related widgets.<br>
- * <b>Support:</b> CLASS_BUTTON, CLASS_BUTTON_GROUP, CLASS_COMBO, CLASS_EDIT, CLASS_LISTVIEW, CLASS_PROGRESS, CLASS_TEXT<br>
- * <b>Type:</b> text_color_info_t* for SET, #text_color_info_t** for GET
- */
- PARAM_FGTEXT_COLOR,
- /**
- * <b>Description:</b> Access background color of all kinds of widget except CLASS_ANIMATION, CLASS_BORDER and CLASS_ICON.<br>
- * <b>Type:</b> color_info_t* for SET, #color_info_t** for GET
- */
- PARAM_BGCOLOR,
- /*************************************************/
- /* Ebook Related Parameter Types */
- /*************************************************/
- /**
- * <b>Description:</b> Access the single string buffer size. This value is assigned by user. Default is 0.<br>
- * <b>Support:</b> CLASS_TEXT with S_TXT_EBK.<br>
- * <b>Type:</b> INT32* (in byte)
- */
- PARAM_EBK_BUF_SIZE,
- /**
- * <b>Description:</b> Get the current page displayed at this textbox.<br>
- * <b>Support:</b> CLASS_TEXT with S_TXT_EBK.<br>
- * <b>Type:</b> INT32*
- */
- PARAM_EBK_CURRENT_PAGE,
- /**
- * <b>Description:</b> Get the total page of this textbox.<br>
- * <b>Support:</b> CLASS_TEXT with S_TXT_EBK.<br>
- * <b>Type:</b> INT32*
- */
- PARAM_EBK_TOTAL_PAGES,
- /**
- * <b>Description:</b> Set/Get the index of AA group.<br>
- * <b>Support:</b> All kinds of control except CLASS_WINDOW and CLASS_POPUP.
- * <b>Type:</b> INT32*, but the valid range of input is [0,14].
- */
- PARAM_AA_GROUP_IDX,
- /**
- * <b>Description:</b> Set/Get the number of level of gray scale colors for AA.<br>
- * <b>Support:</b> CLASS_WINDOW or CLASS_POPUP
- * <b>Type:</b> FONT_AA_Level_e*
- */
- PARAM_WIN_AA_LEVEL,
- #if 0
- /**
- * <b>Description:</b> Set/Get the number of groups of gray level colors for AA.<br>
- * <b>Support:</b> CLASS_WINDOW or CLASS_POPUP
- * <b>Type:</b> INT32*, but the legal range is [0,15].
- */
- PARAM_WIN_AA_GROUP_NUM,
- #else
- /**
- * <b>Description:</b> Set the start indices of each AA group, put GEL_AA_ANCHOR_LAST at the end
- * so that engine can.<br>
- * <b>Support:</b> CLASS_WINDOW or CLASS_POPUP
- * <b>Type:</b> INT32*, list of start indices.
- */
- PARAM_WIN_AA_ANCHORS,
- #endif
- /**
- * <b>Description:</b> Enable/Disable AA on target menu.<br>
- * <b>Support:</b> CLASS_WINDOW or CLASS_POPUP
- * <b>Type:</b> BOOLEAN*
- */
- PARAM_WIN_AA_ENABLE,
- /*
- * <b>Description:</b> Set particular Style of the widget.<br>
- */
- PARAM_PARTICULAR_SYSTLE,
- /*
- * <b>Description:</b> Set enter multi-line mode.<br>
- */
- PARAM_ENTER_MULTI_LINE,
- /*
- * <b>Description:</b> Set one line count of multi-line mode <br>
- */
- PARAM_LINE_BLOCK_NUM,
- /*
- * <b>Description:</b> Set current block index multi-line mode .<br>
- */
- PARAM_CURRENT_BLOCK_INDEX,
- /*
- * <b>Description:</b>Release the line blocks of multi-line mode.<br>
- */
- PARAM_FREE_LINE_BLOCK,
-
- /**
- * <b>Description:</b> Set textbox ebook unkown char.<br>
- * <b>Support:</b> CLASS_TEXT only ebook.<br>
- * <b>Type:</b> UINT16*
- */
- PARAM_UNKNOWN_CHAR,
- /**
- * <b>Description:</b> Set textbox ebook show ellipsis at last line
- if total line is big than page line.<br>
- * <b>Support:</b> CLASS_TEXT multi-line.<br>
- * <b>Type:</b> UINT8*
- */
- PARAM_SHOW_ELLIPSIS,
- /**
- * <b>Description:</b> Set string char space in the widget.<br>
- * <b>Support:</b> Current only support edit.<br>
- * <b>Type:</b> UINT16*
- */
- PARAM_CHAR_SPACE,
- /**
- * <b>Description:</b> Set the widget to make shadow effect.<br>
- * <b>Support:</b> Current only support board.<br>
- * <b>Type:</b> UINT8*
- */
- PARAM_SHADOW,
- /**
- * <b>Description:</b> Set the widget max alpha value for shadow effect.<br>
- * <b>Support:</b> Current only support board.<br>
- * <b>Type:</b> UINT8*
- */
- PARAM_MAX_ALPHA,
- /**
- * <b>Description:</b> Set the widget min alpha value.<br>
- * <b>Support:</b> Current only support board.<br>
- * <b>Type:</b> UINT8*
- */
- PARAM_MIN_ALPHA,
- /**
- * <b>Description:</b> Set the widget alpha change step for shadow effect.<br>
- * <b>Support:</b> Current only support board.<br>
- * <b>Type:</b> UINT8*
- */
- PARAM_ALPHA_STEP,
- /**
- * <b>Description:</b> Set button group item space in the widget.<br>
- * <b>Support:</b> Current only support button group.<br>
- * <b>Type:</b> UINT16*
- */
- PARAM_ITEM_SPACE,
- /**
- * <b>Description:</b> Set button group , listview, text, button , edit control
- * focused state string border .<br>
- * <b>Type:</b> UINT8*
- */
- PARAM_FOCUSED_STR_BORDER,
- /**
- * <b>Description:</b> Set button group , listview, text, button , edit control
- * focused state item border .<br>
- * <b>Type:</b> 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;
- //<cursor_gunking>
- 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;
- //</cursor_gunking>
- //<cursor_gunking>
- #define OSD 0x0
- #define RGN 0x1
- //</cursor_gunking>
- /* 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 */
- //<cursor_gunking>
- //twinkling_info_t *twinkling_info_OSD;
- //twinkling_info_t *twinkling_info_RGN;
- twinkling_info_t *twinkling_info[2];
- //</cursor_gunking>
- IMAGEHDR image[STATE_MAX];
- } edit_t;
- #endif
|