You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-05 12:10:55 +00:00
Merge pull request #42531 from BastiaanOlij/add_get_native_handle
Add get native handle
This commit is contained in:
@@ -1144,6 +1144,11 @@ void _OS::move_window_to_foreground() {
|
||||
OS::get_singleton()->move_window_to_foreground();
|
||||
}
|
||||
|
||||
int64_t _OS::get_native_handle(HandleType p_handle_type) {
|
||||
|
||||
return (int64_t)OS::get_singleton()->get_native_handle(p_handle_type);
|
||||
}
|
||||
|
||||
bool _OS::is_debug_build() const {
|
||||
|
||||
#ifdef DEBUG_ENABLED
|
||||
@@ -1292,6 +1297,8 @@ void _OS::_bind_methods() {
|
||||
ClassDB::bind_method(D_METHOD("center_window"), &_OS::center_window);
|
||||
ClassDB::bind_method(D_METHOD("move_window_to_foreground"), &_OS::move_window_to_foreground);
|
||||
|
||||
ClassDB::bind_method(D_METHOD("get_native_handle", "handle_type"), &_OS::get_native_handle);
|
||||
|
||||
ClassDB::bind_method(D_METHOD("set_borderless_window", "borderless"), &_OS::set_borderless_window);
|
||||
ClassDB::bind_method(D_METHOD("get_borderless_window"), &_OS::get_borderless_window);
|
||||
|
||||
@@ -1503,6 +1510,12 @@ void _OS::_bind_methods() {
|
||||
BIND_ENUM_CONSTANT(MONTH_NOVEMBER);
|
||||
BIND_ENUM_CONSTANT(MONTH_DECEMBER);
|
||||
|
||||
BIND_ENUM_CONSTANT(APPLICATION_HANDLE);
|
||||
BIND_ENUM_CONSTANT(DISPLAY_HANDLE);
|
||||
BIND_ENUM_CONSTANT(WINDOW_HANDLE);
|
||||
BIND_ENUM_CONSTANT(WINDOW_VIEW);
|
||||
BIND_ENUM_CONSTANT(OPENGL_CONTEXT);
|
||||
|
||||
BIND_ENUM_CONSTANT(SCREEN_ORIENTATION_LANDSCAPE);
|
||||
BIND_ENUM_CONSTANT(SCREEN_ORIENTATION_PORTRAIT);
|
||||
BIND_ENUM_CONSTANT(SCREEN_ORIENTATION_REVERSE_LANDSCAPE);
|
||||
|
||||
Reference in New Issue
Block a user