aboutsummaryrefslogtreecommitdiffstats
path: root/pugl/pugl_osx.m
AgeCommit message (Collapse)AuthorFilesLines
2019-07-24Support additional special keysDavid Robillard1-21/+26
2019-07-24Unify key and character fields and separate text eventsDavid Robillard1-28/+132
Only one field is necessary to store any kind of key, including special keys, since PuglKey occupies a reserved Unicode region. This is generally much simpler to deal with since there is only one value to dispatch on. Text events are separated from key events (like Windows but unlike MacOS or X11) because it is not possible to derive text events from key press events when they occur on Windows. Since merging the two has been the source of some confusion, this approach has some advantages anyway, even though it introduces the need to handle another event type. In the process, text input has been almost completely rewritten. I have tested this with a compose key on X11 and dead keys on Windows and MacOS and everything seems to work correctly, though there may (as always) still be issues with more exotic input methods.
2019-07-24Rename PuglEventKey::utf8 to "string" with char typeDavid Robillard1-2/+2
This matches Gtk and is generally less annoying to work with.
2019-07-24Remove view pointer from eventsDavid Robillard1-16/+11
This makes events POD, which is generally nice. The view was originally added to reflect the display and window references in XEvent, but doesn't seem very useful in Pugl applications.
2019-07-24Simplify modifier translation codeDavid Robillard1-8/+6
2019-07-23Mac: Give new child views focus on creationDavid Robillard1-0/+1
2019-07-23Mac: Fix initial view allocationDavid Robillard1-2/+1
2019-07-23Mac: Fix coordinate systemDavid Robillard1-0/+5
2019-07-21Make windows miniaturizable on MacOSDavid Robillard1-1/+3
2019-07-21Remove redundant and mismatched prototypeDavid Robillard1-5/+2
2019-07-21Add puglRequestAttention()David Robillard1-0/+26
2019-07-21Implement focus on MacOSDavid Robillard1-19/+44
2019-07-21Implement puglGrabFocus on Windows and MacOSDavid Robillard1-1/+1
2019-07-21Implement aspect ratio on MacOSDavid Robillard1-0/+5
Unfortunately MacOS does not seem to support constraints here, so just use the minimum.
2019-07-21Fix Cairo on MacOSDavid Robillard1-3/+5
2019-07-21Implement enter and leave notifications on MacOSDavid Robillard1-2/+24
2019-07-21Remove redundant prototypesDavid Robillard1-21/+0
2019-07-21Draw during resizing on MacOSDavid Robillard1-2/+32
Unfortunately drawing still stalls if the user just grabs the resize handle until the first resize event happens, but it seems to be impossible to fix this without using another thread.
2019-07-21Clean up Objective C syntaxDavid Robillard1-7/+7
2019-07-21Clean up event loop on MacOSDavid Robillard1-20/+14
2019-07-21Fix tracking area implementation on MacOSDavid Robillard1-9/+5
I am not sure why updateTrackingAreas was being spammed before, but that caused the event loop to constantly tick when the mouse was hovered over the window despite nothing else happening. Everything seems to work fine without it, and this seems to match other code, so remove it. Also call super in updateTrackingAreas as suggested by the documentation.
2019-07-21Make time start from approximately zeroDavid Robillard1-1/+1
2019-07-20Remove redisplay flag and use system events insteadDavid Robillard1-1/+0
2019-06-29Implement attributes on MacOSDavid Robillard1-7/+18
2019-06-27Add puglGetTime()David Robillard1-0/+9
2019-06-27Fix window embedding on MacOSStefan Westerfeld1-2/+2
2019-06-27Make event processing non-blocking on MacOSStefan Westerfeld1-4/+8
2019-06-27Defer to NSOpenGLView reshape methodDavid Robillard1-0/+1
This apparently does nothing, but the compiler warns about the missing super call.
2019-06-27Fix const castsDavid Robillard1-10/+10
2019-06-27Consistently use uint32_t everywhereDavid Robillard1-6/+6
2019-04-14Fix MacOS buildDavid Robillard1-1/+4
2019-02-17Add puglGetProcAddress for using OpenGL extensionsDavid Robillard1-0/+16
2019-02-17Add configuration APIDavid Robillard1-2/+2
2019-02-16Clean up includesDavid Robillard1-4/+4
2017-10-03Don't clear entire cairo surface on each exposeDavid Robillard1-6/+0
2017-10-03Fix size constraints on OSXDavid Robillard1-15/+39
2017-10-03Send zero instead of replacement char for invalid key stringsDavid Robillard1-1/+2
2017-10-03Fix implicit integer conversion warningDavid Robillard1-2/+2
2017-07-23Fix duplicate method declarationDavid Robillard1-1/+0
2017-07-23Implement special key handling on MacOSHanspeter Portner1-17/+78
2016-10-27Support many mouse buttons on OSXDavid Robillard1-0/+18
2016-10-27Fix mouse button numbers on OSXDavid Robillard1-2/+2
2016-10-26Fix OSX buildDavid Robillard1-20/+29
2016-09-14Fix puglInitInternals prototypeDavid Robillard1-1/+1
2016-09-01Add PUGL_CLOSE eventDavid Robillard1-2/+7
This allows purely event-driven applications to handle window close. Something more extensible for WM message seems like it might be a good idea here, but I can't think of specific uses, so this will do.
2016-09-01Add puglGetVisible()David Robillard1-0/+2
2016-08-31Replace send_event with extensible flagsDavid Robillard1-7/+7
This is currently functionally equivalent, but taking up space in the event struct for a single bool which could be used for 32 flags for any number of things that might show up in the future seems like a very bad idea.
2016-07-28Add support for Cairo on OSXDavid Robillard1-18/+57
2015-11-12Fix memory leaksDavid Robillard1-0/+1
2015-09-14Fix events on OSX.David Robillard1-8/+15