X-Git-Url: https://git.wpitchoune.net/gitweb/?p=psensor.git;a=blobdiff_plain;f=src%2Fcfg.h;h=9860aa1503b35337f1cdcfa743a46c576ffca4d3;hp=c7d764bf9ba5a5571ca11bd48a4ff1d8458ff9ff;hb=c1e20f2631a1249720e9c75d753eacfcb0f6c7b9;hpb=5de4d3d3e6906845ee6acf80582e33f3e5aeaa36 diff --git a/src/cfg.h b/src/cfg.h index c7d764b..9860aa1 100644 --- a/src/cfg.h +++ b/src/cfg.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2010-2014 jeanfi@gmail.com + * Copyright (C) 2010-2016 jeanfi@gmail.com * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as @@ -19,7 +19,7 @@ #ifndef _PSENSOR_CONFIG_H_ #define _PSENSOR_CONFIG_H_ -#include +#include #include #include @@ -44,11 +44,6 @@ struct config { bool alpha_channel_enabled; - /* Position of the sensors list table */ - enum sensorlist_position sensorlist_position; - - bool window_decoration_enabled; - bool window_keep_below_enabled; bool window_restore_enabled; /* Last saved position of the window. */ int window_x; @@ -65,14 +60,8 @@ struct config { int sensor_values_max_length; int sensor_update_interval; - bool menu_bar_disabled; - - bool unity_launcher_count_disabled; - int hide_on_startup; - enum temperature_unit temperature_unit; - bool slog_enabled; int slog_interval; }; @@ -84,13 +73,13 @@ void config_save(const struct config *); void config_cleanup(void); -struct color *config_get_sensor_color(const char *sid, const struct color *); -void config_set_sensor_color(const char *sid, const struct color *); +GdkRGBA *config_get_sensor_color(const char *); +void config_set_sensor_color(const char *, const GdkRGBA *); -int config_get_sensor_alarm_high_threshold(const char *); +bool config_get_sensor_alarm_high_threshold(const char *, double *, double); void config_set_sensor_alarm_high_threshold(const char *, int); -int config_get_sensor_alarm_low_threshold(const char *); +bool config_get_sensor_alarm_low_threshold(const char *, double *, double); void config_set_sensor_alarm_low_threshold(const char *, int); bool config_get_sensor_alarm_enabled(const char *); @@ -146,6 +135,26 @@ void config_set_nvctrl_enable(bool); bool config_is_atiadlsdk_enabled(void); void config_set_atiadlsdk_enable(bool); +enum temperature_unit config_get_temperature_unit(void); +void config_set_temperature_unit(enum temperature_unit); + +double config_get_default_high_threshold_temperature(void); + +bool config_is_window_decoration_enabled(void); +void config_set_window_decoration_enabled(bool); + +bool config_is_window_keep_below_enabled(void); +void config_set_window_keep_below_enabled(bool); + +bool config_is_menu_bar_enabled(void); +void config_set_menu_bar_enabled(bool); + +bool config_is_count_visible(void); +void config_set_count_visible(bool); + +enum sensorlist_position config_get_sensorlist_position(void); +void config_set_sensorlist_position(enum sensorlist_position pos); + /* * Returns the user directory containing psensor data (configuration * and log).