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.
 
 
 
 
 
 

61 lines
798 B

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