[gnome-control-center/wip/gbsneto/new-keyboard-panel: 5/20] 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: 5/20] keyboard: expose structures in header
- Date: Sun, 24 Jul 2016 23:58:52 +0000 (UTC)
commit 8eba4b15d5544e03a5dadaa2b091cc1c3a6b82e1
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date: Fri Jul 22 15:24:06 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 | 52 ------------------------------
panels/keyboard/keyboard-shortcuts.h | 58 ++++++++++++++++++++++++++++++++++
2 files changed, 58 insertions(+), 52 deletions(-)
---
diff --git a/panels/keyboard/keyboard-shortcuts.c b/panels/keyboard/keyboard-shortcuts.c
index fa01392..d6e0859 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"
@@ -33,58 +32,7 @@
#include <gdk/gdkx.h>
#endif
-#define BINDINGS_SCHEMA "org.gnome.settings-daemon.plugins.media-keys"
#define CUSTOM_KEYS_BASENAME "/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings"
-#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;
diff --git a/panels/keyboard/keyboard-shortcuts.h b/panels/keyboard/keyboard-shortcuts.h
index 4e849ec..8b30f86 100644
--- a/panels/keyboard/keyboard-shortcuts.h
+++ b/panels/keyboard/keyboard-shortcuts.h
@@ -24,3 +24,61 @@
void keyboard_shortcuts_init (CcPanel *panel, GtkBuilder *builder);
gboolean keyboard_shortcuts_set_section (CcPanel *panel, const char *section);
void keyboard_shortcuts_dispose (CcPanel *panel);
+#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
+};
+
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]