mcabber/src/screen.h
author Michal 'vorner' Vaner <vorner@ucw.cz>
Tue, 28 Aug 2007 10:11:39 +0200
changeset 1292 382ec54b584e
parent 1290 e42f48103609
child 1311 0dda8238af21
permissions -rw-r--r--
Muc nick coloring functionality
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
24
e88b15cbf2de [/trunk] Changeset 40 by mikael
mikael
parents:
diff changeset
     1
#ifndef __SCREEN_H__
e88b15cbf2de [/trunk] Changeset 40 by mikael
mikael
parents:
diff changeset
     2
#define __SCREEN_H__ 1
e88b15cbf2de [/trunk] Changeset 40 by mikael
mikael
parents:
diff changeset
     3
173
09e24917059d [/trunk] Changeset 185 by mikael
mikael
parents: 151
diff changeset
     4
#include <glib.h>
24
e88b15cbf2de [/trunk] Changeset 40 by mikael
mikael
parents:
diff changeset
     5
935
97e6a6da2b2c Fix ncurses #include (again)
Mikael Berthe <mikael@lilotux.net>
parents: 930
diff changeset
     6
#if HAVE_NCURSESW_NCURSES_H
97e6a6da2b2c Fix ncurses #include (again)
Mikael Berthe <mikael@lilotux.net>
parents: 930
diff changeset
     7
# include <ncursesw/ncurses.h>
936
3e592fb33aab Fix ncurses panel #include too
Mikael Berthe <mikael@lilotux.net>
parents: 935
diff changeset
     8
# include <ncursesw/panel.h>
935
97e6a6da2b2c Fix ncurses #include (again)
Mikael Berthe <mikael@lilotux.net>
parents: 930
diff changeset
     9
#elif HAVE_NCURSES_NCURSES_H
97e6a6da2b2c Fix ncurses #include (again)
Mikael Berthe <mikael@lilotux.net>
parents: 930
diff changeset
    10
# include <ncurses/ncurses.h>
936
3e592fb33aab Fix ncurses panel #include too
Mikael Berthe <mikael@lilotux.net>
parents: 935
diff changeset
    11
# include <ncurses/panel.h>
3e592fb33aab Fix ncurses panel #include too
Mikael Berthe <mikael@lilotux.net>
parents: 935
diff changeset
    12
#else
935
97e6a6da2b2c Fix ncurses #include (again)
Mikael Berthe <mikael@lilotux.net>
parents: 930
diff changeset
    13
# include <ncurses.h>
936
3e592fb33aab Fix ncurses panel #include too
Mikael Berthe <mikael@lilotux.net>
parents: 935
diff changeset
    14
# include <panel.h>
935
97e6a6da2b2c Fix ncurses #include (again)
Mikael Berthe <mikael@lilotux.net>
parents: 930
diff changeset
    15
#endif
97e6a6da2b2c Fix ncurses #include (again)
Mikael Berthe <mikael@lilotux.net>
parents: 930
diff changeset
    16
1179
0f7e0346d9cb Add aspell support
entragian <entragian@o2.pl>
parents: 1177
diff changeset
    17
#ifdef WITH_ASPELL
0f7e0346d9cb Add aspell support
entragian <entragian@o2.pl>
parents: 1177
diff changeset
    18
void spellcheck_init(void);
0f7e0346d9cb Add aspell support
entragian <entragian@o2.pl>
parents: 1177
diff changeset
    19
void spellcheck_deinit(void);
0f7e0346d9cb Add aspell support
entragian <entragian@o2.pl>
parents: 1177
diff changeset
    20
//static void spellcheck(char*, char*);
0f7e0346d9cb Add aspell support
entragian <entragian@o2.pl>
parents: 1177
diff changeset
    21
#endif
0f7e0346d9cb Add aspell support
entragian <entragian@o2.pl>
parents: 1177
diff changeset
    22
374
bd5638c21834 Improve logging system (traces)
Mikael Berthe <mikael@lilotux.net>
parents: 370
diff changeset
    23
#include "logprint.h"
bd5638c21834 Improve logging system (traces)
Mikael Berthe <mikael@lilotux.net>
parents: 370
diff changeset
    24
761
4532a9fe0e8c Handle some keyboard escape sequences
Mikael Berthe <mikael@lilotux.net>
parents: 739
diff changeset
    25
#define INPUTLINE_LENGTH  1024
4532a9fe0e8c Handle some keyboard escape sequences
Mikael Berthe <mikael@lilotux.net>
parents: 739
diff changeset
    26
4532a9fe0e8c Handle some keyboard escape sequences
Mikael Berthe <mikael@lilotux.net>
parents: 739
diff changeset
    27
