A Simple X Image Viewer
選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。
 
 
 
 
 
 

78 行
1.8 KiB

  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. int cap;
  25. int cnt;
  26. int sel;
  27. Imlib_Image **frames;
  28. } multi_img_t;
  29. typedef struct {
  30. Imlib_Image *im;
  31. multi_img_t multi;
  32. float zoom;
  33. scalemode_t scalemode;
  34. unsigned char re;
  35. unsigned char checkpan;
  36. unsigned char aa;
  37. unsigned char alpha;
  38. int x;
  39. int y;
  40. int w;
  41. int h;
  42. } img_t;
  43. void img_init(img_t*, win_t*);
  44. int img_load(img_t*, const fileinfo_t*);
  45. void img_close(img_t*, int);
  46. void img_render(img_t*, win_t*);
  47. int img_change_frame(img_t*, int);
  48. int img_fit_win(img_t*, win_t*);
  49. int img_center(img_t*, win_t*);
  50. int img_zoom(img_t*, win_t*, float);
  51. int img_zoom_in(img_t*, win_t*);
  52. int img_zoom_out(img_t*, win_t*);
  53. int img_move(img_t*, win_t*, int, int);
  54. int img_pan(img_t*, win_t*, direction_t, int);
  55. int img_pan_edge(img_t*, win_t*, direction_t);
  56. void img_rotate_left(img_t*, win_t*);
  57. void img_rotate_right(img_t*, win_t*);
  58. void img_toggle_antialias(img_t*);
  59. #endif /* IMAGE_H */