hildon-home-plugin-loader.h

Go to the documentation of this file.
00001 /*
00002  * This file is part of maemo-af-desktop
00003  *
00004  * Copyright (C) 2005 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 HILDON_HOME_PLUGIN_LOADER_H
00033 #define HILDON_HOME_PLUGIN_LOADER_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 
00042 G_BEGIN_DECLS
00043 
00044 
00045 
00046 #define HILDON_TYPE_HOME_PLUGIN_LOADER \
00047     (hildon_home_plugin_loader_get_type())
00048 #define HILDON_HOME_PLUGIN_LOADER(obj) \
00049     (GTK_CHECK_CAST (obj, HILDON_TYPE_HOME_PLUGIN_LOADER, \
00050     HildonHomePluginLoader))
00051 #define HILDON_HOME_PLUGIN_LOADER_CLASS(klass) \
00052     (GTK_CHECK_CLASS_CAST ((klass),\
00053     HILDON_TYPE_HOME_PLUGIN_LOADER, HildonHomePluginLoaderClass))
00054 #define HILDON_IS_HOME_PLUGIN_LOADER(obj) (GTK_CHECK_TYPE (obj, \
00055     HILDON_TYPE_HOME_PLUGIN_LOADER))
00056 #define HILDON_IS_HOME_PLUGIN_LOADER_CLASS(klass) \
00057     (GTK_CHECK_CLASS_TYPE ((klass), HILDON_TYPE_HOME_PLUGIN_LOADER))
00058 
00059 /* Type definitions for the plugin API */
00060 typedef void *(*PluginInitializeFn)(void *state_data, 
00061                                      int *state_size,
00062                                      GtkWidget **widget);
00063 typedef int (*PluginGetReqWidthFn)(void *data);
00064 typedef int (*PluginSaveStateFn)(void *data, 
00065                                   void **state_data, 
00066                                   int *state_size);
00067 typedef void (*PluginBackgroundFn)(void *data);
00068 typedef void (*PluginForegroundFn)(void *data);
00069 typedef GtkWidget *(*PluginPropertiesFn)(void *data, GtkWindow *parent);
00070 typedef void (*PluginDeinitializeFn)(void *data);
00071 
00072 typedef struct _HildonHomePluginLoader HildonHomePluginLoader;
00073 typedef struct _HildonHomePluginLoaderClass HildonHomePluginLoaderClass;
00074 
00081 typedef struct _HildonHomePluginLoaderPrivate 
00082                   HildonHomePluginLoaderPrivate;
00083 
00084 struct _HildonHomePluginLoader {
00085     GtkObject parent;
00086 };
00087 
00088 struct _HildonHomePluginLoaderClass {
00089     GtkObjectClass parent_class;
00090 };
00091 
00092 
00099 GType hildon_home_plugin_loader_get_type(void);
00100 
00120 HildonHomePluginLoader *hildon_home_plugin_loader_new(
00121                                                 const char *plugin_name, 
00122                                                 void *state_data, 
00123                                                 int *state_size,
00124                                                 GtkWidget **applet);
00125 
00135 int hildon_home_plugin_get_applet_width(HildonHomePluginLoader *loader);
00136 
00152 int hildon_home_plugin_applet_save_state(HildonHomePluginLoader *loader, 
00153                                          void **state_data, 
00154                                          int *state_size);
00155 
00163 void hildon_home_plugin_applet_background(HildonHomePluginLoader *loader);
00164 
00172 void hildon_home_plugin_applet_foreground(HildonHomePluginLoader *loader);
00173 
00182 GtkWidget *hildon_home_plugin_applet_properties(
00183                                           HildonHomePluginLoader *loader,
00184                                           GtkWindow *parent);
00185 
00186 
00187 
00196 void hildon_home_plugin_deinitialize(HildonHomePluginLoader *loader);
00197 
00198 G_END_DECLS
00199 #endif /* HILDON_HOME_PLUGIN_LOADER_H */

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