// Only used in screen.c; this is the maximum line number
4532a9fe0e8c Handle some keyboard escape sequences
Mikael Berthe <mikael@lilotux.net>
parents: 739
diff changeset
    28
// in a multi-line message.  Should be < 1000
4532a9fe0e8c Handle some keyboard escape sequences
Mikael Berthe <mikael@lilotux.net>
parents: 739
diff changeset
    29
// Note: message length is limited by the HBB_BLOCKSIZE size too
4532a9fe0e8c Handle some keyboard escape sequences
Mikael Berthe <mikael@lilotux.net>
parents: 739
diff changeset
    30
#define MULTILINE_MAX_LINE_NUMBER 299
4532a9fe0e8c Handle some keyboard escape sequences
Mikael Berthe <mikael@lilotux.net>
parents: 739
diff changeset
    31
991
ef10906691bb Chatstates: add composing timeout
Mikael Berthe <mikael@lilotux.net>
parents: 940
diff changeset
    32
// When chatstates are enabled, timeout (in seconds) before "composing"
ef10906691bb Chatstates: add composing timeout
Mikael Berthe <mikael@lilotux.net>
parents: 940
diff changeset
    33
// becomes "paused" because of user inactivity.
ef10906691bb Chatstates: add composing timeout
Mikael Berthe <mikael@lilotux.net>
parents: 940
diff changeset
    34
// Warning: setting this very low will cause more network traffic.
994
eb416c9633b5 Chatstates: decrease the composing timeout
Mikael Berthe <mikael@lilotux.net>
parents: 993
diff changeset
    35
#define COMPOSING_TIMEOUT 6L
991
ef10906691bb Chatstates: add composing timeout
Mikael Berthe <mikael@lilotux.net>
parents: 940
diff changeset
    36
739
0d5fb1d9077c Allow "bright" text colors
Mikael Berthe <mikael@lilotux.net>
parents: 730
diff changeset
    37
