cleanup
[awesome.git] / client.h
blob061239df8d5b908dda3e2496dffbda251c4d7372
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 /* mask shorthands, used in event.c and client.c */
26 #define BUTTONMASK (ButtonPressMask | ButtonReleaseMask)
28 #include "config.h"
30 typedef struct Client Client;
31 struct Client
33 char name[256];
34 int x, y, w, h;
35 int rx, ry, rw, rh; /* revert geometry */
36 int basew, baseh, incw, inch, maxw, maxh, minw, minh;
37 int minax, maxax, minay, maxay;
38 int unmapped;
39 long flags;
40 int border, oldborder;
41 Bool isbanned, isfixed, ismax, isfloating, wasfloating;
42 Bool *tags;
43 Client *next;
44 Client *prev;
45 Client *snext;
46 Window win;
47 Display * display;
48 int screen;
49 Bool ftview; /* first time viewed on new layout */
52 void attach(Client *); /* attaches c to global client list */
53 void ban(Client *); /* bans c */
54 void configure(Client *); /* send synthetic configure event */
55 void detach(Client *); /* detaches c from global client list */
56 void focus(Display *, int, DC *, Client *, Bool, awesome_config *); /* focus c if visible && !NULL, or focus top visible */
57 void manage(Display *, int, DC *, Window, XWindowAttributes *, awesome_config *); /* manage new client */
58 void resize(Client *, int, int, int, int, Bool); /* resize with given coordinates c */
59 void unban(Client *); /* unbans c */
60 void unmanage(Client *, DC *, long, awesome_config *); /* unmanage c */
61 void updatesizehints(Client *); /* update the size hint variables of c */
62 void updatetitle(Client *); /* update the name of c */
63 void saveprops(Client * c, int); /* saves client properties */
64 void set_shape(Client *);
65 void uicb_killclient(Display *, int, DC *, awesome_config *, const char *); /* kill client */
66 void uicb_moveresize(Display *, int, DC *, awesome_config *, const char *); /* move and resize window */
67 void uicb_settrans(Display *, int, DC *, awesome_config *, const char *);
69 #endif