eggtrayicon.h

00001 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
00002 /* eggtrayicon.h
00003  * Copyright (C) 2002 Anders Carlsson <andersca@gnu.org>
00004  *
00005  * This library is free software; you can redistribute it and/or
00006  * modify it under the terms of the GNU Lesser General Public
00007  * License as published by the Free Software Foundation; either
00008  * version 2 of the License, or (at your option) any later version.
00009  *
00010  * This library is distributed in the hope that it will be useful,
00011  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00012  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00013  * Lesser General Public License for more details.
00014  *
00015  * You should have received a copy of the GNU Lesser General Public
00016  * License along with this library; if not, write to the
00017  * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00018  * Boston, MA 02111-1301, USA.
00019  */
00020 
00021 #ifndef __EGG_TRAY_ICON_H__
00022 #define __EGG_TRAY_ICON_H__
00023 
00024 #include <gtk/gtkplug.h>
00025 #include <gtk/gtkversion.h>
00026 #include <gdk/gdkx.h>
00027 
00028 G_BEGIN_DECLS
00029 
00030 #define EGG_TYPE_TRAY_ICON      (egg_tray_icon_get_type ())
00031 #define EGG_TRAY_ICON(obj)      (G_TYPE_CHECK_INSTANCE_CAST ((obj), EGG_TYPE_TRAY_ICON, EggTrayIcon))
00032 #define EGG_TRAY_ICON_CLASS(klass)  (G_TYPE_CHECK_CLASS_CAST ((klass), EGG_TYPE_TRAY_ICON, EggTrayIconClass))
00033 #define EGG_IS_TRAY_ICON(obj)       (G_TYPE_CHECK_INSTANCE_TYPE ((obj), EGG_TYPE_TRAY_ICON))
00034 #define EGG_IS_TRAY_ICON_CLASS(klass)   (G_TYPE_CHECK_CLASS_TYPE ((klass), EGG_TYPE_TRAY_ICON))
00035 #define EGG_TRAY_ICON_GET_CLASS(obj)    (G_TYPE_INSTANCE_GET_CLASS ((obj), EGG_TYPE_TRAY_ICON, EggTrayIconClass))
00036     
00037 typedef struct _EggTrayIcon   EggTrayIcon;
00038 typedef struct _EggTrayIconClass  EggTrayIconClass;
00039 
00040 struct _EggTrayIcon
00041 {
00042   GtkPlug parent_instance;
00043 
00044   guint stamp;
00045   
00046   Atom selection_atom;
00047   Atom manager_atom;
00048   Atom system_tray_opcode_atom;
00049   Atom orientation_atom;
00050   Window manager_window;
00051 
00052   GtkOrientation orientation;
00053 };
00054 
00055 struct _EggTrayIconClass
00056 {
00057   GtkPlugClass parent_class;
00058 };
00059 
00060 GType        egg_tray_icon_get_type       (void);
00061 
00062 #if GTK_CHECK_VERSION(2,1,0)
00063 EggTrayIcon *egg_tray_icon_new_for_screen (GdkScreen   *screen,
00064                        const gchar *name);
00065 #endif
00066 
00067 EggTrayIcon *egg_tray_icon_new            (const gchar *name);
00068 
00069 guint        egg_tray_icon_send_message   (EggTrayIcon *icon,
00070                        gint         timeout,
00071                        const char  *message,
00072                        gint         len);
00073 void         egg_tray_icon_cancel_message (EggTrayIcon *icon,
00074                        guint        id);
00075 
00076 GtkOrientation egg_tray_icon_get_orientation (EggTrayIcon *icon);
00077                         
00078 G_END_DECLS
00079 
00080 #endif /* __EGG_TRAY_ICON_H__ */