Mercurial > ~mikael > mcabber > hg
comparison mcabber/mcabber/screen.h @ 1668:41c26b7d2890
Install mcabber headers
* Change mcabber headers naming scheme
* Move 'src/' -> 'mcabber/'
* Add missing include <mcabber/config.h>'s
* Create and install clean config.h version in 'include/'
* Move "dirty" config.h version to 'mcabber/'
* Add $(top_srcdir) to compiler include path
* Update modules HOWTO
author | Myhailo Danylenko <isbear@ukrpost.net> |
---|---|
date | Mon, 18 Jan 2010 15:36:19 +0200 |
parents | mcabber/src/screen.h@f4a2c6f767d1 |
children | b2e0083891cc |
comparison
equal
deleted
inserted
replaced
1667:8af0e0ad20ad | 1668:41c26b7d2890 |
---|---|
1 #ifndef __MCABBER_SCREEN_H__ | |
2 #define __MCABBER_SCREEN_H__ 1 | |
3 | |
4 #include <glib.h> | |
5 | |
6 #include <mcabber/config.h> | |
7 | |
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> | |
14 #else | |
15 # include <ncurses.h> | |
16 # include <panel.h> | |
17 #endif | |
18 | |
19 #if defined(WITH_ENCHANT) || defined(WITH_ASPELL) | |
20 void spellcheck_init(void); | |
21 void spellcheck_deinit(void); | |
22 //static void spellcheck(char*, char*); | |
23 #endif | |
24 | |
25 #include <mcabber/hbuf.h> | |
26 #include <mcabber/logprint.h> | |
27 #include <mcabber/roster.h> | |
28 | |
29 #define INPUTLINE_LENGTH 1024 | |
30 | |
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 | |
35 | |
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 | |
40 | |
41 enum colors { | |
42 COLOR_GENERAL = 3, | |
43 COLOR_MSGOUT, | |
44 COLOR_MSGHL, | |
45 COLOR_STATUS, | |
46 COLOR_ROSTER, | |
47 COLOR_ROSTERSEL, | |
48 COLOR_ROSTERSELNMSG, | |
49 COLOR_ROSTERNMSG, | |
50 COLOR_INFO, | |
51 COLOR_MSGIN, | |
52 COLOR_max | |
53 }; | |
54 | |
55 int COLOR_ATTRIB[COLOR_max]; | |
56 | |
57 extern int update_roster; | |
58 | |
59 typedef struct { | |
60 int value; | |
61 int utf8; | |
62 enum { | |
63 MKEY_META = 1, | |
64 MKEY_EQUIV, | |
65 MKEY_CTRL_PGUP, | |
66 MKEY_CTRL_PGDOWN, | |
67 MKEY_SHIFT_PGUP, | |
68 MKEY_SHIFT_PGDOWN, | |
69 MKEY_CTRL_SHIFT_PGUP, | |
70 MKEY_CTRL_SHIFT_PGDOWN, | |
71 MKEY_CTRL_HOME, | |
72 MKEY_CTRL_END, | |
73 MKEY_CTRL_INS, | |
74 MKEY_CTRL_DEL, | |
75 MKEY_CTRL_SHIFT_HOME, | |
76 MKEY_CTRL_SHIFT_END, | |
77 MKEY_MOUSE | |
78 } mcode; | |
79 } keycode; | |
80 | |
81 typedef enum { | |
82 MC_ALL, | |
83 MC_PRESET, | |
84 MC_OFF, | |
85 MC_REMOVE | |
86 } muccoltype; | |
87 | |
88 void scr_init_bindings(void); | |
89 | |
90 void scr_Getch(keycode *kcode); | |
91 void process_key(keycode kcode); | |
92 | |
93 void scr_InitLocaleCharSet(void); | |
94 void scr_InitCurses(void); | |
95 void scr_TerminateCurses(void); | |
96 void scr_DrawMainWindow(unsigned int fullinit); | |
97 void scr_DrawRoster(void); | |
98 void scr_UpdateMainStatus(int forceupdate); | |
99 void scr_UpdateChatStatus(int forceupdate); | |
100 void scr_RosterVisibility(int status); | |
101 void scr_WriteIncomingMessage(const char *jidfrom, const char *text, | |
102 time_t timestamp, guint prefix, | |
103 unsigned mucnicklen); | |
104 void scr_WriteOutgoingMessage(const char *jidto, const char *text, | |
105 guint prefix, gpointer xep184); | |
106 void scr_RemoveReceiptFlag(const char *jidto, gpointer xep184); | |
107 void scr_ShowBuddyWindow(void); | |
108 int scr_BuddyBufferExists(const char *jid); | |
109 void scr_UpdateBuddyWindow(void); | |
110 void scr_set_chatmode(int enable); | |
111 int scr_get_chatmode(void); | |
112 void scr_set_multimode(int enable, char *subject); | |
113 int scr_get_multimode(void); | |
114 void scr_setmsgflag_if_needed(const char *jid, int special); | |
115 void scr_append_multiline(const char *line); | |
116 const char *scr_get_multiline(void); | |
117 const char *scr_get_multimode_subj(void); | |
118 | |
119 guint scr_getprefixwidth(void); | |
120 void scr_line_prefix(hbb_line *line, char *prefix, guint preflen); | |
121 | |
122 void scr_Beep(void); | |
123 | |
124 bool Autoaway; | |
125 | |
126 void scr_CheckAutoAway(int activity); | |
127 | |
128 #if defined JEP0022 || defined JEP0085 | |
129 gboolean scr_ChatStatesTimeout(); | |
130 #endif | |
131 int chatstates_disabled; | |
132 | |
133 // For commands... | |
134 void scr_RosterTop(void); | |
135 void scr_RosterBottom(void); | |
136 void scr_RosterUpDown(int updown, unsigned int n); | |
137 void scr_RosterPrevGroup(void); | |
138 void scr_RosterNextGroup(void); | |
139 void scr_RosterSearch(char *); | |
140 void scr_RosterJumpJid(char *); | |
141 void scr_RosterDisplay(const char *); | |
142 void scr_BufferTopBottom(int topbottom); | |
143 void scr_BufferClear(void); | |
144 void scr_BufferScrollLock(int lock); | |
145 void scr_BufferPurge(int, const char*); | |
146 void scr_BufferPurgeAll(int); | |
147 void scr_BufferSearch(int direction, const char *text); | |
148 void scr_BufferPercent(int pc); | |
149 void scr_BufferDate(time_t t); | |
150 void scr_BufferDump(const char *file); | |
151 void scr_RosterUnreadMessage(int); | |
152 void scr_RosterJumpAlternate(void); | |
153 void scr_BufferScrollUpDown(int updown, unsigned int nblines); | |
154 bool scr_RosterColor(const char *status, const char *wildcard, | |
155 const char *color); | |
156 void scr_RosterClearColor(void); | |
157 void scr_MucColor(const char *muc, muccoltype type); | |
158 void scr_MucNickColor(const char *nick, const char *color); | |
159 void scr_BufferList(void); | |
160 | |
161 void readline_transpose_chars(void); | |
162 void readline_forward_kill_word(void); | |
163 void readline_backward_kill_word(void); | |
164 void readline_backward_word(void); | |
165 void readline_forward_word(void); | |
166 void readline_updowncase_word(int); | |
167 void readline_capitalize_word(void); | |
168 void readline_backward_char(void); | |
169 void readline_forward_char(void); | |
170 int readline_accept_line(int down_history); | |
171 void readline_cancel_completion(void); | |
172 void readline_do_completion(void); | |
173 void readline_refresh_screen(void); | |
174 void readline_disable_chat_mode(guint show_roster); | |
175 void readline_hist_beginning_search_bwd(void); | |
176 void readline_hist_beginning_search_fwd(void); | |
177 void readline_hist_prev(void); | |
178 void readline_hist_next(void); | |
179 void readline_backward_kill_char(void); | |
180 void readline_forward_kill_char(void); | |
181 void readline_iline_start(void); | |
182 void readline_iline_end(void); | |
183 void readline_backward_kill_iline(void); | |
184 void readline_forward_kill_iline(void); | |
185 void readline_send_multiline(void); | |
186 | |
187 #endif | |
188 | |
189 /* vim: set expandtab cindent cinoptions=>2\:2(0: For Vim users... */ |