diff options
author | David Robillard <d@drobilla.net> | 2023-01-08 01:02:07 -0500 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2023-01-08 01:06:37 -0500 |
commit | 92b5ab6bdfc8450ed3c4e4e7006cee949386dcd4 (patch) | |
tree | aa91ae18efac00651f73efef51173edbcc00489f /include/pugl | |
parent | 14b35ef217f5ee387c4f33b1b24bebb015e18f23 (diff) | |
download | pugl-92b5ab6bdfc8450ed3c4e4e7006cee949386dcd4.tar.gz pugl-92b5ab6bdfc8450ed3c4e4e7006cee949386dcd4.tar.bz2 pugl-92b5ab6bdfc8450ed3c4e4e7006cee949386dcd4.zip |
Add support for raising windows
Diffstat (limited to 'include/pugl')
-rw-r--r-- | include/pugl/pugl.h | 34 |
1 files changed, 33 insertions, 1 deletions
diff --git a/include/pugl/pugl.h b/include/pugl/pugl.h index 22cdfca..338aa4d 100644 --- a/include/pugl/pugl.h +++ b/include/pugl/pugl.h @@ -1213,6 +1213,38 @@ PUGL_API PuglStatus puglUnrealize(PuglView* view); +/// A command to control the behaviour of puglShow() +typedef enum { + /** + Realize and show the window without intentionally raising it. + + This will weakly "show" the window but without making any effort to raise + it. Depending on the platform or system configuration, the window may be + raised above some others regardless. + */ + PUGL_SHOW_PASSIVE, + + /** + Raise the window to the top of the application's stack. + + This is the normal "well-behaved" way to show and raise the window, which + should be used in most cases. + */ + PUGL_SHOW_RAISE, + + /** + Aggressively force the window to be raised to the top. + + This will attempt to raise the window to the top, even if this isn't the + active application, or if doing so would otherwise go against the + platform's guidelines. This generally shouldn't be used, and isn't + guaranteed to work. On modern Windows systems, the active application + must explicitly grant permission for others to steal the foreground from + it. + */ + PUGL_SHOW_FORCE_RAISE, +} PuglShowCommand; + /** Show the view. @@ -1224,7 +1256,7 @@ puglUnrealize(PuglView* view); */ PUGL_API PuglStatus -puglShow(PuglView* view); +puglShow(PuglView* view, PuglShowCommand command); /// Hide the current window PUGL_API |