#ifndef __MCABBER_SCREEN_H__#define __MCABBER_SCREEN_H__ 1#include<glib.h>#include<mcabber/config.h>#if HAVE_NCURSESW_NCURSES_H# include <ncursesw/ncurses.h># include <ncursesw/panel.h>#elif HAVE_NCURSES_NCURSES_H# include <ncurses/ncurses.h># include <ncurses/panel.h>#else# include <ncurses.h># include <panel.h>#endif#if defined(WITH_ENCHANT) || defined(WITH_ASPELL)voidspellcheck_init(void);voidspellcheck_deinit(void);//static void spellcheck(char*, char*);#endif#include<mcabber/hbuf.h>#include<mcabber/logprint.h>#include<mcabber/roster.h>#define INPUTLINE_LENGTH 1024// Only used in screen.c; this is the maximum line number// in a multi-line message. Should be < 1000// Note: message length is limited by the HBB_BLOCKSIZE size too#define MULTILINE_MAX_LINE_NUMBER 299// When chatstates are enabled, timeout (in seconds) before "composing"// becomes "paused" because of user inactivity.// Warning: setting this very low will cause more network traffic.#define COMPOSING_TIMEOUT 6Lenumcolors{COLOR_GENERAL=3,COLOR_MSGOUT,COLOR_MSGHL,COLOR_STATUS,COLOR_ROSTER,COLOR_ROSTERSEL,COLOR_ROSTERSELNMSG,COLOR_ROSTERNMSG,COLOR_INFO,COLOR_MSGIN,COLOR_max};intCOLOR_ATTRIB[COLOR_max];externintupdate_roster;typedefstruct{intvalue;intutf8;enum{MKEY_META=1,MKEY_EQUIV,MKEY_CTRL_PGUP,MKEY_CTRL_PGDOWN,MKEY_SHIFT_PGUP,MKEY_SHIFT_PGDOWN,MKEY_CTRL_SHIFT_PGUP,MKEY_CTRL_SHIFT_PGDOWN,MKEY_CTRL_HOME,MKEY_CTRL_END,MKEY_CTRL_INS,MKEY_CTRL_DEL,MKEY_CTRL_SHIFT_HOME,MKEY_CTRL_SHIFT_END,MKEY_MOUSE}mcode;}keycode;typedefenum{MC_ALL,MC_PRESET,MC_OFF,MC_REMOVE}muccoltype;voidscr_init_bindings(void);voidscr_Getch(keycode*kcode);voidprocess_key(keycodekcode);voidscr_InitLocaleCharSet(void);voidscr_InitCurses(void);voidscr_TerminateCurses(void);voidscr_DrawMainWindow(unsignedintfullinit);voidscr_DrawRoster(void);voidscr_UpdateMainStatus(intforceupdate);voidscr_UpdateChatStatus(intforceupdate);voidscr_RosterVisibility(intstatus);voidscr_WriteIncomingMessage(constchar*jidfrom,constchar*text,time_ttimestamp,guintprefix,unsignedmucnicklen);voidscr_WriteOutgoingMessage(constchar*jidto,constchar*text,guintprefix,gpointerxep184);voidscr_RemoveReceiptFlag(constchar*jidto,gpointerxep184);voidscr_ShowBuddyWindow(void);intscr_BuddyBufferExists(constchar*jid);voidscr_UpdateBuddyWindow(void);voidscr_set_chatmode(intenable);intscr_get_chatmode(void);voidscr_set_multimode(intenable,char*subject);intscr_get_multimode(void);voidscr_setmsgflag_if_needed(constchar*jid,intspecial);voidscr_append_multiline(constchar*line);constchar*scr_get_multiline(void);constchar*scr_get_multimode_subj(void);guintscr_getprefixwidth(void);voidscr_line_prefix(hbb_line*line,char*prefix,guintpreflen);voidscr_Beep(void);boolAutoaway;voidscr_CheckAutoAway(intactivity);#if defined XEP0022 || defined XEP0085gbooleanscr_ChatStatesTimeout();#endifintchatstates_disabled;// For commands...voidscr_RosterTop(void);voidscr_RosterBottom(void);voidscr_RosterUpDown(intupdown,unsignedintn);voidscr_RosterPrevGroup(void);voidscr_RosterNextGroup(void);voidscr_RosterSearch(char*);voidscr_RosterJumpJid(char*);voidscr_RosterDisplay(constchar*);voidscr_BufferTopBottom(inttopbottom);voidscr_BufferClear(void);voidscr_BufferScrollLock(intlock);voidscr_BufferPurge(int,constchar*);voidscr_BufferPurgeAll(int);voidscr_BufferSearch(intdirection,constchar*text);voidscr_BufferPercent(intpc);voidscr_BufferDate(time_tt);voidscr_BufferDump(constchar*file);voidscr_RosterUnreadMessage(int);voidscr_RosterJumpAlternate(void);voidscr_BufferScrollUpDown(intupdown,unsignedintnblines);boolscr_RosterColor(constchar*status,constchar*wildcard,constchar*color);voidscr_RosterClearColor(void);voidscr_MucColor(constchar*muc,muccoltypetype);voidscr_MucNickColor(constchar*nick,constchar*color);voidscr_BufferList(void);voidreadline_transpose_chars(void);voidreadline_forward_kill_word(void);voidreadline_backward_kill_word(void);voidreadline_backward_word(void);voidreadline_forward_word(void);voidreadline_updowncase_word(int);voidreadline_capitalize_word(void);voidreadline_backward_char(void);voidreadline_forward_char(void);intreadline_accept_line(intdown_history);voidreadline_cancel_completion(void);voidreadline_do_completion(void);voidreadline_refresh_screen(void);voidreadline_disable_chat_mode(guintshow_roster);voidreadline_hist_beginning_search_bwd(void);voidreadline_hist_beginning_search_fwd(void);voidreadline_hist_prev(void);voidreadline_hist_next(void);voidreadline_backward_kill_char(void);voidreadline_forward_kill_char(void);voidreadline_iline_start(void);voidreadline_iline_end(void);voidreadline_backward_kill_iline(void);voidreadline_forward_kill_iline(void);voidreadline_send_multiline(void);#endif/* vim: set expandtab cindent cinoptions=>2\:2(0: For Vim users... */