1 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ 2 /* eggtrayicon.h 3 * Copyright (C) 2002 Anders Carlsson <andersca@gnu.org> 4 * 5 * This library is free software; you can redistribute it and/or 6 * modify it under the terms of the GNU Lesser General Public 7 * License as published by the Free Software Foundation; either 8 * version 2 of the License, or (at your option) any later version. 9 * 10 * This library 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 GNU 13 * Lesser General Public License for more details. 14 * 15 * You should have received a copy of the GNU Lesser General Public 16 * License along with this library; if not, write to the 17 * Free Software Foundation, Inc., 59 Temple Place - Suite 330, 18 * Boston, MA 02111-1307, USA. 19 */ 20 21 #ifndef UIM_EGG_TRAY_ICON_H 22 #define UIM_EGG_TRAY_ICON_H 23 24 #include <gtk/gtk.h> 25 #if GTK_CHECK_VERSION(2, 99, 3) 26 # include <gtk/gtkx.h> 27 #endif 28 #ifdef GDK_WINDOWING_X11 29 # include <gdk/gdkx.h> 30 #endif 31 32 G_BEGIN_DECLS 33 34 #define EGG_TYPE_TRAY_ICON (egg_tray_icon_get_type ()) 35 #define EGG_TRAY_ICON(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), EGG_TYPE_TRAY_ICON, EggTrayIcon)) 36 #define EGG_TRAY_ICON_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), EGG_TYPE_TRAY_ICON, EggTrayIconClass)) 37 #define EGG_IS_TRAY_ICON(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), EGG_TYPE_TRAY_ICON)) 38 #define EGG_IS_TRAY_ICON_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), EGG_TYPE_TRAY_ICON)) 39 #define EGG_TRAY_ICON_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), EGG_TYPE_TRAY_ICON, EggTrayIconClass)) 40 41 typedef struct _EggTrayIcon EggTrayIcon; 42 typedef struct _EggTrayIconClass EggTrayIconClass; 43 44 struct _EggTrayIcon 45 { 46 GtkPlug parent_instance; 47 48 guint stamp; 49 50 #ifdef GDK_WINDOWING_X11 51 Atom selection_atom; 52 Atom manager_atom; 53 Atom system_tray_opcode_atom; 54 Atom orientation_atom; 55 Atom visual_atom; 56 Window manager_window; 57 GdkVisual *manager_visual; 58 gboolean manager_visual_rgba; 59 60 #endif 61 GtkOrientation orientation; 62 }; 63 64 struct _EggTrayIconClass 65 { 66 GtkPlugClass parent_class; 67 }; 68 69 GType egg_tray_icon_get_type (void); 70 71 EggTrayIcon *egg_tray_icon_new_for_screen (GdkScreen *screen, 72 const gchar *name); 73 74 EggTrayIcon *egg_tray_icon_new (const gchar *name); 75 76 guint egg_tray_icon_send_message (EggTrayIcon *icon, 77 gint timeout, 78 const char *message, 79 gint len); 80 void egg_tray_icon_cancel_message (EggTrayIcon *icon, 81 guint id); 82 83 GtkOrientation egg_tray_icon_get_orientation (EggTrayIcon *icon); 84 85 G_END_DECLS 86 87 #endif /* UIM_EGG_TRAY_ICON_H */ 88