summaryrefslogtreecommitdiff
path: root/gedit/gedit-plugins-engine.h
blob: f2ebff6325d72ae9aa7061c7e677fb11a47ae2b0 (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
/*
 * gedit-plugins-engine.h
 * This file is part of gedit
 *
 * Copyright (C) 2002-2005 - Paolo Maggi 
 *
 * 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 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. 
 */
 
/*
 * Modified by the gedit Team, 2002-2005. See the AUTHORS file for a 
 * list of people on the gedit Team.  
 * See the ChangeLog files for a list of changes. 
 *
 * $Id$
 */

#ifndef __GEDIT_PLUGINS_ENGINE_H__
#define __GEDIT_PLUGINS_ENGINE_H__

#include <glib.h>
#include "gedit-window.h"
#include "gedit-plugin-info.h"
#include "gedit-plugin.h"

G_BEGIN_DECLS

#define GEDIT_TYPE_PLUGINS_ENGINE              (gedit_plugins_engine_get_type ())
#define GEDIT_PLUGINS_ENGINE(obj)              (G_TYPE_CHECK_INSTANCE_CAST((obj), GEDIT_TYPE_PLUGINS_ENGINE, GeditPluginsEngine))
#define GEDIT_PLUGINS_ENGINE_CLASS(klass)      (G_TYPE_CHECK_CLASS_CAST((klass), GEDIT_TYPE_PLUGINS_ENGINE, GeditPluginsEngineClass))
#define GEDIT_IS_PLUGINS_ENGINE(obj)           (G_TYPE_CHECK_INSTANCE_TYPE((obj), GEDIT_TYPE_PLUGINS_ENGINE))
#define GEDIT_IS_PLUGINS_ENGINE_CLASS(klass)   (G_TYPE_CHECK_CLASS_TYPE ((klass), GEDIT_TYPE_PLUGINS_ENGINE))
#define GEDIT_PLUGINS_ENGINE_GET_CLASS(obj)    (G_TYPE_INSTANCE_GET_CLASS((obj), GEDIT_TYPE_PLUGINS_ENGINE, GeditPluginsEngineClass))

typedef struct _GeditPluginsEngine		GeditPluginsEngine;
typedef struct _GeditPluginsEnginePrivate	GeditPluginsEnginePrivate;

struct _GeditPluginsEngine
{
	GObject parent;
	GeditPluginsEnginePrivate *priv;
};

typedef struct _GeditPluginsEngineClass		GeditPluginsEngineClass;

struct _GeditPluginsEngineClass
{
	GObjectClass parent_class;

	void	 (* activate_plugin)		(GeditPluginsEngine *engine,
						 GeditPluginInfo    *info);

	void	 (* deactivate_plugin)		(GeditPluginsEngine *engine,
						 GeditPluginInfo    *info);
};

GType			 gedit_plugins_engine_get_type		(void) G_GNUC_CONST;

GeditPluginsEngine	*gedit_plugins_engine_get_default	(void);

void		 gedit_plugins_engine_garbage_collect	(GeditPluginsEngine *engine);

const GList	*gedit_plugins_engine_get_plugin_list 	(GeditPluginsEngine *engine);

GeditPluginInfo	*gedit_plugins_engine_get_plugin_info	(GeditPluginsEngine *engine,
							 const gchar        *name);

/* plugin load and unloading (overall, for all windows) */
gboolean 	 gedit_plugins_engine_activate_plugin 	(GeditPluginsEngine *engine,
							 GeditPluginInfo    *info);
gboolean 	 gedit_plugins_engine_deactivate_plugin	(GeditPluginsEngine *engine,
							 GeditPluginInfo    *info);

void	 	 gedit_plugins_engine_configure_plugin	(GeditPluginsEngine *engine,
							 GeditPluginInfo    *info,
							 GtkWindow          *parent);

/* plugin activation/deactivation per window, private to GeditWindow */
void 		 gedit_plugins_engine_activate_plugins   (GeditPluginsEngine *engine,
							  GeditWindow        *window);
void 		 gedit_plugins_engine_deactivate_plugins (GeditPluginsEngine *engine,
							  GeditWindow        *window);
void		 gedit_plugins_engine_update_plugins_ui  (GeditPluginsEngine *engine,
							  GeditWindow        *window);

/* private for mateconf notification */
void		 gedit_plugins_engine_active_plugins_changed
							(GeditPluginsEngine *engine);

void		 gedit_plugins_engine_rescan_plugins	(GeditPluginsEngine *engine);

G_END_DECLS

#endif  /* __GEDIT_PLUGINS_ENGINE_H__ */