Age | Commit message (Collapse) | Author | Files | Lines |
|
|
|
|
|
Not really sure why I used a web link here (maybe because it's more stable),
but this is more conventional.
|
|
|
|
|
|
This is sometimes used by puglSetWindowTitle() using the existing title.
|
|
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.
|
|
|
|
This was a bad idea and a never-ending source of problems. The frame
represents what the "current" frame is from a Pugl perspective, but with the
asynchronicity of X11 and other issues this cant be used to filter configure
events.
Instead, simply cache the last configure event that was sent and compare with
that.
|
|
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.
|
|
|
|
|
|
|
|
|
|
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.
|
|
|
|
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 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.
|
|
|
|
|
|
|
|
|
|
|
|
Prepares the API for proper error handling, even though there isn't any for
these functions yet.
|
|
|
|
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.
|
|
|
|
|
|
|
|
Again just makes non-deprecated things easier to read and review, and also
cleans up the symbol table.
|
|
|
|
|
|
|
|
|
|
|
|
The old API was broken for programs that manage multiple views, since it was
impossible to wait for events on any view. There are also several functions in
the API which are not actually associated with views at all, so those can now
be moved to the more appropriate PuglWorld to make this more clear.
The old puglInit() and puglDestroy() functions are preserved for compatibility,
but marked as deprecated.
|
|
|
|
|
|
|
|
|
|
Taking a page from C++ convention, where "detail" is for things that should not
be included in user code.
|