enum colors {
0d5fb1d9077c Allow "bright" text colors
Mikael Berthe <mikael@lilotux.net>
parents: 730
diff changeset
    38
  COLOR_GENERAL = 3,
785
7e0562e3bc83 Replace color_highlight with color_msgout
Mikael Berthe <mikael@lilotux.net>
parents: 779
diff changeset
    39
  COLOR_MSGOUT,
1204
e802ec0c02d2 Basic support for nick highlighting in MUC rooms (the whole line is colored)
Mikael Berthe <mikael@lilotux.net>
parents: 1190
diff changeset
    40
  COLOR_MSGHL,
739
0d5fb1d9077c Allow "bright" text colors
Mikael Berthe <mikael@lilotux.net>
parents: 730
diff changeset
    41
  COLOR_STATUS,
0d5fb1d9077c Allow "bright" text colors
Mikael Berthe <mikael@lilotux.net>
parents: 730
diff changeset
    42
  COLOR_ROSTER,
0d5fb1d9077c Allow "bright" text colors
Mikael Berthe <mikael@lilotux.net>
parents: 730
diff changeset
    43
  COLOR_ROSTERSEL,
0d5fb1d9077c Allow "bright" text colors
Mikael Berthe <mikael@lilotux.net>
parents: 730
diff changeset
    44
  COLOR_ROSTERSELNMSG,
0d5fb1d9077c Allow "bright" text colors
Mikael Berthe <mikael@lilotux.net>
parents: 730
diff changeset
    45
  COLOR_ROSTERNMSG,
1268
dbc907b2d92f Add configurable colors for info and incoming messages (Michal 'vorner' Vaner)
Mikael Berthe <mikael@lilotux.net>
parents: 1254
diff changeset
    46
  COLOR_INFO,
dbc907b2d92f Add configurable colors for info and incoming messages (Michal 'vorner' Vaner)
Mikael Berthe <mikael@lilotux.net>
parents: 1254
diff changeset
    47
  COLOR_MSGIN,
1272
033576acac4c Add configurable roster colors (Michal 'vorner' Vaner)
Mikael Berthe <mikael@lilotux.net>
parents: 1268
diff changeset
    48
  //Foreground color on usual backgroud
033576acac4c Add configurable roster colors (Michal 'vorner' Vaner)
Mikael Berthe <mikael@lilotux.net>
parents: 1268
diff changeset
    49
  //curses do not allow telling color only ->
033576acac4c Add configurable roster colors (Michal 'vorner' Vaner)
Mikael Berthe <mikael@lilotux.net>
parents: 1268
diff changeset
    50
  //needs colorpairs
033576acac4c Add configurable roster colors (Michal 'vorner' Vaner)
Mikael Berthe <mikael@lilotux.net>
parents: 1268
diff changeset
    51
  COLOR_BLACK_FG,
033576acac4c Add configurable roster colors (Michal 'vorner' Vaner)
Mikael Berthe <mikael@lilotux.net>
parents: 1268
diff changeset
    52
  COLOR_RED_FG,
033576acac4c Add configurable roster colors (Michal 'vorner' Vaner)
Mikael Berthe <mikael@lilotux.net>
parents: 1268
diff changeset
    53
  COLOR_GREEN_FG,
033576acac4c Add configurable roster colors (Michal 'vorner' Vaner)
Mikael Berthe <mikael@lilotux.net>
parents: 1268
diff changeset
    54
  COLOR_YELLOW_FG,
033576acac4c Add configurable roster colors (Michal 'vorner' Vaner)
Mikael Berthe <mikael@lilotux.net>
parents: 1268
diff changeset
    55
  COLOR_BLUE_FG,
033576acac4c Add configurable roster colors (Michal 'vorner' Vaner)
Mikael Berthe <mikael@lilotux.net>
parents: 1268
diff changeset
    56
  COLOR_MAGENTA_FG,
033576acac4c Add configurable roster colors (Michal 'vorner' Vaner)
Mikael Berthe <mikael@lilotux.net>
parents: 1268
diff changeset
    57
  COLOR_CYAN_FG,
033576acac4c Add configurable roster colors (Michal 'vorner' Vaner)
Mikael Berthe <mikael@lilotux.net>
parents: 1268
diff changeset
    58
  COLOR_WHITE_FG,
033576acac4c Add configurable roster colors (Michal 'vorner' Vaner)
Mikael Berthe <mikael@lilotux.net>
parents: 1268
diff changeset
    59
  COLOR_BLACK_BOLD_FG,
033576acac4c Add configurable roster colors (Michal 'vorner' Vaner)
Mikael Berthe <mikael@lilotux.net>
parents: 1268
diff changeset
    60
  COLOR_RED_BOLD_FG,
033576acac4c Add configurable roster colors (Michal 'vorner' Vaner)
Mikael Berthe <mikael@lilotux.net>
parents: 1268
diff changeset
    61
  COLOR_GREEN_BOLD_FG,
033576acac4c Add configurable roster colors (Michal 'vorner' Vaner)
Mikael Berthe <mikael@lilotux.net>
parents: 1268
diff changeset
    62
  COLOR_YELLOW_BOLD_FG,
033576acac4c Add configurable roster colors (Michal 'vorner' Vaner)
Mikael Berthe <mikael@lilotux.net>
parents: 1268
diff changeset
    63
  COLOR_BLUE_BOLD_FG,
033576acac4c Add configurable roster colors (Michal 'vorner' Vaner)
Mikael Berthe <mikael@lilotux.net>
parents: 1268
diff changeset
    64
  COLOR_MAGENTA_BOLD_FG,
033576acac4c Add configurable roster colors (Michal 'vorner' Vaner)
Mikael Berthe <mikael@lilotux.net>
parents: 1268
diff changeset
    65
  COLOR_CYAN_BOLD_FG,
033576acac4c Add configurable roster colors (Michal 'vorner' Vaner)
Mikael Berthe <mikael@lilotux.net>
parents: 1268
diff changeset
    66
  COLOR_WHITE_BOLD_FG,
739
0d5fb1d9077c Allow "bright" text colors
Mikael Berthe <mikael@lilotux.net>
parents: 730
diff changeset
    67
  COLOR_max
0d5fb1d9077c Allow "bright" text colors
Mikael Berthe <mikael@lilotux.net>
parents: 730
diff changeset
    68
};
0d5fb1d9077c Allow "bright" text colors
Mikael Berthe <mikael@lilotux.net>
parents: 730
diff changeset
    69
0d5fb1d9077c Allow "bright" text colors
Mikael Berthe <mikael@lilotux.net>
parents: 730
diff changeset
    70
int COLOR_ATTRIB[COLOR_max];
24
e88b15cbf2de [/trunk] Changeset 40 by mikael
mikael
parents:
diff changeset
    71
761
4532a9fe0e8c Handle some keyboard escape sequences
Mikael Berthe <mikael@lilotux.net>
parents: 739
diff changeset
    72
extern int update_roster;
24
e88b15cbf2de [/trunk] Changeset 40 by mikael
mikael
parents:
diff changeset
    73
761
4532a9fe0e8c Handle some keyboard escape sequences
Mikael Berthe <mikael@lilotux.net>
parents: 739
diff changeset
    74
