Minor warning fixes.
[stockwidget] / lib-stock-home-widget.h
1 /*
2  * Simple stock widget
3  * Jon Parr
4  */
5
6 #ifndef STOCK_PLUGIN_H
7 #define STOCK_PLUGIN_H
8
9 /* Standard includes */
10 #include <glib-object.h>
11 #include <libhildondesktop/libhildondesktop.h>
12
13 /* Custom includes */
14 #include "stockgetter.h"
15 #include "lib-stock-settings.h"
16
17 G_BEGIN_DECLS
18
19 typedef struct _StockPlugin StockPlugin;
20 typedef struct _StockPluginClass StockPluginClass;
21
22 #define STOCK_TYPE_HOME_PLUGIN (stock_plugin_get_type ())
23
24 #define STOCK_HOME_PLUGIN(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), STOCK_TYPE_HOME_PLUGIN, StockPlugin))
25
26 #define STOCK_HOME_PLUGIN_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), STOCK_TYPE_HOME_PLUGIN, StockPluginClass))
27
28 #define STOCK_IS_HOME_PLUGIN(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), STOCK_TYPE_HOME_PLUGIN))
29
30 #define STOCK_IS_HOME_PLUGIN_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), STOCK_TYPE_HOME_PLUGIN))
31
32 #define STOCK_HOME_PLUGIN_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), STOCK_TYPE_HOME_PLUGIN, StockPluginClass))
33
34 typedef struct _StockPluginContext
35 {
36         /* Used for updating when stock price changes */
37         GtkWidget       *psLabel;
38         GtkWidget       *psEventBox;
39
40         /* Stock Getter Handle */
41         SGHandle hSG;
42
43         /* Timer func id */
44         guint nTimerID;
45         
46         /* Settings for the plugin (saved and loaded into config file) */
47         StockPluginSettings *psSettings;
48         
49 } StockPluginContext;
50
51 struct _StockPlugin
52 {
53     HDHomePluginItem     hitem;
54         StockPluginContext      *context;
55 };
56
57 struct _StockPluginClass
58 {
59     HDHomePluginItemClass parent_class;
60 };
61
62 GType stock_home_plugin_get_type(void);
63
64 G_END_DECLS
65
66 #define DEBUG
67
68 /* Debug print only */
69 #if defined(DEBUG)
70 #define DebugOut(X) {g_print("stockwidget: "); g_print X; g_print("\n");}
71 #else
72 #define DebugOut(X)
73 #endif/*defined(DEBUG)*/
74
75 #endif