A Simple X Image Viewer
Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.
 
 
 
 
 
 

66 lines
1.6 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 void* arg_t;
  22. typedef struct {
  23. Bool ctrl;
  24. KeySym ksym;
  25. int (*handler)(arg_t);
  26. arg_t arg;
  27. } keymap_t;
  28. typedef struct {
  29. Bool ctrl;
  30. Bool shift;
  31. unsigned int button;
  32. int (*handler)(arg_t);
  33. arg_t arg;
  34. } button_t;
  35. void run();
  36. /* handler functions for key and button mappings: */
  37. int quit(arg_t);
  38. int reload(arg_t);
  39. int toggle_fullscreen(arg_t);
  40. int toggle_antialias(arg_t);
  41. int toggle_alpha(arg_t);
  42. int switch_mode(arg_t);
  43. int navigate(arg_t);
  44. int first(arg_t);
  45. int last(arg_t);
  46. int remove_image(arg_t);
  47. int move(arg_t);
  48. int pan_screen(arg_t);
  49. int pan_edge(arg_t);
  50. int drag(arg_t);
  51. int rotate(arg_t);
  52. int zoom(arg_t);
  53. int fit_to_win(arg_t);
  54. int fit_to_img(arg_t);
  55. int open_with(arg_t);
  56. int run_command(arg_t);
  57. #endif /* EVENTS_H */