tsst
[skippy-xd] / clientwin.h
1 /* Skippy - Seduces Kids Into Perversion
2  *
3  * Copyright (C) 2004 Hyriand <hyriand@thegraveyard.org>
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 of the License, or
8  * (at your option) 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  * You should have received a copy of the GNU General Public License
16  * along with this program; if not, write to the Free Software
17  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
18  */
19
20 #ifndef SKIPPY_CLIENT_H
21 #define SKIPPY_CLIENT_H
22
23 struct _SkippyWindow {
24         Window window;
25         int x, y;
26         unsigned int width, height;
27         XRenderPictFormat *format;
28 };
29
30 typedef struct _SkippyWindow SkippyWindow;
31
32 struct _MainWin;
33 struct _ClientWin{
34         struct _MainWin *mainwin;
35         
36         SkippyWindow client;
37         SkippyWindow mini;
38         
39         Pixmap pixmap;
40         Picture origin, destination;
41         Damage damage;
42         float factor;
43         
44         int focused;
45         
46         Bool damaged;
47         /* XserverRegion repair; */
48         
49         /* These are virtual positions set by the layout routine */
50         int x, y;
51 };
52 typedef struct _ClientWin ClientWin;
53
54 int clientwin_validate_func(dlist *, void *);
55 int clientwin_sort_func(dlist *, dlist *, void *);
56 ClientWin *clientwin_create(struct _MainWin *, Window);
57 void clientwin_destroy(ClientWin *, Bool parentDestroyed);
58 void clientwin_move(ClientWin *, float, int, int);
59 void clientwin_map(ClientWin *);
60 void clientwin_unmap(ClientWin *);
61 int clientwin_handle(ClientWin *, XEvent *);
62 int clientwin_cmp_func(dlist *, void*);
63 void clientwin_update(ClientWin *cw);
64 int clientwin_check_group_leader_func(dlist *l, void *data);
65 void clientwin_render(ClientWin *);
66 void clientwin_schedule_repair(ClientWin *cw, XRectangle *area);
67 void clientwin_repair(ClientWin *cw);
68 int client_msg(Display *disp, Window win, char *msg, /* {{{ */
69         unsigned long data0, unsigned long data1,
70         unsigned long data2, unsigned long data3,
71         unsigned long data4);
72 int clientwin_backhome();
73
74 #endif /* SKIPPY_CLIENT_H */