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