max layout is now Xinerama aware
[awesome.git] / client.h
blobe0e0af7ddc2f978df12573eca5f40ac55e7cd7a0
1 /*
2 * client.h - client management header
3 *
4 * Copyright © 2007 Julien Danjou <julien@danjou.info>
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License along
17 * with this program; if not, write to the Free Software Foundation, Inc.,
18 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
22 #ifndef AWESOME_CLIENT_H
23 #define AWESOME_CLIENT_H
25 #include "common.h"
27 /** Mask shorthands, used in event.c and client.c */
28 #define BUTTONMASK (ButtonPressMask | ButtonReleaseMask)
30 typedef struct Client Client;
31 struct Client
33 /** Client name */
34 char name[256];
35 /** Window geometry */
36 int x, y, w, h;
37 /** Real window geometry for floating */
38 int rx, ry, rw, rh;
39 int basew, baseh, incw, inch, maxw, maxh, minw, minh;
40 int minax, maxax, minay, maxay;
41 /** True if client is unmapped */
42 Bool unmapped;
43 long flags;
44 int border, oldborder;
45 Bool isbanned, isfixed, ismax, isfloating, wasfloating;
46 /** Tags for the client */
47 Bool *tags;
48 /** Next client */
49 Client *next;
50 /** Previous client */
51 Client *prev;
52 Client *snext;
53 /** Window of the client */
54 Window win;
55 /** Client display */
56 Display *display;
57 /** Client screen (Zaphod) */
58 int screen;
59 /** First time viewed on new layout */
60 Bool ftview;
63 void attach(Client *); /* attaches c to global client list */
64 void ban(Client *); /* bans c */
65 void configure(Client *); /* send synthetic configure event */
66 void detach(Client *); /* detaches c from global client list */
67 void focus(Display *, DC *, Client *, Bool, awesome_config *); /* focus c if visible && !NULL, or focus top visible */
68 void manage(Display *, DC *, Window, XWindowAttributes *, awesome_config *);
69 void resize(Client *, int, int, int, int, Bool); /* resize with given coordinates c */
70 void unban(Client *); /* unbans c */
71 void unmanage(Client *, DC *, long, awesome_config *); /* unmanage c */
72 void updatesizehints(Client *); /* update the size hint variables of c */
73 void updatetitle(Client *); /* update the name of c */
74 void saveprops(Client * c, int); /* saves client properties */
75 void set_shape(Client *);
76 UICB_PROTO(uicb_killclient);
77 UICB_PROTO(uicb_moveresize);
78 UICB_PROTO(uicb_settrans);
79 UICB_PROTO(uicb_setborder);
80 UICB_PROTO(uicb_swapnext);
81 UICB_PROTO(uicb_swapprev);
83 #endif