summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSébastien Helleu <flashcode@flashtux.org>2021-05-13 19:39:46 +0200
committerSébastien Helleu <flashcode@flashtux.org>2021-05-13 20:24:59 +0200
commitfafe2c9d2e3474037efa43d342a7277170972c12 (patch)
tree06ad6131e9ab958ac4baf00545b314e03414d821
parent3e122ed900319d22c483a9def13eb3f2068cd251 (diff)
downloadweechat-fafe2c9d2e3474037efa43d342a7277170972c12.zip
doc: add type annotations in Python prototypes (plugin API reference) (issue #1377)
-rw-r--r--doc/en/weechat_plugin_api.en.adoc435
-rw-r--r--doc/fr/weechat_plugin_api.fr.adoc436
-rw-r--r--doc/it/weechat_plugin_api.it.adoc435
-rw-r--r--doc/ja/weechat_plugin_api.ja.adoc435
4 files changed, 876 insertions, 865 deletions
diff --git a/doc/en/weechat_plugin_api.en.adoc b/doc/en/weechat_plugin_api.en.adoc
index 087ab73d4..0092c57ad 100644
--- a/doc/en/weechat_plugin_api.en.adoc
+++ b/doc/en/weechat_plugin_api.en.adoc
@@ -290,7 +290,7 @@ Script (Python):
[source,python]
----
# prototype
-weechat.register(name, author, version, license, description, shutdown_function, charset)
+def register(name: str, author: str, version: str, license: str, description: str, shutdown_function: str, charset: str) -> int: ...
----
[NOTE]
@@ -332,7 +332,7 @@ Script (Python):
[source,python]
----
# prototype
-name = weechat.plugin_get_name(plugin)
+def plugin_get_name(plugin: str) -> str: ...
# example
plugin = weechat.buffer_get_pointer(weechat.current_buffer(), "plugin")
@@ -374,7 +374,7 @@ Script (Python):
[source,python]
----
# prototype
-weechat.charset_set(charset)
+def charset_set(charset: str) -> int: ...
# example
weechat.charset_set("iso-8859-1")
@@ -414,7 +414,7 @@ Script (Python):
[source,python]
----
# prototype
-str = weechat.iconv_to_internal(charset, string)
+def iconv_to_internal(charset: str, string: str) -> str: ...
# example
str = weechat.iconv_to_internal("iso-8859-1", "iso string: é à")
@@ -454,7 +454,7 @@ Script (Python):
[source,python]
----
# prototype
-str = weechat.iconv_from_internal(charset, string)
+def iconv_from_internal(charset: str, string: str) -> str: ...
# example
str = weechat.iconv_from_internal("iso-8859-1", "utf-8 string: é à")
@@ -491,7 +491,7 @@ Script (Python):
[source,python]
----
# prototype
-str = weechat.gettext(string)
+def gettext(string: str) -> str: ...
# example
str = weechat.gettext("hello")
@@ -534,7 +534,7 @@ Script (Python):
[source,python]
----
# prototype
-str = weechat.ngettext(string, plural, count)
+def ngettext(string: str, plural: str, count) -> str: ...
# example
num_files = 2
@@ -886,7 +886,7 @@ Script (Python):
[source,python]
----
# prototype
-length = weechat.strlen_screen(string)
+def strlen_screen(string: str) -> int: ...
# example
length = weechat.strlen_screen("é") # 1
@@ -937,7 +937,7 @@ Script (Python):
[source,python]
----
# prototype
-match = weechat.string_match(string, mask, case_sensitive)
+def string_match(string: str, mask: str, case_sensitive: int) -> int: ...
# examples
match1 = weechat.string_match("abcdef", "abc*", 0) # == 1
@@ -990,7 +990,7 @@ Script (Python):
[source,python]
----
# prototype
-match = weechat.string_match_list(string, masks, case_sensitive)
+def string_match_list(string: str, masks: str, case_sensitive: int) -> int: ...
# examples
match1 = weechat.string_match("abc", "*,!abc*", 0) # == 0
@@ -1090,7 +1090,7 @@ Script (Python):
[source,python]
----
# prototype
-path = weechat.string_eval_path_home(path, pointers, extra_vars, options)
+def string_eval_path_home(path: str, pointers: Dict[str, str], extra_vars: Dict[str, str], options: Dict[str, str]) -> str: ...
# example
path = weechat.string_eval_path_home("${weechat_config_dir}/test.conf", {}, {}, {})
@@ -1252,7 +1252,7 @@ Script (Python):
[source,python]
----
# prototype
-regex = weechat.string_mask_to_regex(mask)
+def string_mask_to_regex(mask: str) -> str: ...
# example
regex = weechat.string_mask_to_regex("test*mask") # "test.*mask"
@@ -1398,7 +1398,7 @@ Script (Python):
[source,python]
----
# prototype
-highlight = weechat.string_has_highlight(string, highlight_words)
+def string_has_highlight(string: str, highlight_words: str) -> int: ...
# example
highlight = weechat.string_has_highlight("my test string", "test,word2") # 1
@@ -1441,7 +1441,7 @@ Script (Python):
[source,python]
----
# prototype
-highlight = weechat.string_has_highlight_regex(string, regex)
+def string_has_highlight_regex(string: str, regex: str) -> int: ...
# example
highlight = weechat.string_has_highlight_regex("my test string", "test|word2") # 1
@@ -1899,7 +1899,7 @@ Script (Python), _WeeChat ≥ 2.2_:
[source,python]
----
# prototype
-str = weechat.string_format_size(size)
+def string_format_size(size: int) -> str: ...
# example
str = weechat.string_format_size(15200) # == "15.2 KB"
@@ -1946,7 +1946,7 @@ Script (Python):
[source,python]
----
# prototype
-size = weechat.string_color_code_size(string)
+def string_color_code_size(string: str) -> int: ...
# examples
size = weechat.string_color_code_size("test") # size == 0
@@ -1997,7 +1997,7 @@ Script (Python):
[source,python]
----
# prototype
-str = weechat.string_remove_color(string, replacement)
+def string_remove_color(string: str, replacement: str) -> str: ...
# example
str = weechat.string_remove_color(my_string, "?")
@@ -2161,7 +2161,7 @@ Script (Python):
[source,python]
----
# prototype
-is_cmdchar = weechat.string_is_command_char(string)
+def string_is_command_char(string: str) -> int: ...
# examples
command_char1 = weechat.string_is_command_char("/test") # == 1
@@ -2204,7 +2204,7 @@ Script (Python):
[source,python]
----
# prototype
-str = weechat.string_input_for_buffer(string)
+def string_input_for_buffer(string: str) -> str: ...
# examples
str1 = weechat.string_input_for_buffer("test") # "test"
@@ -2312,7 +2312,7 @@ Script (Python):
[source,python]
----
# prototype
-str = weechat.string_eval_expression(expr, pointers, extra_vars, options)
+def string_eval_expression(expr: str, pointers: Dict[str, str], extra_vars: Dict[str, str], options: Dict[str, str]) -> str: ...
# examples
@@ -3667,7 +3667,7 @@ Script (Python):
[source,python]
----
# prototype
-weechat.mkdir_home(directory, mode)
+def mkdir_home(directory: str, mode: int) -> int: ...
# example
weechat.mkdir_home("${weechat_cache_dir}/temp", 0755)
@@ -3708,7 +3708,7 @@ Script (Python):
[source,python]
----
# prototype
-weechat.mkdir(directory, mode)
+def mkdir(directory: str, mode: int) -> int: ...
# example
weechat.mkdir("/tmp/mydir", 0755)
@@ -3749,7 +3749,7 @@ Script (Python):
[source,python]
----
# prototype
-weechat.mkdir_parents(directory, mode)
+def mkdir_parents(directory: str, mode: int) -> int: ...
# example
weechat.mkdir_parents("/tmp/my/dir", 0755)
@@ -4035,7 +4035,7 @@ Script (Python):
[source,python]
----
# prototype
-list = weechat.list_new()
+def list_new() -> str: ...
# example
list = weechat.list_new()
@@ -4082,7 +4082,7 @@ Script (Python):
[source,python]
----
# prototype
-item = weechat.list_add(list, data, where, user_data)
+def list_add(list: str, data: str, where: str, user_data: str) -> str: ...
# example
item = weechat.list_add(list, "my data", weechat.WEECHAT_LIST_POS_SORT, "")
@@ -4121,7 +4121,7 @@ Script (Python):
[source,python]
----
# prototype
-item = weechat.list_search(list, data)
+def list_search(list: str, data: str) -> str: ...
# example
item = weechat.list_search(list, "my data")
@@ -4162,7 +4162,7 @@ Script (Python):
[source,python]
----
# prototype
-pos_item = weechat.list_search_pos(list, data)
+def list_search_pos(list: str, data: str) -> int: ...
# example
pos_item = weechat.list_search_pos(list, "my data")
@@ -4201,7 +4201,7 @@ Script (Python):
[source,python]
----
# prototype
-item = weechat.list_casesearch(list, data)
+def list_casesearch(list: str, data: str) -> str: ...
# example
item = weechat.list_casesearch(list, "my data")
@@ -4242,7 +4242,7 @@ Script (Python):
[source,python]
----
# prototype
-pos_item = weechat.list_casesearch_pos(list, data)
+def list_casesearch_pos(list: str, data: str) -> int: ...
# example
pos_item = weechat.list_casesearch_pos(list, "my data")
@@ -4281,7 +4281,7 @@ Script (Python):
[source,python]
----
# prototype
-item = weechat.list_get(list, position)
+def list_get(list: str, position: int) -> str: ...
# example
item = weechat.list_get(list, 0)
@@ -4315,7 +4315,7 @@ Script (Python):
[source,python]
----
# prototype
-weechat.list_set(item, value)
+def list_set(item: str, value: str) -> int: ...
# example
weechat.list_set(item, "new data")
@@ -4352,7 +4352,7 @@ Script (Python):
[source,python]
----
# prototype
-item = weechat.list_next(item)
+def list_next(item: str) -> str: ...
# example
item = weechat.list_next(item)
@@ -4389,7 +4389,7 @@ Script (Python):
[source,python]
----
# prototype
-item = weechat.list_prev(item)
+def list_prev(item: str) -> str: ...
# example
item = weechat.list_prev(item)
@@ -4426,7 +4426,7 @@ Script (Python):
[source,python]
----
# prototype
-value = weechat.list_string(item)
+def list_string(item: str) -> str: ...
# example
weechat.prnt("", "value of item: %s" % weechat.list_string(item))
@@ -4494,7 +4494,7 @@ Script (Python):
[source,python]
----
# prototype
-size = weechat.list_size(list)
+def list_size(list: str) -> int: ...
# example
weechat.prnt("", "size of list: %d" % weechat.list_size(list))
@@ -4529,7 +4529,7 @@ Script (Python):
[source,python]
----
# prototype
-weechat.list_remove(list, item)
+def list_remove(list: str, item: str) -> int: ...
# example
weechat.list_remove(list, item)
@@ -4562,7 +4562,7 @@ Script (Python):
[source,python]
----
# prototype
-weechat.list_remove_all(list)
+def list_remove_all(list: str) -> int: ...
# example
weechat.list_remove_all(list)
@@ -4595,7 +4595,7 @@ Script (Python):
[source,python]
----
# prototype
-weechat.list_free(list)
+def list_free(list: str) -> int: ...
# example
weechat.list_free(list)
@@ -5676,7 +5676,7 @@ Script (Python):
[source,python]
----
# prototype
-config_file = weechat.config_new(name, callback_reload, callback_reload_data)
+def config_new(name: str, callback_reload: str, callback_reload_data: str) -> str: ...
# example
def my_config_reload_cb(data, config_file):
@@ -5934,12 +5934,12 @@ Script (Python):
[source,python]
----
# prototype
-section = weechat.config_new_section(config_file, name,
- user_can_add_options, user_can_delete_options,
- callback_read, callback_read_data,
- callback_write, callback_write_data,
- callback_create_option, callback_create_option_data,
- callback_delete_option, callback_delete_option_data)
+def config_new_section(config_file: str, name: str,
+ user_can_add_options: int, user_can_delete_options: int,
+ callback_read: str, callback_read_data: str,
+ callback_write: str, callback_write_data: str,
+ callback_create_option: str, callback_create_option_data: str,
+ callback_delete_option: str, callback_delete_option_data: str) -> str: ...
# example
def my_section_read_cb(data, config_file, section, option_name, value):
@@ -6008,7 +6008,7 @@ Script (Python):
[source,python]
----
# prototype
-section = weechat.config_search_section(config_file, section_name)
+def config_search_section(config_file: str, section_name: str) -> str: ...
# example
section = weechat.config_search_section(config_file, "section")
@@ -6190,11 +6190,12 @@ Script (Python):
[source,python]
----
# prototype
-option = weechat.config_new_option(config_file, section, name, type, description,
- string_values, min, max, default_value, value, null_value_allowed,
- callback_check_value, callback_check_value_data,
- callback_change, callback_change_data,
- callback_delete, callback_delete_data)
+def config_new_option(config_file: str, section: str, name: str, type: str, description: str,
+ string_values: str, min: int, max: int,
+ default_value: str, value: str, null_value_allowed: int,
+ callback_check_value: str, callback_check_value_data: str,
+ callback_change: str, callback_change_data: str,
+ callback_delete: str, callback_delete_data: str) -> str: ...
# example
def option4_check_value_cb(data, option, value):
@@ -6288,7 +6289,7 @@ Script (Python):
[source,python]
----
# prototype
-option = weechat.config_search_option(config_file, section, option_name)
+def config_search_option(config_file: str, section: str, option_name: str) -> str: ...
# example
option = weechat.config_search_option(config_file, section, "option")
@@ -6437,7 +6438,7 @@ Script (Python):
[source,python]
----
# prototype
-value = weechat.config_string_to_boolean(text)
+def config_string_to_boolean(text: str) -> int: ...
# example
if weechat.config_string_to_boolean(text):
@@ -6491,7 +6492,7 @@ Script (Python):
[source,python]
----
# prototype
-rc = weechat.config_option_reset(option, run_callback)
+def config_option_reset(option: str, run_callback: int) -> int: ...
# example
rc = weechat.config_option_reset(option, 1)
@@ -6557,7 +6558,7 @@ Script (Python):
[source,python]
----
# prototype
-rc = weechat.config_option_set(option, value, run_callback)
+def config_option_set(option: str, value: str, run_callback: int) -> int: ...
# example
rc = weechat.config_option_set(option, "new_value", 1)
@@ -6620,7 +6621,7 @@ Script (Python):
[source,python]
----
# prototype
-rc = weechat.config_option_set_null(option, run_callback)
+def config_option_set_null(option: str, run_callback: int) -> int: ...
# example
rc = weechat.config_option_set_null(option, 1)
@@ -6680,7 +6681,7 @@ Script (Python):
[source,python]
----
# prototype
-rc = weechat.config_option_unset(option)
+def config_option_unset(option: str) -> int: ...
# example
rc = weechat.config_option_unset(option)
@@ -6723,7 +6724,7 @@ Script (Python):
[source,python]
----
# prototype
-weechat.config_option_rename(option, new_name)
+def config_option_rename(option: str, new_name: str) -> int: ...
# example
weechat.config_option_rename(option, "new_name")
@@ -6855,7 +6856,7 @@ Script (Python):
[source,python]
----
# prototype
-is_null = weechat.config_option_is_null(option)
+def config_option_is_null(option: str) -> int: ...
# example
if weechat.config_option_is_null(option):
@@ -6901,7 +6902,7 @@ Script (Python):
[source,python]
----
# prototype
-is_null = weechat.config_option_default_is_null(option)
+def config_option_default_is_null(option: str) -> int: ...
# example
if weechat.config_option_default_is_null(option):
@@ -6950,7 +6951,7 @@ Script (Python):
[source,python]
----
# prototype
-value = weechat.config_boolean(option)
+def config_boolean(option: str) -> int: ...
# example
option = weechat.config_get("plugin.section.option")
@@ -7000,7 +7001,7 @@ Script (Python):
[source,python]
----
# prototype
-value = weechat.config_boolean_default(option)
+def config_boolean_default(option: str) -> int: ...
# example
option = weechat.config_get("plugin.section.option")
@@ -7043,7 +7044,7 @@ Script (Python):
[source,python]
----
# prototype
-value = weechat.config_integer(option)
+def config_integer(option: str) -> int: ...
# example
option = weechat.config_get("plugin.section.option")
@@ -7085,7 +7086,7 @@ Script (Python):
[source,python]
----
# prototype
-value = weechat.config_integer_default(option)
+def config_integer_default(option: str) -> int: ...
# example
option = weechat.config_get("plugin.section.option")
@@ -7128,7 +7129,7 @@ Script (Python):
[source,python]
----
# prototype
-value = weechat.config_string(option)
+def config_string(option: str) -> str: ...
# example
option = weechat.config_get("plugin.section.option")
@@ -7171,7 +7172,7 @@ Script (Python):
[source,python]
----
# prototype
-value = weechat.config_string_default(option)
+def config_string_default(option: str) -> str: ...
# example
option = weechat.config_get("plugin.section.option")
@@ -7213,7 +7214,7 @@ Script (Python):
[source,python]
----
# prototype
-value = weechat.config_color(option)
+def config_color(option: str) -> str: ...
# example
option = weechat.config_get("plugin.section.option")
@@ -7255,7 +7256,7 @@ Script (Python):
[source,python]
----
# prototype
-value = weechat.config_color_default(option)
+def config_color_default(option: str) -> str: ...
# example
option = weechat.config_get("plugin.section.option")
@@ -7302,7 +7303,7 @@ Script (Python):
[source,python]
----
# prototype
-weechat.config_write_option(config_file, option)
+def config_write_option(config_file: str, option: str) -> int: ...
# example
def my_section_write_cb(data, config_file, section_name):
@@ -7355,7 +7356,7 @@ Script (Python):
[source,python]
----
# prototype
-weechat.config_write_line(config_file, option_name, value)
+def config_write_line(config_file: str, option_name: str, value: str) -> int: ...
# example
def my_section_write_cb(data, config_file, section_name):
@@ -7408,7 +7409,7 @@ Script (Python):
[source,python]
----
# prototype
-rc = weechat.config_write(config_file)
+def config_write(config_file: str) -> int: ...
# example
rc = weechat.config_write(config_file)
@@ -7464,7 +7465,7 @@ Script (Python):
[source,python]
----
# prototype
-rc = weechat.config_read(config_file)
+def config_read(config_file: str) -> int: ...
# example
rc = weechat.config_read(config_file)
@@ -7520,7 +7521,7 @@ Script (Python):
[source,python]
----
# prototype
-rc = weechat.config_reload(config_file)
+def config_reload(config_file: str) -> int: ...
# example
rc = weechat.config_reload(config_file)
@@ -7559,7 +7560,7 @@ Script (Python):
[source,python]
----
# prototype
-weechat.config_option_free(option)
+def config_option_free(option: str) -> int: ...
# example
weechat.config_option_free(option)
@@ -7592,7 +7593,7 @@ Script (Python):
[source,python]
----
# prototype
-weechat.config_section_free_options(section)
+def config_section_free_options(section: str) -> int: ...
# example
weechat.config_section_free_options(section)
@@ -7625,7 +7626,7 @@ Script (Python):
[source,python]
----
# prototype
-weechat.config_section_free(section)
+def config_section_free(section: str) -> int: ...
# example
weechat.config_section_free(section)
@@ -7658,7 +7659,7 @@ Script (Python):
[source,python]
----
# prototype
-weechat.config_free(config_file)
+def config_free(config_file: str) -> int: ...
# example
weechat.config_free(config_file)
@@ -7695,7 +7696,7 @@ Script (Python):
[source,python]
----
# prototype
-option = weechat.config_get(option_name)
+def config_get(option_name: str) -> str: ...
# example
option = weechat.config_get("weechat.look.item_time_format")
@@ -7735,7 +7736,7 @@ Script (Python):
[source,python]
----
# prototype
-value = weechat.config_get_plugin(option_name)
+def config_get_plugin(option_name: str) -> str: ...
# example
value = weechat.config_get_plugin("option")
@@ -7780,7 +7781,7 @@ Script (Python):
[source,python]
----
# prototype
-value = weechat.config_is_set_plugin(option_name)
+def config_is_set_plugin(option_name: str) -> int: ...
# example
if weechat.config_is_set_plugin("option"):
@@ -7841,7 +7842,7 @@ Script (Python):
[source,python]
----
# prototype
-rc = weechat.config_set_plugin(option_name, value)
+def config_set_plugin(option_name: str, value: str) -> int: ...
# example
rc = weechat.config_set_plugin("option", "test_value")
@@ -7891,7 +7892,7 @@ Script (Python):
[source,python]
----
# prototype
-weechat.config_set_desc_plugin(option_name, description)
+def config_set_desc_plugin(option_name: str, description: str) -> int: ...
# example
version = weechat.info_get("version_number", "") or 0
@@ -7948,7 +7949,7 @@ Script (Python):
[source,python]
----
# prototype
-rc = weechat.config_unset_plugin(option_name)
+def config_unset_plugin(option_name: str) -> int: ...
# example
rc = weechat.config_unset_plugin("option")
@@ -8025,7 +8026,7 @@ Script (Python):
[source,python]
----
# prototype
-num_keys = weechat.key_bind(context, keys)
+def key_bind(context: str, keys: Dict[str, str]) -> int: ...
# example
keys = {"@chat(python.test):button1": "hsignal:test_mouse",
@@ -8077,7 +8078,7 @@ Script (Python):
[source,python]
----
# prototype
-num_keys = weechat.key_unbind(context, key)
+def key_unbind(context: str, key: str) -> int: ...
# examples
@@ -8140,7 +8141,7 @@ Script (Python):
[source,python]
----
# prototype
-value = weechat.prefix(prefix)
+def prefix(prefix: str) -> str: ...
# example
weechat.prnt("", "%sThis is an error..." % weechat.prefix("error"))
@@ -8222,7 +8223,7 @@ Script (Python):
[source,python]
----
# prototype
-value = weechat.color(color_name)
+def color(color_name: str) -> str: ...
# example
weechat.prnt("", "Color: %sblue %sdefault color %syellow on red"
@@ -8282,7 +8283,7 @@ Script (Python):
[source,python]
----
# prototype
-weechat.prnt(buffer, message)
+def prnt(buffer: str, message: str) -> int: ...
# example
weechat.prnt("", "Hello on WeeChat buffer")
@@ -8331,7 +8332,7 @@ Script (Python):
[source,python]
----
# prototype
-weechat.prnt_date_tags(buffer, date, tags, message)
+def prnt_date_tags(buffer: str, date: str, tags: str, message: str) -> int: ...
# example
time = int(time.time())
@@ -8375,7 +8376,7 @@ Script (Python):
[source,python]
----
# prototype
-weechat.prnt_y(buffer, y, message)
+def prnt_y(buffer: str, y: int, message: str) -> int: ...
# example
weechat.prnt_y("", 2, "My message on third line")
@@ -8411,7 +8412,7 @@ Script (Python):
[source,python]
----
# prototype
-weechat.log_print(message)
+def log_print(message: str) -> int: ...
# example
weechat.log_print("My message in log file")
@@ -8584,8 +8585,8 @@ Script (Python):
[source,python]
----
# prototype
-hook = weechat.hook_command(command, description, args, args_description,
- completion, callback, callback_data)
+def hook_command(command: str, description: str, args: str, args_description: str,
+ completion: str, callback: str, callback_data: str) -> str: ...
# example
def my_command_cb(data, buffer, args):
@@ -8690,7 +8691,7 @@ Script (Python):
[source,python]
----
# prototype
-hook = weechat.hook_completion(completion_item, description, callback, callback_data)
+def hook_completion(completion_item: str, description: str, callback: str, callback_data: str) -> str: ...
# example
def my_completion_cb(data, completion_item, buffer, completion):
@@ -8777,7 +8778,7 @@ Script (Python):
[source,python]
----
# prototype
-hook = weechat.hook_command_run(command, callback, callback_data)
+def hook_command_run(command: str, callback: str, callback_data: str) -> str: ...
# example
def my_command_run_cb(data, buffer, command):
@@ -8851,7 +8852,7 @@ Script (Python):
[source,python]
----
# prototype
-hook = weechat.hook_timer(interval, align_second, max_calls, callback, callback_data)
+def hook_timer(interval: int, align_second: int, max_calls: int, callback: str, callback_data: str) -> str: ...
# example
def my_timer_cb(data, remaining_calls):
@@ -8935,7 +8936,7 @@ Script (Python):
[source,python]
----
# prototype
-hook = weechat.hook_fd(fd, flag_read, flag_write, flag_exception, callback, callback_data)
+def hook_fd(fd: int, flag_read: int, flag_write: int, flag_exception: int, callback: str, callback_data: str) -> str: ...
# example
def my_fd_cb(data, fd):
@@ -9134,7 +9135,7 @@ Script (Python):
[source,python]
----
# prototype
-hook = weechat.hook_process(command, timeout, callback, callback_data)
+def hook_process(command: str, timeout: int, callback: str, callback_data: str) -> str: ...
# example with an external command
def my_process_cb(data, command, return_code, out, err):
@@ -9368,7 +9369,7 @@ Script (Python):
[source,python]
----
# prototype
-hook = weechat.hook_process_hashtable(command, options, timeout, callback, callback_data)
+def hook_process_hashtable(command: str, options: Dict[str, str], timeout: int, callback: str, callback_data: str) -> str: ...
# example
def my_process_cb(data, command, return_code, out, err):
@@ -9565,8 +9566,8 @@ Script (Python):
[source,python]
----
# prototype
-hook = weechat.hook_connect(proxy, address, port, ipv6, retry, local_hostname,
- callback, callback_data)
+def hook_connect(proxy: str, address: str, port: int, ipv6: int, retry: int, local_hostname: str,
+ callback: str, callback_data: str) -> str: ...
# example
def my_connect_cb(data, status, gnutls_rc, sock, error, ip_address):
@@ -9860,7 +9861,7 @@ Script (Python):
[source,python]
----
# prototype
-hook = weechat.hook_line(buffer_type, buffer_name, tags, callback, callback_data)
+def hook_line(buffer_type: str, buffer_name: str, tags: str, callback: str, callback_data: str) -> str: ...
# example
def my_line_cb(data, line):
@@ -9970,7 +9971,7 @@ Script (Python):
[source,python]
----
# prototype
-hook = weechat.hook_print(buffer, tags, message, strip_colors, callback, callback_data)
+def hook_print(buffer: str, tags: str, message: str, strip_colors: int, callback: str, callback_data: str) -> str: ...
# example
def my_print_cb(data, buffer, date, tags, displayed, highlight, prefix, message):
@@ -10883,7 +10884,7 @@ Script (Python):
[source,python]
----
# prototype
-hook = weechat.hook_signal(signal, callback, callback_data)
+def hook_signal(signal: str, callback: str, callback_data: str) -> str: ...
# example
def my_signal_cb(data, signal, signal_data):
@@ -10934,7 +10935,7 @@ Script (Python):
[source,python]
----
# prototype
-rc = weechat.hook_signal_send(signal, type_data, signal_data)
+def hook_signal_send(signal: str, type_data: str, signal_data: str) -> int: ...
# example
rc = weechat.hook_signal_send("my_signal", weechat.WEECHAT_HOOK_SIGNAL_STRING, my_string)
@@ -11223,7 +11224,7 @@ Script (Python):
[source,python]
----
# prototype
-hook = weechat.hook_hsignal(signal, callback, callback_data)
+def hook_hsignal(signal: str, callback: str, callback_data: str) -> str: ...
# example
def my_hsignal_cb(data, signal, hashtable):
@@ -11282,7 +11283,7 @@ Script (Python):
[source,python]
----
# prototype
-rc = weechat.hook_hsignal_send(signal, hashtable)
+def hook_hsignal_send(signal: str, hashtable: Dict[str, str]) -> int: ...
# example
rc = weechat.hook_hsignal_send("my_hsignal", {"key": "value"})
@@ -11529,7 +11530,7 @@ Script (Python):
[source,python]
----
# prototype
-hook = weechat.hook_config(option, callback, callback_data)
+def hook_config(option: str, callback: str, callback_data: str) -> str: ...
# example
def my_config_cb(data, option, value):
@@ -11694,7 +11695,7 @@ Script (Python):
[source,python]
----
# prototype
-hook = weechat.hook_modifier(modifier, callback, callback_data)
+def hook_modifier(modifier: str, callback: str, callback_data: str) -> str: ...
# example
def my_modifier_cb(data, modifier, modifier_data, string):
@@ -11803,7 +11804,7 @@ Script (Python):
[source,python]
----
# prototype
-weechat.hook_modifier_exec(modifier, modifier_data, string)
+def hook_modifier_exec(modifier: str, modifier_data: str, string: str) -> str: ...
# example
weechat.hook_modifier_exec("my_modifier", my_data, my_string)
@@ -11879,7 +11880,8 @@ Script (Python):
[source,python]
----
# prototype
-hook = weechat.hook_info(info_name, description, args_description, callback, callback_data)
+def hook_info(info_name: str, description: str, args_description: str,
+ callback: str, callback_data: str) -> str: ...
# example
def my_info_cb(data, info_name, arguments):
@@ -11959,8 +11961,8 @@ Script (Python):
[source,python]
----
# prototype
-hook = weechat.hook_info_hashtable(info_name, description, args_description,
- output_description, callback, callback_data)
+def hook_info_hashtable(info_name: str, description: str, args_description: str,
+ output_description: str, callback: str, callback_data: str) -> str: ...
# example
def my_info_hashtable_cb(data, info_name, hashtable):
@@ -12049,8 +12051,8 @@ Script (Python):
[source,python]
----
# prototype
-hook = weechat.hook_infolist(infolist_name, description, pointer_description,
- args_description, callback, callback_data)
+def hook_infolist(infolist_name: str, description: str, pointer_description: str,
+ args_description: str, callback: str, callback_data: str) -> str: ...
# example
def my_infolist_cb(data, infolist_name, pointer, arguments):
@@ -12324,7 +12326,7 @@ Script (Python):
[source,python]
----
# prototype
-hook = weechat.hook_focus(area, callback, callback_data)
+def hook_focus(area: str, callback: str, callback_data: str) -> str: ...
# example
def my_focus_nicklist_cb(data, info):
@@ -12399,7 +12401,7 @@ Script (Python):
[source,python]
----
# prototype
-weechat.hook_set(hook, property, value)
+def hook_set(hook: str, property: str, value: str) -> int: ...
# example
def my_process_cb(data, command, return_code, out, err):
@@ -12441,7 +12443,7 @@ Script (Python):
[source,python]
----
# prototype
-weechat.unhook(hook)
+def unhook(hook: str) -> int: ...
# example
weechat.unhook(my_hook)
@@ -12477,7 +12479,7 @@ Script (Python):
[source,python]
----
# prototype
-weechat.unhook_all()
+def unhook_all() -> int: ...
# example
weechat.unhook_all()
@@ -12577,8 +12579,8 @@ Script (Python):
[source,python]
----
# prototype
-buffer = weechat.buffer_new(name, input_callback, input_callback_data,
- close_callback, close_callback_data)
+def buffer_new(name: str, input_callback: str, input_callback_data: str,
+ close_callback: str, close_callback_data: str) -> str: ...
# example
def my_input_cb(data, buffer, input_data):
@@ -12619,7 +12621,7 @@ Script (Python):
[source,python]
----
# prototype
-buffer = weechat.current_buffer()
+def current_buffer() -> str: ...
# example
weechat.prnt(weechat.current_buffer(), "Text on current buffer")
@@ -12666,7 +12668,7 @@ Script (Python):
[source,python]
----
# prototype
-buffer = weechat.buffer_search(plugin, name)
+def buffer_search(plugin: str, name: str) -> str: ...
# example
buffer = weechat.buffer_search("my_plugin", "my_buffer")
@@ -12700,7 +12702,7 @@ Script (Python):
[source,python]
----
# prototype
-buffer = weechat.buffer_search_main()
+def buffer_search_main() -> str: ...
# example
buffer = weechat.buffer_search_main()
@@ -12738,7 +12740,7 @@ Script (Python):
[source,python]
----
# prototype
-weechat.buffer_clear(buffer)
+def buffer_clear(buffer: str) -> int: ...
# example
buffer = weechat.buffer_search("my_plugin", "my_buffer")
@@ -12777,7 +12779,7 @@ Script (Python):
[source,python]
----
# prototype
-weechat.buffer_close(buffer)
+def buffer_close(buffer: str) -> int: ...
# example
buffer = weechat.buffer_new("my_buffer", "my_input_cb", "", "my_close_cb", "")
@@ -12818,7 +12820,7 @@ Script (Python):
[source,python]
----
# prototype
-weechat.buffer_merge(buffer, target_buffer)
+def buffer_merge(buffer: str, target_buffer: str) -> int: ...
# example
# merge current buffer with WeeChat "core" buffer
@@ -12855,7 +12857,7 @@ Script (Python):
[source,python]
----
# prototype
-weechat.buffer_unmerge(buffer, number)
+def buffer_unmerge(buffer: str, number: int) -> int: ...
# example
weechat.buffer_unmerge(weechat.current_buffer(), 1)
@@ -12947,7 +12949,7 @@ Script (Python):
[source,python]
----
# prototype
-value = weechat.buffer_get_integer(buffer, property)
+def buffer_get_integer(buffer: str, property: str) -> int: ...
# example
weechat.prnt("", "my buffer number is: %d" % weechat.buffer_get_integer(my_buffer, "number"))
@@ -13005,7 +13007,7 @@ Script (Python):
[source,python]
----
# prototype
-value = weechat.buffer_get_string(buffer, property)
+def buffer_get_string(buffer: str, property: str) -> str: ...
# example
weechat.prnt("", "name / short name of buffer are: %s / %s"
@@ -13050,7 +13052,7 @@ Script (Python):
[source,python]
----
# prototype
-value = weechat.buffer_get_pointer(buffer, property)
+def buffer_get_pointer(buffer: str, property: str) -> str: ...
# example
weechat.prnt("", "plugin pointer of my buffer: %s" % weechat.buffer_get_pointer(my_buffer, "plugin"))
@@ -13256,7 +13258,7 @@ Script (Python):
[source,python]
----
# prototype
-weechat.buffer_set(buffer, property, value)
+def buffer_set(buffer: str, property: str, value: str) -> int: ...
# examples
@@ -13372,7 +13374,7 @@ Script (Python):
[source,python]
----
# prototype
-value = weechat.buffer_string_replace_local_var(buffer, string)
+def buffer_string_replace_local_var(buffer: str, string: str) -> str: ...
# example
weechat.buffer_set(my_buffer, "localvar_set_toto", "abc")
@@ -13424,7 +13426,7 @@ Script (Python):
[source,python]
----
# prototype
-match = weechat.buffer_match_list(buffer, string)
+def buffer_match_list(buffer: str, string: str) -> int: ...
# example
buffer = weechat.buffer_search("irc", "freenode.#weechat")
@@ -13467,7 +13469,7 @@ Script (Python):
[source,python]
----
# prototype
-window = weechat.current_window()
+def current_window() -> str: ...
# example
current_window = weechat.current_window()
@@ -13508,7 +13510,7 @@ Script (Python):
[source,python]
----
# prototype
-window = weechat.window_search_with_buffer(buffer)
+def window_search_with_buffer(buffer: str) -> str: ...
# example
weechat.prnt("", "window displaying core buffer: %s"
@@ -13568,7 +13570,7 @@ Script (Python):
[source,python]
----
# prototype
-value = weechat.window_get_integer(window, property)
+def window_get_integer(window: str, property: str) -> int: ...
# example
weechat.prnt("", "current window is at position (x,y): (%d,%d)"
@@ -13605,7 +13607,7 @@ Script (Python):
[source,python]
----
# prototype
-value = weechat.window_get_string(window, property)
+def window_get_string(window: str, property: str) -> str: ...
----
==== window_get_pointer
@@ -13645,7 +13647,7 @@ Script (Python):
[source,python]
----
# prototype
-value = weechat.window_get_pointer(window, property)
+def window_get_pointer(window: str, property: str) -> str: ...
# example
weechat.prnt("", "buffer displayed in current window: %s"
@@ -13681,7 +13683,7 @@ Script (Python):
[source,python]
----
# prototype
-weechat.window_set_title(window, title)
+def window_set_title(title: str) -> int: ...
# example
weechat.window_set_title("new title here")
@@ -13751,7 +13753,7 @@ Script (Python):
[source,python]
----
# prototype
-group = weechat.nicklist_add_group(buffer, parent_group, name, color, visible)
+def nicklist_add_group(buffer: str, parent_group: str, name: str, color: str, visible: int) -> str: ...
# example
group = weechat.nicklist_add_group(my_buffer, my_parent_group, "test_group",
@@ -13795,7 +13797,7 @@ Script (Python):
[source,python]
----
# prototype
-group = weechat.nicklist_search_group(buffer, from_group, name)
+def nicklist_search_group(buffer: str, from_group: str, name: str) -> str: ...
# example
group = weechat.nicklist_search_group(my_buffer, "", "test_group")
@@ -13863,7 +13865,7 @@ Script (Python):
[source,python]
----
# prototype
-nick = weechat.nicklist_add_nick(buffer, group, name, color, prefix, prefix_color, visible)
+def nicklist_add_nick(buffer: str, group: str, name: str, color: str, prefix: str, prefix_color: str, visible: int) -> str: ...
# example
if nick_away:
@@ -13910,7 +13912,7 @@ Script (Python):
[source,python]
----
# prototype
-nick = weechat.nicklist_search_nick(buffer, from_group, name)
+def nicklist_search_nick(buffer: str, from_group: str, name: str) -> str: ...
# example
nick = weechat.nicklist_search_nick(my_buffer, "", "test_nick")
@@ -13945,7 +13947,7 @@ Script (Python):
[source,python]
----
# prototype
-weechat.nicklist_remove_group(buffer, group)
+def nicklist_remove_group(buffer: str, group: str) -> int: ...
# example
weechat.nicklist_remove_group(my_buffer, my_group)
@@ -13980,7 +13982,7 @@ Script (Python):
[source,python]
----
# prototype
-weechat.nicklist_remove_nick(buffer, nick)
+def nicklist_remove_nick(buffer: str, nick: str) -> int: ...
# example
weechat.nicklist_remove_nick(my_buffer, my_nick)
@@ -14013,7 +14015,7 @@ Script (Python):
[source,python]
----
# prototype
-weechat.nicklist_remove_all(buffer)
+def nicklist_remove_all(buffer: str) -> int: ...
# example
weechat.nicklist_remove_all(my_buffer)
@@ -14108,7 +14110,7 @@ Script (Python):
[source,python]
----
# prototype
-value = weechat.nicklist_group_get_integer(buffer, group, property)
+def nicklist_group_get_integer(buffer: str, group: str, property: str) -> int: ...
# example
visible = weechat.nicklist_group_get_integer(buffer, group, "visible")
@@ -14153,7 +14155,7 @@ Script (Python):
[source,python]
----
# prototype
-value = weechat.nicklist_group_get_string(buffer, group, property)
+def nicklist_group_get_string(buffer: str, group: str, property: str) -> str: ...
# example
color = weechat.nicklist_group_get_string(buffer, group, "color")
@@ -14197,7 +14199,7 @@ Script (Python):
[source,python]
----
# prototype
-value = weechat.nicklist_group_get_pointer(buffer, group, property)
+def nicklist_group_get_pointer(buffer: str, group: str, property: str) -> str: ...
# example
parent = weechat.nicklist_group_get_pointer(buffer, group, "parent")
@@ -14258,7 +14260,7 @@ Script (Python):
[source,python]
----
# prototype
-weechat.nicklist_group_set(buffer, group, property, value)
+def nicklist_group_set(buffer: str, group: str, property: str, value: str) -> int: ...
# examples
@@ -14310,7 +14312,7 @@ Script (Python):
[source,python]
----
# prototype
-value = weechat.nicklist_nick_get_integer(buffer, nick, property)
+def nicklist_nick_get_integer(buffer: str, nick: str, property: str) -> int: ...
# example
visible = weechat.nicklist_nick_get_integer(buffer, nick, "visible")
@@ -14357,7 +14359,7 @@ Script (Python):
[source,python]
----
# prototype
-value = weechat.nicklist_nick_get_string(buffer, nick, property)
+def nicklist_nick_get_string(buffer: str, nick: str, property: str) -> str: ...
# example
color = weechat.nicklist_nick_get_string(buffer, nick, "color")
@@ -14401,7 +14403,7 @@ Script (Python):
[source,python]
----
# prototype
-value = weechat.nicklist_nick_get_pointer(buffer, nick, property)
+def nicklist_nick_get_pointer(buffer: str, nick: str, property: str) -> str: ...
# example
group = weechat.nicklist_nick_get_pointer(buffer, nick, "group")
@@ -14471,7 +14473,7 @@ Script (Python):
[source,python]
----
# prototype
-weechat.nicklist_nick_set(buffer, nick, property, value)
+def nicklist_nick_set(buffer: str, nick: str, property: str, value: str) -> int: ...
# examples
@@ -14524,7 +14526,7 @@ Script (Python):
[source,python]
----
# prototype
-bar_item = weechat.bar_item_search(name)
+def bar_item_search(name: str) -> str: ...
# example
bar_item = weechat.bar_item_search("myitem")
@@ -14607,7 +14609,7 @@ see example below (supported only in WeeChat ≥ 0.4.2).
[source,python]
----
# prototype
-bar_item = weechat.bar_item_new(name, build_callback, build_callback_data)
+def bar_item_new(name: str, build_callback: str, build_callback_data: str) -> str: ...
# example (callback without "buffer" and "extra_info")
def my_build_callback(data, item, window):
@@ -14649,7 +14651,7 @@ Script (Python):
[source,python]
----
# prototype
-weechat.bar_item_update(name)
+def bar_item_update(name: str) -> int: ...
# example
weechat.bar_item_update("myitem")
@@ -14682,7 +14684,7 @@ Script (Python):
[source,python]
----
# prototype
-weechat.bar_item_remove(item)
+def bar_item_remove(item: str) -> int: ...
# example
weechat.bar_item_remove(myitem)
@@ -14719,7 +14721,7 @@ Script (Python):
[source,python]
----
# prototype
-bar = weechat.bar_search(name)
+def bar_search(name: str) -> str: ...
# example
bar = weechat.bar_search("mybar")
@@ -14824,9 +14826,10 @@ Script (Python):
[source,python]
----
# prototype
-bar = weechat.bar_new(name, hidden, priority, type, condition, position,
- filling_top_bottom, filling_left_right, size, size_max,
- color_fg, color_delim, color_bg, color_bg_inactive, separator, items)
+def bar_new(name: str, hidden: str, priority: str, type: str, condition: str, position: str,
+ filling_top_bottom: str, filling_left_right: str, size: str, size_max: str,
+ color_fg: str, color_delim: str, color_bg: str, color_bg_inactive: str,
+ separator: str, items: str) -> str: ...
# example
bar = weechat.bar_new("mybar", "off", "100", "window", "", "top", "horizontal", "vertical",
@@ -14875,7 +14878,7 @@ Script (Python):
[source,python]
----
# prototype
-weechat.bar_set(bar, property, value)
+def bar_set(bar: str, property: str, value: str) -> int: ...
# example
weechat.bar_set(my_bar, "position", "bottom")
@@ -14908,7 +14911,7 @@ Script (Python):
[source,python]
----
# prototype
-weechat.bar_update(name)
+def bar_update(name: str) -> int: ...
# example
weechat.bar_update("mybar")
@@ -14941,7 +14944,7 @@ Script (Python):
[source,python]
----
# prototype
-weechat.bar_remove(bar)
+def bar_remove(bar: str) -> int: ...
# example
weechat.bar_remove(my_bar)
@@ -14991,7 +14994,7 @@ Script (Python):
[source,python]
----
# prototype
-weechat.command(buffer, command)
+def command(buffer: str, command: str) -> int: ...
# example
rc = weechat.command(weechat.buffer_search("irc", "freenode.#weechat"), "/whois FlashCode")
@@ -15050,7 +15053,7 @@ Script (Python):
[source,python]
----
# prototype
-weechat.command_options(buffer, command, options)
+def command_options(buffer: str, command: str, options: Dict[str, str]) -> int: ...
# example: allow any command except /exec
rc = weechat.command("", "/some_command arguments", {"commands": "*,!exec"})
@@ -15094,7 +15097,7 @@ Script (Python):
[source,python]
----
# prototype
-completion = weechat.completion_new(buffer)
+def completion_new(buffer: str) -> str: ...
# example
completion = weechat.completion_new(weechat.buffer_search_main())
@@ -15142,7 +15145,7 @@ Script (Python):
[source,python]
----
# prototype
-rc = weechat.completion_search(completion, data, position, direction)
+def completion_search(completion: str, data: str, position: int, direction: int) -> int: ...
# example
completion = weechat.completion_new(weechat.buffer_search_main())
@@ -15196,7 +15199,7 @@ Script (Python):
[source,python]
----
# prototype
-value = weechat.completion_get_string(completion, property)
+def completion_get_string(completion: str, property: str) -> str: ...
# example
def my_completion_cb(data, completion_item, buffer, completion):
@@ -15240,7 +15243,7 @@ Script (Python):
[source,python]
----
# prototype
-weechat.completion_list_add(completion, word, nick_completion, where)
+def completion_list_add(completion: str, word: str, nick_completion: int, where: str) -> int: ...
# example: see function hook_completion
----
@@ -15274,7 +15277,7 @@ Script (Python):
[source,python]
----
# prototype
-weechat.completion_free(completion)
+def completion_free(completion: str) -> int: ...
# example
weechat.completion_free(completion)
@@ -15446,7 +15449,7 @@ Script (Python):
[source,python]
----
# prototype
-value = weechat.info_get(info_name, arguments)
+def info_get(info_name: str, arguments: str) -> str: ...
# example
weechat.prnt("", "Current WeeChat version is: %s (compiled on %s)"
@@ -15531,7 +15534,7 @@ Script (Python):
[source,python]
----
# prototype
-dict = weechat.info_get_hashtable(info_name, dict_in)
+def info_get_hashtable(info_name: str, dict_in: Dict[str, str]) -> Dict[str, str]: ...
# example
dict_in = {"message": ":nick!user@host PRIVMSG #weechat :message here"}
@@ -15583,7 +15586,7 @@ Script (Python):
[source,python]
----
# prototype
-infolist = weechat.infolist_new()
+def infolist_new() -> str: ...
# example
infolist = weechat.infolist_new()
@@ -15620,7 +15623,7 @@ Script (Python):
[source,python]
----
# prototype
-item = weechat.infolist_new_item(infolist)
+def infolist_new_item(infolist: str) -> str: ...
# example
item = weechat.infolist_new_item(infolist)
@@ -15663,7 +15666,7 @@ Script (Python):
[source,python]
----
# prototype
-var = weechat.infolist_new_var_integer(item, name, value)
+def infolist_new_var_integer(item: str, name: str, value: int) -> str: ...
# example
var = weechat.infolist_new_var_integer(item, "my_integer", 123)
@@ -15706,7 +15709,7 @@ Script (Python):
[source,python]
----
# prototype
-var = weechat.infolist_new_var_string(item, name, value)
+def infolist_new_var_string(item: str, name: str, value: str) -> str: ...
# example
var = weechat.infolist_new_var_string(item, "my_string", "value")
@@ -15749,7 +15752,7 @@ Script (Python):
[source,python]
----
# prototype
-var = weechat.infolist_new_var_pointer(item, name, pointer)
+def infolist_new_var_pointer(item: str, name: str, pointer: str) -> str: ...
# example
var = weechat.infolist_new_var_pointer(item, "my_pointer", pointer)
@@ -15832,7 +15835,7 @@ Script (Python):
[source,python]
----
# prototype
-var = weechat.infolist_new_var_time(item, name, time)
+def infolist_new_var_time(item: str, name: str, time: int) -> str: ...
# example
var = weechat.infolist_new_var_time(item, "my_time", int(time.time()))
@@ -15886,7 +15889,7 @@ Script (Python):
[source,python]
----
# prototype
-infolist = weechat.infolist_get(infolist_name, pointer, arguments)
+def infolist_get(infolist_name: str, pointer: str, arguments: str) -> str: ...
# example
infolist = weechat.infolist_get("irc_server", "", "")
@@ -15931,7 +15934,7 @@ Script (Python):
[source,python]
----
# prototype
-rc = weechat.infolist_next(infolist)
+def infolist_next(infolist: str) -> int: ...
# example
rc = weechat.infolist_next(infolist)
@@ -15981,7 +15984,7 @@ Script (Python):
[source,python]
----
# prototype
-rc = weechat.infolist_prev(infolist)
+def infolist_prev(infolist: str) -> int: ...
# example
rc = weechat.infolist_prev(infolist)
@@ -16018,7 +16021,7 @@ Script (Python):
[source,python]
----
# prototype
-weechat.infolist_reset_item_cursor(infolist)
+def infolist_reset_item_cursor(infolist: str) -> int: ...
# example
weechat.infolist_reset_item_cursor(infolist)
@@ -16063,7 +16066,7 @@ Script (Python):
[source,python]
----
# prototype
-var = weechat.infolist_search_var(infolist, name)
+def infolist_search_var(infolist: str, name: str) -> str: ...
# example
if weechat.infolist_search_var(infolist, "name"):
@@ -16106,7 +16109,7 @@ Script (Python):
[source,python]
----
# prototype
-fields = weechat.infolist_fields(infolist)
+def infolist_fields(infolist: str) -> str: ...
# example
fields = weechat.infolist_fields(infolist)
@@ -16147,7 +16150,7 @@ Script (Python):
[source,python]
----
# prototype
-value = weechat.infolist_integer(infolist, var)
+def infolist_integer(infolist: str, var: str) -> int: ...
# example
weechat.prnt("", "integer = %d" % weechat.infolist_integer(infolist, "my_integer"))
@@ -16186,7 +16189,7 @@ Script (Python):
[source,python]
----
# prototype
-value = weechat.infolist_string(infolist, var)
+def infolist_string(infolist: str, var: str) -> str: ...
# example
weechat.prnt("", "string = %s" % weechat.infolist_string(infolist, "my_string"))
@@ -16225,7 +16228,7 @@ Script (Python):
[source,python]
----
# prototype
-value = weechat.infolist_pointer(infolist, var)
+def infolist_pointer(infolist: str, var: str) -> str: ...
# example
weechat.prnt("", "pointer = 0x%s" % weechat.infolist_pointer(infolist, "my_pointer"))
@@ -16299,7 +16302,7 @@ Script (Python):
[source,python]
----
# prototype
-value = weechat.infolist_time(infolist, var)
+def infolist_time(infolist: str, var: str) -> int: ...
# example
weechat.prnt("", "time = %ld" % weechat.infolist_time(infolist, "my_time"))
@@ -16332,7 +16335,7 @@ Script (Python):
[source,python]
----
# prototype
-weechat.infolist_free(infolist)
+def infolist_free(infolist: str) -> int: ...
# example
weechat.infolist_free(infolist)
@@ -16601,7 +16604,7 @@ Script (Python):
[source,python]
----
# prototype
-hdata = weechat.hdata_get(hdata_name)
+def hdata_get(hdata_name: str) -> str: ...
# example
hdata = weechat.hdata_get("irc_server")
@@ -16641,7 +16644,7 @@ Script (Python):
[source,python]
----
# prototype
-offset = weechat.hdata_get_var_offset(hdata, name)
+def hdata_get_var_offset(hdata: str, name: str) -> int: ...
# example
offset = weechat.hdata_get_var_offset(hdata, "name")
@@ -16746,7 +16749,7 @@ Script (Python):
[source,python]
----
# prototype
-type = weechat.hdata_get_var_type_string(hdata, name)
+def hdata_get_var_type_string(hdata: str, name: str) -> str: ...
# example
weechat.prnt("", "type = %s" % weechat.hdata_get_var_type_string("name"))
@@ -16787,7 +16790,7 @@ Script (Python):
[source,python]
----
# prototype
-array_size = weechat.hdata_get_var_array_size(hdata, pointer, name)
+def hdata_get_var_array_size(hdata: str, pointer: str, name: str) -> int: ...
# example
array_size = weechat.hdata_get_var_array_size(hdata, pointer, "name")
@@ -16830,7 +16833,7 @@ Script (Python):
[source,python]
----
# prototype
-array_size = weechat.hdata_get_var_array_size_string(hdata, pointer, name)
+def hdata_get_var_array_size_string(hdata: str, pointer: str, name: str) -> str: ...
# example
array_size = weechat.hdata_get_var_array_size_string(hdata, pointer, "name")
@@ -16870,7 +16873,7 @@ Script (Python):
[source,python]
----
# prototype
-hdata_name = weechat.hdata_get_var_hdata(hdata, name)
+def hdata_get_var_hdata(hdata: str, name: str) -> str: ...
# example
weechat.prnt("", "hdata = %s" % weechat.hdata_get_var_hdata(hdata, "name"))
@@ -16982,7 +16985,7 @@ Script (Python):
[source,python]
----
# prototype
-list = weechat.hdata_get_list(hdata, name)
+def hdata_get_list(hdata: str, name: str) -> str: ...
# example
hdata = weechat.hdata_get("buffer")
@@ -17038,7 +17041,7 @@ Script (Python):
[source,python]
----
# prototype
-rc = weechat.hdata_check_pointer(hdata, list, pointer)
+def hdata_check_pointer(hdata: str, list: str, pointer: str) -> int: ...
# example
hdata = weechat.hdata_get("buffer")
@@ -17095,7 +17098,7 @@ Script (Python):
[source,python]
----
# prototype
-pointer = weechat.hdata_move(hdata, pointer, count)
+def hdata_move(hdata: str, pointer: str, count: int) -> str: ...
# example
hdata = weechat.hdata_get("buffer")
@@ -17158,7 +17161,7 @@ Script (Python):
[source,python]
----
# prototype
-pointer = weechat.hdata_search(hdata, pointer, search, count)
+def hdata_search(hdata: str, pointer: str, search: str, count: int) -> str: ...
# example
hdata = weechat.hdata_get("irc_server")
@@ -17206,7 +17209,7 @@ Script (Python):
[source,python]
----
# prototype
-value = weechat.hdata_char(hdata, pointer, name)
+def hdata_char(hdata: str, pointer: str, name: str) -> int: ...
# example
weechat.prnt("", "letter = %c" % weechat.hdata_char(hdata, pointer, "letter"))
@@ -17250,7 +17253,7 @@ Script (Python):
[source,python]
----
# prototype
-value = weechat.hdata_integer(hdata, pointer, name)
+def hdata_integer(hdata: str, pointer: str, name: str) -> int: ...
# example
hdata = weechat.hdata_get("buffer")
@@ -17294,7 +17297,7 @@ Script (Python):
[source,python]
----
# prototype
-value = weechat.hdata_long(hdata, pointer, name)
+def hdata_long(hdata: str, pointer: str, name: str) -> int: ...
# example
weechat.prnt("", "longvar = %ld" % weechat.hdata_long(hdata, pointer, "longvar"))
@@ -17338,7 +17341,7 @@ Script (Python):
[source,python]
----
# prototype
-value = weechat.hdata_string(hdata, pointer, name)
+def hdata_string(hdata: str, pointer: str, name: str) -> str: ...
# example
hdata = weechat.hdata_get("buffer")
@@ -17384,7 +17387,7 @@ Script (Python):
[source,python]
----
# prototype
-value = weechat.hdata_pointer(hdata, pointer, name)
+def hdata_pointer(hdata: str, pointer: str, name: str) -> str: ...
# example
hdata = weechat.hdata_get("buffer")
@@ -17446,7 +17449,7 @@ Script (Python):
[source,python]
----
# prototype
-value = weechat.hdata_time(hdata, pointer, name)
+def hdata_time(hdata: str, pointer: str, name: str) -> int: ...
# example
buf = weechat.buffer_search_main()
@@ -17500,7 +17503,7 @@ Script (Python):
[source,python]
----
# prototype
-hashtable = weechat.hdata_hashtable(hdata, pointer, name)
+def hdata_hashtable(hdata: str, pointer: str, name: str) -> Dict[str, str]: ...
# example
hdata = weechat.hdata_get("buffer")
@@ -17555,7 +17558,7 @@ Script (Python):
[source,python]
----
# prototype
-rc = weechat.hdata_compare(hdata, pointer1, pointer2, name, case_sensitive)
+def hdata_compare(hdata: str, pointer1: str, pointer2: str, name: str, case_sensitive: int) -> int: ...
# example
hdata = weechat.hdata_get("buffer")
@@ -17678,7 +17681,7 @@ Script (Python):
[source,python]
----
# prototype
-count = weechat.hdata_update(hdata, pointer, hashtable)
+def hdata_update(hdata: str, pointer: str, hashtable: Dict[str, str]) -> int: ...
# example: subtract one hour on last message displayed in current buffer
own_lines = weechat.hdata_pointer(weechat.hdata_get("buffer"), weechat.current_buffer(), "own_lines")
@@ -17741,7 +17744,7 @@ Script (Python):
[source,python]
----
# prototype
-value = weechat.hdata_get_string(hdata, property)
+def hdata_get_string(hdata: str, property: str) -> str: ...
# example
weechat.prnt("", "variables in hdata: %s" % weechat.hdata_get_string(hdata, "var_keys"))
@@ -17811,7 +17814,7 @@ Script (Python):
[source,python]
----
# prototype
-upgrade_file = weechat.upgrade_new(filename, callback_read, callback_read_data)
+def upgrade_new(filename: str, callback_read: str, callback_read_data: str) -> str: ...
# example
upgrade_file = weechat.upgrade_new("my_file", "", "")
@@ -17859,7 +17862,7 @@ Script (Python):
[source,python]
----
# prototype
-rc = weechat.upgrade_write_object(upgrade_file, object_id, infolist)
+def upgrade_write_object(upgrade_file: str, object_id: int, infolist: str) -> int: ...
# example
weechat.upgrade_write_object(upgrade_file, 1, infolist)
@@ -17898,7 +17901,7 @@ Script (Python):
[source,python]
----
# prototype
-rc = weechat.upgrade_read(upgrade_file)
+def upgrade_read(upgrade_file: str) -> int: ...
# example
weechat.upgrade_read(upgrade_file)
@@ -17931,7 +17934,7 @@ Script (Python):
[source,python]
----
# prototype
-weechat.upgrade_close(upgrade_file)
+def upgrade_close(upgrade_file: str) -> int: ...
# example
weechat.upgrade_close(upgrade_file)
diff --git a/doc/fr/weechat_plugin_api.fr.adoc b/doc/fr/weechat_plugin_api.fr.adoc
index fae0d76dd..a1fcf9e67 100644
--- a/doc/fr/weechat_plugin_api.fr.adoc
+++ b/doc/fr/weechat_plugin_api.fr.adoc
@@ -298,7 +298,7 @@ Script (Python) :
[source,python]
----
# prototype
-weechat.register(name, author, version, license, description, shutdown_function, charset)
+def register(name: str, author: str, version: str, license: str, description: str, shutdown_function: str, charset: str) -> int: ...
----
[NOTE]
@@ -341,7 +341,7 @@ Script (Python) :
[source,python]
----
# prototype
-name = weechat.plugin_get_name(plugin)
+def plugin_get_name(plugin: str) -> str: ...
# exemple
plugin = weechat.buffer_get_pointer(weechat.current_buffer(), "plugin")
@@ -384,7 +384,7 @@ Script (Python) :
[source,python]
----
# prototype
-weechat.charset_set(charset)
+def charset_set(charset: str) -> int: ...
# exemple
weechat.charset_set("iso-8859-1")
@@ -424,7 +424,7 @@ Script (Python) :
[source,python]
----
# prototype
-str = weechat.iconv_to_internal(charset, string)
+def iconv_to_internal(charset: str, string: str) -> str: ...
# exemple
str = weechat.iconv_to_internal("iso-8859-1", "chaîne iso : é à")
@@ -464,7 +464,7 @@ Script (Python) :
[source,python]
----
# prototype
-str = weechat.iconv_from_internal(charset, string)
+def iconv_from_internal(charset: str, string: str) -> str: ...
# exemple
str = weechat.iconv_from_internal("iso-8859-1", "chaîne utf-8 : é à")
@@ -501,7 +501,7 @@ Script (Python) :
[source,python]
----
# prototype
-str = weechat.gettext(string)
+def gettext(string: str) -> str: ...
# exemple
str = weechat.gettext("hello")
@@ -544,7 +544,7 @@ Script (Python) :
[source,python]
----
# prototype
-str = weechat.ngettext(string, plural, count)
+def ngettext(string: str, plural: str, count) -> str: ...
# exemple
num_files = 2
@@ -899,7 +899,7 @@ Script (Python) :
[source,python]
----
# prototype
-length = weechat.strlen_screen(string)
+def strlen_screen(string: str) -> int: ...
# exemple
length = weechat.strlen_screen("é") # 1
@@ -950,7 +950,7 @@ Script (Python) :
[source,python]
----
# prototype
-match = weechat.string_match(string, mask, case_sensitive)
+def string_match(string: str, mask: str, case_sensitive: int) -> int: ...
# exemples
match1 = weechat.string_match("abcdef", "abc*", 0) # == 1
@@ -1004,7 +1004,7 @@ Script (Python) :
[source,python]
----
# prototype
-match = weechat.string_match_list(string, masks, case_sensitive)
+def string_match_list(string: str, masks: str, case_sensitive: int) -> int: ...
# exemples
match1 = weechat.string_match("abc", "*,!abc*", 0) # == 0
@@ -1105,7 +1105,7 @@ Script (Python) :
[source,python]
----
# prototype
-path = weechat.string_eval_path_home(path, pointers, extra_vars, options)
+def string_eval_path_home(path: str, pointers: Dict[str, str], extra_vars: Dict[str, str], options: Dict[str, str]) -> str: ...
# exemple
path = weechat.string_eval_path_home("${weechat_config_dir}/test.conf", {}, {}, {})
@@ -1272,7 +1272,7 @@ Script (Python) :
[source,python]
----
# prototype
-regex = weechat.string_mask_to_regex(mask)
+def string_mask_to_regex(mask: str) -> str: ...
# exemple
regex = weechat.string_mask_to_regex("test*mask") # "test.*mask"
@@ -1421,7 +1421,7 @@ Script (Python) :
[source,python]
----
# prototype
-highlight = weechat.string_has_highlight(string, highlight_words)
+def string_has_highlight(string: str, highlight_words: str) -> int: ...
# exemple
highlight = weechat.string_has_highlight("my test string", "test,word2") # 1
@@ -1464,7 +1464,7 @@ Script (Python) :
[source,python]
----
# prototype
-highlight = weechat.string_has_highlight_regex(string, regex)
+def string_has_highlight_regex(string: str, regex: str) -> int: ...
# exemple
highlight = weechat.string_has_highlight_regex("my test string", "test|word2") # 1
@@ -1934,7 +1934,7 @@ Script (Python), _WeeChat ≥ 2.2_ :
[source,python]
----
# prototype
-str = weechat.string_format_size(size)
+def string_format_size(size: int) -> str: ...
# exemple
str = weechat.string_format_size(15200) # == "15.2 Ko"
@@ -1979,7 +1979,7 @@ Script (Python) :
[source,python]
----
# prototype
-size = weechat.string_color_code_size(string)
+def string_color_code_size(string: str) -> int: ...
# exemples
size = weechat.string_color_code_size("test") # size == 0
@@ -2031,7 +2031,7 @@ Script (Python) :
[source,python]
----
# prototype
-str = weechat.string_remove_color(string, replacement)
+def string_remove_color(string: str, replacement: str) -> str: ...
# exemple
str = weechat.string_remove_color(ma_chaine, "?")
@@ -2199,7 +2199,7 @@ Script (Python) :
[source,python]
----
# prototype
-is_cmdchar = weechat.string_is_command_char(string)
+def string_is_command_char(string: str) -> int: ...
# exemples
command_char1 = weechat.string_is_command_char("/test") # == 1
@@ -2242,7 +2242,7 @@ Script (Python) :
[source,python]
----
# prototype
-str = weechat.string_input_for_buffer(string)
+def string_input_for_buffer(string: str) -> str: ...
# exemples
str1 = weechat.string_input_for_buffer("test") # "test"
@@ -2356,7 +2356,7 @@ Script (Python) :
[source,python]
----
# prototype
-str = weechat.string_eval_expression(expr, pointers, extra_vars, options)
+def string_eval_expression(expr: str, pointers: Dict[str, str], extra_vars: Dict[str, str], options: Dict[str, str]) -> str: ...
# exemples
@@ -3727,7 +3727,7 @@ Script (Python) :
[source,python]
----
# prototype
-weechat.mkdir_home(directory, mode)
+def mkdir_home(directory: str, mode: int) -> int: ...
# exemple
weechat.mkdir_home("${weechat_cache_dir}/temp", 0755)
@@ -3768,7 +3768,7 @@ Script (Python) :
[source,python]
----
# prototype
-weechat.mkdir(directory, mode)
+def mkdir(directory: str, mode: int) -> int: ...
# exemple
weechat.mkdir("/tmp/mydir", 0755)
@@ -3809,7 +3809,7 @@ Script (Python) :
[source,python]
----
# prototype
-weechat.mkdir_parents(directory, mode)
+def mkdir_parents(directory: str, mode: int) -> int: ...
# exemple
weechat.mkdir_parents("/tmp/my/dir", 0755)
@@ -4099,7 +4099,7 @@ Script (Python) :
[source,python]
----
# prototype
-list = weechat.list_new()
+def list_new() -> str: ...
# exemple
list = weechat.list_new()
@@ -4146,7 +4146,7 @@ Script (Python) :
[source,python]
----
# prototype
-item = weechat.list_add(list, data, where, user_data)
+def list_add(list: str, data: str, where: str, user_data: str) -> str: ...
# exemple
item = weechat.list_add(list, "ma donnée", weechat.WEECHAT_LIST_POS_SORT, "")
@@ -4185,7 +4185,7 @@ Script (Python) :
[source,python]
----
# prototype
-item = weechat.list_search(list, data)
+def list_search(list: str, data: str) -> str: ...
# exemple
item = weechat.list_search(list, "ma donnée")
@@ -4226,7 +4226,7 @@ Script (Python) :
[source,python]
----
# prototype
-pos_item = weechat.list_search_pos(list, data)
+def list_search_pos(list: str, data: str) -> int: ...
# exemple
pos_item = weechat.list_search_pos(list, "ma donnée")
@@ -4265,7 +4265,7 @@ Script (Python) :
[source,python]
----
# prototype
-item = weechat.list_casesearch(list, data)
+def list_casesearch(list: str, data: str) -> str: ...
# exemple
item = weechat.list_casesearch(list, "ma donnée")
@@ -4307,7 +4307,7 @@ Script (Python) :
[source,python]
----
# prototype
-pos_item = weechat.list_casesearch_pos(list, data)
+def list_casesearch_pos(list: str, data: str) -> int: ...
# exemple
pos_item = weechat.list_casesearch_pos(list, "ma donnée")
@@ -4346,7 +4346,7 @@ Script (Python) :
[source,python]
----
# prototype
-item = weechat.list_get(list, position)
+def list_get(list: str, position: int) -> str: ...
# exemple
item = weechat.list_get(list, 0)
@@ -4380,7 +4380,7 @@ Script (Python) :
[source,python]
----
# prototype
-weechat.list_set(item, value)
+def list_set(item: str, value: str) -> int: ...
# exemple
weechat.list_set(item, "nouvelle donnée")
@@ -4418,7 +4418,7 @@ Script (Python) :
[source,python]
----
# prototype
-item = weechat.list_next(item)
+def list_next(item: str) -> str: ...
# exemple
item = weechat.list_next(item)
@@ -4456,7 +4456,7 @@ Script (Python) :
[source,python]
----
# prototype
-item = weechat.list_prev(item)
+def list_prev(item: str) -> str: ...
# exemple
item = weechat.list_prev(item)
@@ -4493,7 +4493,7 @@ Script (Python) :
[source,python]
----
# prototype
-value = weechat.list_string(item)
+def list_string(item: str) -> str: ...
# exemple
weechat.prnt("", "valeur de l'élément : %s" % weechat.list_string(item))
@@ -4561,7 +4561,7 @@ Script (Python) :
[source,python]
----
# prototype
-size = weechat.list_size(list)
+def list_size(list: str) -> int: ...
# exemple
weechat.prnt("", "taille de la liste : %d" % weechat.list_size(list))
@@ -4596,7 +4596,7 @@ Script (Python) :
[source,python]
----
# prototype
-weechat.list_remove(list, item)
+def list_remove(list: str, item: str) -> int: ...
# exemple
weechat.list_remove(list, item)
@@ -4629,7 +4629,7 @@ Script (Python) :
[source,python]
----
# prototype
-weechat.list_remove_all(list)
+def list_remove_all(list: str) -> int: ...
# exemple
weechat.list_remove_all(list)
@@ -4662,7 +4662,7 @@ Script (Python) :
[source,python]
----
# prototype
-weechat.list_free(list)
+def list_free(list: str) -> int: ...
# exemple
weechat.list_free(list)
@@ -5763,7 +5763,7 @@ Script (Python) :
[source,python]
----
# prototype
-config_file = weechat.config_new(name, callback_reload, callback_reload_data)
+def config_new(name: str, callback_reload: str, callback_reload_data: str) -> str: ...
# exemple
def my_config_reload_cb(data, config_file):
@@ -6028,12 +6028,12 @@ Script (Python) :
[source,python]
----
# prototype
-section = weechat.config_new_section(config_file, name,
- user_can_add_options, user_can_delete_options,
- callback_read, callback_read_data,
- callback_write, callback_write_data,
- callback_create_option, callback_create_option_data,
- callback_delete_option, callback_delete_option_data)
+def config_new_section(config_file: str, name: str,
+ user_can_add_options: int, user_can_delete_options: int,
+ callback_read: str, callback_read_data: str,
+ callback_write: str, callback_write_data: str,
+ callback_create_option: str, callback_create_option_data: str,
+ callback_delete_option: str, callback_delete_option_data: str) -> str: ...
# exemple
def my_section_read_cb(data, config_file, section, option_name, value):
@@ -6102,7 +6102,7 @@ Script (Python) :
[source,python]
----
# prototype
-section = weechat.config_search_section(config_file, section_name)
+def config_search_section(config_file: str, section_name: str) -> str: ...
# exemple
section = weechat.config_search_section(config_file, "section")
@@ -6289,11 +6289,12 @@ Script (Python) :
[source,python]
----
# prototype
-option = weechat.config_new_option(config_file, section, name, type, description,
- string_values, min, max, default_value, value, null_value_allowed,
- callback_check_value, callback_check_value_data,
- callback_change, callback_change_data,
- callback_delete, callback_delete_data)
+def config_new_option(config_file: str, section: str, name: str, type: str, description: str,
+ string_values: str, min: int, max: int,
+ default_value: str, value: str, null_value_allowed: int,
+ callback_check_value: str, callback_check_value_data: str,
+ callback_change: str, callback_change_data: str,
+ callback_delete: str, callback_delete_data: str) -> str: ...
# exemple
def option4_check_value_cb(data, option, value):
@@ -6388,7 +6389,7 @@ Script (Python) :
[source,python]
----
# prototype
-option = weechat.config_search_option(config_file, section, option_name)
+def config_search_option(config_file: str, section: str, option_name: str) -> str: ...
# exemple
option = weechat.config_search_option(config_file, section, "option")
@@ -6540,7 +6541,7 @@ Script (Python) :
[source,python]
----
# prototype
-value = weechat.config_string_to_boolean(text)
+def config_string_to_boolean(text: str) -> int: ...
# exemple
if weechat.config_string_to_boolean(text):
@@ -6595,7 +6596,7 @@ Script (Python) :
[source,python]
----
# prototype
-rc = weechat.config_option_reset(option, run_callback)
+def config_option_reset(option: str, run_callback: int) -> int: ...
# exemple
rc = weechat.config_option_reset(option, 1)
@@ -6661,7 +6662,7 @@ Script (Python) :
[source,python]
----
# prototype
-rc = weechat.config_option_set(option, value, run_callback)
+def config_option_set(option: str, value: str, run_callback: int) -> int: ...
# exemple
rc = weechat.config_option_set(option, "nouvelle_valeur", 1)
@@ -6724,7 +6725,7 @@ Script (Python) :
[source,python]
----
# prototype
-rc = weechat.config_option_set_null(option, run_callback)
+def config_option_set_null(option: str, run_callback: int) -> int: ...
# exemple
rc = weechat.config_option_set_null(option, 1)
@@ -6786,7 +6787,7 @@ Script (Python) :
[source,python]
----
# prototype
-rc = weechat.config_option_unset(option)
+def config_option_unset(option: str) -> int: ...
# exemple
rc = weechat.config_option_unset(option)
@@ -6829,7 +6830,7 @@ Script (Python) :
[source,python]
----
# prototype
-weechat.config_option_rename(option, new_name)
+def config_option_rename(option: str, new_name: str) -> int: ...
# exemple
weechat.config_option_rename(option, "nouveau_nom")
@@ -6964,7 +6965,7 @@ Script (Python) :
[source,python]
----
# prototype
-is_null = weechat.config_option_is_null(option)
+def config_option_is_null(option: str) -> int: ...
# exemple
if weechat.config_option_is_null(option):
@@ -7010,7 +7011,7 @@ Script (Python) :
[source,python]
----
# prototype
-is_null = weechat.config_option_default_is_null(option)
+def config_option_default_is_null(option: str) -> int: ...
# exemple
if weechat.config_option_default_is_null(option):
@@ -7059,7 +7060,7 @@ Script (Python) :
[source,python]
----
# prototype
-value = weechat.config_boolean(option)
+def config_boolean(option: str) -> int: ...
# exemple
option = weechat.config_get("plugin.section.option")
@@ -7109,7 +7110,7 @@ Script (Python) :
[source,python]
----
# prototype
-value = weechat.config_boolean_default(option)
+def config_boolean_default(option: str) -> int: ...
# exemple
option = weechat.config_get("plugin.section.option")
@@ -7152,7 +7153,7 @@ Script (Python) :
[source,python]
----
# prototype
-value = weechat.config_integer(option)
+def config_integer(option: str) -> int: ...
# exemple
option = weechat.config_get("plugin.section.option")
@@ -7194,7 +7195,7 @@ Script (Python) :
[source,python]
----
# prototype
-value = weechat.config_integer_default(option)
+def config_integer_default(option: str) -> int: ...
# exemple
option = weechat.config_get("plugin.section.option")
@@ -7237,7 +7238,7 @@ Script (Python) :
[source,python]
----
# prototype
-value = weechat.config_string(option)
+def config_string(option: str) -> str: ...
# exemple
option = weechat.config_get("plugin.section.option")
@@ -7280,7 +7281,7 @@ Script (Python) :
[source,python]
----
# prototype
-value = weechat.config_string_default(option)
+def config_string_default(option: str) -> str: ...
# exemple
option = weechat.config_get("plugin.section.option")
@@ -7322,7 +7323,7 @@ Script (Python) :
[source,python]
----
# prototype
-value = weechat.config_color(option)
+def config_color(option: str) -> str: ...
# exemple
option = weechat.config_get("plugin.section.option")
@@ -7364,7 +7365,7 @@ Script (Python) :
[source,python]
----
# prototype
-value = weechat.config_color_default(option)
+def config_color_default(option: str) -> str: ...
# exemple
option = weechat.config_get("plugin.section.option")
@@ -7412,7 +7413,7 @@ Script (Python) :
[source,python]
----
# prototype
-weechat.config_write_option(config_file, option)
+def config_write_option(config_file: str, option: str) -> int: ...
# exemple
def my_section_write_cb(data, config_file, section_name):
@@ -7466,7 +7467,7 @@ Script (Python) :
[source,python]
----
# prototype
-weechat.config_write_line(config_file, option_name, value)
+def config_write_line(config_file: str, option_name: str, value: str) -> int: ...
# exemple
def my_section_write_cb(data, config_file, section_name):
@@ -7519,7 +7520,7 @@ Script (Python) :
[source,python]
----
# prototype
-rc = weechat.config_write(config_file)
+def config_write(config_file: str) -> int: ...
# exemple
rc = weechat.config_write(config_file)
@@ -7575,7 +7576,7 @@ Script (Python) :
[source,python]
----
# prototype
-rc = weechat.config_read(config_file)
+def config_read(config_file: str) -> int: ...
# exemple
rc = weechat.config_read(config_file)
@@ -7631,7 +7632,7 @@ Script (Python) :
[source,python]
----
# prototype
-rc = weechat.config_reload(config_file)
+def config_reload(config_file: str) -> int: ...
# exemple
rc = weechat.config_reload(config_file)
@@ -7670,7 +7671,7 @@ Script (Python) :
[source,python]
----
# prototype
-weechat.config_option_free(option)
+def config_option_free(option: str) -> int: ...
# exemple
weechat.config_option_free(option)
@@ -7703,7 +7704,7 @@ Script (Python) :
[source,python]
----
# prototype
-weechat.config_section_free_options(section)
+def config_section_free_options(section: str) -> int: ...
# exemple
weechat.config_section_free_options(section)
@@ -7736,7 +7737,7 @@ Script (Python) :
[source,python]
----
# prototype
-weechat.config_section_free(section)
+def config_section_free(section: str) -> int: ...
# exemple
weechat.config_section_free(section)
@@ -7769,7 +7770,7 @@ Script (Python) :
[source,python]
----
# prototype
-weechat.config_free(config_file)
+def config_free(config_file: str) -> int: ...
# exemple
weechat.config_free(config_file)
@@ -7806,7 +7807,7 @@ Script (Python) :
[source,python]
----
# prototype
-option = weechat.config_get(option_name)
+def config_get(option_name: str) -> str: ...
# exemple
option = weechat.config_get("weechat.look.item_time_format")
@@ -7847,7 +7848,7 @@ Script (Python) :
[source,python]
----
# prototype
-value = weechat.config_get_plugin(option_name)
+def config_get_plugin(option_name: str) -> str: ...
# exemple
value = weechat.config_get_plugin("option")
@@ -7893,7 +7894,7 @@ Script (Python) :
[source,python]
----
# prototype
-value = weechat.config_is_set_plugin(option_name)
+def config_is_set_plugin(option_name: str) -> int: ...
# exemple
if weechat.config_is_set_plugin("option"):
@@ -7955,7 +7956,7 @@ Script (Python) :
[source,python]
----
# prototype
-rc = weechat.config_set_plugin(option_name, value)
+def config_set_plugin(option_name: str, value: str) -> int: ...
# exemple
rc = weechat.config_set_plugin("option", "valeur_test")
@@ -8006,7 +8007,7 @@ Script (Python) :
[source,python]
----
# prototype
-weechat.config_set_desc_plugin(option_name, description)
+def config_set_desc_plugin(option_name: str, description: str) -> int: ...
# exemple
version = weechat.info_get("version_number", "") or 0
@@ -8065,7 +8066,7 @@ Script (Python) :
[source,python]
----
# prototype
-rc = weechat.config_unset_plugin(option_name)
+def config_unset_plugin(option_name: str) -> int: ...
# exemple
rc = weechat.config_unset_plugin("option")
@@ -8145,7 +8146,7 @@ Script (Python) :
[source,python]
----
# prototype
-num_keys = weechat.key_bind(context, keys)
+def key_bind(context: str, keys: Dict[str, str]) -> int: ...
# exemple
keys = {"@chat(python.test):button1": "hsignal:test_mouse",
@@ -8199,7 +8200,7 @@ Script (Python) :
[source,python]
----
# prototype
-num_keys = weechat.key_unbind(context, key)
+def key_unbind(context: str, key: str) -> int: ...
# exemples
@@ -8262,7 +8263,7 @@ Script (Python) :
[source,python]
----
# prototype
-value = weechat.prefix(prefix)
+def prefix(prefix: str) -> str: ...
# exemple
weechat.prnt("", "%sCeci est une erreur..." % weechat.prefix("error"))
@@ -8348,7 +8349,7 @@ Script (Python) :
[source,python]
----
# prototype
-value = weechat.color(color_name)
+def color(color_name: str) -> str: ...
# exemple
weechat.prnt("", "Couleur : %sbleu %scouleur par défaut %sjaune sur rouge"
@@ -8410,7 +8411,7 @@ Script (Python) :
[source,python]
----
# prototype
-weechat.prnt(buffer, message)
+def prnt(buffer: str, message: str) -> int: ...
# exemple
weechat.prnt("", "Bonjour sur le tampon WeeChat")
@@ -8462,7 +8463,7 @@ Script (Python) :
[source,python]
----
# prototype
-weechat.prnt_date_tags(buffer, date, tags, message)
+def prnt_date_tags(buffer: str, date: str, tags: str, message: str) -> int: ...
# exemple
time = int(time.time())
@@ -8508,7 +8509,7 @@ Script (Python) :
[source,python]
----
# prototype
-weechat.prnt_y(buffer, y, message)
+def prnt_y(buffer: str, y: int, message: str) -> int: ...
# exemple
weechat.prnt_y("", 2, "Mon message sur la 3ème ligne")
@@ -8544,7 +8545,7 @@ Script (Python) :
[source,python]
----
# prototype
-weechat.log_print(message)
+def log_print(message: str) -> int: ...
# exemple
weechat.log_print("Mon message dans le fichier log")
@@ -8724,8 +8725,8 @@ Script (Python) :
[source,python]
----
# prototype
-hook = weechat.hook_command(command, description, args, args_description,
- completion, callback, callback_data)
+def hook_command(command: str, description: str, args: str, args_description: str,
+ completion: str, callback: str, callback_data: str) -> str: ...
# exemple
def my_command_cb(data, buffer, args):
@@ -8835,7 +8836,7 @@ Script (Python) :
[source,python]
----
# prototype
-hook = weechat.hook_completion(completion_item, description, callback, callback_data)
+def hook_completion(completion_item: str, description: str, callback: str, callback_data: str) -> str: ...
# exemple
def my_completion_cb(data, completion_item, buffer, completion):
@@ -8926,7 +8927,7 @@ Script (Python) :
[source,python]
----
# prototype
-hook = weechat.hook_command_run(command, callback, callback_data)
+def hook_command_run(command: str, callback: str, callback_data: str) -> str: ...
# exemple
def my_command_run_cb(data, buffer, command):
@@ -9006,7 +9007,7 @@ Script (Python) :
[source,python]
----
# prototype
-hook = weechat.hook_timer(interval, align_second, max_calls, callback, callback_data)
+def hook_timer(interval: int, align_second: int, max_calls: int, callback: str, callback_data: str) -> str: ...
# exemple
def my_timer_cb(data, remaining_calls):
@@ -9092,7 +9093,7 @@ Script (Python) :
[source,python]
----
# prototype
-hook = weechat.hook_fd(fd, flag_read, flag_write, flag_exception, callback, callback_data)
+def hook_fd(fd: int, flag_read: int, flag_write: int, flag_exception: int, callback: str, callback_data: str) -> str: ...
# exemple
def my_fd_cb(data, fd):
@@ -9303,7 +9304,7 @@ Script (Python) :
[source,python]
----
# prototype
-hook = weechat.hook_process(command, timeout, callback, callback_data)
+def hook_process(command: str, timeout: int, callback: str, callback_data: str) -> str: ...
# exemple avec une commande externe
def my_process_cb(data, command, return_code, out, err):
@@ -9542,7 +9543,7 @@ Script (Python) :
[source,python]
----
# prototype
-hook = weechat.hook_process_hashtable(command, options, timeout, callback, callback_data)
+def hook_process_hashtable(command: str, options: Dict[str, str], timeout: int, callback: str, callback_data: str) -> str: ...
# exemple
def my_process_cb(data, command, return_code, out, err):
@@ -9746,8 +9747,8 @@ Script (Python) :
[source,python]
----
# prototype
-hook = weechat.hook_connect(proxy, address, port, ipv6, retry, local_hostname,
- callback, callback_data)
+def hook_connect(proxy: str, address: str, port: int, ipv6: int, retry: int, local_hostname: str,
+ callback: str, callback_data: str) -> str: ...
# exemple
def my_connect_cb(data, status, gnutls_rc, sock, error, ip_address):
@@ -10053,7 +10054,7 @@ Script (Python) :
[source,python]
----
# prototype
-hook = weechat.hook_line(buffer_type, buffer_name, tags, callback, callback_data)
+def hook_line(buffer_type: str, buffer_name: str, tags: str, callback: str, callback_data: str) -> str: ...
# exemple
def my_line_cb(data, line):
@@ -10169,7 +10170,7 @@ Script (Python) :
[source,python]
----
# prototype
-hook = weechat.hook_print(buffer, tags, message, strip_colors, callback, callback_data)
+def hook_print(buffer: str, tags: str, message: str, strip_colors: int, callback: str, callback_data: str) -> str: ...
# exemple
def my_print_cb(data, buffer, date, tags, displayed, highlight, prefix, message):
@@ -11090,7 +11091,7 @@ Script (Python) :
[source,python]
----
# prototype
-hook = weechat.hook_signal(signal, callback, callback_data)
+def hook_signal(signal: str, callback: str, callback_data: str) -> str: ...
# exemple
def my_signal_cb(data, signal, signal_data):
@@ -11142,7 +11143,7 @@ Script (Python) :
[source,python]
----
# prototype
-rc = weechat.hook_signal_send(signal, type_data, signal_data)
+def hook_signal_send(signal: str, type_data: str, signal_data: str) -> int: ...
# exemple
rc = weechat.hook_signal_send("mon_signal", weechat.WEECHAT_HOOK_SIGNAL_STRING, ma_chaine)
@@ -11440,7 +11441,7 @@ Script (Python) :
[source,python]
----
# prototype
-hook = weechat.hook_hsignal(signal, callback, callback_data)
+def hook_hsignal(signal: str, callback: str, callback_data: str) -> str: ...
# exemple
def my_hsignal_cb(data, signal, hashtable):
@@ -11499,7 +11500,7 @@ Script (Python) :
[source,python]
----
# prototype
-rc = weechat.hook_hsignal_send(signal, hashtable)
+def hook_hsignal_send(signal: str, hashtable: Dict[str, str]) -> int: ...
# exemple
rc = weechat.hook_hsignal_send("my_hsignal", {"clé": "valeur"})
@@ -11759,7 +11760,7 @@ Script (Python) :
[source,python]
----
# prototype
-hook = weechat.hook_config(option, callback, callback_data)
+def hook_config(option: str, callback: str, callback_data: str) -> str: ...
# exemple
def my_config_cb(data, option, value):
@@ -11932,7 +11933,7 @@ Script (Python) :
[source,python]
----
# prototype
-hook = weechat.hook_modifier(modifier, callback, callback_data)
+def hook_modifier(modifier: str, callback: str, callback_data: str) -> str: ...
# exemple
def my_modifier_cb(data, modifier, modifier_data, string):
@@ -12047,7 +12048,7 @@ Script (Python) :
[source,python]
----
# prototype
-weechat.hook_modifier_exec(modifier, modifier_data, string)
+def hook_modifier_exec(modifier: str, modifier_data: str, string: str) -> str: ...
# exemple
weechat.hook_modifier_exec("mon_modifier", mes_donnees, ma_chaine)
@@ -12127,8 +12128,8 @@ Script (Python) :
[source,python]
----
# prototype
-hook = weechat.hook_info(info_name, description, args_description,
- callback, callback_data)
+def hook_info(info_name: str, description: str, args_description: str,
+ callback: str, callback_data: str) -> str: ...
# exemple
def my_info_cb(data, info_name, arguments):
@@ -12214,8 +12215,8 @@ Script (Python) :
[source,python]
----
# prototype
-hook = weechat.hook_info_hashtable(info_name, description, args_description,
- output_description, callback, callback_data)
+def hook_info_hashtable(info_name: str, description: str, args_description: str,
+ output_description: str, callback: str, callback_data: str) -> str: ...
# exemple
def my_info_hashtable_cb(data, info_name, hashtable):
@@ -12307,8 +12308,8 @@ Script (Python) :
[source,python]
----
# prototype
-hook = weechat.hook_infolist(infolist_name, description, pointer_description,
- args_description, callback, callback_data)
+def hook_infolist(infolist_name: str, description: str, pointer_description: str,
+ args_description: str, callback: str, callback_data: str) -> str: ...
# exemple
def my_infolist_cb(data, infolist_name, pointer, arguments):
@@ -12591,7 +12592,7 @@ Script (Python) :
[source,python]
----
# prototype
-hook = weechat.hook_focus(area, callback, callback_data)
+def hook_focus(area: str, callback: str, callback_data: str) -> str: ...
# exemple
def my_focus_nicklist_cb(data, info):
@@ -12667,7 +12668,7 @@ Script (Python) :
[source,python]
----
# prototype
-weechat.hook_set(hook, property, value)
+def hook_set(hook: str, property: str, value: str) -> int: ...
# exemple
def my_process_cb(data, command, return_code, out, err):
@@ -12709,7 +12710,7 @@ Script (Python) :
[source,python]
----
# prototype
-weechat.unhook(hook)
+def unhook(hook: str) -> int: ...
# exemple
weechat.unhook(my_hook)
@@ -12745,7 +12746,7 @@ Script (Python) :
[source,python]
----
# prototype
-weechat.unhook_all()
+def unhook_all() -> int: ...
# exemple
weechat.unhook_all()
@@ -12847,8 +12848,8 @@ Script (Python) :
[source,python]
----
# prototype
-buffer = weechat.buffer_new(name, input_callback, input_callback_data,
- close_callback, close_callback_data)
+def buffer_new(name: str, input_callback: str, input_callback_data: str,
+ close_callback: str, close_callback_data: str) -> str: ...
# exemple
def my_input_cb(data, buffer, input_data):
@@ -12890,7 +12891,7 @@ Script (Python) :
[source,python]
----
# prototype
-buffer = weechat.current_buffer()
+def current_buffer() -> str: ...
# exemple
weechat.prnt(weechat.current_buffer(), "Texte sur le tampon courant")
@@ -12937,7 +12938,7 @@ Script (Python) :
[source,python]
----
# prototype
-buffer = weechat.buffer_search(plugin, name)
+def buffer_search(plugin: str, name: str) -> str: ...
# exemple
buffer = weechat.buffer_search("mon_extension", "mon_tampon")
@@ -12971,7 +12972,7 @@ Script (Python) :
[source,python]
----
# prototype
-buffer = weechat.buffer_search_main()
+def buffer_search_main() -> str: ...
# exemple
buffer = weechat.buffer_search_main()
@@ -13009,7 +13010,7 @@ Script (Python) :
[source,python]
----
# prototype
-weechat.buffer_clear(buffer)
+def buffer_clear(buffer: str) -> int: ...
# exemple
buffer = weechat.buffer_search("mon_extension", "mon_tampon")
@@ -13048,7 +13049,7 @@ Script (Python) :
[source,python]
----
# prototype
-weechat.buffer_close(buffer)
+def buffer_close(buffer: str) -> int: ...
# exemple
buffer = weechat.buffer_new("mon_tampon", "my_input_cb", "", "my_close_cb", "")
@@ -13089,7 +13090,7 @@ Script (Python) :
[source,python]
----
# prototype
-weechat.buffer_merge(buffer, target_buffer)
+def buffer_merge(buffer: str, target_buffer: str) -> int: ...
# exemple
# mélanger le tampon courant avec le tampon "core"
@@ -13126,7 +13127,7 @@ Script (Python) :
[source,python]
----
# prototype
-weechat.buffer_unmerge(buffer, number)
+def buffer_unmerge(buffer: str, number: int) -> int: ...
# exemple
weechat.buffer_unmerge(weechat.current_buffer(), 1)
@@ -13218,7 +13219,7 @@ Script (Python) :
[source,python]
----
# prototype
-value = weechat.buffer_get_integer(buffer, property)
+def buffer_get_integer(buffer: str, property: str) -> int: ...
# exemple
weechat.prnt("", "mon numéro de tampon est : %d" % weechat.buffer_get_integer(my_buffer, "number"))
@@ -13279,7 +13280,7 @@ Script (Python) :
[source,python]
----
# prototype
-value = weechat.buffer_get_string(buffer, property)
+def buffer_get_string(buffer: str, property: str) -> str: ...
# exemple
weechat.prnt("", "nom / nom court du tampon sont : %s / %s"
@@ -13324,7 +13325,7 @@ Script (Python) :
[source,python]
----
# prototype
-value = weechat.buffer_get_pointer(buffer, property)
+def buffer_get_pointer(buffer: str, property: str) -> str: ...
# exemple
weechat.prnt("", "pointeur vers l'extension de mon tampon : %s" % weechat.buffer_get_pointer(my_buffer, "plugin"))
@@ -13541,7 +13542,7 @@ Script (Python) :
[source,python]
----
# prototype
-weechat.buffer_set(buffer, property, value)
+def buffer_set(buffer: str, property: str, value: str) -> int: ...
# exemples
@@ -13660,7 +13661,7 @@ Script (Python) :
[source,python]
----
# prototype
-value = weechat.buffer_string_replace_local_var(buffer, string)
+def buffer_string_replace_local_var(buffer: str, string: str) -> str: ...
# exemple
weechat.buffer_set(my_buffer, "localvar_set_toto", "abc")
@@ -13712,7 +13713,7 @@ Script (Python) :
[source,python]
----
# prototype
-match = weechat.buffer_match_list(buffer, string)
+def buffer_match_list(buffer: str, string: str) -> int: ...
# exemple
buffer = weechat.buffer_search("irc", "freenode.#weechat")
@@ -13755,7 +13756,7 @@ Script (Python) :
[source,python]
----
# prototype
-window = weechat.current_window()
+def current_window() -> str: ...
# exemple
current_window = weechat.current_window()
@@ -13797,7 +13798,7 @@ Script (Python) :
[source,python]
----
# prototype
-window = weechat.window_search_with_buffer(buffer)
+def window_search_with_buffer(buffer: str) -> str: ...
# exemple
weechat.prnt("", "fenêtre affichant le tampon core : %s"
@@ -13864,7 +13865,7 @@ Script (Python) :
[source,python]
----
# prototype
-value = weechat.window_get_integer(window, property)
+def window_get_integer(window: str, property: str) -> int: ...
# exemple
weechat.prnt("", "la fenêtre courante est en position (x,y) : (%d,%d)"
@@ -13902,7 +13903,7 @@ Script (Python) :
[source,python]
----
# prototype
-value = weechat.window_get_string(buffer, property)
+def window_get_string(window: str, property: str) -> str: ...
----
==== window_get_pointer
@@ -13942,7 +13943,7 @@ Script (Python) :
[source,python]
----
# prototype
-value = weechat.window_get_pointer(window, property)
+def window_get_pointer(window: str, property: str) -> str: ...
# exemple
weechat.prnt("", "tampon affiché dans la fenêtre courante : %s"
@@ -13978,7 +13979,7 @@ Script (Python) :
[source,python]
----
# prototype
-weechat.window_set_title(window, title)
+def window_set_title(title: str) -> int: ...
# exemple
weechat.window_set_title("nouveau titre ici")
@@ -14049,7 +14050,7 @@ Script (Python) :
[source,python]
----
# prototype
-group = weechat.nicklist_add_group(buffer, parent_group, name, color, visible)
+def nicklist_add_group(buffer: str, parent_group: str, name: str, color: str, visible: int) -> str: ...
# exemple
group = weechat.nicklist_add_group(my_buffer, my_parent_group, "groupe_test",
@@ -14093,7 +14094,7 @@ Script (Python) :
[source,python]
----
# prototype
-group = weechat.nicklist_search_group(buffer, from_group, name)
+def nicklist_search_group(buffer: str, from_group: str, name: str) -> str: ...
# exemple
group = weechat.nicklist_search_group(my_buffer, "", "groupe_test")
@@ -14161,7 +14162,7 @@ Script (Python) :
[source,python]
----
# prototype
-nick = weechat.nicklist_add_nick(buffer, group, name, color, prefix, prefix_color, visible)
+def nicklist_add_nick(buffer: str, group: str, name: str, color: str, prefix: str, prefix_color: str, visible: int) -> str: ...
# exemple
if nick_away:
@@ -14208,7 +14209,7 @@ Script (Python) :
[source,python]
----
# prototype
-nick = weechat.nicklist_search_nick(buffer, from_group, name)
+def nicklist_search_nick(buffer: str, from_group: str, name: str) -> str: ...
# exemple
nick = weechat.nicklist_search_nick(my_buffer, "", "test_nick")
@@ -14244,7 +14245,7 @@ Script (Python) :
[source,python]
----
# prototype
-weechat.nicklist_remove_group(buffer, group)
+def nicklist_remove_group(buffer: str, group: str) -> int: ...
# exemple
weechat.nicklist_remove_group(my_buffer, my_group)
@@ -14279,7 +14280,7 @@ Script (Python) :
[source,python]
----
# prototype
-weechat.nicklist_remove_nick(buffer, nick)
+def nicklist_remove_nick(buffer: str, nick: str) -> int: ...
# exemple
weechat.nicklist_remove_nick(my_buffer, my_nick)
@@ -14312,7 +14313,7 @@ Script (Python) :
[source,python]
----
# prototype
-weechat.nicklist_remove_all(buffer)
+def nicklist_remove_all(buffer: str) -> int: ...
# exemple
weechat.nicklist_remove_all(my_buffer)
@@ -14408,7 +14409,7 @@ Script (Python) :
[source,python]
----
# prototype
-value = weechat.nicklist_group_get_integer(buffer, group, property)
+def nicklist_group_get_integer(buffer: str, group: str, property: str) -> int: ...
# exemple
visible = weechat.nicklist_group_get_integer(buffer, group, "visible")
@@ -14453,7 +14454,7 @@ Script (Python) :
[source,python]
----
# prototype
-value = weechat.nicklist_group_get_string(buffer, group, property)
+def nicklist_group_get_string(buffer: str, group: str, property: str) -> str: ...
# exemple
color = weechat.nicklist_group_get_string(buffer, group, "color")
@@ -14497,7 +14498,7 @@ Script (Python) :
[source,python]
----
# prototype
-value = weechat.nicklist_group_get_pointer(buffer, group, property)
+def nicklist_group_get_pointer(buffer: str, group: str, property: str) -> str: ...
# exemple
parent = weechat.nicklist_group_get_pointer(buffer, group, "parent")
@@ -14559,7 +14560,7 @@ Script (Python) :
[source,python]
----
# prototype
-weechat.nicklist_group_set(buffer, group, property, value)
+def nicklist_group_set(buffer: str, group: str, property: str, value: str) -> int: ...
# exemples
@@ -14611,7 +14612,7 @@ Script (Python) :
[source,python]
----
# prototype
-value = weechat.nicklist_nick_get_integer(buffer, nick, property)
+def nicklist_nick_get_integer(buffer: str, nick: str, property: str) -> int: ...
# exemple
visible = weechat.nicklist_nick_get_integer(buffer, nick, "visible")
@@ -14658,7 +14659,7 @@ Script (Python) :
[source,python]
----
# prototype
-value = weechat.nicklist_nick_get_string(buffer, nick, property)
+def nicklist_nick_get_string(buffer: str, nick: str, property: str) -> str: ...
# exemple
color = weechat.nicklist_nick_get_string(buffer, nick, "color")
@@ -14702,7 +14703,7 @@ Script (Python) :
[source,python]
----
# prototype
-value = weechat.nicklist_nick_get_pointer(buffer, nick, property)
+def nicklist_nick_get_pointer(buffer: str, nick: str, property: str) -> str: ...
# exemple
group = weechat.nicklist_nick_get_pointer(buffer, nick, "group")
@@ -14774,7 +14775,7 @@ Script (Python) :
[source,python]
----
# prototype
-weechat.nicklist_nick_set(buffer, nick, property, value)
+def nicklist_nick_set(buffer: str, nick: str, property: str, value: str) -> int: ...
# exemples
@@ -14827,7 +14828,7 @@ Script (Python) :
[source,python]
----
# prototype
-bar_item = weechat.bar_item_search(name)
+def bar_item_search(name: str) -> str: ...
# exemple
bar_item = weechat.bar_item_search("myitem")
@@ -14913,7 +14914,7 @@ dans WeeChat ≥ 0.4.2).
[source,python]
----
# prototype
-bar_item = weechat.bar_item_new(name, build_callback, build_callback_data)
+def bar_item_new(name: str, build_callback: str, build_callback_data: str) -> str: ...
# exemple (fonction de rappel sans "buffer" et "extra_info")
def my_build_callback(data, item, window):
@@ -14956,7 +14957,7 @@ Script (Python) :
[source,python]
----
# prototype
-weechat.bar_item_update(name)
+def bar_item_update(name: str) -> int: ...
# exemple
weechat.bar_item_update("myitem")
@@ -14989,7 +14990,7 @@ Script (Python) :
[source,python]
----
# prototype
-weechat.bar_item_remove(item)
+def bar_item_remove(item: str) -> int: ...
# exemple
weechat.bar_item_remove(myitem)
@@ -15026,7 +15027,7 @@ Script (Python) :
[source,python]
----
# prototype
-bar = weechat.bar_search(name)
+def bar_search(name: str) -> str: ...
# exemple
bar = weechat.bar_search("mybar")
@@ -15141,9 +15142,10 @@ Script (Python) :
[source,python]
----
# prototype
-bar = weechat.bar_new(name, hidden, priority, type, condition, position,
- filling_top_bottom, filling_left_right, size, size_max,
- color_fg, color_delim, color_bg, color_bg_inactive, separator, items)
+def bar_new(name: str, hidden: str, priority: str, type: str, condition: str, position: str,
+ filling_top_bottom: str, filling_left_right: str, size: str, size_max: str,
+ color_fg: str, color_delim: str, color_bg: str, color_bg_inactive: str,
+ separator: str, items: str) -> str: ...
# exemple
bar = weechat.bar_new("mybar", "off", "100", "window", "", "top", "horizontal", "vertical",
@@ -15193,7 +15195,7 @@ Script (Python) :
[source,python]
----
# prototype
-weechat.bar_set(bar, property, value)
+def bar_set(bar: str, property: str, value: str) -> int: ...
# exemple
weechat.bar_set(my_bar, "position", "bottom")
@@ -15226,7 +15228,7 @@ Script (Python) :
[source,python]
----
# prototype
-weechat.bar_update(name)
+def bar_update(name: str) -> int: ...
# exemple
weechat.bar_update("mybar")
@@ -15259,7 +15261,7 @@ Script (Python) :
[source,python]
----
# prototype
-weechat.bar_remove(bar)
+def bar_remove(bar: str) -> int: ...
# exemple
weechat.bar_remove(my_bar)
@@ -15309,7 +15311,7 @@ Script (Python) :
[source,python]
----
# prototype
-weechat.command(buffer, command)
+def command(buffer: str, command: str) -> int: ...
# exemple
rc = weechat.command(weechat.buffer_search("irc", "freenode.#weechat"), "/whois FlashCode")
@@ -15368,7 +15370,7 @@ Script (Python) :
[source,python]
----
# prototype
-weechat.command_options(buffer, command, options)
+def command_options(buffer: str, command: str, options: Dict[str, str]) -> int: ...
# exemple : autoriser toute commande sauf /exec
rc = weechat.command("", "/une_commande paramètres", {"commands": "*,!exec"})
@@ -15412,7 +15414,7 @@ Script (Python) :
[source,python]
----
# prototype
-completion = weechat.completion_new(buffer)
+def completion_new(buffer: str) -> str: ...
# exemple
completion = weechat.completion_new(weechat.buffer_search_main())
@@ -15460,7 +15462,7 @@ Script (Python) :
[source,python]
----
# prototype
-rc = weechat.completion_search(completion, data, position, direction)
+def completion_search(completion: str, data: str, position: int, direction: int) -> int: ...
# exemple
completion = weechat.completion_new(weechat.buffer_search_main())
@@ -15514,7 +15516,7 @@ Script (Python) :
[source,python]
----
# prototype
-value = weechat.completion_get_string(completion, property)
+def completion_get_string(completion: str, property: str) -> str: ...
# exemple
def my_completion_cb(data, completion_item, buffer, completion):
@@ -15558,7 +15560,7 @@ Script (Python) :
[source,python]
----
# prototype
-weechat.completion_list_add(completion, word, nick_completion, where)
+def completion_list_add(completion: str, word: str, nick_completion: int, where: str) -> int: ...
# exemple : voir la fonction hook_completion
----
@@ -15592,7 +15594,7 @@ Script (Python) :
[source,python]
----
# prototype
-weechat.completion_free(completion)
+def completion_free(completion: str) -> int: ...
# exemple
weechat.completion_free(completion)
@@ -15764,7 +15766,7 @@ Script (Python) :
[source,python]
----
# prototype
-value = weechat.info_get(info_name, arguments)
+def info_get(info_name: str, arguments: str) -> str: ...
# exemple
weechat.prnt("", "La version de WeeChat est : %s (compilée le %s)"
@@ -15850,7 +15852,7 @@ Script (Python) :
[source,python]
----
# prototype
-dict = weechat.info_get_hashtable(info_name, dict_in)
+def info_get_hashtable(info_name: str, dict_in: Dict[str, str]) -> Dict[str, str]: ...
# exemple
dict_in = {"message": ":nick!user@host PRIVMSG #weechat :message ici"}
@@ -15904,7 +15906,7 @@ Script (Python) :
[source,python]
----
# prototype
-infolist = weechat.infolist_new()
+def infolist_new() -> str: ...
# exemple
infolist = weechat.infolist_new()
@@ -15941,7 +15943,7 @@ Script (Python) :
[source,python]
----
# prototype
-item = weechat.infolist_new_item(infolist)
+def infolist_new_item(infolist: str) -> str: ...
# exemple
item = weechat.infolist_new_item(infolist)
@@ -15984,7 +15986,7 @@ Script (Python) :
[source,python]
----
# prototype
-var = weechat.infolist_new_var_integer(item, name, value)
+def infolist_new_var_integer(item: str, name: str, value: int) -> str: ...
# exemple
var = weechat.infolist_new_var_integer(item, "mon_entier", 123)
@@ -16027,7 +16029,7 @@ Script (Python) :
[source,python]
----
# prototype
-var = weechat.infolist_new_var_string(item, name, value)
+def infolist_new_var_string(item: str, name: str, value: str) -> str: ...
# exemple
var = weechat.infolist_new_var_string(item, "ma_chaine", "valeur")
@@ -16070,7 +16072,7 @@ Script (Python) :
[source,python]
----
# prototype
-var = weechat.infolist_new_var_pointer(item, name, pointer)
+def infolist_new_var_pointer(item: str, name: str, pointer: str) -> str: ...
# exemple
var = weechat.infolist_new_var_pointer(item, "mon_pointeur", pointer)
@@ -16153,7 +16155,7 @@ Script (Python) :
[source,python]
----
# prototype
-var = weechat.infolist_new_var_time(item, name, time)
+def infolist_new_var_time(item: str, name: str, time: int) -> str: ...
# exemple
var = weechat.infolist_new_var_time(item, "mon_time", int(time.time()))
@@ -16209,7 +16211,7 @@ Script (Python) :
[source,python]
----
# prototype
-infolist = weechat.infolist_get(infolist_name, pointer, arguments)
+def infolist_get(infolist_name: str, pointer: str, arguments: str) -> str: ...
# exemple
infolist = weechat.infolist_get("irc_server", "", "")
@@ -16256,7 +16258,7 @@ Script (Python) :
[source,python]
----
# prototype
-rc = weechat.infolist_next(infolist)
+def infolist_next(infolist: str) -> int: ...
# exemple
rc = weechat.infolist_next(infolist)
@@ -16307,7 +16309,7 @@ Script (Python) :
[source,python]
----
# prototype
-rc = weechat.infolist_prev(infolist)
+def infolist_prev(infolist: str) -> int: ...
# exemple
rc = weechat.infolist_prev(infolist)
@@ -16344,7 +16346,7 @@ Script (Python) :
[source,python]
----
# prototype
-weechat.infolist_reset_item_cursor(infolist)
+def infolist_reset_item_cursor(infolist: str) -> int: ...
# exemple
weechat.infolist_reset_item_cursor(infolist)
@@ -16389,7 +16391,7 @@ Script (Python) :
[source,python]
----
# prototype
-var = weechat.infolist_search_var(infolist, name)
+def infolist_search_var(infolist: str, name: str) -> str: ...
# exemple
if weechat.infolist_search_var(infolist, "name"):
@@ -16433,7 +16435,7 @@ Script (Python) :
[source,python]
----
# prototype
-fields = weechat.infolist_fields(infolist)
+def infolist_fields(infolist: str) -> str: ...
# exemple
fields = weechat.infolist_fields(infolist)
@@ -16475,7 +16477,7 @@ Script (Python) :
[source,python]
----
# prototype
-value = weechat.infolist_integer(infolist, var)
+def infolist_integer(infolist: str, var: str) -> int: ...
# exemple
weechat.prnt("", "entier = %d" % weechat.infolist_integer(infolist, "mon_entier"))
@@ -16515,7 +16517,7 @@ Script (Python) :
[source,python]
----
# prototype
-value = weechat.infolist_string(infolist, var)
+def infolist_string(infolist: str, var: str) -> str: ...
# exemple
weechat.prnt("", "chaîne = %s" % weechat.infolist_string(infolist, "ma_chaine"))
@@ -16555,7 +16557,7 @@ Script (Python) :
[source,python]
----
# prototype
-value = weechat.infolist_pointer(infolist, var)
+def infolist_pointer(infolist: str, var: str) -> str: ...
# exemple
weechat.prnt("", "pointeur = 0x%s" % weechat.infolist_pointer(infolist, "mon_pointeur"))
@@ -16632,7 +16634,7 @@ Script (Python) :
[source,python]
----
# prototype
-value = weechat.infolist_time(infolist, var)
+def infolist_time(infolist: str, var: str) -> int: ...
# exemple
weechat.prnt("", "date/heure = %ld" % weechat.infolist_time(infolist, "mon_time"))
@@ -16665,7 +16667,7 @@ Script (Python) :
[source,python]
----
# prototype
-weechat.infolist_free(infolist)
+def infolist_free(infolist: str) -> int: ...
# exemple
weechat.infolist_free(infolist)
@@ -16944,7 +16946,7 @@ Script (Python) :
[source,python]
----
# prototype
-hdata = weechat.hdata_get(hdata_name)
+def hdata_get(hdata_name: str) -> str: ...
# exemple
hdata = weechat.hdata_get("irc_server")
@@ -16984,7 +16986,7 @@ Script (Python) :
[source,python]
----
# prototype
-offset = weechat.hdata_get_var_offset(hdata, name)
+def hdata_get_var_offset(hdata: str, name: str) -> int: ...
# exemple
offset = weechat.hdata_get_var_offset(hdata, "name")
@@ -17089,7 +17091,7 @@ Script (Python) :
[source,python]
----
# prototype
-type = weechat.hdata_get_var_type_string(hdata, name)
+def hdata_get_var_type_string(hdata: str, name: str) -> str: ...
# exemple
weechat.prnt("", "type = %s" % weechat.hdata_get_var_type_string(hdata, "name"))
@@ -17131,7 +17133,7 @@ Script (Python) :
[source,python]
----
# prototype
-array_size = weechat.hdata_get_var_array_size(hdata, pointer, name)
+def hdata_get_var_array_size(hdata: str, pointer: str, name: str) -> int: ...
# exemple
array_size = weechat.hdata_get_var_array_size(hdata, pointer, "name")
@@ -17175,7 +17177,7 @@ Script (Python) :
[source,python]
----
# prototype
-array_size = weechat.hdata_get_var_array_size_string(hdata, pointer, name)
+def hdata_get_var_array_size_string(hdata: str, pointer: str, name: str) -> str: ...
# exemple
array_size = weechat.hdata_get_var_array_size_string(hdata, pointer, "name")
@@ -17215,7 +17217,7 @@ Script (Python) :
[source,python]
----
# prototype
-hdata_name = weechat.hdata_get_var_hdata(hdata, name)
+def hdata_get_var_hdata(hdata: str, name: str) -> str: ...
# exemple
weechat.prnt("", "hdata = %s" % weechat.hdata_get_var_hdata(hdata, "name"))
@@ -17328,7 +17330,7 @@ Script (Python) :
[source,python]
----
# prototype
-list = weechat.hdata_get_list(hdata, name)
+def hdata_get_list(hdata: str, name: str) -> str: ...
# exemple
hdata = weechat.hdata_get("buffer")
@@ -17385,7 +17387,7 @@ Script (Python) :
[source,python]
----
# prototype
-rc = weechat.hdata_check_pointer(hdata, list, pointer)
+def hdata_check_pointer(hdata: str, list: str, pointer: str) -> int: ...
# exemple
hdata = weechat.hdata_get("buffer")
@@ -17442,7 +17444,7 @@ Script (Python) :
[source,python]
----
# prototype
-pointer = weechat.hdata_move(hdata, pointer, count)
+def hdata_move(hdata: str, pointer: str, count: int) -> str: ...
# exemple
hdata = weechat.hdata_get("buffer")
@@ -17505,7 +17507,7 @@ Script (Python) :
[source,python]
----
# prototype
-pointer = weechat.hdata_search(hdata, pointer, search, count)
+def hdata_search(hdata: str, pointer: str, search: str, count: int) -> str: ...
# exemple
hdata = weechat.hdata_get("irc_server")
@@ -17555,7 +17557,7 @@ Script (Python) :
[source,python]
----
# prototype
-value = weechat.hdata_char(hdata, pointer, name)
+def hdata_char(hdata: str, pointer: str, name: str) -> int: ...
# exemple
weechat.prnt("", "letter = %c" % weechat.hdata_char(hdata, pointer, "letter"))
@@ -17601,7 +17603,7 @@ Script (Python) :
[source,python]
----
# prototype
-value = weechat.hdata_integer(hdata, pointer, name)
+def hdata_integer(hdata: str, pointer: str, name: str) -> int: ...
# exemple
hdata = weechat.hdata_get("buffer")
@@ -17647,7 +17649,7 @@ Script (Python) :
[source,python]
----
# prototype
-value = weechat.hdata_long(hdata, pointer, name)
+def hdata_long(hdata: str, pointer: str, name: str) -> int: ...
# exemple
weechat.prnt("", "longvar = %ld" % weechat.hdata_long(hdata, pointer, "longvar"))
@@ -17693,7 +17695,7 @@ Script (Python) :
[source,python]
----
# prototype
-value = weechat.hdata_string(hdata, pointer, name)
+def hdata_string(hdata: str, pointer: str, name: str) -> str: ...
# exemple
hdata = weechat.hdata_get("buffer")
@@ -17741,7 +17743,7 @@ Script (Python) :
[source,python]
----
# prototype
-value = weechat.hdata_pointer(hdata, pointer, name)
+def hdata_pointer(hdata: str, pointer: str, name: str) -> str: ...
# exemple
hdata = weechat.hdata_get("buffer")
@@ -17805,7 +17807,7 @@ Script (Python) :
[source,python]
----
# prototype
-value = weechat.hdata_time(hdata, pointer, name)
+def hdata_time(hdata: str, pointer: str, name: str) -> int: ...
# exemple
buf = weechat.buffer_search_main()
@@ -17861,7 +17863,7 @@ Script (Python) :
[source,python]
----
# prototype
-hashtable = weechat.hdata_hashtable(hdata, pointer, name)
+def hdata_hashtable(hdata: str, pointer: str, name: str) -> Dict[str, str]: ...
# exemple
hdata = weechat.hdata_get("buffer")
@@ -17916,7 +17918,7 @@ Script (Python) :
[source,python]
----
# prototype
-rc = weechat.hdata_compare(hdata, pointer1, pointer2, name, case_sensitive)
+def hdata_compare(hdata: str, pointer1: str, pointer2: str, name: str, case_sensitive: int) -> int: ...
# exemple
hdata = weechat.hdata_get("buffer")
@@ -18042,7 +18044,7 @@ Script (Python) :
[source,python]
----
# prototype
-count = weechat.hdata_update(hdata, pointer, hashtable)
+def hdata_update(hdata: str, pointer: str, hashtable: Dict[str, str]) -> int: ...
# exemple : soustrait une heure sur le dernier message affiché dans le tampon courant
own_lines = weechat.hdata_pointer(weechat.hdata_get("buffer"), weechat.current_buffer(), "own_lines")
@@ -18105,7 +18107,7 @@ Script (Python) :
[source,python]
----
# prototype
-value = weechat.hdata_get_string(hdata, property)
+def hdata_get_string(hdata: str, property: str) -> str: ...
# exemple
weechat.prnt("", "variables dans le hdata : %s" % weechat.hdata_get_string(hdata, "var_keys"))
@@ -18177,7 +18179,7 @@ Script (Python) :
[source,python]
----
# prototype
-upgrade_file = weechat.upgrade_new(filename, callback_read, callback_read_data)
+def upgrade_new(filename: str, callback_read: str, callback_read_data: str) -> str: ...
# exemple
upgrade_file = weechat.upgrade_new("mon_fichier", "", "")
@@ -18225,7 +18227,7 @@ Script (Python) :
[source,python]
----
# prototype
-rc = weechat.upgrade_write_object(upgrade_file, object_id, infolist)
+def upgrade_write_object(upgrade_file: str, object_id: int, infolist: str) -> int: ...
# exemple
weechat.upgrade_write_object(upgrade_file, 1, infolist)
@@ -18264,7 +18266,7 @@ Script (Python) :
[source,python]
----
# prototype
-rc = weechat.upgrade_read(upgrade_file)
+def upgrade_read(upgrade_file: str) -> int: ...
# exemple
weechat.upgrade_read(upgrade_file)
@@ -18297,7 +18299,7 @@ Script (Python) :
[source,python]
----
# prototype
-weechat.upgrade_close(upgrade_file)
+def upgrade_close(upgrade_file: str) -> int: ...
# exemple
weechat.upgrade_close(upgrade_file)
diff --git a/doc/it/weechat_plugin_api.it.adoc b/doc/it/weechat_plugin_api.it.adoc
index 5bd776cda..938d1bfcc 100644
--- a/doc/it/weechat_plugin_api.it.adoc
+++ b/doc/it/weechat_plugin_api.it.adoc
@@ -312,7 +312,7 @@ Script (Python):
[source,python]
----
# prototipo
-weechat.register(name, author, version, license, description, shutdown_function, charset)
+def register(name: str, author: str, version: str, license: str, description: str, shutdown_function: str, charset: str) -> int: ...
----
[NOTE]
@@ -355,7 +355,7 @@ Script (Python):
[source,python]
----
# prototipo
-name = weechat.plugin_get_name(plugin)
+def plugin_get_name(plugin: str) -> str: ...
# esempio
plugin = weechat.buffer_get_pointer(weechat.current_buffer(), "plugin")
@@ -398,7 +398,7 @@ Script (Python):
[source,python]
----
# prototipo
-weechat.charset_set(charset)
+def charset_set(charset: str) -> int: ...
# esempio
weechat.charset_set("iso-8859-1")
@@ -440,7 +440,7 @@ Script (Python):
[source,python]
----
# prototipo
-str = weechat.iconv_to_internal(charset, string)
+def iconv_to_internal(charset: str, string: str) -> str: ...
# esempio
str = weechat.iconv_to_internal("iso-8859-1", "iso string: é à")
@@ -482,7 +482,7 @@ Script (Python):
[source,python]
----
# prototipo
-str = weechat.iconv_from_internal(charset, string)
+def iconv_from_internal(charset: str, string: str) -> str: ...
# esempio
str = weechat.iconv_from_internal("iso-8859-1", "utf-8 string: é à")
@@ -520,7 +520,7 @@ Script (Python):
[source,python]
----
# prototipo
-str = weechat.gettext(string)
+def gettext(string: str) -> str: ...
# esempio
str = weechat.gettext("hello")
@@ -564,7 +564,7 @@ Script (Python):
[source,python]
----
# prototipo
-str = weechat.ngettext(string, plural, count)
+def ngettext(string: str, plural: str, count) -> str: ...
# esempio
num_files = 2
@@ -930,7 +930,7 @@ Script (Python):
[source,python]
----
# prototipo
-length = weechat.strlen_screen(string)
+def strlen_screen(string: str) -> int: ...
# esempio
length = weechat.strlen_screen("é") # 1
@@ -984,7 +984,7 @@ Script (Python):
[source,python]
----
# prototipo
-match = weechat.string_match(string, mask, case_sensitive)
+def string_match(string: str, mask: str, case_sensitive: int) -> int: ...
# esempio
match1 = weechat.string_match("abcdef", "abc*", 0) # == 1
@@ -1040,7 +1040,7 @@ Script (Python):
[source,python]
----
# prototipo
-match = weechat.string_match_list(string, masks, case_sensitive)
+def string_match_list(string: str, masks: str, case_sensitive: int) -> int: ...
# esempio
match1 = weechat.string_match("abc", "*,!abc*", 0) # == 0
@@ -1143,7 +1143,7 @@ Script (Python):
[source,python]
----
# prototipo
-path = weechat.string_eval_path_home(path, pointers, extra_vars, options)
+def string_eval_path_home(path: str, pointers: Dict[str, str], extra_vars: Dict[str, str], options: Dict[str, str]) -> str: ...
# esempio
path = weechat.string_eval_path_home("${weechat_config_dir}/test.conf", {}, {}, {})
@@ -1309,7 +1309,7 @@ Script (Python):
[source,python]
----
# prototipo
-regex = weechat.string_mask_to_regex(mask)
+def string_mask_to_regex(mask: str) -> str: ...
# esempio
regex = weechat.string_mask_to_regex("test*mask") # "test.*mask"
@@ -1466,7 +1466,7 @@ Script (Python):
[source,python]
----
# prototipo
-highlight = weechat.string_has_highlight(string, highlight_words)
+def string_has_highlight(string: str, highlight_words: str) -> int: ...
# esempio
highlight = weechat.string_has_highlight("my test string", "test,word2") # 1
@@ -1511,7 +1511,7 @@ Script (Python):
[source,python]
----
# prototipo
-highlight = weechat.string_has_highlight_regex(string, regex)
+def string_has_highlight_regex(string: str, regex: str) -> int: ...
# esempio
highlight = weechat.string_has_highlight_regex("my test string", "test|word2") # 1
@@ -1979,7 +1979,7 @@ Script (Python), _WeeChat ≥ 2.2_:
[source,python]
----
# prototipo
-str = weechat.string_format_size(size)
+def string_format_size(size: int) -> str: ...
# esempio
str = weechat.string_format_size(15200) # == "15.2 KB"
@@ -2028,7 +2028,7 @@ Script (Python):
[source,python]
----
# prototipo
-size = weechat.string_color_code_size(string)
+def string_color_code_size(string: str) -> int: ...
# esempio
size = weechat.string_color_code_size("test") # size == 0
@@ -2080,7 +2080,7 @@ Script (Python):
[source,python]
----
# prototipo
-str = weechat.string_remove_color(string, replacement)
+def string_remove_color(string: str, replacement: str) -> str: ...
# esempio
str = weechat.string_remove_color(my_string, "?")
@@ -2257,7 +2257,7 @@ Script (Python):
[source,python]
----
# prototipo
-is_cmdchar = weechat.string_is_command_char(string)
+def string_is_command_char(string: str) -> int: ...
# esempi
command_char1 = weechat.string_is_command_char("/test") # == 1
@@ -2300,7 +2300,7 @@ Script (Python):
[source,python]
----
# prototipo
-str = weechat.string_input_for_buffer(string)
+def string_input_for_buffer(string: str) -> str: ...
# esempi
str1 = weechat.string_input_for_buffer("test") # "test"
@@ -2414,7 +2414,7 @@ Script (Python):
[source,python]
----
# prototipo
-str = weechat.string_eval_expression(expr, pointers, extra_vars, options)
+def string_eval_expression(expr: str, pointers: Dict[str, str], extra_vars: Dict[str, str], options: Dict[str, str]) -> str: ...
# esempi
@@ -3821,7 +3821,7 @@ Script (Python):
[source,python]
----
# prototipo
-weechat.mkdir_home(directory, mode)
+def mkdir_home(directory: str, mode: int) -> int: ...
# esempio
weechat.mkdir_home("${weechat_cache_dir}/temp", 0755)
@@ -3862,7 +3862,7 @@ Script (Python):
[source,python]
----
# prototipo
-weechat.mkdir(directory, mode)
+def mkdir(directory: str, mode: int) -> int: ...
# esempio
weechat.mkdir("/tmp/mydir", 0755)
@@ -3903,7 +3903,7 @@ Script (Python):
[source,python]
----
# prototipo
-weechat.mkdir_parents(directory, mode)
+def mkdir_parents(directory: str, mode: int) -> int: ...
# esempio
weechat.mkdir_parents("/tmp/my/dir", 0755)
@@ -4205,7 +4205,7 @@ Script (Python):
[source,python]
----
# prototipo
-list = weechat.list_new()
+def list_new() -> str: ...
# esempio
list = weechat.list_new()
@@ -4252,7 +4252,7 @@ Script (Python):
[source,python]
----
# prototipo
-item = weechat.list_add(list, data, where, user_data)
+def list_add(list: str, data: str, where: str, user_data: str) -> str: ...
# esempio
item = weechat.list_add(list, "my data", weechat.WEECHAT_LIST_POS_SORT, "")
@@ -4291,7 +4291,7 @@ Script (Python):
[source,python]
----
# prototipo
-item = weechat.list_search(list, data)
+def list_search(list: str, data: str) -> str: ...
# esempio
item = weechat.list_search(list, "my data")
@@ -4332,7 +4332,7 @@ Script (Python):
[source,python]
----
# prototipo
-pos_item = weechat.list_search_pos(list, data)
+def list_search_pos(list: str, data: str) -> int: ...
# esempio
pos_item = weechat.list_search_pos(list, "my data")
@@ -4372,7 +4372,7 @@ Script (Python):
[source,python]
----
# prototipo
-item = weechat.list_casesearch(list, data)
+def list_casesearch(list: str, data: str) -> str: ...
# esempio
item = weechat.list_casesearch(list, "my data")
@@ -4413,7 +4413,7 @@ Script (Python):
[source,python]
----
# prototipo
-pos_item = weechat.list_casesearch_pos(list, data)
+def list_casesearch_pos(list: str, data: str) -> int: ...
# esempio
pos_item = weechat.list_casesearch_pos(list, "my data")
@@ -4452,7 +4452,7 @@ Script (Python):
[source,python]
----
# prototipo
-item = weechat.list_get(list, position)
+def list_get(list: str, position: int) -> str: ...
# esempio
item = weechat.list_get(list, 0)
@@ -4486,7 +4486,7 @@ Script (Python):
[source,python]
----
# prototipo
-weechat.list_set(item, value)
+def list_set(item: str, value: str) -> int: ...
# esempio
weechat.list_set(item, "nuovi dati")
@@ -4524,7 +4524,7 @@ Script (Python):
[source,python]
----
# prototipo
-item = weechat.list_next(item)
+def list_next(item: str) -> str: ...
# esempio
item = weechat.list_next(item)
@@ -4562,7 +4562,7 @@ Script (Python):
[source,python]
----
# prototipo
-item = weechat.list_prev(item)
+def list_prev(item: str) -> str: ...
# esempio
item = weechat.list_prev(item)
@@ -4599,7 +4599,7 @@ Script (Python):
[source,python]
----
# prototipo
-value = weechat.list_string(item)
+def list_string(item: str) -> str: ...
# esempio
weechat.prnt("", "valore dell'elemento: %s" % weechat.list_string(item))
@@ -4670,7 +4670,7 @@ Script (Python):
[source,python]
----
# prototipo
-size = weechat.list_size(list)
+def list_size(list: str) -> int: ...
# esempio
weechat.prnt("", "dimensione della lista: %d" % weechat.list_size(list))
@@ -4705,7 +4705,7 @@ Script (Python):
[source,python]
----
# prototipo
-weechat.list_remove(list, item)
+def list_remove(list: str, item: str) -> int: ...
# esempio
weechat.list_remove(list, item)
@@ -4738,7 +4738,7 @@ Script (Python):
[source,python]
----
# prototipo
-weechat.list_remove_all(list)
+def list_remove_all(list: str) -> int: ...
# esempio
weechat.list_remove_all(list)
@@ -4771,7 +4771,7 @@ Script (Python):
[source,python]
----
# prototipo
-weechat.list_free(list)
+def list_free(list: str) -> int: ...
# esempio
weechat.list_free(list)
@@ -5899,7 +5899,7 @@ Script (Python):
[source,python]
----
# prototipo
-config_file = weechat.config_new(name, callback_reload, callback_reload_data)
+def config_new(name: str, callback_reload: str, callback_reload_data: str) -> str: ...
# esempio
def my_config_reload_cb(data, config_file):
@@ -6162,12 +6162,12 @@ Script (Python):
[source,python]
----
# prototipo
-section = weechat.config_new_section(config_file, name,
- user_can_add_options, user_can_delete_options,
- callback_read, callback_read_data,
- callback_write, callback_write_data,
- callback_create_option, callback_create_option_data,
- callback_delete_option, callback_delete_option_data)
+def config_new_section(config_file: str, name: str,
+ user_can_add_options: int, user_can_delete_options: int,
+ callback_read: str, callback_read_data: str,
+ callback_write: str, callback_write_data: str,
+ callback_create_option: str, callback_create_option_data: str,
+ callback_delete_option: str, callback_delete_option_data: str) -> str: ...
# esempio
def my_section_read_cb(data, config_file, section, option_name, value):
@@ -6236,7 +6236,7 @@ Script (Python):
[source,python]
----
# prototipo
-section = weechat.config_search_section(config_file, section_name)
+def config_search_section(config_file: str, section_name: str) -> str: ...
# esempio
section = weechat.config_search_section(config_file, "section")
@@ -6423,11 +6423,12 @@ Script (Python):
[source,python]
----
# prototipo
-option = weechat.config_new_option(config_file, section, name, type, description,
- string_values, min, max, default_value, value, null_value_allowed,
- callback_check_value, callback_check_value_data,
- callback_change, callback_change_data,
- callback_delete, callback_delete_data)
+def config_new_option(config_file: str, section: str, name: str, type: str, description: str,
+ string_values: str, min: int, max: int,
+ default_value: str, value: str, null_value_allowed: int,
+ callback_check_value: str, callback_check_value_data: str,
+ callback_change: str, callback_change_data: str,
+ callback_delete: str, callback_delete_data: str) -> str: ...
# esempio
def option4_check_value_cb(data, option, value):
@@ -6522,7 +6523,7 @@ Script (Python):
[source,python]
----
# prototipo
-option = weechat.config_search_option(config_file, section, option_name)
+def config_search_option(config_file: str, section: str, option_name: str) -> str: ...
# esempio
option = weechat.config_search_option(config_file, section, "option")
@@ -6673,7 +6674,7 @@ Script (Python):
[source,python]
----
# prototipo
-value = weechat.config_string_to_boolean(text)
+def config_string_to_boolean(text: str) -> int: ...
# esempio
if weechat.config_string_to_boolean(text):
@@ -6729,7 +6730,7 @@ Script (Python):
[source,python]
----
# prototipo
-rc = weechat.config_option_reset(option, run_callback)
+def config_option_reset(option: str, run_callback: int) -> int: ...
# esempio
rc = weechat.config_option_reset(option, 1)
@@ -6802,7 +6803,7 @@ Script (Python):
[source,python]
----
# prototipo
-rc = weechat.config_option_set(option, value, run_callback)
+def config_option_set(option: str, value: str, run_callback: int) -> int: ...
# esempio
rc = weechat.config_option_set(option, "new_value", 1)
@@ -6866,7 +6867,7 @@ Script (Python):
[source,python]
----
# prototipo
-rc = weechat.config_option_set_null(option, run_callback)
+def config_option_set_null(option: str, run_callback: int) -> int: ...
# esempio
rc = weechat.config_option_set_null(option, 1)
@@ -6928,7 +6929,7 @@ Script (Python):
[source,python]
----
# prototipo
-rc = weechat.config_option_unset(option)
+def config_option_unset(option: str) -> int: ...
# esempio
rc = weechat.config_option_unset(option)
@@ -6971,7 +6972,7 @@ Script (Python):
[source,python]
----
# prototipo
-weechat.config_option_rename(option, new_name)
+def config_option_rename(option: str, new_name: str) -> int: ...
# esempio
weechat.config_option_rename(option, "new_name")
@@ -7107,7 +7108,7 @@ Script (Python):
[source,python]
----
# prototipo
-weechat.config_option_is_null(option)
+def config_option_is_null(option: str) -> int: ...
# esempio
if weechat.config_option_is_null(option):
@@ -7153,7 +7154,7 @@ Script (Python):
[source,python]
----
# prototipo
-weechat.config_option_default_is_null(option)
+def config_option_default_is_null(option: str) -> int: ...
# esempio
if weechat.config_option_default_is_null(option):
@@ -7203,7 +7204,7 @@ Script (Python):
[source,python]
----
# prototipo
-value = weechat.config_boolean(option)
+def config_boolean(option: str) -> int: ...
# esempio
option = weechat.config_get("plugin.section.option")
@@ -7254,7 +7255,7 @@ Script (Python):
[source,python]
----
# prototipo
-value = weechat.config_boolean_default(option)
+def config_boolean_default(option: str) -> int: ...
# esempio
option = weechat.config_get("plugin.section.option")
@@ -7298,7 +7299,7 @@ Script (Python):
[source,python]
----
# prototipo
-value = weechat.config_integer(option)
+def config_integer(option: str) -> int: ...
# esempio
option = weechat.config_get("plugin.section.option")
@@ -7341,7 +7342,7 @@ Script (Python):
[source,python]
----
# prototipo
-value = weechat.config_integer_default(option)
+def config_integer_default(option: str) -> int: ...
# esempio
option = weechat.config_get("plugin.section.option")
@@ -7385,7 +7386,7 @@ Script (Python):
[source,python]
----
# prototipo
-value = weechat.config_string(option)
+def config_string(option: str) -> str: ...
# esempio
option = weechat.config_get("plugin.section.option")
@@ -7429,7 +7430,7 @@ Script (Python):
[source,python]
----
# prototipo
-value = weechat.config_string_default(option)
+def config_string_default(option: str) -> str: ...
# esempio
option = weechat.config_get("plugin.section.option")
@@ -7472,7 +7473,7 @@ Script (Python):
[source,python]
----
# prototipo
-value = weechat.config_color(option)
+def config_color(option: str) -> str: ...
# esempio
option = weechat.config_get("plugin.section.option")
@@ -7515,7 +7516,7 @@ Script (Python):
[source,python]
----
# prototipo
-value = weechat.config_color_default(option)
+def config_color_default(option: str) -> str: ...
# esempio
option = weechat.config_get("plugin.section.option")
@@ -7563,7 +7564,7 @@ Script (Python):
[source,python]
----
# prototipo
-weechat.config_write_option(config_file, option)
+def config_write_option(config_file: str, option: str) -> int: ...
# esempio
def my_section_write_cb(data, config_file, section_name):
@@ -7617,7 +7618,7 @@ Script (Python):
[source,python]
----
# prototipo
-weechat.config_write_line(config_file, option_name, value)
+def config_write_line(config_file: str, option_name: str, value: str) -> int: ...
# esempio
def my_section_write_cb(data, config_file, section_name):
@@ -7670,7 +7671,7 @@ Script (Python):
[source,python]
----
# prototipo
-rc = weechat.config_write(config_file)
+def config_write(config_file: str) -> int: ...
# esempio
rc = weechat.config_write(config_file)
@@ -7726,7 +7727,7 @@ Script (Python):
[source,python]
----
# prototipo
-rc = weechat.config_read(config_file)
+def config_read(config_file: str) -> int: ...
# esempio
rc = weechat.config_read(config_file)
@@ -7782,7 +7783,7 @@ Script (Python):
[source,python]
----
# prototipo
-rc = weechat.config_reload(config_file)
+def config_reload(config_file: str) -> int: ...
# esempio
rc = weechat.config_reload(config_file)
@@ -7821,7 +7822,7 @@ Script (Python):
[source,python]
----
# prototipo
-weechat.config_option_free(option)
+def config_option_free(option: str) -> int: ...
# esempio
weechat.config_option_free(option)
@@ -7854,7 +7855,7 @@ Script (Python):
[source,python]
----
# prototipo
-weechat.config_section_free_options(section)
+def config_section_free_options(section: str) -> int: ...
# esempio
weechat.config_section_free_options(section)
@@ -7887,7 +7888,7 @@ Script (Python):
[source,python]
----
# prototipo
-weechat.config_section_free(section)
+def config_section_free(section: str) -> int: ...
# esempio
weechat.config_section_free(section)
@@ -7920,7 +7921,7 @@ Script (Python):
[source,python]
----
# prototipo
-weechat.config_free(config_file)
+def config_free(config_file: str) -> int: ...
# esempio
weechat.config_free(config_file)
@@ -7957,7 +7958,7 @@ Script (Python):
[source,python]
----
# prototipo
-option = weechat.config_get(option_name)
+def config_get(option_name: str) -> str: ...
# esempio
option = weechat.config_get("weechat.look.item_time_format")
@@ -7997,7 +7998,7 @@ Script (Python):
[source,python]
----
# prototipo
-value = weechat.config_get_plugin(option_name)
+def config_get_plugin(option_name: str) -> str: ...
# esempio
value = weechat.config_get_plugin("option")
@@ -8043,7 +8044,7 @@ Script (Python):
[source,python]
----
# prototipo
-value = weechat.config_is_set_plugin(option_name)
+def config_is_set_plugin(option_name: str) -> int: ...
# esempio
if weechat.config_is_set_plugin("option"):
@@ -8104,7 +8105,7 @@ Script (Python):
[source,python]
----
# prototipo
-rc = weechat.config_set_plugin(option_name, value)
+def config_set_plugin(option_name: str, value: str) -> int: ...
# esempio
rc = weechat.config_set_plugin("option", "test_value")
@@ -8155,7 +8156,7 @@ Script (Python):
[source,python]
----
# prototipo
-weechat.config_set_desc_plugin(option_name, description)
+def config_set_desc_plugin(option_name: str, description: str) -> int: ...
# esempio
version = weechat.info_get("version_number", "") or 0
@@ -8214,7 +8215,7 @@ Script (Python):
[source,python]
----
# prototipo
-rc = weechat.config_unset_plugin(option_name)
+def config_unset_plugin(option_name: str) -> int: ...
# esempio
rc = weechat.config_unset_plugin("option")
@@ -8294,7 +8295,7 @@ Script (Python):
[source,python]
----
# prototipo
-num_keys = weechat.key_bind(context, keys)
+def key_bind(context: str, keys: Dict[str, str]) -> int: ...
# esempio
keys = {"@chat(python.test):button1": "hsignal:test_mouse",
@@ -8348,7 +8349,7 @@ Script (Python):
[source,python]
----
# prototipo
-num_keys = weechat.key_unbind(context, key)
+def key_unbind(context: str, key: str) -> int: ...
# esempi
@@ -8413,7 +8414,7 @@ Script (Python):
[source,python]
----
# prototipo
-value = weechat.prefix(prefix)
+def prefix(prefix: str) -> str: ...
# esempio
weechat.prnt("", "%sQuesto è un errore..." % weechat.prefix("error"))
@@ -8498,7 +8499,7 @@ Script (Python):
[source,python]
----
# prototipo
-value = weechat.color(color_name)
+def color(color_name: str) -> str: ...
# esempio
weechat.prnt("", "Color: %sblue %sdefault color %syellow on red"
@@ -8563,7 +8564,7 @@ Script (Python):
[source,python]
----
# prototipo
-weechat.prnt(buffer, message)
+def prnt(buffer: str, message: str) -> int: ...
# esempio
weechat.prnt("", "Benvenuto sul buffer di WeeChat")
@@ -8615,7 +8616,7 @@ Script (Python):
[source,python]
----
# prototipo
-weechat.prnt_date_tags(buffer, date, tags, message)
+def prnt_date_tags(buffer: str, date: str, tags: str, message: str) -> int: ...
# esempio
time = int(time.time())
@@ -8660,7 +8661,7 @@ Script (Python):
[source,python]
----
# prototipo
-weechat.prnt_y(buffer, y, message)
+def prnt_y(buffer: str, y: int, message: str) -> int: ...
# esempio
weechat.prnt_y("", 2, "Mio messaggio sulla terza riga")
@@ -8696,7 +8697,7 @@ Script (Python):
[source,python]
----
# prototipo
-weechat.log_print(message)
+def log_print(message: str) -> int: ...
# esempio
weechat.log_print("Mio messaggio nel file di log")
@@ -8857,8 +8858,8 @@ Script (Python):
[source,python]
----
# prototipo
-hook = weechat.hook_command(command, description, args, args_description,
- completion, callback, callback_data)
+def hook_command(command: str, description: str, args: str, args_description: str,
+ completion: str, callback: str, callback_data: str) -> str: ...
# esempio
def my_command_cb(data, buffer, args):
@@ -8967,7 +8968,7 @@ Script (Python):
[source,python]
----
# prototipo
-hook = weechat.hook_completion(completion_item, description, callback, callback_data)
+def hook_completion(completion_item: str, description: str, callback: str, callback_data: str) -> str: ...
# esempio
def my_completion_cb(data, completion_item, buffer, completion):
@@ -9061,7 +9062,7 @@ Script (Python):
[source,python]
----
# prototipo
-hook = weechat.hook_command_run(command, callback, callback_data)
+def hook_command_run(command: str, callback: str, callback_data: str) -> str: ...
# esempio
def my_command_run_cb(data, buffer, command):
@@ -9141,7 +9142,7 @@ Script (Python):
[source,python]
----
# prototipo
-hook = weechat.hook_timer(interval, align_second, max_calls, callback, callback_data)
+def hook_timer(interval: int, align_second: int, max_calls: int, callback: str, callback_data: str) -> str: ...
# esempio
def my_timer_cb(data, remaining_calls):
@@ -9229,7 +9230,7 @@ Script (Python):
[source,python]
----
# prototipo
-hook = weechat.hook_fd(fd, flag_read, flag_write, flag_exception, callback, callback_data)
+def hook_fd(fd: int, flag_read: int, flag_write: int, flag_exception: int, callback: str, callback_data: str) -> str: ...
# esempio
def my_fd_cb(data, fd):
@@ -9439,7 +9440,7 @@ Script (Python):
[source,python]
----
# prototipo
-hook = weechat.hook_process(command, timeout, callback, callback_data)
+def hook_process(command: str, timeout: int, callback: str, callback_data: str) -> str: ...
# example with an external command
def my_process_cb(data, command, return_code, out, err):
@@ -9684,7 +9685,7 @@ Script (Python):
[source,python]
----
# prototipo
-hook = weechat.hook_process_hashtable(command, options, timeout, callback, callback_data)
+def hook_process_hashtable(command: str, options: Dict[str, str], timeout: int, callback: str, callback_data: str) -> str: ...
# esempio
def my_process_cb(data, command, return_code, out, err):
@@ -9888,8 +9889,8 @@ Script (Python):
[source,python]
----
# prototipo
-hook = weechat.hook_connect(proxy, address, port, ipv6, retry, local_hostname,
- callback, callback_data)
+def hook_connect(proxy: str, address: str, port: int, ipv6: int, retry: int, local_hostname: str,
+ callback: str, callback_data: str) -> str: ...
# esempio
def my_connect_cb(data, status, gnutls_rc, sock, error, ip_address):
@@ -10184,7 +10185,7 @@ Script (Python):
[source,python]
----
# prototipo
-hook = weechat.hook_line(buffer_type, buffer_name, tags, callback, callback_data)
+def hook_line(buffer_type: str, buffer_name: str, tags: str, callback: str, callback_data: str) -> str: ...
# esempio
def my_line_cb(data, line):
@@ -10303,7 +10304,7 @@ Script (Python):
[source,python]
----
# prototipo
-hook = weechat.hook_print(buffer, tags, message, strip_colors, callback, callback_data)
+def hook_print(buffer: str, tags: str, message: str, strip_colors: int, callback: str, callback_data: str) -> str: ...
# esempio
def my_print_cb(data, buffer, date, tags, displayed, highlight, prefix, message):
@@ -11310,7 +11311,7 @@ Script (Python):
[source,python]
----
# prototipo
-hook = weechat.hook_signal(signal, callback, callback_data)
+def hook_signal(signal: str, callback: str, callback_data: str) -> str: ...
# esempio
def my_signal_cb(data, signal, signal_data):
@@ -11364,7 +11365,7 @@ Script (Python):
[source,python]
----
# prototipo
-rc = weechat.hook_signal_send(signal, type_data, signal_data)
+def hook_signal_send(signal: str, type_data: str, signal_data: str) -> int: ...
# esempio
rc = weechat.hook_signal_send("my_signal", weechat.WEECHAT_HOOK_SIGNAL_STRING, my_string)
@@ -11674,7 +11675,7 @@ Script (Python):
[source,python]
----
# prototipo
-hook = weechat.hook_hsignal(signal, callback, callback_data)
+def hook_hsignal(signal: str, callback: str, callback_data: str) -> str: ...
# esempio
def my_hsignal_cb(data, signal, hashtable):
@@ -11736,7 +11737,7 @@ Script (Python):
[source,python]
----
# prototipo
-rc = weechat.hook_hsignal_send(signal, hashtable)
+def hook_hsignal_send(signal: str, hashtable: Dict[str, str]) -> int: ...
# esempio
rc = weechat.hook_hsignal_send("my_hsignal", {"key": "value"})
@@ -11990,7 +11991,7 @@ Script (Python):
[source,python]
----
# prototipo
-hook = weechat.hook_config(option, callback, callback_data)
+def hook_config(option: str, callback: str, callback_data: str) -> str: ...
# esempio
def my_config_cb(data, option, value):
@@ -12170,7 +12171,7 @@ Script (Python):
[source,python]
----
# prototipo
-hook = weechat.hook_modifier(modifier, callback, callback_data)
+def hook_modifier(modifier: str, callback: str, callback_data: str) -> str: ...
# esempio
def my_modifier_cb(data, modifier, modifier_data, string):
@@ -12288,7 +12289,7 @@ Script (Python):
[source,python]
----
# prototipo
-weechat.hook_modifier_exec(modifier, modifier_data, string)
+def hook_modifier_exec(modifier: str, modifier_data: str, string: str) -> str: ...
# esempio
weechat.hook_modifier_exec("my_modifier", my_data, my_string)
@@ -12369,7 +12370,8 @@ Script (Python):
[source,python]
----
# prototipo
-hook = weechat.hook_info(info_name, description, args_description, callback, callback_data)
+def hook_info(info_name: str, description: str, args_description: str,
+ callback: str, callback_data: str) -> str: ...
# esempio
def my_info_cb(data, info_name, arguments):
@@ -12454,8 +12456,8 @@ Script (Python):
[source,python]
----
# prototipo
-hook = weechat.hook_info_hashtable(info_name, description, args_description,
- output_description, callback, callback_data)
+def hook_info_hashtable(info_name: str, description: str, args_description: str,
+ output_description: str, callback: str, callback_data: str) -> str: ...
# esempio
def my_info_hashtable_cb(data, info_name, hashtable):
@@ -12548,8 +12550,8 @@ Script (Python):
[source,python]
----
# prototipo
-hook = weechat.hook_infolist(infolist_name, description, pointer_description,
- args_description, callback, callback_data)
+def hook_infolist(infolist_name: str, description: str, pointer_description: str,
+ args_description: str, callback: str, callback_data: str) -> str: ...
# esempio
def my_infolist_cb(data, infolist_name, pointer, arguments):
@@ -12832,7 +12834,7 @@ Script (Python):
[source,python]
----
# prototipo
-hook = weechat.hook_focus(area, callback, callback_data)
+def hook_focus(area: str, callback: str, callback_data: str) -> str: ...
# esempio
def my_focus_nicklist_cb(data, info):
@@ -12919,7 +12921,7 @@ Script (Python):
[source,python]
----
# prototipo
-weechat.hook_set(hook, property, value)
+def hook_set(hook: str, property: str, value: str) -> int: ...
# esempio
def my_process_cb(data, command, return_code, out, err):
@@ -12961,7 +12963,7 @@ Script (Python):
[source,python]
----
# prototipo
-weechat.unhook(hook)
+def unhook(hook: str) -> int: ...
# esempio
weechat.unhook(my_hook)
@@ -13000,7 +13002,7 @@ Script (Python):
[source,python]
----
# prototipo
-weechat.unhook_all()
+def unhook_all() -> int: ...
# esempio
weechat.unhook_all()
@@ -13103,8 +13105,8 @@ Script (Python):
[source,python]
----
# prototipo
-buffer = weechat.buffer_new(name, input_callback, input_callback_data,
- close_callback, close_callback_data)
+def buffer_new(name: str, input_callback: str, input_callback_data: str,
+ close_callback: str, close_callback_data: str) -> str: ...
# esempio
def my_input_cb(data, buffer, input_data):
@@ -13146,7 +13148,7 @@ Script (Python):
[source,python]
----
# prototipo
-buffer = weechat.current_buffer()
+def current_buffer() -> str: ...
# esempio
weechat.prnt(weechat.current_buffer(), "Testo sul buffer corrente")
@@ -13196,7 +13198,7 @@ Script (Python):
[source,python]
----
# prototipo
-buffer = weechat.buffer_search(plugin, name)
+def buffer_search(plugin: str, name: str) -> str: ...
# esempio
buffer = weechat.buffer_search("my_plugin", "my_buffer")
@@ -13230,7 +13232,7 @@ Script (Python):
[source,python]
----
# prototipo
-buffer = weechat.buffer_search_main()
+def buffer_search_main() -> str: ...
# esempio
buffer = weechat.buffer_search_main()
@@ -13268,7 +13270,7 @@ Script (Python):
[source,python]
----
# prototipo
-weechat.buffer_clear(buffer)
+def buffer_clear(buffer: str) -> int: ...
# esempio
buffer = weechat.buffer_search("my_plugin", "my_buffer")
@@ -13307,7 +13309,7 @@ Script (Python):
[source,python]
----
# prototipo
-weechat.buffer_close(buffer)
+def buffer_close(buffer: str) -> int: ...
# esempio
buffer = weechat.buffer_new("my_buffer", "my_input_cb", "", "my_close_cb", "")
@@ -13348,7 +13350,7 @@ Script (Python):
[source,python]
----
# prototipo
-weechat.buffer_merge(buffer, target_buffer)
+def buffer_merge(buffer: str, target_buffer: str) -> int: ...
# esempio
# merge current buffer with WeeChat "core" buffer
@@ -13386,7 +13388,7 @@ Script (Python):
[source,python]
----
# prototipo
-weechat.buffer_unmerge(buffer, number)
+def buffer_unmerge(buffer: str, number: int) -> int: ...
# esempio
weechat.buffer_unmerge(weechat.current_buffer(), 1)
@@ -13490,7 +13492,7 @@ Script (Python):
[source,python]
----
# prototipo
-value = weechat.buffer_get_integer(buffer, property)
+def buffer_get_integer(buffer: str, property: str) -> int: ...
# esempio
weechat.prnt("", "my buffer number is: %d" % weechat.buffer_get_integer(my_buffer, "number"))
@@ -13551,7 +13553,7 @@ Script (Python):
[source,python]
----
# prototipo
-value = weechat.buffer_get_string(buffer, property)
+def buffer_get_string(buffer: str, property: str) -> str: ...
# esempio
weechat.prnt("", "name / short name of buffer are: %s / %s"
@@ -13596,7 +13598,7 @@ Script (Python):
[source,python]
----
# prototipo
-value = weechat.buffer_get_pointer(buffer, property)
+def buffer_get_pointer(buffer: str, property: str) -> str: ...
# esempio
weechat.prnt("", "plugin pointer of my buffer: %s" % weechat.buffer_get_pointer(my_buffer, "plugin"))
@@ -13828,7 +13830,7 @@ Script (Python):
[source,python]
----
# prototipo
-weechat.buffer_set(buffer, property, value)
+def buffer_set(buffer: str, property: str, value: str) -> int: ...
# esempi
@@ -13948,7 +13950,7 @@ Script (Python):
[source,python]
----
# prototipo
-value = weechat.buffer_string_replace_local_var(buffer, string)
+def buffer_string_replace_local_var(buffer: str, string: str) -> str: ...
# esempio
weechat.buffer_set(my_buffer, "localvar_set_toto", "abc")
@@ -14001,7 +14003,7 @@ Script (Python):
[source,python]
----
# prototipo
-match = weechat.buffer_match_list(buffer, string)
+def buffer_match_list(buffer: str, string: str) -> int: ...
# esempio
buffer = weechat.buffer_search("irc", "freenode.#weechat")
@@ -14044,7 +14046,7 @@ Script (Python):
[source,python]
----
# prototipo
-window = weechat.current_window()
+def current_window() -> str: ...
# esempio
current_window = weechat.current_window()
@@ -14086,7 +14088,7 @@ Script (Python):
[source,python]
----
# prototipo
-window = weechat.window_search_with_buffer(buffer)
+def window_search_with_buffer(buffer: str) -> str: ...
# esempio
weechat.prnt("", "window displaying core buffer: %s"
@@ -14149,7 +14151,7 @@ Script (Python):
[source,python]
----
# prototipo
-value = weechat.window_get_integer(window, property)
+def window_get_integer(window: str, property: str) -> int: ...
# esempio
weechat.prnt("", "current window is at position (x,y): (%d,%d)"
@@ -14186,7 +14188,7 @@ Script (Python):
[source,python]
----
# prototipo
-value = weechat.window_get_string(buffer, property)
+def window_get_string(window: str, property: str) -> str: ...
----
==== window_get_pointer
@@ -14226,7 +14228,7 @@ Script (Python):
[source,python]
----
# prototipo
-value = weechat.window_get_pointer(window, property)
+def window_get_pointer(window: str, property: str) -> str: ...
# esempio
weechat.prnt("", "buffer displayed in current window: %s"
@@ -14263,7 +14265,7 @@ Script (Python):
[source,python]
----
# prototipo
-weechat.window_set_title(window, title)
+def window_set_title(title: str) -> int: ...
# esempio
weechat.window_set_title("nuovo titolo qui")
@@ -14333,7 +14335,7 @@ Script (Python):
[source,python]
----
# prototipo
-group = weechat.nicklist_add_group(buffer, parent_group, name, color, visible)
+def nicklist_add_group(buffer: str, parent_group: str, name: str, color: str, visible: int) -> str: ...
# esempio
group = weechat.nicklist_add_group(my_buffer, my_parent_group, "test_group",
@@ -14377,7 +14379,7 @@ Script (Python):
[source,python]
----
# prototipo
-group = weechat.nicklist_search_group(buffer, from_group, name)
+def nicklist_search_group(buffer: str, from_group: str, name: str) -> str: ...
# esempio
group = weechat.nicklist_search_group(my_buffer, "", "test_group")
@@ -14445,7 +14447,7 @@ Script (Python):
[source,python]
----
# prototipo
-nick = weechat.nicklist_add_nick(buffer, group, name, color, prefix, prefix_color, visible)
+def nicklist_add_nick(buffer: str, group: str, name: str, color: str, prefix: str, prefix_color: str, visible: int) -> str: ...
# esempio
if nick_away:
@@ -14492,7 +14494,7 @@ Script (Python):
[source,python]
----
# prototipo
-nick = weechat.nicklist_search_nick(buffer, from_group, name)
+def nicklist_search_nick(buffer: str, from_group: str, name: str) -> str: ...
# esempio
nick = weechat.nicklist_search_nick(my_buffer, "", "test_nick")
@@ -14528,7 +14530,7 @@ Script (Python):
[source,python]
----
# prototipo
-weechat.nicklist_remove_group(buffer, group)
+def nicklist_remove_group(buffer: str, group: str) -> int: ...
# esempio
weechat.nicklist_remove_group(my_buffer, my_group)
@@ -14563,7 +14565,7 @@ Script (Python):
[source,python]
----
# prototipo
-weechat.nicklist_remove_nick(buffer, nick)
+def nicklist_remove_nick(buffer: str, nick: str) -> int: ...
# esempio
weechat.nicklist_remove_nick(my_buffer, my_nick)
@@ -14596,7 +14598,7 @@ Script (Python):
[source,python]
----
# prototipo
-weechat.nicklist_remove_all(buffer)
+def nicklist_remove_all(buffer: str) -> int: ...
# esempio
weechat.nicklist_remove_all(my_buffer)
@@ -14692,7 +14694,7 @@ Script (Python):
[source,python]
----
# prototipo
-value = weechat.nicklist_group_get_integer(buffer, group, property)
+def nicklist_group_get_integer(buffer: str, group: str, property: str) -> int: ...
# esempio
visible = weechat.nicklist_group_get_integer(buffer, group, "visible")
@@ -14737,7 +14739,7 @@ Script (Python):
[source,python]
----
# prototipo
-value = weechat.nicklist_group_get_string(buffer, group, property)
+def nicklist_group_get_string(buffer: str, group: str, property: str) -> str: ...
# esempio
color = weechat.nicklist_group_get_string(buffer, group, "color")
@@ -14781,7 +14783,7 @@ Script (Python):
[source,python]
----
# prototipo
-value = weechat.nicklist_group_get_pointer(buffer, group, property)
+def nicklist_group_get_pointer(buffer: str, group: str, property: str) -> str: ...
# esempio
parent = weechat.nicklist_group_get_pointer(buffer, group, "parent")
@@ -14846,7 +14848,7 @@ Script (Python):
[source,python]
----
# prototipo
-weechat.nicklist_group_set(buffer, group, property, value)
+def nicklist_group_set(buffer: str, group: str, property: str, value: str) -> int: ...
# esempi
@@ -14898,7 +14900,7 @@ Script (Python):
[source,python]
----
# prototipo
-value = weechat.nicklist_nick_get_integer(buffer, nick, property)
+def nicklist_nick_get_integer(buffer: str, nick: str, property: str) -> int: ...
# esempio
visible = weechat.nicklist_nick_get_integer(buffer, nick, "visible")
@@ -14945,7 +14947,7 @@ Script (Python):
[source,python]
----
# prototipo
-value = weechat.nicklist_nick_get_string(buffer, nick, property)
+def nicklist_nick_get_string(buffer: str, nick: str, property: str) -> str: ...
# esempio
color = weechat.nicklist_nick_get_string(buffer, nick, "color")
@@ -14989,7 +14991,7 @@ Script (Python):
[source,python]
----
# prototipo
-value = weechat.nicklist_nick_get_pointer(buffer, nick, property)
+def nicklist_nick_get_pointer(buffer: str, nick: str, property: str) -> str: ...
# esempio
group = weechat.nicklist_nick_get_pointer(buffer, nick, "group")
@@ -15064,7 +15066,7 @@ Script (Python):
[source,python]
----
# prototipo
-weechat.nicklist_nick_set(buffer, nick, property, value)
+def nicklist_nick_set(buffer: str, nick: str, property: str, value: str) -> int: ...
# esempi
@@ -15117,7 +15119,7 @@ Script (Python):
[source,python]
----
# prototipo
-bar_item = weechat.bar_item_search(name)
+def bar_item_search(name: str) -> str: ...
# esempio
bar_item = weechat.bar_item_search("myitem")
@@ -15207,7 +15209,7 @@ see example below (supported only in WeeChat ≥ 0.4.2).
[source,python]
----
# prototipo
-bar_item = weechat.bar_item_new(name, build_callback, build_callback_data)
+def bar_item_new(name: str, build_callback: str, build_callback_data: str) -> str: ...
# esempio (callback without "buffer" and "extra_info")
def my_build_callback(data, item, window):
@@ -15250,7 +15252,7 @@ Script (Python):
[source,python]
----
# prototipo
-weechat.bar_item_update(name)
+def bar_item_update(name: str) -> int: ...
# esempio
weechat.bar_item_update("myitem")
@@ -15283,7 +15285,7 @@ Script (Python):
[source,python]
----
# prototipo
-weechat.bar_item_remove(item)
+def bar_item_remove(item: str) -> int: ...
# esempio
weechat.bar_item_remove(myitem)
@@ -15320,7 +15322,7 @@ Script (Python):
[source,python]
----
# prototipo
-bar = weechat.bar_search(name)
+def bar_search(name: str) -> str: ...
# esempio
bar = weechat.bar_search("mybar")
@@ -15438,9 +15440,10 @@ Script (Python):
[source,python]
----
# prototipo
-bar = weechat.bar_new(name, hidden, priority, type, condition, position,
- filling_top_bottom, filling_left_right, size, size_max,
- color_fg, color_delim, color_bg, color_bg_inactive, separator, items)
+def bar_new(name: str, hidden: str, priority: str, type: str, condition: str, position: str,
+ filling_top_bottom: str, filling_left_right: str, size: str, size_max: str,
+ color_fg: str, color_delim: str, color_bg: str, color_bg_inactive: str,
+ separator: str, items: str) -> str: ...
# esempio
bar = weechat.bar_new("mybar", "off", "100", "window", "", "top", "horizontal", "vertical",
@@ -15490,7 +15493,7 @@ Script (Python):
[source,python]
----
# prototipo
-weechat.bar_set(bar, property, value)
+def bar_set(bar: str, property: str, value: str) -> int: ...
# esempio
weechat.bar_set(my_bar, "position", "bottom")
@@ -15523,7 +15526,7 @@ Script (Python):
[source,python]
----
# prototipo
-weechat.bar_update(name)
+def bar_update(name: str) -> int: ...
# esempio
weechat.bar_update("mybar")
@@ -15556,7 +15559,7 @@ Script (Python):
[source,python]
----
# prototipo
-weechat.bar_remove(bar)
+def bar_remove(bar: str) -> int: ...
# esempio
weechat.bar_remove(my_bar)
@@ -15608,7 +15611,7 @@ Script (Python):
[source,python]
----
# prototipo
-weechat.command(buffer, command)
+def command(buffer: str, command: str) -> int: ...
# esempio
rc = weechat.command(weechat.buffer_search("irc", "freenode.#weechat"), "/whois FlashCode")
@@ -15671,7 +15674,7 @@ Script (Python):
[source,python]
----
# prototipo
-weechat.command_options(buffer, command, options)
+def command_options(buffer: str, command: str, options: Dict[str, str]) -> int: ...
# example: allow any command except /exec
rc = weechat.command("", "/some_command arguments", {"commands": "*,!exec"})
@@ -15717,7 +15720,7 @@ Script (Python):
[source,python]
----
# prototipo
-completion = weechat.completion_new(buffer)
+def completion_new(buffer: str) -> str: ...
# esempio
completion = weechat.completion_new(weechat.buffer_search_main())
@@ -15767,7 +15770,7 @@ Script (Python):
[source,python]
----
# prototipo
-rc = weechat.completion_search(completion, data, position, direction)
+def completion_search(completion: str, data: str, position: int, direction: int) -> int: ...
# esempio
completion = weechat.completion_new(weechat.buffer_search_main())
@@ -15821,7 +15824,7 @@ Script (Python):
[source,python]
----
# prototipo
-value = weechat.completion_get_string(completion, property)
+def completion_get_string(completion: str, property: str) -> str: ...
# esempio
def my_completion_cb(data, completion_item, buffer, completion):
@@ -15866,7 +15869,7 @@ Script (Python):
[source,python]
----
# prototipo
-weechat.completion_list_add(completion, word, nick_completion, where)
+def completion_list_add(completion: str, word: str, nick_completion: int, where: str) -> int: ...
# esempio: consultare function hook_completion
----
@@ -15901,7 +15904,7 @@ Script (Python):
[source,python]
----
# prototipo
-weechat.completion_free(completion)
+def completion_free(completion: str) -> int: ...
# esempio
weechat.completion_free(completion)
@@ -16085,7 +16088,7 @@ Script (Python):
[source,python]
----
# prototipo
-value = weechat.info_get(info_name, arguments)
+def info_get(info_name: str, arguments: str) -> str: ...
# esempio
weechat.prnt("", "Current WeeChat version is: %s (compiled on %s)"
@@ -16173,7 +16176,7 @@ Script (Python):
[source,python]
----
# prototipo
-dict = weechat.info_get_hashtable(info_name, dict_in)
+def info_get_hashtable(info_name: str, dict_in: Dict[str, str]) -> Dict[str, str]: ...
# esempio
dict_in = {"message": ":nick!user@host PRIVMSG #weechat :message here"}
@@ -16226,7 +16229,7 @@ Script (Python):
[source,python]
----
# prototipo
-infolist = weechat.infolist_new()
+def infolist_new() -> str: ...
# esempio
infolist = weechat.infolist_new()
@@ -16263,7 +16266,7 @@ Script (Python):
[source,python]
----
# prototipo
-item = weechat.infolist_new_item(infolist)
+def infolist_new_item(infolist: str) -> str: ...
# esempio
item = weechat.infolist_new_item(infolist)
@@ -16307,7 +16310,7 @@ Script (Python):
[source,python]
----
# prototipo
-var = weechat.infolist_new_var_integer(item, name, value)
+def infolist_new_var_integer(item: str, name: str, value: int) -> str: ...
# esempio
var = weechat.infolist_new_var_integer(item, "my_integer", 123)
@@ -16351,7 +16354,7 @@ Script (Python):
[source,python]
----
# prototipo
-var = weechat.infolist_new_var_string(item, name, value)
+def infolist_new_var_string(item: str, name: str, value: str) -> str: ...
# esempio
var = weechat.infolist_new_var_string(item, "my_string", "value")
@@ -16395,7 +16398,7 @@ Script (Python):
[source,python]
----
# prototipo
-var = weechat.infolist_new_var_pointer(item, name, pointer)
+def infolist_new_var_pointer(item: str, name: str, pointer: str) -> str: ...
# esempio
var = weechat.infolist_new_var_pointer(item, "my_pointer", pointer)
@@ -16478,7 +16481,7 @@ Script (Python):
[source,python]
----
# prototipo
-var = weechat.infolist_new_var_time(item, name, time)
+def infolist_new_var_time(item: str, name: str, time: int) -> str: ...
# esempio
var = weechat.infolist_new_var_time(item, "my_time", int(time.time()))
@@ -16535,7 +16538,7 @@ Script (Python):
[source,python]
----
# prototipo
-infolist = weechat.infolist_get(infolist_name, pointer, arguments)
+def infolist_get(infolist_name: str, pointer: str, arguments: str) -> str: ...
# esempio
infolist = weechat.infolist_get("irc_server", "", "")
@@ -16582,7 +16585,7 @@ Script (Python):
[source,python]
----
# prototipo
-rc = weechat.infolist_next(infolist)
+def infolist_next(infolist: str) -> int: ...
# esempio
rc = weechat.infolist_next(infolist)
@@ -16633,7 +16636,7 @@ Script (Python):
[source,python]
----
# prototipo
-rc = weechat.infolist_prev(infolist)
+def infolist_prev(infolist: str) -> int: ...
# esempio
rc = weechat.infolist_prev(infolist)
@@ -16670,7 +16673,7 @@ Script (Python):
[source,python]
----
# prototipo
-weechat.infolist_reset_item_cursor(infolist)
+def infolist_reset_item_cursor(infolist: str) -> int: ...
# esempio
weechat.infolist_reset_item_cursor(infolist)
@@ -16719,7 +16722,7 @@ Script (Python):
[source,python]
----
# prototipo
-var = weechat.infolist_search_var(infolist, name)
+def infolist_search_var(infolist: str, name: str) -> str: ...
# esempio
if weechat.infolist_search_var(infolist, "name"):
@@ -16764,7 +16767,7 @@ Script (Python):
[source,python]
----
# prototipo
-fields = weechat.infolist_fields(infolist)
+def infolist_fields(infolist: str) -> str: ...
# esempio
fields = weechat.infolist_fields(infolist)
@@ -16806,7 +16809,7 @@ Script (Python):
[source,python]
----
# prototipo
-value = weechat.infolist_integer(infolist, var)
+def infolist_integer(infolist: str, var: str) -> int: ...
# esempio
weechat.prnt("", "integer = %d" % weechat.infolist_integer(infolist, "my_integer"))
@@ -16846,7 +16849,7 @@ Script (Python):
[source,python]
----
# prototipo
-value = weechat.infolist_string(infolist, var)
+def infolist_string(infolist: str, var: str) -> str: ...
# esempio
weechat.prnt("", "string = %s" % weechat.infolist_string(infolist, "my_string"))
@@ -16886,7 +16889,7 @@ Script (Python):
[source,python]
----
# prototipo
-value = weechat.infolist_pointer(infolist, var)
+def infolist_pointer(infolist: str, var: str) -> str: ...
# esempio
weechat.prnt("", "pointer = 0x%s" % weechat.infolist_pointer(infolist, "my_pointer"))
@@ -16963,7 +16966,7 @@ Script (Python):
[source,python]
----
# prototipo
-value = weechat.infolist_time(infolist, var)
+def infolist_time(infolist: str, var: str) -> int: ...
# esempio
weechat.prnt("", "time = %ld" % weechat.infolist_time(infolist, "my_time"))
@@ -16996,7 +16999,7 @@ Script (Python):
[source,python]
----
# prototipo
-weechat.infolist_free(infolist)
+def infolist_free(infolist: str) -> int: ...
# esempio
weechat.infolist_free(infolist)
@@ -17277,7 +17280,7 @@ Script (Python):
[source,python]
----
# prototipo
-hdata = weechat.hdata_get(hdata_name)
+def hdata_get(hdata_name: str) -> str: ...
# esempio
hdata = weechat.hdata_get("irc_server")
@@ -17317,7 +17320,7 @@ Script (Python):
[source,python]
----
# prototipo
-offset = weechat.hdata_get_var_offset(hdata, name)
+def hdata_get_var_offset(hdata: str, name: str) -> int: ...
# esempio
offset = weechat.hdata_get_var_offset(hdata, "name")
@@ -17423,7 +17426,7 @@ Script (Python):
[source,python]
----
# prototipo
-type = weechat.hdata_get_var_type_string(hdata, name)
+def hdata_get_var_type_string(hdata: str, name: str) -> str: ...
# esempio
weechat.prnt("", "type = %s" % weechat.hdata_get_var_type_string(hdata, "name"))
@@ -17466,7 +17469,7 @@ Script (Python):
[source,python]
----
# prototipo
-array_size = weechat.hdata_get_var_array_size(hdata, pointer, name)
+def hdata_get_var_array_size(hdata: str, pointer: str, name: str) -> int: ...
# esempio
array_size = weechat.hdata_get_var_array_size(hdata, pointer, "name")
@@ -17511,7 +17514,7 @@ Script (Python):
[source,python]
----
# prototipo
-array_size = weechat.hdata_get_var_array_size_string(hdata, pointer, name)
+def hdata_get_var_array_size_string(hdata: str, pointer: str, name: str) -> str: ...
# esempio
array_size = weechat.hdata_get_var_array_size_string(hdata, pointer, "name")
@@ -17551,7 +17554,7 @@ Script (Python):
[source,python]
----
# prototipo
-hdata_name = weechat.hdata_get_var_hdata(hdata, name)
+def hdata_get_var_hdata(hdata: str, name: str) -> str: ...
# esempio
weechat.prnt("", "hdata = %s" % weechat.hdata_get_var_hdata(hdata, "name"))
@@ -17663,7 +17666,7 @@ Script (Python):
[source,python]
----
# prototipo
-list = weechat.hdata_get_list(hdata, name)
+def hdata_get_list(hdata: str, name: str) -> str: ...
# esempio
hdata = weechat.hdata_get("buffer")
@@ -17721,7 +17724,7 @@ Script (Python):
[source,python]
----
# prototipo
-rc = weechat.hdata_check_pointer(hdata, list, pointer)
+def hdata_check_pointer(hdata: str, list: str, pointer: str) -> int: ...
# esempio
hdata = weechat.hdata_get("buffer")
@@ -17779,7 +17782,7 @@ Script (Python):
[source,python]
----
# prototipo
-pointer = weechat.hdata_move(hdata, pointer, count)
+def hdata_move(hdata: str, pointer: str, count: int) -> str: ...
# esempio
hdata = weechat.hdata_get("buffer")
@@ -17847,7 +17850,7 @@ Script (Python):
[source,python]
----
# prototipo
-pointer = weechat.hdata_search(hdata, pointer, search, count)
+def hdata_search(hdata: str, pointer: str, search: str, count: int) -> str: ...
# esempio
hdata = weechat.hdata_get("irc_server")
@@ -17897,7 +17900,7 @@ Script (Python):
[source,python]
----
# prototipo
-value = weechat.hdata_char(hdata, pointer, name)
+def hdata_char(hdata: str, pointer: str, name: str) -> int: ...
# esempio
weechat.prnt("", "letter = %c" % weechat.hdata_char(hdata, pointer, "letter"))
@@ -17943,7 +17946,7 @@ Script (Python):
[source,python]
----
# prototipo
-value = weechat.hdata_integer(hdata, pointer, name)
+def hdata_integer(hdata: str, pointer: str, name: str) -> int: ...
# esempio
hdata = weechat.hdata_get("buffer")
@@ -17989,7 +17992,7 @@ Script (Python):
[source,python]
----
# prototipo
-value = weechat.hdata_long(hdata, pointer, name)
+def hdata_long(hdata: str, pointer: str, name: str) -> int: ...
# esempio
weechat.prnt("", "longvar = %ld" % weechat.hdata_long(hdata, pointer, "longvar"))
@@ -18035,7 +18038,7 @@ Script (Python):
[source,python]
----
# prototipo
-value = weechat.hdata_string(hdata, pointer, name)
+def hdata_string(hdata: str, pointer: str, name: str) -> str: ...
# esempio
hdata = weechat.hdata_get("buffer")
@@ -18083,7 +18086,7 @@ Script (Python):
[source,python]
----
# prototipo
-value = weechat.hdata_pointer(hdata, pointer, name)
+def hdata_pointer(hdata: str, pointer: str, name: str) -> str: ...
# esempio
hdata = weechat.hdata_get("buffer")
@@ -18147,7 +18150,7 @@ Script (Python):
[source,python]
----
# prototipo
-value = weechat.hdata_time(hdata, pointer, name)
+def hdata_time(hdata: str, pointer: str, name: str) -> int: ...
# esempio
buf = weechat.buffer_search_main()
@@ -18204,7 +18207,7 @@ Script (Python):
[source,python]
----
# prototipo
-hashtable = weechat.hdata_hashtable(hdata, pointer, name)
+def hdata_hashtable(hdata: str, pointer: str, name: str) -> Dict[str, str]: ...
# esempio
hdata = weechat.hdata_get("buffer")
@@ -18260,7 +18263,7 @@ Script (Python):
[source,python]
----
# prototipo
-rc = weechat.hdata_compare(hdata, pointer1, pointer2, name, case_sensitive)
+def hdata_compare(hdata: str, pointer1: str, pointer2: str, name: str, case_sensitive: int) -> int: ...
# esempio
hdata = weechat.hdata_get("buffer")
@@ -18386,7 +18389,7 @@ Script (Python):
[source,python]
----
# prototipo
-count = weechat.hdata_update(hdata, pointer, hashtable)
+def hdata_update(hdata: str, pointer: str, hashtable: Dict[str, str]) -> int: ...
# example: subtract one hour on last message displayed in current buffer
own_lines = weechat.hdata_pointer(weechat.hdata_get("buffer"), weechat.current_buffer(), "own_lines")
@@ -18449,7 +18452,7 @@ Script (Python):
[source,python]
----
# prototipo
-value = weechat.hdata_get_string(hdata, property)
+def hdata_get_string(hdata: str, property: str) -> str: ...
# esempio
weechat.prnt("", "variables in hdata: %s" % weechat.hdata_get_string(hdata, "var_keys"))
@@ -18520,7 +18523,7 @@ Script (Python):
[source,python]
----
# prototipo
-upgrade_file = weechat.upgrade_new(filename, callback_read, callback_read_data)
+def upgrade_new(filename: str, callback_read: str, callback_read_data: str) -> str: ...
# esempio
upgrade_file = weechat.upgrade_new("my_file", "", "")
@@ -18568,7 +18571,7 @@ Script (Python):
[source,python]
----
# prototipo
-rc = weechat.upgrade_write_object(upgrade_file, object_id, infolist)
+def upgrade_write_object(upgrade_file: str, object_id: int, infolist: str) -> int: ...
# esempio
weechat.upgrade_write_object(upgrade_file, 1, infolist)
@@ -18608,7 +18611,7 @@ Script (Python):
[source,python]
----
# prototipo
-rc = weechat.upgrade_read(upgrade_file)
+def upgrade_read(upgrade_file: str) -> int: ...
# esempio
weechat.upgrade_read(upgrade_file)
@@ -18641,7 +18644,7 @@ Script (Python):
[source,python]
----
# prototipo
-weechat.upgrade_close(upgrade_file)
+def upgrade_close(upgrade_file: str) -> int: ...
# esempio
weechat.upgrade_close(upgrade_file)
diff --git a/doc/ja/weechat_plugin_api.ja.adoc b/doc/ja/weechat_plugin_api.ja.adoc
index 1fc7105f2..02318faf1 100644
--- a/doc/ja/weechat_plugin_api.ja.adoc
+++ b/doc/ja/weechat_plugin_api.ja.adoc
@@ -299,7 +299,7 @@ link:weechat_scripting.ja.html#register_function[WeeChat scripting guide].
[source,python]
----
# プロトタイプ
-weechat.register(name, author, version, license, description, shutdown_function, charset)
+def register(name: str, author: str, version: str, license: str, description: str, shutdown_function: str, charset: str) -> int: ...
----
[NOTE]
@@ -341,7 +341,7 @@ const char *name = weechat_plugin_get_name (plugin);
[source,python]
----
# プロトタイプ
-name = weechat.plugin_get_name(plugin)
+def plugin_get_name(plugin: str) -> str: ...
# 例
plugin = weechat.buffer_get_pointer(weechat.current_buffer(), "plugin")
@@ -383,7 +383,7 @@ weechat_charset_set ("iso-8859-1");
[source,python]
----
# プロトタイプ
-weechat.charset_set(charset)
+def charset_set(charset: str) -> int: ...
# 例
weechat.charset_set("iso-8859-1")
@@ -423,7 +423,7 @@ free (str);
[source,python]
----
# プロトタイプ
-str = weechat.iconv_to_internal(charset, string)
+def iconv_to_internal(charset: str, string: str) -> str: ...
# 例
str = weechat.iconv_to_internal("iso-8859-1", "iso string: é à")
@@ -463,7 +463,7 @@ free (str);
[source,python]
----
# プロトタイプ
-str = weechat.iconv_from_internal(charset, string)
+def iconv_from_internal(charset: str, string: str) -> str: ...
# 例
str = weechat.iconv_from_internal("iso-8859-1", "utf-8 string: é à")
@@ -500,7 +500,7 @@ char *str = weechat_gettext ("hello");
[source,python]
----
# プロトタイプ
-str = weechat.gettext(string)
+def gettext(string: str) -> str: ...
# 例
str = weechat.gettext("hello")
@@ -543,7 +543,7 @@ char *str = weechat_ngettext ("file", "files", num_files);
[source,python]
----
# プロトタイプ
-str = weechat.ngettext(string, plural, count)
+def ngettext(string: str, plural: str, count) -> str: ...
# 例
num_files = 2
@@ -894,7 +894,7 @@ int length_on_screen = weechat_strlen_screen ("é"); /* == 1 */
[source,python]
----
# プロトタイプ
-length = weechat.strlen_screen(string)
+def strlen_screen(string: str) -> int: ...
# 例
length = weechat.strlen_screen("é") # 1
@@ -945,7 +945,7 @@ int match5 = weechat_string_match ("abcdef", "*b*d*", 0); /* == 1 */
[source,python]
----
# プロトタイプ
-match = weechat.string_match(string, mask, case_sensitive)
+def string_match(string: str, mask: str, case_sensitive: int) -> int: ...
# 例
match1 = weechat.string_match("abcdef", "abc*", 0) # == 1
@@ -1000,7 +1000,7 @@ int match3 = weechat_string_match_list ("def", masks, 0); /* == 1 */
[source,python]
----
# プロトタイプ
-match = weechat.string_match_list(string, masks, case_sensitive)
+def string_match_list(string: str, masks: str, case_sensitive: int) -> int: ...
# 例
match1 = weechat.string_match("abc", "*,!abc*", 0) # == 0
@@ -1104,7 +1104,7 @@ free (str);
[source,python]
----
# プロトタイプ
-path = weechat.string_eval_path_home(path, pointers, extra_vars, options)
+def string_eval_path_home(path: str, pointers: Dict[str, str], extra_vars: Dict[str, str], options: Dict[str, str]) -> str: ...
# 例
path = weechat.string_eval_path_home("${weechat_config_dir}/test.conf", {}, {}, {})
@@ -1266,7 +1266,7 @@ free (str_regex);
[source,python]
----
# プロトタイプ
-regex = weechat.string_mask_to_regex(mask)
+def string_mask_to_regex(mask: str) -> str: ...
# 例
regex = weechat.string_mask_to_regex("test*mask") # "test.*mask"
@@ -1412,7 +1412,7 @@ int hl = weechat_string_has_highlight ("my test string", "test,word2"); /* == 1
[source,python]
----
# プロトタイプ
-highlight = weechat.string_has_highlight(string, highlight_words)
+def string_has_highlight(string: str, highlight_words: str) -> int: ...
# 例
highlight = weechat.string_has_highlight("my test string", "test,word2") # 1
@@ -1455,7 +1455,7 @@ int hl = weechat_string_has_highlight_regex ("my test string", "test|word2"); /
[source,python]
----
# プロトタイプ
-highlight = weechat.string_has_highlight_regex(string, regex)
+def string_has_highlight_regex(string: str, regex: str) -> int: ...
# 例
highlight = weechat.string_has_highlight_regex("my test string", "test|word2") # 1
@@ -1915,7 +1915,7 @@ free (str);
[source,python]
----
# プロトタイプ
-str = weechat.string_format_size(size)
+def string_format_size(size: int) -> str: ...
# 例
str = weechat.string_format_size(15200) # == "15.2 KB"
@@ -1964,7 +1964,7 @@ size = weechat_string_color_code_size (weechat_color ("yellow,red")); /* size =
[source,python]
----
# プロトタイプ
-size = weechat.string_color_code_size(string)
+def string_color_code_size(string: str) -> int: ...
# 例
size = weechat.string_color_code_size("test") # size == 0
@@ -2015,7 +2015,7 @@ free (str);
[source,python]
----
# プロトタイプ
-str = weechat.string_remove_color(string, replacement)
+def string_remove_color(string: str, replacement: str) -> str: ...
# 例
str = weechat.string_remove_color(my_string, "?")
@@ -2180,7 +2180,7 @@ int command_char2 = weechat_string_is_command_char ("test"); /* == 0 */
[source,python]
----
# プロトタイプ
-is_cmdchar = weechat.string_is_command_char(string)
+def string_is_command_char(string: str) -> int: ...
# 例
command_char1 = weechat.string_is_command_char("/test") # == 1
@@ -2223,7 +2223,7 @@ const char *str3 = weechat_string_input_for_buffer ("//test"); /* "/test" */
[source,python]
----
# プロトタイプ
-str = weechat.string_input_for_buffer(string)
+def string_input_for_buffer(string: str) -> str: ...
# 例
str1 = weechat.string_input_for_buffer("test") # "test"
@@ -2333,7 +2333,7 @@ char *str5 = weechat_string_eval_expression ("password=abc password=def", NULL,
[source,python]
----
# プロトタイプ
-str = weechat.string_eval_expression(expr, pointers, extra_vars, options)
+def string_eval_expression(expr: str, pointers: Dict[str, str], extra_vars: Dict[str, str], options: Dict[str, str]) -> str: ...
# 例
@@ -3711,7 +3711,7 @@ if (!weechat_mkdir_home ("${weechat_cache_dir}/temp", 0755))
[source,python]
----
# プロトタイプ
-weechat.mkdir_home(directory, mode)
+def mkdir_home(directory: str, mode: int) -> int: ...
# 例
weechat.mkdir_home("${weechat_cache_dir}/temp", 0755)
@@ -3752,7 +3752,7 @@ if (!weechat_mkdir ("/tmp/mydir", 0755))
[source,python]
----
# プロトタイプ
-weechat.mkdir(directory, mode)
+def mkdir(directory: str, mode: int) -> int: ...
# 例
weechat.mkdir("/tmp/mydir", 0755)
@@ -3793,7 +3793,7 @@ if (!weechat_mkdir_parents ("/tmp/my/dir", 0755))
[source,python]
----
# プロトタイプ
-weechat.mkdir_parents(directory, mode)
+def mkdir_parents(directory: str, mode: int) -> int: ...
# 例
weechat.mkdir_parents("/tmp/my/dir", 0755)
@@ -4079,7 +4079,7 @@ struct t_weelist *list = weechat_list_new ();
[source,python]
----
# プロトタイプ
-list = weechat.list_new()
+def list_new() -> str: ...
# 例
list = weechat.list_new()
@@ -4126,7 +4126,7 @@ struct t_weelist_item *my_item =
[source,python]
----
# プロトタイプ
-item = weechat.list_add(list, data, where, user_data)
+def list_add(list: str, data: str, where: str, user_data: str) -> str: ...
# 例
item = weechat.list_add(list, "my data", weechat.WEECHAT_LIST_POS_SORT, "")
@@ -4165,7 +4165,7 @@ struct t_weelist_item *item = weechat_list_search (list, "my data");
[source,python]
----
# プロトタイプ
-item = weechat.list_search(list, data)
+def list_search(list: str, data: str) -> str: ...
# 例
item = weechat.list_search(list, "my data")
@@ -4206,7 +4206,7 @@ int pos_item = weechat_list_search_pos (list, "my data");
[source,python]
----
# プロトタイプ
-pos_item = weechat.list_search_pos(list, data)
+def list_search_pos(list: str, data: str) -> int: ...
# 例
pos_item = weechat.list_search_pos(list, "my data")
@@ -4245,7 +4245,7 @@ struct t_weelist_item *item = weechat_list_casesearch (list, "my data");
[source,python]
----
# プロトタイプ
-item = weechat.list_casesearch(list, data)
+def list_casesearch(list: str, data: str) -> str: ...
# 例
item = weechat.list_casesearch(list, "my data")
@@ -4286,7 +4286,7 @@ int pos_item = weechat_list_casesearch_pos (list, "my data");
[source,python]
----
# プロトタイプ
-pos_item = weechat.list_casesearch_pos(list, data)
+def list_casesearch_pos(list: str, data: str) -> int: ...
# 例
pos_item = weechat.list_casesearch_pos(list, "my data")
@@ -4325,7 +4325,7 @@ struct t_weelist_item *item = weechat_list_get (list, 0); /* first item */
[source,python]
----
# プロトタイプ
-item = weechat.list_get(list, position)
+def list_get(list: str, position: int) -> str: ...
# 例
item = weechat.list_get(list, 0)
@@ -4359,7 +4359,7 @@ weechat_list_set (item, "new data");
[source,python]
----
# プロトタイプ
-weechat.list_set(item, value)
+def list_set(item: str, value: str) -> int: ...
# 例
weechat.list_set(item, "new data")
@@ -4396,7 +4396,7 @@ struct t_weelist_item *next_item = weechat_list_next (item);
[source,python]
----
# プロトタイプ
-item = weechat.list_next(item)
+def list_next(item: str) -> str: ...
# 例
item = weechat.list_next(item)
@@ -4433,7 +4433,7 @@ struct t_weelist_item *prev_item = weechat_list_prev (item);
[source,python]
----
# プロトタイプ
-item = weechat.list_prev(item)
+def list_prev(item: str) -> str: ...
# 例
item = weechat.list_prev(item)
@@ -4470,7 +4470,7 @@ weechat_printf (NULL, "value of item: %s", weechat_list_string (item));
[source,python]
----
# プロトタイプ
-value = weechat.list_string(item)
+def list_string(item: str) -> str: ...
# 例
weechat.prnt("", "value of item: %s" % weechat.list_string(item))
@@ -4541,7 +4541,7 @@ weechat_printf (NULL, "size of list: %d", weechat_list_size (list));
[source,python]
----
# プロトタイプ
-size = weechat.list_size(list)
+def list_size(list: str) -> int: ...
# 例
weechat.prnt("", "size of list: %d" % weechat.list_size(list))
@@ -4576,7 +4576,7 @@ weechat_list_remove (list, item);
[source,python]
----
# プロトタイプ
-weechat.list_remove(list, item)
+def list_remove(list: str, item: str) -> int: ...
# 例
weechat.list_remove(list, item)
@@ -4609,7 +4609,7 @@ weechat_list_remove_all (list);
[source,python]
----
# プロトタイプ
-weechat.list_remove_all(list)
+def list_remove_all(list: str) -> int: ...
# 例
weechat.list_remove_all(list)
@@ -4642,7 +4642,7 @@ weechat_list_free (list);
[source,python]
----
# プロトタイプ
-weechat.list_free(list)
+def list_free(list: str) -> int: ...
# 例
weechat.list_free(list)
@@ -5678,7 +5678,7 @@ struct t_config_file *config_file = weechat_config_new ("test",
[source,python]
----
# プロトタイプ
-config_file = weechat.config_new(name, callback_reload, callback_reload_data)
+def config_new(name: str, callback_reload: str, callback_reload_data: str) -> str: ...
# 例
def my_config_reload_cb(data, config_file):
@@ -5935,12 +5935,12 @@ struct t_config_section *new_section2 =
[source,python]
----
# プロトタイプ
-section = weechat.config_new_section(config_file, name,
- user_can_add_options, user_can_delete_options,
- callback_read, callback_read_data,
- callback_write, callback_write_data,
- callback_create_option, callback_create_option_data,
- callback_delete_option, callback_delete_option_data)
+def config_new_section(config_file: str, name: str,
+ user_can_add_options: int, user_can_delete_options: int,
+ callback_read: str, callback_read_data: str,
+ callback_write: str, callback_write_data: str,
+ callback_create_option: str, callback_create_option_data: str,
+ callback_delete_option: str, callback_delete_option_data: str) -> str: ...
# 例
def my_section_read_cb(data, config_file, section, option_name, value):
@@ -6009,7 +6009,7 @@ struct t_config_section *section = weechat_config_search_section (config_file,
[source,python]
----
# プロトタイプ
-section = weechat.config_search_section(config_file, section_name)
+def config_search_section(config_file: str, section_name: str) -> str: ...
# 例
section = weechat.config_search_section(config_file, "section")
@@ -6191,11 +6191,12 @@ struct t_config_option *option5 =
[source,python]
----
# プロトタイプ
-option = weechat.config_new_option(config_file, section, name, type, description,
- string_values, min, max, default_value, value, null_value_allowed,
- callback_check_value, callback_check_value_data,
- callback_change, callback_change_data,
- callback_delete, callback_delete_data)
+def config_new_option(config_file: str, section: str, name: str, type: str, description: str,
+ string_values: str, min: int, max: int,
+ default_value: str, value: str, null_value_allowed: int,
+ callback_check_value: str, callback_check_value_data: str,
+ callback_change: str, callback_change_data: str,
+ callback_delete: str, callback_delete_data: str) -> str: ...
# 例
def option4_check_value_cb(data, option, value):
@@ -6290,7 +6291,7 @@ struct t_config_option *option =
[source,python]
----
# プロトタイプ
-option = weechat.config_search_option(config_file, section, option_name)
+def config_search_option(config_file: str, section: str, option_name: str) -> str: ...
# 例
option = weechat.config_search_option(config_file, section, "option")
@@ -6439,7 +6440,7 @@ else
[source,python]
----
# プロトタイプ
-value = weechat.config_string_to_boolean(text)
+def config_string_to_boolean(text: str) -> int: ...
# 例
if weechat.config_string_to_boolean(text):
@@ -6493,7 +6494,7 @@ switch (weechat_config_option_reset (option, 1))
[source,python]
----
# プロトタイプ
-rc = weechat.config_option_reset(option, run_callback)
+def config_option_reset(option: str, run_callback: int) -> int: ...
# 例
rc = weechat.config_option_reset(option, 1)
@@ -6559,7 +6560,7 @@ switch (weechat_config_option_set (option, "new_value", 1))
[source,python]
----
# プロトタイプ
-rc = weechat.config_option_set(option, value, run_callback)
+def config_option_set(option: str, value: str, run_callback: int) -> int: ...
# 例
rc = weechat.config_option_set(option, "new_value", 1)
@@ -6622,7 +6623,7 @@ switch (weechat_config_option_set_null (option, 1))
[source,python]
----
# プロトタイプ
-rc = weechat.config_option_set_null(option, run_callback)
+def config_option_set_null(option: str, run_callback: int) -> int: ...
# 例
rc = weechat.config_option_set_null(option, 1)
@@ -6682,7 +6683,7 @@ switch (weechat_config_option_unset (option))
[source,python]
----
# プロトタイプ
-rc = weechat.config_option_unset(option)
+def config_option_unset(option: str) -> int: ...
# 例
rc = weechat.config_option_unset(option)
@@ -6725,7 +6726,7 @@ weechat_config_option_rename (option, "new_name");
[source,python]
----
# プロトタイプ
-weechat.config_option_rename(option, new_name)
+def config_option_rename(option: str, new_name: str) -> int: ...
# 例
weechat.config_option_rename(option, "new_name")
@@ -6857,7 +6858,7 @@ else
[source,python]
----
# プロトタイプ
-is_null = weechat.config_option_is_null(option)
+def config_option_is_null(option: str) -> int: ...
# 例
if weechat.config_option_is_null(option):
@@ -6903,7 +6904,7 @@ else
[source,python]
----
# プロトタイプ
-is_null = weechat.config_option_default_is_null(option)
+def config_option_default_is_null(option: str) -> int: ...
# 例
if weechat.config_option_default_is_null(option):
@@ -6952,7 +6953,7 @@ else
[source,python]
----
# プロトタイプ
-value = weechat.config_boolean(option)
+def config_boolean(option: str) -> int: ...
# 例
option = weechat.config_get("plugin.section.option")
@@ -7002,7 +7003,7 @@ else
[source,python]
----
# プロトタイプ
-value = weechat.config_boolean_default(option)
+def config_boolean_default(option: str) -> int: ...
# 例
option = weechat.config_get("plugin.section.option")
@@ -7045,7 +7046,7 @@ int value = weechat_config_integer (option);
[source,python]
----
# プロトタイプ
-value = weechat.config_integer(option)
+def config_integer(option: str) -> int: ...
# 例
option = weechat.config_get("plugin.section.option")
@@ -7087,7 +7088,7 @@ int value = weechat_config_integer_default (option);
[source,python]
----
# プロトタイプ
-value = weechat.config_integer_default(option)
+def config_integer_default(option: str) -> int: ...
# 例
option = weechat.config_get("plugin.section.option")
@@ -7130,7 +7131,7 @@ const char *value = weechat_config_string (option);
[source,python]
----
# プロトタイプ
-value = weechat.config_string(option)
+def config_string(option: str) -> str: ...
# 例
option = weechat.config_get("plugin.section.option")
@@ -7173,7 +7174,7 @@ const char *value = weechat_config_string_default (option);
[source,python]
----
# プロトタイプ
-value = weechat.config_string_default(option)
+def config_string_default(option: str) -> str: ...
# 例
option = weechat.config_get("plugin.section.option")
@@ -7215,7 +7216,7 @@ const char *color = weechat_config_color (option);
[source,python]
----
# プロトタイプ
-value = weechat.config_color(option)
+def config_color(option: str) -> str: ...
# 例
option = weechat.config_get("plugin.section.option")
@@ -7257,7 +7258,7 @@ const char *color = weechat_config_color_default (option);
[source,python]
----
# プロトタイプ
-value = weechat.config_color_default(option)
+def config_color_default(option: str) -> str: ...
# 例
option = weechat.config_get("plugin.section.option")
@@ -7304,7 +7305,7 @@ my_section_write_cb (const void *pointer, void *data,
[source,python]
----
# プロトタイプ
-weechat.config_write_option(config_file, option)
+def config_write_option(config_file: str, option: str) -> int: ...
# 例
def my_section_write_cb(data, config_file, section_name):
@@ -7357,7 +7358,7 @@ my_section_write_cb (const void *pointer, void *data,
[source,python]
----
# プロトタイプ
-weechat.config_write_line(config_file, option_name, value)
+def config_write_line(config_file: str, option_name: str, value: str) -> int: ...
# 例
def my_section_write_cb(data, config_file, section_name):
@@ -7410,7 +7411,7 @@ switch (weechat_config_write (config_file))
[source,python]
----
# プロトタイプ
-rc = weechat.config_write(config_file)
+def config_write(config_file: str) -> int: ...
# 例
rc = weechat.config_write(config_file)
@@ -7466,7 +7467,7 @@ switch (weechat_config_read (config_file))
[source,python]
----
# プロトタイプ
-rc = weechat.config_read(config_file)
+def config_read(config_file: str) -> int: ...
# 例
rc = weechat.config_read(config_file)
@@ -7522,7 +7523,7 @@ switch (weechat_config_reload (config_file))
[source,python]
----
# プロトタイプ
-rc = weechat.config_reload(config_file)
+def config_reload(config_file: str) -> int: ...
# 例
rc = weechat.config_reload(config_file)
@@ -7561,7 +7562,7 @@ weechat_config_option_free (option);
[source,python]
----
# プロトタイプ
-weechat.config_option_free(option)
+def config_option_free(option: str) -> int: ...
# 例
weechat.config_option_free(option)
@@ -7594,7 +7595,7 @@ weechat_config_section_free_options (section);
[source,python]
----
# プロトタイプ
-weechat.config_section_free_options(section)
+def config_section_free_options(section: str) -> int: ...
# 例
weechat.config_section_free_options(section)
@@ -7627,7 +7628,7 @@ weechat_config_section_free (section);
[source,python]
----
# プロトタイプ
-weechat.config_section_free(section)
+def config_section_free(section: str) -> int: ...
# 例
weechat.config_section_free(section)
@@ -7660,7 +7661,7 @@ weechat_config_free (config_file);
[source,python]
----
# プロトタイプ
-weechat.config_free(config_file)
+def config_free(config_file: str) -> int: ...
# 例
weechat.config_free(config_file)
@@ -7697,7 +7698,7 @@ struct t_config_option *option = weechat_config_get ("weechat.look.item_time_for
[source,python]
----
# プロトタイプ
-option = weechat.config_get(option_name)
+def config_get(option_name: str) -> str: ...
# 例
option = weechat.config_get("weechat.look.item_time_format")
@@ -7737,7 +7738,7 @@ char *value = weechat_config_get_plugin ("option");
[source,python]
----
# プロトタイプ
-value = weechat.config_get_plugin(option_name)
+def config_get_plugin(option_name: str) -> str: ...
# 例
value = weechat.config_get_plugin("option")
@@ -7782,7 +7783,7 @@ else
[source,python]
----
# プロトタイプ
-value = weechat.config_is_set_plugin(option_name)
+def config_is_set_plugin(option_name: str) -> int: ...
# 例
if weechat.config_is_set_plugin("option"):
@@ -7843,7 +7844,7 @@ switch (weechat_config_set_plugin ("option", "test_value"))
[source,python]
----
# プロトタイプ
-rc = weechat.config_set_plugin(option_name, value)
+def config_set_plugin(option_name: str, value: str) -> int: ...
# 例
rc = weechat.config_set_plugin("option", "test_value")
@@ -7893,7 +7894,7 @@ weechat_config_set_desc_plugin ("option", "description of option");
[source,python]
----
# プロトタイプ
-weechat.config_set_desc_plugin(option_name, description)
+def config_set_desc_plugin(option_name: str, description: str) -> int: ...
# 例
version = weechat.info_get("version_number", "") or 0
@@ -7950,7 +7951,7 @@ switch (weechat_config_unset_plugin ("option"))
[source,python]
----
# プロトタイプ
-rc = weechat.config_unset_plugin(option_name)
+def config_unset_plugin(option_name: str) -> int: ...
# 例
rc = weechat.config_unset_plugin("option")
@@ -8028,7 +8029,7 @@ if (keys)
[source,python]
----
# プロトタイプ
-num_keys = weechat.key_bind(context, keys)
+def key_bind(context: str, keys: Dict[str, str]) -> int: ...
# 例
keys = {"@chat(python.test):button1": "hsignal:test_mouse",
@@ -8081,7 +8082,7 @@ weechat_key_unbind ("mouse", "area:chat(plugin.buffer)");
[source,python]
----
# プロトタイプ
-num_keys = weechat.key_unbind(context, key)
+def key_unbind(context: str, key: str) -> int: ...
# 例
@@ -8144,7 +8145,7 @@ weechat_printf (NULL, "%sThis is an error...", weechat_prefix ("error"));
[source,python]
----
# プロトタイプ
-value = weechat.prefix(prefix)
+def prefix(prefix: str) -> str: ...
# 例
weechat.prnt("", "%sThis is an error..." % weechat.prefix("error"))
@@ -8226,7 +8227,7 @@ weechat_printf (NULL, "Color: %sblue %sdefault color %syellow on red",
[source,python]
----
# プロトタイプ
-value = weechat.color(color_name)
+def color(color_name: str) -> str: ...
# 例
weechat.prnt("", "Color: %sblue %sdefault color %syellow on red"
@@ -8286,7 +8287,7 @@ weechat_printf (buffer, "\t\t"); /* empty line (without time) */
[source,python]
----
# プロトタイプ
-weechat.prnt(buffer, message)
+def prnt(buffer: str, message: str) -> int: ...
# 例
weechat.prnt("", "Hello on WeeChat buffer")
@@ -8335,7 +8336,7 @@ weechat_printf_date_tags (NULL, time (NULL) - 120, "notify_message",
[source,python]
----
# プロトタイプ
-weechat.prnt_date_tags(buffer, date, tags, message)
+def prnt_date_tags(buffer: str, date: str, tags: str, message: str) -> int: ...
# 例
time = int(time.time())
@@ -8379,7 +8380,7 @@ weechat_printf_y (buffer, 2, "My message on third line");
[source,python]
----
# プロトタイプ
-weechat.prnt_y(buffer, y, message)
+def prnt_y(buffer: str, y: int, message: str) -> int: ...
# 例
weechat.prnt_y("", 2, "My message on third line")
@@ -8415,7 +8416,7 @@ weechat_log_printf ("My message in log file");
[source,python]
----
# プロトタイプ
-weechat.log_print(message)
+def log_print(message: str) -> int: ...
# 例
weechat.log_print("My message in log file")
@@ -8586,8 +8587,8 @@ struct t_hook *my_command_hook =
[source,python]
----
# プロトタイプ
-hook = weechat.hook_command(command, description, args, args_description,
- completion, callback, callback_data)
+def hook_command(command: str, description: str, args: str, args_description: str,
+ completion: str, callback: str, callback_data: str) -> str: ...
# 例
def my_command_cb(data, buffer, args):
@@ -8694,7 +8695,7 @@ struct t_hook *my_completion_hook = weechat_hook_completion ("plugin_item",
[source,python]
----
# プロトタイプ
-hook = weechat.hook_completion(completion_item, description, callback, callback_data)
+def hook_completion(completion_item: str, description: str, callback: str, callback_data: str) -> str: ...
# 例
def my_completion_cb(data, completion_item, buffer, completion):
@@ -8783,7 +8784,7 @@ struct t_hook *my_command_run_hook =
[source,python]
----
# プロトタイプ
-hook = weechat.hook_command_run(command, callback, callback_data)
+def hook_command_run(command: str, callback: str, callback_data: str) -> str: ...
# 例
def my_command_run_cb(data, buffer, command):
@@ -8857,7 +8858,7 @@ struct t_hook *my_timer_hook =
[source,python]
----
# プロトタイプ
-hook = weechat.hook_timer(interval, align_second, max_calls, callback, callback_data)
+def hook_timer(interval: int, align_second: int, max_calls: int, callback: str, callback_data: str) -> str: ...
# 例
def my_timer_cb(data, remaining_calls):
@@ -8941,7 +8942,7 @@ struct t_hook *my_fd_hook = weechat_hook_fd (sock, 1, 0, 0, &my_fd_cb, NULL, NUL
[source,python]
----
# プロトタイプ
-hook = weechat.hook_fd(fd, flag_read, flag_write, flag_exception, callback, callback_data)
+def hook_fd(fd: int, flag_read: int, flag_write: int, flag_exception: int, callback: str, callback_data: str) -> str: ...
# 例
def my_fd_cb(data, fd):
@@ -9140,7 +9141,7 @@ struct t_hook *my_process_hook = weechat_hook_process ("func:get_status", 5000,
[source,python]
----
# プロトタイプ
-hook = weechat.hook_process(command, timeout, callback, callback_data)
+def hook_process(command: str, timeout: int, callback: str, callback_data: str) -> str: ...
# 外部コマンドを実行する例
def my_process_cb(data, command, return_code, out, err):
@@ -9375,7 +9376,7 @@ if (options_cmd2)
[source,python]
----
# プロトタイプ
-hook = weechat.hook_process_hashtable(command, options, timeout, callback, callback_data)
+def hook_process_hashtable(command: str, options: Dict[str, str], timeout: int, callback: str, callback_data: str) -> str: ...
# 例
def my_process_cb(data, command, return_code, out, err):
@@ -9572,8 +9573,8 @@ struct t_hook *my_connect_hook = weechat_hook_connect (NULL,
[source,python]
----
# プロトタイプ
-hook = weechat.hook_connect(proxy, address, port, ipv6, retry, local_hostname,
- callback, callback_data)
+def hook_connect(proxy: str, address: str, port: int, ipv6: int, retry: int, local_hostname: str,
+ callback: str, callback_data: str) -> str: ...
# 例
def my_connect_cb(data, status, gnutls_rc, sock, error, ip_address):
@@ -9868,7 +9869,7 @@ struct t_hook *my_line_hook =
[source,python]
----
# プロトタイプ
-hook = weechat.hook_line(buffer_type, buffer_name, tags, callback, callback_data)
+def hook_line(buffer_type: str, buffer_name: str, tags: str, callback: str, callback_data: str) -> str: ...
# 例
def my_line_cb(data, line):
@@ -9977,7 +9978,7 @@ struct t_hook *my_print_hook =
[source,python]
----
# プロトタイプ
-hook = weechat.hook_print(buffer, tags, message, strip_colors, callback, callback_data)
+def hook_print(buffer: str, tags: str, message: str, strip_colors: int, callback: str, callback_data: str) -> str: ...
# 例
def my_print_cb(data, buffer, date, tags, displayed, highlight, prefix, message):
@@ -10892,7 +10893,7 @@ struct t_hook *my_signal_hook = weechat_hook_signal ("quit",
[source,python]
----
# プロトタイプ
-hook = weechat.hook_signal(signal, callback, callback_data)
+def hook_signal(signal: str, callback: str, callback_data: str) -> str: ...
# 例
def my_signal_cb(data, signal, signal_data):
@@ -10944,7 +10945,7 @@ int rc = weechat_hook_signal_send ("my_signal", WEECHAT_HOOK_SIGNAL_STRING, my_s
[source,python]
----
# プロトタイプ
-rc = weechat.hook_signal_send(signal, type_data, signal_data)
+def hook_signal_send(signal: str, type_data: str, signal_data: str) -> int: ...
# 例
rc = weechat.hook_signal_send("my_signal", weechat.WEECHAT_HOOK_SIGNAL_STRING, my_string)
@@ -11233,7 +11234,7 @@ struct t_hook *my_hsignal_hook = weechat_hook_hsignal ("test",
[source,python]
----
# プロトタイプ
-hook = weechat.hook_hsignal(signal, callback, callback_data)
+def hook_hsignal(signal: str, callback: str, callback_data: str) -> str: ...
# 例
def my_hsignal_cb(data, signal, hashtable):
@@ -11292,7 +11293,7 @@ if (hashtable)
[source,python]
----
# プロトタイプ
-rc = weechat.hook_hsignal_send(signal, hashtable)
+def hook_hsignal_send(signal: str, hashtable: Dict[str, str]) -> int: ...
# 例
rc = weechat.hook_hsignal_send("my_hsignal", {"key": "value"})
@@ -11538,7 +11539,7 @@ struct t_hook *my_config_hook = weechat_hook_config ("weechat.look.item_time_for
[source,python]
----
# プロトタイプ
-hook = weechat.hook_config(option, callback, callback_data)
+def hook_config(option: str, callback: str, callback_data: str) -> str: ...
# 例
def my_config_cb(data, option, value):
@@ -11712,7 +11713,7 @@ struct t_hook *my_modifier_hook = weechat_hook_modifier ("weechat_print",
[source,python]
----
# プロトタイプ
-hook = weechat.hook_modifier(modifier, callback, callback_data)
+def hook_modifier(modifier: str, callback: str, callback_data: str) -> str: ...
# 例
def my_modifier_cb(data, modifier, modifier_data, string):
@@ -11823,7 +11824,7 @@ char *new_string = weechat_hook_modifier_exec ("my_modifier",
[source,python]
----
# プロトタイプ
-weechat.hook_modifier_exec(modifier, modifier_data, string)
+def hook_modifier_exec(modifier: str, modifier_data: str, string: str) -> str: ...
# 例
weechat.hook_modifier_exec("my_modifier", my_data, my_string)
@@ -11899,7 +11900,8 @@ struct t_hook *my_info_hook = weechat_hook_info ("my_info",
[source,python]
----
# プロトタイプ
-hook = weechat.hook_info(info_name, description, args_description, callback, callback_data)
+def hook_info(info_name: str, description: str, args_description: str,
+ callback: str, callback_data: str) -> str: ...
# 例
def my_info_cb(data, info_name, arguments):
@@ -11979,8 +11981,8 @@ struct t_hook *my_info_hook = weechat_hook_info_hashtable ("my_info_hashtable",
[source,python]
----
# プロトタイプ
-hook = weechat.hook_info_hashtable(info_name, description, args_description,
- output_description, callback, callback_data)
+def hook_info_hashtable(info_name: str, description: str, args_description: str,
+ output_description: str, callback: str, callback_data: str) -> str: ...
# 例
def my_info_hashtable_cb(data, info_name, hashtable):
@@ -12069,8 +12071,8 @@ struct t_hook *my_infolist = weechat_hook_infolist ("my_infolist",
[source,python]
----
# プロトタイプ
-hook = weechat.hook_infolist(infolist_name, description, pointer_description,
- args_description, callback, callback_data)
+def hook_infolist(infolist_name: str, description: str, pointer_description: str,
+ args_description: str, callback: str, callback_data: str) -> str: ...
# 例
def my_infolist_cb(data, infolist_name, pointer, arguments):
@@ -12348,7 +12350,7 @@ struct t_hook *my_focus = weechat_hook_focus ("buffer_nicklist",
[source,python]
----
# プロトタイプ
-hook = weechat.hook_focus(area, callback, callback_data)
+def hook_focus(area: str, callback: str, callback_data: str) -> str: ...
# 例
def my_focus_nicklist_cb(data, info):
@@ -12423,7 +12425,7 @@ weechat_hook_set (my_command_hook, "subplugin", "test");
[source,python]
----
# プロトタイプ
-weechat.hook_set(hook, property, value)
+def hook_set(hook: str, property: str, value: str) -> int: ...
# 例
def my_process_cb(data, command, return_code, out, err):
@@ -12465,7 +12467,7 @@ weechat_unhook (my_hook);
[source,python]
----
# プロトタイプ
-weechat.unhook(hook)
+def unhook(hook: str) -> int: ...
# 例
weechat.unhook(my_hook)
@@ -12501,7 +12503,7 @@ weechat_unhook_all (NULL);
[source,python]
----
# プロトタイプ
-weechat.unhook_all()
+def unhook_all() -> int: ...
# 例
weechat.unhook_all()
@@ -12600,8 +12602,8 @@ struct t_gui_buffer *my_buffer = weechat_buffer_new ("my_buffer",
[source,python]
----
# プロトタイプ
-buffer = weechat.buffer_new(name, input_callback, input_callback_data,
- close_callback, close_callback_data)
+def buffer_new(name: str, input_callback: str, input_callback_data: str,
+ close_callback: str, close_callback_data: str) -> str: ...
# 例
def my_input_cb(data, buffer, input_data):
@@ -12642,7 +12644,7 @@ weechat_printf (weechat_current_buffer (), "Text on current buffer");
[source,python]
----
# プロトタイプ
-buffer = weechat.current_buffer()
+def current_buffer() -> str: ...
# 例
weechat.prnt(weechat.current_buffer(), "Text on current buffer")
@@ -12689,7 +12691,7 @@ struct t_gui_buffer *buffer2 = weechat_buffer_search ("==", "irc.freenode.#test"
[source,python]
----
# プロトタイプ
-buffer = weechat.buffer_search(plugin, name)
+def buffer_search(plugin: str, name: str) -> str: ...
# 例
buffer = weechat.buffer_search("my_plugin", "my_buffer")
@@ -12723,7 +12725,7 @@ struct t_gui_buffer *weechat_buffer = weechat_buffer_search_main ();
[source,python]
----
# プロトタイプ
-buffer = weechat.buffer_search_main()
+def buffer_search_main() -> str: ...
# 例
buffer = weechat.buffer_search_main()
@@ -12761,7 +12763,7 @@ if (my_buffer)
[source,python]
----
# プロトタイプ
-weechat.buffer_clear(buffer)
+def buffer_clear(buffer: str) -> int: ...
# 例
buffer = weechat.buffer_search("my_plugin", "my_buffer")
@@ -12800,7 +12802,7 @@ weechat_buffer_close (my_buffer);
[source,python]
----
# プロトタイプ
-weechat.buffer_close(buffer)
+def buffer_close(buffer: str) -> int: ...
# 例
buffer = weechat.buffer_new("my_buffer", "my_input_cb", "", "my_close_cb", "")
@@ -12841,7 +12843,7 @@ weechat_buffer_merge (weechat_current_buffer (),
[source,python]
----
# プロトタイプ
-weechat.buffer_merge(buffer, target_buffer)
+def buffer_merge(buffer: str, target_buffer: str) -> int: ...
# 例
# merge current buffer with WeeChat "core" buffer
@@ -12878,7 +12880,7 @@ weechat_buffer_unmerge (weechat_current_buffer (), 1);
[source,python]
----
# プロトタイプ
-weechat.buffer_unmerge(buffer, number)
+def buffer_unmerge(buffer: str, number: int) -> int: ...
# 例
weechat.buffer_unmerge(weechat.current_buffer(), 1)
@@ -12969,7 +12971,7 @@ weechat_printf (NULL, "my buffer number is: %d",
[source,python]
----
# プロトタイプ
-value = weechat.buffer_get_integer(buffer, property)
+def buffer_get_integer(buffer: str, property: str) -> int: ...
# 例
weechat.prnt("", "my buffer number is: %d" % weechat.buffer_get_integer(my_buffer, "number"))
@@ -13027,7 +13029,7 @@ weechat_printf (NULL, "name / short name of buffer are: %s / %s",
[source,python]
----
# プロトタイプ
-value = weechat.buffer_get_string(buffer, property)
+def buffer_get_string(buffer: str, property: str) -> str: ...
# 例
weechat.prnt("", "name / short name of buffer are: %s / %s"
@@ -13072,7 +13074,7 @@ weechat_printf (NULL, "plugin pointer of my buffer: %lx",
[source,python]
----
# プロトタイプ
-value = weechat.buffer_get_pointer(buffer, property)
+def buffer_get_pointer(buffer: str, property: str) -> str: ...
# 例
weechat.prnt("", "plugin pointer of my buffer: %s" % weechat.buffer_get_pointer(my_buffer, "plugin"))
@@ -13277,7 +13279,7 @@ weechat_buffer_set (my_buffer, "localvar_del_toto", "");
[source,python]
----
# プロトタイプ
-weechat.buffer_set(buffer, property, value)
+def buffer_set(buffer: str, property: str, value: str) -> int: ...
# 例
@@ -13392,7 +13394,7 @@ char *str = weechat_buffer_string_replace_local_var (my_buffer,
[source,python]
----
# プロトタイプ
-value = weechat.buffer_string_replace_local_var(buffer, string)
+def buffer_string_replace_local_var(buffer: str, string: str) -> str: ...
# 例
weechat.buffer_set(my_buffer, "localvar_set_toto", "abc")
@@ -13444,7 +13446,7 @@ if (buffer)
[source,python]
----
# プロトタイプ
-match = weechat.buffer_match_list(buffer, string)
+def buffer_match_list(buffer: str, string: str) -> int: ...
# 例
buffer = weechat.buffer_search("irc", "freenode.#weechat")
@@ -13487,7 +13489,7 @@ struct t_gui_window *current_window = weechat_current_window ();
[source,python]
----
# プロトタイプ
-window = weechat.current_window()
+def current_window() -> str: ...
# 例
current_window = weechat.current_window()
@@ -13528,7 +13530,7 @@ weechat_printf (NULL,
[source,python]
----
# プロトタイプ
-window = weechat.window_search_with_buffer(buffer)
+def window_search_with_buffer(buffer: str) -> str: ...
# 例
weechat.prnt("", "window displaying core buffer: %s"
@@ -13588,7 +13590,7 @@ weechat_printf (NULL, "current window is at position (x,y): (%d,%d)",
[source,python]
----
# プロトタイプ
-value = weechat.window_get_integer(window, property)
+def window_get_integer(window: str, property: str) -> int: ...
# 例
weechat.prnt("", "current window is at position (x,y): (%d,%d)"
@@ -13625,7 +13627,7 @@ const char *weechat_window_get_string (struct t_gui_window *window,
[source,python]
----
# プロトタイプ
-value = weechat.window_get_string(buffer, property)
+def window_get_string(window: str, property: str) -> str: ...
----
==== window_get_pointer
@@ -13665,7 +13667,7 @@ weechat_printf (NULL,
[source,python]
----
# プロトタイプ
-value = weechat.window_get_pointer(window, property)
+def window_get_pointer(window: str, property: str) -> str: ...
# 例
weechat.prnt("", "buffer displayed in current window: %s"
@@ -13701,7 +13703,7 @@ weechat_window_set_title ("new title here");
[source,python]
----
# プロトタイプ
-weechat.window_set_title(window, title)
+def window_set_title(title: str) -> int: ...
# 例
weechat.window_set_title("new title here")
@@ -13771,7 +13773,7 @@ struct t_gui_nick_group *my_group =
[source,python]
----
# プロトタイプ
-group = weechat.nicklist_add_group(buffer, parent_group, name, color, visible)
+def nicklist_add_group(buffer: str, parent_group: str, name: str, color: str, visible: int) -> str: ...
# 例
group = weechat.nicklist_add_group(my_buffer, my_parent_group, "test_group",
@@ -13815,7 +13817,7 @@ struct t_gui_nick_group *ptr_group = weechat_nicklist_search_group (my_buffer,
[source,python]
----
# プロトタイプ
-group = weechat.nicklist_search_group(buffer, from_group, name)
+def nicklist_search_group(buffer: str, from_group: str, name: str) -> str: ...
# 例
group = weechat.nicklist_search_group(my_buffer, "", "test_group")
@@ -13883,7 +13885,7 @@ struct t_gui_nick *my_nick =
[source,python]
----
# プロトタイプ
-nick = weechat.nicklist_add_nick(buffer, group, name, color, prefix, prefix_color, visible)
+def nicklist_add_nick(buffer: str, group: str, name: str, color: str, prefix: str, prefix_color: str, visible: int) -> str: ...
# 例
if nick_away:
@@ -13930,7 +13932,7 @@ struct t_gui_nick *ptr_nick = weechat_nicklist_search_nick (my_buffer,
[source,python]
----
# プロトタイプ
-nick = weechat.nicklist_search_nick(buffer, from_group, name)
+def nicklist_search_nick(buffer: str, from_group: str, name: str) -> str: ...
# 例
nick = weechat.nicklist_search_nick(my_buffer, "", "test_nick")
@@ -13965,7 +13967,7 @@ weechat_nicklist_remove_group (my_buffer, my_group);
[source,python]
----
# プロトタイプ
-weechat.nicklist_remove_group(buffer, group)
+def nicklist_remove_group(buffer: str, group: str) -> int: ...
# 例
weechat.nicklist_remove_group(my_buffer, my_group)
@@ -14000,7 +14002,7 @@ weechat_nicklist_remove_nick (my_buffer, my_nick);
[source,python]
----
# プロトタイプ
-weechat.nicklist_remove_nick(buffer, nick)
+def nicklist_remove_nick(buffer: str, nick: str) -> int: ...
# 例
weechat.nicklist_remove_nick(my_buffer, my_nick)
@@ -14033,7 +14035,7 @@ weechat_nicklist_remove_all (my_buffer);
[source,python]
----
# プロトタイプ
-weechat.nicklist_remove_all(buffer)
+def nicklist_remove_all(buffer: str) -> int: ...
# 例
weechat.nicklist_remove_all(my_buffer)
@@ -14128,7 +14130,7 @@ int visible = weechat_nicklist_group_get_integer (buffer, group, "visible");
[source,python]
----
# プロトタイプ
-value = weechat.nicklist_group_get_integer(buffer, group, property)
+def nicklist_group_get_integer(buffer: str, group: str, property: str) -> int: ...
# 例
visible = weechat.nicklist_group_get_integer(buffer, group, "visible")
@@ -14173,7 +14175,7 @@ const char *color = weechat_nicklist_group_get_string (buffer, group, "color");
[source,python]
----
# プロトタイプ
-value = weechat.nicklist_group_get_string(buffer, group, property)
+def nicklist_group_get_string(buffer: str, group: str, property: str) -> str: ...
# 例
color = weechat.nicklist_group_get_string(buffer, group, "color")
@@ -14217,7 +14219,7 @@ struct t_gui_nick_group *parent = weechat_nicklist_group_get_pointer (buffer, gr
[source,python]
----
# プロトタイプ
-value = weechat.nicklist_group_get_pointer(buffer, group, property)
+def nicklist_group_get_pointer(buffer: str, group: str, property: str) -> str: ...
# 例
parent = weechat.nicklist_group_get_pointer(buffer, group, "parent")
@@ -14279,7 +14281,7 @@ weechat_nicklist_group_set (buffer, group, "visible", "0");
[source,python]
----
# プロトタイプ
-weechat.nicklist_group_set(buffer, group, property, value)
+def nicklist_group_set(buffer: str, group: str, property: str, value: str) -> int: ...
# 例
@@ -14331,7 +14333,7 @@ int visible = weechat_nicklist_nick_get_integer (buffer, nick, "visible");
[source,python]
----
# プロトタイプ
-value = weechat.nicklist_nick_get_integer(buffer, nick, property)
+def nicklist_nick_get_integer(buffer: str, nick: str, property: str) -> int: ...
# 例
visible = weechat.nicklist_nick_get_integer(buffer, nick, "visible")
@@ -14378,7 +14380,7 @@ const char *color = weechat_nicklist_nick_get_string (buffer, nick, "color");
[source,python]
----
# プロトタイプ
-value = weechat.nicklist_nick_get_string(buffer, nick, property)
+def nicklist_nick_get_string(buffer: str, nick: str, property: str) -> str: ...
# 例
color = weechat.nicklist_nick_get_string(buffer, nick, "color")
@@ -14422,7 +14424,7 @@ struct t_gui_nick_group *group = weechat_nicklist_nick_get_pointer (buffer, nick
[source,python]
----
# プロトタイプ
-value = weechat.nicklist_nick_get_pointer(buffer, nick, property)
+def nicklist_nick_get_pointer(buffer: str, nick: str, property: str) -> str: ...
# 例
group = weechat.nicklist_nick_get_pointer(buffer, nick, "group")
@@ -14494,7 +14496,7 @@ weechat_nicklist_nick_set (buffer, nick, "visible", "0");
[source,python]
----
# プロトタイプ
-weechat.nicklist_nick_set(buffer, nick, property, value)
+def nicklist_nick_set(buffer: str, nick: str, property: str, value: str) -> int: ...
# 例
@@ -14547,7 +14549,7 @@ struct t_gui_bar_item *bar_item = weechat_bar_item_search ("myitem");
[source,python]
----
# プロトタイプ
-bar_item = weechat.bar_item_search(name)
+def bar_item_search(name: str) -> str: ...
# 例
bar_item = weechat.bar_item_search("myitem")
@@ -14630,7 +14632,7 @@ WeeChat バージョン 0.4.1 以下に対する互換性のために、デフ
[source,python]
----
# プロトタイプ
-bar_item = weechat.bar_item_new(name, build_callback, build_callback_data)
+def bar_item_new(name: str, build_callback: str, build_callback_data: str) -> str: ...
# 例 (コールバックに "buffer" と "extra_info" を除いた引数を渡す)
def my_build_callback(data, item, window):
@@ -14672,7 +14674,7 @@ weechat_bar_item_update ("myitem");
[source,python]
----
# プロトタイプ
-weechat.bar_item_update(name)
+def bar_item_update(name: str) -> int: ...
# 例
weechat.bar_item_update("myitem")
@@ -14705,7 +14707,7 @@ weechat_bar_item_remove (&my_item);
[source,python]
----
# プロトタイプ
-weechat.bar_item_remove(item)
+def bar_item_remove(item: str) -> int: ...
# 例
weechat.bar_item_remove(myitem)
@@ -14742,7 +14744,7 @@ struct t_gui_bar *bar = weechat_bar_search ("mybar");
[source,python]
----
# プロトタイプ
-bar = weechat.bar_search(name)
+def bar_search(name: str) -> str: ...
# 例
bar = weechat.bar_search("mybar")
@@ -14848,9 +14850,10 @@ struct t_gui_bar *my_bar = weechat_bar_new ("mybar",
[source,python]
----
# プロトタイプ
-bar = weechat.bar_new(name, hidden, priority, type, condition, position,
- filling_top_bottom, filling_left_right, size, size_max,
- color_fg, color_delim, color_bg, color_bg_inactive, separator, items)
+def bar_new(name: str, hidden: str, priority: str, type: str, condition: str, position: str,
+ filling_top_bottom: str, filling_left_right: str, size: str, size_max: str,
+ color_fg: str, color_delim: str, color_bg: str, color_bg_inactive: str,
+ separator: str, items: str) -> str: ...
# 例
bar = weechat.bar_new("mybar", "off", "100", "window", "", "top", "horizontal", "vertical",
@@ -14898,7 +14901,7 @@ weechat_bar_set (mybar, "position", "bottom");
[source,python]
----
# プロトタイプ
-weechat.bar_set(bar, property, value)
+def bar_set(bar: str, property: str, value: str) -> int: ...
# 例
weechat.bar_set(my_bar, "position", "bottom")
@@ -14931,7 +14934,7 @@ weechat_bar_update ("mybar");
[source,python]
----
# プロトタイプ
-weechat.bar_update(name)
+def bar_update(name: str) -> int: ...
# 例
weechat.bar_update("mybar")
@@ -14964,7 +14967,7 @@ weechat_bar_remove (mybar);
[source,python]
----
# プロトタイプ
-weechat.bar_remove(bar)
+def bar_remove(bar: str) -> int: ...
# 例
weechat.bar_remove(my_bar)
@@ -15014,7 +15017,7 @@ rc = weechat_command (weechat_buffer_search ("irc", "freenode.#weechat"),
[source,python]
----
# プロトタイプ
-weechat.command(buffer, command)
+def command(buffer: str, command: str) -> int: ...
# 例
rc = weechat.command(weechat.buffer_search("irc", "freenode.#weechat"), "/whois FlashCode")
@@ -15074,7 +15077,7 @@ rc = weechat_command_options (NULL, "/some_command arguments", options);
[source,python]
----
# プロトタイプ
-weechat.command_options(buffer, command, options)
+def command_options(buffer: str, command: str, options: Dict[str, str]) -> int: ...
# 例: /exec 以外のコマンド実行を許可
rc = weechat.command("", "/some_command arguments", {"commands": "*,!exec"})
@@ -15120,7 +15123,7 @@ struct t_gui_completion *completion = weechat_completion_new (weechat_buffer_sea
[source,python]
----
# プロトタイプ
-completion = weechat.completion_new(buffer)
+def completion_new(buffer: str) -> str: ...
# 例
completion = weechat.completion_new(weechat.buffer_search_main())
@@ -15169,7 +15172,7 @@ if (weechat_completion_search (completion, "/help filt", 10, 1))
[source,python]
----
# プロトタイプ
-rc = weechat.completion_search(completion, data, position, direction)
+def completion_search(completion: str, data: str, position: int, direction: int) -> int: ...
# 例
completion = weechat.completion_new(weechat.buffer_search_main())
@@ -15223,7 +15226,7 @@ my_completion_cb (const void *pointer, void *data, const char *completion_item,
[source,python]
----
# プロトタイプ
-value = weechat.completion_get_string(completion, property)
+def completion_get_string(completion: str, property: str) -> str: ...
# 例
def my_completion_cb(data, completion_item, buffer, completion):
@@ -15268,7 +15271,7 @@ C 言語での使用例: <<_hook_completion,hook_completion>> を参照。
[source,python]
----
# プロトタイプ
-weechat.completion_list_add(completion, word, nick_completion, where)
+def completion_list_add(completion: str, word: str, nick_completion: int, where: str) -> int: ...
# 例: see function hook_completion
----
@@ -15303,7 +15306,7 @@ weechat_completion_free (completion);
[source,python]
----
# プロトタイプ
-weechat.completion_free(completion)
+def completion_free(completion: str) -> int: ...
# 例
weechat.completion_free(completion)
@@ -15475,7 +15478,7 @@ if (weechat_config_dir)
[source,python]
----
# プロトタイプ
-value = weechat.info_get(info_name, arguments)
+def info_get(info_name: str, arguments: str) -> str: ...
# 例
weechat.prnt("", "Current WeeChat version is: %s (compiled on %s)"
@@ -15561,7 +15564,7 @@ link:weechat_scripting.ja.html#irc_message_parse[WeeChat スクリプト作成
[source,python]
----
# プロトタイプ
-dict = weechat.info_get_hashtable(info_name, dict_in)
+def info_get_hashtable(info_name: str, dict_in: Dict[str, str]) -> Dict[str, str]: ...
# 例
dict_in = {"message": ":nick!user@host PRIVMSG #weechat :message here"}
@@ -15613,7 +15616,7 @@ struct t_infolist *infolist = weechat_infolist_new ();
[source,python]
----
# プロトタイプ
-infolist = weechat.infolist_new()
+def infolist_new() -> str: ...
# 例
infolist = weechat.infolist_new()
@@ -15650,7 +15653,7 @@ struct t_infolist_item *item = weechat_infolist_new_item (infolist);
[source,python]
----
# プロトタイプ
-item = weechat.infolist_new_item(infolist)
+def infolist_new_item(infolist: str) -> str: ...
# 例
item = weechat.infolist_new_item(infolist)
@@ -15693,7 +15696,7 @@ struct t_infolist_var *var = weechat_infolist_new_var_integer (item,
[source,python]
----
# プロトタイプ
-var = weechat.infolist_new_var_integer(item, name, value)
+def infolist_new_var_integer(item: str, name: str, value: int) -> str: ...
# 例
var = weechat.infolist_new_var_integer(item, "my_integer", 123)
@@ -15736,7 +15739,7 @@ struct t_infolist_var *var = weechat_infolist_new_var_string (item,
[source,python]
----
# プロトタイプ
-var = weechat.infolist_new_var_string(item, name, value)
+def infolist_new_var_string(item: str, name: str, value: str) -> str: ...
# 例
var = weechat.infolist_new_var_string(item, "my_string", "value")
@@ -15779,7 +15782,7 @@ struct t_infolist_var *var = weechat_infolist_new_var_pointer (item,
[source,python]
----
# プロトタイプ
-var = weechat.infolist_new_var_pointer(item, name, pointer)
+def infolist_new_var_pointer(item: str, name: str, pointer: str) -> str: ...
# 例
var = weechat.infolist_new_var_pointer(item, "my_pointer", pointer)
@@ -15862,7 +15865,7 @@ struct t_infolist_var *var = weechat_infolist_new_var_time (item,
[source,python]
----
# プロトタイプ
-var = weechat.infolist_new_var_time(item, name, time)
+def infolist_new_var_time(item: str, name: str, time: int) -> str: ...
# 例
var = weechat.infolist_new_var_time(item, "my_time", int(time.time()))
@@ -15916,7 +15919,7 @@ struct t_infolist *infolist = weechat_infolist_get ("irc_server", NULL, NULL);
[source,python]
----
# プロトタイプ
-infolist = weechat.infolist_get(infolist_name, pointer, arguments)
+def infolist_get(infolist_name: str, pointer: str, arguments: str) -> str: ...
# 例
infolist = weechat.infolist_get("irc_server", "", "")
@@ -15961,7 +15964,7 @@ else
[source,python]
----
# プロトタイプ
-rc = weechat.infolist_next(infolist)
+def infolist_next(infolist: str) -> int: ...
# 例
rc = weechat.infolist_next(infolist)
@@ -16011,7 +16014,7 @@ else
[source,python]
----
# プロトタイプ
-rc = weechat.infolist_prev(infolist)
+def infolist_prev(infolist: str) -> int: ...
# 例
rc = weechat.infolist_prev(infolist)
@@ -16048,7 +16051,7 @@ weechat_infolist_reset_item_cursor (infolist);
[source,python]
----
# プロトタイプ
-weechat.infolist_reset_item_cursor(infolist)
+def infolist_reset_item_cursor(infolist: str) -> int: ...
# 例
weechat.infolist_reset_item_cursor(infolist)
@@ -16093,7 +16096,7 @@ if (weechat_infolist_search_var (infolist, "name"))
[source,python]
----
# プロトタイプ
-var = weechat.infolist_search_var(infolist, name)
+def infolist_search_var(infolist: str, name: str) -> str: ...
# 例
if weechat.infolist_search_var(infolist, "name"):
@@ -16136,7 +16139,7 @@ const char *fields = weechat_infolist_fields (infolist);
[source,python]
----
# プロトタイプ
-fields = weechat.infolist_fields(infolist)
+def infolist_fields(infolist: str) -> str: ...
# 例
fields = weechat.infolist_fields(infolist)
@@ -16177,7 +16180,7 @@ weechat_printf (NULL, "integer = %d",
[source,python]
----
# プロトタイプ
-value = weechat.infolist_integer(infolist, var)
+def infolist_integer(infolist: str, var: str) -> int: ...
# 例
weechat.prnt("", "integer = %d" % weechat.infolist_integer(infolist, "my_integer"))
@@ -16216,7 +16219,7 @@ weechat_printf (NULL, "string = %s",
[source,python]
----
# プロトタイプ
-value = weechat.infolist_string(infolist, var)
+def infolist_string(infolist: str, var: str) -> str: ...
# 例
weechat.prnt("", "string = %s" % weechat.infolist_string(infolist, "my_string"))
@@ -16255,7 +16258,7 @@ weechat_printf (NULL, "pointer = 0x%lx",
[source,python]
----
# プロトタイプ
-value = weechat.infolist_pointer(infolist, var)
+def infolist_pointer(infolist: str, var: str) -> str: ...
# 例
weechat.prnt("", "pointer = 0x%s" % weechat.infolist_pointer(infolist, "my_pointer"))
@@ -16329,7 +16332,7 @@ weechat_printf (NULL, "time = %ld",
[source,python]
----
# プロトタイプ
-value = weechat.infolist_time(infolist, var)
+def infolist_time(infolist: str, var: str) -> int: ...
# 例
weechat.prnt("", "time = %ld" % weechat.infolist_time(infolist, "my_time"))
@@ -16362,7 +16365,7 @@ weechat_infolist_free (infolist);
[source,python]
----
# プロトタイプ
-weechat.infolist_free(infolist)
+def infolist_free(infolist: str) -> int: ...
# 例
weechat.infolist_free(infolist)
@@ -16631,7 +16634,7 @@ struct t_hdata *hdata = weechat_hdata_get ("irc_server");
[source,python]
----
# プロトタイプ
-hdata = weechat.hdata_get(hdata_name)
+def hdata_get(hdata_name: str) -> str: ...
# 例
hdata = weechat.hdata_get("irc_server")
@@ -16671,7 +16674,7 @@ int offset = weechat_hdata_get_var_offset (hdata, "name");
[source,python]
----
# プロトタイプ
-offset = weechat.hdata_get_var_offset(hdata, name)
+def hdata_get_var_offset(hdata: str, name: str) -> int: ...
# 例
offset = weechat.hdata_get_var_offset(hdata, "name")
@@ -16776,7 +16779,7 @@ weechat_printf (NULL, "type = %s", weechat_hdata_get_var_type_string (hdata, "na
[source,python]
----
# プロトタイプ
-type = weechat.hdata_get_var_type_string(hdata, name)
+def hdata_get_var_type_string(hdata: str, name: str) -> str: ...
# 例
weechat.prnt("", "type = %s" % weechat.hdata_get_var_type_string("name"))
@@ -16817,7 +16820,7 @@ int array_size = weechat_hdata_get_var_array_size (hdata, pointer, "name");
[source,python]
----
# プロトタイプ
-array_size = weechat.hdata_get_var_array_size(hdata, pointer, name)
+def hdata_get_var_array_size(hdata: str, pointer: str, name: str) -> int: ...
# 例
array_size = weechat.hdata_get_var_array_size(hdata, pointer, "name")
@@ -16860,7 +16863,7 @@ const char *array_size = weechat_hdata_get_var_array_size_string (hdata, pointer
[source,python]
----
# プロトタイプ
-array_size = weechat.hdata_get_var_array_size_string(hdata, pointer, name)
+def hdata_get_var_array_size_string(hdata: str, pointer: str, name: str) -> str: ...
# 例
array_size = weechat.hdata_get_var_array_size_string(hdata, pointer, "name")
@@ -16900,7 +16903,7 @@ weechat_printf (NULL, "hdata = %s", weechat_hdata_get_var_hdata (hdata, "name"))
[source,python]
----
# プロトタイプ
-hdata_name = weechat.hdata_get_var_hdata(hdata, name)
+def hdata_get_var_hdata(hdata: str, name: str) -> str: ...
# 例
weechat.prnt("", "hdata = %s" % weechat.hdata_get_var_hdata(hdata, "name"))
@@ -17012,7 +17015,7 @@ struct t_gui_buffer *buffers = weechat_hdata_get_list (hdata, "gui_buffers");
[source,python]
----
# プロトタイプ
-list = weechat.hdata_get_list(hdata, name)
+def hdata_get_list(hdata: str, name: str) -> str: ...
# 例
hdata = weechat.hdata_get("buffer")
@@ -17068,7 +17071,7 @@ else
[source,python]
----
# プロトタイプ
-rc = weechat.hdata_check_pointer(hdata, list, pointer)
+def hdata_check_pointer(hdata: str, list: str, pointer: str) -> int: ...
# 例
hdata = weechat.hdata_get("buffer")
@@ -17125,7 +17128,7 @@ if (buffer)
[source,python]
----
# プロトタイプ
-pointer = weechat.hdata_move(hdata, pointer, count)
+def hdata_move(hdata: str, pointer: str, count: int) -> str: ...
# 例
hdata = weechat.hdata_get("buffer")
@@ -17187,7 +17190,7 @@ if (server)
[source,python]
----
# プロトタイプ
-pointer = weechat.hdata_search(hdata, pointer, search, count)
+def hdata_search(hdata: str, pointer: str, search: str, count: int) -> str: ...
# 例
hdata = weechat.hdata_get("irc_server")
@@ -17235,7 +17238,7 @@ weechat_printf (NULL, "letter = %c", weechat_hdata_char (hdata, pointer, "letter
[source,python]
----
# プロトタイプ
-value = weechat.hdata_char(hdata, pointer, name)
+def hdata_char(hdata: str, pointer: str, name: str) -> int: ...
# 例
weechat.prnt("", "letter = %c" % weechat.hdata_char(hdata, pointer, "letter"))
@@ -17279,7 +17282,7 @@ weechat_printf (NULL, "number = %d", weechat_hdata_integer (hdata, buffer, "numb
[source,python]
----
# プロトタイプ
-value = weechat.hdata_integer(hdata, pointer, name)
+def hdata_integer(hdata: str, pointer: str, name: str) -> int: ...
# 例
hdata = weechat.hdata_get("buffer")
@@ -17323,7 +17326,7 @@ weechat_printf (NULL, "longvar = %ld", weechat_hdata_long (hdata, pointer, "long
[source,python]
----
# プロトタイプ
-value = weechat.hdata_long(hdata, pointer, name)
+def hdata_long(hdata: str, pointer: str, name: str) -> int: ...
# 例
weechat.prnt("", "longvar = %ld" % weechat.hdata_long(hdata, pointer, "longvar"))
@@ -17367,7 +17370,7 @@ weechat_printf (NULL, "name = %s", weechat_hdata_string (hdata, buffer, "name"))
[source,python]
----
# プロトタイプ
-value = weechat.hdata_string(hdata, pointer, name)
+def hdata_string(hdata: str, pointer: str, name: str) -> str: ...
# 例
hdata = weechat.hdata_get("buffer")
@@ -17413,7 +17416,7 @@ weechat_printf (NULL, "lines = %lx", weechat_hdata_pointer (hdata, buffer, "line
[source,python]
----
# プロトタイプ
-value = weechat.hdata_pointer(hdata, pointer, name)
+def hdata_pointer(hdata: str, pointer: str, name: str) -> str: ...
# 例
hdata = weechat.hdata_get("buffer")
@@ -17475,7 +17478,7 @@ if (ptr)
[source,python]
----
# プロトタイプ
-value = weechat.hdata_time(hdata, pointer, name)
+def hdata_time(hdata: str, pointer: str, name: str) -> int: ...
# 例
buf = weechat.buffer_search_main()
@@ -17529,7 +17532,7 @@ weechat_printf (NULL, "%d local variables in core buffer",
[source,python]
----
# プロトタイプ
-hashtable = weechat.hdata_hashtable(hdata, pointer, name)
+def hdata_hashtable(hdata: str, pointer: str, name: str) -> Dict[str, str]: ...
# 例
hdata = weechat.hdata_get("buffer")
@@ -17584,7 +17587,7 @@ weechat_printf (NULL, "number comparison = %d",
[source,python]
----
# プロトタイプ
-rc = weechat.hdata_compare(hdata, pointer1, pointer2, name, case_sensitive)
+def hdata_compare(hdata: str, pointer1: str, pointer2: str, name: str, case_sensitive: int) -> int: ...
# 例
hdata = weechat.hdata_get("buffer")
@@ -17707,7 +17710,7 @@ if (own_lines)
[source,python]
----
# プロトタイプ
-count = weechat.hdata_update(hdata, pointer, hashtable)
+def hdata_update(hdata: str, pointer: str, hashtable: Dict[str, str]) -> int: ...
# 例: 現在のバッファに表示されている最後のメッセージの時間を 1 時間前にする
own_lines = weechat.hdata_pointer(weechat.hdata_get("buffer"), weechat.current_buffer(), "own_lines")
@@ -17770,7 +17773,7 @@ weechat_printf (NULL, "lists in hdata: %s", weechat_hdata_get_string (hdata, "li
[source,python]
----
# プロトタイプ
-value = weechat.hdata_get_string(hdata, property)
+def hdata_get_string(hdata: str, property: str) -> str: ...
# 例
weechat.prnt("", "variables in hdata: %s" % weechat.hdata_get_string(hdata, "var_keys"))
@@ -17839,7 +17842,7 @@ struct t_upgrade_file *upgrade_file = weechat_upgrade_new ("my_file",
[source,python]
----
# プロトタイプ
-upgrade_file = weechat.upgrade_new(filename, callback_read, callback_read_data)
+def upgrade_new(filename: str, callback_read: str, callback_read_data: str) -> str: ...
# 例
upgrade_file = weechat.upgrade_new("my_file", "", "")
@@ -17887,7 +17890,7 @@ else
[source,python]
----
# プロトタイプ
-rc = weechat.upgrade_write_object(upgrade_file, object_id, infolist)
+def upgrade_write_object(upgrade_file: str, object_id: int, infolist: str) -> int: ...
# 例
weechat.upgrade_write_object(upgrade_file, 1, infolist)
@@ -17926,7 +17929,7 @@ weechat_upgrade_read (upgrade_file);
[source,python]
----
# プロトタイプ
-rc = weechat.upgrade_read(upgrade_file)
+def upgrade_read(upgrade_file: str) -> int: ...
# 例
weechat.upgrade_read(upgrade_file)
@@ -17959,7 +17962,7 @@ weechat_upgrade_close (upgrade_file);
[source,python]
----
# プロトタイプ
-weechat.upgrade_close(upgrade_file)
+def upgrade_close(upgrade_file: str) -> int: ...
# 例
weechat.upgrade_close(upgrade_file)