summaryrefslogtreecommitdiff
path: root/gtk/gtkshortcuttrigger.c
Commit message (Collapse)AuthorAgeFilesLines
* Drop gtkintl.hMatthias Clasen2022-09-241-1/+0
| | | | | Include gtkprivate.h for I_() and glib-i18n.h for gettext macros.
* Remove all nicks and blurbs from param specsSophie Herold2022-05-111-15/+5
| | | | | | | | Those property features don't seem to be in use anywhere. They are redundant since the docs cover the same information and more. They also created unnecessary translation work. Closes #4904
* gtk: Clean up docs syntaxMatthias Clasen2021-05-221-6/+6
| | | | Replace leftover gtk-doc syntax (#Type) with backquotes.
* docs: Reduce redundancyMatthias Clasen2021-05-201-1/+0
| | | | | | | | Remove a boatload of "or %NULL" from nullable parameters and return values. gi-docgen generates suitable text from the annotation that we don't need to duplicate. This adds a few missing nullable annotations too.
* Documentation fixesMatthias Clasen2021-05-201-6/+6
| | | | | Mostly fixing up indentation of continuation lines, and other small cleanups.
* shortcuttrigger: Convert docsMatthias Clasen2021-03-111-89/+100
|
* nevertrigger: Remove unused instance membersTimm Bäder2021-01-031-3/+0
|
* Replace "gint" with "int"Benjamin Otte2020-07-251-1/+1
|
* docs: Improve shortcut trigger docsMatthias Clasen2020-07-231-0/+4
| | | | Point out the need to escape <> in xml.
* shortcuttrigger: Fix some leaks in error pathsMatthias Clasen2020-07-081-2/+8
| | | | Found while running the testsuite under asan.
* Add G_GNUC_NORETURN to functions that never returnTimm Bäder2020-05-181-1/+1
|
* shortcuttrigger: Don't trigger on key releasesMatthias Clasen2020-04-061-0/+3
| | | | | | | | This broke when the event type check in gdk_key_event_matches was removed and replaced by a precondition that accepts both key press and release events. Add the check in gtk_keyval_trigger_trigger instead.
* gdk: Redo key eventsMatthias Clasen2020-04-061-13/+13
| | | | | | | | | | | | | | | Add all of the keyboard translation results in the key event, so we can translate the keyboard state at the time the event is created, and avoid doing state translation at match time. We actually need to carry two sets of translation results, since we ignore CapsLock when matching accelerators, in gdk_event_matches(). At the same time, drop the scancode field - it is only ever set on win32, and is basically unused in GTK. Update all callers.
* Add gdk_event_matchesMatthias Clasen2020-04-051-110/+13
| | | | | | Move the elaborate key event matching code from GtkShortcutTrigger to GdkEvent, which greatly reduces the amount of keymap api use outside of GDK.
* shortcuts: documentation fixesMatthias Clasen2020-04-041-3/+3
| | | | | Update symbol lists, and add examples for parsing triggers and actions.
* keynav: Fix Shift-TabMatthias Clasen2020-04-011-1/+6
| | | | This was broken by the shortcuts branch merge.
* Add parsing for GtkAlternativeTriggerEmmanuele Bassi2020-03-271-2/+39
| | | | Alternative triggers are separate by a pipe character.
* Parse keyval name directly for mnemonic triggersEmmanuele Bassi2020-03-271-2/+3
| | | | | We don't need to parse the full accelerator format for mnemonic triggers.
* Return a full reference when parsing triggersEmmanuele Bassi2020-03-271-2/+3
| | | | | | | | | | | We're not returning a full reference for GtkNeverTrigger, but we are returning full references for mnemonic and keyval triggers; this means we're either going to leak mnemonic and keyval triggers if we consider this function a "transfer none" one, or we are going to trigger an assertion failure when finalizing a never trigger, if we consider this function a "transfer full" one. Let's be consistent, and always return a full reference to the caller.
* shortcuttrigger: Some documentation fixupsMatthias Clasen2020-03-251-4/+4
|
* Turn GtkShortcutTrigger into an objectEmmanuele Bassi2020-03-251-256/+502
| | | | | | | | | | The lightweight inheritance mechanism used for GtkShortcutTrigger is not going to be usable by bindings, because boxed types cannot have derived types. We could use GTypeInstance and derive everything from that, like GParamSpec, but in the end shortcuts are not really a performance critical paths, unlike CSS values or render nodes.
* shortcuttrigger: Do elaborate matching for key eventsMatthias Clasen2020-03-251-12/+87
| | | | | | | | Copy the logic from GtkKeyHash for matching key events to shortcuts. Adapt shortcuts test to work with the better matching, by creating more complete key events.
* shortcuttrigger: Introduce partial matchesMatthias Clasen2020-03-251-23/+24
| | | | | | | Allow GtkShortcutTrigger to return partial matches. Currently, no triggers produce such results, and GtkShortcutController treats partial matches like exact ones.
* Print mnemonic triggers clearlyMatthias Clasen2020-03-251-0/+1
|
* shortcuttrigger: Add gtk_shortcut_triger_new_parse_string()Benjamin Otte2020-03-251-0/+29
| | | | And hook it up into the GtkBuilder infrastructure.
* shortcuttrigger: Add hash(), equal(), and compare() functionsBenjamin Otte2020-03-251-0/+171
| | | | | Those are useful for putting triggers in hash tables or getting sorted output.
* shortcuttrigger: Add support for mnemonicsBenjamin Otte2020-03-251-8/+144
| | | | | | | Mnemonics need to be triggered with help from the controllers (who determine the modifiers). Support for that has been added, too. Mnemonics do not use this yet though.
* shortcuttrigger: Add gtk_shortcut_trigger_to_label()Benjamin Otte2020-03-251-5/+115
| | | | Provide a user-presentable string.
* trigger: Add an alternative triggerBenjamin Otte2020-03-251-23/+145
| | | | | | | | | And use it. I just added it to GtkWidget just to show that I can. The real reason I want it is for gamepad/joystick triggers in games, so that it becomes possible to select 2 different triggers (gamepad and keyboard) for the same shortcut.
* shortcut: Add GtkShortcutTriggerMatthias Clasen2020-03-251-0/+405
| | | | | Triggers are meant to describe how to trigger a shortcut. So far only a keyval + modifiers trigger exists.
* Revert "Merge branch 'disable-window-test' into 'master'"Matthias Clasen2020-03-191-976/+0
| | | | | This reverts commit 3ac4c76b18cc89a841ce09f0943539f16988fd21, reversing changes made to 6ec96d2e989d029a303b8b20ec72b86f974c0e87.
* Print mnemonic triggers clearlyMatthias Clasen2020-03-181-0/+1
|
* shortcuttrigger: Add gtk_shortcut_triger_new_parse_string()Benjamin Otte2020-03-181-0/+29
| | | | And hook it up into the GtkBuilder infrastructure.
* shortcuttrigger: Add hash(), equal(), and compare() functionsBenjamin Otte2020-03-181-0/+171
| | | | | Those are useful for putting triggers in hash tables or getting sorted output.
* shortcuttrigger: Add support for mnemonicsBenjamin Otte2020-03-181-8/+144
| | | | | | | Mnemonics need to be triggered with help from the controllers (who determine the modifiers). Support for that has been added, too. Mnemonics do not use this yet though.
* shortcuttrigger: Add gtk_shortcut_trigger_to_label()Benjamin Otte2020-03-181-5/+115
| | | | Provide a user-presentable string.
* trigger: Add an alternative triggerBenjamin Otte2020-03-181-24/+145
| | | | | | | | | And use it. I just added it to GtkWidget just to show that I can. The real reason I want it is for gamepad/joystick triggers in games, so that it becomes possible to select 2 different triggers (gamepad and keyboard) for the same shortcut.
* shortcut: Add GtkShortcutTriggerMatthias Clasen2020-03-181-0/+408
Triggers are meant to describe how to trigger a shortcut. So far only a keyval + modifiers trigger exists.