Krolyxon
Commit f795273

Branches

Refs →

nsxivtypes.h

86 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,
36 DIR_RIGHT,
37 DIR_UP,
38 DIR_DOWN
39} direction_t;
40
41typedef enum {
42 DEGREE_0 = 0,
43 DEGREE_90 = 1,
44 DEGREE_180 = 2,
45 DEGREE_270 = 3
46} degree_t;
47
48typedef enum {
49 FLIP_NONE = 0,
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 struct {
70 const char *name; /* as given by user */
71 const char *path; /* always absolute */
72 const char *base;
73 bool loaded;
74 bool marked;
75} fileinfo_t;
76
77/* timeouts in milliseconds: */
78enum {
79 TO_REDRAW_RESIZE = 75,
80 TO_REDRAW_THUMBS = 200,
81 TO_CURSOR_HIDE = 1200
82};
83
84typedef void (*timeout_f)(void);
85
86#endif /* TYPES_H */