display blanking detection via dbus
[eyes-widget] / src / eyes.h
1 /* $Id: eyes.h 2397 2007-01-17 17:46:35Z nick $
2  * 
3  * Copyright (C) 1999 Dave Camp <dave@davec.dhs.org>
4  *
5  * This program is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License as published by
7  * the Free Software Foundation; either version 2 of the License, or
8  * (at your option) any later version.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with this program; if not, write to the Free Software
17  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18  */
19
20 #ifndef __EYES_PLUGIN_H__
21 #define __EYES_PLUGIN_H__
22
23
24 #include <glib-object.h>
25
26 #include <libhildondesktop/libhildondesktop.h>
27
28
29 G_BEGIN_DECLS
30
31 typedef struct _EyesPlugin EyesPlugin;
32 typedef struct _EyesPluginClass EyesPluginClass;
33
34 #define EYES_TYPE_HOME_PLUGIN   (eyes_plugin_get_type ())
35
36 #define EYES_HOME_PLUGIN(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj),       \
37                                                            EYES_TYPE_HOME_PLUGIN, EyesPlugin))
38
39 #define EYES_HOME_PLUGIN_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), \
40                                                                 EYES_TYPE_HOME_PLUGIN,  EyesPluginClass))
41
42 #define EYES_IS_HOME_PLUGIN(obj)  (G_TYPE_CHECK_INSTANCE_TYPE ((obj),   \
43                                                                EYES_TYPE_HOME_PLUGIN))
44  
45 #define EYES_IS_HOME_PLUGIN_CLASS(klass)  (G_TYPE_CHECK_CLASS_TYPE ((klass), \
46                                                                     EYES_TYPE_HOME_PLUGIN))
47
48 #define EYES_HOME_PLUGIN_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), \
49                                                                     EYES_TYPE_HOME_PLUGIN,  EyesPluginClass))
50  
51 typedef struct
52 {
53   GtkWidget       *ebox;
54   DBusGConnection *dbus_conn;
55   DBusGProxy *proxy;
56
57   /* Properties */
58   gchar *active_theme;
59   gboolean visible;
60
61   /* Plugin */
62   GtkWidget   *align;
63   GtkWidget   *hbox;
64   GtkWidget   **eyes;
65   guint        timeout_id;
66   gint        *pointer_last_x;
67   gint        *pointer_last_y;
68
69   /* Theme */
70   GdkPixbuf *eye_image;
71   GdkPixbuf *pupil_image;
72   gchar *theme_dir;
73   gchar *theme_name;
74   gchar *eye_filename;
75   gchar *pupil_filename;
76   gint num_eyes;
77   gint eye_height;
78   gint eye_width;
79   gint pupil_height;
80   gint pupil_width;
81   gint wall_thickness;
82 }
83   EyesPluginContent;
84
85 struct _EyesPlugin
86 {
87   HDHomePluginItem hitem;
88   EyesPluginContent *priv;
89 };
90  
91 struct _EyesPluginClass
92 {
93   HDHomePluginItemClass parent_class;
94 };
95  
96 GType eyes_plugin_get_type(void);
97
98 G_END_DECLS
99
100 #endif