summaryrefslogtreecommitdiff
path: root/servers/display_server.h
diff options
context:
space:
mode:
Diffstat (limited to 'servers/display_server.h')
-rw-r--r--servers/display_server.h11
1 files changed, 7 insertions, 4 deletions
diff --git a/servers/display_server.h b/servers/display_server.h
index 5bc7085564..ee53ec1ca0 100644
--- a/servers/display_server.h
+++ b/servers/display_server.h
@@ -73,7 +73,7 @@ public:
OPENGL_CONTEXT,
};
- typedef DisplayServer *(*CreateFunction)(const String &, WindowMode, VSyncMode, uint32_t, const Point2i *, const Size2i &, Error &r_error);
+ typedef DisplayServer *(*CreateFunction)(const String &, WindowMode, VSyncMode, uint32_t, const Point2i *, const Size2i &, int p_screen, Error &r_error);
typedef Vector<String> (*GetRenderingDriversFunction)();
private:
@@ -242,12 +242,15 @@ public:
virtual Rect2i get_display_safe_area() const { return screen_get_usable_rect(); }
enum {
- SCREEN_OF_MAIN_WINDOW = -1
+ SCREEN_PRIMARY = -2,
+ SCREEN_OF_MAIN_WINDOW = -1, // Note: for the main window, determine screen from position.
};
const float SCREEN_REFRESH_RATE_FALLBACK = -1.0; // Returned by screen_get_refresh_rate if the method fails.
virtual int get_screen_count() const = 0;
+ virtual int get_primary_screen() const = 0;
+ virtual int get_screen_from_rect(const Rect2 &p_rect) const;
virtual Point2i screen_get_position(int p_screen = SCREEN_OF_MAIN_WINDOW) const = 0;
virtual Size2i screen_get_size(int p_screen = SCREEN_OF_MAIN_WINDOW) const = 0;
virtual Rect2i screen_get_usable_rect(int p_screen = SCREEN_OF_MAIN_WINDOW) const = 0;
@@ -312,7 +315,7 @@ public:
WINDOW_FLAG_EXTEND_TO_TITLE_BIT = (1 << WINDOW_FLAG_EXTEND_TO_TITLE),
};
- virtual WindowID create_sub_window(WindowMode p_mode, VSyncMode p_vsync_mode, uint32_t p_flags, const Rect2i &p_rect = Rect2i(), int p_screen = 0);
+ virtual WindowID create_sub_window(WindowMode p_mode, VSyncMode p_vsync_mode, uint32_t p_flags, const Rect2i &p_rect = Rect2i());
virtual void show_window(WindowID p_id);
virtual void delete_sub_window(WindowID p_id);
@@ -485,7 +488,7 @@ public:
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);
- static DisplayServer *create(int p_index, const String &p_rendering_driver, WindowMode p_mode, VSyncMode p_vsync_mode, uint32_t p_flags, const Vector2i *p_position, const Vector2i &p_resolution, Error &r_error);
+ static DisplayServer *create(int p_index, const String &p_rendering_driver, WindowMode p_mode, VSyncMode p_vsync_mode, uint32_t p_flags, const Vector2i *p_position, const Vector2i &p_resolution, int p_screen, Error &r_error);
DisplayServer();
~DisplayServer();