Main Page | File List | File Members

hildon-control-panel-main.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 DBUS_API_SUBJECT_TO_CHANGE
00025 #define DBUS_API_SUBJECT_TO_CHANGE
00026 #endif /* dbus_api_subject_to_change */
00027 
00028 #ifndef HILDON_CONTROLPANEL_MAIN_H
00029 #define HILDON_CONTROLPANEL_MAIN_H
00030 
00031 /* System includes */
00032 #include <libintl.h>
00033 #include <strings.h>
00034 
00035 /* Osso includes */
00036 #include <libosso.h>
00037 #include <osso-helplib.h>
00038 
00039 /* GLib includes */
00040 #include <glib.h>
00041 #include <glib/gstdio.h>
00042 
00043 /* GDK includes */
00044 #include <gdk/gdkkeysyms.h>
00045 
00046 /* GTK includes */
00047 #include <gtk/gtk.h>
00048 
00049 /* Hildon widgets */
00050 #include <hildon-widgets/hildon-program.h>
00051 #include <hildon-widgets/hildon-note.h>
00052 #include <hildon-widgets/gtk-infoprint.h>
00053 
00054 #include <hildon-base-lib/hildon-base-dnotify.h>
00055 #include <hildon-base-lib/hildon-base-types.h>
00056 
00057 /* Control Panel includes */
00058 #include "hildon-cp-applist.h"
00059 #include "hildon-cp-item.h"
00060 #include "cp-grid.h"
00061 
00062 
00063 G_BEGIN_DECLS
00064 
00065 
00066 #define _(a) gettext(a)
00067 
00068 #define APP_NAME     "controlpanel"
00069 #define APP_VERSION  "0.1"
00070 
00071 #define HILDON_CONTROL_PANEL_TITLE             _("copa_ap_cp_name")
00072 #define HILDON_CONTROL_PANEL_MENU_OPEN         _("copa_me_open")
00073 #define HILDON_CONTROL_PANEL_MENU_SUB_VIEW     _("copa_me_view")
00074 #define HILDON_CONTROL_PANEL_MENU_SMALL_ITEMS  _("copa_me_view_small")
00075 #define HILDON_CONTROL_PANEL_MENU_LARGE_ITEMS  _("copa_me_view_large")
00076 #define HILDON_CONTROL_PANEL_MENU_SUB_TOOLS    _("copa_me_tools")
00077 #define HILDON_CONTROL_PANEL_MENU_SETUP_WIZARD _("copa_me_tools_setup_wizard")
00078 #define HILDON_CONTROL_PANEL_MENU_RFS          _("copa_me_tools_rfs")
00079 #define HILDON_CONTROL_PANEL_MENU_CUD          _("copa_me_tools_cud")
00080 #define HILDON_CONTROL_PANEL_MENU_HELP         _("copa_me_tools_help")
00081 #define HILDON_CONTROL_PANEL_MENU_CLOSE        _("copa_me_close")
00082 
00083 #define RESET_FACTORY_SETTINGS_INFOBANNER_OK     _("rfs_bd_ok")
00084 #define RESET_FACTORY_SETTINGS_INFOBANNER_CANCEL _("rfs_bd_cancel")
00085 #define HILDON_CP_RFS_WARNING _("refs_ia_text")
00086 #define HILDON_CP_CUD_WARNING _("cud_ia_text")
00087 
00088 #define HILDON_CP_RFS_WARNING_TITLE _("rfs_ti_restore")
00089 #define HILDON_CP_CUD_WARNING_TITLE _("cud_ti_clear")
00090 
00091 #define HILDON_CP_RFS_HELP_TOPIC "Features_restorefactorysettings_closealldialog"
00092 #define HILDON_CP_CUD_HELP_TOPIC "Features_clearuserdata_dialog"
00093 
00094 #define HILDON_CP_CODE_DIALOG_HELP_TOPIC "Features_restorefactorysettings_passwordquerydialog"
00095 
00096 #define RESET_FACTORY_SETTINGS_IB_WRONG_LOCKCODE dgettext("hildon-libs", "secu_info_incorrectcode")
00097 
00098 #define HILDON_CP_SYSTEM_DIR ".osso/hildon-cp"
00099 #define HILDON_CP_CONF_USER_FILENAME "hildon-cp.conf"
00100 #define HILDON_CP_SYSTEM_DIR_ACCESS   0755
00101 #define HILDON_ENVIRONMENT_USER_HOME_DIR "HOME"
00102 #define HILDON_CP_CONF_FILE_FORMAT    \
00103  "iconsize=%20s\n"
00104 #define HILDON_CP_MAX_FILE_LENGTH 30 /* CONF FILE FORMAT MUST NOT BE LARGER */
00105 
00106 
00107 #define HILDON_CP_DBUS_MCE_SERVICE "com.nokia.mce"
00108 #define HILDON_CP_DBUS_MCE_REQUEST_IF "com.nokia.mce.request"
00109 #define HILDON_CP_DBUS_MCE_REQUEST_PATH "/com/nokia/mce/request"
00110 #define HILDON_CP_MCE_PASSWORD_VALIDATE "validate_devicelock_code"
00111 #define HILDON_CP_DEFAULT_SALT "$1$JE5Gswee$"
00112 
00113 #define HCP_GCONF_ICON_SIZE         "/apps/osso/apps/controlpanel/icon_size"
00114 
00115 #define HCP_STATE_GROUP             "HildonControlPanel"
00116 #define HCP_STATE_FOCUSSED          "Focussed"
00117 #define HCP_STATE_SCROLL_VALUE      "ScrollValue"
00118 #define HCP_STATE_EXECUTE           "Execute"
00119 
00120 
00121 #define OSSO_HELP_ID_CONTROL_PANEL "Utilities_controlpanel_mainview"
00122 #define HILDON_CP_ASSUMED_LOCKCODE_MAXLENGTH 5 /* Note that max number of characters is removed from widget specs. */
00123 
00124 
00125 /* DBus RPC */
00126 #define HCP_RPC_SERVICE                     "com.nokia.controlpanel"
00127 #define HCP_RPC_PATH                        "/com/nokia/controlpanel/rpc"
00128 #define HCP_RPC_INTERFACE                   "com.nokia.controlpanel.rpc"
00129 #define HCP_RPC_METHOD_RUN_APPLET           "run_applet"
00130 #define HCP_RPC_METHOD_SAVE_STATE_APPLET    "save_state_applet"
00131 #define HCP_RPC_METHOD_TOP_APPLICATION      "top_application"
00132 #define HCP_RPC_METHOD_IS_APPLET_RUNNING    "is_applet_running"
00133 
00134 typedef struct _HCP HCP;
00135 
00136 struct _HCP {
00137     HildonProgram *program;
00138     HildonWindow *window;
00139     HCPAppList *al;
00140     HCPItem *focused_item;
00141     GtkWidget *view;
00142     GtkWidget *large_icons_menu_item;
00143     GtkWidget *small_icons_menu_item;
00144     GList *grids;
00145     osso_context_t *osso;
00146 
00147     /* for state save data */
00148     gint icon_size;
00149     gchar *saved_focused_filename;
00150     gint scroll_value;
00151     gint execute;
00152 };
00153  
00154 gboolean hcp_rfs (HCP *hcp,
00155                   const char *warning,
00156                   const char *title,
00157                   const char *script,
00158                   const char *help_topic);
00159 
00160 
00161 G_END_DECLS
00162 
00163 #endif

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