2020-03-07 16:02:54 +00:00
|
|
|
/*************************************************************************/
|
|
|
|
/* display_server_osx.h */
|
|
|
|
/*************************************************************************/
|
|
|
|
/* This file is part of: */
|
|
|
|
/* GODOT ENGINE */
|
|
|
|
/* https://godotengine.org */
|
|
|
|
/*************************************************************************/
|
2022-01-03 20:27:34 +00:00
|
|
|
/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
|
|
|
|
/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
|
2020-03-07 16:02:54 +00:00
|
|
|
/* */
|
|
|
|
/* Permission is hereby granted, free of charge, to any person obtaining */
|
|
|
|
/* a copy of this software and associated documentation files (the */
|
|
|
|
/* "Software"), to deal in the Software without restriction, including */
|
|
|
|
/* without limitation the rights to use, copy, modify, merge, publish, */
|
|
|
|
/* distribute, sublicense, and/or sell copies of the Software, and to */
|
|
|
|
/* permit persons to whom the Software is furnished to do so, subject to */
|
|
|
|
/* the following conditions: */
|
|
|
|
/* */
|
|
|
|
/* The above copyright notice and this permission notice shall be */
|
|
|
|
/* included in all copies or substantial portions of the Software. */
|
|
|
|
/* */
|
|
|
|
/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
|
|
|
|
/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
|
|
|
|
/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
|
|
|
|
/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
|
|
|
|
/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
|
|
|
|
/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
|
|
|
|
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
|
|
|
|
/*************************************************************************/
|
|
|
|
|
|
|
|
#ifndef DISPLAY_SERVER_OSX_H
|
|
|
|
#define DISPLAY_SERVER_OSX_H
|
|
|
|
|
|
|
|
#define BitMap _QDBitMap // Suppress deprecated QuickDraw definition.
|
|
|
|
|
2020-04-28 13:19:37 +00:00
|
|
|
#include "core/input/input.h"
|
2020-03-07 16:02:54 +00:00
|
|
|
#include "servers/display_server.h"
|
|
|
|
|
2021-10-26 15:18:39 +00:00
|
|
|
#if defined(GLES3_ENABLED)
|
2021-11-02 10:27:38 +00:00
|
|
|
#include "gl_manager_osx.h"
|
2020-03-07 16:02:54 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#if defined(VULKAN_ENABLED)
|
|
|
|
#include "drivers/vulkan/rendering_device_vulkan.h"
|
|
|
|
#include "platform/osx/vulkan_context_osx.h"
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#include <AppKit/AppKit.h>
|
|
|
|
#include <AppKit/NSCursor.h>
|
|
|
|
#include <ApplicationServices/ApplicationServices.h>
|
|
|
|
#include <CoreVideo/CoreVideo.h>
|
|
|
|
|
|
|
|
#undef BitMap
|
|
|
|
#undef CursorShape
|
|
|
|
|
|
|
|
class DisplayServerOSX : public DisplayServer {
|
|
|
|
GDCLASS(DisplayServerOSX, DisplayServer)
|
|
|
|
|
|
|
|
_THREAD_SAFE_CLASS_
|
|
|
|
|
|
|
|
public:
|
2021-07-22 16:23:48 +00:00
|
|
|
void _send_event(NSEvent *p_event);
|
|
|
|
NSMenu *_get_dock_menu() const;
|
|
|
|
void _menu_callback(id p_sender);
|
|
|
|
|
2021-10-26 15:18:39 +00:00
|
|
|
#if defined(GLES3_ENABLED)
|
2021-11-02 10:27:38 +00:00
|
|
|
GLManager_OSX *gl_manager = nullptr;
|
2020-03-07 16:02:54 +00:00
|
|
|
#endif
|
|
|
|
#if defined(VULKAN_ENABLED)
|
2021-11-02 10:27:38 +00:00
|
|
|
VulkanContextOSX *context_vulkan = nullptr;
|
|
|
|
RenderingDeviceVulkan *rendering_device_vulkan = nullptr;
|
2020-03-07 16:02:54 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
const NSMenu *_get_menu_root(const String &p_menu_root) const;
|
|
|
|
NSMenu *_get_menu_root(const String &p_menu_root);
|
|
|
|
|
2020-04-01 23:20:12 +00:00
|
|
|
NSMenu *apple_menu = nullptr;
|
|
|
|
NSMenu *dock_menu = nullptr;
|
2020-03-07 16:02:54 +00:00
|
|
|
Map<String, NSMenu *> submenu;
|
|
|
|
|
|
|
|
struct KeyEvent {
|
|
|
|
WindowID window_id;
|
2020-11-24 09:12:55 +00:00
|
|
|
unsigned int osx_state = false;
|
|
|
|
bool pressed = false;
|
|
|
|
bool echo = false;
|
|
|
|
bool raw = false;
|
2021-08-13 21:31:57 +00:00
|
|
|
Key keycode = Key::NONE;
|
|
|
|
Key physical_keycode = Key::NONE;
|
2020-11-24 09:12:55 +00:00
|
|
|
uint32_t unicode = 0;
|
2020-03-07 16:02:54 +00:00
|
|
|
};
|
|
|
|
|
2020-07-02 12:55:53 +00:00
|
|
|
struct WarpEvent {
|
|
|
|
NSTimeInterval timestamp;
|
|
|
|
NSPoint delta;
|
|
|
|
};
|
|
|
|
|
|
|
|
List<WarpEvent> warp_events;
|
|
|
|
NSTimeInterval last_warp = 0;
|
2021-02-14 22:20:50 +00:00
|
|
|
bool ignore_warp = false;
|
2020-07-02 12:55:53 +00:00
|
|
|
|
2022-01-15 18:47:34 +00:00
|
|
|
float display_max_scale = 1.f;
|
|
|
|
|
2020-03-07 16:02:54 +00:00
|
|
|
Vector<KeyEvent> key_event_buffer;
|
|
|
|
int key_event_pos;
|
|
|
|
|
|
|
|
struct WindowData {
|
|
|
|
id window_delegate;
|
|
|
|
id window_object;
|
|
|
|
id window_view;
|
|
|
|
|
2020-06-29 09:31:36 +00:00
|
|
|
Vector<Vector2> mpath;
|
|
|
|
|
2020-03-07 16:02:54 +00:00
|
|
|
Point2i mouse_pos;
|
|
|
|
|
|
|
|
Size2i min_size;
|
|
|
|
Size2i max_size;
|
|
|
|
Size2i size;
|
|
|
|
|
|
|
|
bool mouse_down_control = false;
|
|
|
|
|
|
|
|
bool im_active = false;
|
|
|
|
Size2i im_position;
|
|
|
|
|
|
|
|
Callable rect_changed_callback;
|
|
|
|
Callable event_callback;
|
|
|
|
Callable input_event_callback;
|
|
|
|
Callable input_text_callback;
|
|
|
|
Callable drop_files_callback;
|
|
|
|
|
|
|
|
ObjectID instance_id;
|
|
|
|
|
|
|
|
WindowID transient_parent = INVALID_WINDOW_ID;
|
|
|
|
Set<WindowID> transient_children;
|
|
|
|
|
|
|
|
bool layered_window = false;
|
|
|
|
bool fullscreen = false;
|
|
|
|
bool on_top = false;
|
|
|
|
bool borderless = false;
|
|
|
|
bool resize_disabled = false;
|
2020-07-03 10:06:03 +00:00
|
|
|
bool no_focus = false;
|
2020-03-07 16:02:54 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
Point2i im_selection;
|
|
|
|
String im_text;
|
|
|
|
|
|
|
|
Map<WindowID, WindowData> windows;
|
|
|
|
|
|
|
|
WindowID window_id_counter = MAIN_WINDOW_ID;
|
|
|
|
|
2021-06-19 15:44:59 +00:00
|
|
|
WindowID _create_window(WindowMode p_mode, VSyncMode p_vsync_mode, const Rect2i &p_rect);
|
2020-03-07 16:02:54 +00:00
|
|
|
void _update_window(WindowData p_wd);
|
|
|
|
void _send_window_event(const WindowData &wd, WindowEvent p_event);
|
|
|
|
static void _dispatch_input_events(const Ref<InputEvent> &p_event);
|
|
|
|
void _dispatch_input_event(const Ref<InputEvent> &p_event);
|
|
|
|
WindowID _find_window_id(id p_window);
|
|
|
|
|
|
|
|
void _set_window_per_pixel_transparency_enabled(bool p_enabled, WindowID p_window);
|
|
|
|
|
|
|
|
Point2i _get_screens_origin() const;
|
|
|
|
Point2i _get_native_screen_position(int p_screen) const;
|
|
|
|
|
|
|
|
void _push_input(const Ref<InputEvent> &p_event);
|
|
|
|
void _process_key_events();
|
2020-03-26 21:22:04 +00:00
|
|
|
void _release_pressed_events();
|
2020-03-07 16:02:54 +00:00
|
|
|
|
|
|
|
String rendering_driver;
|
|
|
|
|
|
|
|
id autoreleasePool;
|
|
|
|
CGEventSourceRef eventSource;
|
|
|
|
|
|
|
|
CursorShape cursor_shape;
|
|
|
|
NSCursor *cursors[CURSOR_MAX];
|
|
|
|
Map<CursorShape, Vector<Variant>> cursors_cache;
|
|
|
|
|
|
|
|
MouseMode mouse_mode;
|
|
|
|
Point2i last_mouse_pos;
|
2021-08-13 21:31:57 +00:00
|
|
|
MouseButton last_button_state = MouseButton::NONE;
|
2020-03-07 16:02:54 +00:00
|
|
|
|
|
|
|
bool window_focused;
|
|
|
|
bool drop_events;
|
2020-03-26 21:22:04 +00:00
|
|
|
bool in_dispatch_input_event = false;
|
2020-03-07 16:02:54 +00:00
|
|
|
|
|
|
|
public:
|
2020-07-10 10:34:39 +00:00
|
|
|
virtual bool has_feature(Feature p_feature) const override;
|
|
|
|
virtual String get_name() const override;
|
2020-03-07 16:02:54 +00:00
|
|
|
|
2020-07-10 10:34:39 +00:00
|
|
|
virtual void global_menu_add_item(const String &p_menu_root, const String &p_label, const Callable &p_callback, const Variant &p_tag = Variant()) override;
|
|
|
|
virtual void global_menu_add_check_item(const String &p_menu_root, const String &p_label, const Callable &p_callback, const Variant &p_tag = Variant()) override;
|
|
|
|
virtual void global_menu_add_submenu_item(const String &p_menu_root, const String &p_label, const String &p_submenu) override;
|
|
|
|
virtual void global_menu_add_separator(const String &p_menu_root) override;
|
2020-03-07 16:02:54 +00:00
|
|
|
|
2020-07-10 10:34:39 +00:00
|
|
|
virtual bool global_menu_is_item_checked(const String &p_menu_root, int p_idx) const override;
|
|
|
|
virtual bool global_menu_is_item_checkable(const String &p_menu_root, int p_idx) const override;
|
|
|
|
virtual Callable global_menu_get_item_callback(const String &p_menu_root, int p_idx) override;
|
|
|
|
virtual Variant global_menu_get_item_tag(const String &p_menu_root, int p_idx) override;
|
|
|
|
virtual String global_menu_get_item_text(const String &p_menu_root, int p_idx) override;
|
|
|
|
virtual String global_menu_get_item_submenu(const String &p_menu_root, int p_idx) override;
|
2020-03-07 16:02:54 +00:00
|
|
|
|
2020-07-10 10:34:39 +00:00
|
|
|
virtual void global_menu_set_item_checked(const String &p_menu_root, int p_idx, bool p_checked) override;
|
|
|
|
virtual void global_menu_set_item_checkable(const String &p_menu_root, int p_idx, bool p_checkable) override;
|
|
|
|
virtual void global_menu_set_item_callback(const String &p_menu_root, int p_idx, const Callable &p_callback) override;
|
|
|
|
virtual void global_menu_set_item_tag(const String &p_menu_root, int p_idx, const Variant &p_tag) override;
|
|
|
|
virtual void global_menu_set_item_text(const String &p_menu_root, int p_idx, const String &p_text) override;
|
|
|
|
virtual void global_menu_set_item_submenu(const String &p_menu_root, int p_idx, const String &p_submenu) override;
|
2020-03-07 16:02:54 +00:00
|
|
|
|
2020-07-10 10:34:39 +00:00
|
|
|
virtual int global_menu_get_item_count(const String &p_menu_root) const override;
|
2020-03-07 16:02:54 +00:00
|
|
|
|
2020-07-10 10:34:39 +00:00
|
|
|
virtual void global_menu_remove_item(const String &p_menu_root, int p_idx) override;
|
|
|
|
virtual void global_menu_clear(const String &p_menu_root) override;
|
2020-03-07 16:02:54 +00:00
|
|
|
|
2020-07-10 10:34:39 +00:00
|
|
|
virtual Error dialog_show(String p_title, String p_description, Vector<String> p_buttons, const Callable &p_callback) override;
|
|
|
|
virtual Error dialog_input_text(String p_title, String p_description, String p_partial, const Callable &p_callback) override;
|
2020-03-07 16:02:54 +00:00
|
|
|
|
2020-07-10 10:34:39 +00:00
|
|
|
virtual void mouse_set_mode(MouseMode p_mode) override;
|
|
|
|
virtual MouseMode mouse_get_mode() const override;
|
2020-03-07 16:02:54 +00:00
|
|
|
|
2020-07-10 10:34:39 +00:00
|
|
|
virtual void mouse_warp_to_position(const Point2i &p_to) override;
|
|
|
|
virtual Point2i mouse_get_position() const override;
|
2021-03-25 20:56:12 +00:00
|
|
|
virtual MouseButton mouse_get_button_state() const override;
|
2020-03-07 16:02:54 +00:00
|
|
|
|
2020-07-10 10:34:39 +00:00
|
|
|
virtual void clipboard_set(const String &p_text) override;
|
|
|
|
virtual String clipboard_get() const override;
|
2020-03-07 16:02:54 +00:00
|
|
|
|
2020-07-10 10:34:39 +00:00
|
|
|
virtual int get_screen_count() const override;
|
|
|
|
virtual Point2i screen_get_position(int p_screen = SCREEN_OF_MAIN_WINDOW) const override;
|
|
|
|
virtual Size2i screen_get_size(int p_screen = SCREEN_OF_MAIN_WINDOW) const override;
|
|
|
|
virtual int screen_get_dpi(int p_screen = SCREEN_OF_MAIN_WINDOW) const override;
|
|
|
|
virtual float screen_get_scale(int p_screen = SCREEN_OF_MAIN_WINDOW) const override;
|
|
|
|
virtual float screen_get_max_scale() const override;
|
|
|
|
virtual Rect2i screen_get_usable_rect(int p_screen = SCREEN_OF_MAIN_WINDOW) const override;
|
2020-03-07 16:02:54 +00:00
|
|
|
|
2020-07-10 10:34:39 +00:00
|
|
|
virtual Vector<int> get_window_list() const override;
|
2020-03-07 16:02:54 +00:00
|
|
|
|
2021-06-19 15:44:59 +00:00
|
|
|
virtual WindowID create_sub_window(WindowMode p_mode, VSyncMode p_vsync_mode, uint32_t p_flags, const Rect2i &p_rect = Rect2i()) override;
|
2020-08-21 07:39:30 +00:00
|
|
|
virtual void show_window(WindowID p_id) override;
|
2020-07-10 10:34:39 +00:00
|
|
|
virtual void delete_sub_window(WindowID p_id) override;
|
2020-03-07 16:02:54 +00:00
|
|
|
|
2020-07-10 10:34:39 +00:00
|
|
|
virtual void window_set_rect_changed_callback(const Callable &p_callable, WindowID p_window = MAIN_WINDOW_ID) override;
|
|
|
|
virtual void window_set_window_event_callback(const Callable &p_callable, WindowID p_window = MAIN_WINDOW_ID) override;
|
|
|
|
virtual void window_set_input_event_callback(const Callable &p_callable, WindowID p_window = MAIN_WINDOW_ID) override;
|
|
|
|
virtual void window_set_input_text_callback(const Callable &p_callable, WindowID p_window = MAIN_WINDOW_ID) override;
|
|
|
|
virtual void window_set_drop_files_callback(const Callable &p_callable, WindowID p_window = MAIN_WINDOW_ID) override;
|
2020-03-07 16:02:54 +00:00
|
|
|
|
2020-07-10 10:34:39 +00:00
|
|
|
virtual void window_set_title(const String &p_title, WindowID p_window = MAIN_WINDOW_ID) override;
|
2020-06-29 09:31:36 +00:00
|
|
|
virtual void window_set_mouse_passthrough(const Vector<Vector2> &p_region, WindowID p_window = MAIN_WINDOW_ID) override;
|
2020-03-07 16:02:54 +00:00
|
|
|
|
2020-07-10 10:34:39 +00:00
|
|
|
virtual int window_get_current_screen(WindowID p_window = MAIN_WINDOW_ID) const override;
|
|
|
|
virtual void window_set_current_screen(int p_screen, WindowID p_window = MAIN_WINDOW_ID) override;
|
2020-03-07 16:02:54 +00:00
|
|
|
|
2020-07-10 10:34:39 +00:00
|
|
|
virtual Point2i window_get_position(WindowID p_window = MAIN_WINDOW_ID) const override;
|
|
|
|
virtual void window_set_position(const Point2i &p_position, WindowID p_window = MAIN_WINDOW_ID) override;
|
2020-03-07 16:02:54 +00:00
|
|
|
|
2020-07-10 10:34:39 +00:00
|
|
|
virtual void window_set_transient(WindowID p_window, WindowID p_parent) override;
|
2020-03-07 16:02:54 +00:00
|
|
|
|
2020-07-10 10:34:39 +00:00
|
|
|
virtual void window_set_max_size(const Size2i p_size, WindowID p_window = MAIN_WINDOW_ID) override;
|
|
|
|
virtual Size2i window_get_max_size(WindowID p_window = MAIN_WINDOW_ID) const override;
|
2020-03-07 16:02:54 +00:00
|
|
|
|
2020-07-10 10:34:39 +00:00
|
|
|
virtual void window_set_min_size(const Size2i p_size, WindowID p_window = MAIN_WINDOW_ID) override;
|
|
|
|
virtual Size2i window_get_min_size(WindowID p_window = MAIN_WINDOW_ID) const override;
|
2020-03-07 16:02:54 +00:00
|
|
|
|
2020-07-10 10:34:39 +00:00
|
|
|
virtual void window_set_size(const Size2i p_size, WindowID p_window = MAIN_WINDOW_ID) override;
|
|
|
|
virtual Size2i window_get_size(WindowID p_window = MAIN_WINDOW_ID) const override;
|
|
|
|
virtual Size2i window_get_real_size(WindowID p_window = MAIN_WINDOW_ID) const override;
|
2020-03-07 16:02:54 +00:00
|
|
|
|
2020-07-10 10:34:39 +00:00
|
|
|
virtual void window_set_mode(WindowMode p_mode, WindowID p_window = MAIN_WINDOW_ID) override;
|
|
|
|
virtual WindowMode window_get_mode(WindowID p_window = MAIN_WINDOW_ID) const override;
|
2020-03-07 16:02:54 +00:00
|
|
|
|
2020-07-10 10:34:39 +00:00
|
|
|
virtual bool window_is_maximize_allowed(WindowID p_window = MAIN_WINDOW_ID) const override;
|
2020-03-07 16:02:54 +00:00
|
|
|
|
2020-07-10 10:34:39 +00:00
|
|
|
virtual void window_set_flag(WindowFlags p_flag, bool p_enabled, WindowID p_window = MAIN_WINDOW_ID) override;
|
|
|
|
virtual bool window_get_flag(WindowFlags p_flag, WindowID p_window = MAIN_WINDOW_ID) const override;
|
2020-03-07 16:02:54 +00:00
|
|
|
|
2020-07-10 10:34:39 +00:00
|
|
|
virtual void window_request_attention(WindowID p_window = MAIN_WINDOW_ID) override;
|
|
|
|
virtual void window_move_to_foreground(WindowID p_window = MAIN_WINDOW_ID) override;
|
2020-03-07 16:02:54 +00:00
|
|
|
|
2020-07-10 10:34:39 +00:00
|
|
|
virtual bool window_can_draw(WindowID p_window = MAIN_WINDOW_ID) const override;
|
2020-03-07 16:02:54 +00:00
|
|
|
|
2020-07-10 10:34:39 +00:00
|
|
|
virtual bool can_any_window_draw() const override;
|
2020-03-07 16:02:54 +00:00
|
|
|
|
2020-07-10 10:34:39 +00:00
|
|
|
virtual void window_set_ime_active(const bool p_active, WindowID p_window = MAIN_WINDOW_ID) override;
|
|
|
|
virtual void window_set_ime_position(const Point2i &p_pos, WindowID p_window = MAIN_WINDOW_ID) override;
|
2020-03-07 16:02:54 +00:00
|
|
|
|
2020-07-10 10:34:39 +00:00
|
|
|
virtual WindowID get_window_at_screen_position(const Point2i &p_position) const override;
|
2020-03-07 16:02:54 +00:00
|
|
|
|
2020-07-10 10:34:39 +00:00
|
|
|
virtual void window_attach_instance_id(ObjectID p_instance, WindowID p_window = MAIN_WINDOW_ID) override;
|
|
|
|
virtual ObjectID window_get_attached_instance_id(WindowID p_window = MAIN_WINDOW_ID) const override;
|
2021-11-02 10:27:38 +00:00
|
|
|
virtual void gl_window_make_current(DisplayServer::WindowID p_window_id) override;
|
2020-03-07 16:02:54 +00:00
|
|
|
|
2021-06-19 15:44:59 +00:00
|
|
|
virtual void window_set_vsync_mode(DisplayServer::VSyncMode p_vsync_mode, WindowID p_window = MAIN_WINDOW_ID) override;
|
|
|
|
virtual DisplayServer::VSyncMode window_get_vsync_mode(WindowID p_vsync_mode) const override;
|
|
|
|
|
2020-07-10 10:34:39 +00:00
|
|
|
virtual Point2i ime_get_selection() const override;
|
|
|
|
virtual String ime_get_text() const override;
|
2020-03-07 16:02:54 +00:00
|
|
|
|
2020-07-10 10:34:39 +00:00
|
|
|
virtual void cursor_set_shape(CursorShape p_shape) override;
|
|
|
|
virtual CursorShape cursor_get_shape() const override;
|
|
|
|
virtual void cursor_set_custom_image(const RES &p_cursor, CursorShape p_shape = CURSOR_ARROW, const Vector2 &p_hotspot = Vector2()) override;
|
2020-03-07 16:02:54 +00:00
|
|
|
|
2020-07-08 23:02:38 +00:00
|
|
|
virtual bool get_swap_cancel_ok() override;
|
2020-03-07 16:02:54 +00:00
|
|
|
|
2020-07-10 10:34:39 +00:00
|
|
|
virtual int keyboard_get_layout_count() const override;
|
|
|
|
virtual int keyboard_get_current_layout() const override;
|
|
|
|
virtual void keyboard_set_current_layout(int p_index) override;
|
|
|
|
virtual String keyboard_get_layout_language(int p_index) const override;
|
|
|
|
virtual String keyboard_get_layout_name(int p_index) const override;
|
2021-09-17 01:07:59 +00:00
|
|
|
virtual Key keyboard_get_keycode_from_physical(Key p_keycode) const override;
|
2020-03-07 16:02:54 +00:00
|
|
|
|
2020-07-10 10:34:39 +00:00
|
|
|
virtual void process_events() override;
|
|
|
|
virtual void force_process_and_drop_events() override;
|
2020-03-07 16:02:54 +00:00
|
|
|
|
2020-07-10 10:34:39 +00:00
|
|
|
virtual void release_rendering_thread() override;
|
|
|
|
virtual void make_rendering_thread() override;
|
|
|
|
virtual void swap_buffers() override;
|
2020-03-07 16:02:54 +00:00
|
|
|
|
2020-07-10 10:34:39 +00:00
|
|
|
virtual void set_native_icon(const String &p_filename) override;
|
|
|
|
virtual void set_icon(const Ref<Image> &p_icon) override;
|
2020-03-07 16:02:54 +00:00
|
|
|
|
2021-06-19 15:44:59 +00:00
|
|
|
static DisplayServer *create_func(const String &p_rendering_driver, WindowMode p_mode, VSyncMode p_vsync_mode, uint32_t p_flags, const Vector2i &p_resolution, Error &r_error);
|
2020-03-07 16:02:54 +00:00
|
|
|
static Vector<String> get_rendering_drivers_func();
|
|
|
|
|
|
|
|
static void register_osx_driver();
|
|
|
|
|
2021-06-19 15:44:59 +00:00
|
|
|
DisplayServerOSX(const String &p_rendering_driver, WindowMode p_mode, VSyncMode p_vsync_mode, uint32_t p_flags, const Vector2i &p_resolution, Error &r_error);
|
2020-03-07 16:02:54 +00:00
|
|
|
~DisplayServerOSX();
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif // DISPLAY_SERVER_OSX_H
|