nsxiv/types.h

101 lines
1.9 KiB
C
Raw Normal View History

2013-02-08 21:52:41 +01:00
/* Copyright 2011 Bert Muennich
*
* This file is part of sxiv.
*
* sxiv is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published
* by the Free Software Foundation; either version 2 of the License,
* or (at your option) any later version.
*
* sxiv is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with sxiv. If not, see <http://www.gnu.org/licenses/>.
*/
2011-07-22 14:49:06 +02:00
#ifndef TYPES_H
#define TYPES_H
#include <stdbool.h>
2011-09-11 21:01:24 +02:00
2017-05-17 15:51:11 +02:00
/*
* Annotation for functions called in cleanup().
* These functions are not allowed to call error(!0, ...) or exit().
*/
#define CLEANUP
typedef enum {
BO_BIG_ENDIAN,
BO_LITTLE_ENDIAN
} byteorder_t;
2011-07-22 14:49:06 +02:00
typedef enum {
2011-08-19 13:09:22 +02:00
MODE_IMAGE,
MODE_THUMB
2011-07-22 14:49:06 +02:00
} appmode_t;
typedef enum {
DIR_LEFT = 1,
DIR_RIGHT = 2,
DIR_UP = 4,
DIR_DOWN = 8
2011-07-22 14:49:06 +02:00
} direction_t;
2013-06-23 16:02:26 +02:00
typedef enum {
2013-08-10 15:55:18 +02:00
DEGREE_90 = 1,
DEGREE_180 = 2,
DEGREE_270 = 3
} degree_t;
2013-06-23 16:02:26 +02:00
typedef enum {
FLIP_HORIZONTAL = 1,
FLIP_VERTICAL = 2
2012-05-06 13:02:34 +02:00
} flipdir_t;
2011-07-22 14:49:06 +02:00
typedef enum {
SCALE_DOWN,
2011-07-22 14:49:06 +02:00
SCALE_FIT,
SCALE_WIDTH,
SCALE_HEIGHT,
2011-07-22 14:49:06 +02:00
SCALE_ZOOM
} scalemode_t;
typedef enum {
CURSOR_ARROW,
CURSOR_DRAG,
2017-10-05 12:30:31 +02:00
CURSOR_WATCH,
CURSOR_LEFT,
CURSOR_RIGHT,
2017-10-05 12:30:31 +02:00
CURSOR_NONE,
CURSOR_COUNT
2011-07-22 14:49:06 +02:00
} cursor_t;
typedef enum {
FF_WARN = 1,
FF_MARK = 2,
FF_TN_INIT = 4
} fileflags_t;
2011-08-18 00:38:55 +02:00
typedef struct {
2011-08-18 12:05:38 +02:00
const char *name; /* as given by user */
const char *path; /* always absolute */
2012-02-12 19:00:41 +01:00
const char *base;
fileflags_t flags;
2011-08-18 00:38:55 +02:00
} fileinfo_t;
/* timeouts in milliseconds: */
enum {
2011-09-02 04:33:44 +02:00
TO_REDRAW_RESIZE = 75,
TO_REDRAW_THUMBS = 200,
TO_CURSOR_HIDE = 1200,
TO_DOUBLE_CLICK = 300
};
2011-09-02 04:33:44 +02:00
typedef void (*timeout_f)(void);
2011-07-22 14:49:06 +02:00
#endif /* TYPES_H */