File: gswitchit_plugin_manager.h

package info (click to toggle)
control-center 1%3A2.8.2-3
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 19,208 kB
  • ctags: 3,408
  • sloc: ansic: 37,294; sh: 10,539; makefile: 844; xml: 18
file content (100 lines) | stat: -rw-r--r-- 3,205 bytes parent folder | download | duplicates (2)
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
/*
 *  This program is free software; you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation; either version 2 of the License, or
 *  (at your option) any later version.
 *
 *  This program 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 Library General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with this program; 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 <libgswitchit/gswitchit_plugin.h>

typedef struct _GSwitchItPluginManager {
	GHashTable *allPluginRecs;
	GSList *initedPluginRecs;
} GSwitchItPluginManager;

typedef struct _GSwitchItPluginManagerRecord {
	const char *fullPath;
	GModule *module;
	const GSwitchItPlugin *plugin;
} GSwitchItPluginManagerRecord;

extern void GSwitchItPluginManagerInit (GSwitchItPluginManager * manager);

extern void GSwitchItPluginManagerTerm (GSwitchItPluginManager * manager);

extern void
GSwitchItPluginManagerInitEnabledPlugins (GSwitchItPluginManager * manager,
					  GSwitchItPluginContainer * pc,
					  GSList * enabledPlugins);

extern void
 GSwitchItPluginManagerTermInitializedPlugins (GSwitchItPluginManager *
					       manager);

extern void GSwitchItPluginManagerTogglePlugins (GSwitchItPluginManager *
						 manager,
						 GSwitchItPluginContainer *
						 pc,
						 GSList * enabledPlugins);

extern const GSwitchItPlugin
    * GSwitchItPluginManagerGetPlugin (GSwitchItPluginManager * manager,
				       const char *fullPath);

extern void GSwitchItPluginManagerPromotePlugin (GSwitchItPluginManager *
						 manager,
						 GSList * enabledPlugins,
						 const char *fullPath);

extern void GSwitchItPluginManagerDemotePlugin (GSwitchItPluginManager *
						manager,
						GSList * enabledPlugins,
						const char *fullPath);

extern void GSwitchItPluginManagerEnablePlugin (GSwitchItPluginManager *
						manager,
						GSList ** pEnabledPlugins,
						const char *fullPath);

extern void GSwitchItPluginManagerDisablePlugin (GSwitchItPluginManager *
						 manager,
						 GSList ** pEnabledPlugins,
						 const char *fullPath);

extern void GSwitchItPluginManagerConfigurePlugin (GSwitchItPluginManager *
						   manager,
						   GSwitchItPluginContainer
						   * pc,
						   const char *fullPath,
						   GtkWindow * parent);

// actual calling plugin notification methods

extern void GSwitchItPluginManagerGroupChanged (GSwitchItPluginManager *
						manager, int newGroup);

extern int GSwitchItPluginManagerWindowCreated (GSwitchItPluginManager *
						manager,
						Window win, Window parent);

extern GtkWidget
    *GSwitchItPluginManagerDecorateWidget (GSwitchItPluginManager *
					   manager, GtkWidget * widget,
					   const gint group, const char
					   *groupDescription,
					   GSwitchItXkbConfig * config);

#endif