commands.h 4.41 KB
Newer Older
1
/* SPDX-License-Identifier: Zlib */
Moritz Lipp's avatar
Moritz Lipp committed
2

3 4 5
#ifndef COMMANDS_H
#define COMMANDS_H

Moritz Lipp's avatar
Moritz Lipp committed
6
#include <stdbool.h>
7
#include <girara/types.h>
Moritz Lipp's avatar
Moritz Lipp committed
8

Moritz Lipp's avatar
Moritz Lipp committed
9 10 11 12
/**
 * Create a bookmark
 *
 * @param session The used girara session
Moritz Lipp's avatar
Moritz Lipp committed
13
 * @param argument_list List of passed arguments
14
 * @return true if no error occurred
Moritz Lipp's avatar
Moritz Lipp committed
15
 */
Moritz Lipp's avatar
Moritz Lipp committed
16
bool cmd_bookmark_create(girara_session_t* session, girara_list_t* argument_list);
Moritz Lipp's avatar
Moritz Lipp committed
17 18 19 20 21

/**
 * Delete a bookmark
 *
 * @param session The used girara session
Moritz Lipp's avatar
Moritz Lipp committed
22
 * @param argument_list List of passed arguments
23
 * @return true if no error occurred
Moritz Lipp's avatar
Moritz Lipp committed
24
 */
Moritz Lipp's avatar
Moritz Lipp committed
25
bool cmd_bookmark_delete(girara_session_t* session, girara_list_t* argument_list);
Moritz Lipp's avatar
Moritz Lipp committed
26 27 28 29 30

/**
 * Open a bookmark
 *
 * @param session The used girara session
Moritz Lipp's avatar
Moritz Lipp committed
31
 * @param argument_list List of passed arguments
32
 * @return true if no error occurred
Moritz Lipp's avatar
Moritz Lipp committed
33
 */
Moritz Lipp's avatar
Moritz Lipp committed
34
bool cmd_bookmark_open(girara_session_t* session, girara_list_t* argument_list);
Moritz Lipp's avatar
Moritz Lipp committed
35 36 37 38 39

/**
 * Close zathura
 *
 * @param session The used girara session
Moritz Lipp's avatar
Moritz Lipp committed
40
 * @param argument_list List of passed arguments
41
 * @return true if no error occurred
Moritz Lipp's avatar
Moritz Lipp committed
42
 */
Moritz Lipp's avatar
Moritz Lipp committed
43
bool cmd_close(girara_session_t* session, girara_list_t* argument_list);
Moritz Lipp's avatar
Moritz Lipp committed
44 45 46 47 48

/**
 * Display document information
 *
 * @param session The used girara session
Moritz Lipp's avatar
Moritz Lipp committed
49
 * @param argument_list List of passed arguments
50
 * @return true if no error occurred
Moritz Lipp's avatar
Moritz Lipp committed
51
 */
Moritz Lipp's avatar
Moritz Lipp committed
52
bool cmd_info(girara_session_t* session, girara_list_t* argument_list);
53 54 55 56 57 58

/**
 * Display help
 *
 * @param session The used girara session
 * @param argument_list List of passed arguments
59
 * @return true if no error occurred
60 61
 */
bool cmd_help(girara_session_t* session, girara_list_t* argument_list);
Moritz Lipp's avatar
Moritz Lipp committed
62

63 64 65 66 67
/**
 * Shows current search results
 *
 * @param session The used girara session
 * @param argument_list List of passed arguments
68
 * @return true if no error occurred
69 70 71
 */
bool cmd_hlsearch(girara_session_t* session, girara_list_t* argument_list);

72 73 74 75 76
/**
 * Opens a document file
 *
 * @param session The used girara session
 * @param argument_list List of passed arguments
77
 * @return true if no error occurred
78 79 80
 */
bool cmd_open(girara_session_t* session, girara_list_t* argument_list);

