aboutsummaryrefslogtreecommitdiffstats
path: root/pugl/detail/mac.m
AgeCommit message (Collapse)AuthorFilesLines
2020-10-04Add puglGetViewHint()David Robillard1-0/+14
This allows retrieving properties of the view that may be needed, such as the actual bit depth (which may vary from the suggested depth provided as a hint).
2020-07-05Replace isHint bool with a flagDavid Robillard1-1/+0
I don't have any particular future use case in mind, but I think the concept makes sense for general events and it seems it could be useful for things like gestures as well. Also fixes another padding warning in the API.
2020-07-05Add scroll direction fieldDavid Robillard1-13/+26
2020-07-05Replace grab flag in PuglEventFocus with crossing modeDavid Robillard1-2/+2
2020-07-05Remove redundant focus field from PuglEventMotionDavid Robillard1-1/+0
2020-07-05Remove count field from PuglEventExposeDavid Robillard1-1/+0
This was never particularly useful, and it makes no sense with the new drawing model, even on X11, so its presence just adds confusion. So, remove it, which also conveniently fixes a padding warning in PuglEventExpose.
2020-07-02Mac: Fix implicit conversion warningsDavid Robillard1-3/+3
2020-07-02Mac: Declare instance variables in implementationDavid Robillard1-3/+16
Declaring instance variables in interfaces is deprecated, according to Wobjc-interface-vars (Apple clang version 11.0.0).
2020-06-13Mac: Only create an AutoreleasePool for programsDavid Robillard1-5/+10
Avoids crashes in some plugin scenarios when draining the AutoreleasePool. This is still probably not ideal, more fine-grained use of auto release facilities might be more appropriate here.
2020-06-13Add puglSetCursor()Jean Pierre Cimalando1-1/+50
2020-06-13Fix mouse position of events on high resolution MacOSDavid Robillard1-1/+11
2020-05-16Add default and maximum sizeDavid Robillard1-7/+58
2020-05-16Fix indentationDavid Robillard1-3/+3
2020-05-16Use email address in copyright headersDavid Robillard1-1/+1
Not really sure why I used a web link here (maybe because it's more stable), but this is more conventional.
2020-05-16Fix file documentationDavid Robillard1-1/+2
2020-04-08Mac: Use high-resolution backing surfacesDavid Robillard1-37/+96
2020-04-06Implement puglSetTransientFor() for Mac and WindowsDavid Robillard1-0/+17
2020-04-03Mac: Use NSMakeRect over CGRectMakeDavid Robillard1-1/+1
Using CGRectMake here apparently doesn't work on older versions of MacOS.
2020-04-01Consistently use "view" terminology in APIDavid Robillard1-2/+2
The sloppy use of "window" caused quite a bit of confusion, since views only correspond to top-level windows in some cases, and on MacOS, a non-top-level view is not a "window" at all.
2020-04-01Replace puglShowWindow() with puglRealize()David Robillard1-13/+16
2020-03-31Mac: Fix various warningsDavid Robillard1-16/+21
2020-03-17Use clearer names for pointer eventsDavid Robillard1-3/+3
These old "notify" names are a smell from X11 which is a bit strange and inconsistent here, since nearly everything is a "notification" of sorts. I think the new names here are much more clear since they are consistent with the keyboard focus events.
2020-03-16Simplify puglRequestAttention()David Robillard1-17/+0
Now that timers are exposed, applications can repeatedly nag for attention themselves if they really want to.
2020-03-16Add timer eventsDavid Robillard1-0/+44
2020-03-16MacOS: Fix semantics of puglUpdate() with negative timeoutDavid Robillard1-0/+6
2020-03-16MacOS: Move initial configure to just before mapDavid Robillard1-11/+10
2020-03-16Factor out dispatching configure events in the drawing contextDavid Robillard1-1/+1
The updates here need to happen whenever a configure is dispatched, even outside puglDispatchEvent(). This removes the last remaining direct calls to the event callback so the common implementation can always do the right thing.
2020-03-16Only send update events when the view is visibleDavid Robillard1-1/+4
2020-03-15Unify event loop functions as puglUpdate()David Robillard1-31/+20
The previous separation between polling and dispatching was a lie, especially on MacOS where it is impossible to only poll for events without dispatching anything. Providing such an API is misleading, and problematic in various other ways. So, merge them into a single puglUpdate() function which can do the right thing on all platforms. This also adds the behaviour of actually processing all events in the given time interval, which is almost always what clients actually want to do when using a positive timeout (naively doing this before caused terrible input lag).
2020-03-15Add type and flags to worldDavid Robillard1-1/+2
Unfortunately this is an API break, but there's no reasonable way to deprecate the old function and this is required for things to work correctly. The type will be used in following commits to tick the main loop and dispatch events correctly for either case.
2020-03-15Cleanup: Add puglDispatchSimpleEvent() internal utilityDavid Robillard1-8/+4
2020-03-15Cleanup: Remove redundant PUGL_API declarationsDavid Robillard1-1/+1
2020-03-15Remove backend resize methodDavid Robillard1-8/+0
2020-03-09Add PuglEventClient and puglSendEvent()David Robillard1-0/+48
This event makes it possible to send an arbitrary event to a view, which is useful for many things. In particular, this method of communication with views will wake up the event loop, unlike hacks in applications that share data in some other way.
2020-03-09Add create, destroy, map, and unmap eventsDavid Robillard1-4/+35
These can be used to do things when a view is created or destroyed, in particular set up the GL context in a more controlled way. Map and unmap events are also added for when views are shown and hidden so application can react to this as well. Towards the deprecation of puglEnterContext() and puglLeaveContext(), which are prone to abuse. squash! Remove client event stuff
2020-03-08Mac: Prevent indefinite blocking of puglDispatchEventsDavid Robillard1-0/+9
2020-03-08Mac: Do not dispatch expose events if window is invisibleDavid Robillard1-0/+4
2020-03-08Mac: Make windows initially invisible as on other platformsDavid Robillard1-0/+1
2020-03-08Mac: Fix stub backendDavid Robillard1-17/+0
2020-03-08Cleanup: Fix typoDavid Robillard1-1/+1
2020-03-02Omit deprecated implementations with PUGL_DISABLE_DEPRECATEDDavid Robillard1-0/+4
2020-03-01Cleanup: Adjust some code to be more clang-format friendlyDavid Robillard1-40/+48
2020-03-01Put PuglEventAny member of PuglEvent first for easy initializationDavid Robillard1-6/+3
2019-12-09Mac: Fix missing NSWindowStyleMask type on 10.11Hanspeter Portner1-0/+8
2019-11-21Rename "backend" headersDavid Robillard1-1/+1
Working on Vulkan clarified what has always been slightly smelly about the design and organization here: not everything that is API specific is really in a "backend" (a PuglBackend). The concrete example is puglGetProcAddress(), which only makes sense for GL and is actually implemented in the "backend" files. Arguably puglGetContext() is also such a thing. So, rename the headers so they can be the place where API-specific things go in general, which happens to include a backend most of the time. The stub is a bit of an exception to this, but whatever. The includes look tidier this way. In place of the old headers are compatibility stubs that just emit a warning and include the new version, which will be maintained for a while.
2019-11-20Mac: Move puglGetProcAddress() to mac_gl.mDavid Robillard1-17/+0
2019-11-20Mac: Fix unused parameter warningDavid Robillard1-1/+1
2019-11-03Remove redisplay flag and add puglPostRedisplayRect()David Robillard1-0/+9
2019-11-03Add puglGetNativeWorld()David Robillard1-0/+6
2019-11-03Expose functional stub backendDavid Robillard1-0/+15