Initial import.
[lxde/lxpanel.git] / src / plugin.h
1
2 #ifndef PLUGIN_H
3 #define PLUGIN_H
4 #include <gmodule.h>
5
6 #define STATIC_PLUGINS /* Force the use of static plugins */
7
8 #include <gtk/gtk.h>
9 #include <gdk/gdk.h>
10 #include <stdio.h>
11 #include "panel.h"
12
13 struct _plugin *stam;
14
15 typedef struct {
16 /* common */
17 char *fname;
18 int count;
19 GModule *gmodule;
20
21 int dynamic : 1;
22 int invisible : 1;
23 /* these fields are pointers to the data within loaded dll */
24 char *type;
25 char *name;
26 char *version;
27 char *description;
28
29 int (*constructor)(struct _plugin *this);
30 void (*destructor)(struct _plugin *this);
31
32 } plugin_class;
33
34 typedef struct _plugin{
35 plugin_class *class;
36 panel *panel;
37 FILE *fp;
38 GtkWidget *pwid;
39 int expand;
40 int padding;
41 int border;
42 gpointer priv;
43 } plugin;
44
45 /* if plugin is external it will load its dll */
46 plugin * plugin_load(char *type);
47 void plugin_put(plugin *this);
48 int plugin_start(plugin *this);
49 void plugin_stop(plugin *this);
50
51 #ifdef STATIC_PLUGINS
52 #define STATIC_SEPARATOR
53 #define STATIC_IMAGE
54 #define STATIC_LAUNCHBAR
55 #define STATIC_DCLOCK
56 #define STATIC_WINCMD
57 #define STATIC_TEST
58 #define STATIC_TASKBAR
59 #define STATIC_PAGER
60 #define STATIC_TRAY
61 #define STATIC_MENU
62 #define STATIC_SPACE
63 #define STATIC_ICONS
64 #define STATIC_DESKNO
65 #endif
66
67
68 #endif