A Simple X Image Viewer
Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.

před 14 roky
před 14 roky
před 14 roky
před 14 roky
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. /* sxiv: image.h
  2. * Copyright (c) 2011 Bert Muennich <muennich at informatik.hu-berlin.de>
  3. *
  4. * This program is free software; you can redistribute it and/or
  5. * modify it under the terms of the GNU General Public License
  6. * as published by the Free Software Foundation; either version 2
  7. * of the License, or (at your option) any later version.
  8. *
  9. * This program is distributed in the hope that it will be useful,
  10. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. * GNU General Public License for more details.
  13. *
  14. * You should have received a copy of the GNU General Public License
  15. * along with this program; if not, write to the Free Software
  16. * Foundation, Inc., 51 Franklin Street, 5th Floor, Boston, MA 02110-1301, USA.
  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. unsigned char animate;
  33. } multi_img_t;
  34. typedef struct {
  35. Imlib_Image *im;
  36. multi_img_t multi;
  37. float zoom;
  38. scalemode_t scalemode;
  39. unsigned char re;
  40. unsigned char checkpan;
  41. unsigned char aa;
  42. unsigned char alpha;
  43. int x;
  44. int y;
  45. int w;
  46. int h;
  47. } img_t;
  48. void img_init(img_t*, win_t*);
  49. int img_load(img_t*, const fileinfo_t*);
  50. void img_close(img_t*, int);
  51. void img_render(img_t*, win_t*);
  52. int img_fit_win(img_t*, win_t*);
  53. int img_center(img_t*, win_t*);
  54. int img_zoom(img_t*, win_t*, float);
  55. int img_zoom_in(img_t*, win_t*);
  56. int img_zoom_out(img_t*, win_t*);
  57. int img_move(img_t*, win_t*, int, int);
  58. int img_pan(img_t*, win_t*, direction_t, int);
  59. int img_pan_edge(img_t*, win_t*, direction_t);
  60. void img_rotate_left(img_t*, win_t*);
  61. void img_rotate_right(img_t*, win_t*);
  62. void img_toggle_antialias(img_t*);
  63. int img_frame_navigate(img_t*, int);
  64. int img_frame_animate(img_t*, int);
  65. #endif /* IMAGE_H */