2 Copyright (C) 2010-2011 jeanfi@gmail.com
4 This program is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2 of the License, or
7 (at your option) any later version.
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU 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
20 #ifndef _PSENSOR_UI_H_
21 #define _PSENSOR_UI_H_
25 #include <glib/gi18n.h>
28 #if defined(HAVE_APPINDICATOR) || defined(HAVE_APPINDICATOR_029)
29 #include <libappindicator/app-indicator.h>
35 struct psensor **sensors;
39 struct ui_sensorlist *ui_sensorlist;
41 struct config *config;
43 GtkWidget *main_window;
48 The main vertical box, top contains the menubar, bottom
49 contains the sensor_box.
54 The box which contains the sensors graph and the sensors
57 GtkWidget *sensor_box;
59 int graph_update_interval;
61 GMutex *sensors_mutex;
65 Time of the last notification
67 struct timeval *notification_last_time;
70 #if defined(HAVE_APPINDICATOR) || defined(HAVE_APPINDICATOR_029)
71 AppIndicator *indicator;
76 Update the window according to the configuration.
78 Creates or re-creates the sensor_box according to the position of
79 the list of sensors in the configuration.
81 Show or hide the menu bar.
83 void ui_window_update(struct ui_psensor *);
86 Must be called to terminate Psensor UI.
88 void ui_psensor_quit(struct ui_psensor *ui);
91 Creates the main GTK window
93 void ui_window_create(struct ui_psensor *ui);
95 void ui_menu_bar_show(unsigned int show, struct ui_psensor *ui);
97 void ui_show_about_dialog();