4 * Copyright (c) Tuomo Valkonen 1999-2006.
6 * Ion is free software; you can redistribute it and/or modify it under
7 * the terms of the GNU Lesser General Public License as published by
8 * the Free Software Foundation; either version 2.1 of the License, or
9 * (at your option) any later version.
12 #ifndef ION_MOD_QUERY_EDLN_H
13 #define ION_MOD_QUERY_EDLN_H
15 #include <ioncore/common.h>
16 #include <libtu/obj.h>
20 typedef void EdlnUpdateHandler(void*, int from, int mode);
22 #define EDLN_UPDATE_MOVED 0x01
23 #define EDLN_UPDATE_CHANGED 0x02
24 #define EDLN_UPDATE_NEW 0x04
39 EdlnUpdateHandler *ui_update;
43 bool edln_insstr(Edln *edln, const char *str);
44 bool edln_insstr_n(Edln *edln, const char *str, int len,
45 bool update, bool movepoint);
46 bool edln_transpose_chars(Edln *edln);
47 bool edln_transpose_words(Edln *edln);
48 void edln_back(Edln *edln);
49 void edln_forward(Edln *edln);
50 void edln_bol(Edln *edln);
51 void edln_eol(Edln *edln);
52 void edln_bskip_word(Edln *edln);
53 void edln_skip_word(Edln *edln);
54 void edln_set_point(Edln *edln, int point);
55 void edln_delete(Edln *edln);
56 void edln_backspace(Edln *edln);
57 void edln_kill_to_eol(Edln *edln);
58 void edln_kill_to_bol(Edln *edln);
59 void edln_kill_line(Edln *edln);
60 void edln_kill_word(Edln *edln);
61 void edln_bkill_word(Edln *edln);
62 void edln_set_mark(Edln *edln);
63 void edln_clear_mark(Edln *edln);
64 void edln_cut(Edln *edln);
65 void edln_copy(Edln *edln);
66 void edln_history_prev(Edln *edln, bool match);
67 void edln_history_next(Edln *edln, bool match);
68 uint edln_history_matches(Edln *edln, char ***h_ret);
69 bool edln_set_context(Edln *edln, const char *str);
71 bool edln_init(Edln *edln, const char *dflt);
72 void edln_deinit(Edln *edln);
73 char* edln_finish(Edln *edln);
75 #endif /* ION_MOD_QUERY_EDLN_H */