typedef struct {
4532a9fe0e8c Handle some keyboard escape sequences
Mikael Berthe <mikael@lilotux.net>
parents: 739
diff changeset
    75
  int value;
930
a75f7a13df7b UTF-8 terminal support (Reimar Döffinger)
Mikael Berthe <mikael@lilotux.net>
parents: 891
diff changeset
    76
  int utf8;
761
4532a9fe0e8c Handle some keyboard escape sequences
Mikael Berthe <mikael@lilotux.net>
parents: 739
diff changeset
    77
  enum {
4532a9fe0e8c Handle some keyboard escape sequences
Mikael Berthe <mikael@lilotux.net>
parents: 739
diff changeset
    78
    MKEY_META = 1,
763
6866ee749225 More keycodes
Mikael Berthe <mikael@lilotux.net>
parents: 761
diff changeset
    79
    MKEY_EQUIV,
6866ee749225 More keycodes
Mikael Berthe <mikael@lilotux.net>
parents: 761
diff changeset
    80
    MKEY_CTRL_PGUP,
6866ee749225 More keycodes
Mikael Berthe <mikael@lilotux.net>
parents: 761
diff changeset
    81
    MKEY_CTRL_PGDOWN,
765
72626e9d60bd Create init_keycodes(), add 2 screen escape sequences
Mikael Berthe <mikael@lilotux.net>
parents: 763
diff changeset
    82
    MKEY_SHIFT_PGUP,
72626e9d60bd Create init_keycodes(), add 2 screen escape sequences
Mikael Berthe <mikael@lilotux.net>
parents: 763
diff changeset
    83
    MKEY_SHIFT_PGDOWN,
763
6866ee749225 More keycodes
Mikael Berthe <mikael@lilotux.net>
parents: 761
diff changeset
    84
    MKEY_CTRL_SHIFT_PGUP,
794
32d5298f9f8d Add a few keycode sequences
Mikael Berthe <mikael@lilotux.net>
parents: 785
diff changeset
    85
    MKEY_CTRL_SHIFT_PGDOWN,
32d5298f9f8d Add a few keycode sequences
Mikael Berthe <mikael@lilotux.net>
parents: 785
diff changeset
    86
    MKEY_CTRL_HOME,
32d5298f9f8d Add a few keycode sequences
Mikael Berthe <mikael@lilotux.net>
parents: 785
diff changeset
    87
    MKEY_CTRL_END,
32d5298f9f8d Add a few keycode sequences
Mikael Berthe <mikael@lilotux.net>
parents: 785
diff changeset
    88
    MKEY_CTRL_INS,
826
3a3c7a017904 Add Ctrl-Shift-{Home,End} key code sequences
Mikael Berthe <mikael@lilotux.net>
parents: 807
diff changeset
    89
    MKEY_CTRL_DEL,
3a3c7a017904 Add Ctrl-Shift-{Home,End} key code sequences
Mikael Berthe <mikael@lilotux.net>
parents: 807
diff changeset
    90
    MKEY_CTRL_SHIFT_HOME,
3a3c7a017904 Add Ctrl-Shift-{Home,End} key code sequences
Mikael Berthe <mikael@lilotux.net>
parents: 807
diff changeset
    91
    MKEY_CTRL_SHIFT_END
761
4532a9fe0e8c Handle some keyboard escape sequences
Mikael Berthe <mikael@lilotux.net>
parents: 739
diff changeset
    92
  } mcode;
4532a9fe0e8c Handle some keyboard escape sequences
Mikael Berthe <mikael@lilotux.net>
parents: 739
diff changeset
    93
} keycode;
276
627925d885de Limit the number of lines in multi-line messages
Mikael Berthe <mikael@lilotux.net>
parents: 267
diff changeset
    94
1292
382ec54b584e Muc nick coloring functionality
Michal 'vorner' Vaner <vorner@ucw.cz>
parents: 1290
diff changeset
    95
typedef enum {
382ec54b584e Muc nick coloring functionality
Michal 'vorner' Vaner <vorner@ucw.cz>
parents: 1290
diff changeset
    96
  MC_ALL,
382ec54b584e Muc nick coloring functionality
Michal 'vorner' Vaner <vorner@ucw.cz>
parents: 1290
diff changeset
    97
  MC_PRESET,
382ec54b584e Muc nick coloring functionality
Michal 'vorner' Vaner <vorner@ucw.cz>
parents: 1290
diff changeset
    98
  MC_OFF,
382ec54b584e Muc nick coloring functionality
Michal 'vorner' Vaner <vorner@ucw.cz>
parents: 1290
diff changeset
    99
  MC_REMOVE
382ec54b584e Muc nick coloring functionality
Michal 'vorner' Vaner <vorner@ucw.cz>
parents: 1290
diff changeset
   100
} muccoltype;
382ec54b584e Muc nick coloring functionality
Michal 'vorner' Vaner <vorner@ucw.cz>
parents: 1290
diff changeset
   101
