1
/* matchbox - a lightweight window manager
3
Copyright 2002 Matthew Allum
5
This program is free software; you can redistribute it and/or modify
6
it under the terms of the GNU General Public License as published by
7
the Free Software Foundation; either version 2, or (at your option)
10
This program is distributed in the hope that it will be useful,
11
but WITHOUT ANY WARRANTY; without even the implied warranty of
12
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
GNU General Public License for more details.
24
#include <X11/Xutil.h>
25
#include <X11/Xatom.h>
26
#include <X11/Xresource.h>
28
#include <X11/keysym.h>
29
#include <X11/cursorfont.h>
32
#include <X11/Xft/Xft.h>
37
#include "base_client.h"
38
#include "main_client.h"
39
#include "docked_client.h"
40
#include "toolbar_client.h"
41
#include "dockbar_client.h"
42
#include "dialog_client.h"
43
#include "client_common.h"
46
#define WINDOW_TYPE_TOOLBAR 0
47
#define WINDOW_TYPE_DOCK 1
48
#define WINDOW_TYPE_DIALOG 2
49
#define REC_PROTOCOLS 3
57
#define ChildMask (SubstructureRedirectMask|SubstructureNotifyMask)
58
#define ButtonMask (ButtonPressMask|ButtonReleaseMask)
59
#define MouseMask (ButtonMask|PointerMotionMask)
60
#define KeyMask (KeyPressMask|KeyReleaseMask)
62
wm *wm_new(int argc, char **argv);
63
void wm_usage(char *progname);
64
void wm_load_config(wm *w, int *argc, char *argv[]);
65
client *wm_find_client(wm *w, Window win, int mode);
68
void wm_event_loop(Wm* w);
69
void wm_handle_button_event(Wm *w, XButtonEvent *e);
70
void wm_handle_keypress(Wm *w, XKeyEvent *e);
71
void wm_handle_map_request(Wm *w, XMapRequestEvent *e);
72
void wm_handle_unmap_event(Wm *w, XUnmapEvent *e);
73
void wm_handle_expose_event(Wm *w, XExposeEvent *e);
74
void wm_handle_configure_request(Wm *w, XConfigureRequestEvent *e);
75
void wm_handle_configure_notify(Wm *w, XConfigureEvent *e);
76
void wm_handle_destroy_event(Wm *w, XDestroyWindowEvent *e);
77
void wm_handle_client_message(Wm *w, XClientMessageEvent *e);
78
void wm_handle_property_change(Wm *w, XPropertyEvent *e);
80
Client *wm_make_new_client(Wm *w, Window win);
81
void wm_restack(Wm *w, Client *c, signed int amount);
82
void wm_remove_client(Wm *w, Client *c);
83
int wm_total_toolbar_height(Client *c);
84
void wm_gravitate(Client *c, int multiplier); /* to be moved */
85
void wm_init_existing(Wm *w);