A Simple X Image Viewer
Du kannst nicht mehr als 25 Themen auswählen Themen müssen entweder mit einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.
 
 
 
 
 
 

68 Zeilen
1.8 KiB

  1. /* sxiv: events.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
  5. * it under the terms of the GNU General Public License as published by
  6. * the Free Software Foundation; either version 2 of the License, or
  7. * (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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  17. */
  18. #ifndef EVENTS_H
  19. #define EVENTS_H
  20. #include <X11/Xlib.h>
  21. typedef struct {
  22. KeySym ksym;
  23. Bool reload;
  24. const char *cmdline;
  25. } command_t;
  26. typedef int arg_t;
  27. typedef struct {
  28. KeySym ksym;
  29. int (*handler)(XEvent*, arg_t);
  30. arg_t arg;
  31. } keymap_t;
  32. typedef struct {
  33. unsigned int mod;
  34. unsigned int button;
  35. int (*handler)(XEvent*, arg_t);
  36. arg_t arg;
  37. } button_t;
  38. void run();
  39. /* handler functions for key and button mappings: */
  40. int quit(XEvent*, arg_t);
  41. int reload(XEvent*, arg_t);
  42. int toggle_fullscreen(XEvent*, arg_t);
  43. int toggle_antialias(XEvent*, arg_t);
  44. int toggle_alpha(XEvent*, arg_t);
  45. int switch_mode(XEvent*, arg_t);
  46. int navigate(XEvent*, arg_t);
  47. int first(XEvent*, arg_t);
  48. int last(XEvent*, arg_t);
  49. int remove_image(XEvent*, arg_t);
  50. int move(XEvent*, arg_t);
  51. int scroll(XEvent*, arg_t);
  52. int pan_edge(XEvent*, arg_t);
  53. int drag(XEvent*, arg_t);
  54. int rotate(XEvent*, arg_t);
  55. int zoom(XEvent*, arg_t);
  56. int fit_to_win(XEvent*, arg_t);
  57. int fit_to_img(XEvent*, arg_t);
  58. #endif /* EVENTS_H */