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.
 
 
 
 
 
 

56 lines
736 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. SCALE_DOWN,
  23. SCALE_FIT,
  24. SCALE_ZOOM
  25. } scalemode_t;
  26. typedef enum {
  27. CURSOR_ARROW,
  28. CURSOR_NONE,
  29. CURSOR_HAND,
  30. CURSOR_WATCH
  31. } cursor_t;
  32. typedef struct {
  33. const char *name; /* as given by user */
  34. const char *path; /* always absolute */
  35. const char *base;
  36. bool loaded;
  37. } fileinfo_t;
  38. /* timeouts in milliseconds: */
  39. enum {
  40. TO_REDRAW_RESIZE = 75,
  41. TO_REDRAW_THUMBS = 200,
  42. TO_CURSOR_HIDE = 1200
  43. };
  44. typedef void (*timeout_f)(void);
  45. #endif /* TYPES_H */