A Simple X Image Viewer
Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.
 
 
 
 
 
 

93 rindas
1.7 KiB

  1. /* Copyright 2011 Bert Muennich
  2. *
  3. * This file is part of sxiv.
  4. *
  5. * sxiv is free software; you can redistribute it and/or modify
  6. * it under the terms of the GNU General Public License as published
  7. * by the Free Software Foundation; either version 2 of the License,
  8. * or (at your option) any later version.
  9. *
  10. * sxiv is distributed in the hope that it will be useful,
  11. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. * GNU General Public License for more details.
  14. *
  15. * You should have received a copy of the GNU General Public License
  16. * along with sxiv. If not, see <http://www.gnu.org/licenses/>.
  17. */
  18. #ifndef TYPES_H
  19. #define TYPES_H
  20. #include <stdbool.h>
  21. #define CLEANUP
  22. typedef enum {
  23. BO_BIG_ENDIAN,
  24. BO_LITTLE_ENDIAN
  25. } byteorder_t;
  26. typedef enum {
  27. MODE_IMAGE,
  28. MODE_THUMB
  29. } appmode_t;
  30. typedef enum {
  31. DIR_LEFT = 1,
  32. DIR_RIGHT = 2,
  33. DIR_UP = 4,
  34. DIR_DOWN = 8
  35. } direction_t;
  36. typedef enum {
  37. DEGREE_90 = 1,
  38. DEGREE_180 = 2,
  39. DEGREE_270 = 3
  40. } degree_t;
  41. typedef enum {
  42. FLIP_HORIZONTAL = 1,
  43. FLIP_VERTICAL = 2
  44. } flipdir_t;
  45. typedef enum {
  46. SCALE_DOWN,
  47. SCALE_FIT,
  48. SCALE_WIDTH,
  49. SCALE_HEIGHT,
  50. SCALE_ZOOM
  51. } scalemode_t;
  52. typedef enum {
  53. CURSOR_ARROW,
  54. CURSOR_NONE,
  55. CURSOR_HAND,
  56. CURSOR_WATCH
  57. } cursor_t;
  58. typedef enum {
  59. FF_WARN = 1,
  60. FF_MARK = 2,
  61. FF_TN_INIT = 4
  62. } fileflags_t;
  63. typedef struct {
  64. const char *name; /* as given by user */
  65. const char *path; /* always absolute */
  66. const char *base;
  67. fileflags_t flags;
  68. } fileinfo_t;
  69. /* timeouts in milliseconds: */
  70. enum {
  71. TO_REDRAW_RESIZE = 75,
  72. TO_REDRAW_THUMBS = 200,
  73. TO_CURSOR_HIDE = 1200,
  74. TO_DOUBLE_CLICK = 300
  75. };
  76. typedef void (*timeout_f)(void);
  77. #endif /* TYPES_H */