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
|
#ifndef PLUGIN_H
#define PLUGIN_H
#include <gmodule.h>
#include <gtk/gtk.h>
#include <gdk/gdk.h>
#include <stdio.h>
#include "panel.h"
struct _plugin *stam;
typedef struct {
/* common */
char *fname;
int count;
GModule *gmodule;
int dynamic : 1;
int invisible : 1;
/* these fields are pointers to the data within loaded dll */
char *type;
char *name;
char *version;
char *description;
int (*constructor)(struct _plugin *this);
void (*destructor)(struct _plugin *this);
} plugin_class;
typedef struct _plugin{
plugin_class *class;
panel *panel;
FILE *fp;
GtkWidget *pwid;
int expand;
int padding;
int border;
gpointer priv;
} plugin;
/* if plugin is external it will load its dll */
plugin * plugin_load(char *type);
void plugin_put(plugin *this);
int plugin_start(plugin *this);
void plugin_stop(plugin *this);
#ifdef STATIC_PLUGINS
#define STATIC_SEPARATOR
#define STATIC_IMAGE
#define STATIC_LAUNCHBAR
#define STATIC_DCLOCK
#define STATIC_WINCMD
#define STATIC_TEST
#define STATIC_TASKBAR
#define STATIC_PAGER
#define STATIC_TRAY
#define STATIC_MENU
#define STATIC_SPACE
#define STATIC_ICONS
#define STATIC_DESKNO
#endif
#endif
|