Krolyxon
Commit 17e2a79

Branches

Refs →

nsxivwindow.h

62 lines · 1.4 KB · Objective-C

1/* sxiv: window.h
2 * Copyright (c) 2011 Bert Muennich <muennich at informatik.hu-berlin.de>
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
17 */
18
19#ifndef WINDOW_H
20#define WINDOW_H
21
22#include <X11/Xlib.h>
23
24#define CLEANMASK(mask) ((mask) & ~LockMask)
25
26typedef struct win_env_s {
27 Display *dpy;
28 int scr;
29 int scrw, scrh;
30 Visual *vis;
31 Colormap cmap;
32 int depth;
33} win_env_t;
34
35typedef struct win_s {
36 Window xwin;
37 win_env_t env;
38
39 unsigned long bgcol;
40 Pixmap pm;
41
42 int w;
43 int h;
44 int x;
45 int y;
46
47 int bw;
48 int fullscreen;
49} win_t;
50
51void win_open(win_t*);
52void win_close(win_t*);
53
54void win_set_title(win_t*, const char*);
55
56int win_configure(win_t*, XConfigureEvent*);
57void win_toggle_fullscreen(win_t*);
58
59void win_clear(win_t*);
60void win_draw(win_t*);
61
62#endif /* WINDOW_H */