Statistics
| Revision:

root / src / eggtrayicon.h @ 2022

History | View | Annotate | Download (2.6 kB)

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