2 * Copyright (C) 2010-2011 jeanfi@gmail.com
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License as
6 * published by the Free Software Foundation; either version 2 of the
7 * License, or (at your option) any later version.
9 * This program is distributed in the hope that it will be useful, but
10 * WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * General Public License for more details.
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
19 #ifndef _PSENSOR_CONFIG_H_
20 #define _PSENSOR_CONFIG_H_
24 enum sensorlist_position {
25 SENSORLIST_POSITION_RIGHT,
26 SENSORLIST_POSITION_LEFT,
27 SENSORLIST_POSITION_TOP,
28 SENSORLIST_POSITION_BOTTOM
32 struct color *graph_bgcolor;
33 struct color *graph_fgcolor;
35 double graph_bg_alpha;
37 int alpha_channel_enabled;
40 Position of the sensors list table
42 enum sensorlist_position sensorlist_position;
44 int window_decoration_enabled;
45 int window_keep_below_enabled;
46 int window_restore_enabled;
47 /* Last saved position of the window. */
50 /* Last saved size of the window. */
53 /* Last saved position of the window divider. */
54 int window_divider_pos;
56 int graph_update_interval;
57 int graph_monitoring_duration;
59 int sensor_values_max_length;
60 int sensor_update_interval;
62 int menu_bar_disabled;
64 int unity_launcher_count_disabled;
70 Loads config from GConf
72 struct config *config_load();
74 void config_save(struct config *);
78 void config_cleanup();
80 struct color *config_get_sensor_color(char *, struct color *);
81 void config_set_sensor_color(char *, struct color *);
83 int config_get_sensor_alarm_limit(char *, int);
84 void config_set_sensor_alarm_limit(char *, int);
86 int config_get_sensor_alarm_enabled(char *);
87 void config_set_sensor_alarm_enabled(char *, int);
89 int config_is_sensor_enabled(char *);
90 void config_set_sensor_enabled(char *, int);
92 char *config_get_sensor_name(char *);
93 void config_set_sensor_name(char *, const char *);