Released version 3-2014010900
[notion/jeffpc.git] / mod_query / edln.h
blobde66f6c31bc49a6584feecd10aaf8ed32797085b
1 /*
2 * ion/mod_query/edln.h
4 * Copyright (c) Tuomo Valkonen 1999-2009.
6 * See the included file LICENSE for details.
7 */
9 #ifndef ION_MOD_QUERY_EDLN_H
10 #define ION_MOD_QUERY_EDLN_H
12 #include <ioncore/common.h>
13 #include <libtu/obj.h>
15 INTRSTRUCT(Edln);
17 typedef void EdlnUpdateHandler(void*, int from, int mode);
19 #define EDLN_UPDATE_MOVED 0x01
20 #define EDLN_UPDATE_CHANGED 0x02
21 #define EDLN_UPDATE_NEW 0x04
23 DECLSTRUCT(Edln){
24 char *p;
25 char *tmp_p;
26 int point;
27 int mark;
28 int psize;
29 int palloced;
30 int tmp_palloced;
31 int modified;
32 int histent;
33 void *uiptr;
34 char *context;
36 EdlnUpdateHandler *ui_update;
40 bool edln_insstr(Edln *edln, const char *str);
41 bool edln_insstr_n(Edln *edln, const char *str, int len,
42 bool update, bool movepoint);
43 bool edln_transpose_chars(Edln *edln);
44 bool edln_transpose_words(Edln *edln);
45 void edln_back(Edln *edln);
46 void edln_forward(Edln *edln);
47 void edln_bol(Edln *edln);
48 void edln_eol(Edln *edln);
49 void edln_bskip_word(Edln *edln);
50 void edln_skip_word(Edln *edln);
51 void edln_set_point(Edln *edln, int point);
52 void edln_delete(Edln *edln);
53 void edln_backspace(Edln *edln);
54 void edln_kill_to_eol(Edln *edln);
55 void edln_kill_to_bol(Edln *edln);
56 void edln_kill_line(Edln *edln);
57 void edln_kill_word(Edln *edln);
58 void edln_bkill_word(Edln *edln);
59 void edln_set_mark(Edln *edln);
60 void edln_clear_mark(Edln *edln);
61 void edln_cut(Edln *edln);
62 void edln_copy(Edln *edln);
63 void edln_history_prev(Edln *edln, bool match);
64 void edln_history_next(Edln *edln, bool match);
65 uint edln_history_matches(Edln *edln, char ***h_ret);
66 bool edln_set_context(Edln *edln, const char *str);
68 bool edln_init(Edln *edln, const char *dflt);
69 void edln_deinit(Edln *edln);
70 char* edln_finish(Edln *edln);
72 #endif /* ION_MOD_QUERY_EDLN_H */