Mercurial > hg
annotate mcabber/src/screen.h @ 752:d2d5ee71e68c
Fix small typo
author | Mikael Berthe <mikael@lilotux.net> |
---|---|
date | Tue, 14 Mar 2006 11:55:41 +0100 |
parents | 0d5fb1d9077c |
children | 4532a9fe0e8c |
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 |
739
0d5fb1d9077c
Allow "bright" text colors
Mikael Berthe <mikael@lilotux.net>
parents:
730
diff
changeset
|
9 enum colors { |
0d5fb1d9077c
Allow "bright" text colors
Mikael Berthe <mikael@lilotux.net>
parents:
730
diff
changeset
|
10 COLOR_GENERAL = 3, |
0d5fb1d9077c
Allow "bright" text colors
Mikael Berthe <mikael@lilotux.net>
parents:
730
diff
changeset
|
11 COLOR_HIGHLIGHT, |
0d5fb1d9077c
Allow "bright" text colors
Mikael Berthe <mikael@lilotux.net>
parents:
730
diff
changeset
|
12 COLOR_STATUS, |
0d5fb1d9077c
Allow "bright" text colors
Mikael Berthe <mikael@lilotux.net>
parents:
730
diff
changeset
|
13 COLOR_ROSTER, |
0d5fb1d9077c
Allow "bright" text colors
Mikael Berthe <mikael@lilotux.net>
parents:
730
diff
changeset
|
14 COLOR_ROSTERSEL, |
0d5fb1d9077c
Allow "bright" text colors
Mikael Berthe <mikael@lilotux.net>
parents:
730
diff
changeset
|
15 COLOR_ROSTERSELNMSG, |
0d5fb1d9077c
Allow "bright" text colors
Mikael Berthe <mikael@lilotux.net>
parents:
730
diff
changeset
|
16 COLOR_ROSTERNMSG, |
0d5fb1d9077c
Allow "bright" text colors
Mikael Berthe <mikael@lilotux.net>
parents:
730
diff
changeset
|
17 COLOR_max |
0d5fb1d9077c
Allow "bright" text colors
Mikael Berthe <mikael@lilotux.net>
parents:
730
diff
changeset
|
18 }; |
0d5fb1d9077c
Allow "bright" text colors
Mikael Berthe <mikael@lilotux.net>
parents:
730
diff
changeset
|
19 |
0d5fb1d9077c
Allow "bright" text colors
Mikael Berthe <mikael@lilotux.net>
parents:
730
diff
changeset
|
20 int COLOR_ATTRIB[COLOR_max]; |
24 | 21 |
701
6c100adfbfb6
Add setting "roster_width" (variable buddylist width)
Mikael Berthe <mikael@lilotux.net>
parents:
675
diff
changeset
|
22 // Length of the timestamp & flag prefix in the chat buffer window |
185 | 23 #define PREFIX_WIDTH 17 |
24 | 24 |
25 #define INPUTLINE_LENGTH 1024 | |
26 | |
276
627925d885de
Limit the number of lines in multi-line messages
Mikael Berthe <mikael@lilotux.net>
parents:
267
diff
changeset
|
27 // 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
|
28 // 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
|
29 // 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
|
30 #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
|
31 |
30 | 32 extern int update_roster; |
24 | 33 |
34 void scr_InitCurses(void); | |
374
bd5638c21834
Improve logging system (traces)
Mikael Berthe <mikael@lilotux.net>
parents:
370
diff
changeset
|
35 void scr_TerminateCurses(void); |
151 | 36 void scr_DrawMainWindow(unsigned int fullinit); |
81 | 37 void scr_DrawRoster(void); |
724
264375fe7159
Fix a roster refresh issue
Mikael Berthe <mikael@lilotux.net>
parents:
723
diff
changeset
|
38 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
|
39 void scr_UpdateChatStatus(int forceupdate); |
707
b26a0bde4cdb
Add /roster hide|show|toggle
Mikael Berthe <mikael@lilotux.net>
parents:
701
diff
changeset
|
40 void scr_RosterVisibility(int status); |
184 | 41 void scr_WriteIncomingMessage(const char *jidfrom, const char *text, |
190 | 42 time_t timestamp, guint prefix); |
50 | 43 void scr_WriteOutgoingMessage(const char *jidto, const char *text); |
24 | 44 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
|
45 bool scr_BuddyBufferExists(const char *jid); |
129 | 46 inline void scr_set_chatmode(int enable); |
238 | 47 inline void scr_set_multimode(int enable); |
724
264375fe7159
Fix a roster refresh issue
Mikael Berthe <mikael@lilotux.net>
parents:
723
diff
changeset
|
48 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
|
49 void scr_setmsgflag_if_needed(const char *jid); |
238 | 50 void scr_append_multiline(const char *line); |
724
264375fe7159
Fix a roster refresh issue
Mikael Berthe <mikael@lilotux.net>
parents:
723
diff
changeset
|
51 inline const char *scr_get_multiline(void); |
24 | 52 |
675
ae7016aae014
New "beep_on_message" option
Mikael Berthe <mikael@lilotux.net>
parents:
654
diff
changeset
|
53 inline void scr_Beep(void); |
24 | 54 int scr_Getch(void); |
55 | |
29 | 56 int process_key(int); |
24 | 57 |
322
da138cdebf04
Implement auto-away mode
Mikael Berthe <mikael@lilotux.net>
parents:
314
diff
changeset
|
58 void scr_CheckAutoAway(bool activity); |
da138cdebf04
Implement auto-away mode
Mikael Berthe <mikael@lilotux.net>
parents:
314
diff
changeset
|
59 |
104 | 60 // For commands... |
108 | 61 void scr_RosterTop(void); |
62 void scr_RosterBottom(void); | |
377
00809e3e327e
Add "/roster up" and "/roster down"
Mikael Berthe <mikael@lilotux.net>
parents:
374
diff
changeset
|
63 void scr_RosterUp(void); |
00809e3e327e
Add "/roster up" and "/roster down"
Mikael Berthe <mikael@lilotux.net>
parents:
374
diff
changeset
|
64 void scr_RosterDown(void); |
265 | 65 void scr_RosterSearch(char *); |
480 | 66 void scr_RosterJumpJid(char *); |
361
51ff319947c3
Code cleanup/optimization
Mikael Berthe <mikael@lilotux.net>
parents:
336
diff
changeset
|
67 void scr_BufferTopBottom(int topbottom); |
369
499170ed71c9
Rename some buffer commands, for homogeneity
Mikael Berthe <mikael@lilotux.net>
parents:
364
diff
changeset
|
68 void scr_BufferClear(void); |
370
dd9e2eb52916
Add /buffer search_{backward,forward}
Mikael Berthe <mikael@lilotux.net>
parents:
369
diff
changeset
|
69 void scr_BufferSearch(int direction, const char *text); |
462 | 70 void scr_BufferPercent(int pc); |
464 | 71 void scr_BufferDate(time_t t); |
236 | 72 void scr_RosterUnreadMessage(int); |
330 | 73 void scr_RosterJumpAlternate(void); |
508
5a2132ba2220
Add "/buffer up" and "/buffer down"
Mikael Berthe <mikael@lilotux.net>
parents:
480
diff
changeset
|
74 void scr_BufferScrollUpDown(int updown, unsigned int nblines); |
104 | 75 |
24 | 76 #endif |
576 | 77 |
580 | 78 /* vim: set expandtab cindent cinoptions=>2\:2(0: For Vim users... */ |