diff options
Diffstat (limited to 'core/os')
-rw-r--r-- | core/os/input.cpp | 4 | ||||
-rw-r--r-- | core/os/input_event.cpp | 6 | ||||
-rw-r--r-- | core/os/main_loop.cpp | 2 | ||||
-rw-r--r-- | core/os/os.h | 3 |
4 files changed, 9 insertions, 6 deletions
diff --git a/core/os/input.cpp b/core/os/input.cpp index a90a552d1d..c7b32b939a 100644 --- a/core/os/input.cpp +++ b/core/os/input.cpp @@ -83,8 +83,8 @@ void Input::_bind_methods() { ClassDB::bind_method(D_METHOD("warp_mouse_pos", "to"), &Input::warp_mouse_pos); ClassDB::bind_method(D_METHOD("action_press", "action"), &Input::action_press); ClassDB::bind_method(D_METHOD("action_release", "action"), &Input::action_release); - ClassDB::bind_method(D_METHOD("set_custom_mouse_cursor", "image:Texture", "hotspot"), &Input::set_custom_mouse_cursor, DEFVAL(Vector2())); - ClassDB::bind_method(D_METHOD("parse_input_event", "event:InputEvent"), &Input::parse_input_event); + ClassDB::bind_method(D_METHOD("set_custom_mouse_cursor", "image", "hotspot"), &Input::set_custom_mouse_cursor, DEFVAL(Vector2())); + ClassDB::bind_method(D_METHOD("parse_input_event", "event"), &Input::parse_input_event); BIND_CONSTANT(MOUSE_MODE_VISIBLE); BIND_CONSTANT(MOUSE_MODE_HIDDEN); diff --git a/core/os/input_event.cpp b/core/os/input_event.cpp index 0a07b6b2b7..fe0e2c2524 100644 --- a/core/os/input_event.cpp +++ b/core/os/input_event.cpp @@ -134,12 +134,12 @@ void InputEvent::_bind_methods() { ClassDB::bind_method(D_METHOD("as_text"), &InputEvent::as_text); - ClassDB::bind_method(D_METHOD("action_match", "event:InputEvent"), &InputEvent::action_match); - ClassDB::bind_method(D_METHOD("shortcut_match", "event:InputEvent"), &InputEvent::shortcut_match); + ClassDB::bind_method(D_METHOD("action_match", "event"), &InputEvent::action_match); + ClassDB::bind_method(D_METHOD("shortcut_match", "event"), &InputEvent::shortcut_match); ClassDB::bind_method(D_METHOD("is_action_type"), &InputEvent::is_action_type); - ClassDB::bind_method(D_METHOD("xformed_by:InputEvent", "xform", "local_ofs"), &InputEvent::xformed_by, DEFVAL(Vector2())); + ClassDB::bind_method(D_METHOD("xformed_by", "xform", "local_ofs"), &InputEvent::xformed_by, DEFVAL(Vector2())); ADD_PROPERTY(PropertyInfo(Variant::INT, "device"), "set_device", "get_device"); } diff --git a/core/os/main_loop.cpp b/core/os/main_loop.cpp index 93658c07c2..248f5537c6 100644 --- a/core/os/main_loop.cpp +++ b/core/os/main_loop.cpp @@ -32,7 +32,7 @@ void MainLoop::_bind_methods() { - ClassDB::bind_method(D_METHOD("input_event", "ev:InputEvent"), &MainLoop::input_event); + ClassDB::bind_method(D_METHOD("input_event", "ev"), &MainLoop::input_event); ClassDB::bind_method(D_METHOD("input_text", "text"), &MainLoop::input_text); ClassDB::bind_method(D_METHOD("init"), &MainLoop::init); ClassDB::bind_method(D_METHOD("iteration", "delta"), &MainLoop::iteration); diff --git a/core/os/os.h b/core/os/os.h index 8e2257a0e4..4d64e4a9f0 100644 --- a/core/os/os.h +++ b/core/os/os.h @@ -63,6 +63,8 @@ class OS { void *_stack_bottom; public: + typedef void (*ImeCallback)(void *p_inp, String p_text, Point2 p_selection); + enum RenderThreadMode { RENDER_THREAD_UNSAFE, @@ -183,6 +185,7 @@ public: virtual bool get_borderless_window() { return 0; } virtual void set_ime_position(const Point2 &p_pos) {} + virtual void set_ime_intermediate_text_callback(ImeCallback p_callback, void *p_inp) {} virtual Error open_dynamic_library(const String p_path, void *&p_library_handle) { return ERR_UNAVAILABLE; } virtual Error close_dynamic_library(void *p_library_handle) { return ERR_UNAVAILABLE; } |