types.d 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179
  1. /*
  2. Boost Software License - Version 1.0 - August 17th, 2003
  3. Permission is hereby granted, free of charge, to any person or organization
  4. obtaining a copy of the software and accompanying documentation covered by
  5. this license (the "Software") to use, reproduce, display, distribute,
  6. execute, and transmit the Software, and to prepare derivative works of the
  7. Software, and to permit third-parties to whom the Software is furnished to
  8. do so, all subject to the following:
  9. The copyright notices in the Software and this entire statement, including
  10. the above license grant, this restriction and the following disclaimer,
  11. must be included in all copies of the Software, in whole or in part, and
  12. all derivative works of the Software, unless such copies or derivative
  13. works are solely in the form of machine-executable object code generated by
  14. a source language processor.
  15. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  16. IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  17. FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
  18. SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
  19. FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
  20. ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
  21. DEALINGS IN THE SOFTWARE.
  22. */
  23. module derelict.anttweakbar.types;
  24. import core.stdc.config;
  25. alias CTwBar TwBar;
  26. alias ETwType TwType;
  27. alias void function(const(void)*, void*) TwSetVarCallback;
  28. alias void function(void*, void*) TwGetVarCallback;
  29. alias void function(void*) TwButtonCallback;
  30. alias CTwEnumVal TwEnumVal;
  31. alias CTwStructMember TwStructMember;
  32. alias void function(char*, c_ulong, const(void)*, void*) TwSummaryCallback;
  33. alias void function(char**, const(char)*) TwCopyCDStringToClient;
  34. alias ETwParamValueType TwParamValueType;
  35. alias ETwGraphAPI TwGraphAPI;
  36. alias ETwKeyModifier TwKeyModifier;
  37. alias EKeySpecial TwKeySpecial;
  38. alias ETwMouseAction TwMouseAction;
  39. alias ETwMouseButtonID TwMouseButtonID;
  40. alias void function(const(char)*) TwErrorHandler;
  41. alias void function(int, int, int, int) GLUTmousebuttonfun;
  42. alias void function(int, int) GLUTmousemotionfun;
  43. alias void function(ubyte, int, int) GLUTkeyboardfun;
  44. alias void function(int, int, int) GLUTspecialfun;
  45. alias ETwType = int;
  46. enum : ETwType
  47. {
  48. TW_TYPE_UNDEF = 0,
  49. TW_TYPE_BOOL8 = 2,
  50. TW_TYPE_BOOL16 = 3,
  51. TW_TYPE_BOOL32 = 4,
  52. TW_TYPE_CHAR = 5,
  53. TW_TYPE_INT8 = 6,
  54. TW_TYPE_UINT8 = 7,
  55. TW_TYPE_INT16 = 8,
  56. TW_TYPE_UINT16 = 9,
  57. TW_TYPE_INT32 = 10,
  58. TW_TYPE_UINT32 = 11,
  59. TW_TYPE_FLOAT = 12,
  60. TW_TYPE_DOUBLE = 13,
  61. TW_TYPE_COLOR32 = 14,
  62. TW_TYPE_COLOR3F = 15,
  63. TW_TYPE_COLOR4F = 16,
  64. TW_TYPE_CDSTRING = 17,
  65. TW_TYPE_QUAT4F = 19,
  66. TW_TYPE_QUAT4D = 20,
  67. TW_TYPE_DIR3F = 21,
  68. TW_TYPE_DIR3D = 22
  69. }
  70. alias ETwParamValueType = int;
  71. enum : ETwParamValueType
  72. {
  73. TW_PARAM_INT32 = 0,
  74. TW_PARAM_FLOAT = 1,
  75. TW_PARAM_DOUBLE = 2,
  76. TW_PARAM_CSTRING = 3
  77. }
  78. alias ETwGraphAPI = int;
  79. enum : ETwGraphAPI
  80. {
  81. TW_OPENGL = 1,
  82. TW_DIRECT3D9 = 2,
  83. TW_DIRECT3D10 = 3,
  84. TW_DIRECT3D11 = 4,
  85. TW_OPENGL_CORE = 5 // NOTE: Use this one when using a CORE OpenGL profile, TW_OPENGL will not work!
  86. }
  87. alias ETwKeyModifier = int;
  88. enum : ETwKeyModifier
  89. {
  90. TW_KMOD_NONE = 0,
  91. TW_KMOD_SHIFT = 3,
  92. TW_KMOD_CTRL = 192,
  93. TW_KMOD_ALT = 256,
  94. TW_KMOD_META = 3072
  95. }
  96. alias EKeySpecial = int;
  97. enum : EKeySpecial
  98. {
  99. TW_KEY_BACKSPACE = 8,
  100. TW_KEY_TAB = 9,
  101. TW_KEY_CLEAR = 12,
  102. TW_KEY_RETURN = 13,
  103. TW_KEY_PAUSE = 19,
  104. TW_KEY_ESCAPE = 27,
  105. TW_KEY_SPACE = 32,
  106. TW_KEY_DELETE = 127,
  107. TW_KEY_UP = 273,
  108. TW_KEY_DOWN = 274,
  109. TW_KEY_RIGHT = 275,
  110. TW_KEY_LEFT = 276,
  111. TW_KEY_INSERT = 277,
  112. TW_KEY_HOME = 278,
  113. TW_KEY_END = 279,
  114. TW_KEY_PAGE_UP = 280,
  115. TW_KEY_PAGE_DOWN = 281,
  116. TW_KEY_F1 = 282,
  117. TW_KEY_F2 = 283,
  118. TW_KEY_F3 = 284,
  119. TW_KEY_F4 = 285,
  120. TW_KEY_F5 = 286,
  121. TW_KEY_F6 = 287,
  122. TW_KEY_F7 = 288,
  123. TW_KEY_F8 = 289,
  124. TW_KEY_F9 = 290,
  125. TW_KEY_F10 = 291,
  126. TW_KEY_F11 = 292,
  127. TW_KEY_F12 = 293,
  128. TW_KEY_F13 = 294,
  129. TW_KEY_F14 = 295,
  130. TW_KEY_F15 = 296,
  131. TW_KEY_LAST = 297
  132. }
  133. alias ETwMouseAction = int;
  134. enum : ETwMouseAction
  135. {
  136. TW_MOUSE_RELEASED = 0,
  137. TW_MOUSE_PRESSED = 1
  138. }
  139. alias ETwMouseButtonID = int;
  140. enum : ETwMouseButtonID
  141. {
  142. TW_MOUSE_LEFT = 1,
  143. TW_MOUSE_MIDDLE = 2,
  144. TW_MOUSE_RIGHT = 3
  145. }
  146. struct CTwEnumVal
  147. {
  148. int Value;
  149. const(char)*Label;
  150. }
  151. struct CTwStructMember
  152. {
  153. const(char)*Name;
  154. TwType Type;
  155. size_t Offset;
  156. const(char)*DefString;
  157. }
  158. struct CTwBar;