Krolyxon
Commit e574a6d

Branches

Refs →

nsxivtypes.h

90 lines · 1.7 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 enum {
68 FF_WARN = 1,
69 FF_MARK = 2,
70 FF_TN_INIT = 4
71} fileflags_t;
72
73typedef struct {
74 const char *name; /* as given by user */
75 const char *path; /* always absolute */
76 const char *base;
77 fileflags_t flags;
78} fileinfo_t;
79
80/* timeouts in milliseconds: */
81enum {
82 TO_REDRAW_RESIZE = 75,
83 TO_REDRAW_THUMBS = 200,
84 TO_CURSOR_HIDE = 1200,
85 TO_DOUBLE_CLICK = 300
86};
87
88typedef void (*timeout_f)(void);
89
90#endif /* TYPES_H */