From 6004197064cea2d979747b03c79616d52c27d2ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20M=C3=BCllner?= Date: Sat, 17 Nov 2012 00:32:04 +0100 Subject: [PATCH] keybindings: Add is_builtin() method https://bugzilla.gnome.org/show_bug.cgi?id=688202 --- src/core/keybindings.c | 6 ++++++ src/meta/keybindings.h | 1 + 2 files changed, 7 insertions(+) diff --git a/src/core/keybindings.c b/src/core/keybindings.c index f750b2fca..63b0e1387 100644 --- a/src/core/keybindings.c +++ b/src/core/keybindings.c @@ -95,6 +95,12 @@ meta_key_binding_get_mask (MetaKeyBinding *binding) return binding->mask; } +gboolean +meta_key_binding_is_builtin (MetaKeyBinding *binding) +{ + return binding->handler->flags & META_KEY_BINDING_BUILTIN; +} + /* These can't be bound to anything, but they are used to handle * various other events. TODO: Possibly we should include them as event * handler functions and have some kind of flag to say they're unbindable. diff --git a/src/meta/keybindings.h b/src/meta/keybindings.h index 862e1b214..2cd2a378a 100644 --- a/src/meta/keybindings.h +++ b/src/meta/keybindings.h @@ -28,6 +28,7 @@ const char *meta_key_binding_get_name (MetaKeyBinding *binding); MetaVirtualModifier meta_key_binding_get_modifiers (MetaKeyBinding *binding); guint meta_key_binding_get_mask (MetaKeyBinding *binding); +gboolean meta_key_binding_is_builtin (MetaKeyBinding *binding); gboolean meta_keybindings_set_custom_handler (const gchar *name, MetaKeyHandlerFunc handler,