File: wm.h

package info (click to toggle)
matchbox-window-manager 0.9.3-1
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 1,368 kB
  • ctags: 1,070
  • sloc: ansic: 13,441; sh: 794; xml: 489; makefile: 93
file content (155 lines) | stat: -rw-r--r-- 3,195 bytes parent folder | download
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
149
150
151
152
153
154
155
/* 
 *  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
 *
 *  This program is free software; you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation; either version 2, or (at your option)
 *  any later version.
 *
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 */

#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"

#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