X-Git-Url: http://wpitchoune.net/gitweb/?p=psensor-pkg-debian.git;a=blobdiff_plain;f=src%2Fui.h;h=af17b78c32156481a6a80dfe783d192220b1ae61;hp=753d7b9899c102c7efc9ec14a18824c20460626e;hb=e248180cc4ebc258fdd5778a26c08287089165b1;hpb=f055e7507526592d3a74c652f5f053701614c9c0 diff --git a/src/ui.h b/src/ui.h index 753d7b9..af17b78 100644 --- a/src/ui.h +++ b/src/ui.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2010-2012 jeanfi@gmail.com + * Copyright (C) 2010-2014 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 @@ -21,6 +21,8 @@ #include "config.h" +#include + #include #include @@ -30,19 +32,23 @@ #include "psensor.h" +#define PSENSOR_ICON "psensor" + struct ui_psensor { struct psensor **sensors; + /* mutex which MUST be used for accessing sensors.*/ + pthread_mutex_t sensors_mutex; GtkWidget *w_graph; - struct ui_sensorlist *ui_sensorlist; - struct config *config; GtkWidget *main_window; GtkWidget *menu_bar; + GtkWidget *popup_menu; + /* * The main vertical box, top contains the menubar, bottom * contains the sensor_box. @@ -53,11 +59,13 @@ struct ui_psensor { * The box which contains the sensors graph and the sensors * information list. */ - GtkWidget *sensor_box; + GtkPaned *sensor_box; - int graph_update_interval; + GtkListStore *sensors_store; + GtkTreeView *sensors_tree; + GtkScrolledWindow *sensors_scrolled_tree; - GMutex *sensors_mutex; + int graph_update_interval; }; /* @@ -83,4 +91,12 @@ void ui_menu_bar_show(unsigned int show, struct ui_psensor *ui); void ui_show_about_dialog(); +void ui_enable_alpha_channel(struct ui_psensor *ui); + +void ui_cb_preferences(GtkMenuItem *mi, gpointer data); +void ui_cb_about(GtkMenuItem *mi, gpointer data); +void ui_cb_menu_quit(GtkMenuItem *mi, gpointer data); +void ui_cb_sensor_preferences(GtkMenuItem *mi, gpointer data); + +struct psensor **ui_get_sensors_ordered_by_position(const struct ui_psensor *); #endif