aboutsummaryrefslogtreecommitdiffstats
path: root/src/common.c
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2023-01-07 19:27:14 -0500
committerDavid Robillard <d@drobilla.net>2023-01-07 20:27:35 -0500
commit4ad8621ac1d94c8e9cf88f83c46a3a70cd91212b (patch)
tree63307cb14d43c7391b34f94ca0e532d8e9e01a09 /src/common.c
parent677e13dcbb5b64ce85093b9ea5c14025964e35b9 (diff)
downloadpugl-4ad8621ac1d94c8e9cf88f83c46a3a70cd91212b.tar.gz
pugl-4ad8621ac1d94c8e9cf88f83c46a3a70cd91212b.tar.bz2
pugl-4ad8621ac1d94c8e9cf88f83c46a3a70cd91212b.zip
Add support for special view types and styles
Diffstat (limited to 'src/common.c')
-rw-r--r--src/common.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/common.c b/src/common.c
index 3c2929f..0249e0d 100644
--- a/src/common.c
+++ b/src/common.c
@@ -106,6 +106,7 @@ puglSetDefaultHints(PuglHints hints)
hints[PUGL_RESIZABLE] = PUGL_FALSE;
hints[PUGL_IGNORE_KEY_REPEAT] = PUGL_FALSE;
hints[PUGL_REFRESH_RATE] = PUGL_DONT_CARE;
+ hints[PUGL_VIEW_TYPE] = PUGL_DONT_CARE;
}
PuglView*
@@ -255,11 +256,18 @@ puglGetTransientParent(const PuglView* const view)
bool
puglGetVisible(const PuglView* view)
{
- return view->stage == PUGL_VIEW_STAGE_MAPPED;
+ return view->stage == PUGL_VIEW_STAGE_MAPPED &&
+ !(view->lastConfigure.style & PUGL_VIEW_STYLE_HIDDEN);
}
void*
-puglGetContext(PuglView* view)
+puglGetContext(PuglView* const view)
{
return view->backend->getContext(view);
}
+
+PuglViewStyleFlags
+puglGetViewStyle(const PuglView* const view)
+{
+ return view->lastConfigure.style;
+}