temp.bgfx.h 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136
  1. /*
  2. * Copyright 2011-2019 Branimir Karadzic. All rights reserved.
  3. * License: https://github.com/bkaradzic/bgfx/blob/master/LICENSE
  4. *
  5. * vim: set tabstop=4 expandtab:
  6. */
  7. /*
  8. *
  9. * AUTO GENERATED! DO NOT EDIT! ( source : $source )
  10. *
  11. */
  12. #ifndef BGFX_C99_H_HEADER_GUARD
  13. #define BGFX_C99_H_HEADER_GUARD
  14. #include <stdarg.h> // va_list
  15. #include <stdbool.h> // bool
  16. #include <stdint.h> // uint32_t
  17. #include <stdlib.h> // size_t
  18. #include <bx/platform.h>
  19. #if !defined(BGFX_INVALID_HANDLE)
  20. # define BGFX_INVALID_HANDLE { UINT16_MAX }
  21. #endif // !defined(BGFX_INVALID_HANDLE)
  22. #ifndef BGFX_SHARED_LIB_BUILD
  23. # define BGFX_SHARED_LIB_BUILD 0
  24. #endif // BGFX_SHARED_LIB_BUILD
  25. #ifndef BGFX_SHARED_LIB_USE
  26. # define BGFX_SHARED_LIB_USE 0
  27. #endif // BGFX_SHARED_LIB_USE
  28. #if BX_PLATFORM_WINDOWS
  29. # define BGFX_SYMBOL_EXPORT __declspec(dllexport)
  30. # define BGFX_SYMBOL_IMPORT __declspec(dllimport)
  31. #else
  32. # define BGFX_SYMBOL_EXPORT __attribute__((visibility("default")))
  33. # define BGFX_SYMBOL_IMPORT
  34. #endif // BX_PLATFORM_WINDOWS
  35. #if BGFX_SHARED_LIB_BUILD
  36. # define BGFX_SHARED_LIB_API BGFX_SYMBOL_EXPORT
  37. #elif BGFX_SHARED_LIB_USE
  38. # define BGFX_SHARED_LIB_API BGFX_SYMBOL_IMPORT
  39. #else
  40. # define BGFX_SHARED_LIB_API
  41. #endif // BGFX_SHARED_LIB_*
  42. #if defined(__cplusplus)
  43. # define BGFX_C_API extern "C" BGFX_SHARED_LIB_API
  44. #else
  45. # define BGFX_C_API BGFX_SHARED_LIB_API
  46. #endif // defined(__cplusplus)
  47. #include "../defines.h"
  48. $cenums
  49. /**/
  50. typedef uint16_t bgfx_view_id_t;
  51. /**/
  52. typedef struct bgfx_allocator_interface_s
  53. {
  54. const struct bgfx_allocator_vtbl_s* vtbl;
  55. } bgfx_allocator_interface_t;
  56. /**/
  57. typedef struct bgfx_allocator_vtbl_s
  58. {
  59. void* (*realloc)(bgfx_allocator_interface_t* _this, void* _ptr, size_t _size, size_t _align, const char* _file, uint32_t _line);
  60. } bgfx_allocator_vtbl_t;
  61. /**/
  62. typedef struct bgfx_interface_vtbl bgfx_interface_vtbl_t;
  63. /**/
  64. typedef struct bgfx_callback_interface_s
  65. {
  66. const struct bgfx_callback_vtbl_s* vtbl;
  67. } bgfx_callback_interface_t;
  68. /**/
  69. typedef struct bgfx_callback_vtbl_s
  70. {
  71. void (*fatal)(bgfx_callback_interface_t* _this, const char* _filePath, uint16_t _line, bgfx_fatal_t _code, const char* _str);
  72. void (*trace_vargs)(bgfx_callback_interface_t* _this, const char* _filePath, uint16_t _line, const char* _format, va_list _argList);
  73. void (*profiler_begin)(bgfx_callback_interface_t* _this, const char* _name, uint32_t _abgr, const char* _filePath, uint16_t _line);
  74. void (*profiler_begin_literal)(bgfx_callback_interface_t* _this, const char* _name, uint32_t _abgr, const char* _filePath, uint16_t _line);
  75. void (*profiler_end)(bgfx_callback_interface_t* _this);
  76. uint32_t (*cache_read_size)(bgfx_callback_interface_t* _this, uint64_t _id);
  77. bool (*cache_read)(bgfx_callback_interface_t* _this, uint64_t _id, void* _data, uint32_t _size);
  78. void (*cache_write)(bgfx_callback_interface_t* _this, uint64_t _id, const void* _data, uint32_t _size);
  79. void (*screen_shot)(bgfx_callback_interface_t* _this, const char* _filePath, uint32_t _width, uint32_t _height, uint32_t _pitch, const void* _data, uint32_t _size, bool _yflip);
  80. void (*capture_begin)(bgfx_callback_interface_t* _this, uint32_t _width, uint32_t _height, uint32_t _pitch, bgfx_texture_format_t _format, bool _yflip);
  81. void (*capture_end)(bgfx_callback_interface_t* _this);
  82. void (*capture_frame)(bgfx_callback_interface_t* _this, const void* _data, uint32_t _size);
  83. } bgfx_callback_vtbl_t;
  84. $chandles
  85. $cfuncptrs
  86. $cstructs
  87. $c99decl
  88. /**/
  89. typedef enum bgfx_function_id
  90. {
  91. $c99_functionid
  92. BGFX_FUNCTION_ID_COUNT
  93. } bgfx_function_id_t;
  94. /**/
  95. struct bgfx_interface_vtbl
  96. {
  97. $interface_struct
  98. };
  99. /**/
  100. typedef bgfx_interface_vtbl_t* (*PFN_BGFX_GET_INTERFACE)(uint32_t _version);
  101. /**/
  102. BGFX_C_API bgfx_interface_vtbl_t* bgfx_get_interface(uint32_t _version);
  103. #endif // BGFX_C99_H_HEADER_GUARD