1
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*-
3
* Copyright (C) 2011 Red Hat, Inc.
5
* This program is free software; you can redistribute it and/or modify
6
* it under the terms of the GNU General Public License as published by
7
* the Free Software Foundation; either version 2 of the License, or
8
* (at your option) any later version.
10
* This program is distributed in the hope that it will be useful,
11
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
* GNU General Public License for more details.
15
* You should have received a copy of the GNU General Public License
16
* along with this program; if not, write to the Free Software
17
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
21
#ifndef __CC_REGION_KEYBOARD_ITEM_H
22
#define __CC_REGION_KEYBOARD_ITEM_H
24
#include <glib-object.h>
28
#define CC_TYPE_REGION_KEYBOARD_ITEM (cc_region_keyboard_item_get_type ())
29
#define CC_REGION_KEYBOARD_ITEM(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), CC_TYPE_REGION_KEYBOARD_ITEM, CcRegionKeyboardItem))
30
#define CC_REGION_KEYBOARD_ITEM_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), CC_TYPE_REGION_KEYBOARD_ITEM, CcRegionKeyboardItemClass))
31
#define CC_IS_REGION_KEYBOARD_ITEM(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), CC_TYPE_REGION_KEYBOARD_ITEM))
32
#define CC_IS_REGION_KEYBOARD_ITEM_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), CC_TYPE_REGION_KEYBOARD_ITEM))
33
#define CC_REGION_KEYBOARD_ITEM_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), CC_TYPE_REGION_KEYBOARD_ITEM, CcRegionKeyboardItemClass))
39
BINDING_GROUP_SEPARATOR,
44
CC_REGION_KEYBOARD_ITEM_TYPE_NONE = 0,
45
CC_REGION_KEYBOARD_ITEM_TYPE_GSETTINGS_PATH,
46
CC_REGION_KEYBOARD_ITEM_TYPE_GSETTINGS
47
} CcRegionKeyboardItemType;
49
typedef struct CcRegionKeyboardItemPrivate CcRegionKeyboardItemPrivate;
54
CcRegionKeyboardItemPrivate *priv;
57
CcRegionKeyboardItemType type;
60
/* FIXME move to priv? */
64
BindingGroupType group;
67
char *gettext_package;
73
gboolean desc_editable;
75
gboolean cmd_editable;
81
} CcRegionKeyboardItem;
85
GObjectClass parent_class;
86
} CcRegionKeyboardItemClass;
88
GType cc_region_keyboard_item_get_type (void);
90
CcRegionKeyboardItem * cc_region_keyboard_item_new (CcRegionKeyboardItemType type);
91
gboolean cc_region_keyboard_item_load_from_gsettings_path (CcRegionKeyboardItem *item,
94
gboolean cc_region_keyboard_item_load_from_gsettings (CcRegionKeyboardItem *item,
95
const char *description,
99
const char * cc_region_keyboard_item_get_description (CcRegionKeyboardItem *item);
100
const char * cc_region_keyboard_item_get_binding (CcRegionKeyboardItem *item);
101
const char * cc_region_keyboard_item_get_command (CcRegionKeyboardItem *item);
103
gboolean cc_region_keyboard_item_equal (CcRegionKeyboardItem *a,
104
CcRegionKeyboardItem *b);
108
#endif /* __CC_REGION_KEYBOARD_ITEM_H */