ekg2
Strona główna
Dodatkowe strony
Moduły
Struktury Danych
Pliki
Lista plików
Globalne
All
Struktury Danych
Pliki
Funkcje
Zmienne
Definicje typów
Wyliczenia
Wartości wyliczeń
Definicje
Grupay
Strony
plugins
ncurses
old.h
Idź do dokumentacji tego pliku.
1
#ifndef __EKG_NCURSES_OLD_H
2
#define __EKG_NCURSES_OLD_H
3
4
#include "ekg2-config.h"
5
6
#include "
ecurses.h
"
7
8
#include <
ekg/commands.h
>
9
#include <
ekg/plugins.h
>
10
#include <
ekg/themes.h
>
11
#include <
ekg/windows.h
>
12
13
void
ncurses_init
(
void
);
14
void
ncurses_deinit
(
void
);
15
16
extern
plugin_t
ncurses_plugin
;
17
18
// int ncurses_resize_term;
19
20
extern
int
ncurses_plugin_destroyed
;
21
22
#define LINE_MAXLEN 1000
/* rozmiar linii */
23
#define MULTILINE_INPUT_SIZE 5
24
25
#define ncurses_current ((ncurses_window_t *) window_current->priv_data)
26
27
void
update_statusbar
(
int
commit);
28
29
struct
screen_line
{
30
int
len
;
/* długość linii */
31
32
CHAR_T
*
str
;
/* treść */
33
short
*
attr
;
/* atrybuty */
34
35
CHAR_T
*
prompt_str
;
/* treść promptu */
36
short
*
prompt_attr
;
/* atrybuty promptu */
37
int
prompt_len
;
/* długość promptu */
38
39
char
*
ts
;
/* timestamp */
40
short
*
ts_attr
;
/* attributes of the timestamp */
41
42
int
backlog
;
/* z której linii backlogu pochodzi? */
43
int
margin_left
;
/* where the margin should be setted */
44
};
45
46
enum
window_frame_t
{
47
WF_LEFT
= 1,
48
WF_TOP
= 2,
49
WF_RIGHT
= 4,
50
WF_BOTTOM
= 8,
51
WF_ALL
= 15
52
};
53
54
typedef
struct
{
55
WINDOW *
window
;
/* okno okna */
56
57
char
*prompt;
/* sformatowany prompt lub NULL */
58
int
prompt_len;
/* długość prompta lub 0 */
59
60
int
margin_left, margin_right, margin_top, margin_bottom;
61
/* marginesy */
62
63
fstring_t
**backlog;
/* bufor z liniami */
64
int
backlog_size;
/* rozmiar backloga */
65
66
int
redraw;
/* trzeba przerysować przed wyświetleniem */
67
68
int
start;
/* od której linii zaczyna się wyświetlanie */
69
int
lines_count;
/* ilość linii ekranowych w backlogu */
70
struct
screen_line
*
lines
;
71
/* linie ekranowe */
72
73
int
overflow;
/* ilość nadmiarowych linii w okienku */
74
75
int (*handle_redraw)(
window_t
*w);
76
/* obsługa przerysowania zawartości okna */
77
78
void (*handle_mouse)(
int
x,
int
y,
int
state);
79
80
CHAR_T
*
prompt_real
;
/* prompt shortened to 2/3 of window width & converted to real chartype */
81
int
prompt_real_len
;
/* real prompt length, including cutting, in chars instead of bytes */
82
time_t
last_red_line
;
/* timestamp for red line marker */
83
}
ncurses_window_t
;
84
85
struct
format_data
{
86
char
*
name
;
/* %{nazwa} */
87
char
*
text
;
/* treść */
88
};
89
90
extern
WINDOW *
ncurses_contacts
;
91
extern
WINDOW *
ncurses_input
;
92
93
QUERY
(
ncurses_session_disconnect_handler
);
94
95
void
ncurses_update_real_prompt
(
ncurses_window_t
*n);
96
void
ncurses_resize
(
void
);
97
int
ncurses_backlog_add
(
window_t
*w,
fstring_t
*str);
98
int
ncurses_backlog_split
(
window_t
*w,
int
full,
int
removed);
99
void
ncurses_redraw
(
window_t
*w);
100
void
ncurses_redraw_input
(
unsigned
int
ch
);
101
void
ncurses_clear
(
window_t
*w,
int
full);
102
void
ncurses_refresh
(
void
);
103
void
ncurses_commit
(
void
);
104
void
ncurses_input_update
(
int
new_line_index);
105
void
ncurses_line_adjust
(
void
);
106
#define line_adjust ncurses_line_adjust
107
void
ncurses_lines_adjust
(
void
);
108
#define lines_adjust ncurses_lines_adjust
109
int
ncurses_window_kill
(
window_t
*w);
110
int
ncurses_window_new
(
window_t
*w);
111
112
#define input ncurses_input
113
#define header ncurses_header
114
#define contacts ncurses_contacts
115
#define history ncurses_history
116
#define history_index ncurses_history_index
117
#define line_index ncurses_line_index
118
#define line_start ncurses_line_start
119
#define lines_index ncurses_lines_index
120
#define lines_start ncurses_lines_start
121
#define input_size ncurses_input_size
122
#define yanked ncurses_yanked
123
124
#define HISTORY_MAX 1000
125
extern
CHAR_T
*
ncurses_history
[
HISTORY_MAX
];
126
extern
int
ncurses_history_index
;
127
extern
CHAR_T
*
ncurses_line
;
128
extern
CHAR_T
*
ncurses_yanked
;
129
extern
CHAR_T
**
ncurses_lines
;
130
extern
int
ncurses_line_start
;
131
extern
int
ncurses_line_index
;
132
extern
int
ncurses_lines_start
;
133
extern
int
ncurses_lines_index
;
134
extern
int
ncurses_input_size
;
135
extern
int
ncurses_debug
;
136
137
void
header_statusbar_resize
(
const
char
*dummy);
138
#ifdef WITH_ASPELL
139
void
ncurses_spellcheck_init();
140
141
extern
int
config_aspell
;
142
extern
char
*
config_aspell_lang
;
143
#endif
144
void
changed_backlog_size
(
const
char
*var);
145
146
extern
int
config_backlog_size
;
147
extern
int
config_display_transparent
;
148
extern
int
config_enter_scrolls
;
149
extern
int
config_header_size
;
150
extern
int
config_margin_size
;
151
extern
int
config_statusbar_size
;
152
extern
int
config_kill_irc_window
;
153
154
extern
int
config_text_bottomalign
;
155
extern
int
config_typing_timeout
;
156
extern
int
config_typing_timeout_empty
;
157
158
int
ncurses_lastlog_update
(
window_t
*w);
159
void
ncurses_lastlog_new
(
window_t
*w);
160
extern
int
config_lastlog_size
;
161
extern
int
config_lastlog_lock
;
162
extern
int
config_mark_on_window_change
;
163
164
WATCHER
(
ncurses_watch_stdin
);
165
WATCHER
(
ncurses_watch_winch
);
166
int
ncurses_command_window
(
void
*data, va_list ap);
167
COMMAND
(
cmd_mark
);
168
169
extern
int
have_winch_pipe
;
170
extern
int
winch_pipe
[2];
171
172
#ifndef COLOR_DEFAULT
173
# define COLOR_DEFAULT (-1)
174
#endif
175
176
#endif
177
178
/*
179
* Local Variables:
180
* mode: c
181
* c-file-style: "k&r"
182
* c-basic-offset: 8
183
* indent-tabs-mode: t
184
* End:
185
*/
Wygenerowano So, 26 paź 2013 04:06:51 dla ekg2 programem
1.8.4