fix the ultimate bug when restarting awesome, client misdisplayed
[awesome.git] / client.h
blobb2f3b710d721ff016f2149770954e2f6f1f1e592
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 "config.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 Bool unmapped;
42 long flags;
43 int border, oldborder;
44 Bool isbanned, isfixed, ismax, isfloating, wasfloating;
45 Bool *tags;
46 Client *next;
47 Client *prev;
48 Client *snext;
49 Window win;
50 /** Client display */
51 Display * display;
52 /** Client screen */
53 int screen;
54 /** First time viewed on new layout */
55 Bool ftview;
58 void attach(Client *); /* attaches c to global client list */
59 void ban(Client *); /* bans c */
60 void configure(Client *); /* send synthetic configure event */
61 void detach(Client *); /* detaches c from global client list */
62 void focus(Display *, DC *, Client *, Bool, awesome_config *); /* focus c if visible && !NULL, or focus top visible */
63 void manage(Display *, DC *, Window, XWindowAttributes *, awesome_config *);
64 void resize(Client *, int, int, int, int, Bool); /* resize with given coordinates c */
65 void unban(Client *); /* unbans c */
66 void unmanage(Client *, DC *, long, awesome_config *); /* unmanage c */
67 void updatesizehints(Client *); /* update the size hint variables of c */
68 void updatetitle(Client *); /* update the name of c */
69 void saveprops(Client * c, int); /* saves client properties */
70 void set_shape(Client *);
71 void uicb_killclient(Display *, DC *, awesome_config *, const char *); /* kill client */
72 void uicb_moveresize(Display *, DC *, awesome_config *, const char *); /* move and resize window */
73 void uicb_settrans(Display *, DC *, awesome_config *, const char *);
74 void uicb_setborder(Display *, DC *, awesome_config *, const char *);
76 #endif