diff options
Diffstat (limited to 'servers/display_server.h')
-rw-r--r-- | servers/display_server.h | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/servers/display_server.h b/servers/display_server.h index 8ed0b11d03..93db7ef844 100644 --- a/servers/display_server.h +++ b/servers/display_server.h @@ -57,8 +57,9 @@ public: WINDOW_MODE_FULLSCREEN }; - typedef DisplayServer *(*CreateFunction)(const String &, WindowMode, uint32_t, const Size2i &, Error &r_error); //video driver, window mode, resolution - typedef Vector<String> (*GetVideoDriversFunction)(); //video driver, window mode, resolution + typedef DisplayServer *(*CreateFunction)(const String &, WindowMode, uint32_t, const Size2i &, Error &r_error); + typedef Vector<String> (*GetRenderingDriversFunction)(); + private: static void _input_set_mouse_mode(InputFilter::MouseMode p_mode); static InputFilter::MouseMode _input_get_mouse_mode(); @@ -68,20 +69,21 @@ private: protected: static void _bind_methods(); + enum { MAX_SERVERS = 64 }; struct DisplayServerCreate { const char *name; - GetVideoDriversFunction get_rendering_drivers_function; CreateFunction create_function; + GetRenderingDriversFunction get_rendering_drivers_function; }; static DisplayServerCreate server_create_functions[MAX_SERVERS]; static int server_create_count; - friend class VisualServerRaster; + friend class RenderingServerRaster; virtual void _set_use_vsync(bool p_enable); public: @@ -178,7 +180,7 @@ public: }; virtual void screen_set_orientation(ScreenOrientation p_orientation, int p_screen = SCREEN_OF_MAIN_WINDOW); - ScreenOrientation screen_get_orientation(int p_screen = SCREEN_OF_MAIN_WINDOW) const; + virtual ScreenOrientation screen_get_orientation(int p_screen = SCREEN_OF_MAIN_WINDOW) const; virtual void screen_set_keep_on(bool p_enable); //disable screensaver virtual bool screen_is_kept_on() const; @@ -198,6 +200,10 @@ public: WINDOW_FLAG_TRANSPARENT, WINDOW_FLAG_NO_FOCUS, WINDOW_FLAG_MAX, + }; + + // Separate enum otherwise we get warnings in switches not handling all values. + enum WindowFlagsBit { WINDOW_FLAG_RESIZE_DISABLED_BIT = (1 << WINDOW_FLAG_RESIZE_DISABLED), WINDOW_FLAG_BORDERLESS_BIT = (1 << WINDOW_FLAG_BORDERLESS), WINDOW_FLAG_ALWAYS_ON_TOP_BIT = (1 << WINDOW_FLAG_ALWAYS_ON_TOP), @@ -361,7 +367,7 @@ public: virtual void set_context(Context p_context); - static void register_create_function(const char *p_name, CreateFunction p_function, GetVideoDriversFunction p_get_drivers); + static void register_create_function(const char *p_name, CreateFunction p_function, GetRenderingDriversFunction p_get_drivers); static int get_create_function_count(); static const char *get_create_function_name(int p_index); static Vector<String> get_create_function_rendering_drivers(int p_index); |