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

MTK

开发平台:

C/C++

  1. /*****************************************************************************
  2. *  Copyright Statement:
  3. *  --------------------
  4. *  This software is protected by Copyright and the information contained
  5. *  herein is confidential. The software may not be copied and the information
  6. *  contained herein may not be used or disclosed except with the written
  7. *  permission of MediaTek Inc. (C) 2005
  8. *
  9. *  BY OPENING THIS FILE, BUYER HEREBY UNEQUIVOCALLY ACKNOWLEDGES AND AGREES
  10. *  THAT THE SOFTWARE/FIRMWARE AND ITS DOCUMENTATIONS ("MEDIATEK SOFTWARE")
  11. *  RECEIVED FROM MEDIATEK AND/OR ITS REPRESENTATIVES ARE PROVIDED TO BUYER ON
  12. *  AN "AS-IS" BASIS ONLY. MEDIATEK EXPRESSLY DISCLAIMS ANY AND ALL WARRANTIES,
  13. *  EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF
  14. *  MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NONINFRINGEMENT.
  15. *  NEITHER DOES MEDIATEK PROVIDE ANY WARRANTY WHATSOEVER WITH RESPECT TO THE
  16. *  SOFTWARE OF ANY THIRD PARTY WHICH MAY BE USED BY, INCORPORATED IN, OR
  17. *  SUPPLIED WITH THE MEDIATEK SOFTWARE, AND BUYER AGREES TO LOOK ONLY TO SUCH
  18. *  THIRD PARTY FOR ANY WARRANTY CLAIM RELATING THERETO. MEDIATEK SHALL ALSO
  19. *  NOT BE RESPONSIBLE FOR ANY MEDIATEK SOFTWARE RELEASES MADE TO BUYER'S
  20. *  SPECIFICATION OR TO CONFORM TO A PARTICULAR STANDARD OR OPEN FORUM.
  21. *
  22. *  BUYER'S SOLE AND EXCLUSIVE REMEDY AND MEDIATEK'S ENTIRE AND CUMULATIVE
  23. *  LIABILITY WITH RESPECT TO THE MEDIATEK SOFTWARE RELEASED HEREUNDER WILL BE,
  24. *  AT MEDIATEK'S OPTION, TO REVISE OR REPLACE THE MEDIATEK SOFTWARE AT ISSUE,
  25. *  OR REFUND ANY SOFTWARE LICENSE FEES OR SERVICE CHARGE PAID BY BUYER TO
  26. *  MEDIATEK FOR SUCH MEDIATEK SOFTWARE AT ISSUE. 
  27. *
  28. *  THE TRANSACTION CONTEMPLATED HEREUNDER SHALL BE CONSTRUED IN ACCORDANCE
  29. *  WITH THE LAWS OF THE STATE OF CALIFORNIA, USA, EXCLUDING ITS CONFLICT OF
  30. *  LAWS PRINCIPLES.  ANY DISPUTES, CONTROVERSIES OR CLAIMS ARISING THEREOF AND
  31. *  RELATED THERETO SHALL BE SETTLED BY ARBITRATION IN SAN FRANCISCO, CA, UNDER
  32. *  THE RULES OF THE INTERNATIONAL CHAMBER OF COMMERCE (ICC).
  33. *
  34. *****************************************************************************/
  35. /*******************************************************************************
  36.  * Filename:
  37.  * ---------
  38.  *  wgui_inline_edit.h
  39.  *
  40.  * Project:
  41.  * --------
  42.  *   MAUI
  43.  *
  44.  * Description:
  45.  * ------------
  46.  *  Functions for Inline items.
  47.  *
  48.  *  Author:
  49.  * -------
  50.  *  Leo Hu (MTK00563)
  51.  *  Elvis Lin (MTK00560)
  52.  *  Terry Yang (MTK00866)
  53.  *
  54.  *==============================================================================
  55.  *             HISTORY
  56.  * Below this line, this part is controlled by PVCS VM. DO NOT MODIFY!! 
  57.  *------------------------------------------------------------------------------
  58.  * removed!
  59.  *
  60.  * removed!
  61.  * removed!
  62.  * removed!
  63.  *
  64.  * removed!
  65.  * removed!
  66.  * removed!
  67.  *
  68.  * removed!
  69.  * removed!
  70.  * removed!
  71.  *
  72.  * removed!
  73.  * removed!
  74.  * removed!
  75.  *
  76.  * removed!
  77.  * removed!
  78.  * removed!
  79.  *
  80.  * removed!
  81.  * removed!
  82.  * removed!
  83.  *
  84.  *------------------------------------------------------------------------------
  85.  * Upper this line, this part is controlled by PVCS VM. DO NOT MODIFY!! 
  86.  *==============================================================================
  87.  *******************************************************************************/
  88. /**
  89.  * Copyright Notice
  90.  * (c) 2002 - 2003, Pixtel Communications, Inc., 1489 43rd Ave. W.,
  91.  * Vancouver, B.C. V6M 4K8 Canada. All Rights Reserved.
  92.  *  (It is illegal to remove this copyright notice from this software or any
  93.  *  portion of it)
  94.  */
  95. /**********************************************************************************
  96.    Filename:      wgui_inline_edit.h
  97.    Author:        manju
  98.    Date Created:  June-17-2003
  99.    Contains:      Prototypes for inline editing
  100. **********************************************************************************/
  101. #ifndef __WGUI_INLINE_EDIT_H__
  102. #define __WGUI_INLINE_EDIT_H__
  103. #include "gui_config.h"
  104. #include "FrameworkStruct.h"
  105. #ifdef __cplusplus
  106. extern "C"
  107. {
  108. #endif /* __cplusplus */ 
  109. #ifdef __MMI_TOUCH_SCREEN__
  110. #include "kal_non_specific_general_types.h"
  111. #include "TouchScreenGprot.h"
  112.     typedef enum
  113.     {
  114.         GUI_INLINE_PEN_NONE,
  115.         GUI_INLINE_PEN_NEED_REDRAW,
  116.         GUI_INLINE_PEN_ITEM_SELECTED
  117.     } gui_inline_pen_enum;
  118.     typedef enum
  119.     {
  120.         GUI_INLINE_ITEM_PEN_NONE,
  121.         GUI_INLINE_ITEM_PEN_NEED_REDRAW_ITEM,
  122.         GUI_INLINE_ITEM_PEN_NEED_REDRAW_MENU,
  123.         GUI_INLINE_ITEM_PEN_SELECTED
  124.     } gui_inline_item_pen_enum;
  125. #endif /* __MMI_TOUCH_SCREEN__ */ 
  126.     /* Specific types of inline items   */
  127.     typedef struct _wgui_inline_item_text_edit
  128.     {
  129.         U32 flags;
  130.         U16 input_type;
  131.         /* MTK Terry for 0x81 Encoding in Phone Book */
  132.         U16 input_ext_type;
  133.         U16 title;      /* Used only for full screen edit   */
  134.         U16 title_icon; /* Used only for full screen edit   */
  135.         U8 *buffer;
  136.         S32 buffer_size;
  137.         U8 *mask_buffer;
  138.         U8 max_lines;
  139.         void (*edit_complete_callback) (U8 *buffer, S32 buffer_size);
  140.         S32 UCS2_count;
  141.         void (*custom_setup_function) (void);
  142.         void (*validation_callback) (UI_buffer_type text, UI_buffer_type cursor_p, S32 text_length);
  143.         /* PMT  MANISH  START  20050722 */
  144.     #ifdef __MMI_UI_INLINE_EDIT_DEFAULT_TEXT_EFFECT__
  145.         U8 *default_item_text;
  146.     #endif 
  147.         /* PMT  MANISH  END  20050722 */
  148.     } wgui_inline_item_text_edit;
  149.     typedef struct _wgui_inline_item_select
  150.     {
  151.         U32 flags;
  152.         S32 n_items;
  153.         S32 *highlighted_item;
  154.         U8 **list_of_strings;
  155.         void (*item_highlighted) (S32 item_index);
  156.     } wgui_inline_item_select;
  157.     typedef struct _wgui_inline_item_date
  158.     {
  159.         U32 flags;
  160.         U8 *day_buffer;
  161.         U8 *month_buffer;
  162.         U8 *year_buffer;
  163.         void (*string_construct_callback) (U8 *string_buffer, U8 *day_buffer, U8 *month_buffer, U8 *year_buffer);
  164.     } wgui_inline_item_date;
  165.     typedef struct _wgui_inline_item_time
  166.     {
  167.         U32 flags;
  168.         U8 *hours_buffer;
  169.         U8 *minutes_buffer;
  170.         U8 *seconds_buffer;
  171.         U8 *AM_PM_flag;
  172.         void (*string_construct_callback) (U8 *string_buffer, U8 *hours_buffer, U8 *minutes_buffer, U8 *AM_PM_flag);
  173.     } wgui_inline_item_time;
  174.     typedef struct _wgui_inline_item_user_defined_select
  175.     {
  176.         U32 flags;
  177.         U8 *current_text_p;
  178.         U8 *(*current_item_callback) (void);
  179.         U8 *(*previous_item_callback) (void);
  180.         U8 *(*next_item_callback) (void);
  181.     } wgui_inline_item_user_defined_select;
  182.     typedef struct _wgui_inline_item_DOW_select
  183.     {
  184.         U32 flags;
  185.         U8 *list_of_states;
  186.     } wgui_inline_item_DOW_select;
  187.     typedef struct _wgui_inline_item_time_period
  188.     {
  189.         U32 flags;
  190.         U8 *hours_buffer1;
  191.         U8 *minutes_buffer1;
  192.         U8 *AM_PM_flag1;
  193.         U8 *hours_buffer2;
  194.         U8 *minutes_buffer2;
  195.         U8 *AM_PM_flag2;
  196.         void (*string_construct_callback) (U8 *string_buffer, U8 *hours_buffer1, U8 *minutes_buffer1,
  197.                                            U8 *AM_PM_flag1, U8 *hours_buffer2, U8 *minutes_buffer2,
  198.                                            U8 *AM_PM_flag2);
  199.     } wgui_inline_item_time_period;
  200.     typedef struct _wgui_inline_item_IP4
  201.     {
  202.         U32 flags;
  203.         U8 *b1;
  204.         U8 *b2;
  205.         U8 *b3;
  206.         U8 *b4;
  207.         void (*string_construct_callback) (U8 *string_buffer, U8 *b1, U8 *b2, U8 *b3, U8 *b4);
  208.     } wgui_inline_item_IP4;
  209.     typedef struct _wgui_inline_item_color_select
  210.     {
  211.         U32 flags;
  212.         U16 n_color;
  213.         U16 highlighted_index;
  214.         U16 start_index;
  215.         color *list_of_color;
  216.         void (*color_highlighted) (U16 index);
  217.     } wgui_inline_item_color_select;
  218. #define INLINE_ITEM_ACTIVATE_WITHOUT_KEY_EVENT     254
  219. #define INLINE_ITEM_TYPE_MASK                0x000000FF
  220. #define INLINE_ITEM_TYPE_CAPTION                0x00000001
  221. #define INLINE_ITEM_TYPE_DISPLAY_ONLY           0x00000002
  222. #define INLINE_ITEM_TYPE_TEXT_EDIT              0x00000003
  223. #define INLINE_ITEM_TYPE_FULL_SCREEN_EDIT       0x00000004
  224. #define INLINE_ITEM_TYPE_SELECT                 0x00000005
  225. #define INLINE_ITEM_TYPE_USER_DEFINED_SELECT    0x00000006
  226. #define INLINE_ITEM_TYPE_DATE                   0x00000007
  227. #define INLINE_ITEM_TYPE_TIME                   0x00000008
  228. #define INLINE_ITEM_TYPE_TIME_PERIOD            0x00000009
  229. #define INLINE_ITEM_TYPE_DOW_SELECT             0x0000000A
  230. #define INLINE_ITEM_TYPE_IP4_EDIT               0x0000000B
  231. #define INLINE_ITEM_IMAGE_TEXT_TYPE             0x0000000C
  232. #define INLINE_ITEM_ATTACH_IMAGE                0x0000000D
  233. #if defined(__MMI_INSCREEN_MULTILINE_TEXTBOX__)
  234. #define INLINE_ITEM_TYPE_MULTI_LINE_EDIT        0x0000000E
  235. #define INLINE_ITEM_TYPE_MULTI_LINE_RD_ONLY     0x0000000F
  236. #endif /* defined(__MMI_INSCREEN_MULTILINE_TEXTBOX__) */ 
  237. #define INLINE_ITEM_TYPE_COLOR_SELECT           0x00000010
  238. #define INLINE_ITEM_DISABLED                    0x00000100
  239. #define INLINE_ITEM_OPEN                        0x00000200
  240. #define INLINE_ITEM_CHANGED                     0x00000400
  241. #define INLINE_ITEM_NOT_HIGHLIGHTED             0x00000800
  242. #define INLINE_ITEM_FOLLOW_DOWN                 0x00001000
  243. #define INLINE_ITEM_FOLLOW_UP                   0x00002000
  244. #define INLINE_ITEM_LEFT_ALIGN                  0x00004000
  245. #define INLINE_ITEM_DISABLE_HIGHLIGHT           0x00008000
  246. #define INLINE_ITEM_JUSTIFY_MASK                0x00030000
  247. #define INLINE_ITEM_LEFT_JUSTIFY                0x00000000
  248. #define INLINE_ITEM_RIGHT_JUSTIFY               0x00010000
  249. #define INLINE_ITEM_CENTER_JUSTIFY              0x00020000
  250. #define INLINE_ITEM_BOUNDARY_MASK               0x000C0000
  251. #define INLINE_ITEM_BOUNDARY_ON_EDIT            0x00000000
  252. #define INLINE_ITEM_BOUNDARY_ALWAYS             0x00040000
  253. #define INLINE_ITEM_BOUNDARY_NEVER              0x00080000
  254. #define INLINE_ITEM_DOTTED_UNDERLINE            0x00100000
  255.     typedef struct _wgui_inline_item
  256.     {
  257.         U32 flags;
  258.         S32 key_code;
  259.         S32 key_event;
  260.         U8 *text_p;
  261.         PU8 side_img;
  262.         U8 show_img_flag;
  263.         void *item;
  264.         void (*handler) (S32 x, S32 y, S32 width, S32 height, S32 key_code, S32 key_event, U8 **text_p, void *item,
  265.                          U32 flags, U8 *history_buffer);
  266.     } wgui_inline_item;
  267.     typedef wgui_inline_item InlineItem;
  268. #define MAX_INLINE_ITEMS   32
  269.     extern wgui_inline_item wgui_inline_items[MAX_INLINE_ITEMS];
  270.     extern wgui_inline_item *current_wgui_inline_item;
  271. #ifdef __MMI_TOUCH_SCREEN__
  272.     extern BOOL UI_dummy_inline_item_pen_function(
  273.                     mmi_pen_event_type_enum pen_event,
  274.                     S16 x,
  275.                     S16 y,
  276.                     gui_inline_item_pen_enum *item_event);
  277.     extern BOOL gui_inline_translate_pen_event(
  278.                     fixed_list_menu *m,
  279.                     mmi_pen_event_type_enum pen_event,
  280.                     S16 x,
  281.                     S16 y,
  282.                     gui_inline_pen_enum *inline_event);
  283. #endif /* __MMI_TOUCH_SCREEN__ */ 
  284.     extern void SetInlineItemActivation(InlineItem *item, S32 key_code, S32 key_event);
  285.     extern void SetInlineItemTextEdit(InlineItem *item, U8 *buffer, S32 buffer_size, S16 input_type);
  286.     void RegisterInlineTextEditCompleteHandler(InlineItem *item, void (*f) (U8 *string, S32 buffer_size));
  287.     void RegisterInlineTextEditValidationFunction(InlineItem *item,
  288.                                                   void (*f) (U8 *buffer, U8 *cursor, S32 text_length));
  289.     void SetInlineTextEditCustomFunction(InlineItem *item, void (*f) (void));
  290.     extern void SetInlineItemDisplayOnly(InlineItem *item, U8 *text_p);
  291.     extern void SetInlineItemCaption(InlineItem *item, U8 *text_p);
  292.     extern void SetInlineItemFullScreenEdit(
  293.                     InlineItem *item,
  294.                     U16 title,
  295.                     U16 title_icon,
  296.                     U8 *buffer,
  297.                     S32 buffer_size,
  298.                     S16 input_type);
  299.     /* MTK Terry for 0x81 Encoding in Phone Book */
  300.     extern void SetInlineItemFullScreenEdit_ext(
  301.                     InlineItem *item,
  302.                     U16 title,
  303.                     U16 title_icon,
  304.                     U8 *buffer,
  305.                     S32 buffer_size,
  306.                     S16 input_type,
  307.                     S16 input_extended_type);
  308.     void RegisterInlineFullScreenEditCompleteHandler(InlineItem *item, void (*f) (U8 *string, S32 buffer_size));
  309.     void SetInlineFullScreenEditCustomFunction(InlineItem *item, void (*f) (void));
  310.     void RegisterInlineFullScreenEditValidationFunction(InlineItem *item,
  311.                                                         void (*f) (U8 *buffer, U8 *cursor, S32 text_length));
  312.     extern void SetInlineItemSelect(InlineItem *item, S32 n_items, U8 **list_of_items, S32 *highlighted_item);
  313.     void RegisterInlineSelectHighlightHandler(InlineItem *item, void (*f) (S32 item_index));
  314.     extern S32 GetInlineSelectHighlightedItem(void);
  315.     void SetInlineItemDate(InlineItem *item, U8 *day_buffer, U8 *month_buffer, U8 *year_buffer,
  316.                            void (*f) (U8 *string_buffer, U8 *day_buffer, U8 *month_buffer, U8 *year_buffer));
  317.     void SetInlineItemTime(InlineItem *item, U8 *hours_buffer, U8 *minutes_buffer, U8 *AM_PM_flag,
  318.                            void (*f) (U8 *string_buffer, U8 *hours_buffer, U8 *minutes_buffer, U8 *AM_PM_flag));
  319.     void SetInlineItemUserDefinedSelect(InlineItem *item, U8 *(*current_item_callback) (void),
  320.                                         U8 *(*previous_item_callback) (void), U8 *(*next_item_callback) (void));
  321.     extern void SetInlineItemDOWSelect(InlineItem *item, S32 item_index, U8 *list_of_states);
  322.     void SetInlineItemTimePeriod(InlineItem *item, U8 *hours_buffer1, U8 *minutes_buffer1, U8 *AM_PM_flag1,
  323.                                  U8 *hours_buffer2, U8 *minutes_buffer2, U8 *AM_PM_flag2,
  324.                                  void (*f) (U8 *string_buffer, U8 *hours_buffer1, U8 *minutes_buffer1,
  325.                                             U8 *AM_PM_flag1, U8 *hours_buffer2, U8 *minutes_buffer2,
  326.                                             U8 *AM_PM_flag2));
  327.     void SetInlineItemIP4(InlineItem *item, U8 *b1, U8 *b2, U8 *b3, U8 *b4,
  328.                           void (*f) (U8 *string_buffer, U8 *b1, U8 *b2, U8 *b3, U8 *b4));
  329.     void SetInlineItemColorSelect(InlineItem *item, S32 n_color, U16 highlighted_index, color *list_of_color,
  330.                                   void (*color_highlighted) (U16 index));
  331.     extern void SetInlineItemFollowUp(InlineItem *item, S32 index);
  332.     extern void SetInlineItemFollowDown(InlineItem *item, S32 index);
  333.     extern void DisableInlineItem(InlineItem *item, S32 index);
  334.     extern void EnableInlineItem(InlineItem *item, S32 index);
  335.     extern S32 GetInlineEditUCS2Count(InlineItem *i);
  336.     extern void SetInlineItemFullWidth(InlineItem *i);
  337.     extern void LeftJustifyInlineItem(InlineItem *i);
  338.     extern void RightJustifyInlineItem(InlineItem *i);
  339.     extern void CenterJustifyInlineItem(InlineItem *i);
  340.     extern void DisableInlineItemBoundary(InlineItem *i);
  341.     extern void EnableInlineItemBoundary(InlineItem *i);
  342.     extern void DisableInlineItemHighlight(InlineItem *i);
  343.     extern void SetInlineItemDottedUnderline(InlineItem *i);
  344.     extern void ReConfigureInlineItemDisplayOnly(InlineItem *item, U8 *text_p);
  345.     extern void ReconfigureInlineItemCaption(InlineItem *item, U8 *text_p);
  346.     extern void ReConfigureInlineItemTextEdit(InlineItem *item, U8 *buffer, S32 buffer_size, S16 input_type);
  347.     extern void ReConfigureInlineItemFullScreenEdit(
  348.                     InlineItem *item,
  349.                     U16 title,
  350.                     U16 title_icon,
  351.                     U8 *buffer,
  352.                     S32 buffer_size,
  353.                     S16 input_type);
  354.     extern void ReConfigureInlineItemSelect(
  355.                     InlineItem *item,
  356.                     S32 n_items,
  357.                     U8 **list_of_items,
  358.                     S32 *highlighted_item);
  359.     void ReConfigureInlineItemDate(InlineItem *item, U8 *day_buffer, U8 *month_buffer, U8 *year_buffer,
  360.                                    void (*f) (U8 *string_buffer, U8 *day_buffer, U8 *month_buffer,
  361.                                               U8 *year_buffer));
  362.     void ReConfigureInlineItemTime(InlineItem *item, U8 *hours_buffer, U8 *minutes_buffer, U8 *AM_PM_flag,
  363.                                    void (*f) (U8 *string_buffer, U8 *hours_buffer, U8 *minutes_buffer,
  364.                                               U8 *AM_PM_flag));
  365.     void ReConfigureInlineItemUserDefinedSelect(InlineItem *item, U8 *(*current_item_callback) (void),
  366.                                                 U8 *(*previous_item_callback) (void),
  367.                                                 U8 *(*next_item_callback) (void));
  368.     extern void ReConfigureInlineItemDOWSelect(InlineItem *item, S32 item_index, U8 *list_of_states);
  369.     void ReConfigureInlineItemTimePeriod(InlineItem *item, U8 *hours_buffer1, U8 *minutes_buffer1, U8 *AM_PM_flag1,
  370.                                          U8 *hours_buffer2, U8 *minutes_buffer2, U8 *AM_PM_flag2,
  371.                                          void (*f) (U8 *string_buffer, U8 *hours_buffer1, U8 *minutes_buffer1,
  372.                                                     U8 *AM_PM_flag1, U8 *hours_buffer2, U8 *minutes_buffer2,
  373.                                                     U8 *AM_PM_flag2));
  374.     void ReConfigureInlineItemIP4(InlineItem *item, U8 *b1, U8 *b2, U8 *b3, U8 *b4,
  375.                                   void (*f) (U8 *string_buffer, U8 *b1, U8 *b2, U8 *b3, U8 *b4));
  376.     extern U8 GetInlineDoneFlag(U8 *history_buffer);
  377.     extern void SetInlineDoneFlag(U8 *history_buffer);
  378.     extern void ResetInlineDoneFlag(U8 *history_buffer);
  379.     extern void DisableInlineInputMethodHints(void);
  380.     /* PMT  MANISH  START  20050722 */
  381. #ifdef __MMI_UI_INLINE_EDIT_DEFAULT_TEXT_EFFECT__
  382.     extern void SetInlineItemTextEditDefaultItemNameIfEmpty(InlineItem *item, U16 default_text_id);
  383.     extern void EnableInlineItemDefaultText(void);
  384.     extern void DisableInlineItemDefaultText(void);
  385.     extern U8 IsInlineItemDefaultTextEnable(void);
  386. #endif /* __MMI_UI_INLINE_EDIT_DEFAULT_TEXT_EFFECT__ */ 
  387.     /* PMT  MANISH  END  20050722 */
  388.     extern void Category57ChangeItemText(S32 index, U8 *text);
  389.     extern void Category57ChangeItemIcon(S32 index, U16 image_ID);
  390.     extern void DisableCategory57ScreenDone(void);
  391.     extern void EnableCategory57ScreenDone(void);
  392.     extern void InitializeCategory57Screen(void);
  393.     extern void RedrawCategory57Screen(void);
  394.     extern void ShowCategory57Screen(
  395.                     U16 title,
  396.                     U16 title_icon,
  397.                     U16 left_softkey,
  398.                     U16 left_softkey_icon,
  399.                     U16 right_softkey,
  400.                     U16 right_softkey_icon,
  401.                     S32 number_of_items,
  402.                     U16 *list_of_icons,
  403.                     InlineItem *list_of_items,
  404.                     S32 highlighted_item,
  405.                     U8 *history_buffer);
  406.     extern void ExitCategory57Screen(void);
  407.     extern U8 *GetCategory57History(U8 *history_buffer);
  408.     extern S32 GetCategory57HistorySize(void);
  409.     void SetCategory57RightSoftkeyFunctions(void (*done_function) (void), void (*back_function) (void));
  410.     void SetCategory57LeftSoftkeyFunction(void (*LSK_function) (void));
  411.     extern S32 GetCategory57DataSize(void);
  412.     extern U8 *GetCategory57Data(U8 *data);
  413.     extern void SetCategory57Data(InlineItem *list_of_items, S32 number_of_items, U8 *data);
  414.     extern void CloseCategory57Screen(void);
  415.     extern void set_wgui_inline_list_menu_changed(void);
  416.     void Category57AppendTopInfoBox(U16 num_of_info_box_rows,
  417.                                     void (*draw_info_callback) (S32 idx, S32 x1, S32 y1, S32 x2, S32 y2),
  418.                                     void (*hide_info_callback) (S32 idx), BOOL is_draw_once);
  419.     extern void Category157ChangeItemText(S32 index, U8 *text);
  420.     extern void Category157ChangeItemIcon(S32 index, U16 image_ID);
  421.     extern void DisableCategory157ScreenDone(void);
  422.     extern void InitializeCategory157Screen(void);
  423.     extern void RedrawCategory157Screen(void);
  424.     extern void ShowCategory157Screen(
  425.                     U8 *title,
  426.                     U16 title_icon,
  427.                     U16 left_softkey,
  428.                     U16 left_softkey_icon,
  429.                     U16 right_softkey,
  430.                     U16 right_softkey_icon,
  431.                     S32 number_of_items,
  432.                     U16 *list_of_icons,
  433.                     InlineItem *list_of_items,
  434.                     S32 highlighted_item,
  435.                     U8 *history_buffer);
  436.     extern void ExitCategory157Screen(void);
  437.     extern U8 *GetCategory157History(U8 *history_buffer);
  438.     extern S32 GetCategory157HistorySize(void);
  439.     void SetCategory157RightSoftkeyFunctions(void (*done_function) (void), void (*back_function) (void));
  440.     void SetCategory157LeftSoftkeyFunction(void (*LSK_function) (void));
  441.     extern S32 GetCategory157DataSize(void);
  442.     extern U8 *GetCategory157Data(U8 *data);
  443.     extern void SetCategory157Data(InlineItem *list_of_items, S32 number_of_items, U8 *data);
  444.     extern void CloseCategory157Screen(void);
  445.     /* Max: function to set RSK to "Clear" */
  446.     extern void SetCategory57ScreenRSKClear(void);
  447.     extern void ShowCategory257Screen(
  448.                     U16 title,
  449.                     U16 title_icon,
  450.                     U16 left_softkey,
  451.                     U16 left_softkey_icon,
  452.                     U16 right_softkey,
  453.                     U16 right_softkey_icon,
  454.                     U16 ImgId,
  455.                     S32 number_of_items,
  456.                     U16 *list_of_icons,
  457.                     InlineItem *list_of_items,
  458.                     S32 highlighted_item,
  459.                     U8 *history_buffer);
  460.     extern void ShowCategory357Screen(
  461.                     U16 title,
  462.                     U16 title_icon,
  463.                     U16 left_softkey,
  464.                     U16 left_softkey_icon,
  465.                     U16 right_softkey,
  466.                     U16 right_softkey_icon,
  467.                     U16 ImgId,
  468.                     S32 number_of_items,
  469.                     U16 *list_of_icons,
  470.                     InlineItem *list_of_items,
  471.                     S32 highlighted_item,
  472.                     U8 *history_buffer);
  473.     /* Image text */
  474.     typedef struct _wgui_inline_image_text
  475.     {
  476.         U32 flags;
  477.         PU8 image1;
  478.         PU8 image2;
  479.         U8 *text;
  480.         S32 buffer_size;
  481.         PU8 image3;
  482.         S32 UCS2_count;
  483.         S32 x, y, width, height;
  484.         wgui_inline_item_text_edit *inline_full_text;
  485.     #ifdef __MMI_TOUCH_SCREEN__
  486.         /* Only support callback of image2 and image3 */
  487.         FuncPtr image_callback[2];
  488.         mmi_pen_point_struct image_left_top[2];
  489.         mmi_pen_point_struct image_right_bottom[2];
  490.         S16 pen_down_image_index;
  491.         S16 pen_curr_pressed_image_index;
  492.     #endif /* __MMI_TOUCH_SCREEN__ */ 
  493.     } wgui_inline_image_text;
  494.     /* Image attachments */
  495. #define MMI_ATTACHMENT_FILE_NAME_SIZE           12 * ENCODING_LENGTH
  496.     /* Same as MMI_EMAIL_MAX_NUM_ATTACH */
  497. #define MAX_IMAGES_IN_INLINE_ATTACHMENT         3
  498.     typedef struct _wgui_inline_images_detail
  499.     {
  500.         U8 image_file_name[MMI_ATTACHMENT_FILE_NAME_SIZE];
  501.         U8 type_of_image;
  502.         PU8 image1;
  503.     } wgui_inline_images_detail;
  504.     typedef struct _wgui_inline_image_attachment    /* vandi */
  505.     {
  506.         U32 flags;
  507.         U16 title;
  508.         U16 title_icon;
  509.         wgui_inline_images_detail attach_image[MAX_IMAGES_IN_INLINE_ATTACHMENT];
  510.         PU8 image1;
  511.         PU8 image2;
  512.         PU8 image3;
  513.         U8 control_x1;
  514.         U8 control_y1;
  515.         U8 control_width;
  516.         U8 control_height;
  517.         S16 highlited_image;
  518.     #ifdef __MMI_TOUCH_SCREEN__
  519.         S16 highlight_changed;
  520.         mmi_pen_point_struct image_left_top[MAX_IMAGES_IN_INLINE_ATTACHMENT];
  521.         mmi_pen_point_struct image_right_bottom[MAX_IMAGES_IN_INLINE_ATTACHMENT];
  522.     #endif /* __MMI_TOUCH_SCREEN__ */ 
  523.         void (*lsk_function) (PU8, UI_string_type str);
  524.         void (*rsk_function) (PU8, UI_string_type str);
  525.         void (*image_change_cb)(S32 index);
  526.     } wgui_inline_image_attachment;
  527.     extern void RegisterAttachmentLskFunction(InlineItem *item, void (*f) (PU8 image, UI_string_type str));
  528.     extern void RegisterAttachmentRskFunction(InlineItem *item, void (*f) (PU8 image, UI_string_type str));
  529.     extern void RegisterAttachmentHighlightedFunction (InlineItem * item, void (*f)(S32 index));
  530.     extern void SetInlineItemImageAttachment(
  531.                     InlineItem *item,
  532.                     PU8 image1,
  533.                     PU8 image2,
  534.                     PU8 image3,
  535.                     U16 title,
  536.                     U16 title_icon,
  537.                     U8 highlight_image);
  538.     extern void ShowAsControl(InlineItem *item);
  539.     extern void SetInlineFullScreenEditCustomFunctionImageText(InlineItem *item, void (*f) (void));
  540.     extern void SetInlineItemImageText(
  541.                     InlineItem *item,
  542.                     U8 *text,
  543.                     PU8 image1,
  544.                     PU8 image2,
  545.                     PU8 image3,
  546.                     S32 buf_size,
  547.                     U16 title,
  548.                     U16 title_icon,
  549.                     S16 input_type);
  550. #ifdef __MMI_TOUCH_SCREEN__
  551.     extern void SetInlineImageTextPenHandler(InlineItem *item, FuncPtr image2_callback, FuncPtr image3_callback);
  552. #endif 
  553.     extern void ClearAttachmentImage(InlineItem *item, S32 index);
  554.     extern void AddEmailImageAttachmentUI(InlineItem *item, wgui_inline_images_detail *image_details);
  555.     extern void ClearAllAttachmentImages(InlineItem *item, S32 attachments_present);
  556.     extern void SetHighlightedAttachment(wgui_inline_item *inline_item, S32 index);
  557.     /* Function Decleration Added For Old Functions In Header File - Gurinder 15/4/2004 */
  558.     extern S32 get_wgui_inline_list_menu_status(void);
  559.     extern void set_wgui_inline_list_menu_status(S32 status);
  560.     extern void execute_wgui_inline_edit_RSK_function(void);
  561.     extern void execute_wgui_inline_edit_LSK_function(void);
  562.     /* Gurinder 14/5/2004 - Append For InlineItemText. */
  563.     extern S32 AppendInlineItemTextEditString(
  564.                 S16 input_type,
  565.                 U8 *buffer,
  566.                 InlineItem *list_of_items,
  567.                 S32 number_of_items,
  568.                 S32 *size,
  569.                 history *history,
  570.                 U8 plus_handling);
  571.     /* Pixtel - Gurinder 2/6/04. Signatures for MultiLine Input Box Inscreen Control. */
  572. #if defined(__MMI_INSCREEN_MULTILINE_TEXTBOX__)
  573.     extern void SetInlineItemMultiLineEdit(InlineItem *item, U8 *buffer, U8 *title, S32 buffer_size, S16 input_type);
  574.     void SetInlineMultiLineEditCustomFunction(InlineItem *item, void (*f) (void));
  575.     extern void handle_inline_multi_line_edit(
  576.                     S32 x,
  577.                     S32 y,
  578.                     S32 width,
  579.                     S32 height,
  580.                     S32 key_code,
  581.                     S32 key_event,
  582.                     U8 **text_p,
  583.                     void *item,
  584.                     U32 flags,
  585.                     U8 *history_buffer);
  586.     extern void wgui_show_inline_inscreen_multi_line_edit(
  587.                     S32 x1,
  588.                     S32 y1,
  589.                     S32 width,
  590.                     S32 height,
  591.                     wgui_inline_item *item);
  592.     extern void gui_draw_inscreen_multi_line_input_box_title(S32 x1, S32 y1, S32 x2, S32 y2);
  593.     extern void handle_inline_multi_line_edit_complete(void);
  594.     extern void handle_inline_full_screen_edit_close(void);
  595.     extern void inline_multiline_edit_complete(void);
  596.     extern S8 MMI_multi_line_inputbox_present;
  597.     extern void handle_inline_multi_line_rd_only(
  598.                     S32 x,
  599.                     S32 y,
  600.                     S32 width,
  601.                     S32 height,
  602.                     S32 key_code,
  603.                     S32 key_event,
  604.                     U8 **text_p,
  605.                     void *item,
  606.                     U32 flags,
  607.                     U8 *history_buffer);
  608.     extern void wgui_show_inline_multi_line_rd_only(S32 x1, S32 y1, S32 width, S32 height, wgui_inline_item *item);
  609.     extern void SetInlineMultiLineRdOnly(InlineItem *item, U8 *buffer, S32 buffer_size, U16 input_type, U8);
  610.     /* Gurinder - 5/5/2004 Inline Multiline Box History Control */
  611.     extern void set_inscreen_multi_line_input_box_changed(void);
  612.     extern void reset_inscreen_multi_line_input_box_changed(void);
  613.     extern S32 menu_item_inline_multiline_box(void);
  614. #endif /* defined(__MMI_INSCREEN_MULTILINE_TEXTBOX__) */ 
  615.     /* End Pixtel */
  616.     extern void SetInlineListMenuChanged(void);
  617.     extern S32 GetInlineListMenuChanged(void);
  618. #ifdef __MMI_DRAW_MANAGER__
  619.     /* For Draw Manager  */
  620.     extern U8 *wgui_get_inline_history(U16 history_ID, U8 *history_buffer);
  621.     extern S32 wgui_get_inline_history_size(void);
  622. #endif /* __MMI_DRAW_MANAGER__ */ 
  623.     //PMT VIKAS START 20050630
  624.     //No need of this declaration. Remove this.
  625.     //PMT VIKAS START 20050524
  626.     //#ifdef __MMI_UI_TRANSPARENT_EFFECT__
  627.     //   void gui_inline_edit_disable_transparent_effect(horizontal_select   *m);
  628.     //#endif
  629.     //PMT VIKAS END
  630.     //PMT VIKAS END 20050630
  631. #ifdef __cplusplus
  632. }
  633. #endif 
  634. void RegisterInlineItemChangedNotification(void (*callback) (U16 index));
  635. extern void ResetInlineItemChangedNotification(void);
  636. extern U8 *wgui_inline_edit_get_current_item_history(U8 *history_buffer);
  637. extern void wgui_update_inline_data(void);
  638. #endif /* __WGUI_INLINE_EDIT_H__ */