diff options
| author | Pierre Ossman <ossman@cendio.se> | 2014-06-11 09:10:53 +0000 |
|---|---|---|
| committer | Pierre Ossman <ossman@cendio.se> | 2014-06-11 09:10:53 +0000 |
| commit | 0cfc2554c695bd472ce9e579ddcf1240f4fa155a (patch) | |
| tree | 0b3723e49f86b076a19f110a4923b3c72389c576 /FL | |
| parent | f27bde8316b28db2fc3214ce97fd4278e2d9efec (diff) | |
Support for full screen over multiple monitors.
The API follows that of EWMH, which gives you a good control
over which monitors to use.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10189 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'FL')
| -rw-r--r-- | FL/Fl_Window.H | 37 | ||||
| -rw-r--r-- | FL/win32.H | 1 |
2 files changed, 34 insertions, 4 deletions
diff --git a/FL/Fl_Window.H b/FL/Fl_Window.H index d6997e601..a9fa82e24 100644 --- a/FL/Fl_Window.H +++ b/FL/Fl_Window.H @@ -49,7 +49,7 @@ class Fl_X; class FL_EXPORT Fl_Window : public Fl_Group { static char *default_xclass_; - // Note: we must use separate statements for each of the following 4 variables, + // Note: we must use separate statements for each of the following 8 variables, // with the static attribute, otherwise MS VC++ 2008/2010 complains :-( // AlbrechtS 04/2012 #if FLTK_ABI_VERSION < 10301 @@ -68,6 +68,22 @@ class FL_EXPORT Fl_Window : public Fl_Group { static // when these members are static, ABI compatibility with 1.3.0 is respected #endif int no_fullscreen_h; +#if FLTK_ABI_VERSION < 10303 + static // when these members are static, ABI compatibility with 1.3.2 is respected +#endif + int fullscreen_screen_top; +#if FLTK_ABI_VERSION < 10303 + static // when these members are static, ABI compatibility with 1.3.2 is respected +#endif + int fullscreen_screen_bottom; +#if FLTK_ABI_VERSION < 10303 + static // when these members are static, ABI compatibility with 1.3.2 is respected +#endif + int fullscreen_screen_left; +#if FLTK_ABI_VERSION < 10303 + static // when these members are static, ABI compatibility with 1.3.2 is respected +#endif + int fullscreen_screen_right; friend class Fl_X; Fl_X *i; // points at the system-specific stuff @@ -402,13 +418,15 @@ public: */ void show(int argc, char **argv); /** - Makes the window completely fill the screen, without any window - manager border visible. You must use fullscreen_off() to undo - this. + Makes the window completely fill one or more screens, without any + window manager border visible. You must use fullscreen_off() to + undo this. \note On some platforms, this can result in the keyboard being grabbed. The window may also be recreated, meaning hide() and show() will be called. + + \see void Fl_Window::fullscreen_screens() */ void fullscreen(); /** @@ -425,6 +443,17 @@ public: */ unsigned int fullscreen_active() const { return flags() & FULLSCREEN; } /** + Sets which screens should be used when this window is in fullscreen + mode. The window will be resized to the top of the screen with index + \p top, the bottom of the screen with index \p bottom, etc. + + If this method is never called, or if any argument is < 0, then the + window will be resized to fill the screen it is currently on. + + \see void Fl_Window::fullscreen() + */ + void fullscreen_screens(int top, int bottom, int left, int right); + /** Iconifies the window. If you call this when shown() is false it will show() it as an icon. If the window is already iconified this does nothing. diff --git a/FL/win32.H b/FL/win32.H index dec7cebbf..b6cd0edfd 100644 --- a/FL/win32.H +++ b/FL/win32.H @@ -79,6 +79,7 @@ public: static Fl_X* i(const Fl_Window* w) {return w->i;} static int fake_X_wm(const Fl_Window* w,int &X, int &Y, int &bt,int &bx,int &by); + void make_fullscreen(int X, int Y, int W, int H); void setwindow(Fl_Window* wi) {w=wi; wi->i=this;} void flush() {w->flush();} void set_minmax(LPMINMAXINFO minmax); |
