summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2020-03-30 20:09:29 -0400
committerMatthias Clasen <mclasen@redhat.com>2020-03-30 20:09:29 -0400
commit15eb3bbbf12d94d107483eb71acbf67352317c11 (patch)
tree1d2a5a6d5b0d6f21fe9d461ac6f00084303f0c30
parent96f822434f0b67c97e4be03abf19e84143bd39ef (diff)
downloadgtk+-15eb3bbbf12d94d107483eb71acbf67352317c11.tar.gz
shortcutcontroller: Document buildable support
-rw-r--r--gtk/gtkshortcutcontroller.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/gtk/gtkshortcutcontroller.c b/gtk/gtkshortcutcontroller.c
index d18b6902f2..d7534001fe 100644
--- a/gtk/gtkshortcutcontroller.c
+++ b/gtk/gtkshortcutcontroller.c
@@ -36,6 +36,28 @@
*
* #GtkShortcutController implements #GListModel for querying the shortcuts that
* have been added to it.
+ *
+ * # GtkShortcutController as a GtkBuildable
+ *
+ * GtkShortcutControllers can be creates in ui files to set up shortcuts
+ * in the same place as the widgets.
+ *
+ * An example of a UI definition fragment with GtkShortcutController:
+ * |[
+ * <object class='GtkButton'>
+ * <child>
+ * <object class='GtkShortcutController'>
+ * <property name='scope'>managed</property>
+ * <child>
+ * <object class='GtkShortcut'>
+ * <property name='trigger'>&lt;Control&gt;k</property>
+ * <property name='action'>activate</property>
+ * </object>
+ * </child>
+ * </object>
+ * </child>
+ * </object>
+ * ]|
**/
#include "config.h"