diff options
author | Sebastien Helleu <flashcode@flashtux.org> | 2012-12-08 23:54:07 +0100 |
---|---|---|
committer | Sebastien Helleu <flashcode@flashtux.org> | 2012-12-08 23:54:07 +0100 |
commit | 641de51bdbd449196c0d54102d17641cd4b5d3d7 (patch) | |
tree | 820e555781f6cb2d55bd06b5b71ee9ef083436d9 /doc | |
parent | 3f2155e548c0ebe86a694f69630f41d7503f679c (diff) | |
download | weechat-641de51bdbd449196c0d54102d17641cd4b5d3d7.zip |
api: allow creation of structure with hdata_update (allowed for hdata "history")
Diffstat (limited to 'doc')
-rw-r--r-- | doc/de/autogen/plugin_api/hdata.txt | 6 | ||||
-rw-r--r-- | doc/docgen.py | 6 | ||||
-rw-r--r-- | doc/en/autogen/plugin_api/hdata.txt | 6 | ||||
-rw-r--r-- | doc/en/weechat_plugin_api.en.txt | 16 | ||||
-rw-r--r-- | doc/fr/autogen/plugin_api/hdata.txt | 6 | ||||
-rw-r--r-- | doc/fr/weechat_plugin_api.fr.txt | 17 | ||||
-rw-r--r-- | doc/it/autogen/plugin_api/hdata.txt | 6 | ||||
-rw-r--r-- | doc/it/weechat_plugin_api.it.txt | 18 | ||||
-rw-r--r-- | doc/ja/autogen/plugin_api/hdata.txt | 6 |
9 files changed, 58 insertions, 29 deletions
diff --git a/doc/de/autogen/plugin_api/hdata.txt b/doc/de/autogen/plugin_api/hdata.txt index f6a441e0d..56aba5055 100644 --- a/doc/de/autogen/plugin_api/hdata.txt +++ b/doc/de/autogen/plugin_api/hdata.txt @@ -561,8 +561,10 @@ 'text' (string) + 'next_history' (pointer, hdata: "history") + 'prev_history' (pointer, hdata: "history") | - | - - + `__create` + + `__delete` | + 'gui_history' + + 'last_gui_history' | weechat | hotlist | Hotliste | 'priority' (integer) + diff --git a/doc/docgen.py b/doc/docgen.py index 569346a43..72e024a31 100644 --- a/doc/docgen.py +++ b/doc/docgen.py @@ -231,10 +231,14 @@ def get_hdata(): if variables_update: variables_update += ' +\n' variables_update += ' %s' % item['text'] + if weechat.hdata_update(ptr_hdata, '', { '__create_allowed' : '' }): + if variables_update: + variables_update += ' +\n' + variables_update += ' `__create`' if weechat.hdata_update(ptr_hdata, '', { '__delete_allowed' : '' }): if variables_update: variables_update += ' +\n' - variables_update += ' \'__delete\'' + variables_update += ' `__delete`' hdata[plugin][hdata_name]['vars'] = '\n%s' % variables hdata[plugin][hdata_name]['vars_update'] = '\n%s' % variables_update diff --git a/doc/en/autogen/plugin_api/hdata.txt b/doc/en/autogen/plugin_api/hdata.txt index 464880912..9f161265b 100644 --- a/doc/en/autogen/plugin_api/hdata.txt +++ b/doc/en/autogen/plugin_api/hdata.txt @@ -561,8 +561,10 @@ 'text' (string) + 'next_history' (pointer, hdata: "history") + 'prev_history' (pointer, hdata: "history") | - | - - + `__create` + + `__delete` | + 'gui_history' + + 'last_gui_history' | weechat | hotlist | hotlist | 'priority' (integer) + diff --git a/doc/en/weechat_plugin_api.en.txt b/doc/en/weechat_plugin_api.en.txt index 5c0bc297e..4b0a663e1 100644 --- a/doc/en/weechat_plugin_api.en.txt +++ b/doc/en/weechat_plugin_api.en.txt @@ -12912,7 +12912,7 @@ something in memory pointed by hdata variables. weechat_hdata_new ^^^^^^^^^^^^^^^^^ -_New in version 0.3.6, updated in 0.3.9._ +_New in version 0.3.6, updated in 0.3.9 and 0.4.0._ Create a new hdata. @@ -12932,7 +12932,7 @@ Prototype: [source,C] ---------------------------------------- struct t_hdata *weechat_hdata_new (const char *hdata_name, const char *var_prev, const char *var_next, - int delete_allowed, + int create_allowed, int delete_allowed, int (*callback_update)(void *data, struct t_hdata *hdata, void *pointer, @@ -12947,6 +12947,8 @@ Arguments: element in list (may be NULL if no such variable is available) * 'var_next': name of variable in structure which is a pointer to next element in list (may be NULL if no such variable is available) +* 'create_allowed': 1 if create of structure is allowed, otherwise 0 + (_new in version 0.4.0_) * 'delete_allowed': 1 if delete of structure is allowed, otherwise 0 (_new in version 0.3.9_) * 'callback_update': callback to update data in hdata, can be NULL if no update @@ -12967,7 +12969,7 @@ C example: [source,C] ---------------------------------------- -struct t_hdata *hdata = weechat_hdata_new ("myplugin_list", "prev", "next", 0, &callback_update, NULL); +struct t_hdata *hdata = weechat_hdata_new ("myplugin_list", "prev", "next", 0, 0, &callback_update, NULL); ---------------------------------------- [NOTE] @@ -14079,11 +14081,13 @@ Arguments: * 'hashtable': variables to update: keys are name of variables, values are new values for variables (keys and values are string), some special keys are allowed: -** key '__delete_allowed' (with any value): return 1 if delete is allowed for +** key `__create_allowed` (with any value): return 1 if create is allowed for + structure, otherwise 0 (_new in version 0.4.0_) +** key `__delete_allowed` (with any value): return 1 if delete is allowed for structure, otherwise 0 -** key '__update_allowed', value is name of a variable: return 1 if update is +** key `__update_allowed`, value is name of a variable: return 1 if update is allowed for this variable, otherwise 0 -** key '__delete' (with any value): delete structure (if allowed) +** key `__delete` (with any value): delete structure (if allowed) Return value: diff --git a/doc/fr/autogen/plugin_api/hdata.txt b/doc/fr/autogen/plugin_api/hdata.txt index 16ca00f49..e03882865 100644 --- a/doc/fr/autogen/plugin_api/hdata.txt +++ b/doc/fr/autogen/plugin_api/hdata.txt @@ -561,8 +561,10 @@ 'text' (string) + 'next_history' (pointer, hdata: "history") + 'prev_history' (pointer, hdata: "history") | - | - - + `__create` + + `__delete` | + 'gui_history' + + 'last_gui_history' | weechat | hotlist | hotlist | 'priority' (integer) + diff --git a/doc/fr/weechat_plugin_api.fr.txt b/doc/fr/weechat_plugin_api.fr.txt index 7a86eb66d..e1a5df460 100644 --- a/doc/fr/weechat_plugin_api.fr.txt +++ b/doc/fr/weechat_plugin_api.fr.txt @@ -13130,7 +13130,7 @@ les variables du hdata. weechat_hdata_new ^^^^^^^^^^^^^^^^^ -_Nouveau dans la version 0.3.6, mis à jour dans la 0.3.9._ +_Nouveau dans la version 0.3.6, mis à jour dans la 0.3.9 et 0.4.0._ Créé un "hdata". @@ -13152,7 +13152,7 @@ Prototype : [source,C] ---------------------------------------- struct t_hdata *weechat_hdata_new (const char *hdata_name, const char *var_prev, const char *var_next, - int delete_allowed, + int create_allowed, int delete_allowed, int (*callback_update)(void *data, struct t_hdata *hdata, void *pointer, @@ -13169,6 +13169,8 @@ Paramètres : * 'var_next' : nom de la variable dans la structure qui est un pointeur vers l'élément suivant dans la liste (peut être NULL si une telle variable n'existe pas) +* 'create_allowed' : 1 si la création de structure est autorisée, sinon 0 + (_nouveau dans la version 0.4.0_) * 'delete_allowed' : 1 si la suppression de structure est autorisée, sinon 0 (_nouveau dans la version 0.3.9_) * 'callback_update' : fonction appelée pour mettre à jour des données dans le @@ -13190,7 +13192,7 @@ Exemple en C : [source,C] ---------------------------------------- -struct t_hdata *hdata = weechat_hdata_new ("myplugin_list", "prev", "next", 0, &callback_update, NULL); +struct t_hdata *hdata = weechat_hdata_new ("myplugin_list", "prev", "next", 0, 0, &callback_update, NULL); ---------------------------------------- [NOTE] @@ -14324,11 +14326,14 @@ Paramètres : variables, les valeurs sont les nouvelles valeurs pour les variables (clés et valeurs sont des chaînes de caractères), quelqes clés spéciales sont acceptées : -** clé '__delete_allowed' (avec n'importe quelle valeur) : retourne 1 si la +** clé `__create_allowed` (avec n'importe quelle valeur) : retourne 1 si la + création est autorisée pour la strucrure, sinon 0 + (_nouveau dans la version 0.4.0_) +** clé `__delete_allowed` (avec n'importe quelle valeur) : retourne 1 si la suppression est autorisée pour la structure, sinon 0 -** clé '__update_allowed', la valeur est le nom d'une variable : retourne 1 si +** clé `__update_allowed`, la valeur est le nom d'une variable : retourne 1 si la mise à jour est autorisée pour la variable, sinon 0 -** clé '__delete' (avec n'importe quelle valeur) : supprime la structure +** clé `__delete` (avec n'importe quelle valeur) : supprime la structure (si autorisé) Valeur de retour : diff --git a/doc/it/autogen/plugin_api/hdata.txt b/doc/it/autogen/plugin_api/hdata.txt index 6fac22ed9..2a130e3ba 100644 --- a/doc/it/autogen/plugin_api/hdata.txt +++ b/doc/it/autogen/plugin_api/hdata.txt @@ -561,8 +561,10 @@ 'text' (string) + 'next_history' (pointer, hdata: "history") + 'prev_history' (pointer, hdata: "history") | - | - - + `__create` + + `__delete` | + 'gui_history' + + 'last_gui_history' | weechat | hotlist | hotlist | 'priority' (integer) + diff --git a/doc/it/weechat_plugin_api.it.txt b/doc/it/weechat_plugin_api.it.txt index add2debc7..6415725ca 100644 --- a/doc/it/weechat_plugin_api.it.txt +++ b/doc/it/weechat_plugin_api.it.txt @@ -13069,7 +13069,7 @@ weechat_hdata_new ^^^^^^^^^^^^^^^^^ // TRANSLATION MISSING -_Novità nella versione 0.3.6, updated in 0.3.9._ +_Novità nella versione 0.3.6, updated in 0.3.9 and 0.4.0._ Crea un nuovo hdata. @@ -13090,7 +13090,7 @@ Prototipo: [source,C] ---------------------------------------- struct t_hdata *weechat_hdata_new (const char *hdata_name, const char *var_prev, const char *var_next, - int delete_allowed, + int create_allowed, int delete_allowed, int (*callback_update)(void *data, struct t_hdata *hdata, void *pointer, @@ -13106,6 +13106,9 @@ Argomenti: * 'var_next': nome della variabile nella struttura che è puntatore all'elemento successivo nella lista (può essere NULL se non è disponibile tale variabile) // TRANSLATION MISSING +* 'create_allowed': 1 if create of structure is allowed, otherwise 0 + (_novità nella versione 0.4.0_) +// TRANSLATION MISSING * 'delete_allowed': 1 if delete of structure is allowed, otherwise 0 (_novità nella versione 0.3.9_) // TRANSLATION MISSING @@ -13127,7 +13130,7 @@ Valore restituito: Esempio in C: source,C] ---------------------------------------- -struct t_hdata *hdata = weechat_hdata_new ("myplugin_list", "prev", "next", 0, &callback_update, NULL); +struct t_hdata *hdata = weechat_hdata_new ("myplugin_list", "prev", "next", 0, 0, &callback_update, NULL); ---------------------------------------- [NOTE] @@ -14264,11 +14267,14 @@ Argomenti: * 'hashtable': variables to update: keys are name of variables, values are new values for variables (keys and values are string), some special keys are allowed: -** key '__delete_allowed' (with any value): return 1 if delete is allowed for +// TRANSLATION MISSING +** key `__create_allowed` (with any value): return 1 if create is allowed for + structure, otherwise 0 (_new in version 0.4.0_) +** key `__delete_allowed` (with any value): return 1 if delete is allowed for structure, otherwise 0 -** key '__update_allowed', value is name of a variable: return 1 if update is +** key `__update_allowed`, value is name of a variable: return 1 if update is allowed for this variable, otherwise 0 -** key '__delete' (with any value): delete structure (if allowed) +** key `__delete` (with any value): delete structure (if allowed) Valore restituito: diff --git a/doc/ja/autogen/plugin_api/hdata.txt b/doc/ja/autogen/plugin_api/hdata.txt index 430ccadf1..1e36c8260 100644 --- a/doc/ja/autogen/plugin_api/hdata.txt +++ b/doc/ja/autogen/plugin_api/hdata.txt @@ -561,8 +561,10 @@ 'text' (string) + 'next_history' (pointer, hdata: "history") + 'prev_history' (pointer, hdata: "history") | - | - - + `__create` + + `__delete` | + 'gui_history' + + 'last_gui_history' | weechat | hotlist | ホットリスト | 'priority' (integer) + |