aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2022-06-07Use a consistent scheme for enum sizesDavid Robillard5-9/+14
2022-06-07Remove unnecessary forward-compatibility codeDavid Robillard3-21/+3
2022-06-07Make puglRealize() always gracefully fail with a bad configurationDavid Robillard2-1/+10
2022-06-07Fix broken links in documentationDavid Robillard1-2/+2
2022-06-07X11: Simplify dispatchX11Events()David Robillard1-31/+44
2022-06-07X11: Flush before returning from puglRealize()David Robillard1-0/+8
This avoids bugs in plugins, because otherwise it's possible that size hints are not available when the host embeds the UI.
2022-06-03Fix Cairo warnings on MacOSDavid Robillard2-1/+2
2022-06-03X11: Fix crash when input context is unavailable due to localesPace Willisson1-11/+17
Calling X*ICFocus on NULL segfaults. This can happen if XCreateIC failed, for example due to missing locales on minimal Docker images.
2022-05-29Make meson configuration more modularDavid Robillard4-133/+166
2022-05-28Update documentationDavid Robillard5-66/+69
2022-05-28Clean up and strengthen warning flagsDavid Robillard8-196/+304
2022-05-28Remove redundant program checksDavid Robillard2-4/+0
2022-05-28Fix View::acceptOffer parameter typeDavid Robillard1-1/+1
2022-05-28Omit cursor_names if XCursor is not availableDavid Robillard1-0/+2
This avoids a Wunused-const-variable warning with GCC.
2022-05-28Avoid implicit conversionsDavid Robillard1-4/+3
2022-05-23Add rich clipboard supportDavid Robillard19-201/+946
This implements a more powerful protocol for working with clipboards, which supports datatype negotiation, and fixes various issues by mapping more directly to how things work on X11.
2022-05-22Fix whitespaceDavid Robillard1-1/+1
2022-05-22Factor out pugl_clipboard_demo example programDavid Robillard5-14/+236
This is a simpler example than pugl_embed_demo that demonstrates clipboard functionality without the complexity of embedded views.
2022-05-21Add puglGetScaleFactor()David Robillard6-4/+106
2022-05-21Windows: Send configure events when frame moves or resizesDavid Robillard1-0/+3
2022-05-21Add puglSetPosition() and puglSetSize()David Robillard6-63/+239
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).
2022-05-21Use consistent integer types for view positions and sizesDavid Robillard12-116/+147
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.
2022-05-21Add a uniform API for setting size hintsDavid Robillard33-313/+356
This collapses many functions into one, which makes the API more easily extensible and reduces code size.
2022-05-21X11: Remove redundant display memberDavid Robillard4-47/+52
2022-05-21Rename PUGL_UNSUPPORTED_TYPE to be more genericDavid Robillard8-12/+12
2022-05-21MacOS: Specify maximum size constraint on draw viewDavid Robillard1-15/+37
I am not sure why the minimum was only specified before, but it seems like an oversight.
2022-05-21X11: Use cursor themesDavid Robillard2-29/+42
This changes to getting cursors by name from the cursor theme, which makes the cursor match the ones used in modern desktop environments. As far as I can tell, there is no real standard for names, these ones seem to work for me in GNOME, KDE, and Xfce. I am not sure about the compatibility concerns here, but X11 without Xcursor themes strikes me as either too esoteric or too ancient to worry about, especially since cursor switching isn't critical functionality anyway.
2022-05-21Avoid setting cursor on realizationDavid Robillard1-4/+0
This avoids issues when the default X11 cursor isn't the expected "default" of the environment, for example with Plasma. A real application that changes the cursor needs to do so consistently on mouse enter and leave events anyway.
2022-05-21Set a title for all test windowsDavid Robillard5-0/+6
2022-05-21Fix build of examples that use a stub backendDavid Robillard1-3/+21
2022-05-20Windows: Set window class on local moduleDavid Robillard1-2/+10
This avoids potential clashes between multiple copies of Pugl statically compiled into several modules.
2022-05-20Add missing license metadataDavid Robillard1-1/+1
2022-05-20Use consistent class names and titles in tests and examplesDavid Robillard26-32/+32
2022-05-20MacOS: Build examples as application bundlesDavid Robillard23-74/+313
This is required on MacOS to make the examples usable. When run as bare programs, they don't show up as normal windows or receive keyboard input.
2022-05-03Fix crash when destroying OpenGL views that haven't been realizedJean Pierre Cimalando5-1/+72
2022-04-23Put unit tests in a "unit" suiteDavid Robillard1-4/+8
This enables running them without the data tests (which can be annoying while working in a messy repo), and for bonus points makes the log output look more uniform.
2022-04-23Fix IWYU warningsDavid Robillard5-16/+9
I suspect that using the same configuration across both C and C++ is starting to wear a bit thin, but this will do for now.
2022-04-23Relax redisplay test to pass on MacOS 11.6David Robillard1-4/+6
Since upgrading to 11.6 (on an Intel Macbook), this test no longer seems to pass. It's unfortunate to not test that small redisplay requests only result in small exposures, but I don't think the previous strict check reflects reality. Exposing more than the application requested, for whatever reason, is a natural part of window environments, so I don't know if this is something that can be reliably unit tested.
2022-04-23Add descriptive verbose output to test_redisplayDavid Robillard1-8/+21
2022-04-23Move reserved platform defines from code to build systemDavid Robillard8-22/+10
Numerous things warn about this, and it's generally a bad idea to put these in the code since it can result in incompatibly compiled code being linked together. Unfortunately this makes building manually (without the build system) more fiddly, but such is life.
2022-04-23Suppress warnings when building with clang on WindowsDavid Robillard2-0/+8
2022-04-23Build C++ components as C++14David Robillard1-1/+1
2022-04-23Windows: Remove redundant view size assignmentDavid Robillard1-5/+0
2022-04-23Windows: Avoid initialization warningDavid Robillard1-1/+2
2022-04-23Windows: Remove pointless const qualifiersDavid Robillard1-4/+1
2022-04-23Windows: Avoid else after returnDavid Robillard2-5/+15
2022-04-23Strengthen MSVC warningsDavid Robillard3-6/+4
2022-04-21Fix MacOS buildDavid Robillard1-0/+6
2022-04-21Update READMEDavid Robillard1-3/+7
2022-04-21Improve error handlingDavid Robillard9-79/+140