Krolyxon
Commit 2c566c5

Branches

Refs →

nsxivtypes.h

92 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
24#define CLEANUP
25
26typedef enum {
27 BO_BIG_ENDIAN,
28 BO_LITTLE_ENDIAN
29} byteorder_t;
30
31typedef enum {
32 MODE_IMAGE,
33 MODE_THUMB
34} appmode_t;
35
36typedef enum {
37 DIR_LEFT = 1,
38 DIR_RIGHT = 2,
39 DIR_UP = 4,
40 DIR_DOWN = 8
41} direction_t;
42
43typedef enum {
44 DEGREE_90 = 1,
45 DEGREE_180 = 2,
46 DEGREE_270 = 3
47} degree_t;
48
49typedef enum {
50 FLIP_HORIZONTAL = 1,
51 FLIP_VERTICAL = 2
52} flipdir_t;
53
54typedef enum {
55 SCALE_DOWN,
56 SCALE_FIT,
57 SCALE_WIDTH,
58 SCALE_HEIGHT,
59 SCALE_ZOOM
60} scalemode_t;
61
62typedef enum {
63 CURSOR_ARROW,
64 CURSOR_NONE,
65 CURSOR_HAND,
66 CURSOR_WATCH
67} cursor_t;
68
69typedef enum {
70 FF_WARN = 1,
71 FF_MARK = 2,
72 FF_TN_INIT = 4
73} fileflags_t;
74
75typedef struct {
76 const char *name; /* as given by user */
77 const char *path; /* always absolute */
78 const char *base;
79 fileflags_t flags;
80} fileinfo_t;
81
82/* timeouts in milliseconds: */
83enum {
84 TO_REDRAW_RESIZE = 75,
85 TO_REDRAW_THUMBS = 200,
86 TO_CURSOR_HIDE = 1200,
87 TO_DOUBLE_CLICK = 300
88};
89
90typedef void (*timeout_f)(void);
91
92#endif /* TYPES_H */