Main Page | Directories | File List | File Members

hildon-home-applet.h

Go to the documentation of this file.
00001 
00002 /*
00003  * This file is part of maemo-af-desktop
00004  *
00005  * Copyright (C) 2005 Nokia Corporation.
00006  *
00007  * Contact: Karoliina Salminen <karoliina.t.salminen@nokia.com>
00008  *
00009  * This library is free software; you can redistribute it and/or
00010  * modify it under the terms of the GNU Lesser General Public License
00011  * version 2.1 as published by the Free Software Foundation.
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_APPLET_H
00033 #define HILDON_HOME_APPLET_H
00034 
00035 #include <glib.h>
00036 #include <glib-object.h>
00037 #include <gtk/gtkeventbox.h>
00038 #include <gdk/gdkx.h>
00039 
00040 G_BEGIN_DECLS
00041 
00042 #define HILDON_TYPE_HOME_APPLET (hildon_home_applet_get_type ())
00043 #define HILDON_HOME_APPLET(obj) (GTK_CHECK_CAST (obj, HILDON_TYPE_HOME_APPLET, HildonHomeApplet))
00044 #define HILDON_HOME_APPLET_CLASS(klass) \
00045         (GTK_CHECK_CLASS_CAST ((klass),\
00046                                HILDON_TYPE_HOME_APPLET, HildonHomeAppletClass))
00047 #define HILDON_IS_HOME_APPLET(obj) (GTK_CHECK_TYPE (obj, HILDON_TYPE_HOME_APPLET))
00048 #define HILDON_IS_HOME_APPLET_CLASS(klass) \
00049 (GTK_CHECK_CLASS_TYPE ((klass), HILDON_TYPE_HOME_APPLET))
00050 
00051 #define HILDON_HOME_APPLET_RESIZE_TYPE_TYPE \
00052     (hildon_home_applet_resize_type_get_type())
00053 
00054 
00055  
00056 /* FIXME: This will go in a style property, and use an alignment */
00057 #define LAYOUT_AREA_LEFT_BORDER_PADDING 10
00058 #define LAYOUT_AREA_BOTTOM_BORDER_PADDING 10
00059 #define LAYOUT_AREA_RIGHT_BORDER_PADDING 10
00060 #define LAYOUT_AREA_TOP_BORDER_PADDING 12
00061 #define APPLET_ADD_X_STEP 20
00062 #define APPLET_ADD_Y_STEP 20
00063 
00064 typedef enum
00065 {
00066   HILDON_HOME_APPLET_RESIZE_NONE,
00067   HILDON_HOME_APPLET_RESIZE_VERTICAL,
00068   HILDON_HOME_APPLET_RESIZE_HORIZONTAL,
00069   HILDON_HOME_APPLET_RESIZE_BOTH
00070 } HildonHomeAppletResizeType;
00071 
00072 typedef struct _HildonHomeApplet HildonHomeApplet;
00073 typedef struct _HildonHomeAppletClass HildonHomeAppletClass;
00074 
00075 struct _HildonHomeApplet {
00076   GtkEventBox parent;
00077 };
00078 
00079 struct _HildonHomeAppletClass {
00080   GtkEventBoxClass parent_class;
00081 
00082   void (* layout_mode_start)    (HildonHomeApplet *applet);
00083   void (* layout_mode_end)      (HildonHomeApplet *applet);
00084   void (* desktop_file_changed) (HildonHomeApplet *applet);
00085 
00086   GdkPixbuf                     *close_button;
00087   GdkPixbuf                     *resize_handle;
00088 
00089 };
00090 
00091 GType hildon_home_applet_resize_type_get_type (void);
00092 
00093 GType hildon_home_applet_get_type (void);
00094 
00102 GtkWidget *hildon_home_applet_new (void);
00103 GtkWidget *hildon_home_applet_new_with_plugin (const gchar *desktop_file);
00104 
00105 void        hildon_home_applet_set_layout_mode (HildonHomeApplet *applet,
00106                                                 gboolean          layout_mode);
00107 
00108 gboolean    hildon_home_applet_get_layout_mode (HildonHomeApplet *applet);
00109 
00110 void        hildon_home_applet_set_resize_type (HildonHomeApplet *applet,
00111                                                 HildonHomeAppletResizeType rt);
00112 
00113 HildonHomeAppletResizeType
00114 hildon_home_applet_get_resize_type (HildonHomeApplet *applet);
00115 
00116 void        hildon_home_applet_set_desktop_file (HildonHomeApplet *applet,
00117                                                  const gchar *desktop_file);
00118 
00119 const gchar *
00120 hildon_home_applet_get_desktop_file             (HildonHomeApplet *applet);
00121 
00122 GtkWidget *
00123 hildon_home_applet_get_settings_menu_item       (HildonHomeApplet *applet);
00124 
00125 void        hildon_home_applet_save_position    (HildonHomeApplet *applet,
00126                                                  GKeyFile         *keyfile);
00127 
00128 gint        hildon_home_applet_find_by_name     (HildonHomeApplet *applet,
00129                                                  const gchar *name);
00130 
00131 gboolean    hildon_home_applet_get_overlaps     (HildonHomeApplet *applet);
00132 
00133 void        hildon_home_applet_set_is_background(HildonHomeApplet *applet,
00134                                                  gboolean is_background);
00135         
00136 
00137 G_END_DECLS
00138 #endif /* HILDON_HOME_APPLET_H */

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