1176
547a8ca7c1a8 Move init_bindings() to screen.c, with a few updates
Mikael Berthe <mikael@lilotux.net>
parents: 1172
diff changeset
   102
void scr_init_bindings(void);
547a8ca7c1a8 Move init_bindings() to screen.c, with a few updates
Mikael Berthe <mikael@lilotux.net>
parents: 1172
diff changeset
   103
761
4532a9fe0e8c Handle some keyboard escape sequences
Mikael Berthe <mikael@lilotux.net>
parents: 739
diff changeset
   104
void scr_Getch(keycode *kcode);
4532a9fe0e8c Handle some keyboard escape sequences
Mikael Berthe <mikael@lilotux.net>
parents: 739
diff changeset
   105
int process_key(keycode kcode);
24
e88b15cbf2de [/trunk] Changeset 40 by mikael
mikael
parents:
diff changeset
   106
779
057ffe7c43dc Initialize locale charset earlier
Mikael Berthe <mikael@lilotux.net>
parents: 765
diff changeset
   107
void scr_InitLocaleCharSet(void);
24
e88b15cbf2de [/trunk] Changeset 40 by mikael
mikael
parents:
diff changeset
   108
void scr_InitCurses(void);
374
bd5638c21834 Improve logging system (traces)
Mikael Berthe <mikael@lilotux.net>
parents: 370
diff changeset
   109
void scr_TerminateCurses(void);
151
b69c0b7a23e3 [/trunk] Changeset 163 by mikael
mikael
parents: 139
diff changeset
   110
void scr_DrawMainWindow(unsigned int fullinit);
81
0bd578421ce9 [/trunk] Changeset 95 by mikael
mikael
parents: 74
diff changeset
   111
void scr_DrawRoster(void);
724
264375fe7159 Fix a roster refresh issue
Mikael Berthe <mikael@lilotux.net>
parents: 723
diff changeset
   112
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
   113
void scr_UpdateChatStatus(int forceupdate);
707
b26a0bde4cdb Add /roster hide|show|toggle
Mikael Berthe <mikael@lilotux.net>
parents: 701
diff changeset
   114
void scr_RosterVisibility(int status);
184
b5aa2b9c425a [/trunk] Changeset 196 by mikael
mikael
parents: 173
diff changeset
   115
void scr_WriteIncomingMessage(const char *jidfrom, const char *text,
1290
e42f48103609 Drawing the MUC nicks by a different color
Michal 'vorner' Vaner <vorner@ucw.cz>
parents: 1286
diff changeset
   116
                              time_t timestamp, guint prefix,
e42f48103609 Drawing the MUC nicks by a different color
Michal 'vorner' Vaner <vorner@ucw.cz>
parents: 1286
diff changeset
   117
                              unsigned mucnicklen);
1055
6eb1efea75d0 PGP: Visual encryption flag
Mikael Berthe <mikael@lilotux.net>
parents: 994
diff changeset
   118
void scr_WriteOutgoingMessage(const char *jidto,   const char *text,
6eb1efea75d0 PGP: Visual encryption flag
Mikael Berthe <mikael@lilotux.net>
parents: 994
diff changeset
   119
                              guint prefix);
24
e88b15cbf2de [/trunk] Changeset 40 by mikael
mikael
parents:
diff changeset
   120
void scr_ShowBuddyWindow(void);
935
97e6a6da2b2c Fix ncurses #include (again)
Mikael Berthe <mikael@lilotux.net>
parents: 930
diff changeset
   121
int  scr_BuddyBufferExists(const char *jid);
865
cee8d6be04e1 Improve changeset a3db3ee8b99e, do not enable chatmode when refreshing
Mikael Berthe <mikael@lilotux.net>
parents: 826
diff changeset
   122
inline void scr_UpdateBuddyWindow(void);
129
03be1cc94560 [/trunk] Changeset 142 by mikael
mikael
parents: 108
diff changeset
   123
inline void scr_set_chatmode(int enable);
1129
1a109ebf3f24 Add option "events_ignore_active_window"
Mikael Berthe <mikael@lilotux.net>
parents: 1086
diff changeset
   124
inline int  scr_get_chatmode(void);
807
f6cda389db48 Allow messages with a subject (/msay)
Mikael Berthe <mikael@lilotux.net>
parents: 794
diff changeset
   125
inline void scr_set_multimode(int enable, char *subject);
724
264375fe7159 Fix a roster refresh issue
Mikael Berthe <mikael@lilotux.net>
parents: 723
diff changeset
   126
inline int  scr_get_multimode(void);
891
78f4971578dd Add a "special" parameter to scr_setmsgflag_if_needed()
Mikael Berthe <mikael@lilotux.net>
parents: 873
diff changeset
   127
