1 #ifndef __MCABBER_SCREEN_H__
2 #define __MCABBER_SCREEN_H__ 1
6 #include <mcabber/config.h>
8 #if HAVE_NCURSESW_NCURSES_H
9 # include <ncursesw/ncurses.h>
10 # include <ncursesw/panel.h>
11 #elif HAVE_NCURSES_NCURSES_H
12 # include <ncurses/ncurses.h>
13 # include <ncurses/panel.h>
19 #if defined(WITH_ENCHANT) || defined(WITH_ASPELL)
20 void spellcheck_init(void);
21 void spellcheck_deinit(void);
22 //static void spellcheck(char*, char*);
25 #include <mcabber/hbuf.h>
26 #include <mcabber/logprint.h>
27 #include <mcabber/roster.h>
29 #define INPUTLINE_LENGTH 1024
31 // Only used in screen.c; this is the maximum line number
32 // in a multi-line message. Should be < 1000
33 // Note: message length is limited by the HBB_BLOCKSIZE size too
34 #define MULTILINE_MAX_LINE_NUMBER 299
36 // When chatstates are enabled, timeout (in seconds) before "composing"
37 // becomes "paused" because of user inactivity.
38 // Warning: setting this very low will cause more network traffic.
39 #define COMPOSING_TIMEOUT 6L
55 int COLOR_ATTRIB
[COLOR_max
];
57 extern int update_roster
;
58 extern gboolean chatstates_disabled
;
59 extern gboolean Autoaway
;
72 MKEY_CTRL_SHIFT_PGDOWN
,
91 void scr_write_incoming_message(const char *jidfrom
, const char *text
,
92 time_t timestamp
, guint prefix
,
94 void scr_write_outgoing_message(const char *jidto
, const char *text
,
95 guint prefix
, gpointer xep184
);
97 void scr_getch(keycode
*kcode
);
98 void scr_process_key(keycode kcode
);
100 void scr_init_bindings(void);
101 void scr_init_locale_charset(void);
102 void scr_init_curses(void);
103 void scr_terminate_curses(void);
104 gboolean
scr_curses_status(void);
105 void scr_draw_main_window(unsigned int fullinit
);
106 void scr_draw_roster(void);
107 void scr_update_main_status(int forceupdate
);
108 void scr_update_chat_status(int forceupdate
);
109 void scr_roster_visibility(int status
);
110 void scr_remove_receipt_flag(const char *jidto
, gpointer xep184
);
111 void scr_show_buddy_window(void);
112 int scr_buddy_buffer_exists(const char *jid
);
113 void scr_update_buddy_window(void);
114 void scr_set_chatmode(int enable
);
115 int scr_get_chatmode(void);
116 void scr_set_multimode(int enable
, char *subject
);
117 int scr_get_multimode(void);
118 void scr_setmsgflag_if_needed(const char *jid
, int special
);
119 void scr_setattentionflag_if_needed(const char *bjid
, int special
,
120 guint value
, enum setuiprio_ops action
);
121 void scr_append_multiline(const char *line
);
122 const char *scr_get_multiline(void);
123 const char *scr_get_multimode_subj(void);
125 guint
scr_getprefixwidth(void);
126 guint
scr_gettextwidth(void);
127 guint
scr_gettextheight(void);
128 guint
scr_getlogwinheight(void);
129 void scr_line_prefix(hbb_line
*line
, char *prefix
, guint preflen
);
132 void scr_check_auto_away(int activity
);
136 void scr_roster_top(void);
137 void scr_roster_bottom(void);
138 void scr_roster_up_down(int updown
, unsigned int n
);
139 void scr_roster_prev_group(void);
140 void scr_roster_next_group(void);
141 void scr_roster_search(char *);
142 void scr_roster_jump_jid(char *);
143 void scr_roster_jump_alternate(void);
144 void scr_roster_unread_message(int);
145 void scr_roster_display(const char *);
147 void scr_buffer_top_bottom(int topbottom
);
148 void scr_buffer_clear(void);
149 void scr_buffer_scroll_lock(int lock
);
150 void scr_buffer_purge(int, const char*);
151 void scr_buffer_purge_all(int);
152 void scr_buffer_search(int direction
, const char *text
);
153 void scr_buffer_percent(int pc
);
154 void scr_buffer_date(time_t t
);
155 void scr_buffer_dump(const char *file
);
156 void scr_buffer_list(void);
157 void scr_buffer_scroll_up_down(int updown
, unsigned int nblines
);
159 bool scr_roster_color(const char *status
, const char *wildcard
,
161 void scr_roster_clear_color(void);
162 void scr_muc_color(const char *muc
, muccoltype type
);
163 void scr_muc_nick_color(const char *nick
, const char *color
);
165 void readline_transpose_chars(void);
166 void readline_forward_kill_word(void);
167 void readline_backward_kill_word(void);
168 void readline_backward_word(void);
169 void readline_forward_word(void);
170 void readline_updowncase_word(int);
171 void readline_capitalize_word(void);
172 void readline_backward_char(void);
173 void readline_forward_char(void);
174 int readline_accept_line(int down_history
);
175 void readline_cancel_completion(void);
176 void readline_do_completion(void);
177 void readline_refresh_screen(void);
178 void readline_disable_chat_mode(guint show_roster
);
179 void readline_hist_beginning_search_bwd(void);
180 void readline_hist_beginning_search_fwd(void);
181 void readline_hist_prev(void);
182 void readline_hist_next(void);
183 void readline_backward_kill_char(void);
184 void readline_forward_kill_char(void);
185 void readline_iline_start(void);
186 void readline_iline_end(void);
187 void readline_backward_kill_iline(void);
188 void readline_forward_kill_iline(void);
189 void readline_send_multiline(void);
192 // For backward compatibility:
194 #define scr_WriteIncomingMessage scr_write_incoming_message
195 #define scr_WriteOutgoingMessage scr_write_outgoing_message
199 /* vim: set et cindent cinoptions=>2\:2(0 ts=2 sw=2: For Vim users... */