Main Page | Directories | File List | File Members

hildon-navigator-item.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  * Author:  Moises Martinez <moises.martinez@nokia.com>
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 
00031 #ifndef HILDON_NAVIGATOR_ITEM_H
00032 #define HILDON_NAVIGATOR_ITEM_H
00033 
00034 #include <gtk/gtkbin.h>
00035 
00036 #define HN_PLUGIN_DIR "/usr/lib/hildon-navigator/"
00037 
00038 #define HN_LOG_KEY_CREATE  "Create"
00039 #define HN_LOG_KEY_INIT    "Init"
00040 #define HN_LOG_KEY_BUTTON  "Button"
00041 #define HN_LOG_KEY_DESTROY "Destroy"
00042 #define HN_LOG_KEY_END     "End"
00043 
00044 #define BUTTON_HEIGHT 90
00045 #define BUTTON_WIDTH  80
00046 
00047 G_BEGIN_DECLS
00048 
00049 #define HILDON_TYPE_NAVIGATOR_ITEM ( hildon_navigator_item_get_type() )
00050 #define HILDON_NAVIGATOR_ITEM(obj) (GTK_CHECK_CAST (obj, \
00051             HILDON_TYPE_NAVIGATOR_ITEM, \
00052             HildonNavigatorItem))
00053 #define HILDON_NAVIGATOR_ITEM_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), \
00054             HILDON_TYPE_NAVIGATOR_ITEM, HildonNavigatorItemClass))
00055 #define HILDON_IS_NAVIGATOR_ITEM(obj) (GTK_CHECK_TYPE (obj, \
00056             HILDON_TYPE_NAVIGATOR_ITEM))
00057 #define HILDON_IS_NAVIGATOR_ITEM_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), \
00058             HILDON_TYPE_NAVIGATOR_ITEM))
00059 #define HILDON_NAVIGATOR_ITEM_GET_CLASS(inst)  (G_TYPE_INSTANCE_GET_CLASS ((inst), \
00060         HILDON_TYPE_NAVIGATOR_ITEM, HildonNavigatorItemClass))
00061 #define HILDON_NAVIGATOR_ITEM_GET_PRIVATE(obj) \
00062         (G_TYPE_INSTANCE_GET_PRIVATE ((obj), \
00063         HILDON_TYPE_NAVIGATOR_ITEM, HildonNavigatorItemPrivate));
00064 
00065 
00066 typedef struct _HildonNavigatorItem HildonNavigatorItem; 
00067 typedef struct _HildonNavigatorItemClass HildonNavigatorItemClass;
00068 typedef struct _HildonNavigatorItemAPI HildonNavigatorItemAPI;
00069 
00070 /* Type definitions for the plugin API */
00071 typedef void *(*PluginCreateFn)(void);
00072 typedef void (*PluginDestroyFn)(void *data);
00073 typedef GtkWidget *(*PluginGetButtonFn)(void *data);
00074 typedef void (*PluginInitializeMenuFn)(void *data);
00075 
00076 struct _HildonNavigatorItem
00077 {
00078     GtkBin parent;
00079 };
00080 
00081 struct _HildonNavigatorItemClass
00082 {
00083     GtkBinClass parent_class;
00084 
00085     GtkWidget *(*get_widget) (HildonNavigatorItem *item);
00086 
00087 };
00088 
00089 struct _HildonNavigatorItemAPI
00090 {
00091     PluginCreateFn      create;
00092     PluginDestroyFn     destroy;
00093     PluginGetButtonFn       get_button;
00094     PluginInitializeMenuFn  initialize;
00095 };
00096 
00097 GType hildon_navigator_item_get_type (void);
00098 
00099 HildonNavigatorItem *hildon_navigator_item_new (const gchar *name, const gchar *filename);
00100 
00101 void hildon_navigator_item_initialize (HildonNavigatorItem *item);
00102 GtkWidget *hildon_navigator_item_get_widget (HildonNavigatorItem *item);
00103 
00104 guint hildon_navigator_item_get_position (HildonNavigatorItem *item);
00105 gboolean hildon_navigator_item_get_mandatory (HildonNavigatorItem *item);
00106 gchar *hildon_navigator_item_get_name (HildonNavigatorItem *item);
00107 
00108 G_END_DECLS
00109 
00110 #endif /* HILDON_NAVIGATOR_ITEM_H */

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