void scr_setmsgflag_if_needed(const char *jid, int special);
238
8e30b2bb380e [/trunk] Changeset 251 by mikael
mikael
parents: 236
diff changeset
   128
void scr_append_multiline(const char *line);
724
264375fe7159 Fix a roster refresh issue
Mikael Berthe <mikael@lilotux.net>
parents: 723
diff changeset
   129
inline const char *scr_get_multiline(void);
807
f6cda389db48 Allow messages with a subject (/msay)
Mikael Berthe <mikael@lilotux.net>
parents: 794
diff changeset
   130
inline const char *scr_get_multimode_subj(void);
24
e88b15cbf2de [/trunk] Changeset 40 by mikael
mikael
parents:
diff changeset
   131
675
ae7016aae014 New "beep_on_message" option
Mikael Berthe <mikael@lilotux.net>
parents: 654
diff changeset
   132
inline void scr_Beep(void);
24
e88b15cbf2de [/trunk] Changeset 40 by mikael
mikael
parents:
diff changeset
   133
1254
401639413340 More jabber:iq:last support... (misc)
Mikael Berthe <mikael@lilotux.net>
parents: 1226
diff changeset
   134
bool Autoaway;
401639413340 More jabber:iq:last support... (misc)
Mikael Berthe <mikael@lilotux.net>
parents: 1226
diff changeset
   135
991
ef10906691bb Chatstates: add composing timeout
Mikael Berthe <mikael@lilotux.net>
parents: 940
diff changeset
   136
long int scr_GetAutoAwayTimeout(time_t now);
935
97e6a6da2b2c Fix ncurses #include (again)
Mikael Berthe <mikael@lilotux.net>
parents: 930
diff changeset
   137
void scr_CheckAutoAway(int activity);
322
da138cdebf04 Implement auto-away mode
Mikael Berthe <mikael@lilotux.net>
parents: 314
diff changeset
   138
991
ef10906691bb Chatstates: add composing timeout
Mikael Berthe <mikael@lilotux.net>
parents: 940
diff changeset
   139
#if defined JEP0022 || defined JEP0085
ef10906691bb Chatstates: add composing timeout
Mikael Berthe <mikael@lilotux.net>
parents: 940
diff changeset
   140
long int scr_GetChatStatesTimeout(time_t now);
ef10906691bb Chatstates: add composing timeout
Mikael Berthe <mikael@lilotux.net>
parents: 940
diff changeset
   141
#endif
993
0759f4c7da68 Add option 'disable_chatstates'
Mikael Berthe <mikael@lilotux.net>
parents: 991
diff changeset
   142
int chatstates_disabled;
991
ef10906691bb Chatstates: add composing timeout
Mikael Berthe <mikael@lilotux.net>
parents: 940
diff changeset
   143
104
fe7257d251ac [/trunk] Changeset 118 by mikael
mikael
parents: 81
diff changeset
   144
// For commands...
108
7fb72bc13732 [/trunk] Changeset 122 by mikael
mikael
parents: 104
diff changeset
   145
void scr_RosterTop(void);
7fb72bc13732 [/trunk] Changeset 122 by mikael
mikael
parents: 104
diff changeset
   146
void scr_RosterBottom(void);
377
00809e3e327e Add "/roster up" and "/roster down"
Mikael Berthe <mikael@lilotux.net>
parents: 374
diff changeset
   147
void scr_RosterUp(void);
00809e3e327e Add "/roster up" and "/roster down"
Mikael Berthe <mikael@lilotux.net>
parents: 374
diff changeset
   148
void scr_RosterDown(void);
1086
5e2e647e781b Add command /roster group_prev|group_next and update documentation
Mikael Berthe <mikael@lilotux.net>
parents: 1055
diff changeset
   149
void scr_RosterPrevGroup(void);
5e2e647e781b Add command /roster group_prev|group_next and update documentation
Mikael Berthe <mikael@lilotux.net>
parents: 1055
diff changeset
   150
void scr_RosterNextGroup(void);
265
49e9e02dd6d0 Add "/roster search" command
mikael@frmp8452
parents: 238
diff changeset
   151
void scr_RosterSearch(char *);
480
882e1acae422 Add /say_to command
Mikael Berthe <mikael@lilotux.net>
parents: 464
diff changeset
   152
void scr_RosterJumpJid(char *);
361
51ff319947c3 Code cleanup/optimization
Mikael Berthe <mikael@lilotux.net>
parents: 336
diff changeset
   153
void scr_BufferTopBottom(int topbottom);
369
499170ed71c9 Rename some buffer commands, for homogeneity
Mikael Berthe <mikael@lilotux.net>
parents: 364
diff changeset
   154
