shortcuts.h 7.36 KB
Newer Older
Moritz Lipp's avatar
Moritz Lipp committed
1
/* See LICENSE file for license and copyright information */
2
3
4
5

#ifndef SHORTCUTS_H
#define SHORTCUTS_H

6
#include <girara/types.h>
7

Moritz Lipp's avatar
Moritz Lipp committed
8
9
10
11
12
/**
 * Abort the current action and return to normal mode
 *
 * @param session The used girara session
 * @param argument The used argument
Moritz Lipp's avatar
Moritz Lipp committed
13
 * @param event Girara event
14
 * @param t Number of executions
Moritz Lipp's avatar
Moritz Lipp committed
15
16
 * @return true if no error occured otherwise false
 */
Moritz Lipp's avatar
Moritz Lipp committed
17
bool sc_abort(girara_session_t* session, girara_argument_t* argument, girara_event_t* event, unsigned int t);
Moritz Lipp's avatar
Moritz Lipp committed
18
19
20
21
22
23

/**
 * Adjust the rendered pages to the window
 *
 * @param session The used girara session
 * @param argument The used argument
Moritz Lipp's avatar
Moritz Lipp committed
24
 * @param event Girara event
25
 * @param t Number of executions
Moritz Lipp's avatar
Moritz Lipp committed
26
27
 * @return true if no error occured otherwise false
 */
Moritz Lipp's avatar
Moritz Lipp committed
28
bool sc_adjust_window(girara_session_t* session, girara_argument_t* argument, girara_event_t* event, unsigned int t);
Moritz Lipp's avatar
Moritz Lipp committed
29
30
31
32
33
34

/**
 * Change the current mode
 *
 * @param session The used girara session
 * @param argument The used argument
Moritz Lipp's avatar
Moritz Lipp committed
35
 * @param event Girara event
36
 * @param t Number of executions
Moritz Lipp's avatar
Moritz Lipp committed
37
38
 * @return true if no error occured otherwise false
 */
Moritz Lipp's avatar
Moritz Lipp committed
39
bool sc_change_mode(girara_session_t* session, girara_argument_t* argument, girara_event_t* event, unsigned int t);
Moritz Lipp's avatar
Moritz Lipp committed
40

41
42
43
44
45
46
47
48
49
50
51
52
/**
 * Shortcut function to focus the inputbar
 *
 * @param session The used girara session
 * @param argument The argument
 * @param event Girara event
 * @param t Number of executions
 * @return true No error occured
 * @return false An error occured (abort execution)
 */
bool sc_focus_inputbar(girara_session_t* session, girara_argument_t* argument, girara_event_t* event, unsigned int t);

Moritz Lipp's avatar
Moritz Lipp committed
53
54
55
56
57
/**
 * Follow a link
 *
 * @param session The used girara session
 * @param argument The used argument
Moritz Lipp's avatar
Moritz Lipp committed
58
 * @param event Girara event
59
 * @param t Number of executions
Moritz Lipp's avatar
Moritz Lipp committed
60
61
 * @return true if no error occured otherwise false
 */
Moritz Lipp's avatar
Moritz Lipp committed
62
bool sc_follow(girara_session_t* session, girara_argument_t* argument, girara_event_t* event, unsigned int t);
Moritz Lipp's avatar
Moritz Lipp committed
63
64
65
66
67
68

/**
 * Go to a specific page or position
 *
 * @param session The used girara session
 * @param argument The used argument
Moritz Lipp's avatar
Moritz Lipp committed
69
 * @param event Girara event
70
 * @param t Number of executions
Moritz Lipp's avatar
Moritz Lipp committed
71
72
 * @return true if no error occured otherwise false
 */
Moritz Lipp's avatar
Moritz Lipp committed
73
bool sc_goto(girara_session_t* session, girara_argument_t* argument, girara_event_t* event, unsigned int t);
Moritz Lipp's avatar
Moritz Lipp committed
74

Moritz Lipp's avatar
Moritz Lipp committed
75
76
77
78
79
80
81
82
83
84
85
/**
 * Handle mouse events
 *
 * @param session The used girara session
 * @param argument The used argument
 * @param event Girara event
 * @param t Number of executions
 * @return true if no error occured otherwise false
 */
