26 |
|
|
27 |
#define INPUT_BUFFER_BLOCK_SIZE 256 |
#define INPUT_BUFFER_BLOCK_SIZE 256 |
28 |
|
|
29 |
#define NUM_COLORS 56 |
#define NUM_COLORS 57 |
30 |
#define COLOR_WIN_TITLE 1 |
#define COLOR_WIN_TITLE 1 |
31 |
#define COLOR_WIN_CHAT 2 |
#define COLOR_WIN_CHAT 2 |
32 |
#define COLOR_WIN_CHAT_TIME 3 |
#define COLOR_WIN_CHAT_TIME 3 |
33 |
#define COLOR_WIN_CHAT_TIME_SEP 4 |
#define COLOR_WIN_CHAT_TIME_SEP 4 |
34 |
#define COLOR_WIN_CHAT_PREFIX1 5 |
#define COLOR_WIN_CHAT_PREFIX1 5 |
35 |
#define COLOR_WIN_CHAT_PREFIX2 6 |
#define COLOR_WIN_CHAT_PREFIX2 6 |
36 |
#define COLOR_WIN_CHAT_JOIN 7 |
#define COLOR_WIN_CHAT_SERVER 7 |
37 |
#define COLOR_WIN_CHAT_PART 8 |
#define COLOR_WIN_CHAT_JOIN 8 |
38 |
#define COLOR_WIN_CHAT_NICK 9 |
#define COLOR_WIN_CHAT_PART 9 |
39 |
#define COLOR_WIN_CHAT_HOST 10 |
#define COLOR_WIN_CHAT_NICK 10 |
40 |
#define COLOR_WIN_CHAT_CHANNEL 11 |
#define COLOR_WIN_CHAT_HOST 11 |
41 |
#define COLOR_WIN_CHAT_DARK 12 |
#define COLOR_WIN_CHAT_CHANNEL 12 |
42 |
#define COLOR_WIN_CHAT_HIGHLIGHT 13 |
#define COLOR_WIN_CHAT_DARK 13 |
43 |
#define COLOR_WIN_STATUS 14 |
#define COLOR_WIN_CHAT_HIGHLIGHT 14 |
44 |
#define COLOR_WIN_STATUS_DELIMITERS 15 |
#define COLOR_WIN_STATUS 15 |
45 |
#define COLOR_WIN_STATUS_CHANNEL 16 |
#define COLOR_WIN_STATUS_DELIMITERS 16 |
46 |
#define COLOR_WIN_STATUS_DATA_MSG 17 |
#define COLOR_WIN_STATUS_CHANNEL 17 |
47 |
#define COLOR_WIN_STATUS_DATA_PRIVATE 18 |
#define COLOR_WIN_STATUS_DATA_MSG 18 |
48 |
#define COLOR_WIN_STATUS_DATA_HIGHLIGHT 19 |
#define COLOR_WIN_STATUS_DATA_PRIVATE 19 |
49 |
#define COLOR_WIN_STATUS_DATA_OTHER 20 |
#define COLOR_WIN_STATUS_DATA_HIGHLIGHT 20 |
50 |
#define COLOR_WIN_STATUS_MORE 21 |
#define COLOR_WIN_STATUS_DATA_OTHER 21 |
51 |
#define COLOR_WIN_INFOBAR 22 |
#define COLOR_WIN_STATUS_MORE 22 |
52 |
#define COLOR_WIN_INFOBAR_DELIMITERS 23 |
#define COLOR_WIN_INFOBAR 23 |
53 |
#define COLOR_WIN_INFOBAR_HIGHLIGHT 24 |
#define COLOR_WIN_INFOBAR_DELIMITERS 24 |
54 |
#define COLOR_WIN_INPUT 25 |
#define COLOR_WIN_INFOBAR_HIGHLIGHT 25 |
55 |
#define COLOR_WIN_INPUT_CHANNEL 26 |
#define COLOR_WIN_INPUT 26 |
56 |
#define COLOR_WIN_INPUT_NICK 27 |
#define COLOR_WIN_INPUT_CHANNEL 27 |
57 |
#define COLOR_WIN_INPUT_DELIMITERS 28 |
#define COLOR_WIN_INPUT_NICK 28 |
58 |
#define COLOR_WIN_NICK 29 |
#define COLOR_WIN_INPUT_DELIMITERS 29 |
59 |
#define COLOR_WIN_NICK_AWAY 30 |
#define COLOR_WIN_NICK 30 |
60 |
#define COLOR_WIN_NICK_CHANOWNER 31 |
#define COLOR_WIN_NICK_AWAY 31 |
61 |
#define COLOR_WIN_NICK_CHANADMIN 32 |
#define COLOR_WIN_NICK_CHANOWNER 32 |
62 |
#define COLOR_WIN_NICK_OP 33 |
#define COLOR_WIN_NICK_CHANADMIN 33 |
63 |
#define COLOR_WIN_NICK_HALFOP 34 |
#define COLOR_WIN_NICK_OP 34 |
64 |
#define COLOR_WIN_NICK_VOICE 35 |
#define COLOR_WIN_NICK_HALFOP 35 |
65 |
#define COLOR_WIN_NICK_MORE 36 |
#define COLOR_WIN_NICK_VOICE 36 |
66 |
#define COLOR_WIN_NICK_SEP 37 |
#define COLOR_WIN_NICK_MORE 37 |
67 |
#define COLOR_WIN_NICK_SELF 38 |
#define COLOR_WIN_NICK_SEP 38 |
68 |
#define COLOR_WIN_NICK_PRIVATE 39 |
#define COLOR_WIN_NICK_SELF 39 |
69 |
#define COLOR_WIN_NICK_FIRST 40 |
#define COLOR_WIN_NICK_PRIVATE 40 |
70 |
#define COLOR_WIN_NICK_LAST 49 |
#define COLOR_WIN_NICK_FIRST 41 |
71 |
|
#define COLOR_WIN_NICK_LAST 50 |
72 |
#define COLOR_WIN_NICK_NUMBER (COLOR_WIN_NICK_LAST - COLOR_WIN_NICK_FIRST + 1) |
#define COLOR_WIN_NICK_NUMBER (COLOR_WIN_NICK_LAST - COLOR_WIN_NICK_FIRST + 1) |
73 |
#define COLOR_DCC_SELECTED 50 |
#define COLOR_DCC_SELECTED 51 |
74 |
#define COLOR_DCC_WAITING 51 |
#define COLOR_DCC_WAITING 52 |
75 |
#define COLOR_DCC_CONNECTING 52 |
#define COLOR_DCC_CONNECTING 53 |
76 |
#define COLOR_DCC_ACTIVE 53 |
#define COLOR_DCC_ACTIVE 54 |
77 |
#define COLOR_DCC_DONE 54 |
#define COLOR_DCC_DONE 55 |
78 |
#define COLOR_DCC_FAILED 55 |
#define COLOR_DCC_FAILED 56 |
79 |
#define COLOR_DCC_ABORTED 56 |
#define COLOR_DCC_ABORTED 57 |
80 |
|
|
81 |
#define SERVER(buffer) ((t_irc_server *)(buffer->server)) |
#define SERVER(buffer) ((t_irc_server *)(buffer->server)) |
82 |
#define CHANNEL(buffer) ((t_irc_channel *)(buffer->channel)) |
#define CHANNEL(buffer) ((t_irc_channel *)(buffer->channel)) |
83 |
|
|
84 |
#define BUFFER_IS_SERVER(buffer) (SERVER(buffer) && !CHANNEL(buffer)) |
#define BUFFER_IS_SERVER(buffer) ((SERVER(buffer) || (buffer->all_servers)) && !CHANNEL(buffer)) |
85 |
#define BUFFER_IS_CHANNEL(buffer) (CHANNEL(buffer) && (CHANNEL(buffer)->type == CHAT_CHANNEL)) |
#define BUFFER_IS_CHANNEL(buffer) (CHANNEL(buffer) && (CHANNEL(buffer)->type == CHAT_CHANNEL)) |
86 |
#define BUFFER_IS_PRIVATE(buffer) (CHANNEL(buffer) && (CHANNEL(buffer)->type == CHAT_PRIVATE)) |
#define BUFFER_IS_PRIVATE(buffer) (CHANNEL(buffer) && (CHANNEL(buffer)->type == CHAT_PRIVATE)) |
87 |
|
|
93 |
#define MSG_TYPE_HIGHLIGHT 32 |
#define MSG_TYPE_HIGHLIGHT 32 |
94 |
#define MSG_TYPE_NOLOG 64 |
#define MSG_TYPE_NOLOG 64 |
95 |
|
|
96 |
|
#define gui_printf(buffer, fmt, argz...) \ |
97 |
|
gui_printf_internal(buffer, 1, MSG_TYPE_INFO, -1, fmt, ##argz) |
98 |
|
|
99 |
#define gui_printf_color(buffer, color, fmt, argz...) \ |
#define gui_printf_color(buffer, color, fmt, argz...) \ |
100 |
gui_printf_internal(buffer, 1, MSG_TYPE_INFO, color, fmt, ##argz) |
gui_printf_internal(buffer, 1, MSG_TYPE_INFO, color, fmt, ##argz) |
101 |
|
|
105 |
#define gui_printf_type_color(buffer, type, color, fmt, argz...) \ |
#define gui_printf_type_color(buffer, type, color, fmt, argz...) \ |
106 |
gui_printf_internal(buffer, 1, type, color, fmt, ##argz) |
gui_printf_internal(buffer, 1, type, color, fmt, ##argz) |
107 |
|
|
|
#define gui_printf(buffer, fmt, argz...) \ |
|
|
gui_printf_internal(buffer, 1, MSG_TYPE_INFO, -1, fmt, ##argz) |
|
|
|
|
108 |
#define gui_printf_nolog(buffer, fmt, argz...) \ |
#define gui_printf_nolog(buffer, fmt, argz...) \ |
109 |
gui_printf_internal(buffer, 1, MSG_TYPE_INFO | MSG_TYPE_NOLOG, -1, fmt, ##argz) |
gui_printf_internal(buffer, 1, MSG_TYPE_INFO | MSG_TYPE_NOLOG, -1, fmt, ##argz) |
110 |
|
|
174 |
|
|
175 |
/* server/channel */ |
/* server/channel */ |
176 |
void *server; /* buffer's server */ |
void *server; /* buffer's server */ |
177 |
|
int all_servers; /* =1 if all servers are displayed here */ |
178 |
void *channel; /* buffer's channel */ |
void *channel; /* buffer's channel */ |
179 |
int dcc; /* buffer is dcc status */ |
int dcc; /* buffer is dcc status */ |
180 |
|
|
331 |
extern void gui_buffer_free (t_gui_buffer *, int); |
extern void gui_buffer_free (t_gui_buffer *, int); |
332 |
extern t_gui_line *gui_new_line (t_gui_buffer *); |
extern t_gui_line *gui_new_line (t_gui_buffer *); |
333 |
extern t_gui_message *gui_new_message (t_gui_buffer *); |
extern t_gui_message *gui_new_message (t_gui_buffer *); |
334 |
extern void gui_input_clipboard_copy (char *, int); |
extern void gui_optimize_input_buffer_size (t_gui_buffer *); |
335 |
extern void gui_input_clipboard_paste (t_gui_window *); |
extern void gui_exec_action_dcc (t_gui_window *, char *); |
336 |
extern void gui_input_action_dcc (t_gui_window *, char *); |
extern int gui_insert_string_input (t_gui_window *, char *, int); |
337 |
extern int gui_input_insert_string (t_gui_window *, char *, int); |
extern void gui_merge_servers (t_gui_window *); |
338 |
extern void gui_input_return (t_gui_window *); |
extern void gui_split_server (t_gui_window *); |
339 |
extern void gui_input_tab (t_gui_window *); |
extern void gui_window_switch_server (t_gui_window *); |
|
extern void gui_input_backspace (t_gui_window *); |
|
|
extern void gui_input_delete (t_gui_window *); |
|
|
extern void gui_input_delete_previous_word (t_gui_window *); |
|
|
extern void gui_input_delete_next_word (t_gui_window *); |
|
|
extern void gui_input_delete_begin_of_line (t_gui_window *); |
|
|
extern void gui_input_delete_end_of_line (t_gui_window *); |
|
|
extern void gui_input_delete_line (t_gui_window *); |
|
|
extern void gui_input_transpose_chars (t_gui_window *); |
|
|
extern void gui_input_home (t_gui_window *); |
|
|
extern void gui_input_end (t_gui_window *); |
|
|
extern void gui_input_left (t_gui_window *); |
|
|
extern void gui_input_previous_word (t_gui_window *); |
|
|
extern void gui_input_right (t_gui_window *); |
|
|
extern void gui_input_next_word (t_gui_window *); |
|
|
extern void gui_input_up (t_gui_window *); |
|
|
extern void gui_input_up_global (t_gui_window *); |
|
|
extern void gui_input_down (t_gui_window *); |
|
|
extern void gui_input_down_global (t_gui_window *); |
|
|
extern void gui_input_jump_smart (t_gui_window *); |
|
|
extern void gui_input_jump_dcc (t_gui_window *); |
|
|
extern void gui_input_jump_last_buffer (t_gui_window *); |
|
|
extern void gui_input_jump_server (t_gui_window *); |
|
|
extern void gui_input_jump_next_server (t_gui_window *); |
|
|
extern void gui_input_hotlist_clear (t_gui_window *); |
|
|
extern void gui_input_infobar_clear (t_gui_window *); |
|
|
extern void gui_input_grab_key (t_gui_window *); |
|
340 |
extern void gui_switch_to_previous_buffer (t_gui_window *); |
extern void gui_switch_to_previous_buffer (t_gui_window *); |
341 |
extern void gui_switch_to_next_buffer (t_gui_window *); |
extern void gui_switch_to_next_buffer (t_gui_window *); |
342 |
extern void gui_switch_to_previous_window (t_gui_window *); |
extern void gui_switch_to_previous_window (t_gui_window *); |
348 |
extern void gui_window_print_log (t_gui_window *); |
extern void gui_window_print_log (t_gui_window *); |
349 |
extern void gui_buffer_print_log (t_gui_buffer *); |
extern void gui_buffer_print_log (t_gui_buffer *); |
350 |
|
|
351 |
|
/* GUI independent functions: actions */ |
352 |
|
|
353 |
|
extern void gui_action_clipboard_copy (char *, int); |
354 |
|
extern void gui_action_clipboard_paste (t_gui_window *); |
355 |
|
extern void gui_action_return (t_gui_window *); |
356 |
|
extern void gui_action_tab (t_gui_window *); |
357 |
|
extern void gui_action_backspace (t_gui_window *); |
358 |
|
extern void gui_action_delete (t_gui_window *); |
359 |
|
extern void gui_action_delete_previous_word (t_gui_window *); |
360 |
|
extern void gui_action_delete_next_word (t_gui_window *); |
361 |
|
extern void gui_action_delete_begin_of_line (t_gui_window *); |
362 |
|
extern void gui_action_delete_end_of_line (t_gui_window *); |
363 |
|
extern void gui_action_delete_line (t_gui_window *); |
364 |
|
extern void gui_action_transpose_chars (t_gui_window *); |
365 |
|
extern void gui_action_home (t_gui_window *); |
366 |
|
extern void gui_action_end (t_gui_window *); |
367 |
|
extern void gui_action_left (t_gui_window *); |
368 |
|
extern void gui_action_previous_word (t_gui_window *); |
369 |
|
extern void gui_action_right (t_gui_window *); |
370 |
|
extern void gui_action_next_word (t_gui_window *); |
371 |
|
extern void gui_action_up (t_gui_window *); |
372 |
|
extern void gui_action_up_global (t_gui_window *); |
373 |
|
extern void gui_action_down (t_gui_window *); |
374 |
|
extern void gui_action_down_global (t_gui_window *); |
375 |
|
extern void gui_action_page_up (t_gui_window *); |
376 |
|
extern void gui_action_page_down (t_gui_window *); |
377 |
|
extern void gui_action_nick_beginning (t_gui_window *); |
378 |
|
extern void gui_action_nick_end (t_gui_window *); |
379 |
|
extern void gui_action_nick_page_up (t_gui_window *); |
380 |
|
extern void gui_action_nick_page_down (t_gui_window *); |
381 |
|
extern void gui_action_jump_smart (t_gui_window *); |
382 |
|
extern void gui_action_jump_dcc (t_gui_window *); |
383 |
|
extern void gui_action_jump_last_buffer (t_gui_window *); |
384 |
|
extern void gui_action_jump_server (t_gui_window *); |
385 |
|
extern void gui_action_jump_next_server (t_gui_window *); |
386 |
|
extern void gui_action_switch_server (t_gui_window *); |
387 |
|
extern void gui_action_hotlist_clear (t_gui_window *); |
388 |
|
extern void gui_action_infobar_clear (t_gui_window *); |
389 |
|
extern void gui_action_refresh_screen (); |
390 |
|
extern void gui_action_grab_key (t_gui_window *); |
391 |
|
|
392 |
/* GUI independent functions: keys */ |
/* GUI independent functions: keys */ |
393 |
|
|
394 |
extern void gui_key_init (); |
extern void gui_key_init (); |
420 |
extern void gui_redraw_buffer (t_gui_buffer *); |
extern void gui_redraw_buffer (t_gui_buffer *); |
421 |
extern void gui_switch_to_buffer (t_gui_window *, t_gui_buffer *); |
extern void gui_switch_to_buffer (t_gui_window *, t_gui_buffer *); |
422 |
extern t_gui_buffer *gui_get_dcc_buffer (t_gui_window *); |
extern t_gui_buffer *gui_get_dcc_buffer (t_gui_window *); |
423 |
extern void gui_input_page_up (t_gui_window *); |
extern void gui_window_page_up (t_gui_window *); |
424 |
extern void gui_input_page_down (t_gui_window *); |
extern void gui_window_page_down (t_gui_window *); |
425 |
extern void gui_input_nick_beginning (t_gui_window *); |
extern void gui_window_nick_beginning (t_gui_window *); |
426 |
extern void gui_input_nick_end (t_gui_window *); |
extern void gui_window_nick_end (t_gui_window *); |
427 |
extern void gui_input_nick_page_up (t_gui_window *); |
extern void gui_window_nick_page_up (t_gui_window *); |
428 |
extern void gui_input_nick_page_down (t_gui_window *); |
extern void gui_window_nick_page_down (t_gui_window *); |
|
extern void gui_curses_resize_handler (); |
|
429 |
extern void gui_window_init_subwindows (t_gui_window *); |
extern void gui_window_init_subwindows (t_gui_window *); |
430 |
extern void gui_window_split_horiz (t_gui_window *); |
extern void gui_window_split_horiz (t_gui_window *); |
431 |
extern void gui_window_split_vertic (t_gui_window *); |
extern void gui_window_split_vertic (t_gui_window *); |
435 |
extern int gui_window_merge_right (t_gui_window *); |
extern int gui_window_merge_right (t_gui_window *); |
436 |
extern void gui_window_merge_auto (t_gui_window *); |
extern void gui_window_merge_auto (t_gui_window *); |
437 |
extern void gui_window_merge_all (t_gui_window *); |
extern void gui_window_merge_all (t_gui_window *); |
438 |
|
extern void gui_refresh_screen (); |
439 |
extern void gui_pre_init (int *, char **[]); |
extern void gui_pre_init (int *, char **[]); |
440 |
extern void gui_init_colors (); |
extern void gui_init_colors (); |
441 |
extern void gui_set_window_title (); |
extern void gui_set_window_title (); |