void scr_BufferClear(void);
873
ee39f6d94d43 Add /buffer {scroll_lock|scroll_unlock|toggle_scroll}
Mikael Berthe <mikael@lilotux.net>
parents: 866
diff changeset
   155
void scr_BufferScrollLock(int lock);
1279
8bbc764139ef Implement /buffer close|purge [jid]
Mikael Berthe <mikael@lilotux.net>
parents: 1274
diff changeset
   156
void scr_BufferPurge(int, const char*);
1138
8ba4b1e8b42d Add command /buffer close_all
Mikael Berthe <mikael@lilotux.net>
parents: 1135
diff changeset
   157
void scr_BufferPurgeAll(int);
370
dd9e2eb52916 Add /buffer search_{backward,forward}
Mikael Berthe <mikael@lilotux.net>
parents: 369
diff changeset
   158
void scr_BufferSearch(int direction, const char *text);
462
d580e87c11ed Add "/buffer %n"
Mikael Berthe <mikael@lilotux.net>
parents: 389
diff changeset
   159
void scr_BufferPercent(int pc);
464
e4840b288be0 Add "/buffer date"
Mikael Berthe <mikael@lilotux.net>
parents: 462
diff changeset
   160
void scr_BufferDate(time_t t);
236
72fd1273f2b7 [/trunk] Changeset 249 by mikael
mikael
parents: 190
diff changeset
   161
void scr_RosterUnreadMessage(int);
330
a9013124ede6 Add "/roster alternate"
Mikael Berthe <mikael@lilotux.net>
parents: 322
diff changeset
   162
void scr_RosterJumpAlternate(void);
508
5a2132ba2220 Add "/buffer up" and "/buffer down"
Mikael Berthe <mikael@lilotux.net>
parents: 480
diff changeset
   163
void scr_BufferScrollUpDown(int updown, unsigned int nblines);
1272
033576acac4c Add configurable roster colors (Michal 'vorner' Vaner)
Mikael Berthe <mikael@lilotux.net>
parents: 1268
diff changeset
   164
bool scr_RosterColor(const char *status, const char *wildcard, const char *color);
033576acac4c Add configurable roster colors (Michal 'vorner' Vaner)
Mikael Berthe <mikael@lilotux.net>
parents: 1268
diff changeset
   165
void scr_RosterClearColor(void);
1292
382ec54b584e Muc nick coloring functionality
Michal 'vorner' Vaner <vorner@ucw.cz>
parents: 1290
diff changeset
   166
void scr_MucColor(const char *muc, muccoltype type);
382ec54b584e Muc nick coloring functionality
Michal 'vorner' Vaner <vorner@ucw.cz>
parents: 1290
diff changeset
   167
void scr_MucNickColor(const char *nick, const char *color);
104
fe7257d251ac [/trunk] Changeset 118 by mikael
mikael
parents: 81
diff changeset
   168
1226
2521efbf3b72 New (debug) subcommand, buffer list
Mikael Berthe <mikael@lilotux.net>
parents: 1204
diff changeset
   169
#ifdef DEBUG_ENABLE
2521efbf3b72 New (debug) subcommand, buffer list
Mikael Berthe <mikael@lilotux.net>
parents: 1204
diff changeset
   170
void scr_BufferList(void);
2521efbf3b72 New (debug) subcommand, buffer list
Mikael Berthe <mikael@lilotux.net>
parents: 1204
diff changeset
   171
#endif
2521efbf3b72 New (debug) subcommand, buffer list
Mikael Berthe <mikael@lilotux.net>
parents: 1204
diff changeset
   172
1171
03a38b7ad2e0 Add a collection of commands for key bindings (Lego12239)
Mikael Berthe <mikael@lilotux.net>
parents: 1138
diff changeset
   173
void readline_transpose_chars(void);
03a38b7ad2e0 Add a collection of commands for key bindings (Lego12239)
Mikael Berthe <mikael@lilotux.net>
parents: 1138
diff changeset
   174
void readline_forward_kill_word(void);
03a38b7ad2e0 Add a collection of commands for key bindings (Lego12239)
Mikael Berthe <mikael@lilotux.net>
parents: 1138
diff changeset
   175
void readline_backward_kill_word(void);
03a38b7ad2e0 Add a collection of commands for key bindings (Lego12239)
Mikael Berthe <mikael@lilotux.net>
parents: 1138
diff changeset
   176
void readline_backward_word(void);
03a38b7ad2e0 Add a collection of commands for key bindings (Lego12239)
Mikael Berthe <mikael@lilotux.net>
parents: 1138
diff changeset
   177
void readline_forward_word(void);
1172
334ae9f498f1 Add some more iline functions (Lego12239)
Mikael Berthe <mikael@lilotux.net>
parents: 1171
diff changeset
   178
