Commit dfa01baa authored by Georges Basile Stavracas Neto's avatar Georges Basile Stavracas Neto
Browse files

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
parent 7e1d5757
......@@ -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)
......
......@@ -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);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment