2013-02-08 20:52:41 +00: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 13:49:06 +01:00
|
|
|
#ifndef TYPES_H
|
|
|
|
#define TYPES_H
|
|
|
|
|
2013-02-08 22:20:11 +00:00
|
|
|
#include <stdbool.h>
|
2011-09-11 20:01:24 +01:00
|
|
|
|
2017-05-17 14:51:11 +01:00
|
|
|
/*
|
|
|
|
* Annotation for functions called in cleanup().
|
|
|
|
* These functions are not allowed to call error(!0, ...) or exit().
|
|
|
|
*/
|
2015-10-28 22:03:37 +00:00
|
|
|
#define CLEANUP
|
|
|
|
|
2012-02-15 18:13:44 +00:00
|
|
|
typedef enum {
|
|
|
|
BO_BIG_ENDIAN,
|
|
|
|
BO_LITTLE_ENDIAN
|
|
|
|
} byteorder_t;
|
|
|
|
|
2011-07-22 13:49:06 +01:00
|
|
|
typedef enum {
|
2011-08-19 12:09:22 +01:00
|
|
|
MODE_IMAGE,
|
|
|
|
MODE_THUMB
|
2011-07-22 13:49:06 +01:00
|
|
|
} appmode_t;
|
|
|
|
|
|
|
|
typedef enum {
|
2014-07-23 22:41:23 +01:00
|
|
|
DIR_LEFT = 1,
|
|
|
|
DIR_RIGHT = 2,
|
|
|
|
DIR_UP = 4,
|
|
|
|
DIR_DOWN = 8
|
2011-07-22 13:49:06 +01:00
|
|
|
} direction_t;
|
|
|
|
|
2013-06-23 15:02:26 +01:00
|
|
|
typedef enum {
|
2013-08-10 14:55:18 +01:00
|
|
|
DEGREE_90 = 1,
|
|
|
|
DEGREE_180 = 2,
|
|
|
|
DEGREE_270 = 3
|
|
|
|
} degree_t;
|
2013-06-23 15:02:26 +01:00
|
|
|
|
2012-05-06 08:39:45 +01:00
|
|
|
typedef enum {
|
2014-01-09 19:32:22 +00:00
|
|
|
FLIP_HORIZONTAL = 1,
|
|
|
|
FLIP_VERTICAL = 2
|
2012-05-06 12:02:34 +01:00
|
|
|
} flipdir_t;
|
2012-05-06 08:39:45 +01:00
|
|
|
|
2011-07-22 13:49:06 +01:00
|
|
|
typedef enum {
|
2011-07-26 17:01:29 +01:00
|
|
|
SCALE_DOWN,
|
2011-07-22 13:49:06 +01:00
|
|
|
SCALE_FIT,
|
2012-07-19 11:28:44 +01:00
|
|
|
SCALE_WIDTH,
|
|
|
|
SCALE_HEIGHT,
|
2011-07-22 13:49:06 +01:00
|
|
|
SCALE_ZOOM
|
|
|
|
} scalemode_t;
|
|
|
|
|
|
|
|
typedef enum {
|
2011-07-26 17:01:29 +01:00
|
|
|
CURSOR_ARROW,
|
2011-07-22 13:49:06 +01:00
|
|
|
CURSOR_NONE,
|
|
|
|
CURSOR_HAND,
|
|
|
|
CURSOR_WATCH
|
|
|
|
} cursor_t;
|
|
|
|
|
2015-01-04 14:38:49 +00:00
|
|
|
typedef enum {
|
2015-01-04 20:19:26 +00:00
|
|
|
FF_WARN = 1,
|
|
|
|
FF_MARK = 2,
|
|
|
|
FF_TN_INIT = 4
|
2015-01-04 14:38:49 +00:00
|
|
|
} fileflags_t;
|
|
|
|
|
2011-08-17 23:38:55 +01:00
|
|
|
typedef struct {
|
2011-08-18 11:05:38 +01:00
|
|
|
const char *name; /* as given by user */
|
|
|
|
const char *path; /* always absolute */
|
2012-02-12 18:00:41 +00:00
|
|
|
const char *base;
|
2015-01-04 14:38:49 +00:00
|
|
|
fileflags_t flags;
|
2011-08-17 23:38:55 +01:00
|
|
|
} fileinfo_t;
|
|
|
|
|
2011-08-19 14:02:10 +01:00
|
|
|
/* timeouts in milliseconds: */
|
|
|
|
enum {
|
2011-09-02 03:33:44 +01:00
|
|
|
TO_REDRAW_RESIZE = 75,
|
|
|
|
TO_REDRAW_THUMBS = 200,
|
2014-01-11 21:52:37 +00:00
|
|
|
TO_CURSOR_HIDE = 1200,
|
|
|
|
TO_DOUBLE_CLICK = 300
|
2011-08-19 14:02:10 +01:00
|
|
|
};
|
|
|
|
|
2011-09-02 03:33:44 +01:00
|
|
|
typedef void (*timeout_f)(void);
|
|
|
|
|
2011-07-22 13:49:06 +01:00
|
|
|
#endif /* TYPES_H */
|