gui_engine.h 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. /** @file
  2. * Header file for GUI engine.
  3. *
  4. * @author mandy.wu 2010/06/25
  5. * @version 0.1
  6. */
  7. #ifndef __GUI_ENGINE__
  8. #define __GUI_ENGINE__
  9. #include <stdlib.h>
  10. #include <string.h>
  11. #include "gui_eng/stddefs.h"
  12. #include "gui_eng/region.h"
  13. /* Header files of GUI engine */
  14. #include "gui_eng/gel_struct.h"
  15. #include "gui_eng/datatypes.h"
  16. #include "gui_eng/font_common.h"
  17. #include "gui_eng/device_gdi.h"
  18. #include "gui_eng/windef.h"
  19. #include "gui_eng/wingdi.h"
  20. #include "gui_eng/windev.h"
  21. #include "gui_eng/windraw.h"
  22. #include "gui_eng/device_font.h"
  23. #include "gui_eng/cc_font.h"
  24. #include "gui_eng/font_code_translate.h"
  25. #include "gui_eng/gel_main.h"
  26. #include "gui_eng/gel_region.h"
  27. #include "gui_eng/gel_control.h"
  28. #include "gui_eng/gel_text.h"
  29. #include "gui_eng/gel_subtitle.h"
  30. #include "gui_eng/gel_drawing.h"
  31. #include "geng_setting.h"
  32. #define GUI_ENGINE_VERSION (0x6020926a) // v6.1.4.550 -> 4 8 8 12
  33. /* This macro defines for supporting APP control update the OSD time point
  34. * Open the macro APP should call GEL_UpdateOSD to upate UI widget to panle
  35. */
  36. #define SUPPORT_NEW_UPDATE_OSD
  37. /* OSD related definition */
  38. #define GEL_PAL_ENTRY_NUM (256) // GEL palette entry number
  39. #define GEL_MAX_SURF_WIDTH (4096) // GEL max buffer width limitation
  40. #define GEL_MAX_SURF_HEIGHT (4096) // GEL max buffer height limitation
  41. #define GEL_SUB_MAX_TOTAL_LINE (20) // GEL subtitle max lines in each position
  42. /* Font buffer */
  43. #define STRING_BITMAP_BUF_SIZE (300 * 1024) //300KB
  44. /* This macro defines the default region transparency (0~255) */
  45. #define DEFAULT_TRANSPARENCY (255)
  46. //--
  47. /* Bitmap COMMON/LOCAL flag*/
  48. #define LOCAL_ICON_ID_MASK 0x0000
  49. #define COMMON_ICON_ID_MASK 0x4000
  50. #ifdef CONFIG_FONT_ENGINE_HARFBUZZ
  51. #define GET_UI_FONT_INFO(sizeIdx, pointer, bmpSize, style) \
  52. {(UINT8*)NULL, style, sizeIdx, bmpSize},
  53. #else
  54. #define GET_UI_FONT_INFO(sizeIdx, pointer, bmpSize, style) \
  55. {(UINT8*)pointer, style, sizeIdx, bmpSize},
  56. #endif
  57. #define GET_OSD_STR_INFO(arrayaddress, useLang) \
  58. (UINT8 **)arrayaddress,
  59. /* Global variables */
  60. /* Region */
  61. /* Font */
  62. extern FONTInfo_t *gUIFontRes; // Root UI font resouce
  63. extern UINT32 gDefaultStrType;
  64. extern UINT32 gUIFontStyleNum; // Font size num of the UI fontbase
  65. //extern DrawPoint_e gFontDrawPointStyle;
  66. extern const Color_t gDFontFgColor; // Deault font foreground color
  67. extern const Color_t gDFontBgColor; // Default font background color
  68. /* Others */
  69. //--
  70. extern IMAGEHDR *gUIBmpRes; // Root UI bitmap resource
  71. /* Animation */
  72. #define MAX_ANIM_NUMBER (20)
  73. extern UINT32 gAnimCnt;
  74. /* Render */
  75. #define MIN_RENDER_FPS (1)
  76. #define MAX_RENDER_FPS (15)
  77. #define DEFAULT_MARQUEE_FPS (2)
  78. #define DEFAULT_TWINKLE_PERIOD (10) //0.5s
  79. extern UINT8 gMarqueeFps;
  80. extern UINT8 gMarqueeInterval; // Update interval to record how many times to update once
  81. extern INT16 g_marqStep;
  82. #endif /* __GUI_ENGINE__ */