Krolyxon
Commit 49c580c

Branches

Refs →

nsxivevents.h

65 lines · 1.6 KB · Objective-C

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