aboutsummaryrefslogtreecommitdiffstats
path: root/pugl/pugl_x11.c
AgeCommit message (Collapse)AuthorFilesLines
2019-07-25X11: Close input context on destructionDavid Robillard1-0/+6
2019-07-24Support additional special keysDavid Robillard1-29/+36
2019-07-24Unify key and character fields and separate text eventsDavid Robillard1-23/+44
Only one field is necessary to store any kind of key, including special keys, since PuglKey occupies a reserved Unicode region. This is generally much simpler to deal with since there is only one value to dispatch on. Text events are separated from key events (like Windows but unlike MacOS or X11) because it is not possible to derive text events from key press events when they occur on Windows. Since merging the two has been the source of some confusion, this approach has some advantages anyway, even though it introduces the need to handle another event type. In the process, text input has been almost completely rewritten. I have tested this with a compose key on X11 and dead keys on Windows and MacOS and everything seems to work correctly, though there may (as always) still be issues with more exotic input methods.
2019-07-24Rename PuglEventKey::utf8 to "string" with char typeDavid Robillard1-7/+6
This matches Gtk and is generally less annoying to work with.
2019-07-24Remove view pointer from eventsDavid Robillard1-3/+2
This makes events POD, which is generally nice. The view was originally added to reflect the display and window references in XEvent, but doesn't seem very useful in Pugl applications.
2019-07-24Represent event time as double in seconds on all platformsStefan Westerfeld1-5/+5
2019-07-24Simplify modifier translation codeDavid Robillard1-7/+5
2019-07-23X11: Factor out impl variable for brevityDavid Robillard1-11/+12
2019-07-23X11: Improve live resize smoothnessDavid Robillard1-9/+15
This avoids a double context swap when both a configure and expose event arrive in the same loop iteration, which happens often during resize.
2019-07-23X11: Factor out window event maskDavid Robillard1-5/+6
2019-07-21Fix some warningsDavid Robillard1-8/+8
2019-07-21Tidy up X11 codeDavid Robillard1-30/+16
2019-07-21Add puglRequestAttention()David Robillard1-0/+33
2019-07-21Fix handling of WM_DELETE_WINDOWDavid Robillard1-8/+11
2019-07-21Use local display and window variables for brevityDavid Robillard1-18/+18
2019-07-21Make time start from approximately zeroDavid Robillard1-1/+1
2019-07-20Remove redisplay flag and use system events insteadDavid Robillard1-11/+7
2019-06-30Make translateKey take a PuglEventKeyDavid Robillard1-9/+9
2019-06-30Send a configure event on initial window mappingDavid Robillard1-0/+10
2019-06-30Tidy up whitespaceDavid Robillard1-0/+1
2019-06-27Add puglGetTime()David Robillard1-0/+10
2019-06-27Consistently use uint32_t everywhereDavid Robillard1-2/+2
2019-02-17Add configuration APIDavid Robillard1-3/+3
2019-02-16Add missing default caseDavid Robillard1-0/+1
2019-02-16Fix implicit double to int castsDavid Robillard1-2/+2
2019-02-16Clean up includesDavid Robillard1-10/+9
2019-02-16Factor out drawing context from platform window implementationDavid Robillard1-188/+37
2019-02-15Remove PUGL_CAIRO_GLDavid Robillard1-36/+0
The old cairo_gl.h header or something similar is easy enough to use in application code if someone wants to do this, and maintaining a separate context type for it is a hassle and arguably out of scope.
2018-09-15Fix minor clang-tidy warningsDavid Robillard1-1/+1
2018-09-11Fix GCC8 fall-through warningsDavid Robillard1-1/+2
2017-10-03Don't clear entire cairo surface on each exposeDavid Robillard1-6/+0
2017-07-23Fix merging of expose eventsDavid Robillard1-7/+13
Thanks JP Cimalando
2016-09-20Move entire API to pugl.hDavid Robillard1-1/+0
2016-09-18Remove GLUT-like event callbacksDavid Robillard1-0/+5
2016-09-14Fix compose keyDavid Robillard1-3/+5
Turns out the app needs to call setlocale(LC_ALL, "") for this to work. I am not sure if it is possible to make things work correctly purely in Pugl (since plugin UIs can't call setlocale).
2016-09-14Fix focus eventsDavid Robillard1-1/+1
2016-09-14Fix puglInitInternals prototypeDavid Robillard1-1/+1
2016-09-01Add PUGL_CLOSE eventDavid Robillard1-11/+9
This allows purely event-driven applications to handle window close. Something more extensible for WM message seems like it might be a good idea here, but I can't think of specific uses, so this will do.
2016-09-01Add puglGetVisible()David Robillard1-0/+2
2016-08-31Replace send_event with extensible flagsDavid Robillard1-3/+4
This is currently functionally equivalent, but taking up space in the event struct for a single bool which could be used for 32 flags for any number of things that might show up in the future seems like a very bad idea.
2016-07-28Add support for Cairo on GLDavid Robillard1-24/+90
2016-07-28Clean up GL attributes and simplify configurationDavid Robillard1-21/+32
2016-07-28Fix flickering and laggy window resizeDavid Robillard1-17/+64
2015-11-12Fix memory leaksDavid Robillard1-0/+1
2015-09-13Avoid redundant expose events on resize.David Robillard1-1/+4
2015-09-13Resize draw context before dispatching configure.David Robillard1-16/+11
2015-09-12Update copyright dates.David Robillard1-1/+1
2015-09-12Add puglWaitForEvent for blocking main loops.David Robillard1-0/+9
2015-09-12Add support for aspect ratio constraints.David Robillard1-4/+14
Currently only implemented on X11.
2015-09-12Fix resizing with cairo context.David Robillard1-10/+23