[gnome-builder/wip/chergert/shortcuts] wip on shortcuts window



commit 6078b963071f989fadd8003bb5781db3919fa026
Author: Christian Hergert <christian hergert me>
Date:   Mon Aug 24 22:22:22 2015 -0700

    wip on shortcuts window

 contrib/egg/Makefile.am            |    6 +
 contrib/egg/egg-shortcuts-group.c  |  142 +++++++++++++++++++++++
 contrib/egg/egg-shortcuts-group.h  |   40 +++++++
 contrib/egg/egg-shortcuts-item.c   |  145 ++++++++++++++++++++++++
 contrib/egg/egg-shortcuts-item.h   |   32 ++++++
 contrib/egg/egg-shortcuts-window.c |  217 ++++++++++++++++++++++++++++++++++++
 contrib/egg/egg-shortcuts-window.h |   45 ++++++++
 7 files changed, 627 insertions(+), 0 deletions(-)
---
diff --git a/contrib/egg/Makefile.am b/contrib/egg/Makefile.am
index 45e893e..7dbb26d 100644
--- a/contrib/egg/Makefile.am
+++ b/contrib/egg/Makefile.am
@@ -14,6 +14,12 @@ libegg_private_la_SOURCES = \
        egg-search-bar.h \
        egg-settings-sandwich.c \
        egg-settings-sandwich.h \
+       egg-shortcuts-group.c \
+       egg-shortcuts-group.h \
+       egg-shortcuts-item.c \
+       egg-shortcuts-item.h \
+       egg-shortcuts-window.c \
+       egg-shortcuts-window.h \
        egg-signal-group.c \
        egg-signal-group.h \
        egg-state-machine.c \
