initial release
[skippy-xd] / mainwin.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_MAINWIN_H
21 #define SKIPPY_MAINWIN_H
22
23 struct _Tooltip;
24
25 struct _MainWin
26 {
27         Display *dpy;
28         int screen;
29         Visual *visual;
30         Colormap colormap;
31         int depth;
32         Window root;
33         int damage_event_base;
34         
35         int poll_time;
36         Bool lazy_trans;
37
38         Imlib_Image img_p, img_l;
39         int gquality;
40
41         Window window;
42         Picture background;
43         Pixmap bg_pixmap;
44         int x, y;
45         unsigned int width, height, distance;
46         XRenderPictFormat *format;
47         XTransform transform;
48         
49         XRenderColor normalTint, highlightTint;
50         Pixmap normalPixmap, highlightPixmap;
51         Picture normalPicture, highlightPicture;
52         
53         ClientWin *pressed, *focus;
54         dlist *cod;
55         struct _Tooltip *tooltip;
56         
57         KeyCode key_act, key_up, key_down, key_left, key_right, key_enter, key_space, key_q, key_f5, key_f6, key_f7, key_f8, key_escape;
58         
59 #ifdef XINERAMA
60         int xin_screens;
61         XineramaScreenInfo *xin_info, *xin_active;
62 #endif /* XINERAMA */
63 };
64 typedef struct _MainWin MainWin;
65
66 MainWin *mainwin_create(Display *, dlist *config);
67 void mainwin_destroy(MainWin *);
68 void mainwin_map(MainWin *);
69 void mainwin_unmap(MainWin *);
70 int mainwin_handle(MainWin *, XEvent *);
71 int load_image (MainWin *mw, Bool rotate, Imlib_Image rootimg);
72 void mainwin_update_background(MainWin *mw);
73 void mainwin_update(MainWin *mw);
74 void mainwin_transform(MainWin *mw, float f);
75 int event_base;
76
77
78 #endif /* SKIPPY_MAINWIN_H */