summaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
authorSebastien Helleu <flashcode@flashtux.org>2010-11-09 15:45:14 +0100
committerSebastien Helleu <flashcode@flashtux.org>2010-11-09 15:45:14 +0100
commit8c129779acf613fb1c23a6345eb64d745ef7e2f4 (patch)
treee969794a729ca30328644b360201b82bf6079cb4 /src/core
parent25879ca18965d8b2a6e9f5de290cf1bc5eb82ae6 (diff)
downloadweechat-8c129779acf613fb1c23a6345eb64d745ef7e2f4.zip
Add function "hook_completion_get_string" in plugin API
Diffstat (limited to 'src/core')
-rw-r--r--src/core/wee-hook.c11
-rw-r--r--src/core/wee-hook.h2
2 files changed, 13 insertions, 0 deletions
diff --git a/src/core/wee-hook.c b/src/core/wee-hook.c
index dc0726231..5ed947f7e 100644
--- a/src/core/wee-hook.c
+++ b/src/core/wee-hook.c
@@ -2064,6 +2064,17 @@ hook_completion (struct t_weechat_plugin *plugin, const char *completion_item,
}
/*
+ * hook_completion_get_string: get a completion property as string
+ */
+
+const char *
+hook_completion_get_string (struct t_gui_completion *completion,
+ const char *property)
+{
+ return gui_completion_get_string (completion, property);
+}
+
+/*
* hook_completion_list_add: add a word for a completion (called by plugins)
*/
diff --git a/src/core/wee-hook.h b/src/core/wee-hook.h
index c849b36af..45a5ed34c 100644
--- a/src/core/wee-hook.h
+++ b/src/core/wee-hook.h
@@ -439,6 +439,8 @@ extern struct t_hook *hook_completion (struct t_weechat_plugin *plugin,
const char *description,
t_hook_callback_completion *callback,
void *callback_data);
+extern const char *hook_completion_get_string (struct t_gui_completion *completion,
+ const char *property);
extern void hook_completion_list_add (struct t_gui_completion *completion,
const char *word, int nick_completion,
const char *where);