Main Page | File List | File Members

hildon-cp-applist.h

00001 /*
00002  * This file is part of hildon-control-panel
00003  *
00004  * Copyright (C) 2005 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  * version 2.1 as published by the Free Software Foundation.
00011  *
00012  * This library is distributed in the hope that it will be useful, but
00013  * WITHOUT ANY WARRANTY; without even the implied warranty of
00014  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
00015  * Lesser General Public License for more details.
00016  *
00017  * You should have received a copy of the GNU Lesser General Public
00018  * License along with this library; if not, write to the Free Software
00019  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
00020  * 02110-1301 USA
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 /* GConf key for controlpanel group list */
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 /* .desktop keys */
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

Generated on Thu Dec 21 18:18:50 2006 by  doxygen 1.4.2