0.9.0claws35
[claws.git] / src / plugins / trayicon / libeggtrayicon / eggtrayicon.h
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 __EGG_TRAY_ICON_H__
22 #define __EGG_TRAY_ICON_H__
23
24 #include "gtkplugxembed.h"
25 #include <gdk/gdkx.h>
26
27 #ifdef __cplusplus
28 extern "C" {
29 #endif /* __cplusplus */
30
31 #define EGG_TYPE_TRAY_ICON              (egg_tray_icon_get_type ())
32 #define EGG_TRAY_ICON(obj)              (GTK_CHECK_CAST ((obj), EGG_TYPE_TRAY_ICON, EggTrayIcon))
33 #define EGG_TRAY_ICON_CLASS(klass)      (GTK_CHECK_CLASS_CAST ((klass), EGG_TYPE_TRAY_ICON, EggTrayIconClass))
34 #define EGG_IS_TRAY_ICON(obj)           (GTK_CHECK_TYPE ((obj), EGG_TYPE_TRAY_ICON))
35 //#define EGG_IS_TRAY_ICON_CLASS(klass) (GTK_TYPE_CHECK_CLASS_TYPE ((klass), EGG_TYPE_TRAY_ICON))
36 //#define EGG_TRAY_ICON_GET_CLASS(obj)  (GTK_TYPE_INSTANCE_GET_CLASS ((obj), EGG_TYPE_TRAY_ICON, EggTrayIconClass))
37         
38 typedef struct _EggTrayIcon       EggTrayIcon;
39 typedef struct _EggTrayIconClass  EggTrayIconClass;
40
41 struct _EggTrayIcon
42 {
43   GtkPlugXEmbed parent_instance;
44
45   guint stamp;
46   
47   Atom selection_atom;
48   Atom manager_atom;
49   Atom system_tray_opcode_atom;
50   Window manager_window;
51 };
52
53 struct _EggTrayIconClass
54 {
55   GtkPlugXEmbedClass parent_class;
56 };
57
58 GtkType      egg_tray_icon_get_type       (void);
59
60 EggTrayIcon *
61 egg_tray_icon_new_for_xscreen (Screen *xscreen, const char *name);
62 #if EGG_TRAY_ENABLE_MULTIHEAD
63 EggTrayIcon *egg_tray_icon_new_for_screen (GdkScreen   *screen,
64                                            const gchar *name);
65 #endif
66
67 EggTrayIcon *egg_tray_icon_new            (const gchar *name);
68
69 guint        egg_tray_icon_send_message   (EggTrayIcon *icon,
70                                            gint         timeout,
71                                            const char  *message,
72                                            gint         len);
73 void         egg_tray_icon_cancel_message (EggTrayIcon *icon,
74                                            guint        id);
75
76
77                                             
78 #ifdef __cplusplus
79 }
80 #endif /* __cplusplus */
81
82 #endif /* __EGG_TRAY_ICON_H__ */