author | Mikael Berthe <mikael@lilotux.net> |
Sat, 04 Mar 2006 18:52:29 +0100 | |
changeset 712 | e1639629c87b |
parent 711 | 75dde88f1884 |
child 713 | b5aa7b7afee8 |
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 |
|
712 | 9 |
#define COLOR_GENERAL 3 |
10 |
#define COLOR_STATUS 4 |
|
11 |
#define COLOR_ROSTER 5 |
|
12 |
#define COLOR_ROSTERSEL 6 |
|
13 |
#define COLOR_ROSTERNMSG 7 |
|
24 | 14 |
|
701
6c100adfbfb6
Add setting "roster_width" (variable buddylist width)
Mikael Berthe <mikael@lilotux.net>
parents:
675
diff
changeset
|
15 |
// Length of the timestamp & flag prefix in the chat buffer window |
185 | 16 |
#define PREFIX_WIDTH 17 |
24 | 17 |
|
18 |
#define INPUTLINE_LENGTH 1024 |
|
19 |
||
276
627925d885de
Limit the number of lines in multi-line messages
Mikael Berthe <mikael@lilotux.net>
parents:
267
diff
changeset
|
20 |
// 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
|
21 |
// 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
|
22 |
// 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
|
23 |
#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
|
24 |
|
30 | 25 |
extern int update_roster; |
24 | 26 |
|
27 |
void scr_InitCurses(void); |
|
374
bd5638c21834
Improve logging system (traces)
Mikael Berthe <mikael@lilotux.net>
parents:
370
diff
changeset
|
28 |
void scr_TerminateCurses(void); |
151 | 29 |
void scr_DrawMainWindow(unsigned int fullinit); |
81 | 30 |
void scr_DrawRoster(void); |
707
b26a0bde4cdb
Add /roster hide|show|toggle
Mikael Berthe <mikael@lilotux.net>
parents:
701
diff
changeset
|
31 |
void scr_RosterVisibility(int status); |
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); |
514
979eb0fe2969
Show status changes in buddy window, if it is open
Mikael Berthe <mikael@lilotux.net>
parents:
508
diff
changeset
|
36 |
bool scr_BuddyBufferExists(const char *jid); |
129 | 37 |
inline void scr_set_chatmode(int enable); |
238 | 38 |
inline void scr_set_multimode(int enable); |
39 |
inline int scr_get_multimode(); |
|
654
d7fe7b88e4fc
MUC: Set the new_message flag when joining a room
Mikael Berthe <mikael@lilotux.net>
parents:
580
diff
changeset
|
40 |
void scr_setmsgflag_if_needed(const char *jid); |
238 | 41 |
void scr_append_multiline(const char *line); |
42 |
inline const char *scr_get_multiline(); |
|
24 | 43 |
|
675
ae7016aae014
New "beep_on_message" option
Mikael Berthe <mikael@lilotux.net>
parents:
654
diff
changeset
|
44 |
inline void scr_Beep(void); |
24 | 45 |
int scr_Getch(void); |
46 |
||
29 | 47 |
int process_key(int); |
24 | 48 |
|
322
da138cdebf04
Implement auto-away mode
Mikael Berthe <mikael@lilotux.net>
parents:
314
diff
changeset
|
49 |
void scr_CheckAutoAway(bool activity); |
da138cdebf04
Implement auto-away mode
Mikael Berthe <mikael@lilotux.net>
parents:
314
diff
changeset
|
50 |
|
104 | 51 |
// For commands... |
108 | 52 |
void scr_RosterTop(void); |
53 |
void scr_RosterBottom(void); |
|
377
00809e3e327e
Add "/roster up" and "/roster down"
Mikael Berthe <mikael@lilotux.net>
parents:
374
diff
changeset
|
54 |
void scr_RosterUp(void); |
00809e3e327e
Add "/roster up" and "/roster down"
Mikael Berthe <mikael@lilotux.net>
parents:
374
diff
changeset
|
55 |
void scr_RosterDown(void); |
265 | 56 |
void scr_RosterSearch(char *); |
480 | 57 |
void scr_RosterJumpJid(char *); |
361
51ff319947c3
Code cleanup/optimization
Mikael Berthe <mikael@lilotux.net>
parents:
336
diff
changeset
|
58 |
void scr_BufferTopBottom(int topbottom); |
369
499170ed71c9
Rename some buffer commands, for homogeneity
Mikael Berthe <mikael@lilotux.net>
parents:
364
diff
changeset
|
59 |
void scr_BufferClear(void); |
370
dd9e2eb52916
Add /buffer search_{backward,forward}
Mikael Berthe <mikael@lilotux.net>
parents:
369
diff
changeset
|
60 |
void scr_BufferSearch(int direction, const char *text); |
462 | 61 |
void scr_BufferPercent(int pc); |
464 | 62 |
void scr_BufferDate(time_t t); |
236 | 63 |
void scr_RosterUnreadMessage(int); |
330 | 64 |
void scr_RosterJumpAlternate(void); |
508
5a2132ba2220
Add "/buffer up" and "/buffer down"
Mikael Berthe <mikael@lilotux.net>
parents:
480
diff
changeset
|
65 |
void scr_BufferScrollUpDown(int updown, unsigned int nblines); |
104 | 66 |
|
24 | 67 |
#endif |
576 | 68 |
|
580 | 69 |
/* vim: set expandtab cindent cinoptions=>2\:2(0: For Vim users... */ |