Age | Commit message (Collapse) | Author | Files | Lines |
|
|
|
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.
|
|
|
|
|
|
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).
|
|
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.
|
|
|
|
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.
|
|
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.
|
|
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
|
|
|
|
|
|
This is identical to PuglEventAny.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Just to keep the C++ noise out of the headers.
|
|
|
|
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.
|
|
|
|
This establishes a general pattern for backend-specific APIs, so that pugl.h
doesn't become a mess. The name of these headers, and the definition of
"backend", is a little fuzzy here, but it was before in reality anyway.
|
|
This doesn't change anything about type-safety (C can't do that), but at least
makes the intent of things clearer.
|
|
|
|
|
|
|
|
|
|
|
|
This allows projects that use strict warning flags to suppress warning noise.
|
|
|
|
|
|
|
|
Prepares the API for proper error handling, even though there isn't any for
these functions yet.
|
|
Currently unused, but this is to leave open the possibility of event
propagation or better errror handling.
|
|
|
|
|
|
This finishes the removal of the init/set split. While these ones are
superficial, the general idea here is to provide general functions that work
before or after window creation where possible. This prevents the situation
where ever more dynamic counterparts to existing init functions get added over
time.
|
|
|
|
|
|
|