Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 86 lines (67 sloc) 2.063 kB
e7bc3bb @muennich Non-working skeleton
authored
1 /* sxiv: window.h
d407dd6 @muennich Already in the year 2012
authored
2 * Copyright (c) 2012 Bert Muennich <be.muennich at googlemail.com>
e7bc3bb @muennich Non-working skeleton
authored
3 *
d585b86 @muennich Reformated license header
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
authored
8 *
d585b86 @muennich Reformated license header
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
authored
13 *
d585b86 @muennich Reformated license header
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
authored
17 */
18
19 #ifndef WINDOW_H
20 #define WINDOW_H
21
49a69a3 @muennich Added win_open & win_close
authored
22 #include <X11/Xlib.h>
23
a271e16 @muennich Reduced usage of preprocessor macros
authored
24 #include "types.h"
f47092c @muennich Complete mouse support
authored
25
b752d5c @muennich Added symbol BAR_SEPARATOR
authored
26 #define BAR_SEPARATOR " | "
27
955c39a @muennich Shorter typedefs
authored
28 typedef struct {
fb6411a @muennich Encapsulate window environment in win_env_t
authored
29 Display *dpy;
30 int scr;
31 int scrw, scrh;
32 Visual *vis;
33 Colormap cmap;
34 int depth;
35 } win_env_t;
36
955c39a @muennich Shorter typedefs
authored
37 typedef struct {
49a69a3 @muennich Added win_open & win_close
authored
38 Window xwin;
fb6411a @muennich Encapsulate window environment in win_env_t
authored
39 win_env_t env;
2b1c088 @muennich Implemented fullscreen mode
authored
40
d982b06 @muennich White background for images with alpha
authored
41 unsigned long white;
2b1c088 @muennich Implemented fullscreen mode
authored
42 unsigned long bgcol;
3238ef6 @muennich Fixed issue #41, added WIN_FS_COLOR to config.h
authored
43 unsigned long fscol;
ef24ded @muennich Highlight selected thumbnail
authored
44 unsigned long selcol;
b845827 @muennich Added text bar on bottom of window
authored
45 unsigned long barbgcol;
46 unsigned long barfgcol;
c7860b6 @muennich Stricter object encapsulation
authored
47 Pixmap pm;
49a69a3 @muennich Added win_open & win_close
authored
48
e7bc3bb @muennich Non-working skeleton
authored
49 int x;
50 int y;
229830a @muennich Replace -w with well-known geometry option
authored
51 unsigned int w;
b418df7 @muennich Removed unneeded members from img type
authored
52 unsigned int h; /* = win height - bar height */
b845827 @muennich Added text bar on bottom of window
authored
53 unsigned int barh;
229830a @muennich Replace -w with well-known geometry option
authored
54 unsigned int bw;
b2a2a62 @muennich Added own bool type
authored
55
56 bool fullscreen;
b845827 @muennich Added text bar on bottom of window
authored
57
58 const char *lbar;
59 const char *rbar;
e7bc3bb @muennich Non-working skeleton
authored
60 } win_t;
61
d731741 @muennich Handle WM_DELETE_WINDOW messages correctly, thanks to fungt
authored
62 extern Atom wm_delete_win;
63
d15264e @muennich Remove invalid images when loading them; refactorings
authored
64 void win_init(win_t*);
47d107e @muennich React to ConfigureNotify
authored
65 void win_open(win_t*);
66 void win_close(win_t*);
67
b2a2a62 @muennich Added own bool type
authored
68 bool win_configure(win_t*, XConfigureEvent*);
69 bool win_moveresize(win_t*, int, int, unsigned int, unsigned int);
8339bb7 @muennich New key mapping: W, resize window to fit image
authored
70
2b1c088 @muennich Implemented fullscreen mode
authored
71 void win_toggle_fullscreen(win_t*);
c666d30 @muennich Added it_toggle_bar command; default mapping: XK_b
authored
72 void win_toggle_bar(win_t*);
029e120 @muennich No more expose handling
authored
73
79c7e61 @muennich Render image on window
authored
74 void win_clear(win_t*);
55659ff @muennich Use imlib-handles in thumbs.c instead of pixmaps
authored
75 void win_draw(win_t*);
b2a2a62 @muennich Added own bool type
authored
76 void win_draw_rect(win_t*, Pixmap, int, int, int, int, bool, int,
d982b06 @muennich White background for images with alpha
authored
77 unsigned long);
49a69a3 @muennich Added win_open & win_close
authored
78
ed2c9f7 @muennich Display full name in info bar, if there is enough space
authored
79 int win_textwidth(const char*, unsigned int, bool);
80
8339bb7 @muennich New key mapping: W, resize window to fit image
authored
81 void win_set_title(win_t*, const char*);
b845827 @muennich Added text bar on bottom of window
authored
82 void win_set_bar_info(win_t*, const char*, const char*);
a271e16 @muennich Reduced usage of preprocessor macros
authored
83 void win_set_cursor(win_t*, cursor_t);
c52c4fa @muennich Mouse-panning while pressing button2
authored
84
e7bc3bb @muennich Non-working skeleton
authored
85 #endif /* WINDOW_H */
Something went wrong with that request. Please try again.