This file is indexed.

/usr/include/libanjuta-3.0/libanjuta/anjuta-plugin.h is in libanjuta-dev 2:3.4.0-1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  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
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
/*
 * Anjuta
 * Copyright (C) 2000 Dave Camp, Naba Kumar  <naba@gnome.org>
 *
 * 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., 51 Franklin Street, Fifth Floor,
 * Boston, MA 02110-1301, USA.  
 */

#ifndef ANJUTA_PLUGIN_H
#define ANJUTA_PLUGIN_H

#include <glib.h>
#include <glib-object.h>

#include <string.h>
#include <libanjuta/anjuta-shell.h>
#include <libanjuta/anjuta-ui.h>
#include <libanjuta/anjuta-preferences.h>
#include <libanjuta/anjuta-utils.h>

G_BEGIN_DECLS

/* Add this alias in case some plugin outside Anjuta tree still uses it */
typedef GTypeModule AnjutaGluePlugin;

typedef struct _AnjutaPlugin        AnjutaPlugin;
typedef struct _AnjutaPluginClass   AnjutaPluginClass;
typedef struct _AnjutaPluginPrivate AnjutaPluginPrivate;

/**
 * AnjutaPluginValueAdded:
 * @plugin: The #AnjutaPlugin based plugin
 * @name: name of value being added.
 * @value: value of value being added.
 * @user_data: User data set during anjuta_plugin_add_watch()
 *
 * The callback to pass to anjuta_plugin_add_watch(). When a @name value
 * is added to shell by another plugin, this callback will be called.
 */
typedef void (*AnjutaPluginValueAdded) (AnjutaPlugin *plugin, 
										const char *name,
										const GValue *value,
										gpointer user_data);

/**
 * AnjutaPluginValueRemoved:
 * @plugin: The #AnjutaPlugin based plugin
 * @name: name of value being added.
 * @user_data: User data set during anjuta_plugin_add_watch()
 *
 * The callback to pass to anjuta_plugin_add_watch(). When the @name value
 * is removed from the shell (by the plugin exporting this value), this
 * callback will be called.
 */
typedef void (*AnjutaPluginValueRemoved) (AnjutaPlugin *plugin, 
										  const char *name,
										  gpointer user_data);


#define ANJUTA_TYPE_PLUGIN         (anjuta_plugin_get_type ())
#define ANJUTA_PLUGIN(o)           (G_TYPE_CHECK_INSTANCE_CAST ((o), ANJUTA_TYPE_PLUGIN, AnjutaPlugin))
#define ANJUTA_PLUGIN_CLASS(k)     (G_TYPE_CHECK_CLASS_CAST((k), ANJUTA_TYPE_PLUGIN, AnjutaPluginClass))
#define ANJUTA_IS_PLUGIN(o)        (G_TYPE_CHECK_INSTANCE_TYPE ((o), ANJUTA_TYPE_PLUGIN))
#define ANJUTA_IS_PLUGIN_CLASS(k)  (G_TYPE_CHECK_CLASS_TYPE ((k), ANJUTA_TYPE_PLUGIN))
#define ANJUTA_PLUGIN_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), ANJUTA_TYPE_PLUGIN, AnjutaPluginClass))

struct _AnjutaPlugin {
	GObject parent;	

	/* The shell in which the plugin has been added */
	AnjutaShell *shell;
	
	/*< private >*/
	AnjutaPluginPrivate *priv;
};

struct _AnjutaPluginClass {
	GObjectClass parent_class;

	/* Signals  */
	void (*activated) (AnjutaPlugin *plugin);
	void (*deactivated) (AnjutaPlugin *plugin);

	/* Virtual functions */
	gboolean (*activate) (AnjutaPlugin *plugin);
	gboolean (*deactivate) (AnjutaPlugin *plugin);
};

GType anjuta_plugin_get_type   (void);

gboolean anjuta_plugin_activate (AnjutaPlugin *plugin);

gboolean anjuta_plugin_deactivate (AnjutaPlugin *plugin);

gboolean anjuta_plugin_is_active (AnjutaPlugin *plugin);

guint anjuta_plugin_add_watch (AnjutaPlugin *plugin, 
							   const gchar *name,
							   AnjutaPluginValueAdded added,
							   AnjutaPluginValueRemoved removed,
							   gpointer user_data);

