summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
Diffstat (limited to 'doc')
-rw-r--r--doc/de/weechat_scripting.de.adoc21
-rw-r--r--doc/en/weechat_plugin_api.en.adoc4
-rw-r--r--doc/en/weechat_scripting.en.adoc12
-rw-r--r--doc/fr/weechat_plugin_api.fr.adoc4
-rw-r--r--doc/fr/weechat_scripting.fr.adoc22
-rw-r--r--doc/it/weechat_plugin_api.it.adoc4
-rw-r--r--doc/it/weechat_scripting.it.adoc13
-rw-r--r--doc/ja/weechat_plugin_api.ja.adoc4
-rw-r--r--doc/ja/weechat_scripting.ja.adoc12
-rw-r--r--doc/pl/weechat_scripting.pl.adoc12
-rw-r--r--doc/sr/weechat_plugin_api.sr.adoc4
-rw-r--r--doc/sr/weechat_scripting.sr.adoc21
12 files changed, 103 insertions, 30 deletions
diff --git a/doc/de/weechat_scripting.de.adoc b/doc/de/weechat_scripting.de.adoc
index 6a256391b..172723148 100644
--- a/doc/de/weechat_scripting.de.adoc
+++ b/doc/de/weechat_scripting.de.adoc
@@ -201,11 +201,22 @@ Funktionen werden aufgerufen mittels `+weechat.xxx(arg1, arg2, ...)+`.
Funktionen werden aufgerufen mittels `+weechat::xxx arg1 arg2 ...+`.
-Da Tcl nur String-Typen hat, gibt es keinen Null-Typ, der als Argument übergeben werden kann
-wenn eine Funktion Nullwerte akzeptiert. Um dies zu überwinden, können Sie die Konstante
-`$::weechat::WEECHAT_NULL` verwenden, das als Nullwert fungiert. Diese Konstante ist definiert
-als `\uFFFF\uFFFF\uFFFFWEECHAT_NULL\uFFFF\uFFFF\uFFFF`, es ist somit sehr unwahrscheinlich
-das es ungewollt verwendet wird.
+// TRANSLATION MISSING
+[[tcl_null]]
+===== Null values
+
+Since Tcl only has string types, there's no null type to pass as an argument
+when a function accepts null values or to get as an argument in a callback
+function. To overcome this the WeeChat API defines the constant
+`$::weechat::WEECHAT_NULL` which acts as a null value. This constant is defined
+as `\uFFFF\uFFFF\uFFFFWEECHAT_NULL\uFFFF\uFFFF\uFFFF`, so it's very unlikely to
+appear unintentionally.
+
+You can pass this constant when a function accepts null as an argument and you
+will get it as the value of an argument in a callback function if the argument
+value is null. To see which functions accept null values and passes null values
+to callbacks, look at the Python prototypes in the
+link:weechat_plugin_api.en.html[WeeChat plugin API reference ^↗^,window=_blank].
[[language_guile]]
==== Guile (Scheme)
diff --git a/doc/en/weechat_plugin_api.en.adoc b/doc/en/weechat_plugin_api.en.adoc
index a26241688..5475efa8b 100644
--- a/doc/en/weechat_plugin_api.en.adoc
+++ b/doc/en/weechat_plugin_api.en.adoc
@@ -6451,7 +6451,7 @@ def config_new_section(config_file: str, name: str,
callback_delete_option: str, callback_delete_option_data: str) -> str: ...
# example
-def my_section_read_cb(data: str, config_file: str, section: str, option_name: str, value: str) -> int:
+def my_section_read_cb(data: str, config_file: str, section: str, option_name: str, value: str | None) -> int:
# ...
return weechat.WEECHAT_CONFIG_OPTION_SET_OK_CHANGED
# return weechat.WEECHAT_CONFIG_OPTION_SET_OK_SAME_VALUE
@@ -6466,7 +6466,7 @@ def my_section_write_default_cb(data: str, config_file: str, section_name: str)
# ...
return weechat.WEECHAT_CONFIG_WRITE_OK
-def my_section_create_option_cb(data: str, config_file: str, section: str, option_name: str, value: str) -> int:
+def my_section_create_option_cb(data: str, config_file: str, section: str, option_name: str, value: str | None) -> int:
# ...
return weechat.WEECHAT_CONFIG_OPTION_SET_OK_SAME_VALUE
diff --git a/doc/en/weechat_scripting.en.adoc b/doc/en/weechat_scripting.en.adoc
index f54d53796..ed5f0c84a 100644
--- a/doc/en/weechat_scripting.en.adoc
+++ b/doc/en/weechat_scripting.en.adoc
@@ -191,12 +191,22 @@ Functions are called with `+weechat.xxx(arg1, arg2, ...)+`.
Functions are called with `+weechat::xxx arg1 arg2 ...+`.
+[[tcl_null]]
+===== Null values
+
Since Tcl only has string types, there's no null type to pass as an argument
-when a function accepts null values. To overcome this you can use the constant
+when a function accepts null values or to get as an argument in a callback
+function. To overcome this the WeeChat API defines the constant
`$::weechat::WEECHAT_NULL` which acts as a null value. This constant is defined
as `\uFFFF\uFFFF\uFFFFWEECHAT_NULL\uFFFF\uFFFF\uFFFF`, so it's very unlikely to
appear unintentionally.
+You can pass this constant when a function accepts null as an argument and you
+will get it as the value of an argument in a callback function if the argument
+value is null. To see which functions accept null values and passes null values
+to callbacks, look at the Python prototypes in the
+link:weechat_plugin_api.en.html[WeeChat plugin API reference ^↗^,window=_blank].
+
[[language_guile]]
==== Guile (Scheme)
diff --git a/doc/fr/weechat_plugin_api.fr.adoc b/doc/fr/weechat_plugin_api.fr.adoc
index 41f6fdac4..0f8a4c7de 100644
--- a/doc/fr/weechat_plugin_api.fr.adoc
+++ b/doc/fr/weechat_plugin_api.fr.adoc
@@ -6554,7 +6554,7 @@ def config_new_section(config_file: str, name: str,
callback_delete_option: str, callback_delete_option_data: str) -> str: ...
# exemple
-def my_section_read_cb(data: str, config_file: str, section: str, option_name: str, value: str) -> int:
+def my_section_read_cb(data: str, config_file: str, section: str, option_name: str, value: str | None) -> int:
# ...
return weechat.WEECHAT_CONFIG_OPTION_SET_OK_CHANGED
# return weechat.WEECHAT_CONFIG_OPTION_SET_OK_SAME_VALUE
@@ -6569,7 +6569,7 @@ def my_section_write_default_cb(data: str, config_file: str, section_name: str)
# ...
return weechat.WEECHAT_CONFIG_WRITE_OK
-def my_section_create_option_cb(data: str, config_file: str, section: str, option_name: str, value: str) -> int:
+def my_section_create_option_cb(data: str, config_file: str, section: str, option_name: str, value: str | None) -> int:
# ...
return weechat.WEECHAT_CONFIG_OPTION_SET_OK_SAME_VALUE
diff --git a/doc/fr/weechat_scripting.fr.adoc b/doc/fr/weechat_scripting.fr.adoc
index f481640f7..de87cb8e4 100644
--- a/doc/fr/weechat_scripting.fr.adoc
+++ b/doc/fr/weechat_scripting.fr.adoc
@@ -201,12 +201,22 @@ Les fonctions sont appelées par `+weechat.xxx(arg1, arg2, ...)+`.
Les fonctions sont appelées par `+weechat::xxx arg1 arg2 ...+`.
-Étant donné que Tcl n'a que des types "string", il n'y a pas de type null à
-donner comme paramètre quand une fonctionne accepte des valeurs nulles.
-Pour surmonter cela vous pouvez utiliser la constante `$::weechat::WEECHAT_NULL`
-qui agit comme la valeur nulle. Cette constante est définie avec la valeur
-`\uFFFF\uFFFF\uFFFFWEECHAT_NULL\uFFFF\uFFFF\uFFFF`, il est donc très peu probable
-qu'elle apparaisse de manière non intentionnelle.
+// TRANSLATION MISSING
+[[tcl_null]]
+===== Null values
+
+Since Tcl only has string types, there's no null type to pass as an argument
+when a function accepts null values or to get as an argument in a callback
+function. To overcome this the WeeChat API defines the constant
+`$::weechat::WEECHAT_NULL` which acts as a null value. This constant is defined
+as `\uFFFF\uFFFF\uFFFFWEECHAT_NULL\uFFFF\uFFFF\uFFFF`, so it's very unlikely to
+appear unintentionally.
+
+You can pass this constant when a function accepts null as an argument and you
+will get it as the value of an argument in a callback function if the argument
+value is null. To see which functions accept null values and passes null values
+to callbacks, look at the Python prototypes in the
+link:weechat_plugin_api.en.html[WeeChat plugin API reference ^↗^,window=_blank].
[[language_guile]]
==== Guile (Scheme)
diff --git a/doc/it/weechat_plugin_api.it.adoc b/doc/it/weechat_plugin_api.it.adoc
index 29cfe044f..52bc4cc66 100644
--- a/doc/it/weechat_plugin_api.it.adoc
+++ b/doc/it/weechat_plugin_api.it.adoc
@@ -6691,7 +6691,7 @@ def config_new_section(config_file: str, name: str,
callback_delete_option: str, callback_delete_option_data: str) -> str: ...
# esempio
-def my_section_read_cb(data: str, config_file: str, section: str, option_name: str, value: str) -> int:
+def my_section_read_cb(data: str, config_file: str, section: str, option_name: str, value: str | None) -> int:
# ...
return weechat.WEECHAT_CONFIG_OPTION_SET_OK_CHANGED
# return weechat.WEECHAT_CONFIG_OPTION_SET_OK_SAME_VALUE
@@ -6706,7 +6706,7 @@ def my_section_write_default_cb(data: str, config_file: str, section_name: str)
# ...
return weechat.WEECHAT_CONFIG_WRITE_OK
-def my_section_create_option_cb(data: str, config_file: str, section: str, option_name: str, value: str) -> int:
+def my_section_create_option_cb(data: str, config_file: str, section: str, option_name: str, value: str | None) -> int:
# ...
return weechat.WEECHAT_CONFIG_OPTION_SET_OK_SAME_VALUE
diff --git a/doc/it/weechat_scripting.it.adoc b/doc/it/weechat_scripting.it.adoc
index c31bffdf6..95e703e9d 100644
--- a/doc/it/weechat_scripting.it.adoc
+++ b/doc/it/weechat_scripting.it.adoc
@@ -210,12 +210,23 @@ Functions are called with `+weechat.xxx(arg1, arg2, ...)+`.
Functions are called with `+weechat::xxx arg1 arg2 ...+`.
+// TRANSLATION MISSING
+[[tcl_null]]
+===== Null values
+
Since Tcl only has string types, there's no null type to pass as an argument
-when a function accepts null values. To overcome this you can use the constant
+when a function accepts null values or to get as an argument in a callback
+function. To overcome this the WeeChat API defines the constant
`$::weechat::WEECHAT_NULL` which acts as a null value. This constant is defined
as `\uFFFF\uFFFF\uFFFFWEECHAT_NULL\uFFFF\uFFFF\uFFFF`, so it's very unlikely to
appear unintentionally.
+You can pass this constant when a function accepts null as an argument and you
+will get it as the value of an argument in a callback function if the argument
+value is null. To see which functions accept null values and passes null values
+to callbacks, look at the Python prototypes in the
+link:weechat_plugin_api.en.html[WeeChat plugin API reference ^↗^,window=_blank].
+
[[language_guile]]
==== Guile (Scheme)
diff --git a/doc/ja/weechat_plugin_api.ja.adoc b/doc/ja/weechat_plugin_api.ja.adoc
index 3370a9827..045f58639 100644
--- a/doc/ja/weechat_plugin_api.ja.adoc
+++ b/doc/ja/weechat_plugin_api.ja.adoc
@@ -6494,7 +6494,7 @@ def config_new_section(config_file: str, name: str,
callback_delete_option: str, callback_delete_option_data: str) -> str: ...
# 例
-def my_section_read_cb(data: str, config_file: str, section: str, option_name: str, value: str) -> int:
+def my_section_read_cb(data: str, config_file: str, section: str, option_name: str, value: str | None) -> int:
# ...
return weechat.WEECHAT_CONFIG_OPTION_SET_OK_CHANGED
# return weechat.WEECHAT_CONFIG_OPTION_SET_OK_SAME_VALUE
@@ -6509,7 +6509,7 @@ def my_section_write_default_cb(data: str, config_file: str, section_name: str)
# ...
return weechat.WEECHAT_CONFIG_WRITE_OK
-def my_section_create_option_cb(data: str, config_file: str, section: str, option_name: str, value: str) -> int:
+def my_section_create_option_cb(data: str, config_file: str, section: str, option_name: str, value: str | None) -> int:
# ...
return weechat.WEECHAT_CONFIG_OPTION_SET_OK_SAME_VALUE
diff --git a/doc/ja/weechat_scripting.ja.adoc b/doc/ja/weechat_scripting.ja.adoc
index c9dbc32bb..b853379e9 100644
--- a/doc/ja/weechat_scripting.ja.adoc
+++ b/doc/ja/weechat_scripting.ja.adoc
@@ -208,12 +208,22 @@ Functions are called with `+weechat.xxx(arg1, arg2, ...)+`.
Functions are called with `+weechat::xxx arg1 arg2 ...+`.
// TRANSLATION MISSING
+[[tcl_null]]
+===== Null values
+
Since Tcl only has string types, there's no null type to pass as an argument
-when a function accepts null values. To overcome this you can use the constant
+when a function accepts null values or to get as an argument in a callback
+function. To overcome this the WeeChat API defines the constant
`$::weechat::WEECHAT_NULL` which acts as a null value. This constant is defined
as `\uFFFF\uFFFF\uFFFFWEECHAT_NULL\uFFFF\uFFFF\uFFFF`, so it's very unlikely to
appear unintentionally.
+You can pass this constant when a function accepts null as an argument and you
+will get it as the value of an argument in a callback function if the argument
+value is null. To see which functions accept null values and passes null values
+to callbacks, look at the Python prototypes in the
+link:weechat_plugin_api.en.html[WeeChat plugin API reference ^↗^,window=_blank].
+
[[language_guile]]
==== Guile (Scheme)
diff --git a/doc/pl/weechat_scripting.pl.adoc b/doc/pl/weechat_scripting.pl.adoc
index ac97343e1..3b7abf280 100644
--- a/doc/pl/weechat_scripting.pl.adoc
+++ b/doc/pl/weechat_scripting.pl.adoc
@@ -202,12 +202,22 @@ Funkcje są wywoływane za pomocą `+weechat.xxx(arg1, arg2, ...)+`.
Funkcje są wywoływane za pomocą `+weechat::xxx arg1 arg2 ...+`.
// TRANSLATION MISSING
+[[tcl_null]]
+===== Null values
+
Since Tcl only has string types, there's no null type to pass as an argument
-when a function accepts null values. To overcome this you can use the constant
+when a function accepts null values or to get as an argument in a callback
+function. To overcome this the WeeChat API defines the constant
`$::weechat::WEECHAT_NULL` which acts as a null value. This constant is defined
as `\uFFFF\uFFFF\uFFFFWEECHAT_NULL\uFFFF\uFFFF\uFFFF`, so it's very unlikely to
appear unintentionally.
+You can pass this constant when a function accepts null as an argument and you
+will get it as the value of an argument in a callback function if the argument
+value is null. To see which functions accept null values and passes null values
+to callbacks, look at the Python prototypes in the
+link:weechat_plugin_api.en.html[WeeChat plugin API reference ^↗^,window=_blank].
+
[[language_guile]]
==== Guile (Scheme)
diff --git a/doc/sr/weechat_plugin_api.sr.adoc b/doc/sr/weechat_plugin_api.sr.adoc
index bf0d6a98d..d4e15f088 100644
--- a/doc/sr/weechat_plugin_api.sr.adoc
+++ b/doc/sr/weechat_plugin_api.sr.adoc
@@ -6264,7 +6264,7 @@ def config_new_section(config_file: str, name: str,
callback_delete_option: str, callback_delete_option_data: str) -> str: ...
# пример
-def my_section_read_cb(data: str, config_file: str, section: str, option_name: str, value: str) -> int:
+def my_section_read_cb(data: str, config_file: str, section: str, option_name: str, value: str | None) -> int:
# ...
return weechat.WEECHAT_CONFIG_OPTION_SET_OK_CHANGED
# return weechat.WEECHAT_CONFIG_OPTION_SET_OK_SAME_VALUE
@@ -6279,7 +6279,7 @@ def my_section_write_default_cb(data: str, config_file: str, section_name: str)
# ...
return weechat.WEECHAT_CONFIG_WRITE_OK
-def my_section_create_option_cb(data: str, config_file: str, section: str, option_name: str, value: str) -> int:
+def my_section_create_option_cb(data: str, config_file: str, section: str, option_name: str, value: str | None) -> int:
# ...
return weechat.WEECHAT_CONFIG_OPTION_SET_OK_SAME_VALUE
diff --git a/doc/sr/weechat_scripting.sr.adoc b/doc/sr/weechat_scripting.sr.adoc
index 55808a3c5..991e044c1 100644
--- a/doc/sr/weechat_scripting.sr.adoc
+++ b/doc/sr/weechat_scripting.sr.adoc
@@ -176,11 +176,22 @@ Weechat.bar_new("name", "off", "0", "window", "", "left", "vertical", "vertical"
Функције се позивају са `+weechat::xxx арг1 арг2 ...+`.
-Пошто Tcl има само стринг типове, не постоји null тип који се прослеђује као
-аргумент када функција прихвата null вредности. Ако то желите да заобиђете,
-употребите константу `$::weechat::WEECHAT_NULL` која се има улогу null вредности.
-Ова константа је дефинисана као `\uFFFF\uFFFF\uFFFFWEECHAT_NULL\uFFFF\uFFFF\uFFFF`,
-тако да је скоро немогуће да се појави без намере.
+// TRANSLATION MISSING
+[[tcl_null]]
+===== Null values
+
+Since Tcl only has string types, there's no null type to pass as an argument
+when a function accepts null values or to get as an argument in a callback
+function. To overcome this the WeeChat API defines the constant
+`$::weechat::WEECHAT_NULL` which acts as a null value. This constant is defined
+as `\uFFFF\uFFFF\uFFFFWEECHAT_NULL\uFFFF\uFFFF\uFFFF`, so it's very unlikely to
+appear unintentionally.
+
+You can pass this constant when a function accepts null as an argument and you
+will get it as the value of an argument in a callback function if the argument
+value is null. To see which functions accept null values and passes null values
+to callbacks, look at the Python prototypes in the
+link:weechat_plugin_api.en.html[WeeChat plugin API reference ^↗^,window=_blank].
[[language_guile]]
==== Guile (Scheme)