keybindings: Add is_builtin() method

https://bugzilla.gnome.org/show_bug.cgi?id=688202
This commit is contained in:
Florian Müllner 2012-11-17 00:32:04 +01:00
parent aa43e715c0
commit 6004197064
2 changed files with 7 additions and 0 deletions

View File

@ -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.

View File

@ -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,