Main Page | Directories | File List | File Members

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  * version 2.1 as published by the Free Software Foundation.
00011  *
00012  * This library is distributed in the hope that it will be useful, but
00013  * WITHOUT ANY WARRANTY; without even the implied warranty of
00014  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
00015  * Lesser General Public License for more details.
00016  *
00017  * You should have received a copy of the GNU Lesser General Public
00018  * License along with this library; if not, write to the Free Software
00019  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
00020  * 02110-1301 USA
00021  *
00022  */
00023 
00031 #ifndef HOME_APPLET_HANDLER_H
00032 #define HOME_APPLET_HANDLER_H
00033 
00034 #include <glib.h>
00035 #include <glib-object.h>
00036 #include <gtk/gtkmenu.h>
00037 #include <gtk/gtktoolbar.h>
00038 #include <gdk/gdkx.h> 
00039 #include <libosso.h>
00040 #include <gtk/gtk.h>
00041 
00042 G_BEGIN_DECLS
00043 
00044 
00045 
00046 #define HOME_TYPE_APPLET_HANDLER \
00047     (home_applet_handler_get_type())
00048 #define HOME_APPLET_HANDLER(obj) \
00049     (GTK_CHECK_CAST (obj, HOME_TYPE_APPLET_HANDLER, \
00050     HomeAppletHandler))
00051 #define HOME_APPLET_HANDLER_CLASS(klass) \
00052     (GTK_CHECK_CLASS_CAST ((klass),\
00053     HOME_TYPE_APPLET_HANDLER, HomeAppletHandlerClass))
00054 #define IS_HOME_APPLET_HANDLER(obj) (GTK_CHECK_TYPE (obj, \
00055     HOME_TYPE_APPLET_HANDLER))
00056 #define IS_HOME_APPLET_HANDLER_CLASS(klass) \
00057     (GTK_CHECK_CLASS_TYPE ((klass), HOME_TYPE_APPLET_HANDLER))
00058 
00059 /* Type definitions for the applet API */
00060 typedef void *(*AppletInitializeFn)(void *state_data, 
00061                                      int *state_size,
00062                                      GtkWidget **widget);
00063 typedef int (*AppletSaveStateFn)(void *data, 
00064                                   void **state_data, 
00065                                   int *state_size);
00066 typedef void (*AppletBackgroundFn)(void *data);
00067 typedef void (*AppletForegroundFn)(void *data);
00068 typedef GtkWidget *(*AppletSettingsFn)(void *data, GtkWindow *parent);
00069 typedef void (*AppletDeinitializeFn)(void *data);
00070 
00071 typedef struct _HomeAppletHandler HomeAppletHandler;
00072 typedef struct _HomeAppletHandlerClass HomeAppletHandlerClass;
00073 
00080 typedef struct _HomeAppletHandlerPrivate 
00081                   HomeAppletHandlerPrivate;
00082 
00083 struct _HomeAppletHandler {
00084     GObject parent;
00085     gchar *desktoppath;
00086     gchar *libraryfile;
00087     GtkEventBox *eventbox;
00088     gint x;
00089     gint y;
00090     gint width;
00091     gint height;
00092     gint minwidth;
00093     gint minheight;
00094     gint resizable_width;
00095     gint resizable_height;
00096 };
00097 
00098 struct _HomeAppletHandlerClass {
00099     GObjectClass parent_class;
00100 };
00101 
00102 
00109 GType home_applet_handler_get_type(void);
00110 
00129 HomeAppletHandler *home_applet_handler_new(const char *desktoppath, 
00130                                            void *state_data, 
00131                                            int *state_size);
00132 
00151 int home_applet_handler_save_state(HomeAppletHandler *handler, 
00152                                    void **state_data, 
00153                                    int *state_size);
00154 
00165 void home_applet_handler_background(HomeAppletHandler *handler);
00166 
00177 void home_applet_handler_foreground(HomeAppletHandler *handler);
00178 
00190 GtkWidget *home_applet_handler_settings(HomeAppletHandler *handler,
00191                                         GtkWindow *parent);
00192 
00193 
00204 void home_applet_handler_deinitialize(HomeAppletHandler *handler);
00205 
00216 const gchar *
00217 home_applet_handler_get_desktop_filepath(HomeAppletHandler *handler);
00218 
00229 const gchar *
00230 home_applet_handler_get_libraryfile(HomeAppletHandler *handler);
00231 
00244 void home_applet_handler_set_coordinates(HomeAppletHandler *handler, 
00245                                          gint x, gint y);
00246 
00259 void home_applet_handler_get_coordinates(HomeAppletHandler *handler, 
00260                                          gint *x, gint *y);
00261 
00269 void home_applet_handler_store_size(HomeAppletHandler *handler);
00270 
00282 void home_applet_handler_set_size(HomeAppletHandler *handler, 
00283                                   gint width, gint height);
00284 
00297 void home_applet_handler_get_size(HomeAppletHandler *handler, 
00298                                   gint *width, gint *height);
00299 
00313 void home_applet_handler_set_minimum_size(HomeAppletHandler *handler, 
00314                                           gint minwidth, gint minheight);
00315 
00329 void home_applet_handler_get_minimum_size(HomeAppletHandler *handler, 
00330                                           gint *minwidth, gint *minheight);
00331 
00349 void home_applet_handler_set_resizable(HomeAppletHandler *handler, 
00350                                        gboolean resizable_width, 
00351                                        gboolean resizable_height);
00352 
00370 void home_applet_handler_get_resizable(HomeAppletHandler *handler, 
00371                                        gboolean *resizable_width, 
00372                                        gboolean *resizable_height);
00373 
00384 GtkEventBox *home_applet_handler_get_eventbox(HomeAppletHandler *handler);
00385 
00386 GtkWidget *home_applet_handler_get_widget(HomeAppletHandler *handler);
00387 
00388 G_END_DECLS
00389 #endif /* HOME_APPLET_HANDLER_H */

Generated on Thu Dec 21 11:26:51 2006 for maemo-af-desktop-documentation by  doxygen 1.4.2