00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
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
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