00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00032 #ifndef HOME_APPLET_HANDLER_H
00033 #define HOME_APPLET_HANDLER_H
00034
00035 #include <glib.h>
00036 #include <glib-object.h>
00037 #include <gtk/gtkmenu.h>
00038 #include <gtk/gtktoolbar.h>
00039 #include <gdk/gdkx.h>
00040 #include <libosso.h>
00041 #include <gtk/gtk.h>
00042
00043 G_BEGIN_DECLS
00044
00045
00046
00047 #define HOME_TYPE_APPLET_HANDLER \
00048 (home_applet_handler_get_type())
00049 #define HOME_APPLET_HANDLER(obj) \
00050 (GTK_CHECK_CAST (obj, HOME_TYPE_APPLET_HANDLER, \
00051 HomeAppletHandler))
00052 #define HOME_APPLET_HANDLER_CLASS(klass) \
00053 (GTK_CHECK_CLASS_CAST ((klass),\
00054 HOME_TYPE_APPLET_HANDLER, HomeAppletHandlerClass))
00055 #define IS_HOME_APPLET_HANDLER(obj) (GTK_CHECK_TYPE (obj, \
00056 HOME_TYPE_APPLET_HANDLER))
00057 #define IS_HOME_APPLET_HANDLER_CLASS(klass) \
00058 (GTK_CHECK_CLASS_TYPE ((klass), HOME_TYPE_APPLET_HANDLER))
00059
00060
00061 typedef void *(*AppletInitializeFn)(void *state_data,
00062 int *state_size,
00063 GtkWidget **widget);
00064 typedef int (*AppletSaveStateFn)(void *data,
00065 void **state_data,
00066 int *state_size);
00067 typedef void (*AppletBackgroundFn)(void *data);
00068 typedef void (*AppletForegroundFn)(void *data);
00069 typedef GtkWidget *(*AppletSettingsFn)(void *data, GtkWindow *parent);
00070 typedef void (*AppletDeinitializeFn)(void *data);
00071
00072 typedef struct _HomeAppletHandler HomeAppletHandler;
00073 typedef struct _HomeAppletHandlerClass HomeAppletHandlerClass;
00074
00081 typedef struct _HomeAppletHandlerPrivate
00082 HomeAppletHandlerPrivate;
00083
00084 struct _HomeAppletHandler {
00085 GObject parent;
00086 gchar *desktoppath;
00087 gchar *libraryfile;
00088 GtkEventBox *eventbox;
00089 gint x;
00090 gint y;
00091 };
00092
00093 struct _HomeAppletHandlerClass {
00094 GObjectClass parent_class;
00095 };
00096
00097
00104 GType home_applet_handler_get_type(void);
00105
00126 HomeAppletHandler *home_applet_handler_new(const char *desktoppath,
00127 const char *libraryfile,
00128 void *state_data,
00129 int *state_size);
00130
00149 int home_applet_handler_save_state(HomeAppletHandler *handler,
00150 void **state_data,
00151 int *state_size);
00152
00163 void home_applet_handler_background(HomeAppletHandler *handler);
00164
00175 void home_applet_handler_foreground(HomeAppletHandler *handler);
00176
00188 GtkWidget *home_applet_handler_settings(HomeAppletHandler *handler,
00189 GtkWindow *parent);
00190
00191
00202 void home_applet_handler_deinitialize(HomeAppletHandler *handler);
00203
00214 gchar *home_applet_handler_get_desktop_filepath(HomeAppletHandler *handler);
00215
00226 gchar *home_applet_handler_get_libraryfile(HomeAppletHandler *handler);
00227
00240 void home_applet_handler_set_coordinates(HomeAppletHandler *handler,
00241 gint x, gint y);
00242
00255 void home_applet_handler_get_coordinates(HomeAppletHandler *handler,
00256 gint *x, gint *y);
00257
00268 GtkEventBox *home_applet_handler_get_eventbox(HomeAppletHandler *handler);
00269
00270 G_END_DECLS
00271 #endif