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

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.  *
  37.  * Filename:
  38.  * ---------
  39.  *  wgui_categories_UCE.h
  40.  *
  41.  * Project:
  42.  * --------
  43.  *  MAUI
  44.  *
  45.  * Description:
  46.  * ------------
  47.  *  Unified Composer Category 
  48.  *
  49.  *  [Category280]       UCE Category
  50.  *
  51.  * Author:
  52.  * -------
  53.  * -------
  54.  * -------
  55.  *
  56.  *============================================================================
  57.  *             HISTORY
  58.  * Below this line, this part is controlled by PVCS VM. DO NOT MODIFY!! 
  59.  *------------------------------------------------------------------------------
  60.  * removed!
  61.  *
  62.  * removed!
  63.  * removed!
  64.  * removed!
  65.  *
  66.  * removed!
  67.  * removed!
  68.  * removed!
  69.  *
  70.  *------------------------------------------------------------------------------
  71.  * Upper this line, this part is controlled by PVCS VM. DO NOT MODIFY!!
  72.  *============================================================================
  73.  ****************************************************************************/
  74. #ifndef __WGUI_CATEGORIES_UCE_H__
  75. #define __WGUI_CATEGORIES_UCE_H__
  76. #include "FileMgr.h"    /* FMGR_MAX_PATH_LEN is defined in here */
  77. #include "Gdi_include.h"  /* Bits Per Pixel*/
  78. #include "lcd_sw_rnd.h"
  79. #include "gdi_lcd_config.h"      /* LCD_WIDTH */
  80. /***************************************************************************** 
  81. * Define
  82. *****************************************************************************/
  83. #if defined(__MMI_MAINLCD_240X320__)
  84. #define CAT280_THUMBNAIL_FRAME_HEIGHT 80
  85. #elif defined(__MMI_MAINLCD_176X220__)
  86. #define CAT280_THUMBNAIL_FRAME_HEIGHT 80
  87. #elif defined(__MMI_MAINLCD_128X160__)
  88. #define CAT280_THUMBNAIL_FRAME_HEIGHT 50
  89. #else /* 128x128 display */
  90. #define CAT280_THUMBNAIL_FRAME_HEIGHT 45
  91. #endif
  92. #define CAT280_THUMBNAIL_BUFFER_SIZE ((CAT280_THUMBNAIL_FRAME_HEIGHT*LCD_WIDTH*GDI_MAINLCD_BIT_PER_PIXEL)>>3)
  93. #if 0 
  94. #if defined(__MMI_MAINLCD_240X320__)
  95. /* under construction !*/
  96. #elif defined(__MMI_MAINLCD_176X220__)
  97. /* under construction !*/
  98. #elif defined(__MMI_MAINLCD_128X160__)
  99. /* under construction !*/
  100. #else /* 128x128 display */
  101. /* under construction !*/
  102. #endif 
  103. #endif
  104.  
  105. /***************************************************************************** 
  106. * Typedef 
  107. *****************************************************************************/
  108. typedef enum
  109. {
  110.     WGUI_UCE_MSG_TYPE_SMS,
  111.     WGUI_UCE_MSG_TYPE_MMS, /* Tony, for compile warning */
  112.     WGUI_UCE_MSG_TYPE_TOTAL
  113. } wgui_uce_msg_type_enum;
  114. typedef enum
  115. {
  116.     WGUI_UCE_LAYOUT_TYPE_THUMBNAIL_AT_TOP,
  117.     WGUI_UCE_LAYOUT_TYPE_THUMBNAIL_AT_BOTTOM,
  118.     WGUI_UCE_LAYOUT_TYPE_THUMBNAIL_TOTAL
  119. } wgui_uce_layout_type_enum;
  120. typedef enum
  121. {
  122.     WGUI_UCE_OBJECT_TYPE_IMAGE,
  123.     WGUI_UCE_OBJECT_TYPE_AUDIO,
  124.     WGUI_UCE_OBJECT_TYPE_VIDEO,
  125.     WGUI_UCE_OBJECT_TYPE_ATTACHMENT,
  126.     WGUI_UCE_OBJECT_TYPE_TOTAL
  127. } wgui_uce_object_type_enum;
  128. typedef struct
  129. {
  130.     U16 char_count;             /* Total Character Count */
  131.     U16 utf8_msg_len;           /* Msg Len in UTF8 */
  132.     U16 extension_char_count;   /* EXT CHAR Count */
  133.     U16 UCS2_count;             /* Tricky: count UCS2 characters that are not also extension characters */
  134. } wgui_uce_text_info_struct;
  135. typedef struct
  136. {
  137.     wgui_uce_msg_type_enum msg_type;
  138.     U8 *text_buffer;        /* always UCS2. */
  139.     U32 text_buffer_size;
  140.     U8 *thumbnail_buffer;   /* allocated by category using screen based ASM and freed in exit category */
  141.     U16 default_image_id;
  142.     wgui_uce_text_info_struct text_info;
  143.     U8 total_slides;
  144.     U8 current_slide;
  145.     MMI_BOOL is_image;
  146.     MMI_BOOL is_audio;
  147.     MMI_BOOL is_video;
  148.     MMI_BOOL is_attachment;
  149.     wgui_uce_layout_type_enum layout;
  150.     U16 file_path[FMGR_MAX_PATH_LEN];   /* Currently ~260 characters */
  151.     color text_color;       /* reserved */
  152.     color background_color; /* reserved */
  153. } wgui_uce_context_struct;
  154. typedef enum
  155. {
  156.     WGUI_UCE_TEXT_CHANGE_ALLOWED,
  157.     WGUI_UCE_TEXT_CHANGE_NOT_ALLOWED,
  158.     WGUI_UCE_TEXT_CHANGE_TOTAL
  159. } wgui_uce_text_change_result_enum;
  160. typedef wgui_uce_text_change_result_enum(*wgui_uce_text_change_callback) (wgui_uce_text_info_struct *new_text_info);
  161. typedef U32(*wgui_uce_get_message_size_callback) (wgui_uce_text_info_struct *current_text_info);
  162. /***************************************************************************** 
  163. * Extern Global Variable
  164. *****************************************************************************/
  165. /***************************************************************************** 
  166. * Extern Global Function
  167. *****************************************************************************/
  168. extern void wgui_uce_insert_text(wgui_uce_text_info_struct *text_info, U8 *text_buffer);
  169. extern U32 wgui_uce_insert_text_template(U8 *string, U16 no_of_char, U8 *guibuffer);
  170. extern void wgui_uce_get_current_text_info(wgui_uce_text_info_struct *current_text_info);
  171. extern void wgui_uce_get_text_info_for_buffer(wgui_uce_text_info_struct *text_info, U8 *text_buffer);
  172. extern void wgui_uce_add_object(
  173.                 wgui_uce_msg_type_enum object,
  174.                 U16 *file_path,
  175.                 U16 default_image_id,
  176.                 wgui_uce_layout_type_enum alignment_type);
  177. extern void wgui_uce_delete_object(wgui_uce_msg_type_enum object);
  178. extern void wgui_uce_initialize_editor(
  179.                 U8 *text_buffer,
  180.                 U16 text_buffer_size,
  181.                 U8 new_slide_number,
  182.                 U8 total_slide_number,
  183.                 wgui_uce_get_message_size_callback get_msg_size,
  184.                 wgui_uce_text_change_callback text_change);
  185. extern void SetCategory280RightSoftkeyFunction(void (*f) (void), MMI_key_event_type k);
  186. extern void ShowCategory280Screen(
  187.                 U16 title,
  188.                 U16 title_icon,
  189.                 U16 left_softkey,
  190.                 U16 left_softkey_icon,
  191.                 U16 right_softkey,
  192.                 U16 right_softkey_icon,
  193.                 wgui_uce_msg_type_enum msg_type,
  194.                 S16 input_method_type,
  195.                 U8 *gui_buffer);
  196. #endif /* __WGUI_CATEGORIES_UCE_H__ */