Krolyxon
Commit 6d3bbc6

Branches

Refs →

nsxivtypes.h

84 lines · 1.5 KB · Objective-C

1/* Copyright 2011 Bert Muennich
2 *
3 * This file is part of sxiv.
4 *
5 * sxiv is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published
7 * by the Free Software Foundation; either version 2 of the License,
8 * or (at your option) any later version.
9 *
10 * sxiv 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 sxiv. If not, see <http://www.gnu.org/licenses/>.
17 */
18
19#ifndef TYPES_H
20#define TYPES_H
21
22#undef bool
23#undef false
24#undef true
25
26typedef enum {
27 false,
28 true
29} bool;
30
31typedef enum {
32 BO_BIG_ENDIAN,
33 BO_LITTLE_ENDIAN
34} byteorder_t;
35
36typedef enum {
37 MODE_IMAGE,
38 MODE_THUMB
39} appmode_t;
40
41typedef enum {
42 DIR_LEFT,
43 DIR_RIGHT,
44 DIR_UP,
45 DIR_DOWN
46} direction_t;
47
48typedef enum {
49 FLIP_HORIZONTAL,
50 FLIP_VERTICAL
51} flipdir_t;
52
53typedef enum {
54 SCALE_DOWN,
55 SCALE_FIT,
56 SCALE_WIDTH,
57 SCALE_HEIGHT,
58 SCALE_ZOOM
59} scalemode_t;
60
61typedef enum {
62 CURSOR_ARROW,
63 CURSOR_NONE,
64 CURSOR_HAND,
65 CURSOR_WATCH
66} cursor_t;
67
68typedef struct {
69 const char *name; /* as given by user */
70 const char *path; /* always absolute */
71 const char *base;
72 bool loaded;
73} fileinfo_t;
74
75/* timeouts in milliseconds: */
76enum {
77 TO_REDRAW_RESIZE = 75,
78 TO_REDRAW_THUMBS = 200,
79 TO_CURSOR_HIDE = 1200
80};
81
82typedef void (*timeout_f)(void);
83
84#endif /* TYPES_H */