Line |
Branch |
Exec |
Source |
1 |
|
|
/* |
2 |
|
|
* Copyright (c) 2010 Intel, Inc. |
3 |
|
|
* |
4 |
|
|
* The Control Center is free software; you can redistribute it and/or modify |
5 |
|
|
* it under the terms of the GNU General Public License as published by the |
6 |
|
|
* Free Software Foundation; either version 2 of the License, or (at your |
7 |
|
|
* option) any later version. |
8 |
|
|
* |
9 |
|
|
* The Control Center is distributed in the hope that it will be useful, but |
10 |
|
|
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY |
11 |
|
|
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
12 |
|
|
* for more details. |
13 |
|
|
* |
14 |
|
|
* You should have received a copy of the GNU General Public License along |
15 |
|
|
* with the Control Center; if not, write to the Free Software Foundation, |
16 |
|
|
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
17 |
|
|
* |
18 |
|
|
* Author: Thomas Wood <thos@gnome.org> |
19 |
|
|
*/ |
20 |
|
|
|
21 |
|
|
#pragma once |
22 |
|
|
|
23 |
|
|
#include "cc-panel.h" |
24 |
|
|
|
25 |
|
|
#include <gtk/gtk.h> |
26 |
|
|
|
27 |
|
|
G_BEGIN_DECLS |
28 |
|
|
|
29 |
|
|
#define CC_TYPE_SHELL_MODEL cc_shell_model_get_type() |
30 |
|
|
|
31 |
|
✗ |
G_DECLARE_FINAL_TYPE (CcShellModel, cc_shell_model, CC, SHELL_MODEL, GtkListStore) |
32 |
|
|
|
33 |
|
|
typedef enum |
34 |
|
|
{ |
35 |
|
|
CC_CATEGORY_CONNECTIVITY, |
36 |
|
|
CC_CATEGORY_PERSONALIZATION, |
37 |
|
|
CC_CATEGORY_ACCOUNT, |
38 |
|
|
CC_CATEGORY_HARDWARE, |
39 |
|
|
CC_CATEGORY_DEVICES, |
40 |
|
|
CC_CATEGORY_DETAILS, |
41 |
|
|
CC_CATEGORY_SYSTEM, |
42 |
|
|
CC_CATEGORY_PRIVACY, |
43 |
|
|
CC_CATEGORY_LAST |
44 |
|
|
} CcPanelCategory; |
45 |
|
|
|
46 |
|
|
enum |
47 |
|
|
{ |
48 |
|
|
COL_NAME, |
49 |
|
|
COL_CASEFOLDED_NAME, |
50 |
|
|
COL_APP, |
51 |
|
|
COL_ID, |
52 |
|
|
COL_CATEGORY, |
53 |
|
|
COL_DESCRIPTION, |
54 |
|
|
COL_CASEFOLDED_DESCRIPTION, |
55 |
|
|
COL_GICON, |
56 |
|
|
COL_KEYWORDS, |
57 |
|
|
COL_VISIBILITY, |
58 |
|
|
|
59 |
|
|
N_COLS |
60 |
|
|
}; |
61 |
|
|
|
62 |
|
|
|
63 |
|
|
CcShellModel* cc_shell_model_new (void); |
64 |
|
|
|
65 |
|
|
void cc_shell_model_add_item (CcShellModel *model, |
66 |
|
|
CcPanelCategory category, |
67 |
|
|
GAppInfo *appinfo, |
68 |
|
|
const char *id); |
69 |
|
|
|
70 |
|
|
gboolean cc_shell_model_has_panel (CcShellModel *model, |
71 |
|
|
const char *id); |
72 |
|
|
|
73 |
|
|
gboolean cc_shell_model_iter_matches_search (CcShellModel *model, |
74 |
|
|
GtkTreeIter *iter, |
75 |
|
|
const char *term); |
76 |
|
|
|
77 |
|
|
void cc_shell_model_set_sort_terms (CcShellModel *model, |
78 |
|
|
GStrv terms); |
79 |
|
|
|
80 |
|
|
void cc_shell_model_set_panel_visibility (CcShellModel *self, |
81 |
|
|
const gchar *id, |
82 |
|
|
CcPanelVisibility visible); |
83 |
|
|
|
84 |
|
|
G_END_DECLS |
85 |
|
|
|