Age | Commit message (Collapse) | Author | Files | Lines |
|
This replaces the window title and class name APIs with a more general one that
can be easily extended to other things, like icon names, more detailed
application hints, and so on.
|
|
This is the standard behaviour for applications.
|
|
|
|
|
|
|
|
On MacOS in particular, views and windows are entirely different concepts, so
confusing them... confuses things. This was the last holdover in the API that
used the old "native window".
|
|
These are redundant with puglSetFrame in a sense, but allow setting the size of
a view without the position, or vice-versa. This API also maps more nicely to
Wayland, where applications can not position themselves (but can resize).
|
|
Actual window sizes and positions fit easily in a 16-bit integer. So, we use
that in "representation contexts" like events. This makes structures smaller,
and allows the values to be converted to float, double, or integer without
casting (since any int16_t or uint16_t value can fit in them without loss).
Setter APIs use native integers for convenience, to avoid casting hassles when
doing arithmetic. Ranges are checked at runtime.
|
|
This collapses many functions into one, which makes the API more easily
extensible and reduces code size.
|
|
|
|
See https://reuse.software/ for details.
|
|
|
|
Aside from reading more naturally, this avoids clashes with types that are not
events, like PuglEventFlags. This is also more consistent with the C++
bindings, where "EventExpose" would be quite strange, for example.
Apologies for the noise. Aliases to the old names will be preserved in the
deprecated API like other things for a short while.
|
|
|
|
|
|
These will not be used in the Sphinx documentation, and most were
self-explanatory and only there to make the Doxygen index look nice anyway.
Where there was actually useful information, it has been preserved as regular
comments.
|
|
These names were confusing because a view is not necessarily a window. Since
there's no room for ambiguity here, simply drop the superfluous word.
|
|
|
|
Unfortunately there is no warning like Wpadded but only for internal padding,
so that can't be turned on, but if there was, after this commit the build would
be clean with it. Maybe some day...
|
|
|
|
|
|
Not really sure why I used a web link here (maybe because it's more stable),
but this is more conventional.
|
|
|
|
|
|
|
|
|
|
|
|
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.
|
|
|
|
|
|
Apparently glxext.h is always included in glx.h on modern systems.
The window demo does not actually use any GL functions directly since they are
all factored out.
|
|
|
|
|