summaryrefslogtreecommitdiff
path: root/src/c_fl_text_display.h
blob: 5d4574b512447b5b4d36559b6028fa4488385547 (plain)
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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111


#ifndef FL_TEXT_DISPLAY_GUARD
#define FL_TEXT_DISPLAY_GUARD

#include "c_fl_text_buffer.h"




typedef void* TEXTDISPLAY;




extern "C" inline void text_display_set_draw_hook(TEXTDISPLAY td, void * d);
extern "C" inline void fl_text_display_draw(TEXTDISPLAY td);
extern "C" inline void text_display_set_handle_hook(TEXTDISPLAY td, void * h);
extern "C" inline int fl_text_display_handle(TEXTDISPLAY td, int e);




extern "C" inline TEXTDISPLAY new_fl_text_display(int x, int y, int w, int h, char* label);
extern "C" inline void free_fl_text_display(TEXTDISPLAY td);




extern "C" inline TEXTBUFFER fl_text_display_get_buffer(TEXTDISPLAY td);
extern "C" inline void fl_text_display_set_buffer(TEXTDISPLAY td, TEXTBUFFER tb);


extern "C" inline void fl_text_display_highlight_data(TEXTDISPLAY td, TEXTBUFFER tb, void * st, int len);
extern "C" inline void fl_text_display_highlight_data2(TEXTDISPLAY td, TEXTBUFFER tb, void * st, int len, char us, void * cb, void * a);


extern "C" inline double fl_text_display_col_to_x(TEXTDISPLAY td, double c);
extern "C" inline double fl_text_display_x_to_col(TEXTDISPLAY td, double x);
extern "C" inline int fl_text_display_in_selection(TEXTDISPLAY td, int x, int y);
extern "C" inline int fl_text_display_position_to_xy(TEXTDISPLAY td, int p, int * x, int * y);


extern "C" inline unsigned int fl_text_display_get_cursor_color(TEXTDISPLAY td);
extern "C" inline void fl_text_display_set_cursor_color(TEXTDISPLAY td, unsigned int c);
extern "C" inline void fl_text_display_set_cursor_style(TEXTDISPLAY td, int s);
extern "C" inline void fl_text_display_hide_cursor(TEXTDISPLAY td);
extern "C" inline void fl_text_display_show_cursor(TEXTDISPLAY td);


extern "C" inline unsigned int fl_text_display_get_text_color(TEXTDISPLAY td);
extern "C" inline void fl_text_display_set_text_color(TEXTDISPLAY td, unsigned int c);
extern "C" inline int fl_text_display_get_text_font(TEXTDISPLAY td);
extern "C" inline void fl_text_display_set_text_font(TEXTDISPLAY td, int f);
extern "C" inline int fl_text_display_get_text_size(TEXTDISPLAY td);
extern "C" inline void fl_text_display_set_text_size(TEXTDISPLAY td, int s);


extern "C" inline void fl_text_display_insert(TEXTDISPLAY td, char * i);
extern "C" inline void fl_text_display_overstrike(TEXTDISPLAY td, char * t);
extern "C" inline int fl_text_display_get_insert_pos(TEXTDISPLAY td);
extern "C" inline void fl_text_display_set_insert_pos(TEXTDISPLAY td, int p);
extern "C" inline void fl_text_display_show_insert_pos(TEXTDISPLAY td);


extern "C" inline int fl_text_display_word_start(TEXTDISPLAY td, int p);
extern "C" inline int fl_text_display_word_end(TEXTDISPLAY td, int p);
extern "C" inline void fl_text_display_next_word(TEXTDISPLAY td);
extern "C" inline void fl_text_display_previous_word(TEXTDISPLAY td);
extern "C" inline void fl_text_display_wrap_mode(TEXTDISPLAY td, int w, int m);


extern "C" inline int fl_text_display_line_start(TEXTDISPLAY td, int s);
extern "C" inline int fl_text_display_line_end(TEXTDISPLAY td, int s, int p);
extern "C" inline int fl_text_display_count_lines(TEXTDISPLAY td, int s, int f, int p);
extern "C" inline int fl_text_display_skip_lines(TEXTDISPLAY td, int s, int l, int p);
extern "C" inline int fl_text_display_rewind_lines(TEXTDISPLAY td, int s, int l);


extern "C" inline unsigned int fl_text_display_get_linenumber_align(TEXTDISPLAY td);
extern "C" inline void fl_text_display_set_linenumber_align(TEXTDISPLAY td, unsigned int a);
extern "C" inline unsigned int fl_text_display_get_linenumber_bgcolor(TEXTDISPLAY td);
extern "C" inline void fl_text_display_set_linenumber_bgcolor(TEXTDISPLAY td, unsigned int c);
extern "C" inline unsigned int fl_text_display_get_linenumber_fgcolor(TEXTDISPLAY td);
extern "C" inline void fl_text_display_set_linenumber_fgcolor(TEXTDISPLAY td, unsigned int c);
extern "C" inline int fl_text_display_get_linenumber_font(TEXTDISPLAY td);
extern "C" inline void fl_text_display_set_linenumber_font(TEXTDISPLAY td, int f);
extern "C" inline int fl_text_display_get_linenumber_size(TEXTDISPLAY td);
extern "C" inline void fl_text_display_set_linenumber_size(TEXTDISPLAY td, int s);
extern "C" inline int fl_text_display_get_linenumber_width(TEXTDISPLAY td);
extern "C" inline void fl_text_display_set_linenumber_width(TEXTDISPLAY td, int w);


extern "C" inline int fl_text_display_move_down(TEXTDISPLAY td);
extern "C" inline int fl_text_display_move_left(TEXTDISPLAY td);
extern "C" inline int fl_text_display_move_right(TEXTDISPLAY td);
extern "C" inline int fl_text_display_move_up(TEXTDISPLAY td);


extern "C" inline void fl_text_display_scroll(TEXTDISPLAY td, int l);
extern "C" inline unsigned int fl_text_display_get_scrollbar_align(TEXTDISPLAY td);
extern "C" inline void fl_text_display_set_scrollbar_align(TEXTDISPLAY td, unsigned int a);
extern "C" inline int fl_text_display_get_scrollbar_width(TEXTDISPLAY td);
extern "C" inline void fl_text_display_set_scrollbar_width(TEXTDISPLAY td, int w);


extern "C" inline void fl_text_display_redisplay_range(TEXTDISPLAY td, int s, int f);


#endif