Krolyxon
Commit 1c68a34

Branches

Refs →

nsxivimage.h

67 lines · 1.6 KB · Objective-C

1/* sxiv: image.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
5 * modify it under the terms of the GNU General Public License
6 * as published by the Free Software Foundation; either version 2
7 * of the License, or (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., 51 Franklin Street, 5th Floor, Boston, MA 02110-1301, USA.
17 */
18
19#ifndef IMAGE_H
20#define IMAGE_H
21
22#include <Imlib2.h>
23
24#include "types.h"
25#include "window.h"
26
27typedef struct {
28 Imlib_Image *im;
29
30 float zoom;
31 scalemode_t scalemode;
32
33 unsigned char re;
34 unsigned char checkpan;
35 unsigned char aa;
36 unsigned char alpha;
37
38 int x;
39 int y;
40 int w;
41 int h;
42} img_t;
43
44void img_init(img_t*, win_t*);
45
46int img_load(img_t*, const fileinfo_t*);
47void img_close(img_t*, int);
48
49void img_render(img_t*, win_t*);
50
51int img_fit_win(img_t*, win_t*);
52int img_center(img_t*, win_t*);
53
54int img_zoom(img_t*, win_t*, float);
55int img_zoom_in(img_t*, win_t*);
56int img_zoom_out(img_t*, win_t*);
57
58int img_move(img_t*, win_t*, int, int);
59int img_pan(img_t*, win_t*, direction_t, int);
60int img_pan_edge(img_t*, win_t*, direction_t);
61
62void img_rotate_left(img_t*, win_t*);
63void img_rotate_right(img_t*, win_t*);
64
65void img_toggle_antialias(img_t*);
66
67#endif /* IMAGE_H */