Moritz Lipp's avatar
Moritz Lipp committed
81 82 83 84
/**
 * Print the current file
 *
 * @param session The used girara session
Moritz Lipp's avatar
Moritz Lipp committed
85
 * @param argument_list List of passed arguments
86
 * @return true if no error occurred
Moritz Lipp's avatar
Moritz Lipp committed
87
 */
Moritz Lipp's avatar
Moritz Lipp committed
88
bool cmd_print(girara_session_t* session, girara_list_t* argument_list);
Moritz Lipp's avatar
Moritz Lipp committed
89

90 91 92 93 94
/**
 * Hides current search results
 *
 * @param session The used girara session
 * @param argument_list List of passed arguments
95
 * @return true if no error occurred
96 97 98
 */
bool cmd_nohlsearch(girara_session_t* session, girara_list_t* argument_list);

Moritz Lipp's avatar
Moritz Lipp committed
99 100 101 102 103
/**
 * Close zathura
 *
 * @param session The used girara session
 * @param argument_list List of passed arguments
104
 * @return true if no error occurred
Moritz Lipp's avatar
Moritz Lipp committed
105 106 107
 */
bool cmd_quit(girara_session_t* session, girara_list_t* argument_list);

Moritz Lipp's avatar
Moritz Lipp committed
108 109 110 111
/**
 * Save the current file
 *
 * @param session The used girara session
Moritz Lipp's avatar
Moritz Lipp committed
112
 * @param argument_list List of passed arguments
113
 * @return true if no error occurred
Moritz Lipp's avatar
Moritz Lipp committed
114
 */
Moritz Lipp's avatar
Moritz Lipp committed
115
bool cmd_save(girara_session_t* session, girara_list_t* argument_list);
116

117 118 119 120 121
/**
 * Save the current file and overwrite existing files
 *
 * @param session The used girara session
 * @param argument_list List of passed arguments
122
 * @return true if no error occurred
123 124 125
 */
bool cmd_savef(girara_session_t* session, girara_list_t* argument_list);

Moritz Lipp's avatar
Moritz Lipp committed
126 127 128 129 130 131
/**
 * Search the current file
 *
 * @param session The used girara session
 * @param input The current input
 * @param argument Passed argument
132
 * @return true if no error occurred
Moritz Lipp's avatar
Moritz Lipp committed
133
 */
Sebastian Ramacher's avatar
Sebastian Ramacher committed
134
bool cmd_search(girara_session_t* session, const char* input, girara_argument_t* argument);
135

Sebastian Ramacher's avatar
Sebastian Ramacher committed
136 137 138 139 140
/**
 * Save attachment to a file
 *
 * @param session The used girara session
 * @param argument_list List of passed arguments
141
 * @return true if no error occurred
Sebastian Ramacher's avatar
Sebastian Ramacher committed
142 143 144
 */
bool cmd_export(girara_session_t* session, girara_list_t* argument_list);

Moritz Lipp's avatar
Moritz Lipp committed
145 146 147 148 149
/**
 * Execute command
 *
 * @param session The used girara session
 * @param argument_list List of passed arguments
150
 * @return true if no error occurred
Moritz Lipp's avatar
Moritz Lipp committed
151 152 153
 */
bool cmd_exec(girara_session_t* session, girara_list_t* argument_list);

154 155 156 157 158
/**
 * Set page offset
 *
 * @param session The used girara session
 * @param argument_list List of passed arguments
159
 * @return true if no error occurred
160 161 162
 */
bool cmd_offset(girara_session_t* session, girara_list_t* argument_list);

Moritz Lipp's avatar
Moritz Lipp committed
163 164 165 166 167
/**
 * Shows version information
 *
 * @param session The used girara session
 * @param argument_list List of passed arguments
168
 * @return true if no error occurred
Moritz Lipp's avatar
Moritz Lipp committed
169 170 171
 */
bool cmd_version(girara_session_t* session, girara_list_t* argument_list);

172
#endif // COMMANDS_H