Krolyxon
Commit 55da6fb

Branches

Refs →

nsxivcommands.h

71 lines · 1.8 KB · Objective-C

1/* sxiv: commands.h
2 * Copyright (c) 2011 Bert Muennich <be.muennich at googlemail.com>
3 *
4 * This program is free software; you can redistribute it and/or modify it
5 * under the terms of the GNU General Public License as published by the
6 * Free Software Foundation; either version 2 of the License, or (at your
7 * option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful, but
10 * WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License along
15 * with this program; if not, write to the Free Software Foundation, Inc.,
16 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
17 */
18
19#ifndef COMMANDS_H
20#define COMMANDS_H
21
22#include <X11/Xlib.h>
23
24#include "types.h"
25
26typedef void* arg_t;
27typedef bool (*command_f)(arg_t);
28
29typedef struct {
30 bool ctrl;
31 KeySym ksym;
32 command_f cmd;
33 arg_t arg;
34} keymap_t;
35
36typedef struct {
37 bool ctrl;
38 bool shift;
39 unsigned int button;
40 command_f cmd;
41 arg_t arg;
42} button_t;
43
44bool it_quit(arg_t);
45bool it_switch_mode(arg_t);
46bool it_toggle_fullscreen(arg_t);
47bool it_reload_image(arg_t);
48bool it_remove_image(arg_t);
49bool i_navigate(arg_t);
50bool it_first(arg_t);
51bool it_n_or_last(arg_t);
52bool i_navigate_frame(arg_t);
53bool i_toggle_animation(arg_t);
54bool it_move(arg_t);
55bool i_pan_screen(arg_t);
56bool i_pan_edge(arg_t);
57bool i_drag(arg_t);
58bool i_zoom(arg_t);
59bool i_set_zoom(arg_t);
60bool i_fit_to_win(arg_t);
61bool i_fit_to_img(arg_t);
62bool i_rotate(arg_t);
63bool i_toggle_slideshow(arg_t);
64bool i_adjust_slideshow(arg_t);
65bool i_reset_slideshow(arg_t);
66bool i_toggle_antialias(arg_t);
67bool it_toggle_alpha(arg_t);
68bool it_open_with(arg_t);
69bool it_shell_cmd(arg_t);
70
71#endif /* COMMANDS_H */