bool sc_mouse_scroll(girara_session_t* session, girara_argument_t* argument, girara_event_t* event, unsigned int t);

Moritz Lipp's avatar
Moritz Lipp committed
86
87
88
89
90
91
92
93
94
95
96
/**
 * Handle mouse zoom events
 *
 * @param session The used girara session
 * @param argument The used argument
 * @param event Girara event
 * @param t Number of executions
 * @return true if no error occured otherwise false
 */
bool sc_mouse_zoom(girara_session_t* session, girara_argument_t* argument, girara_event_t* event, unsigned int t);

Moritz Lipp's avatar
Moritz Lipp committed
97
98
99
100
101
/**
 * Navigate through the document
 *
 * @param session The used girara session
 * @param argument The used argument
Moritz Lipp's avatar
Moritz Lipp committed
102
 * @param event Girara event
103
 * @param t Number of executions
Moritz Lipp's avatar
Moritz Lipp committed
104
105
 * @return true if no error occured otherwise false
 */
Moritz Lipp's avatar
Moritz Lipp committed
106
bool sc_navigate(girara_session_t* session, girara_argument_t* argument, girara_event_t* event, unsigned int t);
Moritz Lipp's avatar
Moritz Lipp committed
107

Moritz Lipp's avatar
Moritz Lipp committed
108
109
110
111
112
113
114
115
116
117
118
/**
 * Calls the print dialog
 *
 * @param session The used girara session
 * @param argument The used argument
 * @param event Girara event
 * @param t Number of executions
 * @return true if no error occured otherwise false
 */
bool sc_print(girara_session_t* session, girara_argument_t* argument, girara_event_t* event, unsigned int t);

Moritz Lipp's avatar
Moritz Lipp committed
119
120
121
122
123
/**
 * Recolor the pages
 *
 * @param session The used girara session
 * @param argument The used argument
Moritz Lipp's avatar
Moritz Lipp committed
124
 * @param event Girara event
125
 * @param t Number of executions
Moritz Lipp's avatar
Moritz Lipp committed
126
127
 * @return true if no error occured otherwise false
 */
Moritz Lipp's avatar
Moritz Lipp committed
128
bool sc_recolor(girara_session_t* session, girara_argument_t* argument, girara_event_t* event, unsigned int t);
Moritz Lipp's avatar
Moritz Lipp committed
129
130
131
132
133
134

/**
 * Reload the current document
 *
 * @param session The used girara session
 * @param argument The used argument
Moritz Lipp's avatar
Moritz Lipp committed
135
 * @param event Girara event
136
 * @param t Number of executions
Moritz Lipp's avatar
Moritz Lipp committed
137
138
 * @return true if no error occured otherwise false
 */
Moritz Lipp's avatar
Moritz Lipp committed
139
bool sc_reload(girara_session_t* session, girara_argument_t* argument, girara_event_t* event, unsigned int t);
Moritz Lipp's avatar
Moritz Lipp committed
140
141
142
143
144
145

/**
 * Rotate the pages
 *
 * @param session The used girara session
 * @param argument The used argument
Moritz Lipp's avatar
Moritz Lipp committed
146
 * @param event Girara event
147
 * @param t Number of executions
Moritz Lipp's avatar
Moritz Lipp committed
148
149
 * @return true if no error occured otherwise false
 */
Moritz Lipp's avatar
Moritz Lipp committed
150
bool sc_rotate(girara_session_t* session, girara_argument_t* argument, girara_event_t* event, unsigned int t);
Moritz Lipp's avatar
Moritz Lipp committed
151
152
153
154
155
156

/**
 * Scroll through the pages
 *
 * @param session The used girara session
 * @param argument The used argument
Moritz Lipp's avatar
Moritz Lipp committed
157
 * @param event Girara event
158
 * @param t Number of executions
Moritz Lipp's avatar
Moritz Lipp committed
159
160
 * @return true if no error occured otherwise false
 */
Moritz Lipp's avatar
Moritz Lipp committed
161
bool sc_scroll(girara_session_t* session, girara_argument_t* argument, girara_event_t* event, unsigned int t);
Moritz Lipp's avatar
Moritz Lipp committed
162

