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.
 
 
 
 
 
 

67 lines
865 B

  1. #ifndef TYPES_H
  2. #define TYPES_H
  3. #undef bool
  4. #undef false
  5. #undef true
  6. typedef enum {
  7. false,
  8. true
  9. } bool;
  10. typedef enum {
  11. BO_BIG_ENDIAN,
  12. BO_LITTLE_ENDIAN
  13. } byteorder_t;
  14. typedef enum {
  15. MODE_IMAGE,
  16. MODE_THUMB
  17. } appmode_t;
  18. typedef enum {
  19. DIR_LEFT,
  20. DIR_RIGHT,
  21. DIR_UP,
  22. DIR_DOWN
  23. } direction_t;
  24. typedef enum {
  25. FLIP_HORIZONTAL,
  26. FLIP_VERTICAL
  27. } flipdir_t;
  28. typedef enum {
  29. SCALE_DOWN,
  30. SCALE_FIT,
  31. SCALE_WIDTH,
  32. SCALE_HEIGHT,
  33. SCALE_ZOOM
  34. } scalemode_t;
  35. typedef enum {
  36. CURSOR_ARROW,
  37. CURSOR_NONE,
  38. CURSOR_HAND,
  39. CURSOR_WATCH
  40. } cursor_t;
  41. typedef struct {
  42. const char *name; /* as given by user */
  43. const char *path; /* always absolute */
  44. const char *base;
  45. bool loaded;
  46. } fileinfo_t;
  47. /* timeouts in milliseconds: */
  48. enum {
  49. TO_REDRAW_RESIZE = 75,
  50. TO_REDRAW_THUMBS = 200,
  51. TO_CURSOR_HIDE = 1200
  52. };
  53. typedef void (*timeout_f)(void);
  54. #endif /* TYPES_H */