2 * Copyright (C) 2010-2012 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 temperature_unit {
29 enum sensorlist_position {
30 SENSORLIST_POSITION_RIGHT,
31 SENSORLIST_POSITION_LEFT,
32 SENSORLIST_POSITION_TOP,
33 SENSORLIST_POSITION_BOTTOM
37 struct color *graph_bgcolor;
38 struct color *graph_fgcolor;
40 double graph_bg_alpha;
42 int alpha_channel_enabled;
45 * Position of the sensors list table
47 enum sensorlist_position sensorlist_position;
49 int window_decoration_enabled;
50 int window_keep_below_enabled;
51 int window_restore_enabled;
52 /* Last saved position of the window. */
55 /* Last saved size of the window. */
58 /* Last saved position of the window divider. */
59 int window_divider_pos;
61 int graph_update_interval;
62 int graph_monitoring_duration;
64 int sensor_values_max_length;
65 int sensor_update_interval;
67 int menu_bar_disabled;
69 int unity_launcher_count_disabled;
73 enum temperature_unit temperature_unit;
77 Loads config from GConf
79 struct config *config_load();
81 void config_save(const struct config *);
83 void config_cleanup();
85 struct color *config_get_sensor_color(const char *sid, const struct color *);
86 void config_set_sensor_color(const char *sid, const struct color *);
88 int config_get_sensor_alarm_high_threshold(const char *);
89 void config_set_sensor_alarm_high_threshold(const char *, int);
91 int config_get_sensor_alarm_low_threshold(const char *);
92 void config_set_sensor_alarm_low_threshold(const char *, int);
94 int config_get_sensor_alarm_enabled(const char *);
95 void config_set_sensor_alarm_enabled(const char *, int);
97 int config_is_sensor_enabled(const char *);
98 void config_set_sensor_enabled(const char *, int);
100 char *config_get_sensor_name(const char *);
101 void config_set_sensor_name(const char *, const char *);