A Simple X Image Viewer
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

65 line
1.6 KiB

  1. /* sxiv: commands.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 COMMANDS_H
  19. #define COMMANDS_H
  20. #include <X11/Xlib.h>
  21. typedef void* arg_t;
  22. typedef int (*command_f)(arg_t);
  23. typedef struct {
  24. Bool ctrl;
  25. KeySym ksym;
  26. command_f cmd;
  27. arg_t arg;
  28. } keymap_t;
  29. typedef struct {
  30. Bool ctrl;
  31. Bool shift;
  32. unsigned int button;
  33. command_f cmd;
  34. arg_t arg;
  35. } button_t;
  36. int it_quit(arg_t);
  37. int it_switch_mode(arg_t);
  38. int it_toggle_fullscreen(arg_t);
  39. int it_reload_image(arg_t);
  40. int it_remove_image(arg_t);
  41. int i_navigate(arg_t);
  42. int it_first(arg_t);
  43. int it_last(arg_t);
  44. int i_navigate_frame(arg_t);
  45. int it_move(arg_t);
  46. int i_pan_screen(arg_t);
  47. int i_pan_edge(arg_t);
  48. int i_drag(arg_t);
  49. int i_zoom(arg_t);
  50. int i_fit_to_win(arg_t);
  51. int i_fit_to_img(arg_t);
  52. int i_rotate(arg_t);
  53. int i_toggle_antialias(arg_t);
  54. int i_toggle_alpha(arg_t);
  55. int it_open_with(arg_t);
  56. int it_shell_cmd(arg_t);
  57. #endif /* COMMANDS_H */