aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
6 daysRemove deprecated APIDavid Robillard12-660/+1
As far as I can tell, nobody actually cares about this in practice now, and it's slated for removal anyway.
6 daysSuppress new checks in clang-tidy 19David Robillard1-0/+1
I get that these aren't all intended to be universal, but suggesting the replacement of standard functions with boost ones is completely backwards. This is what a lack of a pluggable architecture gets you.
6 daysFully parenthesize mathematical expressionsDavid Robillard6-21/+23
Well, on X11 where I'm running clang-tidy anyway, there may be some stragglers in the other platform implementations. Appeases the readability-math-missing-parentheses check added in clang-tidy 19.
6 daysFully parenthesize mathematical expressionsDavid Robillard3-7/+8
6 daysExplicitly specify all PuglKey valuesDavid Robillard1-71/+71
Appeases the cert-int09-c and readability-enum-initial-value checks added in clang-tidy 19.
6 daysGracefully handle failing return from ftell()David Robillard2-8/+17
Again I don't think this is actually a concern, but it appeases clang-tidy.
6 daysX11: Gracefully handle failure of clock_gettime()David Robillard1-1/+4
As gracefully as possible given the API anyway. I don't think this is an error case that happens enough to really need transparent error handling, if the clock doesn't work all is lost anyway. Appeases cert-err33-c, which started caring about clock_gettime() in clang-tidy 19.
6 daysUpdate whitespaceDavid Robillard1-1/+2
Apparently clang-format 19 decided to get even worse in this case. The C and C++ committes really, really should have sorted out this nonsense a decade ago.
6 daysFix typoDavid Robillard1-2/+2
11 daysConsistently use unsigned literals for event flagsDavid Robillard5-33/+33
11 daysWindows: Improve clipboard reliabilityDavid Robillard1-2/+15
11 daysWindows: Actually use impl variablesDavid Robillard1-14/+13
11 daysWindows: Ignore return value of SetForegroundWindowDavid Robillard1-1/+1
It turns out that this is flaky for reasons that aren't terribly clear from the documentation. So, just ignore it, it's not the end of the world if raising doesn't happen anyway.
11 daysWindows: Improve error handlingDavid Robillard1-46/+30
11 daysWindows: Simplify message pollingDavid Robillard1-21/+6
The internal puglPollWinEvents() abstraction was doing more harm than good.
11 daysWindows: Avoid using a floating point loop counterDavid Robillard1-1/+3
2025-01-23Replace puglPostRedisplayRect() with puglObscureRegion()David Robillard9-66/+129
2025-01-23Rename puglPostRedisplay() to puglObscureView()David Robillard18-44/+58
For consistency with event types (since "obscure" is opposite "expose") and the upcoming puglObscureRegion().
2025-01-23Draw position, size, and scale in pugl_management_demoDavid Robillard1-3/+21
2025-01-23Update clant configurationDavid Robillard1-4/+0
2025-01-23Simplify some conditionalsDavid Robillard1-3/+4
2025-01-22Simplify initial position code and place children at the originDavid Robillard5-134/+121
The code to find the initial size and position for a view had a lot of duplication, and was inconsistent between platforms. Flaky positioning and attempting to center embedded children has historically caused a bunch of problems in general, particularly since windows can be resized. So, factor out all the initial size and position code so that the logic is in one centralized place used by all platforms, and always position embedded children within their parent at the top/left origin. For top-level windows, the view is centered on its transient parent or the screen (as before). A new platform function puglGetAncestorCenter() is used to do this in general code. Also towards a total separation of position and size, towards support for Wayland, where applications don't dictate their own positions.
2025-01-22Factor out puglIsValidSize()David Robillard5-5/+14
2025-01-22Factor out puglIsValidPosition()David Robillard6-8/+17
2025-01-22Rename PuglViewSize to PuglAreaDavid Robillard7-36/+36
2025-01-22Make puglSetSizeHint() consistent with puglSetSize()David Robillard7-37/+45
In general, it's more convenient to have full-width integers as parameters, since C will promote any arithmetic on smaller types to them anyway. Using narrow types here, then, doesn't really make anything stricter, just forces an annoying cast when lots of warnings are enabled, which is likely unchecked. Better to handle it here, since it's more convenient, and the integer range checks the compiler can do aren't correct anyway (the max width/height is intentionally smaller than the max PuglSpan, so it can fit in a signed 16-bit integer).
2025-01-22Windows: Avoid waiting less than a millisecondDavid Robillard1-2/+4
There is API to access the minimum timer resolution, but it seems to always be 1 millisecond, which is also the unit of the MsgWaitForMultipleObjects parameter, so just avoid the fuss and hardcode this as the minimum. This should slightly reduce overhead when the main loop is running without much of a margin until the frame needs to be drawn.
2025-01-21Update stale deprecationsDavid Robillard1-3/+3
2025-01-21Use a consistent naming scheme for parent functionsDavid Robillard6-15/+40
These could be combined into a hint-like general get/set mechanism, but currently there's only two window relationships and no immediate plans to add more, so that feels a bit over-engineered. So, just rename for consistency with puglSetTransientParent().
2025-01-21Use PuglSpan for view sizesDavid Robillard5-21/+19
2025-01-21Fix strict header warning test buildDavid Robillard2-2/+9
2025-01-21Fix pugl_shader_demo refresh rate on WindowsDavid Robillard2-6/+7
2025-01-21Support building for Windows with or without UNICODEDavid Robillard3-40/+70
2025-01-21Use enums for WGL constantsDavid Robillard1-24/+36
2025-01-21X11: Generate text events for keypad symbolsMartin Preinfalk1-1/+2
2025-01-21Make MacOS touchpad scroll sensitivity closer to other platformsDavid Robillard1-3/+3
2025-01-21Fix Windows test build with VulkanDavid Robillard2-2/+2
2025-01-21Add header warning testsDavid Robillard8-1/+167
2025-01-21Separate C++ build tests to avoid C/C++ warning clashesDavid Robillard10-111/+158
2025-01-21Add missing const qualifierDavid Robillard1-1/+1
2025-01-21Add PUGL_KEY_NONEDavid Robillard5-9/+9
This isn't a strict enumeration anyway, so a sentinel value does no harm, and using it avoids warnings about testing an enum with no zero value.
2025-01-21Fix whitespaceDavid Robillard2-8/+2
2025-01-21Fix warnings in clang build on WindowsDavid Robillard4-12/+30
2024-12-21Suppress warnings in strict GCC buildDavid Robillard1-0/+1
2024-10-05Remove unused options struct from testDavid Robillard1-9/+5
2024-10-05Clean up documentation build and use unique target namesDavid Robillard7-20/+26
2024-10-01Make "docs" option yieldableDavid Robillard1-2/+2
2024-10-01Suppress new warnings in clang and clang-tidy 18David Robillard8-8/+17
2024-10-01Remove redundant "inline" specifierDavid Robillard1-4/+4
2024-07-13MacOS: Fix mouse wheel scroll speedDavid Robillard1-5/+11
This just happens to be the factor that results in one tick of a conventional mouse wheel being a change of 1.0 "lines" as on other platforms (at least for me, hopefully everywhere). Moving a wheel quickly does result in quite a lot of acceleration on MacOS though, so more refinement might be needed here for consistent event handling across platforms.