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.

types.h 827 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  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_WIDTH,
  29. SCALE_HEIGHT,
  30. SCALE_ZOOM
  31. } scalemode_t;
  32. typedef enum {
  33. CURSOR_ARROW,
  34. CURSOR_NONE,
  35. CURSOR_HAND,
  36. CURSOR_WATCH
  37. } cursor_t;
  38. typedef struct {
  39. const char *name; /* as given by user */
  40. const char *path; /* always absolute */
  41. const char *base;
  42. bool loaded;
  43. } fileinfo_t;
  44. /* timeouts in milliseconds: */
  45. enum {
  46. TO_REDRAW_RESIZE = 75,
  47. TO_REDRAW_THUMBS = 200,
  48. TO_CURSOR_HIDE = 1200
  49. };
  50. typedef void (*timeout_f)(void);
  51. #endif /* TYPES_H */