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.
 
 
 
 
 
 

74 lignes
1.7 KiB

  1. /* sxiv: window.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 modify it
  5. * under the terms of the GNU General Public License as published by the
  6. * Free Software Foundation; either version 2 of the License, or (at your
  7. * option) any later version.
  8. *
  9. * This program is distributed in the hope that it will be useful, but
  10. * WITHOUT ANY WARRANTY; without even the implied warranty of
  11. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  12. * General Public License for more details.
  13. *
  14. * You should have received a copy of the GNU General Public License along
  15. * with this program; if not, write to the Free Software Foundation, Inc.,
  16. * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  17. */
  18. #ifndef WINDOW_H
  19. #define WINDOW_H
  20. #include <X11/Xlib.h>
  21. #include "types.h"
  22. typedef struct {
  23. Display *dpy;
  24. int scr;
  25. int scrw, scrh;
  26. Visual *vis;
  27. Colormap cmap;
  28. int depth;
  29. } win_env_t;
  30. typedef struct {
  31. Window xwin;
  32. win_env_t env;
  33. unsigned long black;
  34. unsigned long white;
  35. unsigned long bgcol;
  36. unsigned long selcol;
  37. Pixmap pm;
  38. int x;
  39. int y;
  40. unsigned int w;
  41. unsigned int h;
  42. unsigned int bw;
  43. bool fullscreen;
  44. } win_t;
  45. extern Atom wm_delete_win;
  46. void win_init(win_t*);
  47. void win_open(win_t*);
  48. void win_close(win_t*);
  49. bool win_configure(win_t*, XConfigureEvent*);
  50. bool win_moveresize(win_t*, int, int, unsigned int, unsigned int);
  51. void win_toggle_fullscreen(win_t*);
  52. void win_clear(win_t*);
  53. void win_draw(win_t*);
  54. void win_draw_rect(win_t*, Pixmap, int, int, int, int, bool, int,
  55. unsigned long);
  56. void win_set_title(win_t*, const char*);
  57. void win_set_cursor(win_t*, cursor_t);
  58. #endif /* WINDOW_H */