diff --git a/contrib/egg/egg-shortcuts-group.c b/contrib/egg/egg-shortcuts-group.c
new file mode 100644
index 0000000..983dcea
--- /dev/null
+++ b/contrib/egg/egg-shortcuts-group.c
@@ -0,0 +1,142 @@
+/* egg-shortcuts-group.c
+ *
+ * Copyright (C) 2015 Christian Hergert <christian hergert me>
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <glib/gi18n.h>
+
+#include "egg-shortcuts-item.h"
+#include "egg-shortcuts-group.h"
+
+struct _EggShortcutsGroup
+{
+  GtkBox    parent_instance;
+
+  GtkLabel *title;
+};
+
+G_DEFINE_TYPE (EggShortcutsGroup, egg_shortcuts_group, GTK_TYPE_BOX)
+
+enum {
+  PROP_0,
+  PROP_TITLE,
+  LAST_PROP
+};
+
+static GParamSpec *gParamSpecs [LAST_PROP];
+
+void
+egg_shortcuts_group_add_shortcut (EggShortcutsGroup *self,
+                                  const gchar       *accelerator,
+                                  const gchar       *description,
+                                  const gchar       *keywords)
+{
+  EggShortcutsItem *item;
+
+  g_return_if_fail (EGG_IS_SHORTCUTS_GROUP (self));
+  g_return_if_fail (accelerator != NULL);
+  g_return_if_fail (description != NULL);
+
+  item = g_object_new (EGG_TYPE_SHORTCUTS_ITEM,
+                       "accelerator", accelerator,
+                       "description", description,
+                       "keywords", keywords,
+                       "visible", TRUE,
+                       NULL);
+  gtk_container_add (GTK_CONTAINER (self), GTK_WIDGET (item));
+}
+
+const gchar *
+egg_shortcuts_group_get_title (EggShortcutsGroup *self)
+{
+  g_return_val_if_fail (EGG_IS_SHORTCUTS_GROUP (self), NULL);
+
+  return gtk_label_get_label (self->title);
+}
+
+void
+egg_shortcuts_group_set_title (EggShortcutsGroup *self,
+                               const gchar       *title)
+{
+  g_return_if_fail (EGG_IS_SHORTCUTS_GROUP (self));
+
+  gtk_label_set_label (self->title, title);
+}
+
+static void
+egg_shortcuts_group_get_property (GObject    *object,
+                                  guint       prop_id,
+                                  GValue     *value,
+                                  GParamSpec *pspec)
+{
+  EggShortcutsGroup *self = EGG_SHORTCUTS_GROUP (object);
+
+  switch (prop_id)
+    {
+    case PROP_TITLE:
+      g_value_set_string (value, egg_shortcuts_group_get_title (self));
+      break;
+
+    default:
+      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+    }
+}
+
+static void
+egg_shortcuts_group_set_property (GObject      *object,
+                                  guint         prop_id,
+                                  const GValue *value,
+                                  GParamSpec   *pspec)
+{
+  EggShortcutsGroup *self = EGG_SHORTCUTS_GROUP (object);
+
+  switch (prop_id)
+    {
+    case PROP_TITLE:
+      egg_shortcuts_group_set_title (self, g_value_get_string (value));
+      break;
+
+    default:
+      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+    }
+}
+
+static void
+egg_shortcuts_group_class_init (EggShortcutsGroupClass *klass)
+{
+  GObjectClass *object_class = G_OBJECT_CLASS (klass);
+
+  object_class->get_property = egg_shortcuts_group_get_property;
+  object_class->set_property = egg_shortcuts_group_set_property;
+
+  gParamSpecs [PROP_TITLE] =
+    g_param_spec_string ("title",
+                         _("Title"),
+                         _("Title"),
+                         NULL,
+                         (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+  g_object_class_install_properties (object_class, LAST_PROP, gParamSpecs);
+}
+
+static void
+egg_shortcuts_group_init (EggShortcutsGroup *self)
+{
+  self->title = g_object_new (GTK_TYPE_LABEL,
+                              "visible", TRUE,
+                              NULL);
+  gtk_container_add (GTK_CONTAINER (self), GTK_WIDGET (self->title));
+}
diff --git a/contrib/egg/egg-shortcuts-group.h b/contrib/egg/egg-shortcuts-group.h
new file mode 100644
index 0000000..45c8234
--- /dev/null
+++ b/contrib/egg/egg-shortcuts-group.h
@@ -0,0 +1,40 @@
+/* egg-shortcuts-group.h
+ *
+ * Copyright (C) 2015 Christian Hergert <christian hergert me>
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef EGG_SHORTCUTS_GROUP_H
+#define EGG_SHORTCUTS_GROUP_H
+
+#include <gtk/gtk.h>
+
+G_BEGIN_DECLS
+
+#define EGG_TYPE_SHORTCUTS_GROUP (egg_shortcuts_group_get_type())
+
+G_DECLARE_FINAL_TYPE (EggShortcutsGroup, egg_shortcuts_group, EGG, SHORTCUTS_GROUP, GtkBox)
+
+void         egg_shortcuts_group_add_shortcut (EggShortcutsGroup *self,
+                                               const gchar       *accelerator,
+                                               const gchar       *description,
+                                               const gchar       *keywords);
+const gchar *egg_shortcuts_group_get_title    (EggShortcutsGroup *self);
+void         egg_shortcuts_group_set_title    (EggShortcutsGroup *self,
+                                               const gchar       *title);
+
+G_END_DECLS
+
+#endif /* EGG_SHORTCUTS_GROUP_H */
diff --git a/contrib/egg/egg-shortcuts-item.c b/contrib/egg/egg-shortcuts-item.c
new file mode 100644
index 0000000..e935c94
--- /dev/null
+++ b/contrib/egg/egg-shortcuts-item.c
@@ -0,0 +1,145 @@
+/* egg-shortcuts-item.c
+ *
+ * Copyright (C) 2015 Christian Hergert <christian hergert me>
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <glib/gi18n.h>
+
+#include "egg-shortcuts-item.h"
+
+struct _EggShortcutsItem
+{
+  GtkBox    parent_instance;
+
+  gchar    *accelerator;
+  gchar    *keywords;
+
+  GtkLabel *description;
+};
+
+G_DEFINE_TYPE (EggShortcutsItem, egg_shortcuts_item, GTK_TYPE_BOX)
+
+enum {
+  PROP_0,
+  PROP_ACCELERATOR,
+  PROP_DESCRIPTION,
+  PROP_KEYWORDS,
+  LAST_PROP
+};
+
+static GParamSpec *gParamSpecs [LAST_PROP];
+
+static void
+update_accelerator (EggShortcutsItem *self)
+{
+}
+
+static void
+egg_shortcuts_item_finalize (GObject *object)
+{
+  EggShortcutsItem *self = (EggShortcutsItem *)object;
+
+  g_clear_pointer (&self->accelerator, g_free);
+  g_clear_pointer (&self->keywords, g_free);
+
+  G_OBJECT_CLASS (egg_shortcuts_item_parent_class)->finalize (object);
+}
+
+static void
+egg_shortcuts_item_get_property (GObject    *object,
+                                 guint       prop_id,
+                                 GValue     *value,
+                                 GParamSpec *pspec)
+{
+  EggShortcutsItem *self = EGG_SHORTCUTS_ITEM (object);
+
+  switch (prop_id)
+    {
+    case PROP_ACCELERATOR:
+      g_value_set_string (value, self->accelerator);
+      break;
+
+    case PROP_DESCRIPTION:
+      g_value_set_string (value, gtk_label_get_label (self->description));
+      break;
+
+    case PROP_KEYWORDS:
+      g_value_set_string (value, self->keywords);
+      break;
+
+    default:
+      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+    }
+}
+
+static void
+egg_shortcuts_item_set_property (GObject      *object,
+                                 guint         prop_id,
+                                 const GValue *value,
+                                 GParamSpec   *pspec)
+{
+  EggShortcutsItem *self = EGG_SHORTCUTS_ITEM (object);
+
+  switch (prop_id)
+    {
+    case PROP_ACCELERATOR:
+      g_free (self->accelerator);
+      self->accelerator = g_value_dup_string (value);
+      update_accelerator (self);
+      break;
+
+    case PROP_DESCRIPTION:
+      gtk_label_set_label (self->description, g_value_get_string (value));
+      break;
+
+    case PROP_KEYWORDS:
+      g_free (self->keywords);
+      self->keywords = g_value_dup_string (value);
+      break;
+
+    default:
+      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+    }
+}
+
+static void
+egg_shortcuts_item_class_init (EggShortcutsItemClass *klass)
+{
+  GObjectClass *object_class = G_OBJECT_CLASS (klass);
+
+  object_class->finalize = egg_shortcuts_item_finalize;
+  object_class->get_property = egg_shortcuts_item_get_property;
+  object_class->set_property = egg_shortcuts_item_set_property;
+
+  gParamSpecs [PROP_KEYWORDS] =
+    g_param_spec_string ("keywords",
+                         _("Keywords"),
+                         _("Keywords"),
+                         NULL,
+                         (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+  g_object_class_install_properties (object_class, LAST_PROP, gParamSpecs);
+}
+
+static void
+egg_shortcuts_item_init (EggShortcutsItem *self)
+{
+  self->description = g_object_new (GTK_TYPE_LABEL,
+                                    "hexpand", TRUE,
+                                    "visible", TRUE,
+                                    NULL);
+  gtk_container_add (GTK_CONTAINER (self), GTK_WIDGET (self->description));
+}
diff --git a/contrib/egg/egg-shortcuts-item.h b/contrib/egg/egg-shortcuts-item.h
new file mode 100644
index 0000000..a65d9b1
--- /dev/null
+++ b/contrib/egg/egg-shortcuts-item.h
@@ -0,0 +1,32 @@
+/* egg-shortcuts-item.h
+ *
+ * Copyright (C) 2015 Christian Hergert <christian hergert me>
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef EGG_SHORTCUTS_ITEM_H
+#define EGG_SHORTCUTS_ITEM_H
+
+#include <gtk/gtk.h>
+
+G_BEGIN_DECLS
+
+#define EGG_TYPE_SHORTCUTS_ITEM (egg_shortcuts_item_get_type())
+
+G_DECLARE_FINAL_TYPE (EggShortcutsItem, egg_shortcuts_item, EGG, SHORTCUTS_ITEM, GtkBox)
+
+G_END_DECLS
+
+#endif /* EGG_SHORTCUTS_ITEM_H */
diff --git a/contrib/egg/egg-shortcuts-window.c b/contrib/egg/egg-shortcuts-window.c
new file mode 100644
index 0000000..144ace0
--- /dev/null
+++ b/contrib/egg/egg-shortcuts-window.c
@@ -0,0 +1,217 @@
+/* egg-shortcuts-window.c
+ *
+ * Copyright (C) 2015 Christian Hergert <christian hergert me>
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <glib/gi18n.h>
+
+#include "egg-fill-box.h"
+#include "egg-search-bar.h"
+#include "egg-shortcuts-group.h"
+#include "egg-shortcuts-window.h"
+
+typedef struct
+{
+  GHashTable      *groups;
+
+  EggFillBox      *fill_box;
+  GtkHeaderBar    *header_bar;
+  EggSearchBar    *search_bar;
+  GtkToggleButton *search_button;
+  GtkSearchEntry  *search_entry;
+} EggShortcutsWindowPrivate;
+
+G_DEFINE_TYPE_WITH_PRIVATE (EggShortcutsWindow, egg_shortcuts_window, GTK_TYPE_WINDOW)
+
+enum {
+  PROP_0,
+  PROP_SEARCH_TEXT,
+  LAST_PROP
+};
+
+static GParamSpec *gParamSpecs [LAST_PROP];
+
+void
+egg_shortcuts_window_add_shortcut (EggShortcutsWindow *self,
+                                   const gchar        *group_name,
+                                   const gchar        *accelerator,
+                                   const gchar        *description,
+                                   const gchar        *keywords)
+{
+  EggShortcutsWindowPrivate *priv = egg_shortcuts_window_get_instance_private (self);
+  EggShortcutsGroup *group;
+
+  g_return_if_fail (EGG_IS_SHORTCUTS_WINDOW (self));
+  g_return_if_fail (group_name != NULL);
+  g_return_if_fail (accelerator != NULL);
+  g_return_if_fail (description != NULL);
+
+  group = g_hash_table_lookup (priv->groups, group_name);
+
+  if (group == NULL)
+    {
+      group = g_object_new (EGG_TYPE_SHORTCUTS_GROUP,
+                            "title", group_name,
+                            "visible", TRUE,
+                            NULL);
+      g_hash_table_insert (priv->groups, g_strdup (group_name), group);
+      gtk_container_add (GTK_CONTAINER (priv->fill_box), GTK_WIDGET (group));
+    }
+
+  egg_shortcuts_group_add_shortcut (group, accelerator, description, keywords);
+}
+
+const gchar *
+egg_shortcuts_window_get_search_text (EggShortcutsWindow *self)
+{
+  EggShortcutsWindowPrivate *priv = egg_shortcuts_window_get_instance_private (self);
+
+  g_return_val_if_fail (EGG_IS_SHORTCUTS_WINDOW (self), NULL);
+
+  return gtk_entry_get_text (GTK_ENTRY (priv->search_entry));
+}
+
+void
+egg_shortcuts_window_set_search_text (EggShortcutsWindow *self,
+                                      const gchar        *search_text)
+{
+  EggShortcutsWindowPrivate *priv = egg_shortcuts_window_get_instance_private (self);
+
+  g_return_if_fail (EGG_IS_SHORTCUTS_WINDOW (self));
+
+  gtk_entry_set_text (GTK_ENTRY (priv->search_entry), search_text ?: "");
+}
+
+static void
+egg_shortcuts_window_finalize (GObject *object)
+{
+  EggShortcutsWindow *self = (EggShortcutsWindow *)object;
+  EggShortcutsWindowPrivate *priv = egg_shortcuts_window_get_instance_private (self);
+
+  g_clear_pointer (&priv->groups, g_hash_table_unref);
+
+  G_OBJECT_CLASS (egg_shortcuts_window_parent_class)->finalize (object);
+}
+
+static void
+egg_shortcuts_window_get_property (GObject    *object,
+                                   guint       prop_id,
+                                   GValue     *value,
+                                   GParamSpec *pspec)
+{
+  EggShortcutsWindow *self = EGG_SHORTCUTS_WINDOW (object);
+
+  switch (prop_id)
+    {
+    case PROP_SEARCH_TEXT:
+      g_value_set_string (value, egg_shortcuts_window_get_search_text (self));
+      break;
+
+    default:
+      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+    }
+}
+
+static void
+egg_shortcuts_window_set_property (GObject      *object,
+                                   guint         prop_id,
+                                   const GValue *value,
+                                   GParamSpec   *pspec)
+{
+  EggShortcutsWindow *self = EGG_SHORTCUTS_WINDOW (object);
+
+  switch (prop_id)
+    {
+    case PROP_SEARCH_TEXT:
+      egg_shortcuts_window_set_search_text (self, g_value_get_string (value));
+      break;
+
+    default:
+      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+    }
+}
+
+static void
+egg_shortcuts_window_class_init (EggShortcutsWindowClass *klass)
+{
+  GObjectClass *object_class = G_OBJECT_CLASS (klass);
+
+  object_class->finalize = egg_shortcuts_window_finalize;
+  object_class->get_property = egg_shortcuts_window_get_property;
+  object_class->set_property = egg_shortcuts_window_set_property;
+
+  gParamSpecs [PROP_SEARCH_TEXT] =
+    g_param_spec_string ("search-text",
+                         _("Search Text"),
+                         _("Search Text"),
+                         NULL,
+                         (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+  g_object_class_install_properties (object_class, LAST_PROP, gParamSpecs);
+}
+
+static void
+egg_shortcuts_window_init (EggShortcutsWindow *self)
+{
+  EggShortcutsWindowPrivate *priv = egg_shortcuts_window_get_instance_private (self);
+  GtkScrolledWindow *scroller;
+  GtkBox *box;
+
+  priv->groups = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, NULL);
+
+  priv->header_bar = g_object_new (GTK_TYPE_HEADER_BAR,
+                                   "show-close-button", TRUE,
+                                   "visible", TRUE,
+                                   NULL);
+  gtk_window_set_titlebar (GTK_WINDOW (self), GTK_WIDGET (priv->header_bar));
+
+  priv->search_button = g_object_new (GTK_TYPE_TOGGLE_BUTTON,
+                                      "child", g_object_new (GTK_TYPE_IMAGE,
+                                                             "icon-name", "edit-find-symbolic",
+                                                             "visible", TRUE,
+                                                             NULL),
+                                      "visible", TRUE,
+                                      NULL);
+  gtk_style_context_add_class (gtk_widget_get_style_context (GTK_WIDGET (priv->search_button)),
+                               "image-button");
+  gtk_container_add_with_properties (GTK_CONTAINER (priv->header_bar),
+                                     GTK_WIDGET (priv->search_button),
+                                     "pack-type", GTK_PACK_END,
+                                     "position", 0,
+                                     NULL);
+
+  box = g_object_new (GTK_TYPE_BOX,
+                      "orientation", GTK_ORIENTATION_VERTICAL,
+                      "visible", TRUE,
+                      NULL);
+  gtk_container_add (GTK_CONTAINER (self), GTK_WIDGET (box));
+
+  priv->search_bar = g_object_new (EGG_TYPE_SEARCH_BAR,
+                                   "visible", TRUE,
+                                   NULL);
+  gtk_container_add (GTK_CONTAINER (box), GTK_WIDGET (priv->search_bar));
+
+  scroller = g_object_new (GTK_TYPE_SCROLLED_WINDOW,
+                           "vexpand", TRUE,
+                           "visible", TRUE,
+                           NULL);
+  gtk_container_add (GTK_CONTAINER (box), GTK_WIDGET (scroller));
+
+  priv->fill_box = g_object_new (EGG_TYPE_FILL_BOX,
+                                 "visible", TRUE,
+                                 NULL);
+  gtk_container_add (GTK_CONTAINER (scroller), GTK_WIDGET (priv->fill_box));
+}
diff --git a/contrib/egg/egg-shortcuts-window.h b/contrib/egg/egg-shortcuts-window.h
new file mode 100644
index 0000000..820267f
--- /dev/null
+++ b/contrib/egg/egg-shortcuts-window.h
@@ -0,0 +1,45 @@
+/* egg-shortcuts-window.h
+ *
+ * Copyright (C) 2015 Christian Hergert <christian hergert me>
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef EGG_SHORTCUTS_WINDOW_H
+#define EGG_SHORTCUTS_WINDOW_H
+
+#include <gtk/gtk.h>
+
+G_BEGIN_DECLS
+
+#define EGG_TYPE_SHORTCUTS_WINDOW (egg_shortcuts_window_get_type())
+
+G_DECLARE_DERIVABLE_TYPE (EggShortcutsWindow, egg_shortcuts_window, EGG, SHORTCUTS_WINDOW, GtkWindow)
+
+struct _EggShortcutsWindowClass
+{
+  GtkWindowClass parent;
+};
+
+void egg_shortcuts_window_set_search_text (EggShortcutsWindow *self,
+                                           const gchar        *search_text);
+void egg_shortcuts_window_add_shortcut    (EggShortcutsWindow *self,
+                                           const gchar        *group,
+                                           const gchar        *accelerator,
+                                           const gchar        *description,
+                                           const gchar        *keywords);
+
+G_END_DECLS
+
+#endif /* EGG_SHORTCUTS_WINDOW_H */


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]