From adc925180be3a8b4a970c70c58ef6c3de6993458 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Mon, 23 Nov 2020 17:14:21 +0100 Subject: Rename puglShowWindow and puglHideWindow to puglShow an puglHide These names were confusing because a view is not necessarily a window. Since there's no room for ambiguity here, simply drop the superfluous word. --- src/implementation.c | 12 ++++++++++++ src/mac.m | 4 ++-- src/win.c | 4 ++-- src/x11.c | 4 ++-- 4 files changed, 18 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/implementation.c b/src/implementation.c index 35c4c26..23bfbde 100644 --- a/src/implementation.c +++ b/src/implementation.c @@ -289,6 +289,18 @@ puglDispatchEvents(PuglWorld* world) return puglUpdate(world, 0.0); } +PuglStatus +puglShowWindow(PuglView* view) +{ + return puglShow(view); +} + +PuglStatus +puglHideWindow(PuglView* view) +{ + return puglHide(view); +} + #endif PuglStatus diff --git a/src/mac.m b/src/mac.m index 3d1fba2..6b8761f 100644 --- a/src/mac.m +++ b/src/mac.m @@ -1007,7 +1007,7 @@ puglRealize(PuglView* view) } PuglStatus -puglShowWindow(PuglView* view) +puglShow(PuglView* view) { if (![view->impl->window isVisible]) { [view->impl->window setIsVisible:YES]; @@ -1019,7 +1019,7 @@ puglShowWindow(PuglView* view) } PuglStatus -puglHideWindow(PuglView* view) +puglHide(PuglView* view) { [view->impl->window setIsVisible:NO]; return PUGL_SUCCESS; diff --git a/src/win.c b/src/win.c index d7c0d57..3189220 100644 --- a/src/win.c +++ b/src/win.c @@ -218,7 +218,7 @@ puglRealize(PuglView* view) } PuglStatus -puglShowWindow(PuglView* view) +puglShow(PuglView* view) { PuglInternals* impl = view->impl; @@ -228,7 +228,7 @@ puglShowWindow(PuglView* view) } PuglStatus -puglHideWindow(PuglView* view) +puglHide(PuglView* view) { PuglInternals* impl = view->impl; diff --git a/src/x11.c b/src/x11.c index 79a0fba..bf9331c 100644 --- a/src/x11.c +++ b/src/x11.c @@ -394,7 +394,7 @@ puglRealize(PuglView* view) } PuglStatus -puglShowWindow(PuglView* view) +puglShow(PuglView* view) { PuglStatus st = PUGL_SUCCESS; @@ -411,7 +411,7 @@ puglShowWindow(PuglView* view) } PuglStatus -puglHideWindow(PuglView* view) +puglHide(PuglView* view) { XUnmapWindow(view->impl->display, view->impl->win); return PUGL_SUCCESS; -- cgit v1.2.1