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.
 
 
 
 
 
 

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