diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2020-02-20 11:30:56 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-20 11:30:56 +0100 |
commit | bd61281a5f515065b05be008dd3d6b73a03f5a7c (patch) | |
tree | 0add52fc270f808b4b2ad0bf7c970d72338c667e /core/message_queue.h | |
parent | 1a4be2cd8fdd9ba26f016f3e2d83febfe8ae141c (diff) | |
parent | 69c95f4b4c128a22777af1e155bc24c7033decca (diff) |
Merge pull request #36368 from reduz/variant-rework
Reworked signal system, added support for Callable and Signal
Diffstat (limited to 'core/message_queue.h')
-rw-r--r-- | core/message_queue.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/core/message_queue.h b/core/message_queue.h index e9a92ff5b7..9ba748bb42 100644 --- a/core/message_queue.h +++ b/core/message_queue.h @@ -54,8 +54,7 @@ class MessageQueue { struct Message { - ObjectID instance_id; - StringName target; + Callable callable; int16_t type; union { int16_t notification; @@ -68,7 +67,7 @@ class MessageQueue { uint32_t buffer_max_used; uint32_t buffer_size; - void _call_function(Object *p_target, const StringName &p_func, const Variant *p_args, int p_argcount, bool p_show_error); + void _call_function(const Callable &p_callable, const Variant *p_args, int p_argcount, bool p_show_error); static MessageQueue *singleton; @@ -81,6 +80,7 @@ public: Error push_call(ObjectID p_id, const StringName &p_method, VARIANT_ARG_LIST); Error push_notification(ObjectID p_id, int p_notification); Error push_set(ObjectID p_id, const StringName &p_prop, const Variant &p_value); + Error push_callable(const Callable &p_callable, const Variant **p_args, int p_argcount, bool p_show_error = false); Error push_call(Object *p_object, const StringName &p_method, VARIANT_ARG_LIST); Error push_notification(Object *p_object, int p_notification); |