diff options
author | Sébastien Helleu <flashcode@flashtux.org> | 2024-02-26 07:33:12 +0100 |
---|---|---|
committer | Sébastien Helleu <flashcode@flashtux.org> | 2024-03-12 20:37:11 +0100 |
commit | 9e0dd1815278e189b6fd84046fc78e883cf85704 (patch) | |
tree | a7d8c6ed636ca02227cd140889d2bcc45aa2676e /doc | |
parent | c85b57b8b399b980c5d6725fc33bef83d9727bfb (diff) | |
download | weechat-9e0dd1815278e189b6fd84046fc78e883cf85704.zip |
api: add function "hdata_longlong" (issue #2081)
Diffstat (limited to 'doc')
-rw-r--r-- | doc/en/weechat_plugin_api.en.adoc | 50 | ||||
-rw-r--r-- | doc/fr/weechat_plugin_api.fr.adoc | 52 | ||||
-rw-r--r-- | doc/it/weechat_plugin_api.it.adoc | 54 | ||||
-rw-r--r-- | doc/ja/weechat_plugin_api.ja.adoc | 52 | ||||
-rw-r--r-- | doc/sr/weechat_plugin_api.sr.adoc | 49 |
5 files changed, 248 insertions, 9 deletions
diff --git a/doc/en/weechat_plugin_api.en.adoc b/doc/en/weechat_plugin_api.en.adoc index 5f47df843..4ef7eb658 100644 --- a/doc/en/weechat_plugin_api.en.adoc +++ b/doc/en/weechat_plugin_api.en.adoc @@ -18095,7 +18095,7 @@ This function is not available in scripting API. ==== hdata_new_var -_WeeChat ≥ 0.3.6, updated in 0.3.7, 0.3.9, 0.4.3, 3.4._ +_WeeChat ≥ 0.3.6, updated in 0.3.7, 0.3.9, 0.4.3, 3.4, 4.3.0._ Create a new variable in hdata. @@ -18116,6 +18116,7 @@ Arguments: ** _WEECHAT_HDATA_CHAR_ ** _WEECHAT_HDATA_INTEGER_ ** _WEECHAT_HDATA_LONG_ +** _WEECHAT_HDATA_LONGLONG_ (_WeeChat ≥ 4.3.0_) ** _WEECHAT_HDATA_STRING_ ** _WEECHAT_HDATA_SHARED_STRING_ (_WeeChat ≥ 0.4.3_) ** _WEECHAT_HDATA_POINTER_ @@ -18396,6 +18397,9 @@ switch (type) case WEECHAT_HDATA_LONG: /* ... */ break; + case WEECHAT_HDATA_LONGLONG: + /* ... */ + break; case WEECHAT_HDATA_STRING: /* ... */ break; @@ -18997,7 +19001,7 @@ weechat.prnt("", "number = %d" % weechat.hdata_integer(hdata, buffer, "number")) _WeeChat ≥ 0.3.6._ -Return value of long variable in structure using hdata. +Return value of "long" variable in structure using hdata. Prototype: @@ -19035,6 +19039,48 @@ def hdata_long(hdata: str, pointer: str, name: str) -> int: ... weechat.prnt("", "longvar = %d" % weechat.hdata_long(hdata, pointer, "longvar")) ---- +==== hdata_longlong + +_WeeChat ≥ 4.3.0._ + +Return value of "long long" variable in structure using hdata. + +Prototype: + +[source,c] +---- +long long weechat_hdata_longlong (struct t_hdata *hdata, void *pointer, const char *name); +---- + +Arguments: + +* _hdata_: hdata pointer +* _pointer_: pointer to WeeChat/plugin object +* _name_: variable name (must be type "long long"); for arrays, the name can be + "N|name" where N is the index in array (starting at 0), for example: "2|name" + +Return value: + +* long long value of variable + +C example: + +[source,c] +---- +weechat_printf (NULL, "longlongvar = %lld", weechat_hdata_longlong (hdata, pointer, "longlongvar")); +---- + +Script (Python): + +[source,python] +---- +# prototype +def hdata_longlong(hdata: str, pointer: str, name: str) -> int: ... + +# example +weechat.prnt("", "longlongvar = %d" % weechat.hdata_longlong(hdata, pointer, "longlongvar")) +---- + ==== hdata_string _WeeChat ≥ 0.3.6._ diff --git a/doc/fr/weechat_plugin_api.fr.adoc b/doc/fr/weechat_plugin_api.fr.adoc index ebfd68376..f8afcae20 100644 --- a/doc/fr/weechat_plugin_api.fr.adoc +++ b/doc/fr/weechat_plugin_api.fr.adoc @@ -18476,7 +18476,7 @@ Cette fonction n'est pas disponible dans l'API script. ==== hdata_new_var -_WeeChat ≥ 0.3.6, mis à jour dans la 0.3.7, 0.3.9, 0.4.3, 3.4._ +_WeeChat ≥ 0.3.6, mis à jour dans la 0.3.7, 0.3.9, 0.4.3, 3.4, 4.3.0._ Créer une nouvelle variable dans le hdata. @@ -18497,6 +18497,7 @@ Paramètres : ** _WEECHAT_HDATA_CHAR_ ** _WEECHAT_HDATA_INTEGER_ ** _WEECHAT_HDATA_LONG_ +** _WEECHAT_HDATA_LONGLONG_ (_WeeChat ≥ 4.3.0_) ** _WEECHAT_HDATA_STRING_ ** _WEECHAT_HDATA_SHARED_STRING_ (_WeeChat ≥ 0.4.3_) ** _WEECHAT_HDATA_POINTER_ @@ -18781,6 +18782,9 @@ switch (type) case WEECHAT_HDATA_LONG: /* ... */ break; + case WEECHAT_HDATA_LONGLONG: + /* ... */ + break; case WEECHAT_HDATA_STRING: /* ... */ break; @@ -19392,7 +19396,7 @@ weechat.prnt("", "number = %d" % weechat.hdata_integer(hdata, buffer, "number")) _WeeChat ≥ 0.3.6._ Retourner la valeur de la variable dans la structure en utilisant le hdata, sous -forme d'entier long. +forme d'entier "long". Prototype : @@ -19431,6 +19435,50 @@ def hdata_long(hdata: str, pointer: str, name: str) -> int: ... weechat.prnt("", "longvar = %d" % weechat.hdata_long(hdata, pointer, "longvar")) ---- +==== hdata_longlong + +_WeeChat ≥ 4.3.0._ + +Retourner la valeur de la variable dans la structure en utilisant le hdata, sous +forme d'entier "long long". + +Prototype : + +[source,c] +---- +long long weechat_hdata_longlong (struct t_hdata *hdata, void *pointer, const char *name); +---- + +Paramètres : + +* _hdata_ : pointeur vers le hdata +* _pointer_ : pointeur vers un objet WeeChat ou d'une extension +* _name_ : nom de la variable (doit être de type "long long"); pour les tableaux, + le nom peut être "N|name" où N est un index dans le tableau (démarrant à 0), + par exemple : "2|name" + +Valeur de retour : + +* valeur de la variable, sous forme d'entier "long long". + +Exemple en C : + +[source,c] +---- +weechat_printf (NULL, "longlongvar = %llu", weechat_hdata_longlong (hdata, pointer, "longlongvar")); +---- + +Script (Python) : + +[source,python] +---- +# prototype +def hdata_longlong(hdata: str, pointer: str, name: str) -> int: ... + +# exemple +weechat.prnt("", "longlongvar = %d" % weechat.hdata_longlong(hdata, pointer, "longlongvar")) +---- + ==== hdata_string _WeeChat ≥ 0.3.6._ diff --git a/doc/it/weechat_plugin_api.it.adoc b/doc/it/weechat_plugin_api.it.adoc index f18010656..ac20083bc 100644 --- a/doc/it/weechat_plugin_api.it.adoc +++ b/doc/it/weechat_plugin_api.it.adoc @@ -18923,7 +18923,7 @@ Questa funzione non è disponibile nelle API per lo scripting. ==== hdata_new_var // TRANSLATION MISSING -_WeeChat ≥ 0.3.6, updated in 0.3.7, 0.3.9, 0.4.3, 3.4_ +_WeeChat ≥ 0.3.6, updated in 0.3.7, 0.3.9, 0.4.3, 3.4, 4.3.0_ Crea una nuova variabile in hdata. @@ -18944,6 +18944,7 @@ Argomenti: ** _WEECHAT_HDATA_CHAR_ ** _WEECHAT_HDATA_INTEGER_ ** _WEECHAT_HDATA_LONG_ +** _WEECHAT_HDATA_LONGLONG_ (_WeeChat ≥ 4.3.0_) ** _WEECHAT_HDATA_STRING_ ** _WEECHAT_HDATA_SHARED_STRING_ (_WeeChat ≥ 0.4.3_) ** _WEECHAT_HDATA_POINTER_ @@ -19233,6 +19234,9 @@ switch (type) case WEECHAT_HDATA_LONG: /* ... */ break; + case WEECHAT_HDATA_LONGLONG: + /* ... */ + break; case WEECHAT_HDATA_STRING: /* ... */ break; @@ -19856,7 +19860,7 @@ weechat.prnt("", "number = %d" % weechat.hdata_integer(hdata, buffer, "number")) _WeeChat ≥ 0.3.6._ -Restituisce il valore della variabile long della struttura usando hdata. +Restituisce il valore della variabile "long" della struttura usando hdata. Prototipo: @@ -19896,6 +19900,52 @@ def hdata_long(hdata: str, pointer: str, name: str) -> int: ... weechat.prnt("", "longvar = %d" % weechat.hdata_long(hdata, pointer, "longvar")) ---- +==== hdata_longlong + +_WeeChat ≥ 4.3.0._ + +// TRANSLATION MISSING +Return value of "long long" variable in structure using hdata. + +Prototipo: + +[source,c] +---- +long long weechat_hdata_longlong (struct t_hdata *hdata, void *pointer, const char *name); +---- + +Argomenti: + +* _hdata_: puntatore hdata +* _pointer_: puntatore all'oggetto di WeeChat/plugin +// TRANSLATION MISSING +* _name_: nome della variabile (deve essere di tipo "long long"); for arrays, + the name can be "N|name" where N is the index in array (starting at 0), + for example: "2|name" + +Valore restituito: + +// TRANSLATION MISSING +* "long long" value of variable + +Esempio in C: + +[source,c] +---- +weechat_printf (NULL, "longlongvar = %lld", weechat_hdata_longlong (hdata, pointer, "longlongvar")); +---- + +Script (Python): + +[source,python] +---- +# prototipo +def hdata_longlong(hdata: str, pointer: str, name: str) -> int: ... + +# esempio +weechat.prnt("", "longlongvar = %d" % weechat.hdata_longlong(hdata, pointer, "longlongvar")) +---- + ==== hdata_string _WeeChat ≥ 0.3.6._ diff --git a/doc/ja/weechat_plugin_api.ja.adoc b/doc/ja/weechat_plugin_api.ja.adoc index 1b7189d77..3822fbb67 100644 --- a/doc/ja/weechat_plugin_api.ja.adoc +++ b/doc/ja/weechat_plugin_api.ja.adoc @@ -18338,7 +18338,7 @@ struct t_hdata *hdata = weechat_hdata_new ("myplugin_list", "prev", "next", 0, 0 ==== hdata_new_var // TRANSLATION MISSING -_WeeChat ≥ 0.3.6, updated in 0.3.7, 0.3.9, 0.4.3, 3.4._ +_WeeChat ≥ 0.3.6, updated in 0.3.7, 0.3.9, 0.4.3, 3.4, 4.3.0._ hdata に新しい変数を作成。 @@ -18359,6 +18359,7 @@ void weechat_hdata_new_var (struct t_hdata *hdata, const char *name, int offset, ** _WEECHAT_HDATA_CHAR_ ** _WEECHAT_HDATA_INTEGER_ ** _WEECHAT_HDATA_LONG_ +** _WEECHAT_HDATA_LONGLONG_ (_WeeChat ≥ 4.3.0_) ** _WEECHAT_HDATA_STRING_ ** _WEECHAT_HDATA_SHARED_STRING_ (_WeeChat ≥ 0.4.3_) ** _WEECHAT_HDATA_POINTER_ @@ -18642,6 +18643,9 @@ switch (type) case WEECHAT_HDATA_LONG: /* ... */ break; + case WEECHAT_HDATA_LONGLONG: + /* ... */ + break; case WEECHAT_HDATA_STRING: /* ... */ break; @@ -19243,7 +19247,7 @@ weechat.prnt("", "number = %d" % weechat.hdata_integer(hdata, buffer, "number")) _WeeChat バージョン 0.3.6 以上で利用可。_ -hdata を使って構造体に含まれる long 型変数の値を返す。 +hdata を使って構造体に含まれる "long" 型変数の値を返す。 プロトタイプ: @@ -19281,6 +19285,50 @@ def hdata_long(hdata: str, pointer: str, name: str) -> int: ... weechat.prnt("", "longvar = %d" % weechat.hdata_long(hdata, pointer, "longvar")) ---- +==== hdata_longlong + +_WeeChat バージョン 4.3.0 以上で利用可。_ + +// TRANSLATION MISSING +Return value of "long long" variable in structure using hdata. + +プロトタイプ: + +[source,c] +---- +long long weechat_hdata_longlong (struct t_hdata *hdata, void *pointer, const char *name); +---- + +引数: + +* _hdata_: hdata へのポインタ +* _pointer_: WeeChat および plugin オブジェクトへのポインタ +* _name_: 変数名 (必ず「long long 型」であること); 配列の場合、"N|name" + のように名前を指定することが可能。ここで N は配列のインデックス (1 番目は 0)、例: "2|name" + +戻り値: + +// TRANSLATION MISSING +* "long long" value of variable + +C 言語での使用例: + +[source,c] +---- +weechat_printf (NULL, "longlongvar = %lld", weechat_hdata_longlong (hdata, pointer, "longlongvar")); +---- + +スクリプト (Python) での使用例: + +[source,python] +---- +# プロトタイプ +def hdata_longlong(hdata: str, pointer: str, name: str) -> int: ... + +# 例 +weechat.prnt("", "longlongvar = %d" % weechat.hdata_longlong(hdata, pointer, "longlongvar")) +---- + ==== hdata_string _WeeChat バージョン 0.3.6 以上で利用可。_ diff --git a/doc/sr/weechat_plugin_api.sr.adoc b/doc/sr/weechat_plugin_api.sr.adoc index 4fef6bb08..eae7b8cc4 100644 --- a/doc/sr/weechat_plugin_api.sr.adoc +++ b/doc/sr/weechat_plugin_api.sr.adoc @@ -17607,7 +17607,7 @@ struct t_hdata *hdata = weechat_hdata_new ("myplugin_list", "prev", "next", 0, 0 ==== hdata_new_var -_WeeChat ≥ 0.3.6, ажурирано у верзијама 0.3.7, 0.3.9, 0.4.3 и 3.4._ +_WeeChat ≥ 0.3.6, ажурирано у верзијама 0.3.7, 0.3.9, 0.4.3, 3.4 и 4.3.0._ Креира нову променљиву у hdata. @@ -17628,6 +17628,7 @@ void weechat_hdata_new_var (struct t_hdata *hdata, const char *name, int offset, ** _WEECHAT_HDATA_CHAR_ ** _WEECHAT_HDATA_INTEGER_ ** _WEECHAT_HDATA_LONG_ +** _WEECHAT_HDATA_LONGLONG_ (_WeeChat ≥ 4.3.0_) ** _WEECHAT_HDATA_STRING_ ** _WEECHAT_HDATA_SHARED_STRING_ (_WeeChat ≥ 0.4.3_) ** _WEECHAT_HDATA_POINTER_ @@ -17902,6 +17903,9 @@ switch (type) case WEECHAT_HDATA_LONG: /* ... */ break; + case WEECHAT_HDATA_LONGLONG: + /* ... */ + break; case WEECHAT_HDATA_STRING: /* ... */ break; @@ -18524,6 +18528,49 @@ def hdata_long(hdata: str, pointer: str, name: str) -> int: ... weechat.prnt("", "longvar = %d" % weechat.hdata_long(hdata, pointer, "longvar")) ---- +==== hdata_longlong + +_WeeChat ≥ 4.3.0._ + +// TRANSLATION MISSING +Return value of "long long" variable in structure using hdata. + +Прототип: + +[source,c] +---- +long long weechat_hdata_longlong (struct t_hdata *hdata, void *pointer, const char *name); +---- + +Аргументи: + +* _hdata_: показивач на hdata +* _pointer_: показивач на објекат програма WeeChat/додатка +* _name_: име променљиве (мора бити типа „long long”); у случају низова, име може да буде „N|име” где је N индекс низа (који почиње од 0), на пример: „2|име” + +Повратна вредност: + +// TRANSLATION MISSING +* "long long" value of variable + +C пример: + +[source,c] +---- +weechat_printf (NULL, "longlongvar = %lld", weechat_hdata_longlong (hdata, pointer, "longlongvar")); +---- + +Скрипта (Python): + +[source,python] +---- +# прототип +def hdata_longlong(hdata: str, pointer: str, name: str) -> int: ... + +# пример +weechat.prnt("", "longlongvar = %d" % weechat.hdata_longlong(hdata, pointer, "longlongvar")) +---- + ==== hdata_string _WeeChat ≥ 0.3.6._ |