1 | /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ |
---|
2 | /* na-tray-manager.h |
---|
3 | * Copyright (C) 2002 Anders Carlsson <andersca@gnu.org> |
---|
4 | * Copyright (C) 2003-2006 Vincent Untz |
---|
5 | * |
---|
6 | * This library is free software; you can redistribute it and/or |
---|
7 | * modify it under the terms of the GNU Lesser General Public |
---|
8 | * License as published by the Free Software Foundation; either |
---|
9 | * version 2 of the License, or (at your option) any later version. |
---|
10 | * |
---|
11 | * This library is distributed in the hope that it will be useful, |
---|
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
---|
14 | * Lesser General Public License for more details. |
---|
15 | * |
---|
16 | * You should have received a copy of the GNU Lesser General Public |
---|
17 | * License along with this library; if not, write to the |
---|
18 | * Free Software Foundation, Inc., 59 Temple Place - Suite 330, |
---|
19 | * Boston, MA 02111-1307, USA. |
---|
20 | * |
---|
21 | * Used to be: eggtraymanager.h |
---|
22 | */ |
---|
23 | |
---|
24 | #ifndef __NA_TRAY_MANAGER_H__ |
---|
25 | #define __NA_TRAY_MANAGER_H__ |
---|
26 | |
---|
27 | #include <gtk/gtk.h> |
---|
28 | #ifdef GDK_WINDOWING_X11 |
---|
29 | #include <gdk/gdkx.h> |
---|
30 | #endif |
---|
31 | |
---|
32 | G_BEGIN_DECLS |
---|
33 | |
---|
34 | #define NA_TYPE_TRAY_MANAGER (na_tray_manager_get_type ()) |
---|
35 | #define NA_TRAY_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), NA_TYPE_TRAY_MANAGER, NaTrayManager)) |
---|
36 | #define NA_TRAY_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), NA_TYPE_TRAY_MANAGER, NaTrayManagerClass)) |
---|
37 | #define NA_IS_TRAY_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), NA_TYPE_TRAY_MANAGER)) |
---|
38 | #define NA_IS_TRAY_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), NA_TYPE_TRAY_MANAGER)) |
---|
39 | #define NA_TRAY_MANAGER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), NA_TYPE_TRAY_MANAGER, NaTrayManagerClass)) |
---|
40 | |
---|
41 | typedef struct _NaTrayManager NaTrayManager; |
---|
42 | typedef struct _NaTrayManagerClass NaTrayManagerClass; |
---|
43 | typedef struct _NaTrayManagerChild NaTrayManagerChild; |
---|
44 | |
---|
45 | struct _NaTrayManager |
---|
46 | { |
---|
47 | GObject parent_instance; |
---|
48 | |
---|
49 | #ifdef GDK_WINDOWING_X11 |
---|
50 | GdkAtom selection_atom; |
---|
51 | Atom opcode_atom; |
---|
52 | #endif |
---|
53 | |
---|
54 | GtkWidget *invisible; |
---|
55 | GdkScreen *screen; |
---|
56 | GtkOrientation orientation; |
---|
57 | |
---|
58 | GList *messages; |
---|
59 | GHashTable *socket_table; |
---|
60 | }; |
---|
61 | |
---|
62 | struct _NaTrayManagerClass |
---|
63 | { |
---|
64 | GObjectClass parent_class; |
---|
65 | |
---|
66 | void (* tray_icon_added) (NaTrayManager *manager, |
---|
67 | NaTrayManagerChild *child); |
---|
68 | void (* tray_icon_removed) (NaTrayManager *manager, |
---|
69 | NaTrayManagerChild *child); |
---|
70 | |
---|
71 | void (* message_sent) (NaTrayManager *manager, |
---|
72 | NaTrayManagerChild *child, |
---|
73 | const gchar *message, |
---|
74 | glong id, |
---|
75 | glong timeout); |
---|
76 | |
---|
77 | void (* message_cancelled) (NaTrayManager *manager, |
---|
78 | NaTrayManagerChild *child, |
---|
79 | glong id); |
---|
80 | |
---|
81 | void (* lost_selection) (NaTrayManager *manager); |
---|
82 | }; |
---|
83 | |
---|
84 | GType na_tray_manager_get_type (void); |
---|
85 | |
---|
86 | gboolean na_tray_manager_check_running (GdkScreen *screen); |
---|
87 | NaTrayManager *na_tray_manager_new (void); |
---|
88 | gboolean na_tray_manager_manage_screen (NaTrayManager *manager, |
---|
89 | GdkScreen *screen); |
---|
90 | char *na_tray_manager_get_child_title (NaTrayManager *manager, |
---|
91 | NaTrayManagerChild *child); |
---|
92 | void na_tray_manager_set_orientation (NaTrayManager *manager, |
---|
93 | GtkOrientation orientation); |
---|
94 | GtkOrientation na_tray_manager_get_orientation (NaTrayManager *manager); |
---|
95 | |
---|
96 | G_END_DECLS |
---|
97 | |
---|
98 | #endif /* __NA_TRAY_MANAGER_H__ */ |
---|