home-applet-handler.h

Go to the documentation of this file.
00001 /*
00002  * This file is part of maemo-af-desktop
00003  *
00004  * Copyright (C) 2006 Nokia Corporation.
00005  *
00006  * Contact: Karoliina Salminen <karoliina.t.salminen@nokia.com>
00007  *
00008  * This library is free software; you can redistribute it and/or
00009  * modify it under the terms of the GNU Lesser General Public License
00010  * as published by the Free Software Foundation; either version 2.1 of
00011  * the License, or (at your option) any later version.
00012  *
00013  * This library is distributed in the hope that it will be useful, but
00014  * WITHOUT ANY WARRANTY; without even the implied warranty of
00015  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
00016  * Lesser General Public License for more details.
00017  *
00018  * You should have received a copy of the GNU Lesser General Public
00019  * License along with this library; if not, write to the Free Software
00020  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
00021  * 02110-1301 USA
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 /* Type definitions for the applet API */
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 /* HOME_APPLET_HANDLER_H */

Generated on Fri Jun 9 16:23:05 2006 for maemo-af-desktop-documentation by  doxygen 1.4.6