31#include <gdk/gdkkeysyms.h>
33#ifdef GDK_WINDOWING_WAYLAND
34#include <gdk/gdkwayland.h>
41#define DT_ACCELS_WIDGET_SHORTCUT_KEY "dt-accel-shortcut"
42#define DT_ACCELS_WIDGET_TOOLTIP_DISABLED_KEY "dt-accel-tooltip-disabled"
119#ifndef DT_WIDGETS_ACCELERATORS_H
120#define DT_WIDGETS_ACCELERATORS_H
132#ifdef GDK_WINDOWING_QUARTZ
133#define DT_PRIMARY_MASK GDK_MOD2_MASK
135#define DT_PRIMARY_MASK GDK_CONTROL_MASK
261 guint key_val, GdkModifierType accel_mods);
265 gboolean (*action_callback)(GtkAccelGroup *group,
266 GObject *acceleratable, guint keyval,
267 GdkModifierType mods, gpointer user_data),
268 gpointer data, GtkAccelGroup *accel_group,
const gchar *action_scope,
269 const gchar *action_name);
285 GtkAccelGroup *accel_group,
const gchar *accel_path, guint key_val,
286 GdkModifierType accel_mods,
const gboolean
lock);
321 gboolean (*action_callback)(GtkAccelGroup *group, GObject *acceleratable,
322 guint keyval, GdkModifierType mods,
324 gpointer data,
GtkWidget *target_widget, GtkAccelGroup *accel_group,
325 const gchar *action_scope,
const gchar *action_name, guint key_val,
326 GdkModifierType accel_mods,
const gboolean
lock,
const char *
description);
439typedef gchar *(*dt_accels_recent_get_handler_t)(
int index);
446#define dt_accels_new_darkroom_action(a, b, w, c, d, e, f, g) \
447 dt_accels_new_action_shortcut(dt_accels_get_global(), a, b, w, \
448 dt_accels_get_global()->darkroom_accels, c, d, e, f, FALSE, g)
void dt_accels_connect_accels(dt_accels_t *accels)
Actually enable accelerators after having loaded user config.
void(* dt_accels_recent_set_handler_t)(int index, const char *value)
void dt_accels_set_top_offset_handler(dt_accels_top_offset_handler_t handler)
static void dt_accels_disable(dt_accels_t *accels, gboolean state)
void(* dt_accels_refocus_handler_t)(void)
void dt_accels_connect_active_group(dt_accels_t *accels, const gchar *group)
Connect the contextual active accels group to the window. Views can declare their own set of contextu...
void dt_accels_disconnect_active_group(dt_accels_t *accels)
Disconnect the contextual active accels group from the window.
gboolean dt_accels_dispatch(GtkWidget *w, GdkEvent *event, gpointer user_data)
Force our listener for all key strokes to bypass reserved Gtk keys.
void dt_accels_remove_shortcut(dt_accels_t *accels, const char *path)
Remove the shortcut object identified by path and all its accels.
dt_accels_t * dt_accels_init(char *config_file, GtkAccelFlags flags)
void dt_accels_set_refocus_handler(dt_accels_refocus_handler_t handler)
dt_accels_t * dt_accels_get_global(void)
void dt_accels_cleanup(dt_accels_t *accels)
void dt_accels_search(dt_accels_t *accels, GtkWindow *main_window, GtkWidget *anchor)
gchar *(* dt_accels_recent_get_handler_t)(int index)
void dt_accels_window(dt_accels_t *accels, GtkWindow *main_window)
Show the modal dialog listing all available keyboard shortcuts and letting user to set them.
void dt_accels_new_virtual_shortcut(dt_accels_t *accels, GtkAccelGroup *accel_group, const gchar *accel_path, GtkWidget *widget, guint key_val, GdkModifierType accel_mods)
Add a new virtual shortcut. Virtual shortcuts are immutable, read-only and don't trigger any action....
void dt_accels_set_recent_handlers(dt_accels_recent_get_handler_t get, dt_accels_recent_set_handler_t set)
void dt_accels_set_global(dt_accels_t *accels)
void dt_accels_new_virtual_instance_shortcut(dt_accels_t *accels, gboolean(*action_callback)(GtkAccelGroup *group, GObject *acceleratable, guint keyval, GdkModifierType mods, gpointer user_data), gpointer data, GtkAccelGroup *accel_group, const gchar *action_scope, const gchar *action_name)
gchar * dt_accels_build_path(const gchar *scope, const gchar *feature)
gint(* dt_accels_top_offset_handler_t)(void)
void dt_accels_new_action_shortcut(dt_accels_t *accels, gboolean(*action_callback)(GtkAccelGroup *group, GObject *acceleratable, guint keyval, GdkModifierType mods, gpointer user_data), gpointer data, GtkWidget *target_widget, GtkAccelGroup *accel_group, const gchar *action_scope, const gchar *action_name, guint key_val, GdkModifierType accel_mods, const gboolean lock, const char *description)
Register a new shortcut for a generic action, setting up its path, default keys and accel group....
void dt_accels_remove_accel(dt_accels_t *accels, const char *path, gpointer data)
Recursively remove all accels for all shortcuts containing path. This is unneeded for accels attached...
void dt_accels_disconnect_on_text_input(GtkWidget *widget)
Disconnect accels while a text or search entry has the focus, and reconnect them when it loses it....
void dt_accels_load_user_config(dt_accels_t *accels)
Loads keyboardrc.lang from config dir. This needs to run after we inited the accel map from widgets c...
void dt_accels_new_widget_shortcut(dt_accels_t *accels, GtkWidget *widget, const gchar *signal, GtkAccelGroup *accel_group, const gchar *accel_path, guint key_val, GdkModifierType accel_mods, const gboolean lock)
Register a new shortcut for a widget, setting up its path, default keys and accel group....
void dt_accels_attach_scroll_handler(dt_accels_t *accels, gboolean(*callback)(GdkEventScroll event, void *data), void *data)
Attach a new global scroll event callback. So far this is used in darkroom to redirect scroll events ...
void dt_accels_detach_scroll_handler(dt_accels_t *accels)
const char ** description(struct dt_iop_module_t *self)
typedef void((*dt_cache_allocate_t)(void *userdata, dt_cache_entry_t *entry))
struct _GtkWidget GtkWidget
GtkWidget, opaque, spelled exactly as GTK spells it.
dt_mipmap_buffer_dsc_flags flags
static const dt_aligned_pixel_simd_t value
const float uint32_t state[4]
GtkAccelGroup * slideshow_accels
GtkAccelGroup * map_accels
GtkAccelGroup * global_accels
GtkAccelGroup * print_accels
GtkAccelGroup * lighttable_accels
GdkModifierType default_mod_mask
GHashTable * acceleratables
GtkAccelGroup * active_group
GtkAccelGroup * darkroom_accels
GtkAccelGroup * accel_group
gboolean virtual_shortcut