Mercurial > ~mikael > mcabber > hg
annotate mcabber/mcabber/compl.h @ 2223:965e0282c128
Backed out changeset fa516ef22145
Turns out that in this hash the value pointer is the same as the
key pointer, so there's no need to free both the key and the value.
author | Mikael Berthe <mikael@lilotux.net> |
---|---|
date | Fri, 06 Nov 2015 22:31:40 +0100 |
parents | 2f294c2b6778 |
children |
rev | line source |
---|---|
1668
41c26b7d2890
Install mcabber headers
Myhailo Danylenko <isbear@ukrpost.net>
parents:
1607
diff
changeset
|
1 #ifndef __MCABBER_COMPL_H__ |
41c26b7d2890
Install mcabber headers
Myhailo Danylenko <isbear@ukrpost.net>
parents:
1607
diff
changeset
|
2 #define __MCABBER_COMPL_H__ 1 |
94 | 3 |
4 #include <glib.h> | |
5 | |
1668
41c26b7d2890
Install mcabber headers
Myhailo Danylenko <isbear@ukrpost.net>
parents:
1607
diff
changeset
|
6 #include <mcabber/config.h> |
1607 | 7 |
1922
4ba68ad737bc
Increase the number of available categories for completions
Mikael Berthe <mikael@lilotux.net>
parents:
1811
diff
changeset
|
8 #define COMPL_CMD 1 |
4ba68ad737bc
Increase the number of available categories for completions
Mikael Berthe <mikael@lilotux.net>
parents:
1811
diff
changeset
|
9 #define COMPL_JID 2 |
4ba68ad737bc
Increase the number of available categories for completions
Mikael Berthe <mikael@lilotux.net>
parents:
1811
diff
changeset
|
10 #define COMPL_URLJID 3 // Not implemented yet |
4ba68ad737bc
Increase the number of available categories for completions
Mikael Berthe <mikael@lilotux.net>
parents:
1811
diff
changeset
|
11 #define COMPL_NAME 4 // Not implemented yet |
4ba68ad737bc
Increase the number of available categories for completions
Mikael Berthe <mikael@lilotux.net>
parents:
1811
diff
changeset
|
12 #define COMPL_STATUS 5 |
4ba68ad737bc
Increase the number of available categories for completions
Mikael Berthe <mikael@lilotux.net>
parents:
1811
diff
changeset
|
13 #define COMPL_FILENAME 6 // Not implemented yet |
4ba68ad737bc
Increase the number of available categories for completions
Mikael Berthe <mikael@lilotux.net>
parents:
1811
diff
changeset
|
14 #define COMPL_ROSTER 7 |
4ba68ad737bc
Increase the number of available categories for completions
Mikael Berthe <mikael@lilotux.net>
parents:
1811
diff
changeset
|
15 #define COMPL_BUFFER 8 |
4ba68ad737bc
Increase the number of available categories for completions
Mikael Berthe <mikael@lilotux.net>
parents:
1811
diff
changeset
|
16 #define COMPL_GROUP 9 |
4ba68ad737bc
Increase the number of available categories for completions
Mikael Berthe <mikael@lilotux.net>
parents:
1811
diff
changeset
|
17 #define COMPL_GROUPNAME 10 |
4ba68ad737bc
Increase the number of available categories for completions
Mikael Berthe <mikael@lilotux.net>
parents:
1811
diff
changeset
|
18 #define COMPL_MULTILINE 11 |
4ba68ad737bc
Increase the number of available categories for completions
Mikael Berthe <mikael@lilotux.net>
parents:
1811
diff
changeset
|
19 #define COMPL_ROOM 12 |
4ba68ad737bc
Increase the number of available categories for completions
Mikael Berthe <mikael@lilotux.net>
parents:
1811
diff
changeset
|
20 #define COMPL_RESOURCE 13 |
4ba68ad737bc
Increase the number of available categories for completions
Mikael Berthe <mikael@lilotux.net>
parents:
1811
diff
changeset
|
21 #define COMPL_AUTH 14 |
4ba68ad737bc
Increase the number of available categories for completions
Mikael Berthe <mikael@lilotux.net>
parents:
1811
diff
changeset
|
22 #define COMPL_REQUEST 15 |
4ba68ad737bc
Increase the number of available categories for completions
Mikael Berthe <mikael@lilotux.net>
parents:
1811
diff
changeset
|
23 #define COMPL_EVENTS 16 |
4ba68ad737bc
Increase the number of available categories for completions
Mikael Berthe <mikael@lilotux.net>
parents:
1811
diff
changeset
|
24 #define COMPL_EVENTSID 17 |
4ba68ad737bc
Increase the number of available categories for completions
Mikael Berthe <mikael@lilotux.net>
parents:
1811
diff
changeset
|
25 #define COMPL_PGP 18 |
4ba68ad737bc
Increase the number of available categories for completions
Mikael Berthe <mikael@lilotux.net>
parents:
1811
diff
changeset
|
26 #define COMPL_COLOR 19 |
4ba68ad737bc
Increase the number of available categories for completions
Mikael Berthe <mikael@lilotux.net>
parents:
1811
diff
changeset
|
27 #define COMPL_OTR 20 |
4ba68ad737bc
Increase the number of available categories for completions
Mikael Berthe <mikael@lilotux.net>
parents:
1811
diff
changeset
|
28 #define COMPL_OTRPOLICY 21 |
1923
924f4552996c
Add a category module to complete the /module subcommands
Mikael Berthe <mikael@lilotux.net>
parents:
1922
diff
changeset
|
29 #define COMPL_MODULE 22 |
2107
1bd9978ed5d0
Added carbon command
Roeland Jago Douma <roeland@famdouma.nl>
parents:
2042
diff
changeset
|
30 #define COMPL_CARBONS 23 |
2042
0cb8ea02e472
Make completion sorting order configurable
Myhailo Danylenko <isbear@ukrpost.net>
parents:
1923
diff
changeset
|
31 /* private */ |
2107
1bd9978ed5d0
Added carbon command
Roeland Jago Douma <roeland@famdouma.nl>
parents:
2042
diff
changeset
|
32 #define COMPL_MAX_ID 23 |
2042
0cb8ea02e472
Make completion sorting order configurable
Myhailo Danylenko <isbear@ukrpost.net>
parents:
1923
diff
changeset
|
33 |
0cb8ea02e472
Make completion sorting order configurable
Myhailo Danylenko <isbear@ukrpost.net>
parents:
1923
diff
changeset
|
34 void compl_init_system(void); /* private */ |
1922
4ba68ad737bc
Increase the number of available categories for completions
Mikael Berthe <mikael@lilotux.net>
parents:
1811
diff
changeset
|
35 |
1607 | 36 #ifdef MODULES_ENABLE |
2042
0cb8ea02e472
Make completion sorting order configurable
Myhailo Danylenko <isbear@ukrpost.net>
parents:
1923
diff
changeset
|
37 #define COMPL_FLAGS_SORT 0x00 |
0cb8ea02e472
Make completion sorting order configurable
Myhailo Danylenko <isbear@ukrpost.net>
parents:
1923
diff
changeset
|
38 #define COMPL_FLAGS_REVERSE 0x10 |
0cb8ea02e472
Make completion sorting order configurable
Myhailo Danylenko <isbear@ukrpost.net>
parents:
1923
diff
changeset
|
39 #define COMPL_FLAGS_APPEND 0x20 |
0cb8ea02e472
Make completion sorting order configurable
Myhailo Danylenko <isbear@ukrpost.net>
parents:
1923
diff
changeset
|
40 #define COMPL_FLAGS_PREPEND 0x30 |
0cb8ea02e472
Make completion sorting order configurable
Myhailo Danylenko <isbear@ukrpost.net>
parents:
1923
diff
changeset
|
41 |
0cb8ea02e472
Make completion sorting order configurable
Myhailo Danylenko <isbear@ukrpost.net>
parents:
1923
diff
changeset
|
42 guint compl_new_category(guint flags); |
1922
4ba68ad737bc
Increase the number of available categories for completions
Mikael Berthe <mikael@lilotux.net>
parents:
1811
diff
changeset
|
43 void compl_del_category(guint id); |
1607 | 44 #endif |
94 | 45 |
1922
4ba68ad737bc
Increase the number of available categories for completions
Mikael Berthe <mikael@lilotux.net>
parents:
1811
diff
changeset
|
46 void compl_add_category_word(guint categ, const gchar *command); |
1756
e2c084204583
Add (optional) suffix after nick completion in Multi-User Chats
Mikael Berthe <mikael@lilotux.net>
parents:
1668
diff
changeset
|
47 void compl_del_category_word(guint categ, const gchar *word); |
1922
4ba68ad737bc
Increase the number of available categories for completions
Mikael Berthe <mikael@lilotux.net>
parents:
1811
diff
changeset
|
48 GSList *compl_get_category_list(guint categ, guint *dynlist); |
94 | 49 |
1756
e2c084204583
Add (optional) suffix after nick completion in Multi-User Chats
Mikael Berthe <mikael@lilotux.net>
parents:
1668
diff
changeset
|
50 guint new_completion(const gchar *prefix, GSList *compl_cat, |
e2c084204583
Add (optional) suffix after nick completion in Multi-User Chats
Mikael Berthe <mikael@lilotux.net>
parents:
1668
diff
changeset
|
51 const gchar *suffix); |
98 | 52 void done_completion(void); |
53 guint cancel_completion(void); | |
2143
2f294c2b6778
Add a backward completion (Oleg)
Mikael Berthe <mikael@lilotux.net>
parents:
2107
diff
changeset
|
54 const char *complete(gboolean fwd); |
94 | 55 |
1668
41c26b7d2890
Install mcabber headers
Myhailo Danylenko <isbear@ukrpost.net>
parents:
1607
diff
changeset
|
56 #endif /* __MCABBER_COMPL_H__ */ |
576 | 57 |
1811 | 58 /* vim: set expandtab cindent cinoptions=>2\:2(0 sw=2 ts=2: For Vim users... */ |