aboutsummaryrefslogtreecommitdiffstats
path: root/pugl/pugl.h
AgeCommit message (Collapse)AuthorFilesLines
2020-10-20Fix puglSetFrame() error handling on X11David Robillard1-0/+3
2020-10-16Add const attribute to backend accessorsDavid Robillard1-1/+1
2020-10-15Use unsigned constants in enum definitionsDavid Robillard1-5/+5
2020-10-04Add refresh rate hintDavid Robillard1-0/+1
2020-10-04Add puglGetViewHint()David Robillard1-0/+10
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-2/+2
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-10/+27
2020-07-05Replace grab flag in PuglEventFocus with crossing modeDavid Robillard1-3/+3
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-06-13Add puglSetCursor()Jean Pierre Cimalando1-0/+26
2020-05-16Add default and maximum sizeDavid Robillard1-0/+20
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-06Implement puglSetTransientFor() for Mac and WindowsDavid Robillard1-0/+3
2020-04-03Rewrite C++ bindingsDavid Robillard1-21/+31
2020-04-02Make puglGetVisible() take a const view argumentDavid Robillard1-1/+1
2020-04-01Add types and documentation for all event typesDavid Robillard1-6/+72
These are not necessary since they are just aliases for PuglEventAny, but provide a place to put the documentation, and can make code clearer where a specific event type is known.
2020-04-01Consistently use "view" terminology in APIDavid Robillard1-15/+26
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-01Add PUGL_BAD_PARAMETER statusDavid Robillard1-0/+1
2020-04-01Replace puglShowWindow() with puglRealize()David Robillard1-14/+36
2020-03-18Reorder event struct definitions to match PuglEventTypeDavid Robillard1-27/+27
2020-03-17Use a more logical order for PuglEventTypeDavid Robillard1-5/+5
2020-03-17Use clearer names for pointer eventsDavid Robillard1-16/+25
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-16Add timer eventsDavid Robillard1-2/+59
2020-03-15Cleanup: Fix documentation linksDavid Robillard1-2/+2
2020-03-15Unify event loop functions as puglUpdate()David Robillard1-17/+47
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-2/+29
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-14Add logging APIDavid Robillard1-0/+38
2020-03-09Deprecate puglEnterContext() and puglLeaveContext()David Robillard1-29/+33
These are prone to abuse, and have caused confusion with people who try to use them like in other libraries that support explicit drawing in the main loop. The drawing parameter was also wrong, and these were already just compatibility veneers since the internal context API needs to be more expressive. So, now that PUGL_CREATE and PUGL_DESTROY exist, they can be deprecated to force clients to draw only at the correct time.
2020-03-09Add PuglEventClient and puglSendEvent()David Robillard1-1/+28
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-1/+9
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-08Add a user data handle to the worldDavid Robillard1-1/+23
2020-03-08Link event types to the corresponding structDavid Robillard1-14/+14
2020-03-08Remove redundant PuglEventCloseDavid Robillard1-12/+0
This is identical to PuglEventAny.
2020-03-07Fix overly long lineDavid Robillard1-2/+2
2020-03-07Organize documentation into groupsDavid Robillard1-9/+41
2020-03-07Improve documentationDavid Robillard1-82/+184
2020-03-06Use terse Doxygen ref syntaxDavid Robillard1-3/+3
2020-03-06Move puglSetBackend() to init groupDavid Robillard1-11/+11
2020-03-06Move puglSetEventFunc() to init groupDavid Robillard1-6/+6
2020-03-06Move puglPostRedisplay() and friend to graphics groupDavid Robillard1-12/+12
2020-03-06Move puglGetClipboard() after puglGetClipboard() for consistencyDavid Robillard1-11/+11
2020-03-06Move puglHasFocus() after puglGrabFocus() for consistencyDavid Robillard1-6/+6
2020-03-06Move puglGetVisible() to more sensible locationDavid Robillard1-6/+6
2020-03-06Move type definitions to the group they are relevant toDavid Robillard1-72/+72
2020-03-06Clean up event field documentationDavid Robillard1-53/+54
2020-03-02Strengthen ultra-strict warnings with clangDavid Robillard1-2/+2
2020-03-01Put PuglEventAny member of PuglEvent first for easy initializationDavid Robillard1-1/+1
2020-03-01Add PUGL_BEGIN_DECLS and PUGL_END_DECLS macrosDavid Robillard1-4/+8
Just to keep the C++ noise out of the headers.