summaryrefslogtreecommitdiff
path: root/libgnomekbd/gkbd-indicator-plugin-manager.h
blob: f1371c3fc5792c2a6c3b00e67fc167ecde3defd5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
/*
 * Copyright (C) 2006 Sergey V. Udaltsov <svu@gnome.org>
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the
 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 * Boston, MA 02111-1307, USA.
 */

#ifndef __GSWITCHIT_PLUGIN_MANAGER_H__
#define __GSWITCHIT_PLUGIN_MANAGER_H__

#include <gmodule.h>
#include <libgnomekbd/gkbd-indicator-plugin.h>

typedef struct _GkbdIndicatorPluginManager GkbdIndicatorPluginManager;
struct _GkbdIndicatorPluginManager {
	GHashTable *all_plugin_recs;
	GSList *inited_plugin_recs;
};

typedef struct _GkbdIndicatorPluginManagerRecord GkbdIndicatorPluginManagerRecord;
struct _GkbdIndicatorPluginManagerRecord {
	const char *full_path;
	GModule *module;
	const GkbdIndicatorPlugin *plugin;
};

extern void
 gkbd_indicator_plugin_manager_init (GkbdIndicatorPluginManager * manager);

extern void
 gkbd_indicator_plugin_manager_term (GkbdIndicatorPluginManager * manager);

extern void
 gkbd_indicator_plugin_manager_init_enabled_plugins
    (GkbdIndicatorPluginManager * manager,
     GkbdIndicatorPluginContainer * pc, gchar ** enabled_plugins);

extern void
 gkbd_indicator_plugin_manager_term_initialized_plugins
    (GkbdIndicatorPluginManager * manager);

extern void
gkbd_indicator_plugin_manager_toggle_plugins (GkbdIndicatorPluginManager *
					      manager,
					      GkbdIndicatorPluginContainer
					      * pc,
					      gchar ** enabled_plugins);

extern const GkbdIndicatorPlugin *
gkbd_indicator_plugin_manager_get_plugin (GkbdIndicatorPluginManager *
					  manager, const char *full_path);

extern void
gkbd_indicator_plugin_manager_promote_plugin (GkbdIndicatorPluginManager *
					      manager,
					      gchar ** enabled_plugins,
					      const char *full_path);

extern void
gkbd_indicator_plugin_manager_demote_plugin (GkbdIndicatorPluginManager *
					     manager,
					     gchar ** enabled_plugins,
					     const char *full_path);

extern void
gkbd_indicator_plugin_manager_enable_plugin (GkbdIndicatorPluginManager *
					     manager,
					     gchar *** enabled_plugins,
					     const char *full_path);

extern void
gkbd_indicator_plugin_manager_disable_plugin (GkbdIndicatorPluginManager *
					      manager,
					      gchar *** enabled_plugins,
					      const char *full_path);

extern void
gkbd_indicator_plugin_manager_configure_plugin (GkbdIndicatorPluginManager
						* manager,
						GkbdIndicatorPluginContainer
						* pc,
						const char *full_path,
						GtkWindow * parent);

/* actual calling plugin notification methods */

extern void
gkbd_indicator_plugin_manager_group_changed (GkbdIndicatorPluginManager *
					     manager, GtkWidget * notebook,
					     int new_group);

extern void
gkbd_indicator_plugin_manager_config_changed (GkbdIndicatorPluginManager *
					      manager,
					      GkbdKeyboardConfig * from,
					      GkbdKeyboardConfig * to);

extern int
gkbd_indicator_plugin_manager_window_created (GkbdIndicatorPluginManager *
					      manager, Window win,
					      Window parent);

extern GtkWidget *
gkbd_indicator_plugin_manager_decorate_widget (GkbdIndicatorPluginManager *
					       manager, GtkWidget * widget,
					       const gint group, const char
					       *group_description,
					       GkbdKeyboardConfig *
					       config);

#endif