GCC Code Coverage Report


Directory: ./
File: panels/keyboard/cc-keyboard-item.h
Date: 2024-05-04 07:58:27
Exec Total Coverage
Lines: 0 1 0.0%
Functions: 0 4 0.0%
Branches: 0 7 0.0%

Line Branch Exec Source
1 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*-
2 *
3 * Copyright (C) 2011 Red Hat, Inc.
4 *
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.
9 *
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.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, see <http://www.gnu.org/licenses/>.
17 *
18 */
19
20 #pragma once
21
22 #include <glib-object.h>
23 #include <gtk/gtk.h>
24
25 G_BEGIN_DECLS
26
27 #define CC_TYPE_KEYBOARD_ITEM (cc_keyboard_item_get_type ())
28 G_DECLARE_FINAL_TYPE (CcKeyboardItem, cc_keyboard_item, CC, KEYBOARD_ITEM, GObject)
29
30 typedef enum
31 {
32 BINDING_GROUP_SYSTEM,
33 BINDING_GROUP_APPS,
34 BINDING_GROUP_SEPARATOR,
35 BINDING_GROUP_USER,
36 } BindingGroupType;
37
38 typedef enum
39 {
40 CC_KEYBOARD_ITEM_TYPE_NONE = 0,
41 CC_KEYBOARD_ITEM_TYPE_GSETTINGS_PATH,
42 CC_KEYBOARD_ITEM_TYPE_GSETTINGS
43 } CcKeyboardItemType;
44
45 typedef struct
46 {
47 guint keyval;
48 guint keycode;
49 GdkModifierType mask;
50 } CcKeyCombo;
51
52 CcKeyboardItem* cc_keyboard_item_new (CcKeyboardItemType type);
53
54 gboolean cc_keyboard_item_matches_string (CcKeyboardItem *self,
55 GStrv search_terms);
56
57 gboolean cc_keyboard_item_load_from_gsettings_path (CcKeyboardItem *item,
58 const char *path,
59 gboolean reset);
60
61 gboolean cc_keyboard_item_load_from_gsettings (CcKeyboardItem *item,
62 const char *description,
63 const char *schema,
64 const char *key);
65
66 const char* cc_keyboard_item_get_description (CcKeyboardItem *item);
67
68 gboolean cc_keyboard_item_get_desc_editable (CcKeyboardItem *item);
69
70 const char* cc_keyboard_item_get_command (CcKeyboardItem *item);
71
72 gboolean cc_keyboard_item_get_cmd_editable (CcKeyboardItem *item);
73
74 gboolean cc_keyboard_item_equal (CcKeyboardItem *a,
75 CcKeyboardItem *b);
76
77 void cc_keyboard_item_add_reverse_item (CcKeyboardItem *item,
78 CcKeyboardItem *reverse_item,
79 gboolean is_reversed);
80
81 CcKeyboardItem* cc_keyboard_item_get_reverse_item (CcKeyboardItem *item);
82
83 void cc_keyboard_item_set_hidden (CcKeyboardItem *item,
84 gboolean hidden);
85
86 gboolean cc_keyboard_item_is_hidden (CcKeyboardItem *item);
87
88 gboolean cc_keyboard_item_is_value_default (CcKeyboardItem *self);
89
90 void cc_keyboard_item_reset (CcKeyboardItem *self);
91
92 GList* cc_keyboard_item_get_key_combos (CcKeyboardItem *self);
93
94 GList* cc_keyboard_item_get_default_combos (CcKeyboardItem *self);
95
96 CcKeyCombo cc_keyboard_item_get_primary_combo (CcKeyboardItem *self);
97
98 const gchar* cc_keyboard_item_get_key (CcKeyboardItem *self);
99
100 CcKeyboardItemType cc_keyboard_item_get_item_type (CcKeyboardItem *self);
101
102 const gchar* cc_keyboard_item_get_gsettings_path (CcKeyboardItem *self);
103
104 GSettings* cc_keyboard_item_get_settings (CcKeyboardItem *self);
105
106 gboolean cc_keyboard_item_can_set_multiple (CcKeyboardItem *self);
107
108 void cc_keyboard_item_add_key_combo (CcKeyboardItem *self,
109 CcKeyCombo *combo);
110
111 void cc_keyboard_item_remove_key_combo (CcKeyboardItem *self,
112 CcKeyCombo *combo);
113 void cc_keyboard_item_disable (CcKeyboardItem *self);
114
115 G_END_DECLS
116