Age | Commit message (Collapse) | Author | Files | Lines |
|
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.
|
|
|
|
|
|
|
|
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.
|
|
|
|
Declaring instance variables in interfaces is deprecated, according to
Wobjc-interface-vars (Apple clang version 11.0.0).
|
|
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.
|
|
|
|
|
|
|
|
|
|
Not really sure why I used a web link here (maybe because it's more stable),
but this is more conventional.
|
|
|
|
|
|
|
|
Using CGRectMake here apparently doesn't work on older versions of MacOS.
|
|
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.
|
|
|
|
|
|
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.
|
|
Now that timers are exposed, applications can repeatedly nag for attention
themselves if they really want to.
|
|
|
|
|
|
|
|
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.
|
|
|
|
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.
|
|
|
|
|
|
|
|
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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.
|
|
|
|
|
|
|
|
|
|
|
|
|