global_constants.cpp 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610
  1. /*************************************************************************/
  2. /* global_constants.cpp */
  3. /*************************************************************************/
  4. /* This file is part of: */
  5. /* GODOT ENGINE */
  6. /* https://godotengine.org */
  7. /*************************************************************************/
  8. /* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
  9. /* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
  10. /* */
  11. /* Permission is hereby granted, free of charge, to any person obtaining */
  12. /* a copy of this software and associated documentation files (the */
  13. /* "Software") to deal in the Software without restriction, including */
  14. /* without limitation the rights to use, copy, modify, merge, publish, */
  15. /* distribute, sublicense, and/or sell copies of the Software, and to */
  16. /* permit persons to whom the Software is furnished to do so, subject to */
  17. /* the following conditions: */
  18. /* */
  19. /* The above copyright notice and this permission notice shall be */
  20. /* included in all copies or substantial portions of the Software. */
  21. /* */
  22. /* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
  23. /* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
  24. /* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
  25. /* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
  26. /* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
  27. /* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
  28. /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
  29. /*************************************************************************/
  30. #include "global_constants.h"
  31. #include "object.h"
  32. #include "os/input_event.h"
  33. #include "os/keyboard.h"
  34. #include "variant.h"
  35. struct _GlobalConstant {
  36. #ifdef DEBUG_METHODS_ENABLED
  37. StringName enum_name;
  38. #endif
  39. const char *name;
  40. int value;
  41. _GlobalConstant() {}
  42. #ifdef DEBUG_METHODS_ENABLED
  43. _GlobalConstant(const StringName &p_enum_name, const char *p_name, int p_value)
  44. : enum_name(p_enum_name),
  45. name(p_name),
  46. value(p_value) {
  47. }
  48. #else
  49. _GlobalConstant(const char *p_name, int p_value)
  50. : name(p_name),
  51. value(p_value) {
  52. }
  53. #endif
  54. };
  55. static Vector<_GlobalConstant> _global_constants;
  56. #ifdef DEBUG_METHODS_ENABLED
  57. #define BIND_GLOBAL_CONSTANT(m_constant) \
  58. _global_constants.push_back(_GlobalConstant(StringName(), #m_constant, m_constant));
  59. #define BIND_GLOBAL_ENUM_CONSTANT(m_constant) \
  60. _global_constants.push_back(_GlobalConstant(__constant_get_enum_name(m_constant, #m_constant), #m_constant, m_constant));
  61. #define BIND_GLOBAL_ENUM_CONSTANT_CUSTOM(m_custom_name, m_constant) \
  62. _global_constants.push_back(_GlobalConstant(__constant_get_enum_name(m_constant, #m_constant), m_custom_name, m_constant));
  63. #else
  64. #define BIND_GLOBAL_CONSTANT(m_constant) \
  65. _global_constants.push_back(_GlobalConstant(#m_constant, m_constant));
  66. #define BIND_GLOBAL_ENUM_CONSTANT(m_constant) \
  67. _global_constants.push_back(_GlobalConstant(#m_constant, m_constant));
  68. #define BIND_GLOBAL_ENUM_CONSTANT_CUSTOM(m_custom_name, m_constant) \
  69. _global_constants.push_back(_GlobalConstant(m_custom_name, m_constant));
  70. #endif
  71. VARIANT_ENUM_CAST(KeyList);
  72. VARIANT_ENUM_CAST(KeyModifierMask);
  73. VARIANT_ENUM_CAST(ButtonList);
  74. VARIANT_ENUM_CAST(JoystickList);
  75. void register_global_constants() {
  76. //{ KEY_BACKSPACE, VK_BACK },// (0x08) // backspace
  77. BIND_GLOBAL_ENUM_CONSTANT(MARGIN_LEFT);
  78. BIND_GLOBAL_ENUM_CONSTANT(MARGIN_TOP);
  79. BIND_GLOBAL_ENUM_CONSTANT(MARGIN_RIGHT);
  80. BIND_GLOBAL_ENUM_CONSTANT(MARGIN_BOTTOM);
  81. BIND_GLOBAL_ENUM_CONSTANT(VERTICAL);
  82. BIND_GLOBAL_ENUM_CONSTANT(HORIZONTAL);
  83. BIND_GLOBAL_ENUM_CONSTANT(HALIGN_LEFT);
  84. BIND_GLOBAL_ENUM_CONSTANT(HALIGN_CENTER);
  85. BIND_GLOBAL_ENUM_CONSTANT(HALIGN_RIGHT);
  86. BIND_GLOBAL_ENUM_CONSTANT(VALIGN_TOP);
  87. BIND_GLOBAL_ENUM_CONSTANT(VALIGN_CENTER);
  88. BIND_GLOBAL_ENUM_CONSTANT(VALIGN_BOTTOM);
  89. // hueg list of keys
  90. BIND_GLOBAL_CONSTANT(SPKEY);
  91. BIND_GLOBAL_ENUM_CONSTANT(KEY_ESCAPE);
  92. BIND_GLOBAL_ENUM_CONSTANT(KEY_TAB);
  93. BIND_GLOBAL_ENUM_CONSTANT(KEY_BACKTAB);
  94. BIND_GLOBAL_ENUM_CONSTANT(KEY_BACKSPACE);
  95. BIND_GLOBAL_ENUM_CONSTANT(KEY_ENTER);
  96. BIND_GLOBAL_ENUM_CONSTANT(KEY_KP_ENTER);
  97. BIND_GLOBAL_ENUM_CONSTANT(KEY_INSERT);
  98. BIND_GLOBAL_ENUM_CONSTANT(KEY_DELETE);
  99. BIND_GLOBAL_ENUM_CONSTANT(KEY_PAUSE);
  100. BIND_GLOBAL_ENUM_CONSTANT(KEY_PRINT);
  101. BIND_GLOBAL_ENUM_CONSTANT(KEY_SYSREQ);
  102. BIND_GLOBAL_ENUM_CONSTANT(KEY_CLEAR);
  103. BIND_GLOBAL_ENUM_CONSTANT(KEY_HOME);
  104. BIND_GLOBAL_ENUM_CONSTANT(KEY_END);
  105. BIND_GLOBAL_ENUM_CONSTANT(KEY_LEFT);
  106. BIND_GLOBAL_ENUM_CONSTANT(KEY_UP);
  107. BIND_GLOBAL_ENUM_CONSTANT(KEY_RIGHT);
  108. BIND_GLOBAL_ENUM_CONSTANT(KEY_DOWN);
  109. BIND_GLOBAL_ENUM_CONSTANT(KEY_PAGEUP);
  110. BIND_GLOBAL_ENUM_CONSTANT(KEY_PAGEDOWN);
  111. BIND_GLOBAL_ENUM_CONSTANT(KEY_SHIFT);
  112. BIND_GLOBAL_ENUM_CONSTANT(KEY_CONTROL);
  113. BIND_GLOBAL_ENUM_CONSTANT(KEY_META);
  114. BIND_GLOBAL_ENUM_CONSTANT(KEY_ALT);
  115. BIND_GLOBAL_ENUM_CONSTANT(KEY_CAPSLOCK);
  116. BIND_GLOBAL_ENUM_CONSTANT(KEY_NUMLOCK);
  117. BIND_GLOBAL_ENUM_CONSTANT(KEY_SCROLLLOCK);
  118. BIND_GLOBAL_ENUM_CONSTANT(KEY_F1);
  119. BIND_GLOBAL_ENUM_CONSTANT(KEY_F2);
  120. BIND_GLOBAL_ENUM_CONSTANT(KEY_F3);
  121. BIND_GLOBAL_ENUM_CONSTANT(KEY_F4);
  122. BIND_GLOBAL_ENUM_CONSTANT(KEY_F5);
  123. BIND_GLOBAL_ENUM_CONSTANT(KEY_F6);
  124. BIND_GLOBAL_ENUM_CONSTANT(KEY_F7);
  125. BIND_GLOBAL_ENUM_CONSTANT(KEY_F8);
  126. BIND_GLOBAL_ENUM_CONSTANT(KEY_F9);
  127. BIND_GLOBAL_ENUM_CONSTANT(KEY_F10);
  128. BIND_GLOBAL_ENUM_CONSTANT(KEY_F11);
  129. BIND_GLOBAL_ENUM_CONSTANT(KEY_F12);
  130. BIND_GLOBAL_ENUM_CONSTANT(KEY_F13);
  131. BIND_GLOBAL_ENUM_CONSTANT(KEY_F14);
  132. BIND_GLOBAL_ENUM_CONSTANT(KEY_F15);
  133. BIND_GLOBAL_ENUM_CONSTANT(KEY_F16);
  134. BIND_GLOBAL_ENUM_CONSTANT(KEY_KP_MULTIPLY);
  135. BIND_GLOBAL_ENUM_CONSTANT(KEY_KP_DIVIDE);
  136. BIND_GLOBAL_ENUM_CONSTANT(KEY_KP_SUBTRACT);
  137. BIND_GLOBAL_ENUM_CONSTANT(KEY_KP_PERIOD);
  138. BIND_GLOBAL_ENUM_CONSTANT(KEY_KP_ADD);
  139. BIND_GLOBAL_ENUM_CONSTANT(KEY_KP_0);
  140. BIND_GLOBAL_ENUM_CONSTANT(KEY_KP_1);
  141. BIND_GLOBAL_ENUM_CONSTANT(KEY_KP_2);
  142. BIND_GLOBAL_ENUM_CONSTANT(KEY_KP_3);
  143. BIND_GLOBAL_ENUM_CONSTANT(KEY_KP_4);
  144. BIND_GLOBAL_ENUM_CONSTANT(KEY_KP_5);
  145. BIND_GLOBAL_ENUM_CONSTANT(KEY_KP_6);
  146. BIND_GLOBAL_ENUM_CONSTANT(KEY_KP_7);
  147. BIND_GLOBAL_ENUM_CONSTANT(KEY_KP_8);
  148. BIND_GLOBAL_ENUM_CONSTANT(KEY_KP_9);
  149. BIND_GLOBAL_ENUM_CONSTANT(KEY_SUPER_L);
  150. BIND_GLOBAL_ENUM_CONSTANT(KEY_SUPER_R);
  151. BIND_GLOBAL_ENUM_CONSTANT(KEY_MENU);
  152. BIND_GLOBAL_ENUM_CONSTANT(KEY_HYPER_L);
  153. BIND_GLOBAL_ENUM_CONSTANT(KEY_HYPER_R);
  154. BIND_GLOBAL_ENUM_CONSTANT(KEY_HELP);
  155. BIND_GLOBAL_ENUM_CONSTANT(KEY_DIRECTION_L);
  156. BIND_GLOBAL_ENUM_CONSTANT(KEY_DIRECTION_R);
  157. BIND_GLOBAL_ENUM_CONSTANT(KEY_BACK);
  158. BIND_GLOBAL_ENUM_CONSTANT(KEY_FORWARD);
  159. BIND_GLOBAL_ENUM_CONSTANT(KEY_STOP);
  160. BIND_GLOBAL_ENUM_CONSTANT(KEY_REFRESH);
  161. BIND_GLOBAL_ENUM_CONSTANT(KEY_VOLUMEDOWN);
  162. BIND_GLOBAL_ENUM_CONSTANT(KEY_VOLUMEMUTE);
  163. BIND_GLOBAL_ENUM_CONSTANT(KEY_VOLUMEUP);
  164. BIND_GLOBAL_ENUM_CONSTANT(KEY_BASSBOOST);
  165. BIND_GLOBAL_ENUM_CONSTANT(KEY_BASSUP);
  166. BIND_GLOBAL_ENUM_CONSTANT(KEY_BASSDOWN);
  167. BIND_GLOBAL_ENUM_CONSTANT(KEY_TREBLEUP);
  168. BIND_GLOBAL_ENUM_CONSTANT(KEY_TREBLEDOWN);
  169. BIND_GLOBAL_ENUM_CONSTANT(KEY_MEDIAPLAY);
  170. BIND_GLOBAL_ENUM_CONSTANT(KEY_MEDIASTOP);
  171. BIND_GLOBAL_ENUM_CONSTANT(KEY_MEDIAPREVIOUS);
  172. BIND_GLOBAL_ENUM_CONSTANT(KEY_MEDIANEXT);
  173. BIND_GLOBAL_ENUM_CONSTANT(KEY_MEDIARECORD);
  174. BIND_GLOBAL_ENUM_CONSTANT(KEY_HOMEPAGE);
  175. BIND_GLOBAL_ENUM_CONSTANT(KEY_FAVORITES);
  176. BIND_GLOBAL_ENUM_CONSTANT(KEY_SEARCH);
  177. BIND_GLOBAL_ENUM_CONSTANT(KEY_STANDBY);
  178. BIND_GLOBAL_ENUM_CONSTANT(KEY_OPENURL);
  179. BIND_GLOBAL_ENUM_CONSTANT(KEY_LAUNCHMAIL);
  180. BIND_GLOBAL_ENUM_CONSTANT(KEY_LAUNCHMEDIA);
  181. BIND_GLOBAL_ENUM_CONSTANT(KEY_LAUNCH0);
  182. BIND_GLOBAL_ENUM_CONSTANT(KEY_LAUNCH1);
  183. BIND_GLOBAL_ENUM_CONSTANT(KEY_LAUNCH2);
  184. BIND_GLOBAL_ENUM_CONSTANT(KEY_LAUNCH3);
  185. BIND_GLOBAL_ENUM_CONSTANT(KEY_LAUNCH4);
  186. BIND_GLOBAL_ENUM_CONSTANT(KEY_LAUNCH5);
  187. BIND_GLOBAL_ENUM_CONSTANT(KEY_LAUNCH6);
  188. BIND_GLOBAL_ENUM_CONSTANT(KEY_LAUNCH7);
  189. BIND_GLOBAL_ENUM_CONSTANT(KEY_LAUNCH8);
  190. BIND_GLOBAL_ENUM_CONSTANT(KEY_LAUNCH9);
  191. BIND_GLOBAL_ENUM_CONSTANT(KEY_LAUNCHA);
  192. BIND_GLOBAL_ENUM_CONSTANT(KEY_LAUNCHB);
  193. BIND_GLOBAL_ENUM_CONSTANT(KEY_LAUNCHC);
  194. BIND_GLOBAL_ENUM_CONSTANT(KEY_LAUNCHD);
  195. BIND_GLOBAL_ENUM_CONSTANT(KEY_LAUNCHE);
  196. BIND_GLOBAL_ENUM_CONSTANT(KEY_LAUNCHF);
  197. BIND_GLOBAL_ENUM_CONSTANT(KEY_UNKNOWN);
  198. BIND_GLOBAL_ENUM_CONSTANT(KEY_SPACE);
  199. BIND_GLOBAL_ENUM_CONSTANT(KEY_EXCLAM);
  200. BIND_GLOBAL_ENUM_CONSTANT(KEY_QUOTEDBL);
  201. BIND_GLOBAL_ENUM_CONSTANT(KEY_NUMBERSIGN);
  202. BIND_GLOBAL_ENUM_CONSTANT(KEY_DOLLAR);
  203. BIND_GLOBAL_ENUM_CONSTANT(KEY_PERCENT);
  204. BIND_GLOBAL_ENUM_CONSTANT(KEY_AMPERSAND);
  205. BIND_GLOBAL_ENUM_CONSTANT(KEY_APOSTROPHE);
  206. BIND_GLOBAL_ENUM_CONSTANT(KEY_PARENLEFT);
  207. BIND_GLOBAL_ENUM_CONSTANT(KEY_PARENRIGHT);
  208. BIND_GLOBAL_ENUM_CONSTANT(KEY_ASTERISK);
  209. BIND_GLOBAL_ENUM_CONSTANT(KEY_PLUS);
  210. BIND_GLOBAL_ENUM_CONSTANT(KEY_COMMA);
  211. BIND_GLOBAL_ENUM_CONSTANT(KEY_MINUS);
  212. BIND_GLOBAL_ENUM_CONSTANT(KEY_PERIOD);
  213. BIND_GLOBAL_ENUM_CONSTANT(KEY_SLASH);
  214. BIND_GLOBAL_ENUM_CONSTANT(KEY_0);
  215. BIND_GLOBAL_ENUM_CONSTANT(KEY_1);
  216. BIND_GLOBAL_ENUM_CONSTANT(KEY_2);
  217. BIND_GLOBAL_ENUM_CONSTANT(KEY_3);
  218. BIND_GLOBAL_ENUM_CONSTANT(KEY_4);
  219. BIND_GLOBAL_ENUM_CONSTANT(KEY_5);
  220. BIND_GLOBAL_ENUM_CONSTANT(KEY_6);
  221. BIND_GLOBAL_ENUM_CONSTANT(KEY_7);
  222. BIND_GLOBAL_ENUM_CONSTANT(KEY_8);
  223. BIND_GLOBAL_ENUM_CONSTANT(KEY_9);
  224. BIND_GLOBAL_ENUM_CONSTANT(KEY_COLON);
  225. BIND_GLOBAL_ENUM_CONSTANT(KEY_SEMICOLON);
  226. BIND_GLOBAL_ENUM_CONSTANT(KEY_LESS);
  227. BIND_GLOBAL_ENUM_CONSTANT(KEY_EQUAL);
  228. BIND_GLOBAL_ENUM_CONSTANT(KEY_GREATER);
  229. BIND_GLOBAL_ENUM_CONSTANT(KEY_QUESTION);
  230. BIND_GLOBAL_ENUM_CONSTANT(KEY_AT);
  231. BIND_GLOBAL_ENUM_CONSTANT(KEY_A);
  232. BIND_GLOBAL_ENUM_CONSTANT(KEY_B);
  233. BIND_GLOBAL_ENUM_CONSTANT(KEY_C);
  234. BIND_GLOBAL_ENUM_CONSTANT(KEY_D);
  235. BIND_GLOBAL_ENUM_CONSTANT(KEY_E);
  236. BIND_GLOBAL_ENUM_CONSTANT(KEY_F);
  237. BIND_GLOBAL_ENUM_CONSTANT(KEY_G);
  238. BIND_GLOBAL_ENUM_CONSTANT(KEY_H);
  239. BIND_GLOBAL_ENUM_CONSTANT(KEY_I);
  240. BIND_GLOBAL_ENUM_CONSTANT(KEY_J);
  241. BIND_GLOBAL_ENUM_CONSTANT(KEY_K);
  242. BIND_GLOBAL_ENUM_CONSTANT(KEY_L);
  243. BIND_GLOBAL_ENUM_CONSTANT(KEY_M);
  244. BIND_GLOBAL_ENUM_CONSTANT(KEY_N);
  245. BIND_GLOBAL_ENUM_CONSTANT(KEY_O);
  246. BIND_GLOBAL_ENUM_CONSTANT(KEY_P);
  247. BIND_GLOBAL_ENUM_CONSTANT(KEY_Q);
  248. BIND_GLOBAL_ENUM_CONSTANT(KEY_R);
  249. BIND_GLOBAL_ENUM_CONSTANT(KEY_S);
  250. BIND_GLOBAL_ENUM_CONSTANT(KEY_T);
  251. BIND_GLOBAL_ENUM_CONSTANT(KEY_U);
  252. BIND_GLOBAL_ENUM_CONSTANT(KEY_V);
  253. BIND_GLOBAL_ENUM_CONSTANT(KEY_W);
  254. BIND_GLOBAL_ENUM_CONSTANT(KEY_X);
  255. BIND_GLOBAL_ENUM_CONSTANT(KEY_Y);
  256. BIND_GLOBAL_ENUM_CONSTANT(KEY_Z);
  257. BIND_GLOBAL_ENUM_CONSTANT(KEY_BRACKETLEFT);
  258. BIND_GLOBAL_ENUM_CONSTANT(KEY_BACKSLASH);
  259. BIND_GLOBAL_ENUM_CONSTANT(KEY_BRACKETRIGHT);
  260. BIND_GLOBAL_ENUM_CONSTANT(KEY_ASCIICIRCUM);
  261. BIND_GLOBAL_ENUM_CONSTANT(KEY_UNDERSCORE);
  262. BIND_GLOBAL_ENUM_CONSTANT(KEY_QUOTELEFT);
  263. BIND_GLOBAL_ENUM_CONSTANT(KEY_BRACELEFT);
  264. BIND_GLOBAL_ENUM_CONSTANT(KEY_BAR);
  265. BIND_GLOBAL_ENUM_CONSTANT(KEY_BRACERIGHT);
  266. BIND_GLOBAL_ENUM_CONSTANT(KEY_ASCIITILDE);
  267. BIND_GLOBAL_ENUM_CONSTANT(KEY_NOBREAKSPACE);
  268. BIND_GLOBAL_ENUM_CONSTANT(KEY_EXCLAMDOWN);
  269. BIND_GLOBAL_ENUM_CONSTANT(KEY_CENT);
  270. BIND_GLOBAL_ENUM_CONSTANT(KEY_STERLING);
  271. BIND_GLOBAL_ENUM_CONSTANT(KEY_CURRENCY);
  272. BIND_GLOBAL_ENUM_CONSTANT(KEY_YEN);
  273. BIND_GLOBAL_ENUM_CONSTANT(KEY_BROKENBAR);
  274. BIND_GLOBAL_ENUM_CONSTANT(KEY_SECTION);
  275. BIND_GLOBAL_ENUM_CONSTANT(KEY_DIAERESIS);
  276. BIND_GLOBAL_ENUM_CONSTANT(KEY_COPYRIGHT);
  277. BIND_GLOBAL_ENUM_CONSTANT(KEY_ORDFEMININE);
  278. BIND_GLOBAL_ENUM_CONSTANT(KEY_GUILLEMOTLEFT);
  279. BIND_GLOBAL_ENUM_CONSTANT(KEY_NOTSIGN);
  280. BIND_GLOBAL_ENUM_CONSTANT(KEY_HYPHEN);
  281. BIND_GLOBAL_ENUM_CONSTANT(KEY_REGISTERED);
  282. BIND_GLOBAL_ENUM_CONSTANT(KEY_MACRON);
  283. BIND_GLOBAL_ENUM_CONSTANT(KEY_DEGREE);
  284. BIND_GLOBAL_ENUM_CONSTANT(KEY_PLUSMINUS);
  285. BIND_GLOBAL_ENUM_CONSTANT(KEY_TWOSUPERIOR);
  286. BIND_GLOBAL_ENUM_CONSTANT(KEY_THREESUPERIOR);
  287. BIND_GLOBAL_ENUM_CONSTANT(KEY_ACUTE);
  288. BIND_GLOBAL_ENUM_CONSTANT(KEY_MU);
  289. BIND_GLOBAL_ENUM_CONSTANT(KEY_PARAGRAPH);
  290. BIND_GLOBAL_ENUM_CONSTANT(KEY_PERIODCENTERED);
  291. BIND_GLOBAL_ENUM_CONSTANT(KEY_CEDILLA);
  292. BIND_GLOBAL_ENUM_CONSTANT(KEY_ONESUPERIOR);
  293. BIND_GLOBAL_ENUM_CONSTANT(KEY_MASCULINE);
  294. BIND_GLOBAL_ENUM_CONSTANT(KEY_GUILLEMOTRIGHT);
  295. BIND_GLOBAL_ENUM_CONSTANT(KEY_ONEQUARTER);
  296. BIND_GLOBAL_ENUM_CONSTANT(KEY_ONEHALF);
  297. BIND_GLOBAL_ENUM_CONSTANT(KEY_THREEQUARTERS);
  298. BIND_GLOBAL_ENUM_CONSTANT(KEY_QUESTIONDOWN);
  299. BIND_GLOBAL_ENUM_CONSTANT(KEY_AGRAVE);
  300. BIND_GLOBAL_ENUM_CONSTANT(KEY_AACUTE);
  301. BIND_GLOBAL_ENUM_CONSTANT(KEY_ACIRCUMFLEX);
  302. BIND_GLOBAL_ENUM_CONSTANT(KEY_ATILDE);
  303. BIND_GLOBAL_ENUM_CONSTANT(KEY_ADIAERESIS);
  304. BIND_GLOBAL_ENUM_CONSTANT(KEY_ARING);
  305. BIND_GLOBAL_ENUM_CONSTANT(KEY_AE);
  306. BIND_GLOBAL_ENUM_CONSTANT(KEY_CCEDILLA);
  307. BIND_GLOBAL_ENUM_CONSTANT(KEY_EGRAVE);
  308. BIND_GLOBAL_ENUM_CONSTANT(KEY_EACUTE);
  309. BIND_GLOBAL_ENUM_CONSTANT(KEY_ECIRCUMFLEX);
  310. BIND_GLOBAL_ENUM_CONSTANT(KEY_EDIAERESIS);
  311. BIND_GLOBAL_ENUM_CONSTANT(KEY_IGRAVE);
  312. BIND_GLOBAL_ENUM_CONSTANT(KEY_IACUTE);
  313. BIND_GLOBAL_ENUM_CONSTANT(KEY_ICIRCUMFLEX);
  314. BIND_GLOBAL_ENUM_CONSTANT(KEY_IDIAERESIS);
  315. BIND_GLOBAL_ENUM_CONSTANT(KEY_ETH);
  316. BIND_GLOBAL_ENUM_CONSTANT(KEY_NTILDE);
  317. BIND_GLOBAL_ENUM_CONSTANT(KEY_OGRAVE);
  318. BIND_GLOBAL_ENUM_CONSTANT(KEY_OACUTE);
  319. BIND_GLOBAL_ENUM_CONSTANT(KEY_OCIRCUMFLEX);
  320. BIND_GLOBAL_ENUM_CONSTANT(KEY_OTILDE);
  321. BIND_GLOBAL_ENUM_CONSTANT(KEY_ODIAERESIS);
  322. BIND_GLOBAL_ENUM_CONSTANT(KEY_MULTIPLY);
  323. BIND_GLOBAL_ENUM_CONSTANT(KEY_OOBLIQUE);
  324. BIND_GLOBAL_ENUM_CONSTANT(KEY_UGRAVE);
  325. BIND_GLOBAL_ENUM_CONSTANT(KEY_UACUTE);
  326. BIND_GLOBAL_ENUM_CONSTANT(KEY_UCIRCUMFLEX);
  327. BIND_GLOBAL_ENUM_CONSTANT(KEY_UDIAERESIS);
  328. BIND_GLOBAL_ENUM_CONSTANT(KEY_YACUTE);
  329. BIND_GLOBAL_ENUM_CONSTANT(KEY_THORN);
  330. BIND_GLOBAL_ENUM_CONSTANT(KEY_SSHARP);
  331. BIND_GLOBAL_ENUM_CONSTANT(KEY_DIVISION);
  332. BIND_GLOBAL_ENUM_CONSTANT(KEY_YDIAERESIS);
  333. BIND_GLOBAL_ENUM_CONSTANT(KEY_CODE_MASK);
  334. BIND_GLOBAL_ENUM_CONSTANT(KEY_MODIFIER_MASK);
  335. BIND_GLOBAL_ENUM_CONSTANT(KEY_MASK_SHIFT);
  336. BIND_GLOBAL_ENUM_CONSTANT(KEY_MASK_ALT);
  337. BIND_GLOBAL_ENUM_CONSTANT(KEY_MASK_META);
  338. BIND_GLOBAL_ENUM_CONSTANT(KEY_MASK_CTRL);
  339. BIND_GLOBAL_ENUM_CONSTANT(KEY_MASK_CMD);
  340. BIND_GLOBAL_ENUM_CONSTANT(KEY_MASK_KPAD);
  341. BIND_GLOBAL_ENUM_CONSTANT(KEY_MASK_GROUP_SWITCH);
  342. // mouse
  343. BIND_GLOBAL_ENUM_CONSTANT(BUTTON_LEFT);
  344. BIND_GLOBAL_ENUM_CONSTANT(BUTTON_RIGHT);
  345. BIND_GLOBAL_ENUM_CONSTANT(BUTTON_MIDDLE);
  346. BIND_GLOBAL_ENUM_CONSTANT(BUTTON_WHEEL_UP);
  347. BIND_GLOBAL_ENUM_CONSTANT(BUTTON_WHEEL_DOWN);
  348. BIND_GLOBAL_ENUM_CONSTANT(BUTTON_WHEEL_LEFT);
  349. BIND_GLOBAL_ENUM_CONSTANT(BUTTON_WHEEL_RIGHT);
  350. BIND_GLOBAL_ENUM_CONSTANT(BUTTON_MASK_LEFT);
  351. BIND_GLOBAL_ENUM_CONSTANT(BUTTON_MASK_RIGHT);
  352. BIND_GLOBAL_ENUM_CONSTANT(BUTTON_MASK_MIDDLE);
  353. //joypads
  354. BIND_GLOBAL_ENUM_CONSTANT(JOY_BUTTON_0);
  355. BIND_GLOBAL_ENUM_CONSTANT(JOY_BUTTON_1);
  356. BIND_GLOBAL_ENUM_CONSTANT(JOY_BUTTON_2);
  357. BIND_GLOBAL_ENUM_CONSTANT(JOY_BUTTON_3);
  358. BIND_GLOBAL_ENUM_CONSTANT(JOY_BUTTON_4);
  359. BIND_GLOBAL_ENUM_CONSTANT(JOY_BUTTON_5);
  360. BIND_GLOBAL_ENUM_CONSTANT(JOY_BUTTON_6);
  361. BIND_GLOBAL_ENUM_CONSTANT(JOY_BUTTON_7);
  362. BIND_GLOBAL_ENUM_CONSTANT(JOY_BUTTON_8);
  363. BIND_GLOBAL_ENUM_CONSTANT(JOY_BUTTON_9);
  364. BIND_GLOBAL_ENUM_CONSTANT(JOY_BUTTON_10);
  365. BIND_GLOBAL_ENUM_CONSTANT(JOY_BUTTON_11);
  366. BIND_GLOBAL_ENUM_CONSTANT(JOY_BUTTON_12);
  367. BIND_GLOBAL_ENUM_CONSTANT(JOY_BUTTON_13);
  368. BIND_GLOBAL_ENUM_CONSTANT(JOY_BUTTON_14);
  369. BIND_GLOBAL_ENUM_CONSTANT(JOY_BUTTON_15);
  370. BIND_GLOBAL_ENUM_CONSTANT(JOY_BUTTON_MAX);
  371. BIND_GLOBAL_ENUM_CONSTANT(JOY_SONY_CIRCLE);
  372. BIND_GLOBAL_ENUM_CONSTANT(JOY_SONY_X);
  373. BIND_GLOBAL_ENUM_CONSTANT(JOY_SONY_SQUARE);
  374. BIND_GLOBAL_ENUM_CONSTANT(JOY_SONY_TRIANGLE);
  375. BIND_GLOBAL_ENUM_CONSTANT(JOY_XBOX_B);
  376. BIND_GLOBAL_ENUM_CONSTANT(JOY_XBOX_A);
  377. BIND_GLOBAL_ENUM_CONSTANT(JOY_XBOX_X);
  378. BIND_GLOBAL_ENUM_CONSTANT(JOY_XBOX_Y);
  379. BIND_GLOBAL_ENUM_CONSTANT(JOY_DS_A);
  380. BIND_GLOBAL_ENUM_CONSTANT(JOY_DS_B);
  381. BIND_GLOBAL_ENUM_CONSTANT(JOY_DS_X);
  382. BIND_GLOBAL_ENUM_CONSTANT(JOY_DS_Y);
  383. BIND_GLOBAL_ENUM_CONSTANT(JOY_SELECT);
  384. BIND_GLOBAL_ENUM_CONSTANT(JOY_START);
  385. BIND_GLOBAL_ENUM_CONSTANT(JOY_DPAD_UP);
  386. BIND_GLOBAL_ENUM_CONSTANT(JOY_DPAD_DOWN);
  387. BIND_GLOBAL_ENUM_CONSTANT(JOY_DPAD_LEFT);
  388. BIND_GLOBAL_ENUM_CONSTANT(JOY_DPAD_RIGHT);
  389. BIND_GLOBAL_ENUM_CONSTANT(JOY_L);
  390. BIND_GLOBAL_ENUM_CONSTANT(JOY_L2);
  391. BIND_GLOBAL_ENUM_CONSTANT(JOY_L3);
  392. BIND_GLOBAL_ENUM_CONSTANT(JOY_R);
  393. BIND_GLOBAL_ENUM_CONSTANT(JOY_R2);
  394. BIND_GLOBAL_ENUM_CONSTANT(JOY_R3);
  395. BIND_GLOBAL_ENUM_CONSTANT(JOY_AXIS_0);
  396. BIND_GLOBAL_ENUM_CONSTANT(JOY_AXIS_1);
  397. BIND_GLOBAL_ENUM_CONSTANT(JOY_AXIS_2);
  398. BIND_GLOBAL_ENUM_CONSTANT(JOY_AXIS_3);
  399. BIND_GLOBAL_ENUM_CONSTANT(JOY_AXIS_4);
  400. BIND_GLOBAL_ENUM_CONSTANT(JOY_AXIS_5);
  401. BIND_GLOBAL_ENUM_CONSTANT(JOY_AXIS_6);
  402. BIND_GLOBAL_ENUM_CONSTANT(JOY_AXIS_7);
  403. BIND_GLOBAL_ENUM_CONSTANT(JOY_AXIS_8);
  404. BIND_GLOBAL_ENUM_CONSTANT(JOY_AXIS_9);
  405. BIND_GLOBAL_ENUM_CONSTANT(JOY_AXIS_MAX);
  406. BIND_GLOBAL_ENUM_CONSTANT(JOY_ANALOG_LX);
  407. BIND_GLOBAL_ENUM_CONSTANT(JOY_ANALOG_LY);
  408. BIND_GLOBAL_ENUM_CONSTANT(JOY_ANALOG_RX);
  409. BIND_GLOBAL_ENUM_CONSTANT(JOY_ANALOG_RY);
  410. BIND_GLOBAL_ENUM_CONSTANT(JOY_ANALOG_L2);
  411. BIND_GLOBAL_ENUM_CONSTANT(JOY_ANALOG_R2);
  412. // error list
  413. BIND_GLOBAL_ENUM_CONSTANT(OK);
  414. BIND_GLOBAL_ENUM_CONSTANT(FAILED); ///< Generic fail error
  415. BIND_GLOBAL_ENUM_CONSTANT(ERR_UNAVAILABLE); ///< What is requested is unsupported/unavailable
  416. BIND_GLOBAL_ENUM_CONSTANT(ERR_UNCONFIGURED); ///< The object being used hasn't been properly set up yet
  417. BIND_GLOBAL_ENUM_CONSTANT(ERR_UNAUTHORIZED); ///< Missing credentials for requested resource
  418. BIND_GLOBAL_ENUM_CONSTANT(ERR_PARAMETER_RANGE_ERROR); ///< Parameter given out of range
  419. BIND_GLOBAL_ENUM_CONSTANT(ERR_OUT_OF_MEMORY); ///< Out of memory
  420. BIND_GLOBAL_ENUM_CONSTANT(ERR_FILE_NOT_FOUND);
  421. BIND_GLOBAL_ENUM_CONSTANT(ERR_FILE_BAD_DRIVE);
  422. BIND_GLOBAL_ENUM_CONSTANT(ERR_FILE_BAD_PATH);
  423. BIND_GLOBAL_ENUM_CONSTANT(ERR_FILE_NO_PERMISSION);
  424. BIND_GLOBAL_ENUM_CONSTANT(ERR_FILE_ALREADY_IN_USE);
  425. BIND_GLOBAL_ENUM_CONSTANT(ERR_FILE_CANT_OPEN);
  426. BIND_GLOBAL_ENUM_CONSTANT(ERR_FILE_CANT_WRITE);
  427. BIND_GLOBAL_ENUM_CONSTANT(ERR_FILE_CANT_READ);
  428. BIND_GLOBAL_ENUM_CONSTANT(ERR_FILE_UNRECOGNIZED);
  429. BIND_GLOBAL_ENUM_CONSTANT(ERR_FILE_CORRUPT);
  430. BIND_GLOBAL_ENUM_CONSTANT(ERR_FILE_MISSING_DEPENDENCIES);
  431. BIND_GLOBAL_ENUM_CONSTANT(ERR_FILE_EOF);
  432. BIND_GLOBAL_ENUM_CONSTANT(ERR_CANT_OPEN); ///< Can't open a resource/socket/file
  433. BIND_GLOBAL_ENUM_CONSTANT(ERR_CANT_CREATE);
  434. BIND_GLOBAL_ENUM_CONSTANT(ERR_PARSE_ERROR);
  435. BIND_GLOBAL_ENUM_CONSTANT(ERR_QUERY_FAILED);
  436. BIND_GLOBAL_ENUM_CONSTANT(ERR_ALREADY_IN_USE);
  437. BIND_GLOBAL_ENUM_CONSTANT(ERR_LOCKED); ///< resource is locked
  438. BIND_GLOBAL_ENUM_CONSTANT(ERR_TIMEOUT);
  439. BIND_GLOBAL_ENUM_CONSTANT(ERR_CANT_ACQUIRE_RESOURCE);
  440. BIND_GLOBAL_ENUM_CONSTANT(ERR_INVALID_DATA); ///< Data passed is invalid
  441. BIND_GLOBAL_ENUM_CONSTANT(ERR_INVALID_PARAMETER); ///< Parameter passed is invalid
  442. BIND_GLOBAL_ENUM_CONSTANT(ERR_ALREADY_EXISTS); ///< When adding ), item already exists
  443. BIND_GLOBAL_ENUM_CONSTANT(ERR_DOES_NOT_EXIST); ///< When retrieving/erasing ), it item does not exist
  444. BIND_GLOBAL_ENUM_CONSTANT(ERR_DATABASE_CANT_READ); ///< database is full
  445. BIND_GLOBAL_ENUM_CONSTANT(ERR_DATABASE_CANT_WRITE); ///< database is full
  446. BIND_GLOBAL_ENUM_CONSTANT(ERR_COMPILATION_FAILED);
  447. BIND_GLOBAL_ENUM_CONSTANT(ERR_METHOD_NOT_FOUND);
  448. BIND_GLOBAL_ENUM_CONSTANT(ERR_LINK_FAILED);
  449. BIND_GLOBAL_ENUM_CONSTANT(ERR_SCRIPT_FAILED);
  450. BIND_GLOBAL_ENUM_CONSTANT(ERR_CYCLIC_LINK);
  451. BIND_GLOBAL_ENUM_CONSTANT(ERR_BUSY);
  452. BIND_GLOBAL_ENUM_CONSTANT(ERR_HELP); ///< user requested help!!
  453. BIND_GLOBAL_ENUM_CONSTANT(ERR_BUG); ///< a bug in the software certainly happened ), due to a double check failing or unexpected behavior.
  454. BIND_GLOBAL_ENUM_CONSTANT(ERR_WTF);
  455. BIND_GLOBAL_ENUM_CONSTANT(PROPERTY_HINT_NONE);
  456. BIND_GLOBAL_ENUM_CONSTANT(PROPERTY_HINT_RANGE);
  457. BIND_GLOBAL_ENUM_CONSTANT(PROPERTY_HINT_EXP_RANGE);
  458. BIND_GLOBAL_ENUM_CONSTANT(PROPERTY_HINT_ENUM);
  459. BIND_GLOBAL_ENUM_CONSTANT(PROPERTY_HINT_EXP_EASING);
  460. BIND_GLOBAL_ENUM_CONSTANT(PROPERTY_HINT_LENGTH);
  461. BIND_GLOBAL_ENUM_CONSTANT(PROPERTY_HINT_KEY_ACCEL);
  462. BIND_GLOBAL_ENUM_CONSTANT(PROPERTY_HINT_FLAGS);
  463. BIND_GLOBAL_ENUM_CONSTANT(PROPERTY_HINT_LAYERS_2D_RENDER);
  464. BIND_GLOBAL_ENUM_CONSTANT(PROPERTY_HINT_LAYERS_2D_PHYSICS);
  465. BIND_GLOBAL_ENUM_CONSTANT(PROPERTY_HINT_LAYERS_3D_RENDER);
  466. BIND_GLOBAL_ENUM_CONSTANT(PROPERTY_HINT_LAYERS_3D_PHYSICS);
  467. BIND_GLOBAL_ENUM_CONSTANT(PROPERTY_HINT_FILE);
  468. BIND_GLOBAL_ENUM_CONSTANT(PROPERTY_HINT_DIR);
  469. BIND_GLOBAL_ENUM_CONSTANT(PROPERTY_HINT_GLOBAL_FILE);
  470. BIND_GLOBAL_ENUM_CONSTANT(PROPERTY_HINT_GLOBAL_DIR);
  471. BIND_GLOBAL_ENUM_CONSTANT(PROPERTY_HINT_RESOURCE_TYPE);
  472. BIND_GLOBAL_ENUM_CONSTANT(PROPERTY_HINT_MULTILINE_TEXT);
  473. BIND_GLOBAL_ENUM_CONSTANT(PROPERTY_HINT_COLOR_NO_ALPHA);
  474. BIND_GLOBAL_ENUM_CONSTANT(PROPERTY_HINT_IMAGE_COMPRESS_LOSSY);
  475. BIND_GLOBAL_ENUM_CONSTANT(PROPERTY_HINT_IMAGE_COMPRESS_LOSSLESS);
  476. BIND_GLOBAL_ENUM_CONSTANT(PROPERTY_USAGE_STORAGE);
  477. BIND_GLOBAL_ENUM_CONSTANT(PROPERTY_USAGE_EDITOR);
  478. BIND_GLOBAL_ENUM_CONSTANT(PROPERTY_USAGE_NETWORK);
  479. BIND_GLOBAL_ENUM_CONSTANT(PROPERTY_USAGE_EDITOR_HELPER);
  480. BIND_GLOBAL_ENUM_CONSTANT(PROPERTY_USAGE_CHECKABLE);
  481. BIND_GLOBAL_ENUM_CONSTANT(PROPERTY_USAGE_CHECKED);
  482. BIND_GLOBAL_ENUM_CONSTANT(PROPERTY_USAGE_INTERNATIONALIZED);
  483. BIND_GLOBAL_ENUM_CONSTANT(PROPERTY_USAGE_GROUP);
  484. BIND_GLOBAL_ENUM_CONSTANT(PROPERTY_USAGE_CATEGORY);
  485. BIND_GLOBAL_ENUM_CONSTANT(PROPERTY_USAGE_STORE_IF_NONZERO);
  486. BIND_GLOBAL_ENUM_CONSTANT(PROPERTY_USAGE_STORE_IF_NONONE);
  487. BIND_GLOBAL_ENUM_CONSTANT(PROPERTY_USAGE_NO_INSTANCE_STATE);
  488. BIND_GLOBAL_ENUM_CONSTANT(PROPERTY_USAGE_RESTART_IF_CHANGED);
  489. BIND_GLOBAL_ENUM_CONSTANT(PROPERTY_USAGE_SCRIPT_VARIABLE);
  490. BIND_GLOBAL_ENUM_CONSTANT(PROPERTY_USAGE_DEFAULT);
  491. BIND_GLOBAL_ENUM_CONSTANT(PROPERTY_USAGE_DEFAULT_INTL);
  492. BIND_GLOBAL_ENUM_CONSTANT(PROPERTY_USAGE_NOEDITOR);
  493. BIND_GLOBAL_ENUM_CONSTANT(METHOD_FLAG_NORMAL);
  494. BIND_GLOBAL_ENUM_CONSTANT(METHOD_FLAG_EDITOR);
  495. BIND_GLOBAL_ENUM_CONSTANT(METHOD_FLAG_NOSCRIPT);
  496. BIND_GLOBAL_ENUM_CONSTANT(METHOD_FLAG_CONST);
  497. BIND_GLOBAL_ENUM_CONSTANT(METHOD_FLAG_REVERSE);
  498. BIND_GLOBAL_ENUM_CONSTANT(METHOD_FLAG_VIRTUAL);
  499. BIND_GLOBAL_ENUM_CONSTANT(METHOD_FLAG_FROM_SCRIPT);
  500. BIND_GLOBAL_ENUM_CONSTANT(METHOD_FLAGS_DEFAULT);
  501. BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_NIL", Variant::NIL);
  502. BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_BOOL", Variant::BOOL);
  503. BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_INT", Variant::INT);
  504. BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_REAL", Variant::REAL);
  505. BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_STRING", Variant::STRING);
  506. BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_VECTOR2", Variant::VECTOR2); // 5
  507. BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_RECT2", Variant::RECT2);
  508. BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_VECTOR3", Variant::VECTOR3);
  509. BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_TRANSFORM2D", Variant::TRANSFORM2D);
  510. BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_PLANE", Variant::PLANE);
  511. BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_QUAT", Variant::QUAT); // 10
  512. BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_RECT3", Variant::RECT3);
  513. BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_BASIS", Variant::BASIS);
  514. BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_TRANSFORM", Variant::TRANSFORM);
  515. BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_COLOR", Variant::COLOR);
  516. BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_NODE_PATH", Variant::NODE_PATH); // 15
  517. BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_RID", Variant::_RID);
  518. BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_OBJECT", Variant::OBJECT);
  519. BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_DICTIONARY", Variant::DICTIONARY); // 20
  520. BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_ARRAY", Variant::ARRAY);
  521. BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_RAW_ARRAY", Variant::POOL_BYTE_ARRAY);
  522. BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_INT_ARRAY", Variant::POOL_INT_ARRAY);
  523. BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_REAL_ARRAY", Variant::POOL_REAL_ARRAY);
  524. BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_STRING_ARRAY", Variant::POOL_STRING_ARRAY);
  525. BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_VECTOR2_ARRAY", Variant::POOL_VECTOR2_ARRAY); // 25
  526. BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_VECTOR3_ARRAY", Variant::POOL_VECTOR3_ARRAY);
  527. BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_COLOR_ARRAY", Variant::POOL_COLOR_ARRAY);
  528. BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_MAX", Variant::VARIANT_MAX);
  529. }
  530. void unregister_global_constants() {
  531. _global_constants.clear();
  532. }
  533. int GlobalConstants::get_global_constant_count() {
  534. return _global_constants.size();
  535. }
  536. #ifdef DEBUG_METHODS_ENABLED
  537. StringName GlobalConstants::get_global_constant_enum(int p_idx) {
  538. return _global_constants[p_idx].enum_name;
  539. }
  540. #else
  541. StringName GlobalConstants::get_global_constant_enum(int p_idx) {
  542. return StringName();
  543. }
  544. #endif
  545. const char *GlobalConstants::get_global_constant_name(int p_idx) {
  546. return _global_constants[p_idx].name;
  547. }
  548. int GlobalConstants::get_global_constant_value(int p_idx) {
  549. return _global_constants[p_idx].value;
  550. }