settings_utils.h

Go to the documentation of this file.
00001 #ifndef SETTINGS_UTILS_H
00002 #define SETTINGS_UTILS_H
00003 
00004 /*
00005  * File Name: settings_utils.h
00006  */
00007 
00008 /*
00009  * This file is part of settings.
00010  *
00011  * settings is free software: you can redistribute it and/or modify
00012  * it under the terms of the GNU General Public License as published by
00013  * the Free Software Foundation, either version 2 of the License, or
00014  * (at your option) any later version.
00015  *
00016  * settings is distributed in the hope that it will be useful,
00017  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00018  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
00019  * GNU General Public License for more details.
00020  *
00021  * You should have received a copy of the GNU General Public License
00022  * along with this program. If not, see <http://www.gnu.org/licenses/>.
00023  */
00024 
00025 /**
00026  * Copyright (C) 2008 iRex Technologies B.V.
00027  * All rights reserved.
00028  */
00029  
00030 #include <gtk/gtk.h>
00031 
00032 #define SETTINGS_GCONF_PATH         "/apps/er/sys/"
00033 
00034 #define GCONF_CURRENT_LOCALE        SETTINGS_GCONF_PATH "global/locale"
00035 #define GCONF_LOCALE_LIST           SETTINGS_GCONF_PATH "global/list_locales"
00036 #define GCONF_LANGUAGE_LIST         SETTINGS_GCONF_PATH "global/list_languages"
00037 
00038 #define GCONF_ROTATION_DIRECTION    SETTINGS_GCONF_PATH "display/rotation"
00039 #define GCONF_USE_LIGHT             SETTINGS_GCONF_PATH "sensor/use_light"
00040 #define GCONF_USE_SOUND             SETTINGS_GCONF_PATH "sensor/use_sound"
00041 #define GCONF_LOCK_LEFT_SENSOR      SETTINGS_GCONF_PATH "sensor/use_lock_left"
00042 #define GCONF_LOCK_MIDDLE_SENSOR    SETTINGS_GCONF_PATH "sensor/use_lock_middle"
00043 #define GCONF_LOCK_RIGHT_SENSOR     SETTINGS_GCONF_PATH "sensor/use_lock_right"
00044 
00045 #define GCONF_FLIGHTMODE_MODE       SETTINGS_GCONF_PATH "flightmode/flightmode_mode"
00046 #define GCONF_PAGETURN_INVERTED     SETTINGS_GCONF_PATH "flipbar/pageturn_inverted"
00047 
00048 #define GCONF_IDLE_MODE             SETTINGS_GCONF_PATH "power/idle_mode"
00049 #define GCONF_MIN_STANDBY           SETTINGS_GCONF_PATH "power/min_standby"
00050 #define GCONF_STANDBY_IF_PLUGGED    SETTINGS_GCONF_PATH "power/standby_if_plugged"
00051 
00052 #define GCONF_ENABLE_SD_CARD        SETTINGS_GCONF_PATH "ctb/show_sdcard"
00053 #define GCONF_INDEX_WITH_THUMBNAILS SETTINGS_GCONF_PATH "index/add_with_metadata"
00054 
00055 #define UDS_GCONF_PATH              "/apps/er/uds/"
00056 #define GCONF_PAGE_MARGINS          UDS_GCONF_PATH "page_margins"
00057 #define GCONF_ENABLE_ZOOMING        UDS_GCONF_PATH "enable_zooming"
00058 #define GCONF_ENABLE_SCRIBBLE       UDS_GCONF_PATH "enable_scribble"
00059 
00060 #define GCONF_DOWNLOAD_ACCOUNT_EMAIL  "/apps/er/private/ids/account/email"
00061 #define GCONF_DOWNLOAD_ACCOUNT_PASSWD "/apps/er/private/ids/account/password"
00062 
00063 typedef enum
00064 {
00065     IREX_DR800SG,
00066     IREX_DR1000,
00067     IREX_DR1000S,
00068     IREX_DR1000SW,
00069 } DeviceType;
00070 
00071 // Create a separator widget between 2 setting sections.
00072 GtkWidget* create_separator_widgets();
00073 
00074 // Set style of popup window. The window hasn't a title bar, but has borders.
00075 void set_popup_window_style(GtkWindow* window);
00076 
00077 // Set date time.
00078 gboolean set_date_time(time_t t);
00079 
00080 // GConfClient initialize and finalize.
00081 void gconf_initialize();
00082 void gconf_finalize();
00083 
00084 // Get and set int type value.
00085 int get_value_int(const char* key);
00086 gboolean set_value_int(const char* key, int new_value);
00087 
00088 // Get and set bool type value.
00089 gboolean get_value_bool(const char* key);
00090 gboolean set_value_bool(const char* key, gboolean new_value);
00091 
00092 // Get and set string type value.
00093 const char* get_value_string(const char* key);
00094 gboolean set_value_string(const char* key, const char* new_value);
00095 
00096 // Get string list type value.
00097 GSList* get_value_string_list(const char* key);
00098 
00099 GArray* get_int_array(const gchar* key);
00100 int set_int_array(const gchar* key, const GArray* new_value);
00101 
00102 #endif // SETTINGS_UTILS_H
Generated by  doxygen 1.6.2-20100208