A Simple X Image Viewer
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.
 
 
 
 
 
 

70 lignes
1.4 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 THUMBS_H
  19. #define THUMBS_H
  20. #include <X11/Xlib.h>
  21. #include <Imlib2.h>
  22. #include "types.h"
  23. #include "window.h"
  24. typedef struct {
  25. const fileinfo_t *file;
  26. Imlib_Image *im;
  27. int w;
  28. int h;
  29. int x;
  30. int y;
  31. } thumb_t;
  32. typedef struct {
  33. thumb_t *thumbs;
  34. int cap;
  35. int cnt;
  36. int first;
  37. int sel;
  38. win_t *win;
  39. int x;
  40. int y;
  41. int cols;
  42. int rows;
  43. bool alpha;
  44. bool dirty;
  45. } tns_t;
  46. void tns_clean_cache(tns_t*);
  47. void tns_init(tns_t*, int, win_t*);
  48. void tns_free(tns_t*);
  49. bool tns_load(tns_t*, int, const fileinfo_t*, bool, bool);
  50. void tns_render(tns_t*);
  51. void tns_highlight(tns_t*, int, bool);
  52. bool tns_move_selection(tns_t*, direction_t, int);
  53. bool tns_scroll(tns_t*, direction_t, bool);
  54. int tns_translate(tns_t*, int, int);
  55. #endif /* THUMBS_H */