annotate mcabber/mcabber/compl.h @ 2107:1bd9978ed5d0

Added carbon command Also added help commands for carbons Added auto completion for carbons command
author Roeland Jago Douma <roeland@famdouma.nl>
date Tue, 15 Oct 2013 18:55:18 +0200
parents 0cb8ea02e472
children 2f294c2b6778
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
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
9a4aa2797f02 [/trunk] Changeset 108 by mikael
mikael
parents:
diff changeset
3
9a4aa2797f02 [/trunk] Changeset 108 by mikael
mikael
parents:
diff changeset
4 #include <glib.h>
9a4aa2797f02 [/trunk] Changeset 108 by mikael
mikael
parents:
diff changeset
5
1668
41c26b7d2890 Install mcabber headers
Myhailo Danylenko <isbear@ukrpost.net>
parents: 1607
diff changeset
6 #include <mcabber/config.h>
1607
14690e624e9d Add modules
Myhailo Danylenko <isbear@ukrpost.net>
parents: 1299
diff changeset
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
14690e624e9d Add modules
Myhailo Danylenko <isbear@ukrpost.net>
parents: 1299
diff changeset
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
14690e624e9d Add modules
Myhailo Danylenko <isbear@ukrpost.net>
parents: 1299
diff changeset
44 #endif
94
9a4aa2797f02 [/trunk] Changeset 108 by mikael
mikael
parents:
diff changeset
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
9a4aa2797f02 [/trunk] Changeset 108 by mikael
mikael
parents:
diff changeset
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
f20831f7d349 [/trunk] Changeset 112 by mikael
mikael
parents: 95
diff changeset
52 void done_completion(void);
f20831f7d349 [/trunk] Changeset 112 by mikael
mikael
parents: 95
diff changeset
53 guint cancel_completion(void);
94
9a4aa2797f02 [/trunk] Changeset 108 by mikael
mikael
parents:
diff changeset
54 const char *complete(void);
9a4aa2797f02 [/trunk] Changeset 108 by mikael
mikael
parents:
diff changeset
55
1668
41c26b7d2890 Install mcabber headers
Myhailo Danylenko <isbear@ukrpost.net>
parents: 1607
diff changeset
56 #endif /* __MCABBER_COMPL_H__ */
576
8b3db0b555a1 Add Vim modelines
Mikael Berthe <mikael@lilotux.net>
parents: 501
diff changeset
57
1811
e6d355e50d7a Update Vim modelines
Mikael Berthe <mikael@lilotux.net>
parents: 1756
diff changeset
58 /* vim: set expandtab cindent cinoptions=>2\:2(0 sw=2 ts=2: For Vim users... */