summaryrefslogtreecommitdiff
path: root/doc/en/weechat_plugin_api.en.txt
diff options
context:
space:
mode:
authorSebastien Helleu <flashcode@flashtux.org>2011-11-25 15:09:44 +0100
committerSebastien Helleu <flashcode@flashtux.org>2011-11-25 15:09:44 +0100
commitbfc010df2f661b8b03c59ef9af83d2128baf4c89 (patch)
treefd94fddbfef90aa4a0a4ec09b6d007451bc2047d /doc/en/weechat_plugin_api.en.txt
parent96940af8c3081631e9834840916a477c2df3351c (diff)
downloadweechat-bfc010df2f661b8b03c59ef9af83d2128baf4c89.zip
core: add type char for hdata and function hdata_char in plugin/script API
Diffstat (limited to 'doc/en/weechat_plugin_api.en.txt')
-rw-r--r--doc/en/weechat_plugin_api.en.txt46
1 files changed, 46 insertions, 0 deletions
diff --git a/doc/en/weechat_plugin_api.en.txt b/doc/en/weechat_plugin_api.en.txt
index 0623482eb..ca59b681e 100644
--- a/doc/en/weechat_plugin_api.en.txt
+++ b/doc/en/weechat_plugin_api.en.txt
@@ -12092,6 +12092,7 @@ Arguments:
* 'name': variable name
* 'offset': offset of variable in structure
* 'type': variable type, one of:
+** WEECHAT_HDATA_CHAR
** WEECHAT_HDATA_INTEGER
** WEECHAT_HDATA_LONG
** WEECHAT_HDATA_STRING
@@ -12305,6 +12306,9 @@ C example:
int type = weechat_hdata_get_var_type (hdata, "name");
switch (type)
{
+ case WEECHAT_HDATA_CHAR:
+ /* ... */
+ break;
case WEECHAT_HDATA_INTEGER:
/* ... */
break;
@@ -12589,6 +12593,48 @@ if buffer:
buffer = weechat.hdata_move(hdata, buffer, -1)
----------------------------------------
+weechat_hdata_char
+^^^^^^^^^^^^^^^^^^
+
+_New in version 0.3.7._
+
+Return value of char variable in structure using hdata.
+
+Prototype:
+
+[source,C]
+----------------------------------------
+char weechat_hdata_char (struct t_hdata *hdata, void *pointer, const char *name);
+----------------------------------------
+
+Arguments:
+
+* 'hdata': hdata pointer
+* 'pointer': pointer to WeeChat/plugin object
+* 'name': variable name (must be type "char")
+
+Return value:
+
+* char value of variable
+
+C example:
+
+[source,C]
+----------------------------------------
+weechat_printf (NULL, "letter = %c", weechat_hdata_char (hdata, pointer, "letter"));
+----------------------------------------
+
+Script (Python):
+
+[source,python]
+----------------------------------------
+# prototype
+value = weechat.hdata_char(hdata, pointer, name)
+
+# example
+weechat.prnt("", "letter = %c" % weechat.hdata_char(hdata, pointer, "letter"))
+----------------------------------------
+
weechat_hdata_integer
^^^^^^^^^^^^^^^^^^^^^