Remove/mark some unused functions and parameters
[notion.git] / mod_query / wedln-wrappers.c
blob2d379f1c88a4eac82f6be5ba8b0d9b706d6fb119
1 /*
2 * ion/mod_query/wedln-wrappers.c
4 * Copyright (c) Tuomo Valkonen 1999-2009.
6 * See the included file LICENSE for details.
7 */
9 #include "wedln.h"
10 #include "edln.h"
11 #include "complete.h"
13 /*EXTL_DOC
14 * Move backward one character.
16 EXTL_EXPORT_MEMBER
17 void wedln_back(WEdln *wedln)
19 edln_back(&(wedln->edln));
22 /*EXTL_DOC
23 * Move forward one character.
25 EXTL_EXPORT_MEMBER
26 void wedln_forward(WEdln *wedln)
28 edln_forward(&(wedln->edln));
31 /*EXTL_DOC
32 * Transpose characters.
34 EXTL_EXPORT_MEMBER
35 void wedln_transpose_chars(WEdln *wedln)
37 edln_transpose_chars(&(wedln->edln));
40 /*EXTL_DOC
41 * Transpose words.
43 EXTL_EXPORT_MEMBER
44 void wedln_transpose_words(WEdln *wedln)
46 edln_transpose_words(&(wedln->edln));
49 /*EXTL_DOC
50 * Go to the beginning of line.
52 EXTL_EXPORT_MEMBER
53 void wedln_bol(WEdln *wedln)
55 edln_bol(&(wedln->edln));
58 /*EXTL_DOC
59 * Go to the end of line.
61 EXTL_EXPORT_MEMBER
62 void wedln_eol(WEdln *wedln)
64 edln_eol(&(wedln->edln));
67 /*EXTL_DOC
68 * Go to to end of current sequence of whitespace followed by alphanumeric
69 * characters..
71 EXTL_EXPORT_MEMBER
72 void wedln_skip_word(WEdln *wedln)
74 edln_skip_word(&(wedln->edln));
77 /*EXTL_DOC
78 * Go to to beginning of current sequence of alphanumeric characters
79 * followed by whitespace.
81 EXTL_EXPORT_MEMBER
82 void wedln_bskip_word(WEdln *wedln)
84 edln_bskip_word(&(wedln->edln));
87 /*EXTL_DOC
88 * Delete current character.
90 EXTL_EXPORT_MEMBER
91 void wedln_delete(WEdln *wedln)
93 edln_delete(&(wedln->edln));
96 /*EXTL_DOC
97 * Delete previous character.
99 EXTL_EXPORT_MEMBER
100 void wedln_backspace(WEdln *wedln)
102 edln_backspace(&(wedln->edln));
105 /*EXTL_DOC
106 * Delete all characters from current to end of line.
108 EXTL_EXPORT_MEMBER
109 void wedln_kill_to_eol(WEdln *wedln)
111 edln_kill_to_eol(&(wedln->edln));
114 /*EXTL_DOC
115 * Delete all characters from previous to beginning of line.
117 EXTL_EXPORT_MEMBER
118 void wedln_kill_to_bol(WEdln *wedln)
120 edln_kill_to_bol(&(wedln->edln));
123 /*EXTL_DOC
124 * Delete the whole line.
126 EXTL_EXPORT_MEMBER
127 void wedln_kill_line(WEdln *wedln)
129 edln_kill_line(&(wedln->edln));
132 /*EXTL_DOC
133 * Starting from the current point, delete possible whitespace and
134 * following alphanumeric characters until next non-alphanumeric character.
136 EXTL_EXPORT_MEMBER
137 void wedln_kill_word(WEdln *wedln)
139 edln_kill_word(&(wedln->edln));
142 /*EXTL_DOC
143 * Starting from the previous characters, delete possible whitespace and
144 * preceding alphanumeric characters until previous non-alphanumeric character.
146 EXTL_EXPORT_MEMBER
147 void wedln_bkill_word(WEdln *wedln)
149 edln_bkill_word(&(wedln->edln));
152 /*EXTL_DOC
153 * Set \emph{mark} to current cursor position.
155 EXTL_EXPORT_MEMBER
156 void wedln_set_mark(WEdln *wedln)
158 edln_set_mark(&(wedln->edln));
161 /*EXTL_DOC
162 * Clear \emph{mark}.
164 EXTL_EXPORT_MEMBER
165 void wedln_clear_mark(WEdln *wedln)
167 edln_clear_mark(&(wedln->edln));
170 /*EXTL_DOC
171 * Copy text between \emph{mark} and current cursor position to clipboard
172 * and then delete that sequence.
174 EXTL_EXPORT_MEMBER
175 void wedln_cut(WEdln *wedln)
177 edln_cut(&(wedln->edln));
180 /*EXTL_DOC
181 * Copy text between \emph{mark} and current cursor position to clipboard.
183 EXTL_EXPORT_MEMBER
184 void wedln_copy(WEdln *wedln)
186 edln_copy(&(wedln->edln));
189 /*EXTL_DOC
190 * Replace line editor contents with next entry in history if one exists.
191 * If \var{match} is \code{true}, the initial part of the history entry
192 * must match the current line from beginning to point.
194 EXTL_EXPORT_MEMBER
195 void wedln_history_next(WEdln *wedln, bool match)
197 edln_history_next(&(wedln->edln), match);
200 /*EXTL_DOC
201 * Replace line editor contents with previous in history if one exists.
202 * If \var{match} is \code{true}, the initial part of the history entry
203 * must match the current line from beginning to point.
205 EXTL_EXPORT_MEMBER
206 void wedln_history_prev(WEdln *wedln, bool match)
208 edln_history_prev(&(wedln->edln), match);
212 /*EXTL_DOC
213 * Input \var{str} in wedln at current editing point.
215 EXTL_EXPORT_AS(WEdln, insstr)
216 void wedln_insstr_exported(WEdln *wedln, const char *str)
218 edln_insstr(&(wedln->edln), str);
222 /*EXTL_DOC
223 * Get line editor contents.
225 EXTL_SAFE
226 EXTL_EXPORT_MEMBER
227 const char *wedln_contents(WEdln *wedln)
229 return wedln->edln.p;
232 /*EXTL_DOC
233 * Get current editing point.
234 * Beginning of the edited line is point 0.
236 EXTL_SAFE
237 EXTL_EXPORT_MEMBER
238 int wedln_point(WEdln *wedln)
240 return wedln->edln.point;
243 /*EXTL_DOC
244 * Get current mark (start of selection) for \var{wedln}.
245 * Return value of -1 indicates that there is no mark, and
246 * 0 is the beginning of the line.
248 EXTL_SAFE
249 EXTL_EXPORT_MEMBER
250 int wedln_mark(WEdln *wedln)
252 return wedln->edln.mark;
256 /*EXTL_DOC
257 * Set history context for \var{wedln}.
259 EXTL_EXPORT_MEMBER
260 void wedln_set_context(WEdln *wedln, const char *context)
262 edln_set_context(&(wedln->edln), context);
266 /*EXTL_DOC
267 * Get history context for \var{wedln}.
269 EXTL_SAFE
270 EXTL_EXPORT_MEMBER
271 const char *wedln_context(WEdln *wedln)
273 return wedln->edln.context;