gx_binres_loader.h 5.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  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. /** Binres Loader Management (Binres Loader) */
  17. /** */
  18. /**************************************************************************/
  19. /**************************************************************************/
  20. /**************************************************************************/
  21. /* */
  22. /* COMPONENT DEFINITION RELEASE */
  23. /* */
  24. /* gx_binres_loader.h PORTABLE C */
  25. /* 6.0 */
  26. /* AUTHOR */
  27. /* */
  28. /* Kenneth Maxwell, Microsoft Corporation */
  29. /* */
  30. /* DESCRIPTION */
  31. /* */
  32. /* This file defines the GUIX binres loader component, */
  33. /* including all data types and external references. It is assumed */
  34. /* that gx_api.h 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_BINRES_LOADER_H
  44. #define GX_BINRES_LOADER_H
  45. #define GX_BINRES_VERSION_ADD_STRING_LENGTH 50600
  46. #ifdef GX_BINARY_RESOURCE_SUPPORT
  47. typedef struct GX_BINRES_DATA_INFO_STRUCT
  48. {
  49. GX_UBYTE *gx_binres_root_address;
  50. UINT gx_binres_read_offset;
  51. GX_UBYTE *gx_binres_buffer;
  52. UINT gx_binres_buffer_size;
  53. UINT gx_binres_buffer_index;
  54. } GX_BINRES_DATA_INFO;
  55. /* Define utility component function prototypes. */
  56. UINT _gx_binres_language_count_get(GX_UBYTE *root_address, GX_VALUE *put_count);
  57. UINT _gx_binres_language_info_load(GX_UBYTE *root_address, GX_LANGUAGE_HEADER *put_info);
  58. #if defined(GX_ENABLE_DEPRECATED_STRING_API)
  59. UINT _gx_binres_language_table_load(GX_UBYTE *root_address, GX_UBYTE ****returned_language_table);
  60. #endif
  61. UINT _gx_binres_language_table_load_ext(GX_UBYTE *root_address, GX_STRING ***returned_language_table);
  62. UINT _gx_binres_theme_load(GX_UBYTE *root_address, INT theme_id, GX_THEME **returned_theme);
  63. UINT _gx_binres_resource_header_load(GX_BINRES_DATA_INFO *info, GX_RESOURCE_HEADER *header);
  64. UINT _gx_binres_string_header_load(GX_BINRES_DATA_INFO *info, GX_STRING_HEADER *header);
  65. UINT _gx_binres_language_header_load(GX_BINRES_DATA_INFO *info, GX_LANGUAGE_HEADER *header);
  66. /* Define error checking shells for API services. These are only referenced by the
  67. application. */
  68. UINT _gxe_binres_language_count_get(GX_UBYTE *root_address, GX_VALUE *put_count);
  69. UINT _gxe_binres_language_info_load(GX_UBYTE *root_address, GX_LANGUAGE_HEADER *put_info);
  70. #if defined(GX_ENABLE_DEPRECATED_STRING_API)
  71. UINT _gxe_binres_language_table_load(GX_UBYTE *root_address, GX_UBYTE ****returned_language_table);
  72. #endif
  73. UINT _gxe_binres_language_table_load_ext(GX_UBYTE *root_address, GX_STRING ***returned_language_table);
  74. UINT _gxe_binres_theme_load(GX_UBYTE *root_address, INT theme_id, GX_THEME **returned_theme);
  75. #endif
  76. #endif