diff options
Diffstat (limited to 'platform/osx/os_osx.h')
-rw-r--r-- | platform/osx/os_osx.h | 37 |
1 files changed, 22 insertions, 15 deletions
diff --git a/platform/osx/os_osx.h b/platform/osx/os_osx.h index 190dbcf662..e865c3078f 100644 --- a/platform/osx/os_osx.h +++ b/platform/osx/os_osx.h @@ -40,12 +40,20 @@ #include "drivers/unix/os_unix.h" #include "joypad_osx.h" #include "main/input_default.h" -#include "power_osx.h" #include "servers/audio_server.h" #include "servers/visual/rasterizer.h" #include "servers/visual/visual_server_wrap_mt.h" #include "servers/visual_server.h" +#if defined(OPENGL_ENABLED) +#include "context_gl_osx.h" +#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> @@ -61,7 +69,8 @@ public: bool pressed; bool echo; bool raw; - uint32_t scancode; + uint32_t keycode; + uint32_t physical_keycode; uint32_t unicode; }; @@ -69,8 +78,6 @@ public: int key_event_pos; bool force_quit; - // rasterizer seems to no longer be given to visual server, its using GLES3 directly? - //Rasterizer *rasterizer; VisualServer *visual_server; List<String> args; @@ -93,7 +100,6 @@ public: void process_events(); void process_key_events(); - void *framework; // pthread_key_t current; bool mouse_grab; Point2 mouse_pos; @@ -104,14 +110,21 @@ public: id window_view; id autoreleasePool; id cursor; - NSOpenGLPixelFormat *pixelFormat; - NSOpenGLContext *context; + +#if defined(OPENGL_ENABLED) + ContextGL_OSX *context_gles2; +#endif + +#if defined(VULKAN_ENABLED) + VulkanContextOSX *context_vulkan; + RenderingDeviceVulkan *rendering_device_vulkan; +#endif bool layered_window; CursorShape cursor_shape; NSCursor *cursors[CURSOR_MAX]; - Map<CursorShape, Vector<Variant> > cursors_cache; + Map<CursorShape, Vector<Variant>> cursors_cache; MouseMode mouse_mode; String title; @@ -134,8 +147,6 @@ public: Size2 min_size; Size2 max_size; - PowerOSX *power_manager; - CrashHandler crash_handler; float _mouse_scale(float p_scale) { @@ -169,7 +180,7 @@ public: } }; - Map<String, Vector<GlobalMenuItem> > global_menus; + Map<String, Vector<GlobalMenuItem>> global_menus; void _update_global_menu(); @@ -291,10 +302,6 @@ public: virtual String get_unique_id() const; - virtual OS::PowerState get_power_state(); - virtual int get_power_seconds_left(); - virtual int get_power_percent_left(); - virtual bool _check_internal_feature_support(const String &p_feature); virtual void _set_use_vsync(bool p_enable); |