diff options
Diffstat (limited to 'pugl/pugl_osx.m')
-rw-r--r-- | pugl/pugl_osx.m | 25 |
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) { |