A Simple X Image Viewer
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

97 lines
1.8 KiB

  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. #ifndef TYPES_H
  19. #define TYPES_H
  20. #include <stdbool.h>
  21. /*
  22. * Annotation for functions called in cleanup().
  23. * These functions are not allowed to call error(!0, ...) or exit().
  24. */
  25. #define CLEANUP
  26. typedef enum {
  27. BO_BIG_ENDIAN,
  28. BO_LITTLE_ENDIAN
  29. } byteorder_t;
  30. typedef enum {
  31. MODE_IMAGE,
  32. MODE_THUMB
  33. } appmode_t;
  34. typedef enum {
  35. DIR_LEFT = 1,
  36. DIR_RIGHT = 2,
  37. DIR_UP = 4,
  38. DIR_DOWN = 8
  39. } direction_t;
  40. typedef enum {
  41. DEGREE_90 = 1,
  42. DEGREE_180 = 2,
  43. DEGREE_270 = 3
  44. } degree_t;
  45. typedef enum {
  46. FLIP_HORIZONTAL = 1,
  47. FLIP_VERTICAL = 2
  48. } flipdir_t;
  49. typedef enum {
  50. SCALE_DOWN,
  51. SCALE_FIT,
  52. SCALE_WIDTH,
  53. SCALE_HEIGHT,
  54. SCALE_ZOOM
  55. } scalemode_t;
  56. typedef enum {
  57. CURSOR_ARROW,
  58. CURSOR_NONE,
  59. CURSOR_HAND,
  60. CURSOR_WATCH
  61. } cursor_t;
  62. typedef enum {
  63. FF_WARN = 1,
  64. FF_MARK = 2,
  65. FF_TN_INIT = 4
  66. } fileflags_t;
  67. typedef struct {
  68. const char *name; /* as given by user */
  69. const char *path; /* always absolute */
  70. const char *base;
  71. fileflags_t flags;
  72. } fileinfo_t;
  73. /* timeouts in milliseconds: */
  74. enum {
  75. TO_REDRAW_RESIZE = 75,
  76. TO_REDRAW_THUMBS = 200,
  77. TO_CURSOR_HIDE = 1200,
  78. TO_DOUBLE_CLICK = 300
  79. };
  80. typedef void (*timeout_f)(void);
  81. #endif /* TYPES_H */