Krolyxon
Commit 6b2a098

Branches

Refs →

nsxivevents.h

67 lines · 1.8 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 struct {
25 KeySym ksym;
26 Bool reload;
27 const char *cmdline;
28} command_t;
29
30typedef int arg_t;
31
32typedef struct {
33 KeySym ksym;
34 int (*handler)(XEvent*, arg_t);
35 arg_t arg;
36} keymap_t;
37
38typedef struct {
39 unsigned int mod;
40 unsigned int button;
41 int (*handler)(XEvent*, arg_t);
42 arg_t arg;
43} button_t;
44
45void run();
46
47/* handler functions for key and button mappings: */
48int quit(XEvent*, arg_t);
49int reload(XEvent*, arg_t);
50int toggle_fullscreen(XEvent*, arg_t);
51int toggle_antialias(XEvent*, arg_t);
52int toggle_alpha(XEvent*, arg_t);
53int switch_mode(XEvent*, arg_t);
54int navigate(XEvent*, arg_t);
55int first(XEvent*, arg_t);
56int last(XEvent*, arg_t);
57int remove_image(XEvent*, arg_t);
58int move(XEvent*, arg_t);
59int scroll(XEvent*, arg_t);
60int pan_edge(XEvent*, arg_t);
61int drag(XEvent*, arg_t);
62int rotate(XEvent*, arg_t);
63int zoom(XEvent*, arg_t);
64int fit_to_win(XEvent*, arg_t);
65int fit_to_img(XEvent*, arg_t);
66
67#endif /* EVENTS_H */