shortcuts.h 9.43 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
15
 * @return true if no error occurred otherwise false
Moritz Lipp's avatar
Moritz Lipp committed
16
 */
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
26
 * @return true if no error occurred otherwise false
Moritz Lipp's avatar
Moritz Lipp committed
27
 */
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
37
 * @return true if no error occurred otherwise false
Moritz Lipp's avatar
Moritz Lipp committed
38
 */
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
/**
 * Display a link
 *
 * @param session The used girara session
 * @param argument The used argument
 * @param event Girara event
 * @param t Number of executions
48
 * @return true if no error occurred otherwise false
49 50 51
 */
bool sc_display_link(girara_session_t* session, girara_argument_t* argument, girara_event_t* event, unsigned int t);

52 53 54 55 56 57 58
/**
 * 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
59 60
 * @return true No error occurred
 * @return false An error occurred (abort execution)
61 62 63
 */
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
64 65 66 67 68
/**
 * Follow a link
 *
 * @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
71
 * @return true if no error occurred otherwise false
Moritz Lipp's avatar
Moritz Lipp committed
72
 */
Moritz Lipp's avatar
Moritz Lipp committed
73
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
74 75 76 77 78 79

/**
 * 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
80
 * @param event Girara event
81
 * @param t Number of executions
82
 * @return true if no error occurred otherwise false
Moritz Lipp's avatar
Moritz Lipp committed
83
 */
Moritz Lipp's avatar
Moritz Lipp committed
84
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
85

Moritz Lipp's avatar
Moritz Lipp committed
86 87 88 89 90 91 92
/**
 * Handle mouse events
 *
 * @param session The used girara session
 * @param argument The used argument
 * @param event Girara event
 * @param t Number of executions
93
 * @return true if no error occurred otherwise false
Moritz Lipp's avatar
Moritz Lipp committed
94 95 96
 */
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
97 98 99 100 101 102 103
/**
 * Handle mouse zoom events
 *
 * @param session The used girara session
 * @param argument The used argument
 * @param event Girara event
 * @param t Number of executions
104
 * @return true if no error occurred otherwise false
Moritz Lipp's avatar
Moritz Lipp committed
105 106 107
 */
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
108 109 110 111 112
/**
 * Navigate through the document
 *
 * @param session The used girara session
 * @param argument The used argument
Moritz Lipp's avatar
Moritz Lipp committed
113
 * @param event Girara event
114
 * @param t Number of executions
115
 * @return true if no error occurred otherwise false
Moritz Lipp's avatar
Moritz Lipp committed
116
 */
Moritz Lipp's avatar
Moritz Lipp committed
117
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
118

Moritz Lipp's avatar
Moritz Lipp committed
119 120 121 122 123 124 125
/**
 * Calls the print dialog
 *
 * @param session The used girara session
 * @param argument The used argument
 * @param event Girara event
 * @param t Number of executions
126
 * @return true if no error occurred otherwise false
Moritz Lipp's avatar
Moritz Lipp committed
127 128 129
 */
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
130 131 132 133 134
/**
 * Recolor the pages
 *
 * @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
137
 * @return true if no error occurred otherwise false
Moritz Lipp's avatar
Moritz Lipp committed
138
 */
Moritz Lipp's avatar
Moritz Lipp committed
139
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
140 141 142 143 144 145

/**
 * Reload the current document
 *
 * @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
148
 * @return true if no error occurred otherwise false
Moritz Lipp's avatar
Moritz Lipp committed
149
 */
Moritz Lipp's avatar
Moritz Lipp committed
150
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
151 152 153 154 155 156

/**
 * Rotate 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
159
 * @return true if no error occurred otherwise false
Moritz Lipp's avatar
Moritz Lipp committed
160
 */
Moritz Lipp's avatar
Moritz Lipp committed
161
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
162 163 164 165 166 167

/**
 * Scroll through the pages
 *
 * @param session The used girara session
 * @param argument The used argument
Moritz Lipp's avatar
Moritz Lipp committed
168
 * @param event Girara event
169
 * @param t Number of executions
170
 * @return true if no error occurred otherwise false
Moritz Lipp's avatar
Moritz Lipp committed
171
 */
Moritz Lipp's avatar
Moritz Lipp committed
172
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
173

174
/**
175
 * Navigate through the jumplist
176 177 178 179 180
 *
 * @param session The used girara session
 * @param argument The used argument
 * @param event Girara event
 * @param t Number of executions
181
 * @return true if no error occurred otherwise false
182 183 184
 */