void readline_updowncase_word(int);
334ae9f498f1 Add some more iline functions (Lego12239)
Mikael Berthe <mikael@lilotux.net>
parents: 1171
diff changeset
   179
void readline_capitalize_word(void);
1171
03a38b7ad2e0 Add a collection of commands for key bindings (Lego12239)
Mikael Berthe <mikael@lilotux.net>
parents: 1138
diff changeset
   180
void readline_backward_char(void);
03a38b7ad2e0 Add a collection of commands for key bindings (Lego12239)
Mikael Berthe <mikael@lilotux.net>
parents: 1138
diff changeset
   181
void readline_forward_char(void);
1177
10733d7de004 Refactor readline_accept_line() and readline_accept_line_down_hist()
Mikael Berthe <mikael@lilotux.net>
parents: 1176
diff changeset
   182
int  readline_accept_line(int down_history);
1172
334ae9f498f1 Add some more iline functions (Lego12239)
Mikael Berthe <mikael@lilotux.net>
parents: 1171
diff changeset
   183
void readline_cancel_completion(void);
334ae9f498f1 Add some more iline functions (Lego12239)
Mikael Berthe <mikael@lilotux.net>
parents: 1171
diff changeset
   184
void readline_do_completion(void);
334ae9f498f1 Add some more iline functions (Lego12239)
Mikael Berthe <mikael@lilotux.net>
parents: 1171
diff changeset
   185
void readline_refresh_screen(void);
334ae9f498f1 Add some more iline functions (Lego12239)
Mikael Berthe <mikael@lilotux.net>
parents: 1171
diff changeset
   186
void readline_disable_chat_mode(void);
1190
be06bbe7e449 Add readline_hist_beginning_search_bwd/fwd functions
Mikael Berthe <mikael@lilotux.net>
parents: 1179
diff changeset
   187
void readline_hist_beginning_search_bwd(void);
be06bbe7e449 Add readline_hist_beginning_search_bwd/fwd functions
Mikael Berthe <mikael@lilotux.net>
parents: 1179
diff changeset
   188
void readline_hist_beginning_search_fwd(void);
1171
03a38b7ad2e0 Add a collection of commands for key bindings (Lego12239)
Mikael Berthe <mikael@lilotux.net>
parents: 1138
diff changeset
   189
void readline_hist_prev(void);
03a38b7ad2e0 Add a collection of commands for key bindings (Lego12239)
Mikael Berthe <mikael@lilotux.net>
parents: 1138
diff changeset
   190
void readline_hist_next(void);
03a38b7ad2e0 Add a collection of commands for key bindings (Lego12239)
Mikael Berthe <mikael@lilotux.net>
parents: 1138
diff changeset
   191
void readline_backward_kill_char(void);
03a38b7ad2e0 Add a collection of commands for key bindings (Lego12239)
Mikael Berthe <mikael@lilotux.net>
parents: 1138
diff changeset
   192
void readline_forward_kill_char(void);
03a38b7ad2e0 Add a collection of commands for key bindings (Lego12239)
Mikael Berthe <mikael@lilotux.net>
parents: 1138
diff changeset
   193
void readline_iline_start(void);
03a38b7ad2e0 Add a collection of commands for key bindings (Lego12239)
Mikael Berthe <mikael@lilotux.net>
parents: 1138
diff changeset
   194
void readline_iline_end(void);
03a38b7ad2e0 Add a collection of commands for key bindings (Lego12239)
Mikael Berthe <mikael@lilotux.net>
parents: 1138
diff changeset
   195
void readline_backward_kill_iline(void);
03a38b7ad2e0 Add a collection of commands for key bindings (Lego12239)
Mikael Berthe <mikael@lilotux.net>
parents: 1138
diff changeset
   196
void readline_forward_kill_iline(void);
03a38b7ad2e0 Add a collection of commands for key bindings (Lego12239)
Mikael Berthe <mikael@lilotux.net>
parents: 1138
diff changeset
   197
void readline_send_multiline(void);
03a38b7ad2e0 Add a collection of commands for key bindings (Lego12239)
Mikael Berthe <mikael@lilotux.net>
parents: 1138
diff changeset
   198
24
e88b15cbf2de [/trunk] Changeset 40 by mikael
mikael
parents:
diff changeset
   199
#endif
576
8b3db0b555a1 Add Vim modelines
Mikael Berthe <mikael@lilotux.net>
parents: 515
diff changeset
   200
580
fed6d1e4d7a9 Fix modelines
Mikael Berthe <mikael@lilotux.net>
parents: 576
diff changeset
   201
/* vim: set expandtab cindent cinoptions=>2\:2(0:  For Vim users... */