void anjuta_plugin_remove_watch (AnjutaPlugin *plugin, guint id,
								 gboolean send_remove);

AnjutaShell *anjuta_plugin_get_shell (AnjutaPlugin* plugin);

/**
 * ANJUTA_PLUGIN_BEGIN:
 * @class_name: Name of the class. e.g. EditorPlugin
 * @prefix: prefix of member function names. e.g. editor_plugin
 * 
 * This is a convienient macro defined to make it easy to write plugin
 * classes . This macro begins the class type definition. member function
 * @prefix _class_init and @prefix _instance_init should be statically defined
 * before using this macro.
 *
 * The class type definition is finished with ANJUTA_PLUGIN_END() macro. In
 * between which any number of interface definitions could be added with
 * ANJUTA_PLUGIN_ADD_INTERFACE() macro.
 */
#define ANJUTA_PLUGIN_BEGIN(class_name, prefix)                          \
extern GType                                                             \
prefix##_get_type (GTypeModule *module)                                  \
{                                                                        \
	static GType type = 0;                                               \
	if (G_UNLIKELY (!type)) {                                            \
		static const GTypeInfo type_info = {                             \
			sizeof (class_name##Class),                                  \
			NULL,                                                        \
			NULL,                                                        \
			(GClassInitFunc)prefix##_class_init,                         \
			NULL,                                                        \
			NULL,                                                        \
			sizeof (class_name),                                         \
			0,                                                           \
			(GInstanceInitFunc)prefix##_instance_init                    \
		};                                                               \
		g_return_val_if_fail (module != NULL, 0);                        \
		type = g_type_module_register_type (module,                                      \
						    ANJUTA_TYPE_PLUGIN,                          \
						    #class_name,                                 \
						    &type_info, 0);
/**
 * ANJUTA_PLUGIN_END:
 * 
 * Ends the plugin class type definition started with ANJUTA_PLUGIN_BEGIN()
 */
#define ANJUTA_PLUGIN_END                                               \
	}                                                                   \
	return type;                                                        \
}

/**
 * ANJUTA_PLUGIN_ADD_INTERFACE:
 * @interface_type: Interface type. e.g. IANJUTA_TYPE_EDITOR
 * @prefix: prefix of member function names.
 * 
 * This is a convienient macro defined to make it easy to add interfaces
 * to a plugin type. @prefix _iface_init should be statically defined
 * before using this macro. This macro should be called between
 * ANJUTA_PLUGIN_BEGIN() and ANJUTA_PLUGIN_END() macros.
 */
#define ANJUTA_PLUGIN_ADD_INTERFACE(prefix,interface_type)             \
    {                                                                  \
        GInterfaceInfo iface_info = {                                  \
            (GInterfaceInitFunc)prefix##_iface_init,                   \
            NULL,                                                      \
            NULL                                                       \
        };                                                             \
        g_type_module_add_interface (module,                           \
                                     type, interface_type,             \
                             	     &iface_info);                     \
    }

/**
 * ANJUTA_PLUGIN_BOILERPLATE:
 * @class_name: Name of the class. e.g EditorPlugin
 * @prefix: prefix of member function names. e.g. editor_plugin
 * 
 * This macro is similar to using ANJUTA_PLUGIN_BEGIN() and then immediately
 * using ANJUTA_PLUGIN_END(). It is basically a plugin type definition macro
 * that does not have any interface implementation.
 */
#define ANJUTA_PLUGIN_BOILERPLATE(class_name, prefix)                   \
ANJUTA_PLUGIN_BEGIN(class_name, prefix);                                \
ANJUTA_PLUGIN_END

/**
 * ANJUTA_SIMPLE_PLUGIN:
 * @class_name: Name of the class. e.g. EditorPlugin
 * @prefix: prefix of member function names. e.g. editor_plugin
 * 
 * Sets up necessary codes for the plugin factory to know the class type of
 * of the plugin. This macro is generally used at the end of plugin class
 * and member functions definitions. 
 */
#define ANJUTA_SIMPLE_PLUGIN(class_name, prefix)                      \
G_MODULE_EXPORT void anjuta_glue_register_components (GTypeModule *module);                   \
G_MODULE_EXPORT void                                                  \
anjuta_glue_register_components (GTypeModule *module)                 \
{                                                                     \
	prefix##_get_type (module);                                   \
}                                                                     \

G_END_DECLS

#endif