X-Git-Url: https://git.wpitchoune.net/gitweb/?a=blobdiff_plain;f=src%2Fui.h;h=753d7b9899c102c7efc9ec14a18824c20460626e;hb=af47d522aa7957879bd87a44a416bb25544ed9f5;hp=eb3e7d5d790b457ada581160cf76f8878a0d3b10;hpb=411d31b2e6cd38df6e6886fc3eb4f7d52e62dcb0;p=psensor.git diff --git a/src/ui.h b/src/ui.h index eb3e7d5..753d7b9 100644 --- a/src/ui.h +++ b/src/ui.h @@ -1,22 +1,21 @@ /* - 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 - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA - 02110-1301 USA -*/ - + * Copyright (C) 2010-2012 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 the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA + */ #ifndef _PSENSOR_UI_H_ #define _PSENSOR_UI_H_ @@ -42,50 +41,46 @@ struct ui_psensor { GtkWidget *main_window; + GtkWidget *menu_bar; + /* - The main vertical box, top contains the menubar, bottom - contains the sensor_box. - */ + * The main vertical box, top contains the menubar, bottom + * contains the sensor_box. + */ GtkWidget *main_box; /* - The box which contains the sensors graph and the sensors - information list. - */ + * The box which contains the sensors graph and the sensors + * information list. + */ GtkWidget *sensor_box; - GtkWidget *w_sensorlist; - int graph_update_interval; GMutex *sensors_mutex; - -#ifdef HAVE_LIBNOTIFY - /* - Time of the last notification - */ - struct timeval *notification_last_time; -#endif - -#if defined(HAVE_APPINDICATOR) || defined(HAVE_APPINDICATOR_029) - AppIndicator *indicator; -#endif }; /* - Creates or re-creates the sensor_box according to the position of - the list of sensors in the configuration. -*/ -void ui_sensor_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(); +/* Show the main psensor window. */ +void ui_window_show(struct ui_psensor *); -/* - Creates the main GTK window -*/ -GtkWidget *ui_window_create(struct ui_psensor * ui); +/* Must be called to terminate Psensor UI. */ +void ui_psensor_quit(struct ui_psensor *ui); + +/* Creates the main GTK window */ +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