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

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.  *  ScrMemMgr.h
  40.  *
  41.  * Project:
  42.  * --------
  43.  *  MAUI
  44.  *
  45.  * Description:
  46.  * ------------
  47.  *  Register Screen-Based ASM
  48.  *
  49.  * Author:
  50.  * -------
  51.  * -------
  52.  *                      
  53.  *============================================================================
  54.  *             HISTORY
  55.  * Below this line, this part is controlled by PVCS VM. DO NOT MODIFY!!
  56.  *------------------------------------------------------------------------------
  57.  * removed!
  58.  *
  59.  * removed!
  60.  * removed!
  61.  * removed!
  62.  *
  63.  * removed!
  64.  * removed!
  65.  * removed!
  66.  *
  67.  * removed!
  68.  * removed!
  69.  * removed!
  70.  *
  71.  * removed!
  72.  * removed!
  73.  * removed!
  74.  *
  75.  * removed!
  76.  * removed!
  77.  * removed!
  78.  *
  79.  * removed!
  80.  * removed!
  81.  * removed!
  82.  *
  83.  * removed!
  84.  * removed!
  85.  * removed!
  86.  *
  87.  * removed!
  88.  * removed!
  89.  * removed!
  90.  *
  91.  * removed!
  92.  * removed!
  93.  * removed!
  94.  *
  95.  * removed!
  96.  * removed!
  97.  * removed!
  98.  *
  99.  * removed!
  100.  * removed!
  101.  * removed!
  102.  *
  103.  * removed!
  104.  * removed!
  105.  * removed!
  106.  *
  107.  * removed!
  108.  * removed!
  109.  * removed!
  110.  *
  111.  * removed!
  112.  * removed!
  113.  * removed!
  114.  *
  115.  * removed!
  116.  * removed!
  117.  * removed!
  118.  *
  119.  * removed!
  120.  * removed!
  121.  * removed!
  122.  *
  123.  * removed!
  124.  * removed!
  125.  * removed!
  126.  *
  127.  * removed!
  128.  * removed!
  129.  * removed!
  130.  *
  131.  * removed!
  132.  * removed!
  133.  * removed!
  134.  *
  135.  * removed!
  136.  * removed!
  137.  * removed!
  138.  *
  139.  * removed!
  140.  * removed!
  141.  * removed!
  142.  *
  143.  * removed!
  144.  * removed!
  145.  * removed!
  146.  *
  147.  * removed!
  148.  * removed!
  149.  * removed!
  150.  *
  151.  * removed!
  152.  * removed!
  153.  * removed!
  154.  *
  155.  * removed!
  156.  * removed!
  157.  * removed!
  158.  *
  159.  * removed!
  160.  * removed!
  161.  * removed!
  162.  *
  163.  * removed!
  164.  * removed!
  165.  * removed!
  166.  *
  167.  * removed!
  168.  * removed!
  169.  * removed!
  170.  *
  171.  * removed!
  172.  * removed!
  173.  * removed!
  174.  *
  175.  * removed!
  176.  * removed!
  177.  * removed!
  178.  *
  179.  * removed!
  180.  * removed!
  181.  * removed!
  182.  *
  183.  * removed!
  184.  * removed!
  185.  * removed!
  186.  *
  187.  * removed!
  188.  * removed!
  189.  * removed!
  190.  *
  191.  * removed!
  192.  * removed!
  193.  * removed!
  194.  *
  195.  * removed!
  196.  * removed!
  197.  * removed!
  198.  *
  199.  * removed!
  200.  * removed!
  201.  * removed!
  202.  *
  203.  *------------------------------------------------------------------------------
  204.  * Upper this line, this part is controlled by PVCS VM. DO NOT MODIFY!!
  205.  *============================================================================
  206.  ****************************************************************************/
  207. #ifndef _SCR_MEM_MGR_H_
  208. #define _SCR_MEM_MGR_H_
  209. /***************************************************************************** 
  210. * Include
  211. *****************************************************************************/
  212. #ifndef __MMI_FEATURES__
  213. #error "Please include MMI_features.h first"
  214. #endif 
  215. #include "app_mem.h"        /* macro for computing pool size */
  216. /***************************************************************************** 
  217. * Define
  218. *****************************************************************************/
  219. /*
  220.  * WARNING!!!
  221.  * After modifying this file, please notify the file owner to review your changes.
  222.  */
  223. /* NOTE: We use byte to calculate buffer size */
  224. /* Video Category */ //061506 double buffer
  225. #ifdef __MMI_VIDEO_PLAYER__
  226.     #include "wgui_categories_multimedia.h"
  227.     #define VIDEO_CATEGORY_POOL_SIZE   (BLACK_BUFFER_SIZE+STATUS_ICON_BAR_DOUBLE_BUFFER_SIZE)
  228.     S32 vdo_cat_mem = (VIDEO_CATEGORY_POOL_SIZE);
  229. #else
  230.     #define VIDEO_CATEGORY_POOL_SIZE   (0)
  231. #endif
  232. /* Camera */
  233. #ifdef __MMI_CAMERA__
  234.     #include "lcd_sw_rnd.h"
  235.     #include "gdi_include.h"
  236.     #include "mdi_datatype.h"
  237.     #include "mdi_camera.h"
  238.     #include "MMI_features_camera.h"
  239.     #include "CameraApp.h"
  240.     #define SCRMEM_CAMERA_POOL_SIZE     (CAMERA_OSD_BUFFER_SIZE+CAMERA_TILE_RESULT_BUFFER_SIZE+CAMERA_OVERLAY_FRAME_BUFFER_SIZE)
  241.     S32 cam_mem = (SCRMEM_CAMERA_POOL_SIZE);
  242. #else /* __MMI_CAMERA__ */ 
  243.     #define SCRMEM_CAMERA_POOL_SIZE     (0)
  244. #endif /* __MMI_CAMERA__ */ 
  245. /* Imageviewer */
  246. #ifdef __MMI_IMAGE_VIEWER__
  247.     #include "lcd_sw_rnd.h"
  248.     #include "gdi_include.h"
  249.     #include "FileManagerGprot.h"
  250.     #include "filemgr.h"
  251.     #include "Imageviewer.h"
  252.     #define SCRMEM_IMAGEVIEWER_POOL_SIZE      (MMI_IMGADV_TOTAL_MEMORY_SIZE)
  253.     S32 imageviewer_mem = (SCRMEM_IMAGEVIEWER_POOL_SIZE);
  254. #else /* __MMI_IMAGE_VIEWER__ */ 
  255.     #define SCRMEM_CAMERA_POOL_SIZE     (0)
  256. #endif /* __MMI_IMAGE_VIEWER__ */ 
  257. /* Video Player */
  258. #ifdef __MMI_VIDEO_PLAYER__
  259.     #include "lcd_sw_rnd.h"
  260.     #include "gdi_include.h"
  261.     #include "VdoPlyGProt.h"
  262.     #define SCRMEM_VDOPLY_POOL_SIZE     (VDOPLY_OSD_BUFFER_SIZE)
  263.     S32 vdoply_mem = (SCRMEM_VDOPLY_POOL_SIZE);
  264. #else /* __MMI_VIDEO_PLAYER__ */ 
  265.     #define SCRMEM_VDOPLY_POOL_SIZE     (0)
  266. #endif /* __MMI_VIDEO_PLAYER__ */ 
  267. /* Video Recorder */
  268. #ifdef __MMI_VIDEO_RECORDER__
  269.     #include "lcd_sw_rnd.h"
  270.     #include "gdi_include.h"
  271.     #include "VdoRecGProt.h"
  272.     #define SCRMEM_VDOREC_POOL_SIZE     (VDOREC_OSD_BUFFER_SIZE+VDOREC_OVERLAY_FRAME_BUFFER_SIZE)
  273.     S32 vdorec_mem = (SCRMEM_VDOREC_POOL_SIZE);
  274. #else /* __MMI_VIDEO_RECORDER__ */ 
  275.     #define SCRMEM_VDOREC_POOL_SIZE     (0)
  276. #endif /* __MMI_VIDEO_RECORDER__ */ 
  277. /* AUDPLY LYRICS */
  278. #ifdef __MMI_AUDIO_PLAYER_LYRIC_SCREEN_BASED_ASM__
  279.     #include "AudioPlayerDef.h"
  280.     #define SCRMEM_LYRICS_POOL_SIZE     (AUDPLY_LYRIC_STR_BUFF_MAX_SIZE)
  281.     S32 lyrics_mem = (SCRMEM_LYRICS_POOL_SIZE);
  282. #else /* __MMI_AUDIO_PLAYER_LYRIC_SCREEN_BASED_ASM__ */ 
  283.     #define SCRMEM_LYRICS_POOL_SIZE     (0)
  284. #endif /* __MMI_AUDIO_PLAYER_LYRIC_SCREEN_BASED_ASM__ */ 
  285. /* AUDPLY Progress Bar */
  286. #ifdef __MMI_AUDIO_PLAYER__
  287.     #include "AudioPlayerDef.h"
  288.     #define SCRMEM_AUDPLY_PROGRESS_POOL_SIZE     (BUILD_CACHE_FILE_BUF_SIZE + BUILD_CACHE_PROC_BUF_SIZE)
  289.     S32 audply_progrss_mem = (SCRMEM_AUDPLY_PROGRESS_POOL_SIZE);
  290. #else /* __MMI_AUDIO_PLAYER__ */ 
  291.     #define SCRMEM_AUDPLY_PROGRESS_POOL_SIZE     (0)
  292. #endif /* __MMI_AUDIO_PLAYER__ */ 
  293. /* File Manager UI */
  294. #if defined(__MMI_FILE_MANAGER__) && !defined(__MMI_SLIM_FILE_MANAGER__)
  295. #include "FileManagerGProt.h"
  296. #define SCRMEM_FMGR_POOL_SIZE (FMGR_THUMB_IMAGE_BUFFER_SIZE)
  297. S32 fmgr_mem = (SCRMEM_FMGR_POOL_SIZE);
  298. #else /* defined(__MMI_FILE_MANAGER__) && !defined(__MMI_SLIM_FILE_MANAGER__) */
  299. #define SCRMEM_FMGR_POOL_SIZE  (0) 
  300. #endif /* defined(__MMI_FILE_MANAGER__) && !defined(__MMI_SLIM_FILE_MANAGER__) */
  301. /* Touch Ring Composer */
  302. #ifdef __MMI_TOUCH_RING_COMPOSER__
  303.     #include "lcd_sw_rnd.h"
  304.     #include "gdi_include.h"
  305.     #ifdef __MMI_ALPHA_LAYER_SUPPORT__
  306.         #ifdef __MMI_MAINLCD_176X220__
  307.             #define SCRMEM_TOUCH_RING_COMP_POOL_SIZE  (41*23*__MMI_MAIN_BASE_LAYER_FORMAT__)
  308.         #elif defined (__MMI_MAINLCD_240X320__)
  309.             #define SCRMEM_TOUCH_RING_COMP_POOL_SIZE  (63*31*__MMI_MAIN_BASE_LAYER_FORMAT__)
  310.         #else 
  311.             #define SCRMEM_TOUCH_RING_COMP_POOL_SIZE  (41*23*__MMI_MAIN_BASE_LAYER_FORMAT__)
  312.         #endif /* __MMI_MAINLCD_176X220 __*/
  313.     #else
  314.         #ifdef __MMI_MAINLCD_176X220__
  315.             #define SCRMEM_TOUCH_RING_COMP_POOL_SIZE  ((41*23*GDI_MAINLCD_BIT_PER_PIXEL)>>3)
  316.         #elif defined (__MMI_MAINLCD_240X320__)
  317.             #define SCRMEM_TOUCH_RING_COMP_POOL_SIZE  ((63*31*GDI_MAINLCD_BIT_PER_PIXEL)>>3)
  318.         #else 
  319.             #define SCRMEM_TOUCH_RING_COMP_POOL_SIZE  ((41*23*GDI_MAINLCD_BIT_PER_PIXEL)>>3)
  320.         #endif /* __MMI_MAINLCD_176X220 __*/
  321.     #endif  /*__MMI_ALPHA_LAYER_SUPPORT__ */
  322.     S32 touch_ring_comp_mem = (SCRMEM_TOUCH_RING_COMP_POOL_SIZE);
  323. #else /* __MMI_TOUCH_RING_COMPOSER__ */ 
  324.     #define SCRMEM_TOUCH_RING_COMP_POOL_SIZE  (0)
  325. #endif /* __MMI_TOUCH_RING_COMPOSER__ */ 
  326. /* Handwriting Stroke Layer */
  327. #if defined(__MMI_TOUCH_SCREEN__) || defined(__MMI_HANDWRITING_PAD__)
  328.     #include "lcd_sw_rnd.h"
  329.     #include "gdi_include.h"
  330.     #define SCRMEM_HANDWRITING_STROKE_LAYER_POOL_SIZE ((GDI_LCD_WIDTH *GDI_LCD_HEIGHT * (GDI_MAINLCD_BIT_PER_PIXEL>>3) + 3) & (~3))
  331.     S32 handwriting_stroke_layer_mem = (SCRMEM_HANDWRITING_STROKE_LAYER_POOL_SIZE);
  332. #else /* defined(__MMI_TOUCH_SCREEN__) || defined(__MMI_HANDWRITING_PAD__) */ 
  333.     #define SCRMEM_HANDWRITING_STROKE_LAYER_POOL_SIZE  (0)
  334. #endif /* defined(__MMI_TOUCH_SCREEN__) || defined(__MMI_HANDWRITING_PAD__) */ 
  335. /* Barcode Reader */
  336. #ifdef __MMI_BARCODEREADER__
  337.     #include "lcd_sw_rnd.h"
  338.     #include "gdi_include.h"
  339.     #include "BarcodeReaderGprot.h"
  340.     #define SCRMEM_BARCODEREADER_POOL_SIZE     (BR_SCR_TOTAL_SIZE)
  341.     S32 barcodereader_mem = (SCRMEM_BARCODEREADER_POOL_SIZE);
  342. #else /* __MMI_BARCODEREADER__ */ 
  343.     #define SCRMEM_BARCODEREADER_POOL_SIZE     (0)
  344. #endif /* __MMI_BARCODEREADER__ */ 
  345. /* 062206 EMS category Start */
  346. /* EMS category */
  347. #ifdef __MMI_MESSAGES_EMS__
  348.     #include "wgui_categories_ems.h"
  349.     #define EMS_CATEGORY_POOL_SIZE  (CAT_144_DATA_FILE_SIZE)
  350.     S32 ems_category_mem = (EMS_CATEGORY_POOL_SIZE);
  351. #else
  352.     #define EMS_CATEGORY_POOL_SIZE  (0)
  353. #endif 
  354. /* 062206 EMS buffer End */
  355. #ifdef __MMI_MESSAGES_CHAT__
  356. #include "wgui_categories_inputs.h"
  357. #define SCRMEM_CHATMSG_BUFFER_SIZE  CHAT_MESSAGE_BUFFER
  358. S32 chat_msg_buffer_mem = SCRMEM_CHATMSG_BUFFER_SIZE;
  359. #else /* __MMI_MESSAGES_CHAT__ */
  360. #define SCRMEM_CHATMSG_BUFFER_SIZE  (0)
  361. #endif /* __MMI_MESSAGES_CHAT__ */
  362. /* M3D */
  363. #if defined(M3D_MMI_SUPPORT)
  364. #include "gdi_include.h"
  365. #define SCRMEM_M3D_POOL_SIZE (400*1024)
  366. S32 m3d_mem = (SCRMEM_M3D_POOL_SIZE);
  367. #else /* defined(__MMI_TOUCH_SCREEN__) || defined(__MMI_HANDWRITING_PAD__) */ 
  368. #define SCRMEM_M3D_POOL_SIZE  (0)
  369. #endif /* defined(__MMI_TOUCH_SCREEN__) || defined(__MMI_HANDWRITING_PAD__) */ 
  370. /* NEW APPLICATIONS: add here! */
  371. /* Calendar */
  372. #ifdef __MMI_UI_INTEGRATED_CALENDAR_SUPPORT__
  373. #include "wgui_calendar.h"
  374. #define CALENDAR_POOL_SIZE  (CALENDAR_CACHE_CELL_SIZE+CALENDAR_CACHE_POPUP_SIZE)
  375. S32 calendar_mem = CALENDAR_POOL_SIZE;
  376. #else /* __MMI_UI_INTEGRATED_CALENDAR_SUPPORT__ */
  377. #define CALENDAR_POOL_SIZE  (0)
  378. #endif /* __MMI_UI_INTEGRATED_CALENDAR_SUPPORT__ */
  379. /*Birthday Reminder*/
  380. #ifdef __MMI_BIRTHDAY_REMINDER__
  381. #include "nvram_common_defs.h"
  382. #define BIRTHDAY_REMINDER_POOL_SIZE (NVRAM_EF_PHB_BIRTHDAY_SIZE * NVRAM_EF_PHB_BIRTHDAY_TOTAL)
  383. #else /*__MMI_BIRTHDAY_REMINDER__*/
  384. #define BIRTHDAY_REMINDER_POOL_SIZE  (0)
  385. #endif /*__MMI_BIRTHDAY_REMINDER__*/
  386. /* Unified Composer */
  387. #ifdef __MMI_UNIFIED_COMPOSER__
  388. #include "UnifiedMessageGProt.h"
  389. #include "UnifiedComposerGProt.h"
  390. #define SCRMEM_UC_POOL_SIZE MMI_UC_UTF8_TEXT_BUFFER_SIZE
  391. S32 uc_mem = (SCRMEM_UC_POOL_SIZE);
  392. #else /* __MMI_UNIFIED_COMPOSER__ */
  393. #define SCRMEM_UC_POOL_SIZE  (0)
  394. #endif /* __MMI_UNIFIED_COMPOSER__ */
  395. /* PS_EMS */
  396. #if defined(__EMS_REL5__)
  397. #include "customer_ps_inc.h"
  398. #define EMS_BUFFER_SIZE  (MMI_SMS_MAX_MSG_SEG * 140 * EMS_RATIO_OF_OBJ_PDU_BUFF) /* EMS_ONE_MSG_OCTET = 140 */
  399. S32 ems_buffer_mem = EMS_BUFFER_SIZE;
  400. #else /* __EMS_REL5__ */
  401. #define EMS_BUFFER_SIZE  (0)
  402. #endif /* __EMS_REL5__ */
  403. /*
  404.  * Define MMI_FRM_SCRMEM_POOL_SIZE
  405.  */
  406. #define SCRMEM_POOL_MAX (0)
  407. /* Video Category *///061506 double buffer
  408. #if (VIDEO_CATEGORY_POOL_SIZE > SCRMEM_POOL_MAX)
  409.     #undef SCRMEM_POOL_MAX
  410.     #define SCRMEM_POOL_MAX VIDEO_CATEGORY_POOL_SIZE
  411. #endif /* (VIDEO_CATEGORY_POOL_SIZE > SCRMEM_POOL_MAX) */
  412. /* Camera */
  413. #if (SCRMEM_CAMERA_POOL_SIZE > SCRMEM_POOL_MAX)
  414.     #undef SCRMEM_POOL_MAX
  415.     #define SCRMEM_POOL_MAX SCRMEM_CAMERA_POOL_SIZE
  416. #endif /* (SCRMEM_CAMERA_POOL_SIZE > SCRMEM_POOL_MAX) */ 
  417. /* Imageviewer */
  418. #if (SCRMEM_IMAGEVIEWER_POOL_SIZE > SCRMEM_POOL_MAX)
  419.     #undef SCRMEM_POOL_MAX
  420.     #define SCRMEM_POOL_MAX SCRMEM_IMAGEVIEWER_POOL_SIZE
  421. #endif /* (SCRMEM_IMAGEVIEWER_POOL_SIZE > SCRMEM_POOL_MAX) */ 
  422. /* Video Player */
  423. #if (SCRMEM_VDOPLY_POOL_SIZE > SCRMEM_POOL_MAX)
  424.     #undef SCRMEM_POOL_MAX
  425.     #define SCRMEM_POOL_MAX SCRMEM_VDOPLY_POOL_SIZE
  426. #endif /* (SCRMEM_VDOPLY_POOL_SIZE > SCRMEM_POOL_MAX) */ 
  427. /* Video Recorder */
  428. #if (SCRMEM_VDOREC_POOL_SIZE > SCRMEM_POOL_MAX)
  429.     #undef SCRMEM_POOL_MAX
  430.     #define SCRMEM_POOL_MAX SCRMEM_VDOREC_POOL_SIZE
  431. #endif /* (SCRMEM_VDOREC_POOL_SIZE > SCRMEM_POOL_MAX) */ 
  432. /* Audply Lyrics */
  433. #if (SCRMEM_LYRICS_POOL_SIZE > SCRMEM_POOL_MAX)
  434.     #undef SCRMEM_POOL_MAX
  435.     #define SCRMEM_POOL_MAX SCRMEM_LYRICS_POOL_SIZE
  436. #endif /* (SCRMEM_LYRICS_POOL_SIZE > SCRMEM_POOL_MAX) */ 
  437. /* Audply Progress Bar */
  438. #if (SCRMEM_AUDPLY_PROGRESS_POOL_SIZE > SCRMEM_POOL_MAX)
  439.     #undef SCRMEM_POOL_MAX
  440.     #define SCRMEM_POOL_MAX SCRMEM_AUDPLY_PROGRESS_POOL_SIZE
  441. #endif /* (SCRMEM_AUDPLY_PROGRESS_POOL_SIZE > SCRMEM_POOL_MAX) */ 
  442. /* File Manager UI */
  443. #if (SCRMEM_FMGR_POOL_SIZE > SCRMEM_POOL_MAX)
  444.     #undef SCRMEM_POOL_MAX
  445.     #define SCRMEM_POOL_MAX SCRMEM_FMGR_POOL_SIZE
  446. #endif /* (SCRMEM_FMGR_POOL_SIZE > SCRMEM_POOL_MAX) */ 
  447. /* Touch Ring Composer */
  448. #if ( SCRMEM_TOUCH_RING_COMP_POOL_SIZE > SCRMEM_POOL_MAX )
  449.     #undef SCRMEM_POOL_MAX
  450.     #define SCRMEM_POOL_MAX SCRMEM_TOUCH_RING_COMP_POOL_SIZE
  451. #endif /* ( SCRMEM_TOUCH_RING_COMP_POOL_SIZE > SCRMEM_POOL_MAX ) */ 
  452. /* Handwriting Stroke Layer */
  453. #if ( SCRMEM_HANDWRITING_STROKE_LAYER_POOL_SIZE > SCRMEM_POOL_MAX )
  454.     #undef SCRMEM_POOL_MAX
  455.     #define SCRMEM_POOL_MAX SCRMEM_HANDWRITING_STROKE_LAYER_POOL_SIZE
  456. #endif /* ( SCRMEM_HANDWRITING_STROKE_LAYER_POOL_SIZE > SCRMEM_POOL_MAX ) */ 
  457. /* Barcode Reader*/
  458. #if ( SCRMEM_BARCODEREADER_POOL_SIZE > SCRMEM_POOL_MAX )
  459.     #undef SCRMEM_POOL_MAX
  460.     #define SCRMEM_POOL_MAX SCRMEM_BARCODEREADER_POOL_SIZE
  461. #endif /* ( SCRMEM_BARCODEREADER_POOL_SIZE > SCRMEM_POOL_MAX ) */ 
  462. /* 062206 EMS category Start */
  463. /* EMS category */
  464. #if (EMS_CATEGORY_POOL_SIZE > SCRMEM_POOL_MAX)
  465.     #undef SCRMEM_POOL_MAX
  466.     #define SCRMEM_POOL_MAX EMS_CATEGORY_POOL_SIZE
  467. #endif /* ( EMS_CATEGORY_POOL_SIZE > SCRMEM_POOL_MAX ) */
  468. /* 062206 EMS buffer End */
  469. #if (SCRMEM_CHATMSG_BUFFER_SIZE > SCRMEM_POOL_MAX )
  470. #undef SCRMEM_POOL_MAX
  471. #define SCRMEM_POOL_MAX SCRMEM_CHATMSG_BUFFER_SIZE
  472. #endif /* (SCRMEM_CHATMSG_BUFFER_SIZE > SCRMEM_POOL_MAX ) */
  473. /* M3D */
  474. #if ( (SCRMEM_M3D_POOL_SIZE + ((GDI_LCD_WIDTH*GDI_LCD_HEIGHT*GDI_MAINLCD_BIT_PER_PIXEL)>>3)) > SCRMEM_POOL_MAX )
  475. #undef SCRMEM_POOL_MAX
  476. #define SCRMEM_POOL_MAX (SCRMEM_M3D_POOL_SIZE + ((GDI_LCD_WIDTH*GDI_LCD_HEIGHT*GDI_MAINLCD_BIT_PER_PIXEL)>>3))
  477. #endif /* ( SCRMEM_HANDWRITING_STROKE_LAYER_POOL_SIZE > SCRMEM_POOL_MAX ) */ 
  478. /* NEW APPLICATIONS: add here! */
  479. /* Calendar */
  480. #if ( CALENDAR_POOL_SIZE > SCRMEM_POOL_MAX )
  481. #undef SCRMEM_POOL_MAX
  482. #define SCRMEM_POOL_MAX CALENDAR_POOL_SIZE
  483. #endif /* ( CALENDAR_POOL_SIZE > SCRMEM_POOL_MAX ) */ 
  484. /*BIRTHDAY_REMINDER*/
  485. #if ( BIRTHDAY_REMINDER_POOL_SIZE > SCRMEM_POOL_MAX )
  486. #undef SCRMEM_POOL_MAX
  487. #define SCRMEM_POOL_MAX BIRTHDAY_REMINDER_POOL_SIZE
  488. #endif /* ( CALENDAR_POOL_SIZE > SCRMEM_POOL_MAX ) */ 
  489. /* Unified Composer */
  490. #if ( SCRMEM_UC_POOL_SIZE > SCRMEM_POOL_MAX )
  491. #undef SCRMEM_POOL_MAX
  492. #define SCRMEM_POOL_MAX SCRMEM_UC_POOL_SIZE
  493. #endif /* ( SCRMEM_UC_POOL_SIZE > SCRMEM_POOL_MAX ) */ 
  494. /* PS_EMS */
  495. #if ( EMS_BUFFER_SIZE > SCRMEM_POOL_MAX )
  496. #undef SCRMEM_POOL_MAX
  497. #define SCRMEM_POOL_MAX EMS_BUFFER_SIZE
  498. #endif /* ( EMS_BUFFER_SIZE > SCRMEM_POOL_MAX ) */ 
  499. /* Round to multiple of 4 */
  500. #define SCRMEM_ALIGN_TO_4(_x)  (((_x) + 3) & ~3)
  501. /* Finally, compute MMI_FRM_SCRMEM_POOL_SIZE */
  502. #if (APPLIB_MEM_SCREEN_MIN_POOL_SIZE > SCRMEM_POOL_MAX)
  503.     /* All unregistered screen can use memory up to APPLIB_MEM_SCREEN_MIN_POOL_SIZE 
  504.        Add extra size for overheads of 3 blocks per screen */
  505.     #define MMI_FRM_SCRMEM_POOL_SIZE (APPLIB_MEM_SCREEN_MIN_POOL_SIZE + APPLIB_MEM_GET_POOL_EXTRA_SIZE(3))
  506. #else /* (APPLIB_MEM_SCREEN_MIN_POOL_SIZE > SCRMEM_POOL_MAX) */  
  507.     /* Image viewer may allocate 50 image cache entries */
  508.     #ifdef LOW_COST_SUPPORT    
  509.         #define MMI_FRM_SCRMEM_POOL_SIZE (SCRMEM_ALIGN_TO_4(SCRMEM_POOL_MAX) + APPLIB_MEM_GET_POOL_EXTRA_SIZE(10))
  510.     #else
  511.         #define MMI_FRM_SCRMEM_POOL_SIZE (SCRMEM_ALIGN_TO_4(SCRMEM_POOL_MAX) + APPLIB_MEM_GET_POOL_EXTRA_SIZE(50))
  512.     #endif
  513. #endif /* (APPLIB_MEM_SCREEN_MIN_POOL_SIZE > SCRMEM_POOL_MAX) */ 
  514. /***************************************************************************** 
  515. * Typedef 
  516. *****************************************************************************/
  517. /*****************************************************************************              
  518. * Extern Global Variable                                                                    
  519. *****************************************************************************/
  520. /*****************************************************************************              
  521. * Extern Global Function                                                                    
  522. *****************************************************************************/
  523. #endif /* _SCR_MEM_MGR_H_ */