diff options
| author | Karroffel | 2017-04-03 16:11:38 +0200 |
|---|---|---|
| committer | Karroffel | 2017-04-03 17:20:11 +0200 |
| commit | fd553087867187220d4f6b8217854dd8e9be2667 (patch) | |
| tree | ba4c8b2611b1a574056e2f4ae694f18b737ee0e6 /modules/dlscript/godot/godot_string.h | |
| parent | 67f59bc2d9e2ce5faa9507017d49827753981e1e (diff) | |
| download | godot-fd553087867187220d4f6b8217854dd8e9be2667.tar.gz godot-fd553087867187220d4f6b8217854dd8e9be2667.tar.zst godot-fd553087867187220d4f6b8217854dd8e9be2667.zip | |
added dlscript module
This module was written by bojidar-bg and me, with the help of ClikCode and touilleMan.
This adds a module to Godot that enables the use of dynamic libraries as a source for scripts.
That also allows third party libraries to be linked to Godot more easily and without creating modules.
For a readme see https://github.com/GodotNativeTools/godot_headers/blob/master/README.md
Diffstat (limited to 'modules/dlscript/godot/godot_string.h')
| -rw-r--r-- | modules/dlscript/godot/godot_string.h | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/modules/dlscript/godot/godot_string.h b/modules/dlscript/godot/godot_string.h new file mode 100644 index 000000000..73b366d9c --- /dev/null +++ b/modules/dlscript/godot/godot_string.h @@ -0,0 +1,42 @@ +#ifndef GODOT_DLSCRIPT_STRING_H +#define GODOT_DLSCRIPT_STRING_H + +#ifdef __cplusplus +extern "C" { +#endif + +#include <stdint.h> + +#ifndef GODOT_CORE_API_GODOT_STRING_TYPE_DEFINED +typedef struct godot_string { + uint8_t _dont_touch_that[8]; +} godot_string; +#endif + +#include "../godot.h" + +void GDAPI godot_string_new(godot_string *p_str); +void GDAPI godot_string_new_data(godot_string *p_str, const char *p_contents, const int p_size); + +void GDAPI godot_string_get_data(const godot_string *p_str, wchar_t *p_dest, int *p_size); + +void GDAPI godot_string_copy_string(const godot_string *p_dest, const godot_string *p_src); + +wchar_t GDAPI *godot_string_operator_index(godot_string *p_str, const godot_int p_idx); +const wchar_t GDAPI *godot_string_c_str(const godot_string *p_str); + +godot_bool GDAPI godot_string_operator_equal(const godot_string *p_a, const godot_string *p_b); +godot_bool GDAPI godot_string_operator_less(const godot_string *p_a, const godot_string *p_b); +void GDAPI godot_string_operator_plus(godot_string *p_dest, const godot_string *p_a, const godot_string *p_b); + +// @Incomplete +// hmm, I guess exposing the whole API doesn't make much sense +// since the language used in the library has its own string funcs + +void GDAPI godot_string_destroy(godot_string *p_str); + +#ifdef __cplusplus +} +#endif + +#endif // GODOT_DLSCRIPT_STRING_H |
