Mercurial > hg
annotate mcabber/src/screen.h @ 728:421b337dc6d2
Chat window: Highlight the flag in our messages
author | Mikael Berthe <mikael@lilotux.net> |
---|---|
date | Mon, 06 Mar 2006 10:25:24 +0100 |
parents | 264375fe7159 |
children | e46c680bdd3d |
rev | line source |
---|---|
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 |
723
23068490d063
Add text color when the selected buddy has an unread message
Mikael Berthe <mikael@lilotux.net>
parents:
721
diff
changeset
|
9 #define COLOR_GENERAL 3 |
23068490d063
Add text color when the selected buddy has an unread message
Mikael Berthe <mikael@lilotux.net>
parents:
721
diff
changeset
|
10 #define COLOR_STATUS 4 |
23068490d063
Add text color when the selected buddy has an unread message
Mikael Berthe <mikael@lilotux.net>
parents:
721
diff
changeset
|
11 #define COLOR_ROSTER 5 |
23068490d063
Add text color when the selected buddy has an unread message
Mikael Berthe <mikael@lilotux.net>
parents:
721
diff
changeset
|
12 #define COLOR_ROSTERSEL 6 |
23068490d063
Add text color when the selected buddy has an unread message
Mikael Berthe <mikael@lilotux.net>
parents:
721
diff
changeset
|
13 #define COLOR_ROSTERSELNMSG 7 |
23068490d063
Add text color when the selected buddy has an unread message
Mikael Berthe <mikael@lilotux.net>
parents:
721
diff
changeset
|
14 #define COLOR_ROSTERNMSG 8 |
24 | 15 |
701
6c100adfbfb6
Add setting "roster_width" (variable buddylist width)
Mikael Berthe <mikael@lilotux.net>
parents:
675
diff
changeset
|
16 // Length of the timestamp & flag prefix in the chat buffer window |
185 | 17 #define PREFIX_WIDTH 17 |
24 | 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); |
724
264375fe7159
Fix a roster refresh issue
Mikael Berthe <mikael@lilotux.net>
parents:
723
diff
changeset
|
32 void scr_UpdateMainStatus(int forceupdate); |
721
9cf31c9b1dc4
Use room topic as a description in the chat status line
Mikael Berthe <mikael@lilotux.net>
parents:
713
diff
changeset
|
33 void scr_UpdateChatStatus(int forceupdate); |
707
b26a0bde4cdb
Add /roster hide|show|toggle
Mikael Berthe <mikael@lilotux.net>
parents:
701
diff
changeset
|
34 void scr_RosterVisibility(int status); |
184 | 35 void scr_WriteIncomingMessage(const char *jidfrom, const char *text, |
190 | 36 time_t timestamp, guint prefix); |
50 | 37 void scr_WriteOutgoingMessage(const char *jidto, const char *text); |
24 | 38 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
|
39 bool scr_BuddyBufferExists(const char *jid); |
129 | 40 inline void scr_set_chatmode(int enable); |
238 | 41 inline void scr_set_multimode(int enable); |
724
264375fe7159
Fix a roster refresh issue
Mikael Berthe <mikael@lilotux.net>
parents:
723
diff
changeset
|
42 inline int scr_get_multimode(void); |
654
d7fe7b88e4fc
MUC: Set the new_message flag when joining a room
Mikael Berthe <mikael@lilotux.net>
parents:
580
diff
changeset
|
43 void scr_setmsgflag_if_needed(const char *jid); |
238 | 44 void scr_append_multiline(const char *line); |
724
264375fe7159
Fix a roster refresh issue
Mikael Berthe <mikael@lilotux.net>
parents:
723
diff
changeset
|
45 inline const char *scr_get_multiline(void); |
24 | 46 |
675
ae7016aae014
New "beep_on_message" option
Mikael Berthe <mikael@lilotux.net>
parents:
654
diff
changeset
|
47 inline void scr_Beep(void); |
24 | 48 int scr_Getch(void); |
49 | |
29 | 50 int process_key(int); |
24 | 51 |
322
da138cdebf04
Implement auto-away mode
Mikael Berthe <mikael@lilotux.net>
parents:
314
diff
changeset
|
52 void scr_CheckAutoAway(bool activity); |
da138cdebf04
Implement auto-away mode
Mikael Berthe <mikael@lilotux.net>
parents:
314
diff
changeset
|
53 |
104 | 54 // For commands... |
108 | 55 void scr_RosterTop(void); |
56 void scr_RosterBottom(void); | |
377
00809e3e327e
Add "/roster up" and "/roster down"
Mikael Berthe <mikael@lilotux.net>
parents:
374
diff
changeset
|
57 void scr_RosterUp(void); |
00809e3e327e
Add "/roster up" and "/roster down"
Mikael Berthe <mikael@lilotux.net>
parents:
374
diff
changeset
|
58 void scr_RosterDown(void); |
265 | 59 void scr_RosterSearch(char *); |
480 | 60 void scr_RosterJumpJid(char *); |
361
51ff319947c3
Code cleanup/optimization
Mikael Berthe <mikael@lilotux.net>
parents:
336
diff
changeset
|
61 void scr_BufferTopBottom(int topbottom); |
369
499170ed71c9
Rename some buffer commands, for homogeneity
Mikael Berthe <mikael@lilotux.net>
parents:
364
diff
changeset
|
62 void scr_BufferClear(void); |
370
dd9e2eb52916
Add /buffer search_{backward,forward}
Mikael Berthe <mikael@lilotux.net>
parents:
369
diff
changeset
|
63 void scr_BufferSearch(int direction, const char *text); |
462 | 64 void scr_BufferPercent(int pc); |
464 | 65 void scr_BufferDate(time_t t); |
236 | 66 void scr_RosterUnreadMessage(int); |
330 | 67 void scr_RosterJumpAlternate(void); |
508
5a2132ba2220
Add "/buffer up" and "/buffer down"
Mikael Berthe <mikael@lilotux.net>
parents:
480
diff
changeset
|
68 void scr_BufferScrollUpDown(int updown, unsigned int nblines); |
104 | 69 |
24 | 70 #endif |
576 | 71 |
580 | 72 /* vim: set expandtab cindent cinoptions=>2\:2(0: For Vim users... */ |