10a6e044f5771503089d919a0be2171d6742923d
[lxde/lxpanel.git] / src / ev.h
1 /*
2 * fb-background-monitor.h:
3 *
4 * Copyright (C) 2001, 2002 Ian McKellar <yakk@yakk.net>
5 * 2002 Sun Microsystems, Inc.
6 *
7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Library General Public
9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version.
11 *
12 * This library is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Library General Public License for more details.
16 *
17 * You should have received a copy of the GNU Library General Public
18 * License along with this library; if not, write to the
19 * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
20 * Boston, MA 02110-1301, USA.
21 *
22 * Authors:
23 * Ian McKellar <yakk@yakk.net>
24 * Mark McLoughlin <mark@skynet.ie>
25 */
26
27 #ifndef __FB_EV_H__
28 #define __FB_EV_H__
29
30 /* FIXME: this needs to be made multiscreen aware
31 * panel_bg_get should take
32 * a GdkScreen argument.
33 */
34
35 #include <glib.h>
36 #include <glib-object.h>
37 #include <gtk/gtk.h>
38 #include <gdk/gdkx.h>
39
40 #define FB_TYPE_EV (fb_ev_get_type ())
41 #define FB_EV(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), \
42 FB_TYPE_EV, \
43 FbEv))
44 #define FB_EV_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), \
45 FB_TYPE_EV, \
46 FbEvClass))
47 #define FB_IS_EV(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), \
48 FB_TYPE_EV))
49 #define FB_IS_EV_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), \
50 FB_TYPE_EV))
51 #define FB_EV_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), \
52 FB_TYPE_EV, \
53 FbEvClass))
54
55 typedef struct _FbEvClass FbEvClass;
56 typedef struct _FbEv FbEv;
57 enum {
58 EV_CURRENT_DESKTOP,
59 EV_NUMBER_OF_DESKTOPS,
60 EV_DESKTOP_NAMES,
61 EV_ACTIVE_WINDOW,
62 EV_DESTROY_WINDOW,
63 EV_CLIENT_LIST_STACKING,
64 EV_CLIENT_LIST,
65 LAST_SIGNAL
66 };
67
68 GType fb_ev_get_type (void);
69 FbEv *fb_ev_new(void);
70 void fb_ev_notify_changed_ev(FbEv *ev);
71 void fb_ev_emit(FbEv *ev, int signal);
72 void fb_ev_emit_destroy(FbEv *ev, Window win);
73
74 extern int fb_ev_current_desktop(FbEv *ev);
75 extern int fb_ev_number_of_desktops(FbEv *ev);
76 extern Window *fb_ev_active_window(FbEv *ev);
77 extern Window *fb_ev_client_list(FbEv *ev);
78 extern Window *fb_ev_client_list_stacking(FbEv *ev);
79
80 /* it is defined in the panel.c */
81 extern FbEv *fbev;
82
83 #endif /* __FB_EV_H__ */