This file is indexed.

/usr/include/grits/grits-plugin.h is in libgrits-dev 0.8.1-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
/*
 * Copyright (C) 2009-2010 Andy Spencer <andy753421@gmail.com>
 *
 * 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 3 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, see <http://www.gnu.org/licenses/>.
 */

#ifndef __GRITS_PLUGIN_H__
#define __GRITS_PLUGIN_H__

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

/********************
 * Plugin interface *
 ********************/
#define GRITS_TYPE_PLUGIN                (grits_plugin_get_type())
#define GRITS_PLUGIN(obj)                (G_TYPE_CHECK_INSTANCE_CAST   ((obj),  GRITS_TYPE_PLUGIN, GritsPlugin))
#define GRITS_IS_PLUGIN(obj)             (G_TYPE_CHECK_INSTANCE_TYPE   ((obj),  GRITS_TYPE_PLUGIN))
#define GRITS_PLUGIN_GET_INTERFACE(inst) (G_TYPE_INSTANCE_GET_INTERFACE((inst), GRITS_TYPE_PLUGIN, GritsPluginInterface))

typedef struct _GritsPlugin          GritsPlugin;
typedef struct _GritsPluginInterface GritsPluginInterface;

struct _GritsPluginInterface
{
	GTypeInterface parent_iface;

	/* Virtual data */
	const gchar *name;
	const gchar *description;

	/* Virtual functions */
	GtkWidget *(*get_config)(GritsPlugin *plugin);
};

GType grits_plugin_get_type();

/* Methods */
const gchar *grits_plugin_get_name(GritsPlugin *plugin);

const gchar *grits_plugin_get_description(GritsPlugin *plugin);

GtkWidget *grits_plugin_get_config(GritsPlugin *plugin);

/***************
 * Plugins API *
 ***************/
typedef struct _GritsPlugins GritsPlugins;

#include "grits-viewer.h"
#include "grits-prefs.h"

/**
 * GritsPluginConstructor:
 * @viewer: the viewer the plugin is associated with
 * @prefs:  preferences the plugin can use for storing informtion
 *
 * Create a new instance of a plugin. Each plugin should supply a constructor named
 * grits_plugin_NAME_new in it's shared object.
 *
 * Returns: the new plugin
 */
typedef GritsPlugin *(*GritsPluginConstructor)(GritsViewer *viewer, GritsPrefs *prefs);

struct _GritsPlugins {
	gchar      *dir;
	GList      *plugins;
	GritsPrefs *prefs;
};

GritsPlugins *grits_plugins_new(const gchar *dir, GritsPrefs *prefs);

void grits_plugins_free();

GList *grits_plugins_available(GritsPlugins *plugins);

GritsPlugin *grits_plugins_load(GritsPlugins *plugins, const char *name,
		GritsViewer *viewer, GritsPrefs *prefs);

GritsPlugin *grits_plugins_enable(GritsPlugins *plugins, const char *name,
		GritsViewer *viewer, GritsPrefs *prefs);

GList *grits_plugins_load_enabled(GritsPlugins *plugins,
		GritsViewer *viewer, GritsPrefs *prefs);

gboolean grits_plugins_disable(GritsPlugins *plugins, const char *name);

gboolean grits_plugins_unload(GritsPlugins *plugins, const char *name);

void grits_plugins_foreach(GritsPlugins *plugins, GCallback callback, gpointer user_data);

#endif