caller-defined entry methods and string API update
This commit is contained in:
@@ -38,13 +38,6 @@ public:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#define GDNATIVE_INIT(arg) void gdnative_init(arg)
|
||||
#define GDNATIVE_TERMINATE(arg) void gdnative_terminate(arg)
|
||||
|
||||
#define NATIVESCRIPT_INIT() void nativescript_init()
|
||||
|
||||
#define GODOT_CLASS(Name) \
|
||||
public: inline static const char *___get_type_name() { return static_cast<const char *>(#Name); } \
|
||||
private:
|
||||
|
||||
@@ -17,6 +17,9 @@ public:
|
||||
static void print_warning(const String& description, const String& function, const String& file, int line);
|
||||
static void print_error(const String& description, const String& function, const String& file, int line);
|
||||
|
||||
static void gdnative_init(godot_gdnative_init_options *o);
|
||||
static void gdnative_terminate(godot_gdnative_terminate_options *o);
|
||||
static void nativescript_init(void *handle);
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -10,6 +10,20 @@ class Variant;
|
||||
class PoolByteArray;
|
||||
class PoolRealArray;
|
||||
class PoolStringArray;
|
||||
class String;
|
||||
|
||||
class CharString {
|
||||
|
||||
friend class String;
|
||||
|
||||
godot_char_string _char_string;
|
||||
|
||||
public:
|
||||
~CharString();
|
||||
|
||||
int length() const;
|
||||
const char *get_data() const;
|
||||
};
|
||||
|
||||
class String {
|
||||
godot_string _godot_string;
|
||||
@@ -42,7 +56,8 @@ public:
|
||||
int length() const;
|
||||
const wchar_t *unicode_str() const;
|
||||
char *alloc_c_string() const;
|
||||
void get_c_string(char *p_dest, int *p_size) const;
|
||||
CharString utf8() const;
|
||||
CharString ascii(bool p_extended = false) const;
|
||||
|
||||
int64_t find(String p_what) const;
|
||||
int64_t find_from(String p_what, int64_t p_from) const;
|
||||
|
||||
Reference in New Issue
Block a user