summaryrefslogtreecommitdiff
path: root/pugl/pugl_osx.m
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2013-03-18 19:49:48 +0000
committerDavid Robillard <d@drobilla.net>2013-03-18 19:49:48 +0000
commitcea41bcb9be36fdfe9d273133996e1622586f27b (patch)
treee93871a5fc04ad3be78ed37a8d819d875919f68a /pugl/pugl_osx.m
parentd5bfc40d6dd1834d28db9e0739a8286878e3d77a (diff)
Addition of visible parameter and other minor fixes from FalkTX.
Diffstat (limited to 'pugl/pugl_osx.m')
-rw-r--r--pugl/pugl_osx.m25
1 files changed, 12 insertions, 13 deletions
diff --git a/pugl/pugl_osx.m b/pugl/pugl_osx.m
index 5621edc..a9bbd24 100644
--- a/pugl/pugl_osx.m
+++ b/pugl/pugl_osx.m
@@ -36,8 +36,6 @@
defer:(BOOL)flag;
- (void) setPuglview:(PuglView*)view;
- (BOOL) windowShouldClose:(id)sender;
-- (void) becomeKeyWindow:(id)sender;
-- (BOOL) canBecomeKeyWindow:(id)sender;
@end
@implementation PuglWindow
@@ -74,6 +72,14 @@
@end
+void
+puglDisplay(PuglView* view)
+{
+ if (view->displayFunc) {
+ view->displayFunc(view);
+ }
+}
+
@interface PuglOpenGLView : NSOpenGLView
{
int colorBits;
@@ -169,9 +175,9 @@
}
static unsigned
-getModifiers(PuglView* view, NSevent* ev)
+getModifiers(PuglView* view, NSEvent* ev)
{
- const unsigned modifierFlags = [ev modifierFlags]
+ const unsigned modifierFlags = [ev modifierFlags];
view->event_timestamp_ms = fmod([ev timestamp] * 1000.0, UINT32_MAX);
@@ -320,7 +326,8 @@ puglCreate(PuglNativeWindow parent,
const char* title,
int width,
int height,
- bool resizable)
+ bool resizable,
+ bool visible)
{
PuglView* view = (PuglView*)calloc(1, sizeof(PuglView));
PuglInternals* impl = (PuglInternals*)calloc(1, sizeof(PuglInternals));
@@ -369,14 +376,6 @@ puglDestroy(PuglView* view)
free(view);
}
-void
-puglDisplay(PuglView* view)
-{
- if (view->displayFunc) {
- view->displayFunc(view);
- }
-}
-
PuglStatus
puglProcessEvents(PuglView* view)
{