udapted vi.po
[rhythmbox.git] / widgets / eggtrayicon.h
blobc1a812884429428300711eddb32b9e72d2987fd3
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>
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.
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.
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., 51 Franklin St, Fifth Floor,
18 * Boston, MA 02110-1301 USA.
21 #ifndef __EGG_TRAY_ICON_H__
22 #define __EGG_TRAY_ICON_H__
24 #include <config.h>
26 #include <gtk/gtkplug.h>
27 #ifdef GDK_WINDOWING_X11
28 #include <gdk/gdkx.h>
29 #endif
30 #ifdef HAVE_NOTIFY
31 #include <libnotify/notify.h>
32 #endif
34 G_BEGIN_DECLS
36 #define EGG_TYPE_TRAY_ICON (egg_tray_icon_get_type ())
37 #define EGG_TRAY_ICON(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), EGG_TYPE_TRAY_ICON, EggTrayIcon))
38 #define EGG_TRAY_ICON_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), EGG_TYPE_TRAY_ICON, EggTrayIconClass))
39 #define EGG_IS_TRAY_ICON(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), EGG_TYPE_TRAY_ICON))
40 #define EGG_IS_TRAY_ICON_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), EGG_TYPE_TRAY_ICON))
41 #define EGG_TRAY_ICON_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), EGG_TYPE_TRAY_ICON, EggTrayIconClass))
43 typedef struct _EggTrayIcon EggTrayIcon;
44 typedef struct _EggTrayIconClass EggTrayIconClass;
45 #ifdef HAVE_NOTIFY
46 typedef struct _Notify Notify;
47 #endif
49 struct _EggTrayIcon
51 GtkPlug parent_instance;
53 guint stamp;
55 #ifdef GDK_WINDOWING_X11
56 Atom selection_atom;
57 Atom manager_atom;
58 Atom system_tray_opcode_atom;
59 Atom orientation_atom;
60 Window manager_window;
61 #endif
62 GtkOrientation orientation;
63 #ifdef HAVE_NOTIFY
64 Notify *notify;
65 #endif
68 struct _EggTrayIconClass
70 GtkPlugClass parent_class;
73 GType egg_tray_icon_get_type (void);
75 EggTrayIcon *egg_tray_icon_new_for_screen (GdkScreen *screen,
76 const gchar *name);
78 EggTrayIcon *egg_tray_icon_new (const gchar *name);
80 guint egg_tray_icon_send_message (EggTrayIcon *icon,
81 gint timeout,
82 const char *message,
83 gint len);
84 void egg_tray_icon_cancel_message (EggTrayIcon *icon,
85 guint id);
87 gboolean egg_tray_icon_have_manager (EggTrayIcon *icon);
89 void egg_tray_icon_notify (EggTrayIcon *icon,
90 guint timeout,
91 const char *primary,
92 GtkWidget *msgicon,
93 const char *secondary);
95 GtkOrientation egg_tray_icon_get_orientation (EggTrayIcon *icon);
97 G_END_DECLS
99 #endif /* __EGG_TRAY_ICON_H__ */