]> gitweb.michael.orlitzky.com - xfce4-hdaps.git/blob - panel-plugin/xfce4-hdaps.h
Fixed build with --enable-debug=full thanks to Evgeni Golov.
[xfce4-hdaps.git] / panel-plugin / xfce4-hdaps.h
1 /*
2 * xfce4-hdaps, an XFCE4 panel plugin for the HDAPS system.
3 *
4 * Copyright Michael Orlitzky
5 *
6 * http://michael.orlitzky.com/
7 *
8 * This program is free software: you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation, either version 3 of the License, or
11 * (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * http://www.fsf.org/licensing/licenses/gpl.html
19 */
20
21 #ifndef __XFCE4_HDAPS_H__
22 #define __XFCE4_HDAPS_H__
23
24 #include <gtk/gtk.h>
25 #include <libxfce4panel/xfce-panel-plugin.h>
26 #include <libxfce4panel/xfce-hvbox.h>
27 #include <libxfce4util/libxfce4util.h>
28
29 G_BEGIN_DECLS
30
31 typedef struct {
32 XfcePanelPlugin *plugin;
33
34 /* Panel widgets */
35 GtkWidget *eventbox;
36 GtkWidget *hvbox;
37 GtkWidget *icon;
38 GtkTooltips *tooltip;
39
40 /* A pointer to the timeout function.
41 That is, a pointer to the function that gets
42 executed every poll_frequency milliseconds. */
43 gint timeout;
44
45 /* Keep track of the previous status so we don't update the
46 icon every poll_frequency for no reason. */
47 int previous_status;
48
49 /* Settings */
50 gchar *device_name;
51 gint poll_frequency;
52
53 /* Pseudo-setting, updated whenever device_name is. */
54 char sysfs_file[FILENAME_MAX];
55
56 /* Configuration dialog widgets */
57 GtkWidget *sb_poll_frequency; /* Spinners on all our rides, yo. */
58 GtkWidget *cb_device_name; /* The "Device name" combo box. */
59
60
61 } HdapsPlugin;
62
63 void hdaps_save(XfcePanelPlugin *plugin,
64 HdapsPlugin *hdaps);
65
66 void hdaps_reset_timeout(HdapsPlugin *hdaps);
67
68 G_END_DECLS
69
70 #endif