~ubuntu-branches/ubuntu/intrepid/matchbox/intrepid

« back to all changes in this revision

Viewing changes to src/wm.h

  • Committer: Bazaar Package Importer
  • Author(s): Paul Hedderly
  • Date: 2002-03-18 14:02:52 UTC
  • Revision ID: james.westby@ubuntu.com-20020318140252-h2icfj2rv2vxsb3c
Tags: upstream-0.1.8
ImportĀ upstreamĀ versionĀ 0.1.8

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* matchbox - a lightweight window manager
 
2
 
 
3
   Copyright 2002 Matthew Allum
 
4
 
 
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)
 
8
   any later version.
 
9
 
 
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.
 
14
*/
 
15
 
 
16
#ifndef _WM_H_
 
17
#define _WM_H_
 
18
 
 
19
#include <stdio.h>
 
20
#include <stdlib.h>
 
21
#include <string.h>
 
22
#include <signal.h>
 
23
#include <X11/Xlib.h>
 
24
#include <X11/Xutil.h>
 
25
#include <X11/Xatom.h>
 
26
#include <X11/Xresource.h>
 
27
#include <X11/Xmd.h>
 
28
#include <X11/keysym.h>
 
29
#include <X11/cursorfont.h>
 
30
 
 
31
#ifdef USE_XFT
 
32
#include <X11/Xft/Xft.h>
 
33
#endif
 
34
 
 
35
#include "structs.h"
 
36
#include "theme.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"
 
44
#include "misc.h"
 
45
 
 
46
#define WINDOW_TYPE_TOOLBAR 0
 
47
#define WINDOW_TYPE_DOCK    1
 
48
#define WINDOW_TYPE_DIALOG  2
 
49
#define REC_PROTOCOLS       3
 
50
#define REC_KEY             4
 
51
 
 
52
#define WITHDRAW 1
 
53
 
 
54
#define FRAME  1
 
55
#define WINDOW 2
 
56
 
 
57
#define ChildMask (SubstructureRedirectMask|SubstructureNotifyMask)
 
58
#define ButtonMask (ButtonPressMask|ButtonReleaseMask)
 
59
#define MouseMask (ButtonMask|PointerMotionMask)
 
60
#define KeyMask (KeyPressMask|KeyReleaseMask)
 
61
 
 
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);
 
66
 
 
67
/* events */
 
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);
 
79
 
 
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);
 
86
 
 
87
#endif _WM_H_