163
164
165
166
167
168
169
170
171
172
173
/**
 * Scroll through the pages
 *
 * @param session The used girara session
 * @param argument The used argument
 * @param event Girara event
 * @param t Number of executions
 * @return true if no error occured otherwise false
 */
bool sc_jumplist(girara_session_t* session, girara_argument_t* argument, girara_event_t* event, unsigned int t);

Moritz Lipp's avatar
Moritz Lipp committed
174
175
176
177
178
/**
 * Search through the document for the latest search item
 *
 * @param session The used girara session
 * @param argument The used argument
Moritz Lipp's avatar
Moritz Lipp committed
179
 * @param event Girara event
180
 * @param t Number of executions
Moritz Lipp's avatar
Moritz Lipp committed
181
182
 * @return true if no error occured otherwise false
 */
Moritz Lipp's avatar
Moritz Lipp committed
183
bool sc_search(girara_session_t* session, girara_argument_t* argument, girara_event_t* event, unsigned int t);
Moritz Lipp's avatar
Moritz Lipp committed
184
185
186
187
188
189

/**
 * Navigate through the index of the document
 *
 * @param session The used girara session
 * @param argument The used argument
Moritz Lipp's avatar
Moritz Lipp committed
190
 * @param event Girara event
191
 * @param t Number of executions
Moritz Lipp's avatar
Moritz Lipp committed
192
193
 * @return true if no error occured otherwise false
 */
Moritz Lipp's avatar
Moritz Lipp committed
194
bool sc_navigate_index(girara_session_t* session, girara_argument_t* argument, girara_event_t* event, unsigned int t);
Moritz Lipp's avatar
Moritz Lipp committed
195
196
197
198
199
200

/**
 * Show/Hide the index of the document
 *
 * @param session The used girara session
 * @param argument The used argument
Moritz Lipp's avatar
Moritz Lipp committed
201
 * @param event Girara event
202
 * @param t Number of executions
Moritz Lipp's avatar
Moritz Lipp committed
203
204
 * @return true if no error occured otherwise false
 */
Moritz Lipp's avatar
Moritz Lipp committed
205
bool sc_toggle_index(girara_session_t* session, girara_argument_t* argument, girara_event_t* event, unsigned int t);
Moritz Lipp's avatar
Moritz Lipp committed
206
207
208
209
210
211

/**
 * Toggle fullscreen mode
 *
 * @param session The used girara session
 * @param argument The used argument
Moritz Lipp's avatar
Moritz Lipp committed
212
 * @param event Girara event
213
 * @param t Number of executions
Moritz Lipp's avatar
Moritz Lipp committed
214
215
 * @return true if no error occured otherwise false
 */
Moritz Lipp's avatar
Moritz Lipp committed
216
bool sc_toggle_fullscreen(girara_session_t* session, girara_argument_t* argument, girara_event_t* event, unsigned int t);
Moritz Lipp's avatar
Moritz Lipp committed
217
218
219
220
221
222

/**
 * Quit zathura
 *
 * @param session The used girara session
 * @param argument The used argument
Moritz Lipp's avatar
Moritz Lipp committed
223
 * @param event Girara event
224
 * @param t Number of executions
Moritz Lipp's avatar
Moritz Lipp committed
225
226
 * @return true if no error occured otherwise false
 */
Moritz Lipp's avatar
Moritz Lipp committed
227
bool sc_quit(girara_session_t* session, girara_argument_t* argument, girara_event_t* event, unsigned int t);
Moritz Lipp's avatar
Moritz Lipp committed
228
229
230
231
232
233

/**
 * Change the zoom level
 *
 * @param session The used girara session
 * @param argument The used argument
Moritz Lipp's avatar
Moritz Lipp committed
234
 * @param event Girara event
235
 * @param t Number of executions
Moritz Lipp's avatar
Moritz Lipp committed
236
237
 * @return true if no error occured otherwise false
 */
Moritz Lipp's avatar
Moritz Lipp committed
238
bool sc_zoom(girara_session_t* session, girara_argument_t* argument, girara_event_t* event, unsigned int t);
239
240

#endif // SHORTCUTS_H