gel_struct.h 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. /** @file
  2. * Header file for GEL structure definition.
  3. *
  4. * @author mandy.wu 2010/03/31
  5. * @version 0.1
  6. */
  7. #ifndef __GEL_STRUCT__
  8. #define __GEL_STRUCT__
  9. #include "gui_eng/stddefs.h"
  10. typedef INT32 GEL_RgnHandle_t;
  11. typedef UINT8 GEL_AAEntry_t;
  12. /** Structure of color with RGBA. Color index used by LUT8/LUT4 should be filled in 'a' member. */
  13. typedef struct {
  14. UINT8 r;
  15. UINT8 g;
  16. UINT8 b;
  17. UINT8 a;
  18. } GEL_Color_t;
  19. /** Types of pixel format. */
  20. typedef enum {
  21. GEL_PF_RGB16, /**< 16 bit RGB (2 byte, red 5\@11, green 6\@5, blue 5\@0) */
  22. GEL_PF_RGB32, /**< 24 bit RGB (4 byte, nothing\@24, red 8\@16, green 8\@8, blue 8\@0) */
  23. GEL_PF_ARGB8565, /**< 24 bit RGB (4 byte, nothing\@24, red 8\@16, green 8\@8, blue 8\@0) */
  24. GEL_PF_ARGB4444, /**< 16 bit ARGB (2 byte, alpha 4\@12, red 4\@8, green 4\@4, blue 4\@0) */
  25. GEL_PF_ARGB1555, /**< 16 bit ARGB (2 byte, alpha 1\@15, red 5\@10, green 5\@5, blue 5\@0) */
  26. GEL_PF_ARGB, /**< 32 bit ARGB (4 byte, alpha 8\@24, red 8\@16, green 8\@8, blue 8\@0) */
  27. GEL_PF_LUT8, /**< 8 bit LUT (8 bit color and alpha lookup from a palette) */
  28. GEL_PF_LUT4, /**< 4 bit LUT (4 bit color and alpha lookup from a palette) */
  29. GEL_PF_LAST
  30. } GEL_PixelFormat_e;
  31. /** Structure of an entry of palette. */
  32. typedef struct {
  33. UINT8 a;
  34. UINT8 r;
  35. UINT8 g;
  36. UINT8 b;
  37. } GEL_Palette_t;
  38. /** Structure of bitmap handle. */
  39. typedef struct {
  40. void *pAddr; /**< pointer to the bitmap data */
  41. GEL_Palette_t *pPal; /**< pointer to a palette for the bmp */
  42. UINT16 wWidth; /**< bmp width in pixels */
  43. UINT16 wHeight; /**< bmp height in pixels */
  44. GEL_PixelFormat_e eFormat; /**< pixel format of the bmp, see GEL_PixelFormat_e */
  45. UINT16 wPalFirst; /**< the start index of a palette to reference by the bitmap */
  46. UINT16 wColCount; /**< the color count to describe a bitmap */
  47. } GEL_BitmapHandle_t;
  48. /** Layers support for GUI engine. */
  49. typedef enum {
  50. GEL_ICON_ROTATE_NONE = 0x0,
  51. GEL_ICON_ROTATE_90 = 0x1,
  52. GEL_ICON_ROTATE_180 = 0x2,
  53. GEL_ICON_ROTATE_270 = 0x4,
  54. GEL_ICON_MIRROR = 0x10,
  55. GEL_ICON_FLIP = 0x20,
  56. } GEL_IconRotate_e;
  57. typedef enum {
  58. GPU_DRAM_A = 0,
  59. GPU_DRAM_B = 1
  60. } GPUDramSel_e;
  61. #endif /* __GEL_STRUCT__ */