A Simple X Image Viewer
Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

window.h 1.7 KiB

13 anos atrás
13 anos atrás
13 anos atrás
13 anos atrás
13 anos atrás
13 anos atrás
13 anos atrás
13 anos atrás
13 anos atrás
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  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
  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 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. unsigned char 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. int win_configure(win_t*, XConfigureEvent*);
  50. int 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 */