Merge commit 'origin/master'
[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 G_BEGIN_DECLS
29
30 typedef struct _EyesPlugin EyesPlugin;
31 typedef struct _EyesPluginClass EyesPluginClass;
32
33 #define EYES_TYPE_HOME_PLUGIN   (eyes_plugin_get_type ())
34
35 #define EYES_HOME_PLUGIN(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), \
36                         EYES_TYPE_HOME_PLUGIN, EyesPlugin))
37
38 #define EYES_HOME_PLUGIN_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), \
39                         EYES_TYPE_HOME_PLUGIN,  EyesPluginClass))
40
41 #define EYES_IS_HOME_PLUGIN(obj)  (G_TYPE_CHECK_INSTANCE_TYPE ((obj), \
42                         EYES_TYPE_HOME_PLUGIN))
43  
44 #define EYES_IS_HOME_PLUGIN_CLASS(klass)  (G_TYPE_CHECK_CLASS_TYPE ((klass), \
45                         EYES_TYPE_HOME_PLUGIN))
46
47 #define EYES_HOME_PLUGIN_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), \
48                         EYES_TYPE_HOME_PLUGIN,  EyesPluginClass))
49  
50 typedef struct
51 {
52         GtkWidget       *ebox;
53
54         /* Properties */
55         gchar *active_theme;
56
57         /* Plugin */
58         GtkWidget   *align;
59         GtkWidget   *hbox;
60         GtkWidget   **eyes;
61         guint        timeout_id;
62         gint        *pointer_last_x;
63         gint        *pointer_last_y;
64
65         /* Theme */
66         GdkPixbuf *eye_image;
67         GdkPixbuf *pupil_image;
68         gchar *theme_dir;
69         gchar *theme_name;
70         gchar *eye_filename;
71         gchar *pupil_filename;
72         gint num_eyes;
73         gint eye_height;
74         gint eye_width;
75         gint pupil_height;
76         gint pupil_width;
77         gint wall_thickness;
78 }
79 EyesPluginContent;
80
81 struct _EyesPlugin
82 {
83     HDHomePluginItem hitem;
84     EyesPluginContent *priv;
85 };
86  
87 struct _EyesPluginClass
88 {
89     HDHomePluginItemClass parent_class;
90 };
91  
92 GType eyes_plugin_get_type(void);
93
94 G_END_DECLS
95
96 #endif