1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
|
/*
* Matchbox Window Manager - A lightweight window manager not for the
* desktop.
*
* Authored By Matthew Allum <mallum@o-hand.com>
*
* Copyright (c) 2002, 2004 OpenedHand Ltd - http://o-hand.com
*
* SPDX-License-Identifier: GPL-2.0-or-later
*
*/
#ifndef _WM_H_
#define _WM_H_
#include "structs.h"
#include "stack.h"
#include "base_client.h"
#include "main_client.h"
#include "toolbar_client.h"
#include "dockbar_client.h"
#include "dialog_client.h"
#include "desktop_client.h"
#include "client_common.h"
#include "misc.h"
#include "ewmh.h"
#include "composite-engine.h"
#include "session.h"
#ifdef STANDALONE
#include "mbtheme-standalone.h"
#else
#include "mbtheme.h"
#endif
#include "keys.h"
/* Atoms */
#define WITHDRAW 1
#define FRAME 1
#define WINDOW 2
#define ChildMask (SubstructureRedirectMask|SubstructureNotifyMask)
#define ButtonMask (ButtonPressMask|ButtonReleaseMask)
#define MouseMask (ButtonMask|PointerMotionMask)
#define KeyMask (KeyPressMask|KeyReleaseMask)
Wm
*wm_new(int argc, char **argv);
void
wm_usage(char *progname);
void
wm_load_config(Wm *w, int *argc, char *argv[]);
void
wm_init_existing(Wm *w);
/* events */
void
wm_event_loop(Wm* w);
void
wm_handle_button_event(Wm *w, XButtonEvent *e);
void
wm_handle_keypress(Wm *w, XKeyEvent *e);
void
wm_handle_map_request(Wm *w, XMapRequestEvent *e);
void
wm_handle_unmap_event(Wm *w, XUnmapEvent *e);
void
wm_handle_expose_event(Wm *w, XExposeEvent *e);
void
wm_handle_configure_request(Wm *w, XConfigureRequestEvent *e);
void
wm_handle_configure_notify(Wm *w, XConfigureEvent *e);
void
wm_handle_destroy_event(Wm *w, XDestroyWindowEvent *e);
void
wm_handle_client_message(Wm *w, XClientMessageEvent *e);
void
wm_handle_property_change(Wm *w, XPropertyEvent *e);
void
wm_handle_enter_notify(Wm *w, XEnterWindowEvent *e);
Client *
wm_find_client(Wm *w, Window win, int mode);
Client *
wm_make_new_client(Wm *w, Window win);
void
wm_remove_client(Wm *w, Client *c);
void
wm_activate_client(Client *c);
void
wm_lowlight(Wm *w, Client *c);
void
wm_update_layout(Wm *w, Client *c, signed int amount);
int
wm_get_offsets_size(Wm* w,
int wanted_direction,
Client* ignore_client,
Bool include_toolbars
);
void
wm_set_cursor_visibility(Wm *w, Bool visible);
Client * /* Returns either desktop or main app client */
wm_get_visible_main_client(Wm *w);
void
wm_toggle_desktop(Wm *w);
Client
*wm_get_desktop(Wm *w);
#ifdef USE_LIBSN
void wm_sn_cycle_remove(Wm *w, Window xid);
#endif
#ifdef USE_GCONF
void
gconf_key_changed_callback (GConfClient *client,
guint cnxn_id,
GConfEntry *entry,
gpointer user_data);
#endif
#endif
|