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
|
#ifndef SCREEM_PLUGIN_H
#define SCREEM_PLUGIN_H
#include <gmodule.h>
#include <gtk/gtkmenuitem.h>
#include <gtk/gtkwidget.h>
#include "screem-application.h"
#include "screem-window.h"
#include "screem-view.h"
#ifndef SCREEM_PLUGIN
#define SCREEM_PLUGIN
typedef struct ScreemPlugin ScreemPlugin;
#endif
typedef void(*Popup)( ScreemWindow *window,
guint start, guint len, GSList *attrs );
typedef void(*AddUI)( GtkWidget *window, GtkWidget *editor,
GtkWidget *preview, GtkWidget *link_view );
/* the fields of this struct are to be filled out in
the plugin, apart from module */
struct ScreemPlugin {
const gchar *name; /* the plugin name */
const gchar *author; /* the plugin author */
const gchar *version; /* the plugin version */
GModule *module; /* the actual plugin */
const gchar *tag; /* the tag that the plugin deals with,
NULL if no specific tag is handled */
Popup popup; /* called from the popup editor menu,
only used if tag != NULL */
AddUI add_ui; /* called when a new ScreemWindow is opened */
AddUI remove_ui; /* called when a ScreemWindow is closed,
only window is passed at the moment,
other params will be NULL */
};
void scan_plugins( ScreemApplication *application, GtkWidget *splash_text );
GModule *screem_plugin_get_sitecopy( ScreemApplication *application );
GtkWidget *screem_plugin_tag_wizard( ScreemView *view,
const gchar *tag, const gchar *fulltag,
guint start, guint len );
#endif
|