wgui_draw_manager.c
资源名称:mmi.rar [点击查看]
上传用户:lqx1163
上传日期:2014-08-13
资源大小:9183k
文件大小:345k
源码类别:
MTK
开发平台:
C/C++
- /*****************************************************************************
- * Copyright Statement:
- * --------------------
- * This software is protected by Copyright and the information contained
- * herein is confidential. The software may not be copied and the information
- * contained herein may not be used or disclosed except with the written
- * permission of MediaTek Inc. (C) 2005
- *
- * BY OPENING THIS FILE, BUYER HEREBY UNEQUIVOCALLY ACKNOWLEDGES AND AGREES
- * THAT THE SOFTWARE/FIRMWARE AND ITS DOCUMENTATIONS ("MEDIATEK SOFTWARE")
- * RECEIVED FROM MEDIATEK AND/OR ITS REPRESENTATIVES ARE PROVIDED TO BUYER ON
- * AN "AS-IS" BASIS ONLY. MEDIATEK EXPRESSLY DISCLAIMS ANY AND ALL WARRANTIES,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NONINFRINGEMENT.
- * NEITHER DOES MEDIATEK PROVIDE ANY WARRANTY WHATSOEVER WITH RESPECT TO THE
- * SOFTWARE OF ANY THIRD PARTY WHICH MAY BE USED BY, INCORPORATED IN, OR
- * SUPPLIED WITH THE MEDIATEK SOFTWARE, AND BUYER AGREES TO LOOK ONLY TO SUCH
- * THIRD PARTY FOR ANY WARRANTY CLAIM RELATING THERETO. MEDIATEK SHALL ALSO
- * NOT BE RESPONSIBLE FOR ANY MEDIATEK SOFTWARE RELEASES MADE TO BUYER'S
- * SPECIFICATION OR TO CONFORM TO A PARTICULAR STANDARD OR OPEN FORUM.
- *
- * BUYER'S SOLE AND EXCLUSIVE REMEDY AND MEDIATEK'S ENTIRE AND CUMULATIVE
- * LIABILITY WITH RESPECT TO THE MEDIATEK SOFTWARE RELEASED HEREUNDER WILL BE,
- * AT MEDIATEK'S OPTION, TO REVISE OR REPLACE THE MEDIATEK SOFTWARE AT ISSUE,
- * OR REFUND ANY SOFTWARE LICENSE FEES OR SERVICE CHARGE PAID BY BUYER TO
- * MEDIATEK FOR SUCH MEDIATEK SOFTWARE AT ISSUE.
- *
- * THE TRANSACTION CONTEMPLATED HEREUNDER SHALL BE CONSTRUED IN ACCORDANCE
- * WITH THE LAWS OF THE STATE OF CALIFORNIA, USA, EXCLUDING ITS CONFLICT OF
- * LAWS PRINCIPLES. ANY DISPUTES, CONTROVERSIES OR CLAIMS ARISING THEREOF AND
- * RELATED THERETO SHALL BE SETTLED BY ARBITRATION IN SAN FRANCISCO, CA, UNDER
- * THE RULES OF THE INTERNATIONAL CHAMBER OF COMMERCE (ICC).
- *
- *****************************************************************************/
- /* **** Copy Right Note *********
- * Copyright Notice
- * (c) PMT.
- * All Rights Reserved.
- * (It is illegal to remove this copyright notice from this software or any
- * portion of it)
- *******************************************************************************
- * Filename:
- * ---------
- * wgui_draw_manager.c
- *
- * Project:
- * --------
- * PDG2
- *
- * Description:
- * ------------
- * Draws the category screens on the basis of the static coordinates specified
- * at Complile Time.
- * Author:
- * -------
- * -------
- *==============================================================================
- * HISTORY
- * Below this line, this part is controlled by PVCS VM. DO NOT MODIFY!!
- *------------------------------------------------------------------------------
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- *------------------------------------------------------------------------------
- * Upper this line, this part is controlled by PVCS VM. DO NOT MODIFY!!
- *==============================================================================
- *******************************************************************************/
- /* Include: MMI header file */
- #include "MMI_features.h"
- #ifdef __MMI_DRAW_MANAGER__
- #include "FrameworkStruct.h"
- #include "CustDataRes.h"
- #include "wgui_draw_manager.h"
- #include "wgui_fixed_menus.h"
- #include "wgui_status_icons.h"
- #include "wgui_categories_mm.h"
- #include "wgui_categories_inputs.h"
- #include "wgui_ems.h"
- #include "wgui_categories_popup.h"
- #include "wgui_categories_sublcd.h"
- #include "wgui_categories_idlescreen.h"
- #include "wgui_fixed_menus.h"
- #include "wgui_softkeys.h"
- #include "DebugInitDef.h"
- #include "gui_fixed_menuitems.h"
- #include "lcd_sw.h"
- #include "gdi_include.h"
- #include "wgui_categories_util.h"
- #include "wgui_calendar.h"
- #include "wgui_tab_bars.h"
- #include "wgui_virtual_keyboard.h"
- #include "gui_setting.h"
- #ifdef __MMI_TOUCH_SCREEN__
- #include "wgui_touch_screen.h"
- #endif
- #if defined(__MMI_TOUCH_SCREEN__)
- #include "EditorPen.h"
- #endif
- #ifdef __MMI_STOPWATCH__
- #include "StopwatchDef.h"
- #include "wgui_categories_stopwatch.h"
- #include "StopwatchStruct.h"
- #endif /* __MMI_STOPWATCH__ */
- #ifdef __MMI_SCREEN_ROTATE__
- #include "ScreenRotationGprot.h"
- #endif
- /* START VIJAY PMT 20051202 */
- #ifdef __MMI_UI_SMALL_SCREEN_SUPPORT__
- #include "HistoryGprot.h"
- #endif
- #include "ProfilingEngine.h"
- //KP Jerry add for KP-Style 12-Matrix mainmenu on 2007-3-19 start
- #ifdef __MMI_KP_STYLE_MAIN_MENU_MATRIX__
- #include "MainMenuDef.h"
- #endif
- //KP Jerry add for KP-Style 12-Matrix mainmenu on 2007-3-19 end
- /* END VIJAY PMT 20051202 */
- /*****************************************************************************
- * Local Variable
- *****************************************************************************/
- /**************************************************/
- /* Currently, we keep two context for MainLCD and SubLCD */
- /* In the future, we may have more than 2 LCDs */
- /* More context data would be needed in the future */
- /**************************************************/
- /* Start of Draw Manager MainLCD Context */
- /* DM internal context */
- static dm_cntx_struct g_dm_cntx;
- static dm_scr_bg_cntx_struct g_dm_scr_bg_cntx;
- /* DM components */
- /* -Layers */
- #ifndef __GDI_MEMORY_PROFILE_2__
- static U16 new_layer_x = 0;
- static U16 new_layer_y = 0;
- #endif /* __GDI_MEMORY_PROFILE_2__ */
- /* Currently used layers in Draw Manager */
- static GDI_HANDLE dm_layers[GDI_LAYER_TOTAL_LAYER_COUNT];
- /* Total currently used layers in Draw Manager */
- static U16 dm_layers_count = 0;
- static GDI_HANDLE dm_wallpaper_layer = GDI_ERROR_HANDLE;
- /* -Strings */
- static dm_string_data_struct dm_string_array[DM_MAX_STRINGS];
- static S32 dm_string_count = 0;
- /* -Images */
- static dm_image_data_struct dm_image_array[DM_MAX_IMAGES];
- static S32 dm_image_count = 0;
- /* -Background fillers */
- static UI_filled_area *dm_back_fill_array[DM_MAX_FILL_AREAS];
- static S32 dm_back_fill_count = 0;
- /* -Rectangles */
- static dm_rectangle_data_struct dm_rectangle_array[DM_MAX_RECTANGLES];
- static S32 dm_rectangle_count = 0;
- /* -Lines */
- static color dm_line_array[DM_MAX_LINES];
- static S32 dm_line_count = 0;
- /* -Scrolling Text objects */
- static scrolling_text dm_scroll_text[DM_MAX_SCROLL_TEXT];
- static U8 dm_scroll_text_buf[DM_MAX_SCROLL_TEXT][MAX_SUBMENU_CHARACTERS];
- static S32 dm_scroll_text_count = 0;
- static scrolling_text *dm_current_scroll_text = NULL;
- /* slide controls */
- S32 dm_slide_control_count = 0;
- /* buttons */
- static icontext_button dm_button_array[DM_MAX_BUTTONS];
- static S32 dm_button_count = 0;
- #ifdef __MMI_DRAW_MANAGER__
- static FuncPtr dm_button_func_ptrs[DM_MAX_BUTTONS][MAX_KEY_TYPE];
- #endif
- /* percentage bar */
- static dm_percentage_bar_struct dm_percentage_bar_array[DM_MAX_PERCENTAGE_BAR];
- static S32 dm_percentage_bar_count = 0;
- /* others */
- static dm_previous_control_coordinates_struct prev_control_coordinates;
- static dm_aligned_area_data_struct dm_aligned_area_data;
- static FuncPtr dm_show_vkpad_callback = UI_dummy_function;
- /* End of MainLCD context */
- /* DM SubLCD context stat */
- #ifdef __MMI_SUBLCD__
- /* -Layers */
- static GDI_HANDLE dm_layers_sub[GDI_LAYER_TOTAL_LAYER_COUNT];
- static U16 dm_layers_count_sub = 0;
- /* -Strings */
- static dm_string_data_struct dm_string_array_sub[DM_MAX_SUBLCD_STRINGS];
- static S32 dm_string_count_sub = 0;
- /* -Images */
- static dm_image_data_struct dm_image_array_sub[DM_MAX_SUBLCD_IMAGES];
- static S32 dm_image_count_sub = 0;
- #if (0) /* Currently Not used */
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- #endif /* (0) */
- #endif /* __MMI_SUBLCD__ */
- /* End of SubLCD context */
- /*****************************************************************************
- * Global Variable
- *****************************************************************************/
- dm_data_struct g_dm_data;
- dm_data_struct g_dm_sublcd_data;
- void (*dm_backup_exit_category_function) (void);
- #ifdef __MMI_SUBLCD__
- void (*dm_sub_backup_exit_category_function) (void);
- #endif
- void (*dm_category_controlled_area_callback) (dm_coordinates *coordinate);
- void (*dm_category_controlled_area2_callback) (dm_coordinates *coordinate);
- #ifdef __MMI_SUBLCD__
- void (*dm_sub_category_controlled_area_callback) (dm_coordinates *coordinate);
- #endif
- /*****************************************************************************
- * Global Function
- *****************************************************************************/
- S16 *dm_get_coordinates(S16 *UICtrlAccessPtr_p, dm_coordinates *dm_coordinate_info);
- /*****************************************************************************
- * Extern Global Variable
- *****************************************************************************/
- #ifdef __MMI_STOPWATCH__
- extern wtchSkinResStruct wtch_pos;
- extern S32 stop_watch_x, stop_watch_y, stop_watch_width;
- #endif /* __MMI_STOPWATCH__ */
- extern S32 wgui_EMS_inputbox_information_bar_height;
- extern U8 matrix_main_menu_highlight_bitmap_data[];
- extern const U8 dm_base_control_set[];
- extern const S16 dm_base_control_set_coordinates[];
- extern icontext_button MMI_softkeys[];
- extern BOOL r2lMMIFlag;
- //extern MMI_ID_TYPE idle_screen_wallpaper_ID; /* 061705 Calvin added */
- //extern S8 *idle_screen_wallpaper_name;
- extern MMI_ID_TYPE idle_screen_cache_id; /* 073106 cache wallpaper */
- extern S8 *idle_screen_cache_name;
- /* Calendar Extern Variables */
- extern S32 cat82_title1_x1;
- extern S32 cat82_title1_y1;
- extern S32 cat82_title1_x2;
- extern S32 cat82_title1_y2;
- extern S32 cat82_title2_x1;
- extern S32 cat82_title2_y1;
- extern S32 cat82_title2_x2;
- extern S32 cat82_title2_y2;
- extern S32 cat82_title3_x1;
- extern S32 cat82_title3_y1;
- extern S32 cat82_title3_x2;
- extern S32 cat82_title3_y2;
- extern pBOOL calendar_show_title2;
- extern pBOOL calendar_show_title3;
- #ifdef __MMI_UI_CALENDAR_WITH_INFO_BOX__
- extern S32 cat82_title1_month_x1;
- extern S32 cat82_title1_month_y1;
- extern S32 cat82_title1_month_x2;
- extern S32 cat82_title1_month_y2;
- extern pBOOL calendar_show_title_month;
- extern BOOL lunar_calendar_present;
- #endif /* __MMI_UI_CALENDAR_WITH_INFO_BOX__ */
- extern U8 *Cat82_title1;
- extern U8 *Cat82_title2;
- extern U8 *Cat82_title3;
- extern stFontAttribute wgui_dialer_box_f1;
- extern UI_font_type calendar_title_font;
- #ifdef __MMI_UI_CALENDAR_WITH_INFO_BOX__
- extern U8 *Cat82_title1_month;
- extern UI_font_type calendar_title_month_font;
- #endif /* __MMI_UI_CALENDAR_WITH_INFO_BOX__ */
- extern UI_filled_area wgui_pop_up_dialog_background;
- extern gdi_handle wgui_layer_1;
- extern multitap_input MMI_uppercase_multitaps[MAX_MULTITAPS];
- extern multitap_input MMI_lowercase_multitaps[MAX_MULTITAPS];
- extern multitap_input MMI_bpmf_multitaps[MAX_MULTITAPS];
- #if defined(__MMI_MULTITAP_SPANISH__)
- extern multitap_input MMI_spanish_uppercase_multitaps[MAX_MULTITAPS];
- extern multitap_input MMI_spanish_lowercase_multitaps[MAX_MULTITAPS];
- #endif /* defined(__MMI_MULTITAP_SPANISH__) */
- #if defined(__MMI_MULTITAP_FRENCH__)
- extern multitap_input MMI_french_uppercase_multitaps[MAX_MULTITAPS];
- extern multitap_input MMI_french_lowercase_multitaps[MAX_MULTITAPS];
- #endif /* defined(__MMI_MULTITAP_FRENCH__) */
- #if defined(__MMI_MULTITAP_GERMAN__)
- extern multitap_input MMI_german_uppercase_multitaps[MAX_MULTITAPS];
- extern multitap_input MMI_german_lowercase_multitaps[MAX_MULTITAPS];
- #endif /* defined(__MMI_MULTITAP_GERMAN__) */
- #if defined(__MMI_MULTITAP_ITALIAN__)
- extern multitap_input MMI_italian_uppercase_multitaps[MAX_MULTITAPS];
- extern multitap_input MMI_italian_lowercase_multitaps[MAX_MULTITAPS];
- #endif /* defined(__MMI_MULTITAP_ITALIAN__) */
- /* PMT CZ_PO_TU START 20050812 */
- #if defined(__MMI_MULTITAP_POLISH__)
- extern multitap_input MMI_polish_uppercase_multitaps[MAX_MULTITAPS];
- extern multitap_input MMI_polish_lowercase_multitaps[MAX_MULTITAPS];
- #endif /* defined(__MMI_MULTITAP_POLISH__) */
- //PMT CZ_PO_TU END 20050812
- //PMT CZ_PO_TU START 20050812
- #if defined(__MMI_MULTITAP_CZECH__)
- extern multitap_input MMI_czech_uppercase_multitaps[MAX_MULTITAPS];
- extern multitap_input MMI_czech_lowercase_multitaps[MAX_MULTITAPS];
- #endif /* defined(__MMI_MULTITAP_CZECH__) */
- //PMT CZ_PO_TU END 20050812
- //PMT CZ_PO_TU START 20050812
- #if defined(__MMI_MULTITAP_TURKISH__)
- extern multitap_input MMI_turkish_uppercase_multitaps[MAX_MULTITAPS];
- extern multitap_input MMI_turkish_lowercase_multitaps[MAX_MULTITAPS];
- #endif /* defined(__MMI_MULTITAP_TURKISH__) */
- //PMT CZ_PO_TU END 20050812
- // PMT BHASKAR START 20052907
- #if defined(__MMI_MULTITAP_VIETNAMESE__)
- extern multitap_input MMI_vietnamese_uppercase_multitaps[MAX_MULTITAPS];
- extern multitap_input MMI_vietnamese_lowercase_multitaps[MAX_MULTITAPS];
- #endif /* defined(__MMI_MULTITAP_VIETNAMESE__) */
- #if defined(__MMI_MULTITAP_INDONESIAN__)
- extern multitap_input MMI_indonesian_uppercase_multitaps[MAX_MULTITAPS];
- extern multitap_input MMI_indonesian_lowercase_multitaps[MAX_MULTITAPS];
- #endif /* defined(__MMI_MULTITAP_INDONESIAN__) */
- #if defined(__MMI_MULTITAP_DANISH__)
- extern multitap_input MMI_danish_uppercase_multitaps[MAX_MULTITAPS];
- extern multitap_input MMI_danish_lowercase_multitaps[MAX_MULTITAPS];
- #endif /* defined(__MMI_MULTITAP_DANISH__) */
- #if defined(__MMI_MULTITAP_PORTUGUESE__)
- extern multitap_input MMI_portuguese_uppercase_multitaps[MAX_MULTITAPS];
- extern multitap_input MMI_portuguese_lowercase_multitaps[MAX_MULTITAPS];
- #endif /* defined(__MMI_MULTITAP_PORTUGUESE__) */
- /* PMT START HU_FI 20050825 */
- #if defined(__MMI_MULTITAP_FINNISH__)
- extern multitap_input MMI_finnish_uppercase_multitaps[MAX_MULTITAPS];
- extern multitap_input MMI_finnish_lowercase_multitaps[MAX_MULTITAPS];
- #endif /* defined(__MMI_MULTITAP_FINNISH__) */
- //PMT END HU_FI 20050825
- //PMT NO_AR_SL_DU START 20050909
- #if defined(__MMI_MULTITAP_SLOVAK__)
- extern multitap_input MMI_slovak_uppercase_multitaps[MAX_MULTITAPS];
- extern multitap_input MMI_slovak_lowercase_multitaps[MAX_MULTITAPS];
- #endif /* defined(__MMI_MULTITAP_SLOVAK__) */
- /* START DUTCH_T9 20051021 */
- #if defined(__MMI_MULTITAP_DUTCH__)
- extern multitap_input MMI_dutch_uppercase_multitaps[MAX_MULTITAPS];
- extern multitap_input MMI_dutch_lowercase_multitaps[MAX_MULTITAPS];
- #endif /* defined(__MMI_MULTITAP_DUTCH__) */
- //END DUTCH_T9 20051021
- //PMT BULGARIAN START 20051201
- #if defined(__MMI_MULTITAP_BULGARIAN__)
- extern multitap_input MMI_bulgarian_uppercase_multitaps[MAX_MULTITAPS];
- extern multitap_input MMI_bulgarian_lowercase_multitaps[MAX_MULTITAPS];
- #endif /* defined(__MMI_MULTITAP_BULGARIAN__) */
- /* PMT BULGARIAN END 20051201 */
- #if defined(__MMI_MULTITAP_ARABIC__)
- extern multitap_input MMI_arabic_multitaps[MAX_MULTITAPS];
- #endif
- /* PMT START PERSIAN */
- #if defined(__MMI_MULTITAP_PERSIAN__)
- extern multitap_input MMI_persian_multitaps[MAX_MULTITAPS];
- #endif
- //PMT END PERSIAN
- /* Norwegian start */
- #if defined(__MMI_MULTITAP_NORWEGIAN__)
- extern multitap_input MMI_norwegian_uppercase_multitaps[MAX_MULTITAPS];
- extern multitap_input MMI_norwegian_lowercase_multitaps[MAX_MULTITAPS];
- #endif /* defined(__MMI_MULTITAP_NORWEGIAN__) */
- //Norwegian end
- //PMT NO_AR_SL_DU END 20050909
- //PMT START SWEDISH 20050916
- #if defined(__MMI_MULTITAP_SWEDISH__)
- extern multitap_input MMI_swedish_uppercase_multitaps[MAX_MULTITAPS];
- extern multitap_input MMI_swedish_lowercase_multitaps[MAX_MULTITAPS];
- #endif /* defined(__MMI_MULTITAP_SWEDISH__) */
- //PMT END SWEDISH 20050916
- //PMT START CR_ROM_SLO 20050923
- #if defined(__MMI_MULTITAP_CROATIAN__)
- extern multitap_input MMI_croatian_uppercase_multitaps[MAX_MULTITAPS];
- extern multitap_input MMI_croatian_lowercase_multitaps[MAX_MULTITAPS];
- #endif /* defined(__MMI_MULTITAP_CROATIAN__) */
- #if defined(__MMI_MULTITAP_ROMANIAN__)
- extern multitap_input MMI_romanian_uppercase_multitaps[MAX_MULTITAPS];
- extern multitap_input MMI_romanian_lowercase_multitaps[MAX_MULTITAPS];
- #endif /* defined(__MMI_MULTITAP_ROMANIAN__) */
- #if defined(__MMI_MULTITAP_SLOVENIAN__)
- extern multitap_input MMI_slovenian_uppercase_multitaps[MAX_MULTITAPS];
- extern multitap_input MMI_slovenian_lowercase_multitaps[MAX_MULTITAPS];
- #endif /* defined(__MMI_MULTITAP_SLOVENIAN__) */
- //PMT END CR_ROM_SLO 20050923
- //PMT START GR_HE_CZ_FI_DA_HU 20051007
- #if defined(__MMI_MULTITAP_GREEK__)
- extern multitap_input MMI_greek_uppercase_multitaps[MAX_MULTITAPS];
- extern multitap_input MMI_greek_lowercase_multitaps[MAX_MULTITAPS];
- #endif /* defined(__MMI_MULTITAP_GREEK__) */
- #if defined(__MMI_MULTITAP_HUNGARIAN__)
- extern multitap_input MMI_hungarian_uppercase_multitaps[MAX_MULTITAPS];
- extern multitap_input MMI_hungarian_lowercase_multitaps[MAX_MULTITAPS];
- #endif /* defined(__MMI_MULTITAP_HUNGARIAN__) */
- /* PMT END GR_HE_CZ_FI_DA_HU 20051007 */
- #if defined(__MMI_WCSS_INPUT_FORMAT_SUPPORT__)
- extern multitap_input MMI_uppercase_numberless_multitaps[MAX_MULTITAPS];
- extern multitap_input MMI_lowercase_numberless_multitaps[MAX_MULTITAPS];
- #endif /* defined(__MMI_WCSS_INPUT_FORMAT_SUPPORT__) */
- /*****************************************************************************
- * Extern Global Function
- *****************************************************************************/
- extern void (*redraw_current_inline_item) (void);
- extern S32 dm_get_coordinate_sets_count(void);
- extern S32 dm_get_control_sets_count(void);
- extern U8 *dm_get_base_control_set(void);
- extern S16 *dm_get_base_coordinate_set(void);
- extern U8 *dm_get_base_control_set2(void);
- extern S16 *dm_get_base_coordinate_set2(void);
- extern void set_calendar_control_background_limits(S32 y1, S32 y2);
- extern void set_button_bar_height(S32 height);
- extern void wgui_reset_calendar_params(S32 x, S32 y, S32 n_columns, S32 n_rows, S32 cell_width, S32 cell_height);
- extern void wgui_show_calendar(void);
- extern void ChangeCategory82Title1(U8 *title);
- extern void ChangeCategory82Title2(U8 *title);
- extern void ChangeCategory82Title3(U8 *title);
- extern void category151_keyboard_handler(S32 vkey_code, S32 key_state);
- extern void UI_cross_hatch_fill_rectangle(S32 x1, S32 y1, S32 x2, S32 y2, color c);
- extern MMI_BOOL get_singleline_inputbox_display_status(void);
- extern MMI_BOOL is_multiline_inputbox_in_view_mode(void);
- extern MMI_BOOL is_EMS_inputbox_in_view_mode(void);
- #ifdef __MMI_UI_CALENDAR_WITH_INFO_BOX__
- extern void ChangeCategory82Title1Month(U8 *title);
- #endif
- #ifdef __MMI_STOPWATCH__
- extern void get_stop_watch_history(U16 history_ID, U8 *history_buffer);
- #endif
- /*****************************************************************************
- * FUNCTION
- * dm_init
- * DESCRIPTION
- * initialize variables used in draw manager.
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void dm_init(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- U8 idx = 0;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- for (idx = 0; idx < GDI_LAYER_TOTAL_LAYER_COUNT; idx++)
- {
- dm_layers[idx] = GDI_ERROR_HANDLE;
- }
- /* Draw Manager context */
- g_dm_cntx.redraw_screen_main = NORMAL_EXIT;
- g_dm_cntx.redraw_scr_bg_flag = 1;
- g_dm_cntx.lock_redraw_main = 0;
- g_dm_cntx.exit_full_screen_on_exit = 0;
- g_dm_cntx.is_context_reset = 1;
- #ifdef __MMI_SUBLCD__
- g_dm_cntx.redraw_screen_sub = NORMAL_EXIT;
- g_dm_cntx.lock_redraw_sub = 0;
- #endif /* __MMI_SUBLCD__ */
- /* Draw Manager Screen Background Layer Context */
- g_dm_scr_bg_cntx.layer_handle = GDI_ERROR_HANDLE;
- /* g_dm_scr_bg_cntx.animation_handle=GDI_ERROR_HANDLE; */
- g_dm_scr_bg_cntx.image_id = 0;
- g_dm_scr_bg_cntx.image_name = NULL;
- g_dm_scr_bg_cntx.offset_x = -1;
- g_dm_scr_bg_cntx.offset_y = -1;
- g_dm_scr_bg_cntx.layer_opacity = 150;
- g_dm_scr_bg_cntx.flags = 0;//082906 scr_bg
- /* Reset all images */
- for (idx = 0; idx < dm_image_count; idx++)
- {
- dm_image_array[idx].back_fill = NULL;
- dm_image_array[idx].image = NULL;
- dm_image_array[idx].name = NULL;
- if (dm_image_array[idx].image_handle != GDI_ERROR_HANDLE)
- {
- gdi_image_stop_animation(dm_image_array[idx].image_handle);
- dm_image_array[idx].image_handle = GDI_ERROR_HANDLE;
- }
- }
- dm_image_count = 0;
- dm_string_count = 0;
- dm_back_fill_count = 0;
- dm_rectangle_count = 0;
- dm_line_count = 0;
- dm_slide_control_count = 0;
- dm_scroll_text_count = 0;
- dm_current_scroll_text = NULL;
- dm_button_count = 0;
- #ifdef __MMI_SUBLCD__
- /* Reset all images */
- for (idx = 0; idx < dm_image_count_sub; idx++)
- {
- dm_image_array_sub[idx].back_fill = NULL;
- dm_image_array_sub[idx].image = NULL;
- dm_image_array_sub[idx].name = NULL;
- if (dm_image_array_sub[idx].image_handle != GDI_ERROR_HANDLE)
- {
- gdi_image_stop_animation(dm_image_array_sub[idx].image_handle);
- dm_image_array_sub[idx].image_handle = GDI_ERROR_HANDLE;
- }
- }
- dm_image_count_sub = 0;
- dm_string_count_sub = 0;
- #endif /* __MMI_SUBLCD__ */
- }
- /*****************************************************************************
- * FUNCTION
- * dm_reset_context
- * DESCRIPTION
- * reset variables used in draw manager.
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void dm_reset_context(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- if (g_dm_cntx.is_context_reset == MMI_FALSE)
- {
- U8 idx = 0;
- /* Reset screen background layer */
- dm_set_scr_bg_redraw(MMI_TRUE);
- g_dm_scr_bg_cntx.layer_handle = GDI_ERROR_HANDLE;
- /* Reset Layer information */
- /* MainLCD */
- if (!(g_dm_data.s32flags & DM_SUB_LCD_CONTEXT))
- {
- for (idx = 0; idx < dm_layers_count; idx++)
- {
- if (dm_layers[idx] != GDI_LAYER_MAIN_BASE_LAYER_HANDLE && dm_layers[idx] != wgui_layer_1
- && dm_layers[idx] != GDI_ERROR_HANDLE && dm_layers[idx] != GDI_LAYER_EMPTY_HANDLE)
- {
- gdi_layer_free(dm_layers[idx]);
- }
- dm_layers[idx] = GDI_ERROR_HANDLE;
- }
- dm_layers_count = 0;
- }
- dm_wallpaper_layer = GDI_ERROR_HANDLE;
- /* can be removed */
- gdi_layer_push_and_set_active(GDI_LAYER_MAIN_BASE_LAYER_HANDLE);
- /* gdi_layer_set_source_key(FALSE,GDI_COLOR_TRANSPARENT); */
- gdi_layer_pop_and_restore_active();
- if (g_dm_cntx.redraw_screen_main == REDRAW_2_SHOW)
- {
- return;
- }
- /* Reset all images */
- for (idx = 0; idx < dm_image_count; idx++)
- {
- dm_image_array[idx].back_fill = NULL;
- dm_image_array[idx].image = NULL;
- dm_image_array[idx].name = NULL;
- if (dm_image_array[idx].image_handle != GDI_ERROR_HANDLE)
- {
- gdi_image_stop_animation(dm_image_array[idx].image_handle);
- dm_image_array[idx].image_handle = GDI_ERROR_HANDLE;
- }
- }
- for (idx = 0; idx < dm_scroll_text_count; idx++)
- {
- gui_scrolling_text_stop(&(dm_scroll_text[idx]));
- }
- dm_image_count = 0;
- dm_string_count = 0;
- dm_back_fill_count = 0;
- dm_rectangle_count = 0;
- dm_line_count = 0;
- dm_slide_control_count = 0;
- dm_scroll_text_count = 0;
- dm_current_scroll_text = NULL;
- dm_button_count = 0;
- dm_percentage_bar_count = 0;
- /* Reset default pen handlers */
- #ifdef __MMI_TOUCH_SCREEN__
- wgui_reset_category_screen_control_pen_handler();
- wgui_reset_image_control_pen_handler();
- #endif /* __MMI_TOUCH_SCREEN__ */
- dm_reset_category_controlled_callback();
- dm_reset_button_functions();
- /* Can be removed -start */
- dm_reset_title_coordinates();
- dm_reset_fixed_list_coordinates();
- dm_reset_inline_fixed_list_coordinates();
- dm_reset_lsk_coordinates();
- dm_reset_rsk_coordinates();
- dm_reset_button_bar_coordinates();
- /* Can be removed -end */
- dm_show_vkpad_callback = NULL;
- #ifdef __MMI_SCREEN_ROTATE__
- /* Reset the background image set by rotated screen */
- if (mmi_frm_is_screen_width_height_swapped())
- {
- g_dm_scr_bg_cntx.image_id = 0;
- g_dm_scr_bg_cntx.image_name = NULL;
- //g_dm_scr_bg_cntx.flags = 0;//082906 scr_bg
- }
- #endif /* __MMI_SCREEN_ROTATE__ */
- g_dm_data.s32CatId = 0;
- g_dm_data.s32flags = 0;
- g_dm_data.s32ScrId = 0;
- /* Leo start 20050830 */
- ExitCategoryFunction = MMI_dummy_function;
- RedrawCategoryFunction = MMI_dummy_function;
- GetCategoryHistory = dummy_get_history;
- GetCategoryHistorySize = dummy_get_history_size;
- /* Leo end 20050830 */
- g_dm_cntx.is_context_reset = MMI_TRUE;
- }
- }
- /*****************************************************************************
- * FUNCTION
- * dm_reset_context_ext
- * DESCRIPTION
- * reset variables used in draw manager.
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void dm_reset_context_ext(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- }
- #ifdef __MMI_SUBLCD__
- /*****************************************************************************
- * FUNCTION
- * dm_reset_sublcd_context
- * DESCRIPTION
- * reset variables used in draw manager for sublcd.
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void dm_reset_sublcd_context(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- U16 idx = 0;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- for (idx = 0; idx < dm_layers_count_sub; idx++)
- {
- if (dm_layers_sub[idx] != GDI_LAYER_SUB_BASE_LAYER_HANDLE)
- {
- gdi_layer_free(dm_layers_sub[idx]);
- }
- dm_layers_sub[idx] = GDI_ERROR_HANDLE;
- }
- dm_layers_count_sub = 0;
- /* Reset all images */
- for (idx = 0; idx < dm_image_count_sub; idx++)
- {
- dm_image_array_sub[idx].back_fill = NULL;
- dm_image_array_sub[idx].image = NULL;
- dm_image_array_sub[idx].name = NULL;
- if (dm_image_array_sub[idx].image_handle != GDI_ERROR_HANDLE)
- {
- gdi_image_stop_animation(dm_image_array_sub[idx].image_handle);
- dm_image_array_sub[idx].image_handle = GDI_ERROR_HANDLE;
- }
- }
- dm_image_count_sub = 0;
- dm_string_count_sub = 0;
- dm_reset_sub_category_controlled_callback();
- }
- #endif /* __MMI_SUBLCD__ */
- /*****************************************************************************
- * FUNCTION
- * dm_get_image_count
- * DESCRIPTION
- * Used to get currently used image controls
- * PARAMETERS
- * void
- * RETURNS
- * U16 number of image countrol used currently
- *****************************************************************************/
- U16 dm_get_image_count(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- return dm_image_count;
- }
- /*****************************************************************************
- * FUNCTION
- * dm_get_button_count
- * DESCRIPTION
- * Used to get currently used button controls
- * PARAMETERS
- * void
- * RETURNS
- * U16 number of button countrol used currently
- *****************************************************************************/
- U16 dm_get_button_count(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- return dm_button_count;
- }
- /*****************************************************************************
- * FUNCTION
- * dm_get_button
- * DESCRIPTION
- *
- * PARAMETERS
- * index [IN]
- * RETURNS
- *
- *****************************************************************************/
- icontext_button *dm_get_button(U16 index)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- MMI_ASSERT(index < DM_MAX_BUTTONS);
- return &dm_button_array[index];
- }
- /* Leo end 20050722 */
- /*****************************************************************************
- * FUNCTION
- * dm_get_font
- * DESCRIPTION
- * Used to return the font poointer depending on the font enum value read from
- * coordinate set
- * PARAMETERS
- * font [IN] Font enum value
- * RETURNS
- * returns font pointer
- *****************************************************************************/
- UI_font_type dm_get_font(S16 font)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- switch (font)
- {
- case SMALL_FONT:
- return (&MMI_small_font);
- break;
- case MEDIUM_FONT:
- return (&MMI_medium_font);
- break;
- case LARGE_FONT:
- return (&MMI_large_font);
- case SUBLCD_FONT:
- return (&MMI_sublcd_font);
- case DIALER_FONT:
- return (&wgui_dialer_box_f1);
- default:
- return (&MMI_default_font);
- break;
- }
- }
- /*****************************************************************************
- * FUNCTION
- * setup_previous_control
- * DESCRIPTION
- * Set ups the coordinates for previous control.
- * PARAMETERS
- * dm_coordinate_info [?]
- * RETURNS
- * void
- *****************************************************************************/
- void setup_previous_control(dm_coordinates *dm_coordinate_info)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- prev_control_coordinates.coordinate.s16X = dm_coordinate_info->s16X;
- prev_control_coordinates.coordinate.s16Y = dm_coordinate_info->s16Y;
- prev_control_coordinates.coordinate.s16Height = dm_coordinate_info->s16Height;
- prev_control_coordinates.coordinate.s16Width = dm_coordinate_info->s16Width;
- prev_control_coordinates.s16X2 =
- prev_control_coordinates.coordinate.s16X + prev_control_coordinates.coordinate.s16Width - 1;
- prev_control_coordinates.s16Y2 =
- prev_control_coordinates.coordinate.s16Y + prev_control_coordinates.coordinate.s16Height - 1;
- }
- /*****************************************************************************
- * FUNCTION
- * dm_exit_category_function
- * DESCRIPTION
- * Common exit function for draw manager.
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void dm_exit_category_function(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- switch (g_dm_cntx.redraw_screen_main)
- {
- /* normal case */
- case NORMAL_REDRAW:
- case REDRAW_2_REDRAW:
- if (dm_backup_exit_category_function)
- {
- dm_backup_exit_category_function();
- }
- g_dm_cntx.redraw_screen_main = NORMAL_EXIT;
- break;
- case REDRAW_2_SHOW:
- break;
- default:
- MMI_ASSERT(0);
- }
- #ifdef GDI_USING_LAYER_ROTATE
- //W06.04 Replace functions for GDI LCD Rotate
- //if ( gdi_layer_get_base_layer_rotation() == GDI_LCD_LAYER_ROTATE_0)
- if (gdi_lcd_get_rotate() == GDI_LCD_LAYER_ROTATE_0)
- #endif /* GDI_USING_LAYER_ROTATE */
- {
- if (dm_layers[0] != GDI_ERROR_HANDLE || dm_layers[1] != GDI_ERROR_HANDLE || dm_layers[2] != GDI_ERROR_HANDLE ||
- dm_layers[3] != GDI_ERROR_HANDLE)
- {
- gdi_layer_flatten_to_base(dm_layers[0], dm_layers[1], dm_layers[2], dm_layers[3]);
- }
- }
- dm_reset_context();
- if (g_dm_cntx.exit_full_screen_on_exit)
- {
- g_dm_cntx.exit_full_screen_on_exit = MMI_FALSE;
- leave_full_screen();
- }
- /* 092005 redraw status Calvin Start */
- if (wgui_is_wallpaper_on_bottom())
- {
- gOnFullScreen = MMI_LEAVE_BG_ON_BOTTOM_SCREEN;
- wgui_reset_wallpaper_on_bottom(); /* 041205 Calvin added to support wallpaper on bottom */
- }
- /* 092005 redraw status Calvin End */
- } /* end of dm_exit_category_function */
- #ifdef __MMI_SUBLCD__
- /*****************************************************************************
- * FUNCTION
- * dm_sub_exit_category_function
- * DESCRIPTION
- * Common exit function for draw manager.
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void dm_sub_exit_category_function(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- if (g_dm_sublcd_data.s32flags & DM_SUB_LCD_CONTEXT)
- {
- switch (g_dm_cntx.redraw_screen_sub)
- {
- /* normal case */
- case NORMAL_REDRAW:
- case REDRAW_2_REDRAW:
- if (dm_sub_backup_exit_category_function)
- {
- dm_sub_backup_exit_category_function();
- }
- g_dm_cntx.redraw_screen_sub = NORMAL_EXIT;
- break;
- case REDRAW_2_SHOW:
- break;
- default:
- MMI_ASSERT(0);
- }
- }
- dm_reset_sublcd_context();
- SUBLCD_ExitCategoryFunction = MMI_dummy_function;
- SUBLCD_RedrawCategoryFunction = MMI_dummy_function;
- SUBLCD_GetCategoryHistory = dummy_get_history;
- SUBLCD_GetCategoryHistorySize = dummy_get_history_size;
- }
- #endif /* __MMI_SUBLCD__ */
- /*****************************************************************************
- * FUNCTION
- * dm_backup_current_category_exit_function
- * DESCRIPTION
- * Save current exit function and set ExitCategoryFunction to dm_exit_category_function
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void dm_backup_current_category_exit_function(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- dm_backup_exit_category_function = ExitCategoryFunction;
- ExitCategoryFunction = dm_exit_category_function;
- } /* end of dm_backup_current_category_exit_function */
- #ifdef __MMI_SUBLCD__
- /*****************************************************************************
- * FUNCTION
- * dm_sub_backup_current_category_exit_function
- * DESCRIPTION
- * Save current exit function and set ExitCategoryFunction to dm_exit_category_function
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void dm_sub_backup_current_category_exit_function(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- dm_sub_backup_exit_category_function = SUBLCD_ExitCategoryFunction;
- SUBLCD_ExitCategoryFunction = dm_sub_exit_category_function;
- } /* end of dm_backup_current_category_exit_function */
- #endif /* __MMI_SUBLCD__ */
- /*****************************************************************************
- * FUNCTION
- * dm_setup_category_functions
- * DESCRIPTION
- * This function sets up the common-used functions for the Draw Manager
- * PARAMETERS
- * redraw_function [IN]
- * get_history_function [IN]
- * get_history_size_function [IN]
- * dm_data(?) [IN] Which contains the Draw Manager Information
- * RETURNS
- * void
- *****************************************************************************/
- void dm_setup_category_functions(
- FuncPtr redraw_function,
- U8 *(*get_history_function) (U8 *buffer),
- S32(*get_history_size_function) (void))
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- RedrawCategoryFunction = redraw_function;
- GetCategoryHistory = get_history_function;
- GetCategoryHistorySize = get_history_size_function;
- }
- #ifdef __MMI_SUBLCD__
- /*****************************************************************************
- * FUNCTION
- * dm_sublcd_setup_data
- * DESCRIPTION
- * This function sets up the information for the Sublcd Draw Manager
- * PARAMETERS
- * dm_data [IN] Which contains the Draw Manager Information
- * RETURNS
- * void
- *****************************************************************************/
- void dm_sublcd_setup_data(dm_data_struct *dm_data)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- g_dm_sublcd_data.s32CatId = dm_data->s32CatId;
- g_dm_sublcd_data.s32ScrId = dm_data->s32ScrId;
- g_dm_sublcd_data.s32flags = dm_data->s32flags;
- dm_sub_backup_current_category_exit_function();
- if (g_dm_sublcd_data.s32CatId == 0 && g_dm_sublcd_data.s32ScrId == 0 && g_dm_sublcd_data.s32flags == 0)
- {
- return;
- }
- if (g_dm_sublcd_data.s32flags & DM_SUB_LCD_CONTEXT)
- {
- /* Normal procedure */
- if (g_dm_cntx.redraw_screen_sub == NORMAL_EXIT)
- {
- g_dm_cntx.redraw_screen_sub = NORMAL_SHOW;
- }
- /* from redraw screen */
- else if (g_dm_cntx.redraw_screen_sub == NORMAL_REDRAW)
- {
- g_dm_cntx.redraw_screen_sub = NORMAL_REDRAW;
- /* MMI_ASSERT (0); */
- }
- /* from show screen */
- // else if ( g_dm_cntx.redraw_screen_sub == NORMAL_SHOW )
- // MMI_ASSERT (0);
- }
- } /* end of dm_setup_data */
- /*****************************************************************************
- * FUNCTION
- * dm_sublcd_redraw_category_screen
- * DESCRIPTION
- * This function redraws the Sublcd.
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void dm_sublcd_redraw_category_screen(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- dm_data_struct g_dm_data_temp_struct;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- UI_set_sub_LCD_graphics_context();
- g_dm_data_temp_struct = g_dm_data;
- g_dm_data = g_dm_sublcd_data;
- g_dm_data.s32flags |= DM_SUB_LCD_CONTEXT;
- dm_redraw_category_screen();
- g_dm_data = g_dm_data_temp_struct;
- UI_set_main_LCD_graphics_context();
- } /* end of dm_setup_data */
- #endif /* __MMI_SUBLCD__ */
- /*****************************************************************************
- * FUNCTION
- * dm_is_activated
- * DESCRIPTION
- * Check whether the current
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- MMI_BOOL dm_is_activated(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- if (g_dm_data.s32CatId == 0)
- {
- return MMI_FALSE;
- }
- else
- {
- return MMI_TRUE;
- }
- }
- /*****************************************************************************
- * FUNCTION
- * dm_setup_data
- * DESCRIPTION
- * This function sets up the information for the Draw Manager
- * PARAMETERS
- * dm_data [IN] Which contains the Draw Manager Information
- * RETURNS
- * void
- *****************************************************************************/
- void dm_setup_data(dm_data_struct *dm_data)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- g_dm_data.s32CatId = dm_data->s32CatId;
- g_dm_data.s32ScrId = dm_data->s32ScrId;
- g_dm_data.s32flags = dm_data->s32flags;
- dm_backup_current_category_exit_function();
- if (g_dm_data.s32CatId == 0 && g_dm_data.s32ScrId == 0 && g_dm_data.s32flags == 0)
- {
- return;
- }
- /* Normal procedure */
- if (g_dm_cntx.redraw_screen_main == NORMAL_EXIT)
- {
- g_dm_cntx.redraw_screen_main = NORMAL_SHOW;
- }
- /* from redraw screen */
- else if (g_dm_cntx.redraw_screen_main == NORMAL_REDRAW)
- {
- g_dm_cntx.redraw_screen_main = REDRAW_2_SHOW;
- dm_reset_context();
- g_dm_cntx.redraw_screen_main = NORMAL_SHOW;
- /* MMI_ASSERT (0); */
- }
- /* from show screen */
- else if (g_dm_cntx.redraw_screen_main == NORMAL_SHOW)
- {
- ;
- }
- /* MMI_ASSERT (0); */
- #ifdef __MMI_SCREEN_ROTATE__
- if (mmi_frm_is_screen_width_height_swapped())
- {
- /* Close status icon (but not entry_full_screen()) */
- close_title_status_icon();
- g_dm_cntx.exit_full_screen_on_exit = MMI_TRUE;
- /* Set screen background */
- g_dm_data.s32flags |= DM_CLEAR_SCREEN_BACKGROUND;
- #ifdef __MMI_WALLPAPER_ON_BOTTOM__
- /* Keep opacity unchanged */
- dm_set_scr_bg_image(IMG_SCREEN_ROTATE_BACKGROUND, NULL, -1, -1, g_dm_scr_bg_cntx.layer_opacity);
- #else /* __MMI_WALLPAPER_ON_BOTTOM__ */
- dm_set_scr_bg_image(IMG_SCREEN_ROTATE_BACKGROUND, NULL, -1, -1, current_MMI_theme->bg_opacity_full);
- #endif /* __MMI_WALLPAPER_ON_BOTTOM__ */
- }
- #endif /* __MMI_SCREEN_ROTATE__ */
- } /* end of dm_setup_data */
- /*****************************************************************************
- * FUNCTION
- * dm_search_coordinate_set
- * DESCRIPTION
- * This function is used to search (binary search) the coordinate set corresponding to the passed Screen Id.
- * PARAMETERS
- * ScrId [IN]
- * s32ScrId(?) [IN] Screen Id corresponding to which coordinate set is to be obtained.
- * RETURNS
- * void
- *****************************************************************************/
- S16 *dm_search_coordinate_set(S32 ScrId)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- S32 StartIndex = 0;
- S32 EndIndex = dm_get_coordinate_sets_count();
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- while (EndIndex >= StartIndex)
- {
- S32 MiddleIndex = (EndIndex + StartIndex) >> 1;
- if (g_screenid_coordinate_sets_map[MiddleIndex].screen_id == ScrId)
- {
- return g_screenid_coordinate_sets_map[MiddleIndex].coordinate_set_p;
- }
- else if (g_screenid_coordinate_sets_map[MiddleIndex].screen_id > ScrId)
- {
- EndIndex = MiddleIndex - 1;
- }
- else
- {
- StartIndex = MiddleIndex + 1;
- }
- }
- return NULL;
- } /* end of dm_search_coordinate_set */
- /*****************************************************************************
- * FUNCTION
- * dm_search_control_set
- * DESCRIPTION
- * get control set address by category id
- * PARAMETERS
- * category_id [IN] Id of category screen
- * default_coordinate_set_p [IN]
- * RETURNS
- * U8 address of corresponding control set
- *****************************************************************************/
- U8 *dm_search_control_set(S32 category_id, S16 **default_coordinate_set_p)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- U8 min = 0, max = 0, mid = 0;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- /* MMI_ASSERT(category_id); */
- if (category_id == 0)
- {
- return NULL;
- }
- max = dm_get_control_sets_count();
- /* set max as max number of records */
- min = 0;
- *default_coordinate_set_p = NULL;
- while (min <= max)
- {
- mid = (max + min) >> 1;
- if (g_categories_controls_map[mid].category_id == (U16) category_id)
- {
- #ifdef __MMI_SCREEN_ROTATE__
- MMI_DBG_ASSERT(!mmi_frm_is_screen_width_height_swapped() ||
- g_categories_controls_map[mid].rotated_coordinate_set_p);
- if (mmi_frm_is_screen_width_height_swapped() && g_categories_controls_map[mid].rotated_coordinate_set_p)
- {
- *default_coordinate_set_p = g_categories_controls_map[mid].rotated_coordinate_set_p;
- }
- else
- {
- *default_coordinate_set_p = g_categories_controls_map[mid].default_coordinate_set_p;
- }
- #else /* __MMI_SCREEN_ROTATE__ */
- *default_coordinate_set_p = g_categories_controls_map[mid].default_coordinate_set_p;
- #endif /* __MMI_SCREEN_ROTATE__ */
- return g_categories_controls_map[mid].control_set_p;
- }
- else if (g_categories_controls_map[mid].category_id > (U16) category_id)
- {
- max = mid - 1;
- }
- else
- {
- min = mid + 1;
- }
- }
- MMI_ASSERT(0);
- return NULL;
- } /* end of dm_search_control_set */
- /*****************************************************************************
- * FUNCTION
- * dm_setup_base_layer
- * DESCRIPTION
- * This function is used setup the base layer
- * PARAMETERS
- * void
- * *(?)
- * RETURNS
- * void
- *****************************************************************************/
- S32 dm_setup_base_layer(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- GDI_HANDLE act_lcd_handle;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- gdi_lcd_get_active(&act_lcd_handle);
- if (act_lcd_handle == GDI_LCD_SUB_LCD_HANDLE && !(g_dm_data.s32flags & DM_SUB_LCD_CONTEXT))
- {
- MMI_ASSERT(0);
- }
- #ifdef __MMI_SUBLCD__
- if (g_dm_data.s32flags & DM_SUB_LCD_CONTEXT)
- {
- gdi_layer_get_base_handle(&dm_layers_sub[dm_layers_count_sub++]);
- }
- else
- #endif /* __MMI_SUBLCD__ */
- gdi_layer_get_base_handle(&dm_layers[dm_layers_count++]);
- gdi_layer_restore_base_active();
- /* not to set source key when sublcd is b/w */
- #if (defined __MMI_SUBLCD__) && (!defined __MMI_SUBLCD_COLOR__)
- if ( act_lcd_handle == GDI_LCD_SUB_LCD_HANDLE )
- {
- gdi_layer_set_source_key(FALSE,0);
- }
- else
- {
- gdi_layer_set_source_key(TRUE, GDI_COLOR_TRANSPARENT);
- }
- #else
- gdi_layer_set_source_key(TRUE, GDI_COLOR_TRANSPARENT);
- #endif
- #ifndef __GDI_MEMORY_PROFILE_2__
- new_layer_x = 0;
- new_layer_y = 0;
- #endif /* __GDI_MEMORY_PROFILE_2__ */
- return 1;
- }
- /*****************************************************************************
- * FUNCTION
- * dm_setup_new_layer
- * DESCRIPTION
- * This function is used setup a new layer
- * PARAMETERS
- * UICtrlAccessPtr_p [IN/OUT] It specifies the start position to take out the coordinates.
- * *(?)
- * RETURNS
- * void
- *****************************************************************************/
- S32 dm_setup_new_layer(S16 **UICtrlAccessPtr_p)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- dm_coordinates dm_layer_info;
- gdi_result ret;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- #ifdef __GDI_MEMORY_PROFILE_2__
- gdi_layer_multi_layer_enable();
- #endif
- *UICtrlAccessPtr_p = dm_get_coordinates(*UICtrlAccessPtr_p, &dm_layer_info);
- /* need to take care in REDRAW_2_REDRAW */
- if (g_dm_cntx.redraw_screen_main == REDRAW_2_REDRAW)
- {
- return 1;
- }
- if (dm_layer_info.s16X == -1 && dm_layer_info.s16Y == -1 && dm_layer_info.s16Width == -1 &&
- dm_layer_info.s16Height == -1)
- {
- return 1;
- }
- #ifdef __GDI_MEMORY_PROFILE_2__ /* Multi-layer enable */
- #ifdef __MMI_SUBLCD__
- if (g_dm_data.s32flags & DM_SUB_LCD_CONTEXT)
- {
- ret = gdi_layer_create(
- dm_layer_info.s16X,
- dm_layer_info.s16Y,
- dm_layer_info.s16Width,
- dm_layer_info.s16Height,
- &dm_layers_sub[dm_layers_count_sub]);
- MMI_ASSERT(ret >= 0);
- gdi_layer_set_active(dm_layers_sub[dm_layers_count_sub]);
- dm_layers_count_sub++;
- }
- else
- #endif /* __MMI_SUBLCD__ */
- {
- ret = gdi_layer_create(
- dm_layer_info.s16X,
- dm_layer_info.s16Y,
- dm_layer_info.s16Width,
- dm_layer_info.s16Height,
- &dm_layers[dm_layers_count]);
- MMI_ASSERT(ret >= 0);
- gdi_layer_set_active(dm_layers[dm_layers_count]);
- dm_layers_count++;
- }
- /* 072706 source key Start */
- gdi_layer_set_source_key(TRUE, GDI_COLOR_TRANSPARENT); /* source key color could be customized later */
- gdi_layer_clear(GDI_COLOR_TRANSPARENT);
- /* 072706 source key End */
- #else /* __GDI_MEMORY_PROFILE_2__ */
- new_layer_x = (U16) dm_layer_info.s16X;
- new_layer_y = (U16) dm_layer_info.s16Y;
- #endif /* __GDI_MEMORY_PROFILE_2__ */
- return 1;
- }
- /*****************************************************************************
- * FUNCTION
- * dm_setup_and_draw_circular_menu
- * DESCRIPTION
- * This function is used setup the circular menu based on the coordinate set and
- * then draw it
- * PARAMETERS
- * UICtrlAccessPtr_p [IN/OUT] It specifies the start position to take out the coordinates.
- * *(?)
- * RETURNS
- * void
- *****************************************************************************/
- S32 dm_setup_and_draw_circular_menu(S16 **UICtrlAccessPtr_p)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- dm_coordinates dm_3D_circular_menu_info;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- *UICtrlAccessPtr_p = dm_get_coordinates(*UICtrlAccessPtr_p, &dm_3D_circular_menu_info);
- if (dm_3D_circular_menu_info.s16X == -1 || dm_3D_circular_menu_info.s16Y == -1 ||
- dm_3D_circular_menu_info.s16Width == -1 || dm_3D_circular_menu_info.s16Height == -1)
- {
- return 0;
- }
- if (g_dm_cntx.redraw_screen_main != REDRAW_2_REDRAW)
- {
- move_circular_3d_menu(dm_3D_circular_menu_info.s16X, dm_3D_circular_menu_info.s16Y);
- resize_circular_3d_menu(dm_3D_circular_menu_info.s16Width, dm_3D_circular_menu_info.s16Height);
- }
- show_circular_3d_menu();
- return 1;
- }
- /*****************************************************************************
- * FUNCTION
- * dm_setup_and_draw_fixed_list
- * DESCRIPTION
- * This function is used setup the fixed list based on the coordinate set and
- * then draw it
- * PARAMETERS
- * UICtrlAccessPtr_p [IN/OUT] It specifies the start position to take out the coordinates.
- * *(?)
- * RETURNS
- * void
- *****************************************************************************/
- S32 dm_setup_and_draw_fixed_list(S16 **UICtrlAccessPtr_p)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- dm_coordinates dm_fixed_list_info;
- MMI_BOOL resized = MMI_FALSE;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- *UICtrlAccessPtr_p = dm_get_coordinates(*UICtrlAccessPtr_p, &dm_fixed_list_info);
- if (dm_fixed_list_info.s16X == -1 || dm_fixed_list_info.s16Y == -1 ||
- dm_fixed_list_info.s16Width == -1 || dm_fixed_list_info.s16Height == -1)
- {
- return 0;
- }
- if (g_dm_cntx.redraw_screen_main != REDRAW_2_REDRAW)
- {
- if (dm_fixed_list_info.Flags & DM_CATEGORY_CONTROL_COORDINATES)
- {
- show_fixed_list();
- }
- else
- {
- move_fixed_list(dm_fixed_list_info.s16X, dm_fixed_list_info.s16Y);
- if (dm_fixed_list_info.s16Width != MMI_fixed_list_menu.width ||
- dm_fixed_list_info.s16Height != MMI_fixed_list_menu.height)
- {
- resized = MMI_TRUE;
- }
- resize_fixed_list(dm_fixed_list_info.s16Width, dm_fixed_list_info.s16Height);
- if (resized == MMI_TRUE)
- {
- fixed_list_goto_item_no_redraw(MMI_fixed_list_menu.highlighted_item);
- }
- show_fixed_list();
- }
- }
- else
- {
- show_fixed_list();
- }
- return 1;
- }
- /*****************************************************************************
- * FUNCTION
- * dm_setup_and_draw_circular_menu
- *
- * DESCRIPTION
- * This function is used setup the dynamic list based on the coordinate set and
- * then draw it
- *
- * PARAMETERS
- * UICtrlAccessPtr_p IN/OUT It specifies the start position to take out the coordinates.
- * *
- * RETURNS
- * void
- *
- * GLOBALS AFFECTED
- *
- *****************************************************************************/
- /*****************************************************************************
- * FUNCTION
- * dm_setup_and_draw_dynamic_list
- * DESCRIPTION
- * This function is used setup the dynamic list based on the coordinate set and
- * then draw it
- * PARAMETERS
- * UICtrlAccessPtr_p [IN/OUT] It specifies the start position to take out the coordinates.
- * *(?)
- * RETURNS
- * void
- *****************************************************************************/
- S32 dm_setup_and_draw_dynamic_list(S16 **UICtrlAccessPtr_p)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- dm_coordinates dm_dynamic_list_info;
- fixed_icontext_menuitem *menuitem_p;
- /* Leo change 0705 start */
- MMI_BOOL resized = MMI_FALSE;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- *UICtrlAccessPtr_p = dm_get_coordinates(*UICtrlAccessPtr_p, &dm_dynamic_list_info);
- if (dm_dynamic_list_info.s16X == -1 || dm_dynamic_list_info.s16Y == -1 ||
- dm_dynamic_list_info.s16Width == -1 || dm_dynamic_list_info.s16Height == -1)
- {
- return 0;
- }
- if (g_dm_cntx.redraw_screen_main != REDRAW_2_REDRAW)
- {
- move_fixed_list(dm_dynamic_list_info.s16X, dm_dynamic_list_info.s16Y);
- if (dm_dynamic_list_info.s16Width != MMI_fixed_list_menu.width ||
- dm_dynamic_list_info.s16Height != MMI_fixed_list_menu.height)
- {
- resized = MMI_TRUE;
- }
- resize_fixed_list(dm_dynamic_list_info.s16Width, dm_dynamic_list_info.s16Height);
- menuitem_p = (fixed_icontext_menuitem*) MMI_fixed_list_menu.common_item_data;
- gui_set_fixed_list_menu_common_item_data(&MMI_fixed_list_menu, menuitem_p);
- if (resized == MMI_TRUE)
- {
- dynamic_list_goto_item_no_redraw(MMI_fixed_list_menu.highlighted_item);
- }
- /* Leo change 0705 end */
- }
- show_dynamic_list();
- return 1;
- }
- /*****************************************************************************
- * FUNCTION
- * dm_setup_and_draw_asyncdynamic_list
- * DESCRIPTION
- * This function is used setup the asyncdynamic list based on the coordinate set and
- * then draw it
- * PARAMETERS
- * UICtrlAccessPtr_p [IN/OUT] It specifies the start position to take out the coordinates.
- * *(?)
- * RETURNS
- * void
- *****************************************************************************/
- S32 dm_setup_and_draw_asyncdynamic_list(S16 **UICtrlAccessPtr_p)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- dm_coordinates dm_dynamic_list_info;
- fixed_icontext_menuitem *menuitem_p;
- /* Leo change 0705 start */
- MMI_BOOL resized = MMI_FALSE;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- *UICtrlAccessPtr_p = dm_get_coordinates(*UICtrlAccessPtr_p, &dm_dynamic_list_info);
- if (dm_dynamic_list_info.s16X == -1 || dm_dynamic_list_info.s16Y == -1 ||
- dm_dynamic_list_info.s16Width == -1 || dm_dynamic_list_info.s16Height == -1)
- {
- return 0;
- }
- if (g_dm_cntx.redraw_screen_main != REDRAW_2_REDRAW)
- {
- move_fixed_list(dm_dynamic_list_info.s16X, dm_dynamic_list_info.s16Y);
- if (dm_dynamic_list_info.s16Width != MMI_fixed_list_menu.width ||
- dm_dynamic_list_info.s16Height != MMI_fixed_list_menu.height)
- {
- resized = MMI_TRUE;
- }
- resize_fixed_list(dm_dynamic_list_info.s16Width, dm_dynamic_list_info.s16Height);
- menuitem_p = (fixed_icontext_menuitem*) MMI_fixed_list_menu.common_item_data;
- gui_set_fixed_list_menu_common_item_data(&MMI_fixed_list_menu, menuitem_p);
- if (resized == MMI_TRUE)
- {
- asyncdynamic_list_goto_item_no_redraw(MMI_fixed_list_menu.highlighted_item);
- }
- /* Leo change 0705 end */
- }
- show_asyncdynamic_list();
- return 1;
- }
- /*****************************************************************************
- * FUNCTION
- * dm_setup_and_draw_matrix_menu
- * DESCRIPTION
- * This function is used setup the matrix menu based on the coordinate set and
- * then draw it
- * PARAMETERS
- * UICtrlAccessPtr_p [IN/OUT] It specifies the start position to take out the coordinates.
- * *(?)
- * RETURNS
- * void
- *****************************************************************************/
- S32 dm_setup_and_draw_matrix_menu(S16 **UICtrlAccessPtr_p)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- dm_coordinates dm_matrix_menu_info;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- *UICtrlAccessPtr_p = dm_get_coordinates(*UICtrlAccessPtr_p, &dm_matrix_menu_info);
- if (dm_matrix_menu_info.s16X == -1 || dm_matrix_menu_info.s16Y == -1 ||
- dm_matrix_menu_info.s16Width == -1 || dm_matrix_menu_info.s16Height == -1)
- {
- return 0;
- }
- if (g_dm_cntx.redraw_screen_main != REDRAW_2_REDRAW)
- {
- move_fixed_matrix(dm_matrix_menu_info.s16X, dm_matrix_menu_info.s16Y);
- if (fixed_matrix_auto_disable_scrollbar())
- {
- reset_fixed_matrix_col_rows();
- }
- resize_fixed_matrix(dm_matrix_menu_info.s16Width, dm_matrix_menu_info.s16Height);
- }
- show_fixed_matrix();
- return 1;
- }
- /*****************************************************************************
- * FUNCTION
- * dm_setup_and_draw_multiline_inputbox
- * DESCRIPTION
- * This function is used setup the multiline inputbox based on the coordinate set and
- * then draw it
- * PARAMETERS
- * UICtrlAccessPtr_p [IN/OUT] It specifies the start position to take out the coordinates.
- * dm_cat_scr_info [?]
- * *(?)
- * RETURNS
- * void
- *****************************************************************************/
- S32 dm_setup_and_draw_multiline_inputbox(S16 **UICtrlAccessPtr_p, dm_cat_scr_info_struct *dm_cat_scr_info)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- dm_coordinates dm_multiline_inputbox_info;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- *UICtrlAccessPtr_p = dm_get_coordinates(*UICtrlAccessPtr_p, &dm_multiline_inputbox_info);
- if (!get_multiline_inputbox_display_status())
- {
- return 0;
- }
- if (dm_multiline_inputbox_info.s16X == -1 || dm_multiline_inputbox_info.s16Y == -1 ||
- dm_multiline_inputbox_info.s16Width == -1 || dm_multiline_inputbox_info.s16Height == -1)
- {
- return 0;
- }
- if (g_dm_cntx.redraw_screen_main != REDRAW_2_REDRAW)
- {
- if (dm_multiline_inputbox_info.Flags & DM_FIXED_MULTILINE_INPUTBOX_HEIGHT)
- {
- S32 w = 0, h = 0;
- resize_multiline_inputbox_fit(
- dm_multiline_inputbox_info.s16Width,
- dm_multiline_inputbox_info.s16Height,
- &w,
- &h);
- }
- if (!dm_aligned_area_data.is_in_aligned_area)
- {
- if (wgui_inputbox_information_flag)
- {
- #ifdef UI_SMALL_CATEGORY_EDITOR
- /* START VIJAY PMT 20051202 */
- if (whether_no_small_screen())
- {
- wgui_setup_input_information(
- dm_multiline_inputbox_info.s16X + 1,
- dm_multiline_inputbox_info.s16Y,
- dm_multiline_inputbox_info.s16Width - 2,
- wgui_inputbox_information_bar_height);
- }
- else
- #endif /* UI_SMALL_CATEGORY_EDITOR */
- /* END VIJAY PMT 20051202 */
- wgui_setup_input_information(
- dm_multiline_inputbox_info.s16X,
- dm_multiline_inputbox_info.s16Y,
- dm_multiline_inputbox_info.s16Width,
- wgui_inputbox_information_bar_height);
- move_multiline_inputbox(
- dm_multiline_inputbox_info.s16X,
- dm_multiline_inputbox_info.s16Y + wgui_inputbox_information_bar_height);
- //Currently this is assuming that Multitap is always being shown whenever multiline
- //inputbox is shown, so this needs to be FIXED and appropriates condition needs to be checked here.
- if (!is_multiline_inputbox_in_view_mode())
- {
- #if defined(__MMI_FULL_SCREEN_EDITOR__)
- if (dm_multiline_inputbox_info.Flags & DM_FIXED_MULTILINE_INPUTBOX_HEIGHT)
- {
- dm_multiline_inputbox_info.s16Height = get_multiline_inputbox_height();
- }
- resize_multiline_inputbox(
- dm_multiline_inputbox_info.s16Width,
- dm_multiline_inputbox_info.s16Height - wgui_inputbox_information_bar_height);
- #else /* defined(__MMI_FULL_SCREEN_EDITOR__) */
- if (dm_multiline_inputbox_info.Flags & DM_FIXED_MULTILINE_INPUTBOX_HEIGHT)
- {
- dm_multiline_inputbox_info.s16Height = get_multiline_inputbox_height();
- }
- if (dm_multiline_inputbox_info.Flags & DM_FIXED_MULTILINE_INPUTBOX_HEIGHT_NO_MULTITAP)
- {
- resize_multiline_inputbox(
- dm_multiline_inputbox_info.s16Width,
- dm_multiline_inputbox_info.s16Height - wgui_inputbox_information_bar_height);
- }
- else
- {
- resize_multiline_inputbox(
- dm_multiline_inputbox_info.s16Width,
- dm_multiline_inputbox_info.s16Height - wgui_inputbox_information_bar_height - MMI_multitap_height);
- }
- if (hide_multitap)
- {
- hide_multitap(); /* This is registered by Category to draw the area when multitap is now being shown. */
- }
- #endif /* defined(__MMI_FULL_SCREEN_EDITOR__) */
- dm_update_multitap_coordinates(&dm_multiline_inputbox_info, dm_cat_scr_info);
- }
- else
- {
- if (dm_multiline_inputbox_info.Flags & DM_FIXED_MULTILINE_INPUTBOX_HEIGHT)
- {
- dm_multiline_inputbox_info.s16Height = get_multiline_inputbox_height();
- }
- resize_multiline_inputbox(
- dm_multiline_inputbox_info.s16Width,
- dm_multiline_inputbox_info.s16Height - wgui_inputbox_information_bar_height);
- }
- }
- else
- {
- move_multiline_inputbox(dm_multiline_inputbox_info.s16X, dm_multiline_inputbox_info.s16Y);
- if (!is_multiline_inputbox_in_view_mode())
- {
- #if defined(__MMI_FULL_SCREEN_EDITOR__)
- if (dm_multiline_inputbox_info.Flags & DM_FIXED_MULTILINE_INPUTBOX_HEIGHT)
- {
- dm_multiline_inputbox_info.s16Height = get_multiline_inputbox_height();
- }
- resize_multiline_inputbox(
- dm_multiline_inputbox_info.s16Width,
- dm_multiline_inputbox_info.s16Height);
- #else /* defined(__MMI_FULL_SCREEN_EDITOR__) */
- if (dm_multiline_inputbox_info.Flags & DM_FIXED_MULTILINE_INPUTBOX_HEIGHT)
- {
- dm_multiline_inputbox_info.s16Height = get_multiline_inputbox_height();
- }
- if (dm_multiline_inputbox_info.Flags & DM_FIXED_MULTILINE_INPUTBOX_HEIGHT_NO_MULTITAP)
- {
- resize_multiline_inputbox(
- dm_multiline_inputbox_info.s16Width,
- dm_multiline_inputbox_info.s16Height);
- }
- else
- {
- resize_multiline_inputbox(
- dm_multiline_inputbox_info.s16Width,
- dm_multiline_inputbox_info.s16Height - MMI_multitap_height);
- }
- if (hide_multitap)
- {
- hide_multitap(); /* This is registered by Category to draw the area when multitap is now being shown. */
- }
- #endif /* defined(__MMI_FULL_SCREEN_EDITOR__) */
- dm_update_multitap_coordinates(&dm_multiline_inputbox_info, dm_cat_scr_info);
- }
- else
- {
- if (dm_multiline_inputbox_info.Flags & DM_FIXED_MULTILINE_INPUTBOX_HEIGHT)
- {
- dm_multiline_inputbox_info.s16Height = get_multiline_inputbox_height();
- }
- resize_multiline_inputbox(
- dm_multiline_inputbox_info.s16Width,
- dm_multiline_inputbox_info.s16Height);
- }
- }
- setup_previous_control(&dm_multiline_inputbox_info);
- } /* ( ! dm_aligned_area_data.is_in_aligned_area ) */
- else /* ( dm_aligned_area_data.is_in_aligned_area ) */
- {
- dm_aligned_area_data.s16Y += dm_aligned_area_data.y_space;
- move_multiline_inputbox(dm_aligned_area_data.s16X, dm_aligned_area_data.s16Y);
- dm_aligned_area_data.s16Y += get_multiline_inputbox_height();
- } /* ( dm_aligned_area_data.is_in_aligned_area ) */
- }
- else if (dm_aligned_area_data.is_in_aligned_area)
- {
- dm_aligned_area_data.s16Y += dm_aligned_area_data.y_space;
- dm_aligned_area_data.s16Y += get_multiline_inputbox_height();
- }
- wgui_show_inputbox();
- return 1;
- }
- /*****************************************************************************
- * FUNCTION
- * dm_setup_and_draw_ems_inputbox
- * DESCRIPTION
- * This function is used setup the EMS inputbox based on the coordinate set and
- * then draw it
- * PARAMETERS
- * UICtrlAccessPtr_p [IN/OUT] It specifies the start position to take out the coordinates.
- * dm_cat_scr_info [?]
- * *(?)
- * RETURNS
- * void
- *****************************************************************************/
- S32 dm_setup_and_draw_ems_inputbox(S16 **UICtrlAccessPtr_p, dm_cat_scr_info_struct *dm_cat_scr_info)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- dm_coordinates dm_multiline_inputbox_info;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- *UICtrlAccessPtr_p = dm_get_coordinates(*UICtrlAccessPtr_p, &dm_multiline_inputbox_info);
- if (!get_multiline_inputbox_display_status())
- {
- return 0;
- }
- if (dm_multiline_inputbox_info.s16X == -1 || dm_multiline_inputbox_info.s16Y == -1 ||
- dm_multiline_inputbox_info.s16Width == -1 || dm_multiline_inputbox_info.s16Height == -1)
- {
- return 0;
- }
- if (g_dm_cntx.redraw_screen_main != REDRAW_2_REDRAW)
- {
- if (!dm_aligned_area_data.is_in_aligned_area)
- {
- if (wgui_inputbox_information_flag)
- {
- wgui_EMS_setup_input_information(
- dm_multiline_inputbox_info.s16X,
- dm_multiline_inputbox_info.s16Y,
- dm_multiline_inputbox_info.s16Width,
- wgui_EMS_inputbox_information_bar_height);
- move_EMS_inputbox(
- dm_multiline_inputbox_info.s16X,
- dm_multiline_inputbox_info.s16Y + wgui_EMS_inputbox_information_bar_height);
- //Currently this is assuming that Multitap is always being shown whenever multiline
- //inputbox is shown, so this needs to be FIXED and appropriates condition needs to be checked here.
- if (!is_EMS_inputbox_in_view_mode())
- {
- #if defined(__MMI_FULL_SCREEN_EDITOR__)
- if (g_dm_data.s32flags & DM_FIXED_MULTILINE_INPUTBOX_HEIGHT)
- {
- resize_EMS_inputbox(
- dm_multiline_inputbox_info.s16Width,
- get_multiline_inputbox_height() - wgui_inputbox_information_bar_height);
- }
- else
- {
- resize_EMS_inputbox(
- dm_multiline_inputbox_info.s16Width,
- dm_multiline_inputbox_info.s16Height - wgui_inputbox_information_bar_height);
- }
- #else /* defined(__MMI_FULL_SCREEN_EDITOR__) */
- if (g_dm_data.s32flags & DM_FIXED_MULTILINE_INPUTBOX_HEIGHT)
- {
- resize_EMS_inputbox(
- dm_multiline_inputbox_info.s16Width,
- get_multiline_inputbox_height() - wgui_inputbox_information_bar_height - MMI_multitap_height);
- }
- else
- {
- resize_EMS_inputbox(
- dm_multiline_inputbox_info.s16Width,
- dm_multiline_inputbox_info.s16Height - wgui_inputbox_information_bar_height - MMI_multitap_height);
- }
- if (hide_multitap)
- {
- hide_multitap(); /* This is registered by Category to draw the area when multitap is now being shown. */
- }
- #endif /* defined(__MMI_FULL_SCREEN_EDITOR__) */
- dm_update_multitap_coordinates(&dm_multiline_inputbox_info, dm_cat_scr_info);
- }
- else
- {
- if (g_dm_data.s32flags & DM_FIXED_MULTILINE_INPUTBOX_HEIGHT)
- {
- resize_EMS_inputbox(
- dm_multiline_inputbox_info.s16Width,
- get_multiline_inputbox_height() - wgui_inputbox_information_bar_height);
- }
- else
- {
- resize_EMS_inputbox(
- dm_multiline_inputbox_info.s16Width,
- dm_multiline_inputbox_info.s16Height - wgui_inputbox_information_bar_height);
- }
- }
- }
- else
- {
- move_EMS_inputbox(dm_multiline_inputbox_info.s16X, dm_multiline_inputbox_info.s16Y);
- if (!is_EMS_inputbox_in_view_mode())
- {
- #if defined(__MMI_FULL_SCREEN_EDITOR__)
- if (g_dm_data.s32flags & DM_FIXED_MULTILINE_INPUTBOX_HEIGHT)
- {
- resize_EMS_inputbox(dm_multiline_inputbox_info.s16Width, get_multiline_inputbox_height());
- }
- else
- {
- resize_EMS_inputbox(dm_multiline_inputbox_info.s16Width, dm_multiline_inputbox_info.s16Height);
- }
- #else /* defined(__MMI_FULL_SCREEN_EDITOR__) */
- if (g_dm_data.s32flags & DM_FIXED_MULTILINE_INPUTBOX_HEIGHT)
- {
- resize_EMS_inputbox(
- dm_multiline_inputbox_info.s16Width,
- get_multiline_inputbox_height() - MMI_multitap_height);
- }
- else
- {
- resize_EMS_inputbox(
- dm_multiline_inputbox_info.s16Width,
- dm_multiline_inputbox_info.s16Height - MMI_multitap_height);
- }
- if (hide_multitap)
- {
- hide_multitap(); /* This is registered by Category to draw the area when multitap is now being shown. */
- }
- #endif /* defined(__MMI_FULL_SCREEN_EDITOR__) */
- dm_update_multitap_coordinates(&dm_multiline_inputbox_info, dm_cat_scr_info);
- }
- else
- {
- if (g_dm_data.s32flags & DM_FIXED_MULTILINE_INPUTBOX_HEIGHT)
- {
- resize_EMS_inputbox(dm_multiline_inputbox_info.s16Width, get_multiline_inputbox_height());
- }
- else
- {
- resize_EMS_inputbox(dm_multiline_inputbox_info.s16Width, dm_multiline_inputbox_info.s16Height);
- }
- }
- }
- } /* ( ! dm_aligned_area_data.is_in_aligned_area ) */
- else /* ( dm_aligned_area_data.is_in_aligned_area ) */
- {
- dm_aligned_area_data.s16Y += dm_aligned_area_data.y_space;
- move_EMS_inputbox(dm_aligned_area_data.s16X, dm_aligned_area_data.s16Y);
- dm_aligned_area_data.s16Y += get_multiline_inputbox_height();
- } /* ( dm_aligned_area_data.is_in_aligned_area ) */
- }
- /* category5_hide_multitap(); */
- /* W05.38 Display Information Bar no matter REDRAW_2_REDRAW or not */
- if (wgui_inputbox_information_flag)
- {
- wgui_EMS_redraw_input_information_bar();
- }
- show_EMS_inputbox();
- return 1;
- }
- /*****************************************************************************
- * FUNCTION
- * dm_setup_and_draw_dialer_inputbox
- * DESCRIPTION
- * This function is used setup the dialer inputbox based on the coordinate set and
- * then draw it
- * PARAMETERS
- * UICtrlAccessPtr_p [IN/OUT] It specifies the start position to take out the coordinates.
- * *(?)
- * RETURNS
- * void
- *****************************************************************************/
- S32 dm_setup_and_draw_dialer_inputbox(S16 **UICtrlAccessPtr_p)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- dm_coordinates dm_dialer_inputbox_info;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- *UICtrlAccessPtr_p = dm_get_coordinates(*UICtrlAccessPtr_p, &dm_dialer_inputbox_info);
- if (dm_dialer_inputbox_info.s16X == -1 || dm_dialer_inputbox_info.s16Y == -1 ||
- dm_dialer_inputbox_info.s16Width == -1 || dm_dialer_inputbox_info.s16Height == -1)
- {
- return 0;
- }
- if (g_dm_cntx.redraw_screen_main != REDRAW_2_REDRAW)
- {
- move_dialer_inputbox(dm_dialer_inputbox_info.s16X, dm_dialer_inputbox_info.s16Y);
- resize_dialer_inputbox(dm_dialer_inputbox_info.s16Width, dm_dialer_inputbox_info.s16Height);
- }
- show_dialer_inputbox();
- return 1;
- }
- /*****************************************************************************
- * FUNCTION
- * dm_setup_and_draw_singleline_inputbox
- * DESCRIPTION
- * This function is used setup the singleline inputbox based on the coordinate set and
- * then draw it
- * PARAMETERS
- * UICtrlAccessPtr_p [IN/OUT] It specifies the start position to take out the coordinates.
- * *(?)
- * RETURNS
- * void
- *****************************************************************************/
- S32 dm_setup_and_draw_singleline_inputbox(S16 **UICtrlAccessPtr_p)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- dm_coordinates dm_singleline_inputbox_info;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- *UICtrlAccessPtr_p = dm_get_coordinates(*UICtrlAccessPtr_p, &dm_singleline_inputbox_info);
- if (dm_singleline_inputbox_info.s16X == -1 || dm_singleline_inputbox_info.s16Y == -1 ||
- dm_singleline_inputbox_info.s16Width == -1 || dm_singleline_inputbox_info.s16Height == -1)
- {
- return 0;
- }
- if (g_dm_cntx.redraw_screen_main != REDRAW_2_REDRAW)
- {
- if (!dm_aligned_area_data.is_in_aligned_area)
- {
- move_singleline_inputbox(dm_singleline_inputbox_info.s16X, dm_singleline_inputbox_info.s16Y);
- if (dm_singleline_inputbox_info.Flags & DM_SINGLE_LINE_INPUTBOX_SPECIFIC_HEIGHT)
- {
- resize_singleline_inputbox(dm_singleline_inputbox_info.s16Width, dm_singleline_inputbox_info.s16Height);
- }
- }
- else
- {
- dm_aligned_area_data.s16Y += dm_aligned_area_data.y_space;
- move_singleline_inputbox(dm_aligned_area_data.s16X, dm_aligned_area_data.s16Y);
- dm_aligned_area_data.s16Y += MMI_singleline_inputbox_height;
- }
- }
- show_singleline_inputbox();
- return 1;
- }
- /*****************************************************************************
- * FUNCTION
- * dm_setup_and_draw_left_softkey
- * DESCRIPTION
- * This function is used setup the left softkey based on the coordinate set and
- * then draw it
- * PARAMETERS
- * UICtrlAccessPtr_p [IN/OUT] It specifies the start position to take out the coordinates.
- * *(?)
- * RETURNS
- * void
- *****************************************************************************/
- S32 dm_setup_and_draw_left_softkey(S16 **UICtrlAccessPtr_p)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- dm_coordinates dm_icontext_button_info;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- *UICtrlAccessPtr_p = dm_get_coordinates(*UICtrlAccessPtr_p, &dm_icontext_button_info);
- if (dm_icontext_button_info.s16X == -1 || dm_icontext_button_info.s16Y == -1 ||
- dm_icontext_button_info.s16Width == -1 || dm_icontext_button_info.s16Height == -1)
- {
- return 0;
- }
- if (g_dm_cntx.redraw_screen_main != REDRAW_2_REDRAW)
- {
- move_softkey(dm_icontext_button_info.s16X, dm_icontext_button_info.s16Y, MMI_LEFT_SOFTKEY);
- resize_left_softkey(dm_icontext_button_info.s16Width, dm_icontext_button_info.s16Height);
- }
- show_left_softkey();
- return 1;
- }
- /*****************************************************************************
- * FUNCTION
- * dm_setup_and_draw_right_softkey
- * DESCRIPTION
- * This function is used setup the right softkey based on the coordinate set and
- * then draw it
- * PARAMETERS
- * UICtrlAccessPtr_p [IN/OUT] It specifies the start position to take out the coordinates.
- * *(?)
- * RETURNS
- * void
- *****************************************************************************/
- S32 dm_setup_and_draw_right_softkey(S16 **UICtrlAccessPtr_p)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- dm_coordinates dm_icontext_button_info;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- *UICtrlAccessPtr_p = dm_get_coordinates(*UICtrlAccessPtr_p, &dm_icontext_button_info);
- if (dm_icontext_button_info.s16X == -1 || dm_icontext_button_info.s16Y == -1 ||
- dm_icontext_button_info.s16Width == -1 || dm_icontext_button_info.s16Height == -1)
- {
- return 0;
- }
- if (g_dm_cntx.redraw_screen_main != REDRAW_2_REDRAW)
- {
- move_softkey(dm_icontext_button_info.s16X, dm_icontext_button_info.s16Y, MMI_RIGHT_SOFTKEY);
- resize_right_softkey(dm_icontext_button_info.s16Width, dm_icontext_button_info.s16Height);
- }
- show_right_softkey();
- return 1;
- }
- /*****************************************************************************
- * FUNCTION
- * dm_setup_and_draw_title
- * DESCRIPTION
- * This function is used setup the title bar based on the coordinate set and
- * then draw it
- * PARAMETERS
- * UICtrlAccessPtr_p [IN/OUT] It specifies the start position to take out the coordinates.
- * *(?)
- * RETURNS
- * void
- *****************************************************************************/
- S32 dm_setup_and_draw_title(S16 **UICtrlAccessPtr_p)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- dm_coordinates dm_title_info;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- *UICtrlAccessPtr_p = dm_get_coordinates(*UICtrlAccessPtr_p, &dm_title_info);
- if (dm_title_info.s16X == -1 || dm_title_info.s16Y == -1 ||
- dm_title_info.s16Width == -1 || dm_title_info.s16Height == -1)
- {
- menu_shortcut_handler_display = 1;
- //MMI_title_string = NULL;
- //MMI_title_icon = NULL;
- return 0;
- }
- if ((g_dm_data.s32flags & DM_NO_TITLE))
- {
- return 0;
- }
- if (g_dm_cntx.redraw_screen_main != REDRAW_2_REDRAW)
- {
- move_title(dm_title_info.s16X, dm_title_info.s16Y);
- resize_title(dm_title_info.s16Width, dm_title_info.s16Height);
- /* START VIJAY PMT 20050930 */
- move_menu_shortcut_handler(MMI_title_x + MMI_title_width - MMI_menu_shortcut_box.width, MMI_title_y); /* PMT MANISH 20050707 */
- /* END VIJAY PMT 20050930 */
- }
- if (g_dm_data.s32flags & DM_LEFT_ALIGN_TITLE)
- {
- draw_title_left_align();
- }
- else if (g_dm_data.s32flags & DM_SCROLL_TITLE)
- {
- draw_scrolling_title();
- }
- else
- {
- draw_title();
- }
- return 1;
- }
- /*****************************************************************************
- * FUNCTION
- * dm_setup_and_draw_horizontal_tab_bar
- * DESCRIPTION
- * This function is used setup the horizontal tab bar based on the coordinate set and
- * then draw it
- * PARAMETERS
- * UICtrlAccessPtr_p [IN/OUT] It specifies the start position to take out the coordinates.
- * *(?)
- * RETURNS
- * void
- *****************************************************************************/
- S32 dm_setup_and_draw_horizontal_tab_bar(S16 **UICtrlAccessPtr_p)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- dm_coordinates dm_htab_info;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- *UICtrlAccessPtr_p = dm_get_coordinates(*UICtrlAccessPtr_p, &dm_htab_info);
- if (g_dm_cntx.redraw_screen_main != REDRAW_2_REDRAW)
- {
- wgui_move_horizontal_tab_bar(dm_htab_info.s16X, dm_htab_info.s16Y);
- move_title(dm_htab_info.s16X, dm_htab_info.s16Y + MMI_HORIZONTAL_TAB_BAR_TAB_AREA_HEIGHT);
- resize_title(dm_htab_info.s16Width, MMI_HORIZONTAL_TAB_BAR_HINT_AREA_HEIGHT);
- }
- wgui_show_horizontal_tab_bar();
- return 1;
- }
- /*****************************************************************************
- * FUNCTION
- * dm_setup_and_draw_category_controlled_area
- * DESCRIPTION
- * This function is used setup the category controlled area based on the coordinate set and
- * then draw it
- * PARAMETERS
- * UICtrlAccessPtr_p [IN/OUT] It specifies the start position to take out the coordinates.
- * *(?)
- * RETURNS
- * void
- *****************************************************************************/
- S32 dm_setup_and_draw_category_controlled_area(S16 **UICtrlAccessPtr_p)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- dm_coordinates dm_category_controlled_area_info;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- *UICtrlAccessPtr_p = dm_get_coordinates(*UICtrlAccessPtr_p, &dm_category_controlled_area_info);
- if (dm_category_controlled_area_info.s16X == -1 || dm_category_controlled_area_info.s16Y == -1 ||
- dm_category_controlled_area_info.s16Width == -1 || dm_category_controlled_area_info.s16Height == -1)
- {
- return 0;
- }
- #ifdef __MMI_SUBLCD__
- if (g_dm_data.s32flags & DM_SUB_LCD_CONTEXT)
- {
- if (dm_sub_category_controlled_area_callback)
- {
- (*dm_sub_category_controlled_area_callback) (&dm_category_controlled_area_info);
- }
- }
- else
- #endif /* __MMI_SUBLCD__ */
- {
- if (dm_category_controlled_area_callback)
- {
- (*dm_category_controlled_area_callback) (&dm_category_controlled_area_info);
- }
- }
- setup_previous_control(&dm_category_controlled_area_info);
- return 1;
- }
- /*****************************************************************************
- * FUNCTION
- * dm_setup_and_draw_category_controlled_area2
- * DESCRIPTION
- * This function is used setup the category controlled area2 based on the coordinate set and
- * then draw it
- * PARAMETERS
- * UICtrlAccessPtr_p [IN/OUT] It specifies the start position to take out the coordinates.
- * *(?)
- * RETURNS
- * void
- *****************************************************************************/
- S32 dm_setup_and_draw_category_controlled_area2(S16 **UICtrlAccessPtr_p)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- dm_coordinates dm_category_controlled_area_info;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- *UICtrlAccessPtr_p = dm_get_coordinates(*UICtrlAccessPtr_p, &dm_category_controlled_area_info);
- if (dm_category_controlled_area_info.s16X == -1 || dm_category_controlled_area_info.s16Y == -1 ||
- dm_category_controlled_area_info.s16Width == -1 || dm_category_controlled_area_info.s16Height == -1)
- {
- return 0;
- }
- if (dm_category_controlled_area2_callback)
- {
- (*dm_category_controlled_area2_callback) (&dm_category_controlled_area_info);
- }
- setup_previous_control(&dm_category_controlled_area_info);
- return 1;
- }
- /*****************************************************************************
- * FUNCTION
- * dm_setup_and_draw_status_icons
- * DESCRIPTION
- * This function is used setup the status icons based on the coordinate set and
- * then draw it
- * PARAMETERS
- * UICtrlAccessPtr_p [IN/OUT] It specifies the start position to take out the coordinates.
- * *(?)
- * RETURNS
- * void
- *****************************************************************************/
- S32 dm_setup_and_draw_status_icons(S16 **UICtrlAccessPtr_p)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- dm_status_info_struct dm_status_info;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- *UICtrlAccessPtr_p = dm_get_status_icon_bar_coordinates(*UICtrlAccessPtr_p, &dm_status_info);
- if (dm_status_info.x == -1 || dm_status_info.y == -1 ||
- dm_status_info.x1 == -1 || dm_status_info.y1 == -1 || dm_status_info.x2 == -1 || dm_status_info.y2 == -1)
- {
- return 0;
- }
- if ((g_dm_data.s32flags & DM_NO_STATUS_BAR))
- {
- return 0;
- }
- #ifdef __MMI_SUBLCD__
- if (g_dm_data.s32flags & DM_SUB_LCD_CONTEXT)
- {
- SUBLCD_screens_show_status_icons();
- }
- else
- #endif /* __MMI_SUBLCD__ */
- {
- #if defined(__MMI_MAINLCD_176X220__) || defined (__MMI_MAINLCD_240X320__) /* 041205 Calvin modieid */
- if ((g_dm_data.s32flags & DM_SPECIFIC_HIDE_STATUS_BAR))
- {
- show_status_icons();
- }
- else
- {
- show_title_status_icon();
- }
- #else /* defined(__MMI_MAINLCD_176X220__) || defined (__MMI_MAINLCD_240X320__) */
- show_status_icons();
- #endif /* defined(__MMI_MAINLCD_176X220__) || defined (__MMI_MAINLCD_240X320__) */
- }
- return 1;
- }
- /*****************************************************************************
- * FUNCTION
- * dm_setup_and_draw_button_bar
- * DESCRIPTION
- * This function is used setup the button bar based on the coordinate set and
- * then draw it
- * PARAMETERS
- * UICtrlAccessPtr_p [IN/OUT] It specifies the start position to take out the coordinates.
- * *(?)
- * RETURNS
- * void
- *****************************************************************************/
- S32 dm_setup_and_draw_button_bar(S16 **UICtrlAccessPtr_p)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- dm_buttonbar_info_struct dm_buttonbar_info;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- *UICtrlAccessPtr_p = dm_get_button_bar_coordinates(*UICtrlAccessPtr_p, &dm_buttonbar_info);
- if (dm_buttonbar_info.coordinate.s16X == -1 || dm_buttonbar_info.coordinate.s16Y == -1 ||
- dm_buttonbar_info.coordinate.s16Width == -1 || dm_buttonbar_info.coordinate.s16Height == -1 ||
- dm_buttonbar_info.button_width == -1)
- {
- return 0;
- }
- if (g_dm_data.s32flags & DM_NO_SOFTKEY)
- {
- return 0;