gx_context.h 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  1. /**************************************************************************/
  2. /* */
  3. /* Copyright (c) Microsoft Corporation. All rights reserved. */
  4. /* */
  5. /* This software is licensed under the Microsoft Software License */
  6. /* Terms for Microsoft Azure RTOS. Full text of the license can be */
  7. /* found in the LICENSE file at https://aka.ms/AzureRTOS_EULA */
  8. /* and in the root directory of this software. */
  9. /* */
  10. /**************************************************************************/
  11. /**************************************************************************/
  12. /**************************************************************************/
  13. /** */
  14. /** GUIX Component */
  15. /** */
  16. /** Context Management (Context) */
  17. /** */
  18. /**************************************************************************/
  19. /**************************************************************************/
  20. /**************************************************************************/
  21. /* */
  22. /* COMPONENT DEFINITION RELEASE */
  23. /* */
  24. /* gx_context.h PORTABLE C */
  25. /* 6.0 */
  26. /* AUTHOR */
  27. /* */
  28. /* Kenneth Maxwell, Microsoft Corporation */
  29. /* */
  30. /* DESCRIPTION */
  31. /* */
  32. /* This file defines the GUIX draw context component, including all */
  33. /* data types and external references. It is assumed that gx_api.h */
  34. /* and gx_port.h have already been included. */
  35. /* */
  36. /* RELEASE HISTORY */
  37. /* */
  38. /* DATE NAME DESCRIPTION */
  39. /* */
  40. /* 05-19-2020 Kenneth Maxwell Initial Version 6.0 */
  41. /* */
  42. /**************************************************************************/
  43. #ifndef GX_DRAW_CONTEXT_H
  44. #define GX_DRAW_CONTEXT_H
  45. /* Define context management function prototypes. */
  46. UINT _gx_brush_default(GX_BRUSH *brush);
  47. UINT _gx_brush_define(GX_BRUSH *brush, GX_COLOR line_color, GX_COLOR fill_color, UINT style);
  48. UINT _gx_context_brush_get(GX_BRUSH **return_brush);
  49. UINT _gx_context_brush_set(GX_BRUSH *brush);
  50. UINT _gx_context_brush_default(GX_DRAW_CONTEXT *context);
  51. UINT _gx_context_brush_define(GX_RESOURCE_ID line_color_id, GX_RESOURCE_ID fill_color_id, UINT style);
  52. UINT _gx_context_brush_pattern_set(ULONG pattern);
  53. UINT _gx_context_brush_style_set(UINT style);
  54. UINT _gx_context_brush_width_set(UINT width);
  55. UINT _gx_context_color_get(GX_RESOURCE_ID id, GX_COLOR *color);
  56. UINT _gx_context_fill_color_set(GX_RESOURCE_ID fill_color_id);
  57. UINT _gx_context_font_get(GX_RESOURCE_ID resource_id, GX_FONT **return_font);
  58. UINT _gx_context_font_set(GX_RESOURCE_ID font_id);
  59. UINT _gx_context_line_color_set(GX_RESOURCE_ID line_color_id);
  60. UINT _gx_context_pixelmap_get(GX_RESOURCE_ID resource_id, GX_PIXELMAP **return_pixelmap);
  61. UINT _gx_context_pixelmap_set(GX_RESOURCE_ID pixelmap_id);
  62. /* functins for defining brush using r:g:b color description */
  63. UINT _gx_context_raw_brush_define(GX_COLOR line_color, GX_COLOR fill_color, UINT style);
  64. UINT _gx_context_raw_fill_color_set(GX_COLOR line_color);
  65. UINT _gx_context_raw_line_color_set(GX_COLOR line_color);
  66. #if defined(GX_ENABLE_DEPRECATED_STRING_API)
  67. UINT _gx_context_string_get(GX_RESOURCE_ID string_id, GX_CONST GX_CHAR **return_string);
  68. #endif
  69. UINT _gx_context_string_get_ext(GX_RESOURCE_ID resource_id, GX_STRING *return_string);
  70. /* Define error checking shells for API services. These are only referenced by the
  71. application. */
  72. UINT _gxe_brush_define(GX_BRUSH *brush, GX_COLOR line_color, GX_COLOR fill_color, UINT style);
  73. UINT _gxe_brush_default(GX_BRUSH *brush);
  74. UINT _gxe_context_brush_default(GX_DRAW_CONTEXT *context);
  75. UINT _gxe_context_brush_define(GX_RESOURCE_ID line_color_id, GX_RESOURCE_ID fill_color_id, UINT style);
  76. UINT _gxe_context_brush_get(GX_BRUSH **return_brush);
  77. UINT _gxe_context_brush_set(GX_BRUSH *brush);
  78. UINT _gxe_context_brush_pattern_set(ULONG pattern);
  79. UINT _gxe_context_brush_style_set(UINT style);
  80. UINT _gxe_context_brush_width_set(UINT width);
  81. UINT _gxe_context_color_get(GX_RESOURCE_ID color_id, GX_COLOR *return_color);
  82. UINT _gxe_context_fill_color_set(GX_RESOURCE_ID fill_color_id);
  83. UINT _gxe_context_font_set(GX_RESOURCE_ID font_id);
  84. UINT _gxe_context_font_get(GX_RESOURCE_ID resource_id, GX_FONT **return_font);
  85. UINT _gxe_context_line_color_set(GX_RESOURCE_ID line_color_id);
  86. UINT _gxe_context_pixelmap_get(GX_RESOURCE_ID resource_id, GX_PIXELMAP **return_pixelmap);
  87. UINT _gxe_context_pixelmap_set(GX_RESOURCE_ID pixelmap_id);
  88. UINT _gxe_context_raw_brush_define(GX_COLOR line_color, GX_COLOR fill_color, UINT style);
  89. UINT _gxe_context_raw_fill_color_set(GX_COLOR line_color);
  90. UINT _gxe_context_raw_line_color_set(GX_COLOR line_color);
  91. #if defined(GX_ENABLE_DEPRECATED_STRING_API)
  92. UINT _gxe_context_string_get(GX_RESOURCE_ID string_id, GX_CONST GX_CHAR **return_string);
  93. #endif
  94. UINT _gxe_context_string_get_ext(GX_RESOURCE_ID string_id, GX_STRING *return_string);
  95. #endif