applet-manager.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 
00029 #ifndef APPLET_MANAGER_H
00030 #define APPLET_MANAGER_H
00031 
00032 #include <X11/Xlib.h>
00033 #include <glib.h>
00034 #include <gtk/gtk.h>
00035 /* hildon includes */
00036 #include "home-applet-handler.h"
00037 
00038 typedef struct applet_manager applet_manager_t;
00039 
00040 G_BEGIN_DECLS
00041 
00042 struct applet_manager {
00043     GList *applet_list; /* (HomeAppletHandler * )*/
00044 };
00045 
00046 /* FIXME subject to change */
00047 #define APPLET_MANAGER_CONFIGURE_FILE "applet_manager.conf" /* placeholder*/
00048 #define APPLET_MANAGER_FACTORY_PATH   "/etc/hildon-home"
00049 #define APPLET_MANAGER_USER_PATH      ".osso/hildon-home"
00050 #define APPLET_MANAGER_ENV_HOME       "HOME"
00051 
00059 applet_manager_t *applet_manager_singleton_get_instance( void );
00060 
00077 void applet_manager_initialize(applet_manager_t *man,
00078                                gchar *librarypath,
00079                                gchar *desktoppath,
00080                                gint applet_x, gint applet_y);
00081                                                          
00091 void applet_manager_initialize_new(applet_manager_t *man,
00092                                    gchar *desktoppath);
00093 
00094 
00105 void applet_manager_deinitialize_handler(applet_manager_t *man,
00106                                          HomeAppletHandler *handler);
00107 
00118 void applet_manager_deinitialize(applet_manager_t *man,
00119                                  gchar *identifier);
00120 
00129 void applet_manager_deinitialize_all(applet_manager_t *man);
00130 
00139 void applet_manager_configure_save_all(applet_manager_t *man);
00140 
00150 void applet_manager_configure_load_all(applet_manager_t *man);
00151 
00162 void applet_manager_foreground_handler(applet_manager_t *man, 
00163                                        HomeAppletHandler *handler);
00164 
00175 void applet_manager_foreground(applet_manager_t *man, 
00176                                gchar *identifier);
00177 
00178 
00187 void applet_manager_foreground_all(applet_manager_t *man);
00188 
00197 void applet_manager_foreground_configure_all(applet_manager_t *man);
00198 
00199 
00210 void applet_manager_state_save_handler(applet_manager_t *man, 
00211                                        HomeAppletHandler *handler, 
00212                                        void *state_data, 
00213                                        int *state_size);
00214 
00225 void applet_manager_state_save(applet_manager_t *man, 
00226                               gchar *identifier,
00227                               void *state_data, 
00228                               int *state_size);
00229 
00238 void applet_manager_state_save_all(applet_manager_t *man);
00239 
00250 void applet_manager_background_handler(applet_manager_t *man, 
00251                                        HomeAppletHandler *handler);
00252 
00263 void applet_manager_background(applet_manager_t *man, 
00264                                gchar *identifier);
00265 
00274 void applet_manager_background_all(applet_manager_t *man);
00275 
00284 void applet_manager_background_state_save_all(applet_manager_t *man);
00285 
00298 HomeAppletHandler *applet_manager_get_handler(applet_manager_t *man,
00299                                               gchar *identifier);
00300 
00311 GList *applet_manager_get_handler_all(applet_manager_t *man);
00312 
00313 
00325 GtkEventBox *applet_manager_get_eventbox_handler(applet_manager_t *man, 
00326                                                  HomeAppletHandler *handler);
00327 
00339 GtkEventBox *applet_manager_get_eventbox(applet_manager_t *man, 
00340                                          gchar *identifier);
00341 
00355 GtkWidget *applet_manager_get_settings_handler(applet_manager_t *man, 
00356                                                HomeAppletHandler *handler,
00357                                                GtkWindow *parent);
00358 
00372 GtkWidget *applet_manager_get_settings(applet_manager_t *man, 
00373                                        gchar *identifier,
00374                                        GtkWindow *parent);
00375 
00387 gchar *applet_manager_get_identifier_handler(applet_manager_t *man, 
00388                                              HomeAppletHandler *handler);
00389 
00399 GList *applet_manager_get_identifier_all(applet_manager_t *man);
00400 
00415 void applet_manager_set_coordinates_handler(applet_manager_t *man, 
00416                                             HomeAppletHandler *handler,
00417                                             gint x, gint y);
00418 
00433 void applet_manager_set_coordinates(applet_manager_t *man, 
00434                                     gchar *identifier,
00435                                     gint x, gint y);
00436 
00451 void applet_manager_get_coordinates_handler(applet_manager_t *man, 
00452                                             HomeAppletHandler *handler,
00453                                             gint *x, gint *y);
00454 
00469 void applet_manager_get_coordinates(applet_manager_t *man, 
00470                                     gchar *identifier,
00471                                     gint *x, gint *y);
00472 
00484 gboolean applet_manager_identifier_exists(applet_manager_t *man, 
00485                                           gchar *identifier);
00486 
00487 G_END_DECLS
00488 
00489 #endif /* APPLET_MANAGER_H */

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