bool sc_jumplist(girara_session_t* session, girara_argument_t* argument, girara_event_t* event, unsigned int t);

185 186 187 188 189 190 191
/**
 * Bisect through the document
 *
 * @param session The used girara session
 * @param argument The used argument
 * @param event Girara event
 * @param t Number of executions
192
 * @return true if no error occurred otherwise false
193 194 195
 */
bool sc_bisect(girara_session_t* session, girara_argument_t* argument, girara_event_t* event, unsigned int t);

Moritz Lipp's avatar
Moritz Lipp committed
196 197 198 199 200
/**
 * 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
201
 * @param event Girara event
202
 * @param t Number of executions
203
 * @return true if no error occurred otherwise false
Moritz Lipp's avatar
Moritz Lipp committed
204
 */
Moritz Lipp's avatar
Moritz Lipp committed
205
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
206 207 208 209 210 211

/**
 * 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
212
 * @param event Girara event
213
 * @param t Number of executions
214
 * @return true if no error occurred otherwise false
Moritz Lipp's avatar
Moritz Lipp committed
215
 */
Moritz Lipp's avatar
Moritz Lipp committed
216
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
217 218 219 220 221 222

/**
 * 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
223
 * @param event Girara event
224
 * @param t Number of executions
225
 * @return true if no error occurred otherwise false
Moritz Lipp's avatar
Moritz Lipp committed
226
 */
Moritz Lipp's avatar
Moritz Lipp committed
227
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
228

Moritz Lipp's avatar
Moritz Lipp committed
229 230 231 232 233 234 235
/**
 * Toggle multi page mode
 *
 * @param session The used girara session
 * @param argument The used argument
 * @param event Girara event
 * @param t Number of executions
236
 * @return true if no error occurred otherwise false
Moritz Lipp's avatar
Moritz Lipp committed
237 238 239
 */
bool sc_toggle_page_mode(girara_session_t* session, girara_argument_t* argument, girara_event_t* event, unsigned int t);

Moritz Lipp's avatar
Moritz Lipp committed
240 241 242 243 244
/**
 * Toggle fullscreen mode
 *
 * @param session The used girara session
 * @param argument The used argument
Moritz Lipp's avatar
Moritz Lipp committed
245
 * @param event Girara event
246
 * @param t Number of executions
247
 * @return true if no error occurred otherwise false
Moritz Lipp's avatar
Moritz Lipp committed
248
 */
Moritz Lipp's avatar
Moritz Lipp committed
249
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
250

251 252 253 254 255 256 257
/**
 * Toggle presentation mode
 *
 * @param session The used girara session
 * @param argument The used argument
 * @param event Girara event
 * @param t Number of executions
258
 * @return true if no error occurred otherwise false
259 260 261
 */
bool sc_toggle_presentation(girara_session_t* session, girara_argument_t* argument, girara_event_t* event, unsigned int t);

Moritz Lipp's avatar
Moritz Lipp committed
262 263 264 265 266
/**
 * Quit zathura
 *
 * @param session The used girara session
 * @param argument The used argument
Moritz Lipp's avatar
Moritz Lipp committed
267
 * @param event Girara event
268
 * @param t Number of executions
269
 * @return true if no error occurred otherwise false
Moritz Lipp's avatar
Moritz Lipp committed
270
 */
Moritz Lipp's avatar
Moritz Lipp committed
271
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
272 273 274 275 276 277

/**
 * Change the zoom level
 *
 * @param session The used girara session
 * @param argument The used argument
Moritz Lipp's avatar
Moritz Lipp committed
278
 * @param event Girara event
279
 * @param t Number of executions
280
 * @return true if no error occurred otherwise false
Moritz Lipp's avatar
Moritz Lipp committed
281
 */
Moritz Lipp's avatar
Moritz Lipp committed
282
bool sc_zoom(girara_session_t* session, girara_argument_t* argument, girara_event_t* event, unsigned int t);
283

284 285 286 287 288 289 290 291 292 293 294
/**
 * Run external command.
 *
 * @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 occurred otherwise false
 */
bool sc_exec(girara_session_t* session, girara_argument_t* argument, girara_event_t* event, unsigned int t);

295 296 297 298 299 300 301 302 303 304 305 306
/**
 * Remove search highlights.
 *
 * @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 occurred otherwise false
 */
bool sc_nohlsearch(girara_session_t* session, girara_argument_t* argument, girara_event_t* event, unsigned int t);


307
#endif // SHORTCUTS_H