1 /* Copyright (C) 1999 Dave Camp <dave@davec.dhs.org> 2 * 3 * This program is free software; you can redistribute it and/or modify 4 * it under the terms of the GNU General Public License as published by 5 * the Free Software Foundation; either version 2 of the License, or 6 * (at your option) any later version. 7 * 8 * This program is distributed in the hope that it will be useful, 9 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 * GNU General Public License for more details. 12 * 13 * You should have received a copy of the GNU General Public License 14 * along with this program; if not, write to the Free Software 15 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. 16 */ 17 18 #ifndef __GEYES_H__ 19 #define __GEYES_H__ 20 21 #include <glib.h> 22 #include <glib/gi18n.h> 23 #include <gdk-pixbuf/gdk-pixbuf.h> 24 #include <gtk/gtk.h> 25 #include <gio/gio.h> 26 #include <mate-panel-applet.h> 27 28 #define MAX_EYES 1000 29 #define GEYES_SETTINGS_SCHEMA "org.mate.panel.applet.geyes" 30 #define GEYES_SETTINGS_THEME_PATH_KEY "theme-path" 31 32 typedef struct 33 { 34 GtkWidget *pbox; 35 36 gint selected_row; 37 } EyesPropertyBox; 38 39 typedef struct 40 { 41 /* Applet */ 42 MatePanelApplet *applet; 43 GtkWidget *vbox; 44 GtkWidget *hbox; 45 GtkWidget **eyes; 46 guint timeout_id; 47 gint *pointer_last_x; 48 gint *pointer_last_y; 49 50 /* Theme */ 51 GdkPixbuf *eye_image; 52 GdkPixbuf *pupil_image; 53 gchar *theme_dir; 54 gchar *theme_name; 55 gchar *eye_filename; 56 gchar *pupil_filename; 57 gsize num_eyes; 58 gint eye_height; 59 gint eye_width; 60 gint pupil_height; 61 gint pupil_width; 62 gint wall_thickness; 63 64 /* Properties */ 65 EyesPropertyBox prop_box; 66 67 /* Settings */ 68 GSettings *settings; 69 } EyesApplet; 70 71 /* eyes.c */ 72 void setup_eyes (EyesApplet *eyes_applet); 73 void destroy_eyes (EyesApplet *eyes_applet); 74 75 /* theme.c */ 76 void theme_dirs_create (void); 77 int load_theme (EyesApplet *eyes_applet, 78 const gchar *theme_dir); 79 void properties_cb (GtkAction *action, 80 EyesApplet *eyes_applet); 81 82 #endif 83