godot_string.h 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. #ifndef GODOT_DLSCRIPT_STRING_H
  2. #define GODOT_DLSCRIPT_STRING_H
  3. #ifdef __cplusplus
  4. extern "C" {
  5. #endif
  6. #include <stdint.h>
  7. #ifndef GODOT_CORE_API_GODOT_STRING_TYPE_DEFINED
  8. typedef struct godot_string {
  9. uint8_t _dont_touch_that[8];
  10. } godot_string;
  11. #endif
  12. #include "../godot.h"
  13. void GDAPI godot_string_new(godot_string *p_str);
  14. void GDAPI godot_string_new_data(godot_string *p_str, const char *p_contents, const int p_size);
  15. void GDAPI godot_string_get_data(const godot_string *p_str, wchar_t *p_dest, int *p_size);
  16. void GDAPI godot_string_copy_string(const godot_string *p_dest, const godot_string *p_src);
  17. wchar_t GDAPI *godot_string_operator_index(godot_string *p_str, const godot_int p_idx);
  18. const wchar_t GDAPI *godot_string_c_str(const godot_string *p_str);
  19. godot_bool GDAPI godot_string_operator_equal(const godot_string *p_a, const godot_string *p_b);
  20. godot_bool GDAPI godot_string_operator_less(const godot_string *p_a, const godot_string *p_b);
  21. void GDAPI godot_string_operator_plus(godot_string *p_dest, const godot_string *p_a, const godot_string *p_b);
  22. // @Incomplete
  23. // hmm, I guess exposing the whole API doesn't make much sense
  24. // since the language used in the library has its own string funcs
  25. void GDAPI godot_string_destroy(godot_string *p_str);
  26. #ifdef __cplusplus
  27. }
  28. #endif
  29. #endif // GODOT_DLSCRIPT_STRING_H