fixe trailing space and empty lines
[psensor.git] / src / ui.h
index 24778dd..9410274 100644 (file)
--- a/src/ui.h
+++ b/src/ui.h
@@ -1,5 +1,5 @@
 /*
-    Copyright (C) 2010-2011 wpitchoune@gmail.com
+    Copyright (C) 2010-2011 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 published by
@@ -42,9 +42,19 @@ struct ui_psensor {
 
        GtkWidget *main_window;
 
+       GtkWidget *menu_bar;
+
+       /*
+          The main vertical box, top contains the menubar, bottom
+          contains the sensor_box.
+       */
        GtkWidget *main_box;
 
-       GtkWidget *w_sensorlist;
+       /*
+          The box which contains the sensors graph and the sensors
+          information list.
+       */
+       GtkWidget *sensor_box;
 
        int graph_update_interval;
 
@@ -52,7 +62,7 @@ struct ui_psensor {
 
 #ifdef HAVE_LIBNOTIFY
        /*
-        * Time of the last notification
+          Time of the last notification
         */
        struct timeval *notification_last_time;
 #endif
@@ -62,16 +72,28 @@ struct ui_psensor {
 #endif
 };
 
-void ui_main_box_create(struct ui_psensor *);
+/*
+  Update the window according to the configuration.
+
+  Creates or re-creates the sensor_box according to the position of
+  the list of sensors in the configuration.
+
+  Show or hide the menu bar.
+*/
+void ui_window_update(struct ui_psensor *);
 
 /*
   Must be called to terminate Psensor UI.
 */
-void ui_psensor_exit();
+void ui_psensor_quit(struct ui_psensor *ui);
 
 /*
   Creates the main GTK window
 */
-GtkWidget *ui_window_create(struct ui_psensor * ui);
+void ui_window_create(struct ui_psensor *ui);
+
+void ui_menu_bar_show(unsigned int show, struct ui_psensor *ui);
+
+void ui_show_about_dialog();
 
 #endif