Krolyxon
Commit d0ba2c5

Branches

Refs →

nsxivtypes.h

85 lines · 1.6 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#include <stdbool.h>
23
24typedef enum {
25 BO_BIG_ENDIAN,
26 BO_LITTLE_ENDIAN
27} byteorder_t;
28
29typedef enum {
30 MODE_IMAGE,
31 MODE_THUMB
32} appmode_t;
33
34typedef enum {
35 DIR_LEFT = 1,
36 DIR_RIGHT = 2,
37 DIR_UP = 4,
38 DIR_DOWN = 8
39} direction_t;
40
41typedef enum {
42 DEGREE_90 = 1,
43 DEGREE_180 = 2,
44 DEGREE_270 = 3
45} degree_t;
46
47typedef enum {
48 FLIP_HORIZONTAL = 1,
49 FLIP_VERTICAL = 2
50} flipdir_t;
51
52typedef enum {
53 SCALE_DOWN,
54 SCALE_FIT,
55 SCALE_WIDTH,
56 SCALE_HEIGHT,
57 SCALE_ZOOM
58} scalemode_t;
59
60typedef enum {
61 CURSOR_ARROW,
62 CURSOR_NONE,
63 CURSOR_HAND,
64 CURSOR_WATCH
65} cursor_t;
66
67typedef struct {
68 const char *name; /* as given by user */
69 const char *path; /* always absolute */
70 const char *base;
71 bool loaded;
72 bool marked;
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 TO_DOUBLE_CLICK = 300
81};
82
83typedef void (*timeout_f)(void);
84
85#endif /* TYPES_H */