wgui_draw_manager.h
上传用户:lqx1163
上传日期:2014-08-13
资源大小:9183k
文件大小:26k
源码类别:

MTK

开发平台:

C/C++

  1. /*****************************************************************************
  2. *  Copyright Statement:
  3. *  --------------------
  4. *  This software is protected by Copyright and the information contained
  5. *  herein is confidential. The software may not be copied and the information
  6. *  contained herein may not be used or disclosed except with the written
  7. *  permission of MediaTek Inc. (C) 2005
  8. *
  9. *  BY OPENING THIS FILE, BUYER HEREBY UNEQUIVOCALLY ACKNOWLEDGES AND AGREES
  10. *  THAT THE SOFTWARE/FIRMWARE AND ITS DOCUMENTATIONS ("MEDIATEK SOFTWARE")
  11. *  RECEIVED FROM MEDIATEK AND/OR ITS REPRESENTATIVES ARE PROVIDED TO BUYER ON
  12. *  AN "AS-IS" BASIS ONLY. MEDIATEK EXPRESSLY DISCLAIMS ANY AND ALL WARRANTIES,
  13. *  EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF
  14. *  MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NONINFRINGEMENT.
  15. *  NEITHER DOES MEDIATEK PROVIDE ANY WARRANTY WHATSOEVER WITH RESPECT TO THE
  16. *  SOFTWARE OF ANY THIRD PARTY WHICH MAY BE USED BY, INCORPORATED IN, OR
  17. *  SUPPLIED WITH THE MEDIATEK SOFTWARE, AND BUYER AGREES TO LOOK ONLY TO SUCH
  18. *  THIRD PARTY FOR ANY WARRANTY CLAIM RELATING THERETO. MEDIATEK SHALL ALSO
  19. *  NOT BE RESPONSIBLE FOR ANY MEDIATEK SOFTWARE RELEASES MADE TO BUYER'S
  20. *  SPECIFICATION OR TO CONFORM TO A PARTICULAR STANDARD OR OPEN FORUM.
  21. *
  22. *  BUYER'S SOLE AND EXCLUSIVE REMEDY AND MEDIATEK'S ENTIRE AND CUMULATIVE
  23. *  LIABILITY WITH RESPECT TO THE MEDIATEK SOFTWARE RELEASED HEREUNDER WILL BE,
  24. *  AT MEDIATEK'S OPTION, TO REVISE OR REPLACE THE MEDIATEK SOFTWARE AT ISSUE,
  25. *  OR REFUND ANY SOFTWARE LICENSE FEES OR SERVICE CHARGE PAID BY BUYER TO
  26. *  MEDIATEK FOR SUCH MEDIATEK SOFTWARE AT ISSUE. 
  27. *
  28. *  THE TRANSACTION CONTEMPLATED HEREUNDER SHALL BE CONSTRUED IN ACCORDANCE
  29. *  WITH THE LAWS OF THE STATE OF CALIFORNIA, USA, EXCLUDING ITS CONFLICT OF
  30. *  LAWS PRINCIPLES.  ANY DISPUTES, CONTROVERSIES OR CLAIMS ARISING THEREOF AND
  31. *  RELATED THERETO SHALL BE SETTLED BY ARBITRATION IN SAN FRANCISCO, CA, UNDER
  32. *  THE RULES OF THE INTERNATIONAL CHAMBER OF COMMERCE (ICC).
  33. *
  34. *****************************************************************************/
  35. /* **** Copy Right Note ********* 
  36.  *  Copyright Notice
  37.  *  (c) PMT.
  38.  *  All Rights Reserved.
  39.  *  (It is illegal to remove this copyright notice from this software or any
  40.  *  portion of it)
  41.  *******************************************************************************
  42.  * Filename:
  43.  * ---------
  44.  * wgui_draw_manager.h
  45.  *
  46.  * Project:
  47.  * --------
  48.  * PDG2
  49.  *
  50.  * Description:
  51.  * ------------
  52.  * This file contains the prototypes for Draw Manager.
  53.  * Author:
  54.  * -------
  55.  * -------
  56.  *==============================================================================
  57.  * HISTORY
  58.  * Below this line, this part is controlled by PVCS VM. DO NOT MODIFY!!
  59.  *------------------------------------------------------------------------------
  60.  * removed!
  61.  *
  62.  * removed!
  63.  * removed!
  64.  * removed!
  65.  *
  66.  * removed!
  67.  * removed!
  68.  * removed!
  69.  *
  70.  * removed!
  71.  * removed!
  72.  * removed!
  73.  *
  74.  * removed!
  75.  * removed!
  76.  * removed!
  77.  *
  78.  * removed!
  79.  * removed!
  80.  * removed!
  81.  *
  82.  * removed!
  83.  * removed!
  84.  * removed!
  85.  *
  86.  * removed!
  87.  * removed!
  88.  * removed!
  89.  *
  90.  * removed!
  91.  * removed!
  92.  * removed!
  93.  *
  94.  * removed!
  95.  * removed!
  96.  * removed!
  97.  *
  98.  * removed!
  99.  * removed!
  100.  * removed!
  101.  *
  102.  * removed!
  103.  * removed!
  104.  * removed!
  105.  *
  106.  * removed!
  107.  * removed!
  108.  * removed!
  109.  *
  110.  * removed!
  111.  * removed!
  112.  * removed!
  113.  *
  114.  * removed!
  115.  * removed!
  116.  * removed!
  117.  *
  118.  * removed!
  119.  * removed!
  120.  * removed!
  121.  *
  122.  * removed!
  123.  * removed!
  124.  * removed!
  125.  *
  126.  * removed!
  127.  * removed!
  128.  * removed!
  129.  *
  130.  * removed!
  131.  * removed!
  132.  * removed!
  133.  *
  134.  * removed!
  135.  * removed!
  136.  * removed!
  137.  *
  138.  * removed!
  139.  * removed!
  140.  * removed!
  141.  *
  142.  * removed!
  143.  * removed!
  144.  * removed!
  145.  *
  146.  * removed!
  147.  * removed!
  148.  * removed!
  149.  *
  150.  * removed!
  151.  * removed!
  152.  * removed!
  153.  *
  154.  * removed!
  155.  * removed!
  156.  * removed!
  157.  *
  158.  * removed!
  159.  * removed!
  160.  * removed!
  161.  *
  162.  * removed!
  163.  * removed!
  164.  * removed!
  165.  *
  166.  * removed!
  167.  * removed!
  168.  * removed!
  169.  *
  170.  * removed!
  171.  * removed!
  172.  * removed!
  173.  *
  174.  * removed!
  175.  * removed!
  176.  * removed!
  177.  *
  178.  * removed!
  179.  * removed!
  180.  * removed!
  181.  *
  182.  * removed!
  183.  * removed!
  184.  * removed!
  185.  *
  186.  * removed!
  187.  * removed!
  188.  * removed!
  189.  *
  190.  * removed!
  191.  * removed!
  192.  * removed!
  193.  *
  194.  *------------------------------------------------------------------------------
  195.  * Upper this line, this part is controlled by PVCS VM. DO NOT MODIFY!!
  196.  *==============================================================================
  197.  *******************************************************************************/
  198. #ifndef __WGUI_DRAW_MANAGER_H__
  199. #define __WGUI_DRAW_MANAGER_H__
  200. #include "MMI_features.h"
  201. #ifdef __MMI_DRAW_MANAGER__
  202. #include "gui_data_types.h"
  203. #include "CustThemesRes.h"
  204. #include "FontRes.h"
  205. #include "gdi_include.h"
  206. #include "CustDataRes.h"
  207. #include "gui_buttons.h"
  208. /* Constants */
  209. #define DM_MAX_STRINGS                       3
  210. #define DM_MAX_SUBLCD_STRINGS                2
  211. #define DM_MAX_IMAGES                        5
  212. #define DM_MAX_SUBLCD_IMAGES                 2
  213. #define DM_MAX_FILL_AREAS                    3
  214. #define DM_MAX_RECTANGLES                    3
  215. #define DM_MAX_LINES                         3
  216. #define DM_MAX_SCROLL_TEXT 3
  217. #define DM_MAX_BUTTONS                       6
  218. #define DM_MAX_PERCENTAGE_BAR             2
  219. #define DEFAULT_FONT   MAX_FONT_TYPES
  220. #define DM_CALCULATED_HEIGHT  0
  221. #define DM_CALCULATED_WIDTH   0
  222. /* shared coordinate set, to reduce memory usage */
  223. #define DM_DUMMY_COORDINATE                     (-10000)
  224. #define DM_NULL_COORDINATE                   (-10001)
  225. #define DM_FULL_SCREEN_COORDINATE_FLAG       (-10002)
  226. #define DM_FULL_SCREEN_COORDINATE               (-10003)
  227. #define DM_CONTENT_COORDINATE_FLAG           (-10004)
  228. #define DM_CONTENT_COORDINATE                (-10005)
  229. #define DM_POPUP_SCREEN_COORDINATE_FLAG      (-10006)
  230. #define DM_POPUP_SCREEN_COORDINATE           (-10007)
  231. #define DM_DEFAULT_STATUS_BAR_FLAG           (-10008)
  232. #define DM_DEFAULT_STATUS_BAR                (-10009)
  233. #define DM_DEFAULT_TITLE_BAR_FLAG               (-10010)
  234. #define DM_DEFAULT_TITLE_BAR                    (-10011)
  235. #define DM_DEFAULT_BUTTON_BAR_FLAG           (-10012)
  236. #define DM_DEFAULT_BUTTON_BAR                (-10013)
  237. /* Global Flags ( Used in category screens for global dm_struct ) */
  238. #define DM_NO_FLAGS                          0x00000000 /* Default flag */
  239. #define DM_NO_SOFTKEY                          0x00000001      /* Softkey is disabled and not displayed */
  240. #define DM_NO_TITLE                            0x00000002      /* Title is disabled and not displayed */
  241. #define DM_NO_STATUS_BAR                     0x00000004 /* Status bar is disabled and not displayed */
  242. #define DM_NO_POPUP_BACKGROUND               0x00000008 /* Popup background is disabled and not displayed */
  243. #define DM_LEFT_ALIGN_TITLE                  0x00000010 /* Title string is left alignment */
  244. #define DM_SCROLL_TITLE                      0x00000020 /* Scroll the title string when needed */
  245. #define DM_CLEAR_SCREEN_BACKGROUND           0x00000040 /* Clear screen background */
  246. #define DM_SHOW_VKPAD                        0x00000080 /* Show virtual keypad */
  247. #define DM_SUB_LCD_CONTEXT                   0x00000100 /* Set sub lcd context */
  248. #define DM_SUB_LCD_TRANSPARENT_BG               0x00000200
  249. #define DM_SUB_LCD_ROTATE_180                0x00000400
  250. #define DM_SPECIFIC_HIDE_STATUS_BAR             0x00000800
  251. #define DM_NO_BLT                            0x00001000
  252. //#define DM_NO_STRING                                                          0x00008000
  253. //#define DM_MAIN_LCD_CONTEXT                                                   0x00000020      /* Set Main lcd context */
  254. //#define DM_NO_BUILD_BUFFER                                                    0x00000200
  255. /* Control Specific Flags */
  256. /* One Byte is for control specific flags
  257.    Second Byte is for previous control specific flags (Common Flags ) */
  258. /* 082906 scr_bg */
  259. /* scr_bg */
  260. #define DM_SCR_BG_FORCE_SHOW    0x0001
  261. /* String & Images */
  262. #define DM_LEFT_ALIGN_X 0x0001
  263. #define DM_FORCE_CENTRE_ALIGN_X     0x0001//062706 cat129
  264. #define DM_CENTRE_ALIGN_X     0x0002
  265. #define DM_RIGHT_ALIGN_X      0x0004
  266. #define DM_TOP_ALIGN_Y 0x0008
  267. #define DM_FORCE_CENTER_ALIGN_Y      0x0008
  268. #define DM_CENTER_ALIGN_Y     0x0010
  269. #define DM_BOTTOM_ALIGN_Y     0x0020
  270. #define DM_STRING_BORDERED    0x0040
  271. #define DM_BACK_FILL       0x0080
  272. /* Button Specific Flags */
  273. #define DM_BUTTON_DISABLE_BACKGROUND   0x0001
  274. #define DM_BUTTON_BAR_UP_ARROW         0x0002
  275. #define DM_BUTTON_BAR_DOWN_ARROW       0x0004
  276. #define DM_BUTTON_BAR_LEFT_ARROW       0x0008
  277. #define DM_BUTTON_BAR_RIGHT_ARROW         0x0010
  278. /* Popup Background Specific Flags */
  279. #define DM_DRAW_POPUP_BACKGROUND_3D          0x0001
  280. #define DM_POPUP_BACKGROUND_HATCH_FILL       0x0002
  281. #define DM_POPUP_BACKGROUND_GREYSCALE        0x0004
  282. /* Multiline inputbox Specific Flags */
  283. #define DM_FIXED_MULTILINE_INPUTBOX_HEIGHT   0x0001     /* The height of multiline inputbox is decided by category */
  284. #define DM_FIXED_MULTILINE_INPUTBOX_WIDTH    0x0002     /* The width of multiline inputbox is decided by category */
  285. #define DM_FIXED_MULTILINE_INPUTBOX_HEIGHT_NO_MULTITAP  0x0004
  286. /* Singleline Inputbox Specific Flags */
  287. #define DM_SINGLE_LINE_INPUTBOX_SPECIFIC_HEIGHT 0x0001
  288. /* Alligned Area Specific Flags */
  289. #define DM_ALLIGNED_AREA_EQUAL_SPACE_TOP_AND_BOTTOM      0x0001
  290. #define DM_ALLIGNED_AREA_NO_BACK_FILL              0x0002
  291. #define DM_ALLIGNED_AREA_MULTILINE_SCROLL_IF_REQUIRED   0x0004
  292. /* List Specific Flags */
  293. #define DM_CATEGORY_CONTROL_COORDINATES         0x0001
  294. #define DM_SLIDE_CONTROL_VALUE_POS_NONE      0x0001
  295. #define DM_SLIDE_CONTROL_VALUE_POS_HEAD      0x0002
  296. #define DM_SLIDE_CONTROL_VALUE_POS_TAIL         0x0004
  297. #define DM_SLIDE_CONTROL_VALUE_POS_NEXT_LINE    0x0008
  298. #define DM_BUTTON_RIGHT_ALIGN          0x0001
  299. #define DM_SCROLL_TEXT_LEFT_ALIGN_X       0x0001
  300. #define DM_SCROLL_TEXT_CENTRE_ALIGN_X     0x0002
  301. #define DM_SCROLL_TEXT_RIGHT_ALIGN_X      0x0004
  302. #define DM_SCROLL_TEXT_TOP_ALIGN_Y        0x0008
  303. #define DM_SCROLL_TEXT_CENTER_ALIGN_Y     0x0010
  304. #define DM_SCROLL_TEXT_BOTTOM_ALIGN_Y     0x0020
  305. #define DM_SCROLL_TEXT_USE_FONT_HEIGHT    0x0040
  306. /* Common Flags ( used for all components ) */
  307. #define DM_PREVIOUS_CONTROL_END_X               0x0100
  308. #define DM_PREVIOUS_CONTROL_END_Y               0x0200
  309. #define DM_PREVIOUS_CONTROL_END_Y_OFFSET_HEIGHT    0x0400
  310. #define DM_PREVIOUS_CONTROL_END_X_OFFSET_WIDTH     0x0800
  311. #define DM_WIDTH_OFFSET_PREVIOUS_CONTROL_END_X     0x1000
  312. #define DM_HEIGHT_OFFSET_PREVIOUS_CONTROL_END_Y    0x2000
  313. #define DM_WIDTH_PREVIOUS_CONTROL_WIDTH            0x4000
  314. #define DM_HEIGHT_PREVIOUS_CONTROL_HEIGHT       0x8000
  315. /* Draw Manager Controls */
  316. typedef enum
  317. {
  318.     DM_BASE_LAYER_START,
  319.     DM_BASE_LAYER_END,
  320.     DM_NEW_LAYER_START,
  321.     DM_NEW_LAYER_END,
  322.     DM_SCR_BG,
  323.     DM_BASE_CONTROL_SET1,
  324.     DM_BASE_CONTROL_SET2,
  325.     DM_CIRCULAR_MENU1,
  326.     DM_LIST1,
  327.     DM_ROTATE_MENU1,
  328.     DM_INLINE_FIXED_LIST1,
  329.     DM_MATRIX_MENU1,
  330.     DM_DYNAMIC_LIST1,
  331.     DM_ASYNCDYNAMIC_LIST1,
  332.     DM_SINGLELINE_INPUTBOX1,
  333.     DM_MULTILINE_INPUTBOX1,
  334.     DM_EMS_INPUTBOX1,
  335.     DM_DIALER_INPUT_BOX1,
  336.     DM_TAB_CONTROL,
  337.     DM_HORIZONTAL_TAB_BAR,
  338.     DM_DATE_TIME_DISPLAY,
  339.     DM_TITLE1,
  340.     DM_STATUS_BAR1,
  341.     DM_LSK,
  342.     DM_RSK,
  343.     DM_CSK,
  344.     DM_BUTTON_BAR1,
  345.     DM_BUTTON,
  346.     DM_CALENDAR,
  347.     DM_ALIGNED_AREA_START,
  348.     DM_ALIGNED_AREA_END,
  349.     DM_STRING,
  350.     DM_IMAGE,
  351.     DM_BACK_FILL_AREA,
  352.     DM_RECTANGLE,
  353.     DM_LINE,
  354.     DM_SLIDE_CONTROL,
  355.     DM_CATEGORY_CONTROLLED_AREA,
  356.     DM_CATEGORY_CONTROLLED_AREA2,
  357.     DM_POPUP_BACKGROUND,
  358.     DM_NWAY_STOPWATCH,
  359.     DM_TYPICAL_STOPWATCH,
  360.     DM_WALL_PAPER,
  361.     DM_SCROLL_TEXT,
  362.     DM_PERCENTAGE_BAR
  363. } mmi_dm_control_ids_enum;
  364. /* flags used to create layer in draw manager */
  365. typedef enum
  366. {
  367.     DM_LAYER_TOP,
  368.     DM_LAYER_BOTTOM,
  369.     DM_LAYER_ACTIVE_TOP,
  370.     DM_LAYER_ACTIVE_BOTTOM
  371. } mmi_dm_new_layer_flags_enum;
  372. /* flags of title area style */
  373. typedef enum
  374. {
  375.     DM_TITLE_AREA_NORMAL,
  376.     DM_TITLE_AREA_STATUS_ICON_ONLY,
  377.     DM_TITLE_AREA_NONE
  378. } mmi_dm_title_area_type_enum;
  379. /* type of drawing state */
  380. typedef enum
  381. {
  382.     NORMAL_EXIT,    /* Normal procedure: ExitCategory function state */
  383.     NORMAL_SHOW,    /* Normal procedure: Showcategory function state */
  384.     NORMAL_REDRAW,  /* Normal procedure: RedrawCategory function state */
  385.     REDRAW_2_SHOW,  /* Abnormal procedure: ShowCategory function is called without calling ExitCategory function */
  386.     REDRAW_2_REDRAW /* Abnormal procedure: RedrawCategory function is called directly without EixtCategory function and ShowCategory function */
  387. } dm_redraw_state_enum;
  388. /* Structures used by Draw Manager */
  389. typedef struct
  390. {
  391.     dm_redraw_state_enum redraw_screen_main;
  392.     U8 redraw_scr_bg_flag;
  393.     U8 lock_redraw_main;
  394.     U8 exit_full_screen_on_exit;
  395.     U8 is_context_reset;
  396. #ifdef __MMI_SUBLCD__
  397.     dm_redraw_state_enum redraw_screen_sub;
  398.     U8 lock_redraw_sub;
  399. #endif /* __MMI_SUBLCD__ */ 
  400. } dm_cntx_struct;
  401. typedef struct
  402. {
  403.     GDI_HANDLE layer_handle;
  404.     /* GDI_HANDLE           animation_handle; */
  405.     U16 image_id;
  406.     S8 *image_name;
  407.     S32 offset_x;
  408.     S32 offset_y;
  409.     U8 layer_opacity;
  410.     S32 flags;//082906 scr_bg
  411. } dm_scr_bg_cntx_struct;
  412. typedef struct
  413. {
  414.     S32 s32ScrId;
  415.     S32 s32CatId;
  416.     S32 s32flags;
  417. } dm_data_struct;
  418. typedef struct
  419. {
  420.     S32 screen_id;
  421.     S16 *coordinate_set_p;
  422. } dm_screen_id_coordinate_set_map_struct;
  423. typedef struct
  424. {
  425.     U16 category_id;
  426.     U8 *control_set_p;
  427.     S16 *default_coordinate_set_p;
  428.     S16 *rotated_coordinate_set_p;
  429. } dm_category_id_control_set_map_struct;
  430. typedef struct
  431. {
  432.     S16 s16X;
  433.     S16 s16Y;
  434.     S16 s16Width;
  435.     S16 s16Height;
  436.     S32 Flags;
  437. } dm_coordinates;
  438. typedef struct
  439. {
  440.     dm_coordinates coordinate;
  441.     S16 s16X2;
  442.     S16 s16Y2;
  443. } dm_previous_control_coordinates_struct;
  444. typedef struct
  445. {
  446.     S16 x1;
  447.     S16 y1;
  448.     S16 x2;
  449.     S16 y2;
  450.     S16 flags;
  451. } dm_cat_scr_info_struct;
  452. typedef struct
  453. {
  454.     S16 x;  /* Icons are offset from this position                */
  455.     S16 y;  /* Icons are offset from this position                */
  456.     S16 x1; /* Area occupied by the status bar: Used for hiding      */
  457.     S16 y1; /* Area occupied by the status bar: Used for hiding      */
  458.     S16 x2; /* Area occupied by the status bar: Used for hiding      */
  459.     S16 y2; /* Area occupied by the status bar: Used for hiding      */
  460.     S16 flags;
  461. } dm_status_info_struct;
  462. typedef struct
  463. {
  464.     dm_coordinates coordinate;
  465.     S16 button_width;
  466. } dm_buttonbar_info_struct;
  467. typedef struct
  468. {
  469.     UI_string_type string;
  470.     UI_font_type font;
  471.     color text_color;
  472.     color border_color;
  473.     UI_filled_area back_fill;
  474. } dm_string_data_struct;
  475. /* START VIJAY PMT 20050930 */
  476. typedef enum
  477. {
  478.     DM_RECTANGLE_NO_FILL = 0,
  479.     DM_RECTANGLE_FILL_COLOR = 1,
  480.     DM_RECTANGLE_FILL_GRAYSCALE = 2
  481. } dm_rectangle_fill_style;
  482. typedef struct
  483. {
  484.     color line_color;
  485.     dm_rectangle_fill_style fill_rectangle;
  486. } dm_rectangle_data_struct;
  487. /* END VIJAY PMT 20050930 */
  488. typedef struct
  489. {
  490.     S16 x, y;
  491.     S32 width, height;
  492.     PU8 image;
  493.     UI_string_type name;
  494.     UI_filled_area *back_fill;
  495.     gdi_handle image_handle;
  496. } dm_image_data_struct;
  497. typedef struct
  498. {
  499.     dm_coordinates coordinate;
  500.     S16 calendar_background_y;
  501.     S16 calendar_background_width;
  502.     S16 calendar_columns;
  503.     S16 calendar_rows;
  504.     S16 title1_x;
  505.     S16 title1_y;
  506.     S16 title1_width;
  507.     S16 title1_height;
  508.     S16 title1_font;
  509. #ifdef __MMI_UI_CALENDAR_WITH_INFO_BOX__
  510.     S16 title1_month_x;
  511.     S16 title1_month_y;
  512.     S16 title1_month_width;
  513.     S16 title1_month_height;
  514.     S16 title1_month_font;
  515.     S16 title1_month_show;
  516. #endif /* __MMI_UI_CALENDAR_WITH_INFO_BOX__ */ 
  517.     S16 title2_x;
  518.     S16 title2_y;
  519.     S16 title2_width;
  520.     S16 title2_height;
  521.     S16 title2_show;
  522.     S16 title3_x;
  523.     S16 title3_y;
  524.     S16 title3_width;
  525.     S16 title3_height;
  526.     S16 title3_show;
  527. #ifdef __MMI_UI_CALENDAR_WITH_INFO_BOX__
  528.     S16 infobox_x;
  529.     S16 infobox_y;
  530.     S16 infobox_width;
  531.     S16 infobox_height;
  532.     S16 infobox_max;
  533.     S16 infobox_show;
  534. #endif /* __MMI_UI_CALENDAR_WITH_INFO_BOX__ */ 
  535. } dm_calendar_info_struct;
  536. typedef struct
  537. {
  538.     S16 s16X;
  539.     S16 s16Y;
  540.     S16 s16width;
  541.     S16 s16height;
  542.     U16 x_space;
  543.     U16 y_space;
  544.     S32 Flags;
  545.     MMI_BOOL is_in_aligned_area;
  546. } dm_aligned_area_data_struct;
  547. typedef struct
  548. {
  549.     dm_coordinates coordinate;
  550.     S16 typ_timer_x;
  551.     S16 typ_timer_y;
  552.     S16 typ_milsec_x;
  553.     S16 typ_milsec_y;
  554.     S16 typ_history_height;
  555. } dm_typical_stopwatch_info_struct;
  556. typedef struct
  557. {
  558.     dm_coordinates coordinate;
  559.     S16 nway_main_timer_x1;
  560.     S16 nway_main_timer_y1;
  561.     S16 nway_main_timer_x2;
  562.     S16 nway_main_timer_y2;
  563.     S16 nway_dialog_x1;
  564.     S16 nway_dialog_y1;
  565.     S16 nway_dialog_x2;
  566.     S16 nway_dialog_y2;
  567.     S16 separator_height;
  568. } dm_nway_stopwatch_info_struct;
  569. typedef struct
  570. {
  571.     S16 x;
  572.     S16 y;
  573.     S16 width;
  574.     S16 height;
  575.     U16 value;
  576.     color bar_color;
  577.     U16 bg_image;
  578.     U16 left_side_image;
  579.     U16 right_side_image;
  580.     U8  *progres_string;
  581. } dm_percentage_bar_struct;
  582. extern const S16 g_screenid_coordinate_sets_map_entries_count;
  583. extern dm_data_struct g_dm_data, g_dm_sublcd_data;
  584. extern const dm_category_id_control_set_map_struct g_categories_controls_map[];
  585. extern const dm_screen_id_coordinate_set_map_struct g_screenid_coordinate_sets_map[];
  586. extern void dm_init(void);
  587. extern void dm_reset_context(void);
  588. extern void dm_reset_context_ext(void);
  589. #ifdef __MMI_SUBLCD__
  590. extern void dm_reset_sublcd_context(void);
  591. #endif 
  592. extern U16 dm_get_image_count(void);
  593. extern U16 dm_get_button_count(void);
  594. extern icontext_button *dm_get_button(U16 index);
  595. extern void dm_reset_button_functions(void);
  596. extern void dm_set_scr_bg_redraw(MMI_BOOL status);
  597. extern MMI_BOOL dm_is_activated(void);
  598. extern void dm_setup_data(dm_data_struct *dm_data);
  599. extern void dm_redraw_category_screen(void);
  600. void dm_setup_category_functions(FuncPtr redraw_function, U8 *(*get_history_function) (U8 *buffer),
  601.                                  S32(*get_history_size_function) (void));
  602. extern U8 *dm_search_control_set(S32 category_id, S16 **default_coordinate_set_p);
  603. extern S16 *dm_search_coordinate_set(S32 ScrId);
  604. extern S16 *dm_get_cat_scr_coordinates(S16 *UICtrlAccessPtr_p, dm_cat_scr_info_struct *dm_cat_scr_info);
  605. extern MMI_BOOL dm_check_control_exist(S32 category_id, mmi_dm_control_ids_enum control_id);
  606. extern void dm_update_multitap_coordinates(
  607.                 dm_coordinates *dm_multiline_inputbox_info,
  608.                 dm_cat_scr_info_struct *dm_cat_scr_info);
  609. extern S16 *dm_get_status_icon_bar_coordinates(S16 *UICtrlAccessPtr_p, dm_status_info_struct *dm_status_info);
  610. extern S16 *dm_get_button_bar_coordinates(S16 *UICtrlAccessPtr_p, dm_buttonbar_info_struct *dm_status_info);
  611. extern S16 *dm_get_calendar_coordinates(S16 *UICtrlAccessPtr_p, dm_calendar_info_struct *dm_calendar_info);
  612. extern U8 *dm_get_category_history(U8 *history_buffer);
  613. extern S32 dm_get_category_history_size(void);
  614. /* Reset functions for the coordinates of the controls so that other category screens get the original values only. */
  615. extern void dm_reset_title_coordinates(void);
  616. extern void dm_reset_fixed_list_coordinates(void);
  617. extern void dm_reset_lsk_coordinates(void);
  618. extern void dm_reset_rsk_coordinates(void);
  619. extern void dm_reset_button_bar_coordinates(void);
  620. extern void dm_reset_multitaps_coordinates(void);
  621. extern void dm_reset_inline_fixed_list_coordinates(void);
  622. #ifdef __MMI_SUBLCD__
  623. void dm_register_sub_category_controlled_callback(void (*f) (dm_coordinates *coordinate));
  624. extern void dm_reset_sub_category_controlled_callback(void);
  625. #endif /* __MMI_SUBLCD__ */ 
  626. void dm_register_category_controlled_callback(void (*f) (dm_coordinates *coordinate));
  627. void dm_register_category_controlled2_callback(void (*f) (dm_coordinates *coordinate));
  628. extern void dm_reset_category_controlled_callback(void);
  629. extern void dm_move_control_without_layer(S16 *comp_x, S16 *comp_y);
  630. extern S32 dm_setup_new_layer(S16 **UICtrlAccessPtr_p);
  631. extern S32 dm_setup_and_draw_circular_menu(S16 **UICtrlAccessPtr_p);
  632. extern S32 dm_setup_and_draw_fixed_list(S16 **UICtrlAccessPtr_p);
  633. extern S32 dm_setup_and_draw_dynamic_list(S16 **UICtrlAccessPtr_p);
  634. extern S32 dm_setup_and_draw_matrix_menu(S16 **UICtrlAccessPtr_p);
  635. extern S32 dm_setup_and_draw_multiline_inputbox(S16 **UICtrlAccessPtr_p, dm_cat_scr_info_struct *dm_cat_scr_info);
  636. extern S32 dm_setup_and_draw_ems_inputbox(S16 **UICtrlAccessPtr_p, dm_cat_scr_info_struct *dm_cat_scr_info);
  637. extern S32 dm_setup_and_draw_dialer_inputbox(S16 **UICtrlAccessPtr_p);
  638. extern S32 dm_setup_and_draw_singleline_inputbox(S16 **UICtrlAccessPtr_p);
  639. extern S32 dm_setup_and_draw_left_softkey(S16 **UICtrlAccessPtr_p);
  640. extern S32 dm_setup_and_draw_right_softkey(S16 **UICtrlAccessPtr_p);
  641. extern S32 dm_setup_and_draw_title(S16 **UICtrlAccessPtr_p);
  642. extern S32 dm_setup_and_draw_category_controlled_area(S16 **UICtrlAccessPtr_p);
  643. extern S32 dm_setup_and_draw_status_icons(S16 **UICtrlAccessPtr_p);
  644. extern S32 dm_setup_and_draw_button_bar(S16 **UICtrlAccessPtr_p);
  645. extern S32 dm_setup_and_draw_inline_item(S16 **UICtrlAccessPtr_p);
  646. extern S32 dm_setup_and_draw_base_control_set(S16 **UICtrlAccessPtr_p);
  647. extern S32 dm_setup_and_draw_base_control_set2(S16 **UICtrlAccessPtr_p);       /* 041205 Calvin added */
  648. extern S32 dm_setup_and_draw_string(S16 **UICtrlAccessPtr_p, S32 index);
  649. extern S32 dm_setup_and_draw_image(S16 **UICtrlAccessPtr_p, S32 index);
  650. extern S32 dm_setup_and_draw_slide_control(S16 **UICtrlAccessPtr_p, S32 index);
  651. extern S32 dm_setup_and_draw_calendar(S16 **UICtrlAccessPtr_p);
  652. extern S32 dm_setup_and_draw_aligned_area(S16 **UICtrlAccessPtr_p, U8 *control_set_ptr);
  653. extern S32 dm_setup_and_draw_scroll_text(S16 **UICtrlAccessPtr_p, S32 index);
  654. extern S32 dm_setup_and_draw_scr_bg(S16 **UICtrlAccessPtr_p);
  655. extern S32 dm_setup_and_draw_button(S16 **UICtrlAccessPtr_p, S32 index);
  656. extern void dm_register_vkpad_callback(FuncPtr f);
  657. extern S32 dm_setup_and_draw_scr_bg(S16 **UICtrlAccessPtr_p);
  658. extern void dm_set_scr_bg_image(U16 image_id, S8 *file_name, S32 x, S32 y, U8 opacity);
  659. extern void dm_set_scr_bg_image_no_draw(U16 image_id, S8 *file_name, S32 x, S32 y, U8 opacity);
  660. extern void dm_get_scr_bg_image(U16 *image_id, S8 **file_name, S32 *x, S32 *y, U8 *opacity);
  661. extern GDI_HANDLE dm_get_scr_bg_layer(void);
  662. extern void dm_set_scr_bg_redraw(MMI_BOOL status);
  663. extern void dm_get_scr_bg_opacity(U8 *opacity);
  664. extern void dm_set_scr_bg_opacity(U8 opacity);
  665. extern void dm_get_scr_bg_flag(S32 *flags);//082906 scr_bg
  666. extern void dm_set_scr_bg_flag(S32 flags);
  667. extern void dm_add_image(PU8 image, UI_string_type image_name, UI_filled_area *background);
  668. extern gdi_handle dm_get_image_handle(S32 count);//070706
  669. extern void dm_change_image(PU8 image, UI_string_type name, S32 index);
  670. extern void dm_add_string(
  671.                 UI_string_type string,
  672.                 UI_font_type font,
  673.                 color text_color,
  674.                 color border_color,
  675.                 UI_filled_area *background);
  676. extern void dm_reset_str_image(void);
  677. /* START VIJAY PMT 20050930 */
  678. extern void dm_add_rectangle(color line_color, dm_rectangle_fill_style fill_rectangle);
  679. /* END VIJAY PMT 20050930 */
  680. extern void dm_add_line(color line_color);
  681. extern void dm_add_back_fill_area(UI_filled_area *background);
  682. void dm_add_scroll_text(UI_string_type text, void (*timer_callback) (void),
  683.                         void (*draw_background) (S32 x1, S32 y1, S32 x2, S32 y2), color text_color, color border_color);
  684. void dm_add_slide_control(S32 lower_limit, S32 upper_limit, S32 current_value, void (*change_callback) (S32 value),
  685.                           U8 *label_string);
  686. extern S32 dm_get_slide_control_count(void);
  687. extern U16 dm_add_button(UI_string_type text, PU8 up_image, PU8 down_image, gui_button_clear_background_hdlr clear_fp);
  688. extern U16 dm_add_percentage_bar(
  689.             U16 init_value,
  690.             U8 *string,
  691.             color bar_color,
  692.             U16 bg_image,
  693.             U16 left_side_image,
  694.             U16 right_side_image);
  695. extern void dm_update_percentage_bar_value(S32 id, U16 value, U8 *string);
  696. extern void dm_redraw_percentage_bar(S32 id);
  697. extern void dm_change_percentage_bar_color(S32 id, color c);
  698. extern void dm_get_control_coordinates_from_category(
  699.                 S32 s32ScrId,
  700.                 S32 s32CatId,
  701.                 mmi_dm_control_ids_enum control,
  702.                 S32 index,
  703.                 dm_coordinates *coordinate);
  704. extern void setup_previous_control(dm_coordinates *dm_coordinate_info);
  705. extern void dm_sublcd_setup_data(dm_data_struct *dm_data);
  706. extern void dm_sublcd_redraw_category_screen(void);
  707. extern S16 *dm_get_typical_stopwatch_coordinates(
  708.                 S16 *UICtrlAccessPtr_p,
  709.                 dm_typical_stopwatch_info_struct *dm_typical_stopwatch_info);
  710. extern S16 *dm_get_nway_stopwatch_coordinates(
  711.                 S16 *UICtrlAccessPtr_p,
  712.                 dm_nway_stopwatch_info_struct *dm_nway_stopwatch_info);
  713. extern gdi_result dm_create_layer(S32 x, S32 y, S32 width, S32 height, gdi_handle *handle_ptr, U32 flags);
  714. extern gdi_result dm_create_layer_using_outside_memory(
  715.                     S32 x,
  716.                     S32 y,
  717.                     S32 width,
  718.                     S32 height,
  719.                     gdi_handle **handle_ptr,
  720.                     U8 *outside_memory,
  721.                     S32 outside_memory_size,
  722.                     U32 flags);
  723. extern MMI_BOOL dm_add_blt_layer(gdi_handle handle_ptr, U32 flags);
  724. extern void dm_register_button_functions(U16 button_index, U16 key_type, FuncPtr f);
  725. extern void dm_execute_button_handler(U16 btn_index, U16 key_type);
  726. extern GDI_HANDLE dm_get_layer_handle(U8 index);
  727. extern GDI_HANDLE *dm_get_layer_handle_ptr(U8 index);
  728. #ifdef __MMI_TOUCH_SCREEN__
  729. extern MMI_BOOL dm_check_image_bound(U16 index, mmi_pen_point_struct point);
  730. #endif 
  731. extern MMI_BOOL dm_is_redraw_screen(void);
  732. #endif /* __MMI_DRAW_MANAGER__ */ 
  733. #endif /* __WGUI_DRAW_MANAGER_H__ */