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.
 
 
 
 
 
 

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