aboutsummaryrefslogtreecommitdiffstats
path: root/pugl/detail/win.c
AgeCommit message (Collapse)AuthorFilesLines
2020-06-13Add puglSetCursor()Jean Pierre Cimalando1-0/+41
2020-06-08Windows: Only call SwapBuffers with OpenGLJean Pierre Cimalando1-1/+0
2020-06-08Windows: Fix maximum sizeDavid Robillard1-2/+4
2020-05-16Add default and maximum sizeDavid Robillard1-0/+18
2020-05-16Use line comments where appropriateDavid Robillard1-1/+1
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/+17
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-9/+9
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-19/+7
Now that timers are exposed, applications can repeatedly nag for attention themselves if they really want to.
2020-03-16Add timer eventsDavid Robillard1-0/+22
2020-03-16Only send update events when the view is visibleDavid Robillard1-1/+4
2020-03-15Unify event loop functions as puglUpdate()David Robillard1-7/+32
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-2/+1
2020-03-15Cleanup: Remove redundant PUGL_API declarationsDavid Robillard1-1/+1
2020-03-15Remove backend resize methodDavid Robillard1-11/+6
2020-03-14Add logging APIDavid Robillard1-1/+0
2020-03-09Add PuglEventClient and puglSendEvent()David Robillard1-4/+25
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-2/+11
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-09Windows: Configure and redraw only when window is shown, not hiddenDavid Robillard1-3/+5
2020-03-09Windows: Remove unused stores of rectDavid Robillard1-2/+2
2020-03-08Windows: Fix initial frame sizeDavid Robillard1-0/+1
2020-03-08Windows: Prevent input in one window from stalling anotherDavid Robillard1-4/+21
This dispatches events on a per-window basic instead of globally, using the same mark trick as before to bound the number of events dispatched. After the events are dispatched, all the windows are updated if they have an invalid region. This ensures that all windows get drawn every iteration if necessary, since Windows itself does not send WM_PAINT messages if there is lots of input activity.
2020-03-08Remove redundant PuglEventCloseDavid Robillard1-1/+1
This is identical to PuglEventAny.
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-14/+27
2020-03-01Cleanup: Fix includesDavid Robillard1-1/+2
2020-02-18Pass expose event to backend enter and leave functionsDavid Robillard1-4/+4
This is needed for clipping. Unfortunately, the puglEnterContext() and puglLeaveContext() API was not suitable for this, but this shouldn't matter in user code because it is only used for setup, and is slated for removal anyway. Instead, just call the backend functions directly in the implementation.
2020-02-02Only resize backend when necessaryDavid Robillard1-9/+14
This avoids resizing the backend when the window is only moved, which fixes flicker with Cairo where resizing is expensive.
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-03Remove redisplay flag and add puglPostRedisplayRect()David Robillard1-9/+15
2019-11-03Add puglGetNativeWorld()David Robillard1-0/+6
2019-11-03Windows: Do not require backends to have a surfaceDavid Robillard1-1/+1
This was just leftover cruft from before error handling was cleaned up, any failure to configure must now be reported by the backend.
2019-11-03Expose functional stub backendDavid Robillard1-0/+38
2019-11-03Fix puglFreeView() crashes when window creation failedJordan Halase1-1/+4
2019-09-07Clean up error handlingDavid Robillard1-9/+9
2019-09-07Add clipboard supportDavid Robillard1-0/+82
2019-09-07Cleanup: Fix whitespaceDavid Robillard1-13/+13
2019-09-07Windows: Fix library leak during world creationDavid Robillard1-0/+2
2019-09-03Make almost everything return a statusDavid Robillard1-11/+17
Prepares the API for proper error handling, even though there isn't any for these functions yet.
2019-09-03Add puglSetWindowTitle()David Robillard1-4/+16
2019-09-03Add puglSetClassName()David Robillard1-7/+3
2019-09-03Replace size and aspect ratio init functions with dynamic onesDavid Robillard1-0/+22
2019-09-03Use consistent naming conventionsDavid Robillard1-14/+14
2019-09-03Windows: Fix configured size of child viewsDavid Robillard1-0/+5
2019-09-03Windows: Draw while application menu is openDavid Robillard1-0/+2
2019-09-03Windows: Improve resize smoothness slightlyDavid Robillard1-3/+1