Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 74 lines (58 sloc) 1.76 kb
e7bc3bb @muennich Non-working skeleton
muennich authored
1 /* sxiv: window.h
2 * Copyright (c) 2011 Bert Muennich <muennich at informatik.hu-berlin.de>
3 *
d585b86 @muennich Reformated license header
muennich authored
4 * This program is free software; you can redistribute it and/or modify it
5 * under the terms of the GNU General Public License as published by the
6 * Free Software Foundation; either version 2 of the License, or (at your
7 * option) any later version.
8763f69 @muennich Corrected FSF address in license headers
muennich authored
8 *
d585b86 @muennich Reformated license header
muennich authored
9 * This program is distributed in the hope that it will be useful, but
10 * WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * General Public License for more details.
8763f69 @muennich Corrected FSF address in license headers
muennich authored
13 *
d585b86 @muennich Reformated license header
muennich authored
14 * You should have received a copy of the GNU General Public License along
15 * with this program; if not, write to the Free Software Foundation, Inc.,
16 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
e7bc3bb @muennich Non-working skeleton
muennich authored
17 */
18
19 #ifndef WINDOW_H
20 #define WINDOW_H
21
49a69a3 @muennich Added win_open & win_close
muennich authored
22 #include <X11/Xlib.h>
23
a271e16 @muennich Reduced usage of preprocessor macros
muennich authored
24 #include "types.h"
f47092c @muennich Complete mouse support
muennich authored
25
955c39a @muennich Shorter typedefs
muennich authored
26 typedef struct {
fb6411a @muennich Encapsulate window environment in win_env_t
muennich authored
27 Display *dpy;
28 int scr;
29 int scrw, scrh;
30 Visual *vis;
31 Colormap cmap;
32 int depth;
33 } win_env_t;
34
955c39a @muennich Shorter typedefs
muennich authored
35 typedef struct {
49a69a3 @muennich Added win_open & win_close
muennich authored
36 Window xwin;
fb6411a @muennich Encapsulate window environment in win_env_t
muennich authored
37 win_env_t env;
2b1c088 @muennich Implemented fullscreen mode
muennich authored
38
d982b06 @muennich White background for images with alpha
muennich authored
39 unsigned long black;
40 unsigned long white;
2b1c088 @muennich Implemented fullscreen mode
muennich authored
41 unsigned long bgcol;
ef24ded @muennich Highlight selected thumbnail
muennich authored
42 unsigned long selcol;
c7860b6 @muennich Stricter object encapsulation
muennich authored
43 Pixmap pm;
49a69a3 @muennich Added win_open & win_close
muennich authored
44
e7bc3bb @muennich Non-working skeleton
muennich authored
45 int x;
46 int y;
229830a @muennich Replace -w with well-known geometry option
muennich authored
47 unsigned int w;
48 unsigned int h;
49 unsigned int bw;
b2a2a62 @muennich Added own bool type
muennich authored
50
51 bool fullscreen;
e7bc3bb @muennich Non-working skeleton
muennich authored
52 } win_t;
53
d731741 @muennich Handle WM_DELETE_WINDOW messages correctly, thanks to fungt
muennich authored
54 extern Atom wm_delete_win;
55
d15264e @muennich Remove invalid images when loading them; refactorings
muennich authored
56 void win_init(win_t*);
47d107e @muennich React to ConfigureNotify
muennich authored
57 void win_open(win_t*);
58 void win_close(win_t*);
59
b2a2a62 @muennich Added own bool type
muennich authored
60 bool win_configure(win_t*, XConfigureEvent*);
61 bool win_moveresize(win_t*, int, int, unsigned int, unsigned int);
8339bb7 @muennich New key mapping: W, resize window to fit image
muennich authored
62
2b1c088 @muennich Implemented fullscreen mode
muennich authored
63 void win_toggle_fullscreen(win_t*);
029e120 @muennich No more expose handling
muennich authored
64
79c7e61 @muennich Render image on window
muennich authored
65 void win_clear(win_t*);
55659ff @muennich Use imlib-handles in thumbs.c instead of pixmaps
muennich authored
66 void win_draw(win_t*);
b2a2a62 @muennich Added own bool type
muennich authored
67 void win_draw_rect(win_t*, Pixmap, int, int, int, int, bool, int,
d982b06 @muennich White background for images with alpha
muennich authored
68 unsigned long);
49a69a3 @muennich Added win_open & win_close
muennich authored
69
8339bb7 @muennich New key mapping: W, resize window to fit image
muennich authored
70 void win_set_title(win_t*, const char*);
a271e16 @muennich Reduced usage of preprocessor macros
muennich authored
71 void win_set_cursor(win_t*, cursor_t);
c52c4fa @muennich Mouse-panning while pressing button2
muennich authored
72
e7bc3bb @muennich Non-working skeleton
muennich authored
73 #endif /* WINDOW_H */
Something went wrong with that request. Please try again.