| 1 | /* Copyright 2011 Bert Muennich |
| 2 | * |
| 3 | * This file is part of sxiv. |
| 4 | * |
| 5 | * sxiv is free software; you can redistribute it and/or modify |
| 6 | * it under the terms of the GNU General Public License as published |
| 7 | * by the Free Software Foundation; either version 2 of the License, |
| 8 | * or (at your option) any later version. |
| 9 | * |
| 10 | * sxiv is distributed in the hope that it will be useful, |
| 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 13 | * GNU General Public License for more details. |
| 14 | * |
| 15 | * You should have received a copy of the GNU General Public License |
| 16 | * along with sxiv. If not, see <http://www.gnu.org/licenses/>. |
| 17 | */ |
| 18 | |
| 19 | #ifndef COMMANDS_H |
| 20 | #define COMMANDS_H |
| 21 | |
| 22 | #include <X11/Xlib.h> |
| 23 | |
| 24 | #include "types.h" |
| 25 | |
| 26 | typedef void* arg_t; |
| 27 | typedef bool (*command_f)(arg_t); |
| 28 | |
| 29 | typedef struct { |
| 30 | unsigned int mask; |
| 31 | KeySym ksym; |
| 32 | command_f cmd; |
| 33 | arg_t arg; |
| 34 | } keymap_t; |
| 35 | |
| 36 | typedef struct { |
| 37 | unsigned int mask; |
| 38 | unsigned int button; |
| 39 | command_f cmd; |
| 40 | arg_t arg; |
| 41 | } button_t; |
| 42 | |
| 43 | bool it_quit(arg_t); |
| 44 | bool it_switch_mode(arg_t); |
| 45 | bool it_toggle_fullscreen(arg_t); |
| 46 | bool it_toggle_bar(arg_t); |
| 47 | bool t_reload_all(arg_t); |
| 48 | bool it_reload_image(arg_t); |
| 49 | bool it_remove_image(arg_t); |
| 50 | bool i_navigate(arg_t); |
| 51 | bool i_alternate(arg_t); |
| 52 | bool it_first(arg_t); |
| 53 | bool it_n_or_last(arg_t); |
| 54 | bool i_navigate_frame(arg_t); |
| 55 | bool i_toggle_animation(arg_t); |
| 56 | bool it_toggle_image_mark(arg_t); |
| 57 | bool it_reverse_marks(arg_t); |
| 58 | bool it_navigate_marked(arg_t); |
| 59 | bool it_scroll_move(arg_t); |
| 60 | bool it_scroll_screen(arg_t); |
| 61 | bool i_scroll_to_edge(arg_t); |
| 62 | bool i_drag(arg_t); |
| 63 | bool i_zoom(arg_t); |
| 64 | bool i_set_zoom(arg_t); |
| 65 | bool i_fit_to_win(arg_t); |
| 66 | bool i_fit_to_img(arg_t); |
| 67 | bool i_rotate(arg_t); |
| 68 | bool i_flip(arg_t); |
| 69 | bool i_toggle_antialias(arg_t); |
| 70 | bool i_change_gamma(arg_t); |
| 71 | bool it_toggle_alpha(arg_t); |
| 72 | bool it_open_with(arg_t); |
| 73 | bool it_shell_cmd(arg_t); |
| 74 | |
| 75 | #endif /* COMMANDS_H */ |