diff options
Diffstat (limited to 'doc/it/weechat_plugin_api.it.adoc')
-rw-r--r-- | doc/it/weechat_plugin_api.it.adoc | 435 |
1 files changed, 219 insertions, 216 deletions
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) |