[gnome-control-center/wip/gbsneto/new-keyboard-panel: 1/16] keyboard: expose structures in header
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center/wip/gbsneto/new-keyboard-panel: 1/16] keyboard: expose structures in header
- Date: Tue, 26 Jul 2016 14:15:57 +0000 (UTC)
commit 91f1a362e038457f636bceea5c8cf9e9fe5a14c1
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date: Tue Jul 26 11:02:09 2016 -0300
keyboard: expose structures in header
These structures will be used in future commits when
moving to use a template class.
https://bugzilla.gnome.org/show_bug.cgi?id=769063
panels/keyboard/keyboard-shortcuts.c | 57 ---------------------------------
panels/keyboard/keyboard-shortcuts.h | 58 ++++++++++++++++++++++++++++++++++
2 files changed, 58 insertions(+), 57 deletions(-)
---
diff --git a/panels/keyboard/keyboard-shortcuts.c b/panels/keyboard/keyboard-shortcuts.c
index fa01392..3a6ffd0 100644
--- a/panels/keyboard/keyboard-shortcuts.c
+++ b/panels/keyboard/keyboard-shortcuts.c
@@ -25,7 +25,6 @@
#include <glib/gi18n.h>
#include "keyboard-shortcuts.h"
-#include "cc-keyboard-item.h"
#include "cc-keyboard-option.h"
#include "wm-common.h"
@@ -38,54 +37,6 @@
#define CUSTOM_SHORTCUTS_ID "custom"
#define WID(builder, name) (GTK_WIDGET (gtk_builder_get_object (builder, name)))
-typedef struct {
- /* The untranslated name, combine with ->package to translate */
- char *name;
- /* The group of keybindings (system or application) */
- char *group;
- /* The gettext package to use to translate the section title */
- char *package;
- /* Name of the window manager the keys would apply to */
- char *wm_name;
- /* The GSettings schema for the whole file, if any */
- char *schema;
- /* an array of KeyListEntry */
- GArray *entries;
-} KeyList;
-
-typedef struct
-{
- CcKeyboardItemType type;
- char *schema; /* GSettings schema name, if any */
- char *description; /* description for GSettings types */
- char *name; /* GSettings schema path, or GSettings key name depending on type */
- char *reverse_entry;
- gboolean is_reversed;
- gboolean hidden;
-} KeyListEntry;
-
-typedef enum
-{
- SHORTCUT_TYPE_KEY_ENTRY,
- SHORTCUT_TYPE_XKB_OPTION,
-} ShortcutType;
-
-enum
-{
- DETAIL_DESCRIPTION_COLUMN,
- DETAIL_KEYENTRY_COLUMN,
- DETAIL_TYPE_COLUMN,
- DETAIL_N_COLUMNS
-};
-
-enum
-{
- SECTION_DESCRIPTION_COLUMN,
- SECTION_ID_COLUMN,
- SECTION_GROUP_COLUMN,
- SECTION_N_COLUMNS
-};
-
static GRegex *pictures_regex = NULL;
static GSettings *binding_settings = NULL;
static GtkWidget *custom_shortcut_dialog = NULL;
@@ -1233,14 +1184,6 @@ keyval_is_forbidden (guint keyval)
return FALSE;
}
-typedef struct {
- CcKeyboardItem *orig_item;
- CcKeyboardItem *conflict_item;
- guint new_keyval;
- GdkModifierType new_mask;
- guint new_keycode;
-} CcUniquenessData;
-
static gboolean
compare_keys_for_uniqueness (CcKeyboardItem *element,
CcUniquenessData *data)
diff --git a/panels/keyboard/keyboard-shortcuts.h b/panels/keyboard/keyboard-shortcuts.h
index 4e849ec..02564b1 100644
--- a/panels/keyboard/keyboard-shortcuts.h
+++ b/panels/keyboard/keyboard-shortcuts.h
@@ -21,6 +21,64 @@
#include <gtk/gtk.h>
#include <shell/cc-panel.h>
+#include "cc-keyboard-item.h"
+
+typedef struct {
+ /* The untranslated name, combine with ->package to translate */
+ char *name;
+ /* The group of keybindings (system or application) */
+ char *group;
+ /* The gettext package to use to translate the section title */
+ char *package;
+ /* Name of the window manager the keys would apply to */
+ char *wm_name;
+ /* The GSettings schema for the whole file, if any */
+ char *schema;
+ /* an array of KeyListEntry */
+ GArray *entries;
+} KeyList;
+
+typedef struct
+{
+ CcKeyboardItemType type;
+ char *schema; /* GSettings schema name, if any */
+ char *description; /* description for GSettings types */
+ char *name; /* GSettings schema path, or GSettings key name depending on type */
+ char *reverse_entry;
+ gboolean is_reversed;
+ gboolean hidden;
+} KeyListEntry;
+
+typedef struct {
+ CcKeyboardItem *orig_item;
+ CcKeyboardItem *conflict_item;
+ guint new_keyval;
+ GdkModifierType new_mask;
+ guint new_keycode;
+} CcUniquenessData;
+
+typedef enum
+{
+ SHORTCUT_TYPE_KEY_ENTRY,
+ SHORTCUT_TYPE_XKB_OPTION,
+} ShortcutType;
+
+enum
+{
+ DETAIL_DESCRIPTION_COLUMN,
+ DETAIL_KEYENTRY_COLUMN,
+ DETAIL_TYPE_COLUMN,
+ DETAIL_N_COLUMNS
+};
+
+enum
+{
+ SECTION_DESCRIPTION_COLUMN,
+ SECTION_ID_COLUMN,
+ SECTION_GROUP_COLUMN,
+ SECTION_N_COLUMNS
+};
+
void keyboard_shortcuts_init (CcPanel *panel, GtkBuilder *builder);
gboolean keyboard_shortcuts_set_section (CcPanel *panel, const char *section);
void keyboard_shortcuts_dispose (CcPanel *panel);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]