File: edln.h

package info (click to toggle)
notion 4.0.3%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 4,656 kB
  • sloc: ansic: 47,365; sh: 2,093; makefile: 594; perl: 270
file content (72 lines) | stat: -rw-r--r-- 1,814 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
/*
 * ion/mod_query/edln.h
 *
 * Copyright (c) Tuomo Valkonen 1999-2007.
 *
 * See the included file LICENSE for details.
 */

#ifndef ION_MOD_QUERY_EDLN_H
#define ION_MOD_QUERY_EDLN_H

#include <ioncore/common.h>
#include <libtu/obj.h>

INTRSTRUCT(Edln);

typedef void EdlnUpdateHandler(void*, int from, int mode);

#define EDLN_UPDATE_MOVED   0x01
#define EDLN_UPDATE_CHANGED 0x02
#define EDLN_UPDATE_NEW     0x04

DECLSTRUCT(Edln){
    char *p;
    char *tmp_p;
    int point;
    int mark;
    int psize;
    int palloced;
    int tmp_palloced;
    int modified;
    int histent;
    void *uiptr;
    char *context;

    EdlnUpdateHandler *ui_update;
};


bool edln_insstr(Edln *edln, const char *str);
bool edln_insstr_n(Edln *edln, const char *str, int len,
                   bool update, bool movepoint);
bool edln_transpose_chars(Edln *edln);
bool edln_transpose_words(Edln *edln);
void edln_back(Edln *edln);
void edln_forward(Edln *edln);
void edln_bol(Edln *edln);
void edln_eol(Edln *edln);
void edln_bskip_word(Edln *edln);
void edln_skip_word(Edln *edln);
void edln_set_point(Edln *edln, int point);
void edln_delete(Edln *edln);
void edln_backspace(Edln *edln);
void edln_kill_to_eol(Edln *edln);
void edln_kill_to_bol(Edln *edln);
void edln_kill_line(Edln *edln);
void edln_kill_word(Edln *edln);
void edln_bkill_word(Edln *edln);
void edln_set_mark(Edln *edln);
void edln_clear_mark(Edln *edln);
void edln_cut(Edln *edln);
void edln_copy(Edln *edln);
void edln_history_prev(Edln *edln, bool match);
void edln_history_next(Edln *edln, bool match);
uint edln_history_matches(Edln *edln, char ***h_ret);
bool edln_set_context(Edln *edln, const char *str);

bool edln_init(Edln *edln, const char *dflt);
void edln_deinit(Edln *edln);
char* edln_finish(Edln *edln);

#endif /* ION_MOD_QUERY_EDLN_H */