Merge pull request #67138 from touilleMan/gdextension-typed-enum-in-struct
Use enum type in GDExtension info structs for better readability
This commit is contained in:
commit
99bc4905cb
@ -201,18 +201,18 @@ typedef GDNativeBool (*GDNativeExtensionClassGet)(GDExtensionClassInstancePtr p_
|
|||||||
typedef uint64_t (*GDNativeExtensionClassGetRID)(GDExtensionClassInstancePtr p_instance);
|
typedef uint64_t (*GDNativeExtensionClassGetRID)(GDExtensionClassInstancePtr p_instance);
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
uint32_t type;
|
GDNativeVariantType type;
|
||||||
const char *name;
|
const char *name;
|
||||||
const char *class_name;
|
const char *class_name;
|
||||||
uint32_t hint;
|
uint32_t hint; // Bitfield of `PropertyHint` (defined in `extension_api.json`)
|
||||||
const char *hint_string;
|
const char *hint_string;
|
||||||
uint32_t usage;
|
uint32_t usage; // Bitfield of `PropertyUsageFlags` (defined in `extension_api.json`)
|
||||||
} GDNativePropertyInfo;
|
} GDNativePropertyInfo;
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
const char *name;
|
const char *name;
|
||||||
GDNativePropertyInfo return_value;
|
GDNativePropertyInfo return_value;
|
||||||
uint32_t flags; // From GDNativeExtensionClassMethodFlags
|
uint32_t flags; // Bitfield of `GDNativeExtensionClassMethodFlags`
|
||||||
int32_t id;
|
int32_t id;
|
||||||
GDNativePropertyInfo *arguments;
|
GDNativePropertyInfo *arguments;
|
||||||
uint32_t argument_count;
|
uint32_t argument_count;
|
||||||
@ -292,7 +292,7 @@ typedef struct {
|
|||||||
void *method_userdata;
|
void *method_userdata;
|
||||||
GDNativeExtensionClassMethodCall call_func;
|
GDNativeExtensionClassMethodCall call_func;
|
||||||
GDNativeExtensionClassMethodPtrCall ptrcall_func;
|
GDNativeExtensionClassMethodPtrCall ptrcall_func;
|
||||||
uint32_t method_flags; /* GDNativeExtensionClassMethodFlags */
|
uint32_t method_flags; // Bitfield of `GDNativeExtensionClassMethodFlags`
|
||||||
uint32_t argument_count;
|
uint32_t argument_count;
|
||||||
GDNativeBool has_return_value;
|
GDNativeBool has_return_value;
|
||||||
GDNativeExtensionClassMethodGetArgumentType get_argument_type_func;
|
GDNativeExtensionClassMethodGetArgumentType get_argument_type_func;
|
||||||
|
Loading…
Reference in New Issue
Block a user