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.

pirms 14 gadiem
pirms 14 gadiem
pirms 14 gadiem
pirms 13 gadiem
pirms 14 gadiem
pirms 13 gadiem
pirms 14 gadiem
pirms 14 gadiem
pirms 13 gadiem
pirms 14 gadiem
pirms 14 gadiem
pirms 14 gadiem
pirms 13 gadiem
pirms 14 gadiem
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  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 IMAGE_H
  19. #define IMAGE_H
  20. #include <Imlib2.h>
  21. #include "types.h"
  22. #include "window.h"
  23. typedef struct {
  24. Imlib_Image im;
  25. unsigned int delay;
  26. } img_frame_t;
  27. typedef struct {
  28. img_frame_t *frames;
  29. int cap;
  30. int cnt;
  31. int sel;
  32. bool animate;
  33. int framedelay;
  34. int length;
  35. } multi_img_t;
  36. typedef struct {
  37. Imlib_Image im;
  38. int w;
  39. int h;
  40. win_t *win;
  41. float x;
  42. float y;
  43. scalemode_t scalemode;
  44. float zoom;
  45. bool checkpan;
  46. bool dirty;
  47. bool aa;
  48. bool alpha;
  49. Imlib_Color_Modifier cmod;
  50. int gamma;
  51. struct {
  52. bool on;
  53. int delay;
  54. } ss;
  55. multi_img_t multi;
  56. } img_t;
  57. void img_init(img_t*, win_t*);
  58. bool img_load(img_t*, const fileinfo_t*);
  59. CLEANUP void img_close(img_t*, bool);
  60. void img_render(img_t*);
  61. bool img_fit_win(img_t*, scalemode_t);
  62. bool img_zoom(img_t*, float);
  63. bool img_zoom_in(img_t*);
  64. bool img_zoom_out(img_t*);
  65. bool img_pos(img_t*, float, float);
  66. bool img_move(img_t*, float, float);
  67. bool img_pan(img_t*, direction_t, int);
  68. bool img_pan_edge(img_t*, direction_t);
  69. void img_rotate(img_t*, degree_t);
  70. void img_flip(img_t*, flipdir_t);
  71. void img_toggle_antialias(img_t*);
  72. bool img_change_gamma(img_t*, int);
  73. bool img_frame_navigate(img_t*, int);
  74. bool img_frame_animate(img_t*);
  75. #endif /* IMAGE_H */