Mercurial > hg
annotate mcabber/src/hbuf.h @ 1405:e21757606b5b
Update UK help files
author | Myhailo Danylenko <isbear@ukrpost.net> |
---|---|
date | Fri, 11 Jan 2008 12:06:50 +0100 |
parents | e42f48103609 |
children | 757ebe4df0b9 |
rev | line source |
---|---|
71 | 1 #ifndef __HBUF_H__ |
2 #define __HBUF_H__ 1 | |
3 | |
184 | 4 #include <time.h> |
71 | 5 #include <glib.h> |
6 | |
106 | 7 // With current implementation a message must fit in a hbuf block, |
8 // so we shouldn't choose a too small size. | |
795
b16acadd7d53
Improve support for long messages
Mikael Berthe <mikael@lilotux.net>
parents:
728
diff
changeset
|
9 #define HBB_BLOCKSIZE 8192 // > 20 please |
71 | 10 |
11 // Flags: | |
12 // - ALLOC: the ptr data has been allocated, it can be freed | |
13 // - PERSISTENT: this is a new history line | |
14 #define HBB_FLAG_ALLOC 1 | |
15 #define HBB_FLAG_PERSISTENT 2 | |
184 | 16 |
1204
e802ec0c02d2
Basic support for nick highlighting in MUC rooms (the whole line is colored)
Mikael Berthe <mikael@lilotux.net>
parents:
1141
diff
changeset
|
17 #define HBB_PREFIX_IN (1U<<0) |
e802ec0c02d2
Basic support for nick highlighting in MUC rooms (the whole line is colored)
Mikael Berthe <mikael@lilotux.net>
parents:
1141
diff
changeset
|
18 #define HBB_PREFIX_OUT (1U<<1) |
e802ec0c02d2
Basic support for nick highlighting in MUC rooms (the whole line is colored)
Mikael Berthe <mikael@lilotux.net>
parents:
1141
diff
changeset
|
19 #define HBB_PREFIX_STATUS (1U<<2) |
e802ec0c02d2
Basic support for nick highlighting in MUC rooms (the whole line is colored)
Mikael Berthe <mikael@lilotux.net>
parents:
1141
diff
changeset
|
20 #define HBB_PREFIX_AUTH (1U<<3) |
e802ec0c02d2
Basic support for nick highlighting in MUC rooms (the whole line is colored)
Mikael Berthe <mikael@lilotux.net>
parents:
1141
diff
changeset
|
21 #define HBB_PREFIX_INFO (1U<<4) |
e802ec0c02d2
Basic support for nick highlighting in MUC rooms (the whole line is colored)
Mikael Berthe <mikael@lilotux.net>
parents:
1141
diff
changeset
|
22 #define HBB_PREFIX_ERR (1U<<5) |
e802ec0c02d2
Basic support for nick highlighting in MUC rooms (the whole line is colored)
Mikael Berthe <mikael@lilotux.net>
parents:
1141
diff
changeset
|
23 #define HBB_PREFIX_NOFLAG (1U<<6) |
e802ec0c02d2
Basic support for nick highlighting in MUC rooms (the whole line is colored)
Mikael Berthe <mikael@lilotux.net>
parents:
1141
diff
changeset
|
24 #define HBB_PREFIX_HLIGHT_OUT (1U<<7) |
e802ec0c02d2
Basic support for nick highlighting in MUC rooms (the whole line is colored)
Mikael Berthe <mikael@lilotux.net>
parents:
1141
diff
changeset
|
25 #define HBB_PREFIX_HLIGHT (1U<<8) |
e802ec0c02d2
Basic support for nick highlighting in MUC rooms (the whole line is colored)
Mikael Berthe <mikael@lilotux.net>
parents:
1141
diff
changeset
|
26 #define HBB_PREFIX_NONE (1U<<9) |
e802ec0c02d2
Basic support for nick highlighting in MUC rooms (the whole line is colored)
Mikael Berthe <mikael@lilotux.net>
parents:
1141
diff
changeset
|
27 #define HBB_PREFIX_SPECIAL (1U<<10) |
e802ec0c02d2
Basic support for nick highlighting in MUC rooms (the whole line is colored)
Mikael Berthe <mikael@lilotux.net>
parents:
1141
diff
changeset
|
28 #define HBB_PREFIX_PGPCRYPT (1U<<11) |
1268
dbc907b2d92f
Add configurable colors for info and incoming messages (Michal 'vorner' Vaner)
Mikael Berthe <mikael@lilotux.net>
parents:
1227
diff
changeset
|
29 #define HBB_PREFIX_CONT (1U<<12) |
71 | 30 |
184 | 31 typedef struct { |
32 time_t timestamp; | |
850
d0781ca2dd08
Use new status buffer window
Mikael Berthe <mikael@lilotux.net>
parents:
847
diff
changeset
|
33 guint flags; |
1290
e42f48103609
Drawing the MUC nicks by a different color
Michal 'vorner' Vaner <vorner@ucw.cz>
parents:
1268
diff
changeset
|
34 unsigned mucnicklen; |
184 | 35 char *text; |
36 } hbb_line; | |
37 | |
38 void hbuf_add_line(GList **p_hbuf, const char *text, time_t timestamp, | |
1290
e42f48103609
Drawing the MUC nicks by a different color
Michal 'vorner' Vaner <vorner@ucw.cz>
parents:
1268
diff
changeset
|
39 guint prefix_flags, guint width, guint maxhbufblocks, |
e42f48103609
Drawing the MUC nicks by a different color
Michal 'vorner' Vaner <vorner@ucw.cz>
parents:
1268
diff
changeset
|
40 unsigned mucnicklen); |
71 | 41 void hbuf_free(GList **p_hbuf); |
42 void hbuf_rebuild(GList **p_hbuf, unsigned int width); | |
189 | 43 GList *hbuf_previous_persistent(GList *l_line); |
71 | 44 |
184 | 45 hbb_line **hbuf_get_lines(GList *hbuf, unsigned int n); |
370
dd9e2eb52916
Add /buffer search_{backward,forward}
Mikael Berthe <mikael@lilotux.net>
parents:
364
diff
changeset
|
46 GList *hbuf_search(GList *hbuf, int direction, const char *string); |
464 | 47 GList *hbuf_jump_date(GList *hbuf, time_t t); |
462 | 48 GList *hbuf_jump_percent(GList *hbuf, int pc); |
71 | 49 |
1227
79c396678f1b
Make buffer list display the number of allocated HBB blocks
Mikael Berthe <mikael@lilotux.net>
parents:
1204
diff
changeset
|
50 #ifdef DEBUG_ENABLE |
79c396678f1b
Make buffer list display the number of allocated HBB blocks
Mikael Berthe <mikael@lilotux.net>
parents:
1204
diff
changeset
|
51 guint hbuf_get_blocks_number(GList *p_hbuf); |
79c396678f1b
Make buffer list display the number of allocated HBB blocks
Mikael Berthe <mikael@lilotux.net>
parents:
1204
diff
changeset
|
52 #endif |
79c396678f1b
Make buffer list display the number of allocated HBB blocks
Mikael Berthe <mikael@lilotux.net>
parents:
1204
diff
changeset
|
53 |
71 | 54 #endif /* __HBUF_H__ */ |
576 | 55 |
580 | 56 /* vim: set expandtab cindent cinoptions=>2\:2(0: For Vim users... */ |