00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #ifndef HILDON_CONTROLPANEL_DESK_APPLIST_H
00025 #define HILDON_CONTROLPANEL_DESK_APPLIST_H
00026
00027 #include <gtk/gtk.h>
00028 #include <pango/pango-font.h>
00029 #include <libmb/mbdotdesktop.h>
00030
00031
00032 G_BEGIN_DECLS
00033
00034
00035 #define TOOLBAR_ICON_WIDTH 24
00036 #define TOOLBAR_ICON_HEIGHT 24
00037
00038 #define ADDITIONAL_CP_APPLETS_DIR_ENVIRONMENT "User_Applets_Dir"
00039
00040
00041 #define GCONF_CONTROLPANEL_GROUPS_KEY "/apps/osso/apps/controlpanel/groups"
00042 #define GCONF_CONTROLPANEL_GROUP_IDS_KEY "/apps/osso/apps/controlpanel/group_ids"
00043
00044
00045
00046 #define HCP_DESKTOP_GROUP "Desktop Entry"
00047 #define HCP_DESKTOP_KEY_NAME "Name"
00048 #define HCP_DESKTOP_KEY_ICON "Icon"
00049 #define HCP_DESKTOP_KEY_CATEGORY "Categories"
00050 #define HCP_DESKTOP_KEY_PLUGIN "X-control-panel-plugin"
00051
00052 typedef void (hildon_applist_activate_cb_f)(MBDotDesktop*, gpointer data, gboolean user_activated);
00053 typedef void (hildon_applist_focus_cb_f)(MBDotDesktop*, gpointer user_data);
00054
00055 enum
00056 {
00057 ICON_SIZE_SMALL,
00058 ICON_SIZE_NORMAL,
00059 ICON_SIZE_LARGE
00060 };
00061
00062 typedef struct _HCPCategory {
00063 gchar *name;
00064 gchar *id;
00065 GSList *applets;
00066 } HCPCategory;
00067
00068 typedef struct _HCPAppList {
00069 GHashTable *applets;
00070 GSList *categories;
00071 } HCPAppList;
00072
00073
00074 HCPAppList * hcp_al_new (void);
00075
00076 gboolean hildon_cp_applist_focus_item (HCPAppList *al,
00077 const gchar * entryname);
00078
00079 void hcp_al_update_list (HCPAppList *al);
00080
00081 void
00082 hildon_cp_applist_initialize( hildon_applist_activate_cb_f callback,
00083 gpointer d1,
00084 hildon_applist_focus_cb_f focus_callback,
00085 gpointer d2,
00086 GtkWidget *hildon_appview,
00087 const gchar *path );
00088
00089 void
00090 hildon_cp_applist_reread_dot_desktops( void );
00091
00092 GList *
00093 hildon_cp_applist_get_grids( void );
00094
00095 MBDotDesktop*
00096 hildon_cp_applist_get_entry( const gchar * entryname );
00097
00098 gboolean
00099 hcp_al_free (HCPAppList *al);
00100
00101 G_END_DECLS
00102
00103 #endif