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.
 
 
 
 
 
 

50 lines
652 B

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