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