author | Mikael Berthe <mikael@lilotux.net> |
Thu, 29 Sep 2005 21:28:39 +0200 | |
changeset 462 | d580e87c11ed |
parent 389 | 6e895f397474 |
child 464 | e4840b288be0 |
permissions | -rw-r--r-- |
24 | 1 |
#ifndef __SCREEN_H__ |
2 |
#define __SCREEN_H__ 1 |
|
3 |
||
4 |
#include <ncurses.h> |
|
173 | 5 |
#include <glib.h> |
24 | 6 |
|
374
bd5638c21834
Improve logging system (traces)
Mikael Berthe <mikael@lilotux.net>
parents:
370
diff
changeset
|
7 |
#include "logprint.h" |
bd5638c21834
Improve logging system (traces)
Mikael Berthe <mikael@lilotux.net>
parents:
370
diff
changeset
|
8 |
|
24 | 9 |
#define COLOR_GENERAL 3 |
267 | 10 |
#define COLOR_NMSG 4 |
11 |
#define COLOR_BD_DESSEL 5 |
|
12 |
#define COLOR_BD_DES 6 |
|
24 | 13 |
|
14 |
#define LOG_WIN_HEIGHT (5+2) |
|
74 | 15 |
#define ROSTER_WIDTH 24 |
185 | 16 |
#define PREFIX_WIDTH 17 |
24 | 17 |
#define CHAT_WIN_HEIGHT (maxY-1-LOG_WIN_HEIGHT) |
18 |
||
19 |
#define INPUTLINE_LENGTH 1024 |
|
20 |
||
276
627925d885de
Limit the number of lines in multi-line messages
Mikael Berthe <mikael@lilotux.net>
parents:
267
diff
changeset
|
21 |
// Only used in screen.c; this is the maximum line number |
627925d885de
Limit the number of lines in multi-line messages
Mikael Berthe <mikael@lilotux.net>
parents:
267
diff
changeset
|
22 |
// in a multi-line message. Should be < 1000 |
627925d885de
Limit the number of lines in multi-line messages
Mikael Berthe <mikael@lilotux.net>
parents:
267
diff
changeset
|
23 |
// Note: message length is limited by the HBB_BLOCKSIZE size too |
627925d885de
Limit the number of lines in multi-line messages
Mikael Berthe <mikael@lilotux.net>
parents:
267
diff
changeset
|
24 |
#define MULTILINE_MAX_LINE_NUMBER 299 |
627925d885de
Limit the number of lines in multi-line messages
Mikael Berthe <mikael@lilotux.net>
parents:
267
diff
changeset
|
25 |
|
30 | 26 |
extern int update_roster; |
24 | 27 |
|
28 |
void scr_InitCurses(void); |
|
374
bd5638c21834
Improve logging system (traces)
Mikael Berthe <mikael@lilotux.net>
parents:
370
diff
changeset
|
29 |
void scr_TerminateCurses(void); |
151 | 30 |
void scr_DrawMainWindow(unsigned int fullinit); |
81 | 31 |
void scr_DrawRoster(void); |
184 | 32 |
void scr_WriteIncomingMessage(const char *jidfrom, const char *text, |
190 | 33 |
time_t timestamp, guint prefix); |
50 | 34 |
void scr_WriteOutgoingMessage(const char *jidto, const char *text); |
24 | 35 |
void scr_ShowBuddyWindow(void); |
129 | 36 |
inline void scr_set_chatmode(int enable); |
238 | 37 |
inline void scr_set_multimode(int enable); |
38 |
inline int scr_get_multimode(); |
|
39 |
void scr_append_multiline(const char *line); |
|
40 |
inline const char *scr_get_multiline(); |
|
24 | 41 |
|
42 |
int scr_Getch(void); |
|
43 |
||
29 | 44 |
int process_key(int); |
24 | 45 |
|
322
da138cdebf04
Implement auto-away mode
Mikael Berthe <mikael@lilotux.net>
parents:
314
diff
changeset
|
46 |
void scr_CheckAutoAway(bool activity); |
da138cdebf04
Implement auto-away mode
Mikael Berthe <mikael@lilotux.net>
parents:
314
diff
changeset
|
47 |
|
104 | 48 |
// For commands... |
108 | 49 |
void scr_RosterTop(void); |
50 |
void scr_RosterBottom(void); |
|
377
00809e3e327e
Add "/roster up" and "/roster down"
Mikael Berthe <mikael@lilotux.net>
parents:
374
diff
changeset
|
51 |
void scr_RosterUp(void); |
00809e3e327e
Add "/roster up" and "/roster down"
Mikael Berthe <mikael@lilotux.net>
parents:
374
diff
changeset
|
52 |
void scr_RosterDown(void); |
265 | 53 |
void scr_RosterSearch(char *); |
361
51ff319947c3
Code cleanup/optimization
Mikael Berthe <mikael@lilotux.net>
parents:
336
diff
changeset
|
54 |
void scr_BufferTopBottom(int topbottom); |
369
499170ed71c9
Rename some buffer commands, for homogeneity
Mikael Berthe <mikael@lilotux.net>
parents:
364
diff
changeset
|
55 |
void scr_BufferClear(void); |
370
dd9e2eb52916
Add /buffer search_{backward,forward}
Mikael Berthe <mikael@lilotux.net>
parents:
369
diff
changeset
|
56 |
void scr_BufferSearch(int direction, const char *text); |
462 | 57 |
void scr_BufferPercent(int pc); |
236 | 58 |
void scr_RosterUnreadMessage(int); |
330 | 59 |
void scr_RosterJumpAlternate(void); |
104 | 60 |
|
24 | 61 |
#endif |