doc: add callback pointer in doc of upgrade functions (plugin API reference)
parent
8de6f212ca
commit
4fa2edc865
|
@ -4286,8 +4286,7 @@ Arguments:
|
|||
WeeChat
|
||||
* 'callback_reload_data': pointer given to callback when it is called by
|
||||
WeeChat; if not NULL, it must have been allocated with malloc (or similar
|
||||
function) and it will be automatically freed when the configuration file is
|
||||
freed
|
||||
function) and it is automatically freed when the configuration file is freed
|
||||
|
||||
Return value:
|
||||
|
||||
|
@ -4408,7 +4407,7 @@ Arguments:
|
|||
WeeChat
|
||||
* 'callback_read_data': pointer given to callback when it is called by WeeChat;
|
||||
if not NULL, it must have been allocated with malloc (or similar function)
|
||||
and it will be automatically freed when the section is freed
|
||||
and it is automatically freed when the section is freed
|
||||
* 'callback_write': function called when section is written in file (should be
|
||||
NULL for most cases, except if section needs to be written by a custom
|
||||
function), arguments and return value:
|
||||
|
@ -4425,7 +4424,7 @@ Arguments:
|
|||
WeeChat
|
||||
* 'callback_write_data': pointer given to callback when it is called by WeeChat;
|
||||
if not NULL, it must have been allocated with malloc (or similar function)
|
||||
and it will be automatically freed when the section is freed
|
||||
and it is automatically freed when the section is freed
|
||||
* callback_write_default: function called when default values for section must
|
||||
be written in file, arguments and return value:
|
||||
** 'const void *pointer': pointer
|
||||
|
@ -4440,7 +4439,7 @@ Arguments:
|
|||
by WeeChat
|
||||
* 'callback_write_default_data': pointer given to callback when it is called by
|
||||
WeeChat; if not NULL, it must have been allocated with malloc (or similar
|
||||
function) and it will be automatically freed when the section is freed
|
||||
function) and it is automatically freed when the section is freed
|
||||
* 'callback_create_option': function called when a new option is created in
|
||||
section (NULL if section does not allow new options to be created),
|
||||
arguments and return value:
|
||||
|
@ -4459,7 +4458,7 @@ Arguments:
|
|||
by WeeChat
|
||||
* 'callback_create_option_data': pointer given to callback when it is called by
|
||||
WeeChat; if not NULL, it must have been allocated with malloc (or similar
|
||||
function) and it will be automatically freed when the section is freed
|
||||
function) and it is automatically freed when the section is freed
|
||||
* 'callback_delete_option': function called when an option is deleted in
|
||||
section (NULL if section does not allow options to be deleted),
|
||||
arguments and return value:
|
||||
|
@ -4477,7 +4476,7 @@ Arguments:
|
|||
by WeeChat
|
||||
* 'callback_delete_option_data': pointer given to callback when it is called by
|
||||
WeeChat; if not NULL, it must have been allocated with malloc (or similar
|
||||
function) and it will be automatically freed when the section is freed
|
||||
function) and it is automatically freed when the section is freed
|
||||
|
||||
Return value:
|
||||
|
||||
|
@ -4727,7 +4726,7 @@ Arguments:
|
|||
is called by WeeChat
|
||||
* 'callback_check_value_data': pointer given to callback when it is called by
|
||||
WeeChat; if not NULL, it must have been allocated with malloc (or similar
|
||||
function) and it will be automatically freed when the option is freed
|
||||
function) and it is automatically freed when the option is freed
|
||||
* 'callback_change': function called when value of option has changed
|
||||
(optional), arguments:
|
||||
** 'const void *pointer': pointer
|
||||
|
@ -4737,7 +4736,7 @@ Arguments:
|
|||
by WeeChat
|
||||
* 'callback_change_data': pointer given to callback when it is called by
|
||||
WeeChat; if not NULL, it must have been allocated with malloc (or similar
|
||||
function) and it will be automatically freed when the option is freed
|
||||
function) and it is automatically freed when the option is freed
|
||||
* 'callback_delete': function called when option will be deleted (optional),
|
||||
arguments:
|
||||
** 'const void *pointer': pointer
|
||||
|
@ -4747,7 +4746,7 @@ Arguments:
|
|||
by WeeChat
|
||||
* 'callback_delete_data': pointer given to callback when it is called by
|
||||
WeeChat; if not NULL, it must have been allocated with malloc (or similar
|
||||
function) and it will be automatically freed when the option is freed
|
||||
function) and it is automatically freed when the option is freed
|
||||
|
||||
Return value:
|
||||
|
||||
|
@ -7126,7 +7125,7 @@ Arguments:
|
|||
* 'callback_pointer': pointer given to callback when it is called by WeeChat
|
||||
* 'callback_data': pointer given to callback when it is called by WeeChat;
|
||||
if not NULL, it must have been allocated with malloc (or similar function)
|
||||
and it will be automatically freed when the hook is deleted
|
||||
and it is automatically freed when the hook is deleted
|
||||
|
||||
Default completion codes are:
|
||||
|
||||
|
@ -7252,7 +7251,7 @@ Arguments:
|
|||
* 'callback_pointer': pointer given to callback when it is called by WeeChat
|
||||
* 'callback_data': pointer given to callback when it is called by WeeChat;
|
||||
if not NULL, it must have been allocated with malloc (or similar function)
|
||||
and it will be automatically freed when the hook is deleted
|
||||
and it is automatically freed when the hook is deleted
|
||||
|
||||
[NOTE]
|
||||
Callback can return 'WEECHAT_RC_OK' or 'WEECHAT_RC_OK_EAT' (command will not
|
||||
|
@ -7328,7 +7327,7 @@ Arguments:
|
|||
* 'callback_pointer': pointer given to callback when it is called by WeeChat
|
||||
* 'callback_data': pointer given to callback when it is called by WeeChat;
|
||||
if not NULL, it must have been allocated with malloc (or similar function)
|
||||
and it will be automatically freed when the hook is deleted
|
||||
and it is automatically freed when the hook is deleted
|
||||
|
||||
Return value:
|
||||
|
||||
|
@ -7404,7 +7403,7 @@ Arguments:
|
|||
* 'callback_pointer': pointer given to callback when it is called by WeeChat
|
||||
* 'callback_data': pointer given to callback when it is called by WeeChat;
|
||||
if not NULL, it must have been allocated with malloc (or similar function)
|
||||
and it will be automatically freed when the hook is deleted
|
||||
and it is automatically freed when the hook is deleted
|
||||
|
||||
Return value:
|
||||
|
||||
|
@ -7500,7 +7499,7 @@ Arguments:
|
|||
* 'callback_pointer': pointer given to callback when it is called by WeeChat
|
||||
* 'callback_data': pointer given to callback when it is called by WeeChat;
|
||||
if not NULL, it must have been allocated with malloc (or similar function)
|
||||
and it will be automatically freed when the hook is deleted
|
||||
and it is automatically freed when the hook is deleted
|
||||
|
||||
Return value:
|
||||
|
||||
|
@ -7869,7 +7868,7 @@ Arguments:
|
|||
* 'callback_pointer': pointer given to callback when it is called by WeeChat
|
||||
* 'callback_data': pointer given to callback when it is called by WeeChat;
|
||||
if not NULL, it must have been allocated with malloc (or similar function)
|
||||
and it will be automatically freed when the hook is deleted
|
||||
and it is automatically freed when the hook is deleted
|
||||
|
||||
Return value:
|
||||
|
||||
|
@ -8026,7 +8025,7 @@ Arguments:
|
|||
* 'callback_pointer': pointer given to callback when it is called by WeeChat
|
||||
* 'callback_data': pointer given to callback when it is called by WeeChat;
|
||||
if not NULL, it must have been allocated with malloc (or similar function)
|
||||
and it will be automatically freed when the hook is deleted
|
||||
and it is automatically freed when the hook is deleted
|
||||
|
||||
Return value:
|
||||
|
||||
|
@ -8114,7 +8113,7 @@ Arguments:
|
|||
* 'callback_pointer': pointer given to callback when it is called by WeeChat
|
||||
* 'callback_data': pointer given to callback when it is called by WeeChat;
|
||||
if not NULL, it must have been allocated with malloc (or similar function)
|
||||
and it will be automatically freed when the hook is deleted
|
||||
and it is automatically freed when the hook is deleted
|
||||
|
||||
Return value:
|
||||
|
||||
|
@ -9028,7 +9027,7 @@ Arguments:
|
|||
* 'callback_pointer': pointer given to callback when it is called by WeeChat
|
||||
* 'callback_data': pointer given to callback when it is called by WeeChat;
|
||||
if not NULL, it must have been allocated with malloc (or similar function)
|
||||
and it will be automatically freed when the hook is deleted
|
||||
and it is automatically freed when the hook is deleted
|
||||
|
||||
Return value:
|
||||
|
||||
|
@ -9388,7 +9387,7 @@ Arguments:
|
|||
* 'callback_pointer': pointer given to callback when it is called by WeeChat
|
||||
* 'callback_data': pointer given to callback when it is called by WeeChat;
|
||||
if not NULL, it must have been allocated with malloc (or similar function)
|
||||
and it will be automatically freed when the hook is deleted
|
||||
and it is automatically freed when the hook is deleted
|
||||
|
||||
Return value:
|
||||
|
||||
|
@ -9466,7 +9465,7 @@ Arguments:
|
|||
* 'callback_pointer': pointer given to callback when it is called by WeeChat
|
||||
* 'callback_data': pointer given to callback when it is called by WeeChat;
|
||||
if not NULL, it must have been allocated with malloc (or similar function)
|
||||
and it will be automatically freed when the hook is deleted
|
||||
and it is automatically freed when the hook is deleted
|
||||
|
||||
[NOTE]
|
||||
Completion names are global (shared across WeeChat and plugins). So it is
|
||||
|
@ -9649,7 +9648,7 @@ Arguments:
|
|||
* 'callback_pointer': pointer given to callback when it is called by WeeChat
|
||||
* 'callback_data': pointer given to callback when it is called by WeeChat;
|
||||
if not NULL, it must have been allocated with malloc (or similar function)
|
||||
and it will be automatically freed when the hook is deleted
|
||||
and it is automatically freed when the hook is deleted
|
||||
|
||||
Return value:
|
||||
|
||||
|
@ -9890,7 +9889,7 @@ Arguments:
|
|||
* 'callback_pointer': pointer given to callback when it is called by WeeChat
|
||||
* 'callback_data': pointer given to callback when it is called by WeeChat;
|
||||
if not NULL, it must have been allocated with malloc (or similar function)
|
||||
and it will be automatically freed when the hook is deleted
|
||||
and it is automatically freed when the hook is deleted
|
||||
|
||||
Return value:
|
||||
|
||||
|
@ -9968,7 +9967,7 @@ Arguments:
|
|||
* 'callback_pointer': pointer given to callback when it is called by WeeChat
|
||||
* 'callback_data': pointer given to callback when it is called by WeeChat;
|
||||
if not NULL, it must have been allocated with malloc (or similar function)
|
||||
and it will be automatically freed when the hook is deleted
|
||||
and it is automatically freed when the hook is deleted
|
||||
|
||||
Return value:
|
||||
|
||||
|
@ -10051,7 +10050,7 @@ Arguments:
|
|||
* 'callback_pointer': pointer given to callback when it is called by WeeChat
|
||||
* 'callback_data': pointer given to callback when it is called by WeeChat;
|
||||
if not NULL, it must have been allocated with malloc (or similar function)
|
||||
and it will be automatically freed when the hook is deleted
|
||||
and it is automatically freed when the hook is deleted
|
||||
|
||||
Return value:
|
||||
|
||||
|
@ -10130,7 +10129,7 @@ Arguments:
|
|||
* 'callback_pointer': pointer given to callback when it is called by WeeChat
|
||||
* 'callback_data': pointer given to callback when it is called by WeeChat;
|
||||
if not NULL, it must have been allocated with malloc (or similar function)
|
||||
and it will be automatically freed when the hook is deleted
|
||||
and it is automatically freed when the hook is deleted
|
||||
|
||||
Return value:
|
||||
|
||||
|
@ -10193,7 +10192,7 @@ Arguments:
|
|||
* 'callback_pointer': pointer given to callback when it is called by WeeChat
|
||||
* 'callback_data': pointer given to callback when it is called by WeeChat;
|
||||
if not NULL, it must have been allocated with malloc (or similar function)
|
||||
and it will be automatically freed when the hook is deleted
|
||||
and it is automatically freed when the hook is deleted
|
||||
|
||||
[IMPORTANT]
|
||||
For a mouse gesture, your callback will be called two times: first time when
|
||||
|
@ -10554,7 +10553,7 @@ Arguments:
|
|||
WeeChat
|
||||
* 'input_callback_data': pointer given to callback when it is called by
|
||||
WeeChat; if not NULL, it must have been allocated with malloc (or similar
|
||||
function) and it will be automatically freed when the buffer is closed
|
||||
function) and it is automatically freed when the buffer is closed
|
||||
* 'close_callback': function called when buffer is closed, arguments and return
|
||||
value:
|
||||
** 'const void *pointer': pointer
|
||||
|
@ -10567,7 +10566,7 @@ Arguments:
|
|||
WeeChat
|
||||
* 'close_callback_data': pointer given to callback when it is called by
|
||||
WeeChat; if not NULL, it must have been allocated with malloc (or similar
|
||||
function) and it will be automatically freed when the buffer is closed
|
||||
function) and it is automatically freed when the buffer is closed
|
||||
|
||||
Return value:
|
||||
|
||||
|
@ -15385,22 +15384,44 @@ Functions for upgrading WeeChat (command "/upgrade").
|
|||
|
||||
==== upgrade_new
|
||||
|
||||
_Updated in 1.5._
|
||||
|
||||
Create or read a file for upgrade.
|
||||
|
||||
Prototype:
|
||||
|
||||
[source,C]
|
||||
----
|
||||
struct t_upgrade_file *weechat_upgrade_new (const char *filename, int write);
|
||||
struct t_upgrade_file *upgrade_file_new (const char *filename,
|
||||
int (*callback_read)(const void *pointer,
|
||||
void *data,
|
||||
struct t_upgrade_file *upgrade_file,
|
||||
int object_id,
|
||||
struct t_infolist *infolist),
|
||||
const void *callback_read_pointer,
|
||||
void *callback_read_data);
|
||||
----
|
||||
|
||||
Arguments:
|
||||
|
||||
* 'filename': name of file (extension ".upgrade" will be added to this name by
|
||||
* 'filename': name of file (extension ".upgrade" is added to this name by
|
||||
WeeChat)
|
||||
* 'write':
|
||||
** '1': create file (write mode, before upgrade)
|
||||
** '0': read file (after upgrade)
|
||||
* 'callback_read': function called for each object read in upgrade file
|
||||
(if NULL, the upgrade file is opened in write mode), arguments and return
|
||||
value:
|
||||
** 'const void *pointer': pointer
|
||||
** 'void *data': pointer
|
||||
** 'struct t_upgrade_file *upgrade_file': pointer to upgrade file
|
||||
** 'int object_id': object id
|
||||
** 'struct t_infolist *infolist': infolist with content of object
|
||||
** return value:
|
||||
*** 'WEECHAT_RC_OK'
|
||||
*** 'WEECHAT_RC_ERROR'
|
||||
* 'callback_read_pointer': pointer given to callback when it is called by
|
||||
WeeChat
|
||||
* 'callback_read_data': pointer given to callback when it is called by WeeChat;
|
||||
if not NULL, it must have been allocated with malloc (or similar function)
|
||||
and it is automatically freed when the upgrade file is closed
|
||||
|
||||
Return value:
|
||||
|
||||
|
@ -15410,7 +15431,8 @@ C example:
|
|||
|
||||
[source,C]
|
||||
----
|
||||
struct t_upgrade_file *upgrade_file = weechat_upgrade_new ("my_file", 1);
|
||||
struct t_upgrade_file *upgrade_file = weechat_upgrade_new ("my_file",
|
||||
NULL, NULL, NULL);
|
||||
----
|
||||
|
||||
Script (Python):
|
||||
|
@ -15418,10 +15440,10 @@ Script (Python):
|
|||
[source,python]
|
||||
----
|
||||
# prototype
|
||||
upgrade_file = weechat.upgrade_new(filename, write)
|
||||
upgrade_file = weechat.upgrade_new(filename, callback_read, callback_read_data)
|
||||
|
||||
# example
|
||||
upgrade_file = weechat.upgrade_new("my_file", 1)
|
||||
upgrade_file = weechat.upgrade_new("my_file", "", "")
|
||||
----
|
||||
|
||||
==== upgrade_write_object
|
||||
|
@ -15474,34 +15496,20 @@ weechat.upgrade_write_object(upgrade_file, 1, infolist)
|
|||
|
||||
==== upgrade_read
|
||||
|
||||
_Updated in 1.5._
|
||||
|
||||
Read an upgrade file.
|
||||
|
||||
Prototype:
|
||||
|
||||
[source,C]
|
||||
----
|
||||
int weechat_upgrade_read (struct t_upgrade_file *upgrade_file,
|
||||
int (*callback_read)(void *data,
|
||||
struct t_upgrade_file *upgrade_file,
|
||||
int object_id,
|
||||
struct t_infolist *infolist),
|
||||
void *callback_read_data);
|
||||
int weechat_upgrade_read (struct t_upgrade_file *upgrade_file);
|
||||
----
|
||||
|
||||
Arguments:
|
||||
|
||||
* 'upgrade_file': upgrade file pointer
|
||||
* 'callback_read': function called for each object read in upgrade file,
|
||||
arguments and return value:
|
||||
** 'void *data': pointer
|
||||
** 'struct t_upgrade_file *upgrade_file': pointer to upgrade file
|
||||
** 'int object_id': object id
|
||||
** 'struct t_infolist *infolist': infolist with content of object
|
||||
** return value:
|
||||
*** 'WEECHAT_RC_OK'
|
||||
*** 'WEECHAT_RC_ERROR'
|
||||
* 'callback_read_data': pointer given to read callback when it is called by
|
||||
WeeChat
|
||||
|
||||
Return value:
|
||||
|
||||
|
@ -15511,16 +15519,7 @@ C example:
|
|||
|
||||
[source,C]
|
||||
----
|
||||
int
|
||||
my_upgrade_read_cb (struct t_upgrade_file *upgrade_file,
|
||||
int object_id,
|
||||
struct t_infolist *infolist)
|
||||
{
|
||||
/* read variables... */
|
||||
return WEECHAT_RC_OK;
|
||||
}
|
||||
|
||||
weechat_upgrade_read (upgrade_file, &my_upgrade_read_cb, NULL);
|
||||
weechat_upgrade_read (upgrade_file);
|
||||
----
|
||||
|
||||
Script (Python):
|
||||
|
@ -15528,14 +15527,10 @@ Script (Python):
|
|||
[source,python]
|
||||
----
|
||||
# prototype
|
||||
rc = weechat.upgrade_read(upgrade_file, callback_read, callback_read_data)
|
||||
rc = weechat.upgrade_read(upgrade_file)
|
||||
|
||||
# example
|
||||
def my_upgrade_read_cb(upgrade_file, object_id, infolist):
|
||||
# read variables...
|
||||
return weechat.WEECHAT_RC_OK
|
||||
|
||||
weechat.upgrade_read(upgrade_file, "my_upgrade_read_cb", ""))
|
||||
weechat.upgrade_read(upgrade_file)
|
||||
----
|
||||
|
||||
==== upgrade_close
|
||||
|
|
|
@ -4358,7 +4358,7 @@ Paramètres :
|
|||
lorsqu'il est appelé par WeeChat
|
||||
* 'callback_reload_data' : pointeur donné au "callback" lorsqu'il est appelé
|
||||
par WeeChat; si non NULL, doit avoir été alloué par malloc (ou une fonction
|
||||
similaire) et sera automatiquement libéré (par free) lorsque le fichier de
|
||||
similaire) et est automatiquement libéré (par free) lorsque le fichier de
|
||||
configuration est libéré
|
||||
|
||||
Valeur de retour :
|
||||
|
@ -4482,7 +4482,7 @@ Paramètres :
|
|||
par WeeChat
|
||||
* 'callback_read_data' : pointeur donné au "callback" lorsqu'il est appelé
|
||||
par WeeChat; si non NULL, doit avoir été alloué par malloc (ou une fonction
|
||||
similaire) et sera automatiquement libéré (par free) lorsque la section est
|
||||
similaire) et est automatiquement libéré (par free) lorsque la section est
|
||||
libérée
|
||||
* 'callback_write' : fonction appelée lorsque la section est écrite dans le
|
||||
fichier (devrait être NULL dans la plupart des cas, sauf si la section
|
||||
|
@ -4502,7 +4502,7 @@ Paramètres :
|
|||
par WeeChat
|
||||
* 'callback_write_data' : pointeur donné au "callback" lorsqu'il est appelé
|
||||
par WeeChat; si non NULL, doit avoir été alloué par malloc (ou une fonction
|
||||
similaire) et sera automatiquement libéré (par free) lorsque la section est
|
||||
similaire) et est automatiquement libéré (par free) lorsque la section est
|
||||
libérée
|
||||
* callback_write_default : fonction appelée lorsque les valeurs par défaut
|
||||
doivent être écrites dans le fichier, paramètres et valeur de retour :
|
||||
|
@ -4519,7 +4519,7 @@ Paramètres :
|
|||
appelé par WeeChat
|
||||
* 'callback_write_default_data' : pointeur donné au "callback" lorsqu'il est
|
||||
appelé par WeeChat; si non NULL, doit avoir été alloué par malloc (ou une
|
||||
fonction similaire) et sera automatiquement libéré (par free) lorsque la
|
||||
fonction similaire) et est automatiquement libéré (par free) lorsque la
|
||||
section est libérée
|
||||
* 'callback_create_option' : fonction appelée lorsqu'une nouvelle option est
|
||||
créée dans la section (NULL si la section n'autorise pas la création de
|
||||
|
@ -4535,7 +4535,7 @@ Paramètres :
|
|||
appelé par WeeChat
|
||||
* 'callback_create_option_data' : pointeur donné au "callback" lorsqu'il est
|
||||
appelé par WeeChat; si non NULL, doit avoir été alloué par malloc (ou une
|
||||
fonction similaire) et sera automatiquement libéré (par free) lorsque la
|
||||
fonction similaire) et est automatiquement libéré (par free) lorsque la
|
||||
section est libérée
|
||||
* 'callback_delete_option' : fonction appelée lorsqu'une option est supprimée
|
||||
de la section (NULL si la section n'autorise pas la suppression d'options),
|
||||
|
@ -4555,7 +4555,7 @@ Paramètres :
|
|||
appelé par WeeChat
|
||||
* 'callback_delete_option_data' : pointeur donné au "callback" lorsqu'il est
|
||||
appelé par WeeChat; si non NULL, doit avoir été alloué par malloc (ou une
|
||||
fonction similaire) et sera automatiquement libéré (par free) lorsque la
|
||||
fonction similaire) et est automatiquement libéré (par free) lorsque la
|
||||
section est libérée
|
||||
|
||||
Valeur de retour :
|
||||
|
@ -4808,7 +4808,7 @@ Paramètres :
|
|||
appelé par WeeChat
|
||||
* 'callback_check_value_data' : pointeur donné au "callback" lorsqu'il est
|
||||
appelé par WeeChat; si non NULL, doit avoir été alloué par malloc (ou une
|
||||
fonction similaire) et sera automatiquement libéré (par free) lorsque
|
||||
fonction similaire) et est automatiquement libéré (par free) lorsque
|
||||
l'option est libérée
|
||||
* 'callback_change' : fonction appelée lorsque la valeur de l'option a changé
|
||||
(optionnel), paramètres :
|
||||
|
@ -4819,7 +4819,7 @@ Paramètres :
|
|||
par WeeChat
|
||||
* 'callback_change_data' : pointeur donné au "callback" lorsqu'il est appelé
|
||||
par WeeChat; si non NULL, doit avoir été alloué par malloc (ou une fonction
|
||||
similaire) et sera automatiquement libéré (par free) lorsque l'option est
|
||||
similaire) et est automatiquement libéré (par free) lorsque l'option est
|
||||
libérée
|
||||
* 'callback_delete' : fonction appelée lorsque l'option est supprimée
|
||||
(optionnel), paramètres :
|
||||
|
@ -4830,7 +4830,7 @@ Paramètres :
|
|||
par WeeChat
|
||||
* 'callback_delete_data' : pointeur donné au "callback" lorsqu'il est appelé
|
||||
par WeeChat; si non NULL, doit avoir été alloué par malloc (ou une fonction
|
||||
similaire) et sera automatiquement libéré (par free) lorsque l'option est
|
||||
similaire) et est automatiquement libéré (par free) lorsque l'option est
|
||||
libérée
|
||||
|
||||
Valeur de retour :
|
||||
|
@ -7251,7 +7251,7 @@ Paramètres :
|
|||
WeeChat
|
||||
* 'callback_data' : pointeur donné au "callback" lorsqu'il est appelé par
|
||||
WeeChat; si non NULL, doit avoir été alloué par malloc (ou une fonction
|
||||
similaire) et sera automatiquement libéré (par free) lorsque le "hook" est
|
||||
similaire) et est automatiquement libéré (par free) lorsque le "hook" est
|
||||
supprimé
|
||||
|
||||
Les codes complétions par défaut sont :
|
||||
|
@ -7380,7 +7380,7 @@ Paramètres :
|
|||
WeeChat
|
||||
* 'callback_data' : pointeur donné au "callback" lorsqu'il est appelé par
|
||||
WeeChat; si non NULL, doit avoir été alloué par malloc (ou une fonction
|
||||
similaire) et sera automatiquement libéré (par free) lorsque le "hook" est
|
||||
similaire) et est automatiquement libéré (par free) lorsque le "hook" est
|
||||
supprimé
|
||||
|
||||
[NOTE]
|
||||
|
@ -7462,7 +7462,7 @@ Paramètres :
|
|||
WeeChat
|
||||
* 'callback_data' : pointeur donné au "callback" lorsqu'il est appelé par
|
||||
WeeChat; si non NULL, doit avoir été alloué par malloc (ou une fonction
|
||||
similaire) et sera automatiquement libéré (par free) lorsque le "hook" est
|
||||
similaire) et est automatiquement libéré (par free) lorsque le "hook" est
|
||||
supprimé
|
||||
|
||||
Valeur de retour :
|
||||
|
@ -7540,7 +7540,7 @@ Paramètres :
|
|||
WeeChat
|
||||
* 'callback_data' : pointeur donné au "callback" lorsqu'il est appelé par
|
||||
WeeChat; si non NULL, doit avoir été alloué par malloc (ou une fonction
|
||||
similaire) et sera automatiquement libéré (par free) lorsque le "hook" est
|
||||
similaire) et est automatiquement libéré (par free) lorsque le "hook" est
|
||||
supprimé
|
||||
|
||||
Valeur de retour :
|
||||
|
@ -7640,7 +7640,7 @@ Paramètres :
|
|||
WeeChat
|
||||
* 'callback_data' : pointeur donné au "callback" lorsqu'il est appelé par
|
||||
WeeChat; si non NULL, doit avoir été alloué par malloc (ou une fonction
|
||||
similaire) et sera automatiquement libéré (par free) lorsque le "hook" est
|
||||
similaire) et est automatiquement libéré (par free) lorsque le "hook" est
|
||||
supprimé
|
||||
|
||||
Valeur de retour :
|
||||
|
@ -8024,7 +8024,7 @@ Paramètres :
|
|||
WeeChat
|
||||
* 'callback_data' : pointeur donné au "callback" lorsqu'il est appelé par
|
||||
WeeChat; si non NULL, doit avoir été alloué par malloc (ou une fonction
|
||||
similaire) et sera automatiquement libéré (par free) lorsque le "hook" est
|
||||
similaire) et est automatiquement libéré (par free) lorsque le "hook" est
|
||||
supprimé
|
||||
|
||||
Valeur de retour :
|
||||
|
@ -8185,7 +8185,7 @@ Paramètres :
|
|||
WeeChat
|
||||
* 'callback_data' : pointeur donné au "callback" lorsqu'il est appelé par
|
||||
WeeChat; si non NULL, doit avoir été alloué par malloc (ou une fonction
|
||||
similaire) et sera automatiquement libéré (par free) lorsque le "hook" est
|
||||
similaire) et est automatiquement libéré (par free) lorsque le "hook" est
|
||||
supprimé
|
||||
|
||||
Valeur de retour :
|
||||
|
@ -8276,7 +8276,7 @@ Paramètres :
|
|||
WeeChat
|
||||
* 'callback_data' : pointeur donné au "callback" lorsqu'il est appelé par
|
||||
WeeChat; si non NULL, doit avoir été alloué par malloc (ou une fonction
|
||||
similaire) et sera automatiquement libéré (par free) lorsque le "hook" est
|
||||
similaire) et est automatiquement libéré (par free) lorsque le "hook" est
|
||||
supprimé
|
||||
|
||||
Valeur de retour :
|
||||
|
@ -9202,7 +9202,7 @@ Paramètres :
|
|||
WeeChat
|
||||
* 'callback_data' : pointeur donné au "callback" lorsqu'il est appelé par
|
||||
WeeChat; si non NULL, doit avoir été alloué par malloc (ou une fonction
|
||||
similaire) et sera automatiquement libéré (par free) lorsque le "hook" est
|
||||
similaire) et est automatiquement libéré (par free) lorsque le "hook" est
|
||||
supprimé
|
||||
|
||||
Valeur de retour :
|
||||
|
@ -9575,7 +9575,7 @@ Paramètres :
|
|||
WeeChat
|
||||
* 'callback_data' : pointeur donné au "callback" lorsqu'il est appelé par
|
||||
WeeChat; si non NULL, doit avoir été alloué par malloc (ou une fonction
|
||||
similaire) et sera automatiquement libéré (par free) lorsque le "hook" est
|
||||
similaire) et est automatiquement libéré (par free) lorsque le "hook" est
|
||||
supprimé
|
||||
|
||||
Valeur de retour :
|
||||
|
@ -9656,7 +9656,7 @@ Paramètres :
|
|||
WeeChat
|
||||
* 'callback_data' : pointeur donné au "callback" lorsqu'il est appelé par
|
||||
WeeChat; si non NULL, doit avoir été alloué par malloc (ou une fonction
|
||||
similaire) et sera automatiquement libéré (par free) lorsque le "hook" est
|
||||
similaire) et est automatiquement libéré (par free) lorsque le "hook" est
|
||||
supprimé
|
||||
|
||||
[NOTE]
|
||||
|
@ -9844,7 +9844,7 @@ Paramètres :
|
|||
WeeChat
|
||||
* 'callback_data' : pointeur donné au "callback" lorsqu'il est appelé par
|
||||
WeeChat; si non NULL, doit avoir été alloué par malloc (ou une fonction
|
||||
similaire) et sera automatiquement libéré (par free) lorsque le "hook" est
|
||||
similaire) et est automatiquement libéré (par free) lorsque le "hook" est
|
||||
supprimé
|
||||
|
||||
Valeur de retour :
|
||||
|
@ -10097,7 +10097,7 @@ Paramètres :
|
|||
WeeChat
|
||||
* 'callback_data' : pointeur donné au "callback" lorsqu'il est appelé par
|
||||
WeeChat; si non NULL, doit avoir été alloué par malloc (ou une fonction
|
||||
similaire) et sera automatiquement libéré (par free) lorsque le "hook" est
|
||||
similaire) et est automatiquement libéré (par free) lorsque le "hook" est
|
||||
supprimé
|
||||
|
||||
Valeur de retour :
|
||||
|
@ -10182,7 +10182,7 @@ Paramètres :
|
|||
WeeChat
|
||||
* 'callback_data' : pointeur donné au "callback" lorsqu'il est appelé par
|
||||
WeeChat; si non NULL, doit avoir été alloué par malloc (ou une fonction
|
||||
similaire) et sera automatiquement libéré (par free) lorsque le "hook" est
|
||||
similaire) et est automatiquement libéré (par free) lorsque le "hook" est
|
||||
supprimé
|
||||
|
||||
Valeur de retour :
|
||||
|
@ -10268,7 +10268,7 @@ Paramètres :
|
|||
WeeChat
|
||||
* 'callback_data' : pointeur donné au "callback" lorsqu'il est appelé par
|
||||
WeeChat; si non NULL, doit avoir été alloué par malloc (ou une fonction
|
||||
similaire) et sera automatiquement libéré (par free) lorsque le "hook" est
|
||||
similaire) et est automatiquement libéré (par free) lorsque le "hook" est
|
||||
supprimé
|
||||
|
||||
Valeur de retour :
|
||||
|
@ -10349,7 +10349,7 @@ Paramètres :
|
|||
WeeChat
|
||||
* 'callback_data' : pointeur donné au "callback" lorsqu'il est appelé par
|
||||
WeeChat; si non NULL, doit avoir été alloué par malloc (ou une fonction
|
||||
similaire) et sera automatiquement libéré (par free) lorsque le "hook" est
|
||||
similaire) et est automatiquement libéré (par free) lorsque le "hook" est
|
||||
supprimé
|
||||
|
||||
Valeur de retour :
|
||||
|
@ -10416,7 +10416,7 @@ Paramètres :
|
|||
WeeChat
|
||||
* 'callback_data' : pointeur donné au "callback" lorsqu'il est appelé par
|
||||
WeeChat; si non NULL, doit avoir été alloué par malloc (ou une fonction
|
||||
similaire) et sera automatiquement libéré (par free) lorsque le "hook" est
|
||||
similaire) et est automatiquement libéré (par free) lorsque le "hook" est
|
||||
supprimé
|
||||
|
||||
[IMPORTANT]
|
||||
|
@ -10781,7 +10781,7 @@ Paramètres :
|
|||
par WeeChat
|
||||
* 'input_callback_data' : pointeur donné au "callback" lorsqu'il est appelé par
|
||||
WeeChat; si non NULL, doit avoir été alloué par malloc (ou une fonction
|
||||
similaire) et sera automatiquement libéré (par free) lorsque le tampon est
|
||||
similaire) et est automatiquement libéré (par free) lorsque le tampon est
|
||||
fermé
|
||||
* 'close_callback' : fonction appelée lorsque le tampon est fermé, paramètres et
|
||||
valeur de retour :
|
||||
|
@ -10795,7 +10795,7 @@ Paramètres :
|
|||
par WeeChat
|
||||
* 'close_callback_data' : pointeur donné au "callback" lorsqu'il est appelé par
|
||||
WeeChat; si non NULL, doit avoir été alloué par malloc (ou une fonction
|
||||
similaire) et sera automatiquement libéré (par free) lorsque le tampon est
|
||||
similaire) et est automatiquement libéré (par free) lorsque le tampon est
|
||||
fermé
|
||||
|
||||
Valeur de retour :
|
||||
|
@ -15708,22 +15708,46 @@ Fonctions pour la mise à jour de WeeChat (commande "/upgrade").
|
|||
|
||||
==== upgrade_new
|
||||
|
||||
_Mis à jour dans la 1.5._
|
||||
|
||||
Créer ou lire un fichier pour la mise à jour.
|
||||
|
||||
Prototype :
|
||||
|
||||
[source,C]
|
||||
----
|
||||
struct t_upgrade_file *weechat_upgrade_new (const char *filename, int write);
|
||||
struct t_upgrade_file *upgrade_file_new (const char *filename,
|
||||
int (*callback_read)(const void *pointer,
|
||||
void *data,
|
||||
struct t_upgrade_file *upgrade_file,
|
||||
int object_id,
|
||||
struct t_infolist *infolist),
|
||||
const void *callback_read_pointer,
|
||||
void *callback_read_data);
|
||||
----
|
||||
|
||||
Paramètres :
|
||||
|
||||
* 'filename' : nom du fichier (l'extension ".upgrade" sera ajoutée
|
||||
* 'filename' : nom du fichier (l'extension ".upgrade" est ajoutée
|
||||
automatiquement par WeeChat)
|
||||
* 'write' :
|
||||
** '1' : création du fichier (mode écriture, avant la mise à jour)
|
||||
** '0' : lecture du fichier (après la mise à jour)
|
||||
* 'callback_read' : fonction appelée pour chaque objet lu dans le fichier de
|
||||
mise à jour (si NULL, le fichier pour la mise à jour est ouvert en
|
||||
écriture), paramètres et valeur de retour :
|
||||
** 'const void *pointer' : pointeur
|
||||
** 'void *data' : pointeur
|
||||
** 'struct t_upgrade_file *upgrade_file' : pointeur vers le fichier de mise à
|
||||
jour
|
||||
** 'int object_id' : identifiant de l'objet
|
||||
** 'struct t_infolist *infolist' : infolist avec le contenu de l'objet
|
||||
** valeur de retour :
|
||||
*** 'WEECHAT_RC_OK'
|
||||
*** 'WEECHAT_RC_ERROR'
|
||||
* 'callback_read_pointer' : pointeur donné au "callback" lorsqu'il est appelé
|
||||
par WeeChat
|
||||
* 'callback_read_data' : pointeur donné au "callback" lorsqu'il est appelé par
|
||||
WeeChat; si non NULL, doit avoir été alloué par malloc (ou une fonction
|
||||
similaire) et est automatiquement libéré (par free) lorsque le fichier de
|
||||
mise à jour est fermé
|
||||
|
||||
Valeur de retour :
|
||||
|
||||
|
@ -15733,7 +15757,8 @@ Exemple en C :
|
|||
|
||||
[source,C]
|
||||
----
|
||||
struct t_upgrade_file *upgrade_file = weechat_upgrade_new ("mon_fichier", 1);
|
||||
struct t_upgrade_file *upgrade_file = weechat_upgrade_new ("mon_fichier",
|
||||
NULL, NULL, NULL);
|
||||
----
|
||||
|
||||
Script (Python) :
|
||||
|
@ -15741,10 +15766,10 @@ Script (Python) :
|
|||
[source,python]
|
||||
----
|
||||
# prototype
|
||||
upgrade_file = weechat.upgrade_new(filename, write)
|
||||
upgrade_file = weechat.upgrade_new(filename, callback_read, callback_read_data)
|
||||
|
||||
# exemple
|
||||
upgrade_file = weechat.upgrade_new("mon_fichier", 1)
|
||||
upgrade_file = weechat.upgrade_new("mon_fichier", "", "")
|
||||
----
|
||||
|
||||
==== upgrade_write_object
|
||||
|
@ -15797,35 +15822,20 @@ weechat.upgrade_write_object(upgrade_file, 1, infolist)
|
|||
|
||||
==== upgrade_read
|
||||
|
||||
_Mis à jour dans la 1.5._
|
||||
|
||||
Lire un fichier de mise à jour.
|
||||
|
||||
Prototype :
|
||||
|
||||
[source,C]
|
||||
----
|
||||
int weechat_upgrade_read (struct t_upgrade_file *upgrade_file,
|
||||
int (*callback_read)(void *data,
|
||||
struct t_upgrade_file *upgrade_file,
|
||||
int object_id,
|
||||
struct t_infolist *infolist),
|
||||
void *callback_read_data);
|
||||
int weechat_upgrade_read (struct t_upgrade_file *upgrade_file);
|
||||
----
|
||||
|
||||
Paramètres :
|
||||
|
||||
* 'upgrade_file' : pointeur vers le fichier de mise à jour
|
||||
* 'callback_read' : fonction appelée pour chaque objet lu dans le fichier de
|
||||
mise à jour, paramètres et valeur de retour :
|
||||
** 'void *data' : pointeur
|
||||
** 'struct t_upgrade_file *upgrade_file' : pointeur vers le fichier de mise à
|
||||
jour
|
||||
** 'int object_id' : identifiant de l'objet
|
||||
** 'struct t_infolist *infolist' : infolist avec le contenu de l'objet
|
||||
** valeur de retour :
|
||||
*** 'WEECHAT_RC_OK'
|
||||
*** 'WEECHAT_RC_ERROR'
|
||||
* 'callback_read_data' : pointeur donné au "callback" lorsqu'il est appelé par
|
||||
WeeChat
|
||||
|
||||
Valeur de retour :
|
||||
|
||||
|
@ -15835,16 +15845,7 @@ Exemple en C :
|
|||
|
||||
[source,C]
|
||||
----
|
||||
int
|
||||
my_upgrade_read_cb (struct t_upgrade_file *upgrade_file,
|
||||
int object_id,
|
||||
struct t_infolist *infolist)
|
||||
{
|
||||
/* lecture des variables... */
|
||||
return WEECHAT_RC_OK;
|
||||
}
|
||||
|
||||
weechat_upgrade_read (upgrade_file, &my_upgrade_read_cb, NULL);
|
||||
weechat_upgrade_read (upgrade_file);
|
||||
----
|
||||
|
||||
Script (Python) :
|
||||
|
@ -15852,14 +15853,10 @@ Script (Python) :
|
|||
[source,python]
|
||||
----
|
||||
# prototype
|
||||
rc = weechat.upgrade_read(upgrade_file, callback_read, callback_read_data)
|
||||
rc = weechat.upgrade_read(upgrade_file)
|
||||
|
||||
# exemple
|
||||
def my_upgrade_read_cb(upgrade_file, object_id, infolist):
|
||||
# read variables...
|
||||
return weechat.WEECHAT_RC_OK
|
||||
|
||||
weechat.upgrade_read(upgrade_file, "my_upgrade_read_cb", ""))
|
||||
weechat.upgrade_read(upgrade_file)
|
||||
----
|
||||
|
||||
==== upgrade_close
|
||||
|
|
|
@ -4414,7 +4414,7 @@ Argomenti:
|
|||
// TRANSLATION MISSING
|
||||
* 'callback_reload_data': puntatore fornito dalla callback quando chiamata da
|
||||
WeeChat; if not NULL, it must have been allocated with malloc (or similar
|
||||
function) and it will be automatically freed when the configuration file is
|
||||
function) and it is automatically freed when the configuration file is
|
||||
freed
|
||||
|
||||
Valore restituito:
|
||||
|
@ -4537,7 +4537,7 @@ Argomenti:
|
|||
// TRANSLATION MISSING
|
||||
* 'callback_read_data': puntatore fornito dalla callback quando chiamata da
|
||||
WeeChat; if not NULL, it must have been allocated with malloc (or similar
|
||||
function) and it will be automatically freed when the section is freed
|
||||
function) and it is automatically freed when the section is freed
|
||||
* 'callback_write': funzione chiamata quando la sezione è scritta nel file (dovrebbe
|
||||
essere NULL in molti casi, tranne se la sezione necessita di una funzione
|
||||
personalizzata), argomenti e valore restituito:
|
||||
|
@ -4555,7 +4555,7 @@ Argomenti:
|
|||
// TRANSLATION MISSING
|
||||
* 'callback_write_data': puntatore fornito dalla callback quando chiamata da
|
||||
WeeChat; if not NULL, it must have been allocated with malloc (or similar
|
||||
function) and it will be automatically freed when the section is freed
|
||||
function) and it is automatically freed when the section is freed
|
||||
* callback_write_default: funzione chiamata quando i valori predefiniti per la sezione
|
||||
devono essere scritti in un file, argomenti e valore restituito:
|
||||
** 'const void *pointer': puntatore
|
||||
|
@ -4571,8 +4571,7 @@ Argomenti:
|
|||
// TRANSLATION MISSING
|
||||
* 'callback_write_default_data': puntatore fornito dalla callback quando
|
||||
chiamata da WeeChat; if not NULL, it must have been allocated with malloc
|
||||
(or similar function) and it will be automatically freed when the section is
|
||||
freed
|
||||
(or similar function) and it is automatically freed when the section is freed
|
||||
* 'callback_create_option': funzione chiamata quando viene creata una nuova
|
||||
opzione nella sezione (NULL se la sezione non consente di creare nuove
|
||||
opzioni), argomenti e valore restituito:
|
||||
|
@ -4592,8 +4591,7 @@ Argomenti:
|
|||
// TRANSLATION MISSING
|
||||
* 'callback_create_option_data': puntatore fornito dalla callback quando
|
||||
chiamata da WeeChat; if not NULL, it must have been allocated with malloc
|
||||
(or similar function) and it will be automatically freed when the section is
|
||||
freed
|
||||
(or similar function) and it is automatically freed when the section is freed
|
||||
* 'callback_delete_option': funzione chiamata quando un'opzione viene eliminata
|
||||
nella sezione (NULL se la sezione non consente di eliminare delle opzioni),
|
||||
argomenti e valore restituito:
|
||||
|
@ -4612,8 +4610,7 @@ Argomenti:
|
|||
// TRANSLATION MISSING
|
||||
* 'callback_delete_option_data': puntatore fornito dalla callback quando
|
||||
chiamata da WeeChat; if not NULL, it must have been allocated with malloc
|
||||
(or similar function) and it will be automatically freed when the section is
|
||||
freed
|
||||
(or similar function) and it is automatically freed when the section is freed
|
||||
|
||||
Valore restituito:
|
||||
|
||||
|
@ -4865,7 +4862,7 @@ Argomenti:
|
|||
// TRANSLATION MISSING
|
||||
* 'callback_check_value_data': puntatore fornito dalla callback quando chiamata
|
||||
da WeeChat; if not NULL, it must have been allocated with malloc (or similar
|
||||
function) and it will be automatically freed when the option is freed
|
||||
function) and it is automatically freed when the option is freed
|
||||
* 'callback_change': funzione chiamata quando il valore dell'opzione è stata
|
||||
cambiata (opzionale), argomenti:
|
||||
** 'const void *pointer': puntatore
|
||||
|
@ -4876,7 +4873,7 @@ Argomenti:
|
|||
// TRANSLATION MISSING
|
||||
* 'callback_change_data': puntatore fornito dalla callback quando chiamata da
|
||||
WeeChat; if not NULL, it must have been allocated with malloc (or similar
|
||||
function) and it will be automatically freed when the option is freed
|
||||
function) and it is automatically freed when the option is freed
|
||||
* 'callback_delete': funzione chiamata quando l'opzione verrà eliminata
|
||||
(opzionale), argomenti:
|
||||
** 'const void *pointer': puntatore
|
||||
|
@ -4887,7 +4884,7 @@ Argomenti:
|
|||
// TRANSLATION MISSING
|
||||
* 'callback_delete_data': puntatore fornito dalla callback quando chiamata da
|
||||
WeeChat; if not NULL, it must have been allocated with malloc (or similar
|
||||
function) and it will be automatically freed when the option is freed
|
||||
function) and it is automatically freed when the option is freed
|
||||
|
||||
Valore restituito:
|
||||
|
||||
|
@ -7300,7 +7297,7 @@ Argomenti:
|
|||
// TRANSLATION MISSING
|
||||
* 'callback_data': puntatore fornito dalla callback quando chiamata da WeeChat;
|
||||
if not NULL, it must have been allocated with malloc (or similar function)
|
||||
and it will be automatically freed when the hook is deleted
|
||||
and it is automatically freed when the hook is deleted
|
||||
|
||||
I codici predefiniti per il completamento sono:
|
||||
|
||||
|
@ -7432,7 +7429,7 @@ Argomenti:
|
|||
// TRANSLATION MISSING
|
||||
* 'callback_data': puntatore fornito alla callback quando chiamata da WeeChat;
|
||||
if not NULL, it must have been allocated with malloc (or similar function)
|
||||
and it will be automatically freed when the hook is deleted
|
||||
and it is automatically freed when the hook is deleted
|
||||
|
||||
[NOTE]
|
||||
La callback può restituire 'WEECHAT_RC_OK' o 'WEECHAT_RC_OK_EAT' (il comando
|
||||
|
@ -7513,7 +7510,7 @@ Argomenti:
|
|||
// TRANSLATION MISSING
|
||||
* 'callback_data': puntatore fornito alla callback quando chiamata da WeeChat;
|
||||
if not NULL, it must have been allocated with malloc (or similar function)
|
||||
and it will be automatically freed when the hook is deleted
|
||||
and it is automatically freed when the hook is deleted
|
||||
|
||||
Valore restituito:
|
||||
|
||||
|
@ -7592,7 +7589,7 @@ Argomenti:
|
|||
// TRANSLATION MISSING
|
||||
* 'callback_data': puntatore fornito alla callback quando chiamata da WeeChat;
|
||||
if not NULL, it must have been allocated with malloc (or similar function)
|
||||
and it will be automatically freed when the hook is deleted
|
||||
and it is automatically freed when the hook is deleted
|
||||
|
||||
Valore restituito:
|
||||
|
||||
|
@ -7691,7 +7688,7 @@ Argomenti:
|
|||
// TRANSLATION MISSING
|
||||
* 'callback_data': puntatore fornito alla callback quando chiamata da WeeChat;
|
||||
if not NULL, it must have been allocated with malloc (or similar function)
|
||||
and it will be automatically freed when the hook is deleted
|
||||
and it is automatically freed when the hook is deleted
|
||||
|
||||
Valore restituito:
|
||||
|
||||
|
@ -8076,7 +8073,7 @@ Argomenti:
|
|||
// TRANSLATION MISSING
|
||||
* 'callback_data': puntatore fornito alla callback quando chiamata da WeeChat;
|
||||
if not NULL, it must have been allocated with malloc (or similar function)
|
||||
and it will be automatically freed when the hook is deleted
|
||||
and it is automatically freed when the hook is deleted
|
||||
|
||||
Valore restituito:
|
||||
|
||||
|
@ -8239,7 +8236,7 @@ Argomenti:
|
|||
// TRANSLATION MISSING
|
||||
* 'callback_data': puntatore fornito alla callback quando chiamata da WeeChat;
|
||||
if not NULL, it must have been allocated with malloc (or similar function)
|
||||
and it will be automatically freed when the hook is deleted
|
||||
and it is automatically freed when the hook is deleted
|
||||
|
||||
Valore restituito:
|
||||
|
||||
|
@ -8331,7 +8328,7 @@ Argomenti:
|
|||
// TRANSLATION MISSING
|
||||
* 'callback_data': puntatore fornito alla callback quando chiamata da WeeChat;
|
||||
if not NULL, it must have been allocated with malloc (or similar function)
|
||||
and it will be automatically freed when the hook is deleted
|
||||
and it is automatically freed when the hook is deleted
|
||||
|
||||
Valore restituito:
|
||||
|
||||
|
@ -9335,7 +9332,7 @@ Argomenti:
|
|||
// TRANSLATION MISSING
|
||||
* 'callback_data': puntatore fornito alla callback quando chiamata da WeeChat;
|
||||
if not NULL, it must have been allocated with malloc (or similar function)
|
||||
and it will be automatically freed when the hook is deleted
|
||||
and it is automatically freed when the hook is deleted
|
||||
|
||||
Valore restituito:
|
||||
|
||||
|
@ -9711,7 +9708,7 @@ Argomenti:
|
|||
// TRANSLATION MISSING
|
||||
* 'callback_data': puntatore fornito alla callback quando chiamata da WeeChat;
|
||||
if not NULL, it must have been allocated with malloc (or similar function)
|
||||
and it will be automatically freed when the hook is deleted
|
||||
and it is automatically freed when the hook is deleted
|
||||
|
||||
Valore restituito:
|
||||
|
||||
|
@ -9791,7 +9788,7 @@ Argomenti:
|
|||
// TRANSLATION MISSING
|
||||
* 'callback_data': puntatore fornito alla callback quando chiamata da WeeChat;
|
||||
if not NULL, it must have been allocated with malloc (or similar function)
|
||||
and it will be automatically freed when the hook is deleted
|
||||
and it is automatically freed when the hook is deleted
|
||||
|
||||
[NOTE]
|
||||
I nomi del completamento sono globali (condivisi tra WeeChat e plugin). Si
|
||||
|
@ -9980,7 +9977,7 @@ Argomenti:
|
|||
// TRANSLATION MISSING
|
||||
* 'callback_data': puntatore fornito alla callback quando chiamata da WeeChat;
|
||||
if not NULL, it must have been allocated with malloc (or similar function)
|
||||
and it will be automatically freed when the hook is deleted
|
||||
and it is automatically freed when the hook is deleted
|
||||
|
||||
Valore restituito:
|
||||
|
||||
|
@ -10228,7 +10225,7 @@ Argomenti:
|
|||
// TRANSLATION MISSING
|
||||
* 'callback_data': puntatore fornito alla callback quando chiamata da WeeChat;
|
||||
if not NULL, it must have been allocated with malloc (or similar function)
|
||||
and it will be automatically freed when the hook is deleted
|
||||
and it is automatically freed when the hook is deleted
|
||||
|
||||
Valore restituito:
|
||||
|
||||
|
@ -10310,7 +10307,7 @@ Argomenti:
|
|||
// TRANSLATION MISSING
|
||||
* 'callback_data': puntatore fornito alla callback quando chiamata da WeeChat;
|
||||
if not NULL, it must have been allocated with malloc (or similar function)
|
||||
and it will be automatically freed when the hook is deleted
|
||||
and it is automatically freed when the hook is deleted
|
||||
|
||||
Valore restituito:
|
||||
|
||||
|
@ -10396,7 +10393,7 @@ Argomenti:
|
|||
// TRANSLATION MISSING
|
||||
* 'callback_data': puntatore fornito alla callback quando chiamata da WeeChat;
|
||||
if not NULL, it must have been allocated with malloc (or similar function)
|
||||
and it will be automatically freed when the hook is deleted
|
||||
and it is automatically freed when the hook is deleted
|
||||
|
||||
Valore restituito:
|
||||
|
||||
|
@ -10475,7 +10472,7 @@ Argomenti:
|
|||
// TRANSLATION MISSING
|
||||
* 'callback_data': puntatore fornito alla callback quando chiamata da WeeChat;
|
||||
if not NULL, it must have been allocated with malloc (or similar function)
|
||||
and it will be automatically freed when the hook is deleted
|
||||
and it is automatically freed when the hook is deleted
|
||||
|
||||
Valore restituito:
|
||||
|
||||
|
@ -10539,7 +10536,7 @@ Argomenti:
|
|||
// TRANSLATION MISSING
|
||||
* 'callback_data': puntatore fornito alla callback quando chiamata da WeeChat;
|
||||
if not NULL, it must have been allocated with malloc (or similar function)
|
||||
and it will be automatically freed when the hook is deleted
|
||||
and it is automatically freed when the hook is deleted
|
||||
|
||||
[IMPORTANT]
|
||||
Per l'azione di un mouse, la callback verrà chiamata due volte: la prima quando
|
||||
|
@ -10918,7 +10915,7 @@ Argomenti:
|
|||
// TRANSLATION MISSING
|
||||
* 'input_callback_data': puntatore fornito dalla callback quando chiamata da
|
||||
WeeChat; if not NULL, it must have been allocated with malloc (or similar
|
||||
function) and it will be automatically freed when the buffer is closed
|
||||
function) and it is automatically freed when the buffer is closed
|
||||
* 'close_callback': funzione chiamata alla chiusura del buffer, argomenti e
|
||||
valore restituito:
|
||||
** 'const void *pointer': puntatore
|
||||
|
@ -10932,7 +10929,7 @@ Argomenti:
|
|||
// TRANSLATION MISSING
|
||||
* 'close_callback_data': puntatore fornito dalla callback quando chiamata da
|
||||
WeeChat; if not NULL, it must have been allocated with malloc (or similar
|
||||
function) and it will be automatically freed when the buffer is closed
|
||||
function) and it is automatically freed when the buffer is closed
|
||||
|
||||
Valore restituito:
|
||||
|
||||
|
@ -15909,22 +15906,45 @@ Funzioni per l'aggiornamento di WeeChat (comando "/upgrade").
|
|||
|
||||
==== upgrade_new
|
||||
|
||||
// TRANSLATION MISSING
|
||||
_Updated in 1.5._
|
||||
|
||||
Crea o legge un file per l'aggiornamento.
|
||||
|
||||
Prototipo:
|
||||
|
||||
[source,C]
|
||||
----
|
||||
struct t_upgrade_file *weechat_upgrade_new (const char *filename, int write);
|
||||
struct t_upgrade_file *upgrade_file_new (const char *filename,
|
||||
int (*callback_read)(const void *pointer,
|
||||
void *data,
|
||||
struct t_upgrade_file *upgrade_file,
|
||||
int object_id,
|
||||
struct t_infolist *infolist),
|
||||
const void *callback_read_pointer,
|
||||
void *callback_read_data);
|
||||
----
|
||||
|
||||
Argomenti:
|
||||
|
||||
* 'filename': nome del file (l'estensione ".upgrade" verrà aggiunta a questo nome
|
||||
da WeeChat)
|
||||
* 'write':
|
||||
** '1': crea il file (in modalità scrittura, prima dell'aggiornamento)
|
||||
** '0': legge il file (dopo l'aggiornamento)
|
||||
* 'callback_read': funzione chiamata per ogni oggetto letto nel file
|
||||
di aggiornamento, argomenti e valore restituito:
|
||||
** 'const void *pointer': puntatore
|
||||
** 'void *data': puntatore
|
||||
** 'struct t_upgrade_file *upgrade_file': puntatore al file di aggiornamento
|
||||
** 'int object_id': id dell'oggetto
|
||||
** 'struct t_infolist *infolist': lista info con il contenuto dell'oggetto
|
||||
** valore restituito:
|
||||
*** 'WEECHAT_RC_OK'
|
||||
*** 'WEECHAT_RC_ERROR'
|
||||
* 'callback_read_pointer': puntatore fornito alla callback quando chiamata da
|
||||
WeeChat
|
||||
// TRANSLATION MISSING
|
||||
* 'callback_read_data': puntatore fornito dalla callback quando chiamata da
|
||||
WeeChat; if not NULL, it must have been allocated with malloc (or similar
|
||||
function) and it is automatically freed when the upgrade file is closed
|
||||
|
||||
Valore restituito:
|
||||
|
||||
|
@ -15934,7 +15954,8 @@ Esempio in C:
|
|||
|
||||
[source,C]
|
||||
----
|
||||
struct t_upgrade_file *upgrade_file = weechat_upgrade_new ("my_file", 1);
|
||||
struct t_upgrade_file *upgrade_file = weechat_upgrade_new ("my_file",
|
||||
NULL, NULL, NULL);
|
||||
----
|
||||
|
||||
Script (Python):
|
||||
|
@ -15942,10 +15963,10 @@ Script (Python):
|
|||
[source,python]
|
||||
----
|
||||
# prototipo
|
||||
upgrade_file = weechat.upgrade_new(filename, write)
|
||||
upgrade_file = weechat.upgrade_new(filename, callback_read, callback_read_data)
|
||||
|
||||
# esempio
|
||||
upgrade_file = weechat.upgrade_new("my_file", 1)
|
||||
upgrade_file = weechat.upgrade_new("my_file", "", "")
|
||||
----
|
||||
|
||||
==== upgrade_write_object
|
||||
|
@ -15998,34 +16019,21 @@ weechat.upgrade_write_object(upgrade_file, 1, infolist)
|
|||
|
||||
==== upgrade_read
|
||||
|
||||
// TRANSLATION MISSING
|
||||
_Updated in 1.5._
|
||||
|
||||
Legge un file di aggiornamento.
|
||||
|
||||
Prototipo:
|
||||
|
||||
[source,C]
|
||||
----
|
||||
int weechat_upgrade_read (struct t_upgrade_file *upgrade_file,
|
||||
int (*callback_read)(void *data,
|
||||
struct t_upgrade_file *upgrade_file,
|
||||
int object_id,
|
||||
struct t_infolist *infolist),
|
||||
void *callback_read_data);
|
||||
int weechat_upgrade_read (struct t_upgrade_file *upgrade_file);
|
||||
----
|
||||
|
||||
Argomenti:
|
||||
|
||||
* 'upgrade_file': puntatore al file di aggiornamento
|
||||
* 'callback_read': funzione chiamata per ogni oggetto letto nel file
|
||||
di aggiornamento, argomenti e valore restituito:
|
||||
** 'void *data': puntatore
|
||||
** 'struct t_upgrade_file *upgrade_file': puntatore al file di aggiornamento
|
||||
** 'int object_id': id dell'oggetto
|
||||
** 'struct t_infolist *infolist': lista info con il contenuto dell'oggetto
|
||||
** valore restituito:
|
||||
*** 'WEECHAT_RC_OK'
|
||||
*** 'WEECHAT_RC_ERROR'
|
||||
* 'callback_read_data': puntatore assegnato per la lettura della chiamata
|
||||
quando chiamata da WeeChat
|
||||
|
||||
Valore restituito:
|
||||
|
||||
|
@ -16035,16 +16043,7 @@ Esempio in C:
|
|||
|
||||
[source,C]
|
||||
----
|
||||
int
|
||||
my_upgrade_read_cb (struct t_upgrade_file *upgrade_file,
|
||||
int object_id,
|
||||
struct t_infolist *infolist)
|
||||
{
|
||||
/* lettura variabili... */
|
||||
return WEECHAT_RC_OK;
|
||||
}
|
||||
|
||||
weechat_upgrade_read (upgrade_file, &my_upgrade_read_cb, NULL);
|
||||
weechat_upgrade_read (upgrade_file);
|
||||
----
|
||||
|
||||
Script (Python):
|
||||
|
@ -16052,14 +16051,10 @@ Script (Python):
|
|||
[source,python]
|
||||
----
|
||||
# prototipo
|
||||
rc = weechat.upgrade_read(upgrade_file, callback_read, callback_read_data)
|
||||
rc = weechat.upgrade_read(upgrade_file)
|
||||
|
||||
# esempio
|
||||
def my_upgrade_read_cb(upgrade_file, object_id, infolist):
|
||||
# lettura variabili...
|
||||
return weechat.WEECHAT_RC_OK
|
||||
|
||||
weechat.upgrade_read(upgrade_file, "my_upgrade_read_cb", ""))
|
||||
weechat.upgrade_read(upgrade_file)
|
||||
----
|
||||
|
||||
==== upgrade_close
|
||||
|
|
|
@ -4288,7 +4288,7 @@ struct t_config_file *weechat_config_new (const char *name,
|
|||
// TRANSLATION MISSING
|
||||
* 'callback_reload_data': WeeChat がコールバックを呼び出す際にコールバックに渡すポインタ;
|
||||
if not NULL, it must have been allocated with malloc (or similar function)
|
||||
and it will be automatically freed when the configuration file is freed
|
||||
and it is automatically freed when the configuration file is freed
|
||||
|
||||
戻り値:
|
||||
|
||||
|
@ -4409,7 +4409,7 @@ struct t_config_section *weechat_config_new_section (
|
|||
// TRANSLATION MISSING
|
||||
* 'callback_read_data': WeeChat がコールバックを呼び出す際にコールバックに渡すポインタ;
|
||||
if not NULL, it must have been allocated with malloc (or similar function)
|
||||
and it will be automatically freed when the section is freed
|
||||
and it is automatically freed when the section is freed
|
||||
* 'callback_write': セクションをファイルに書き込む際に呼び出す関数
|
||||
(特別な関数を使ってセクションを書き込む必要がある場合を除いて、殆どの場合は
|
||||
NULL を指定する)、引数と戻り値:
|
||||
|
@ -4426,7 +4426,7 @@ struct t_config_section *weechat_config_new_section (
|
|||
// TRANSLATION MISSING
|
||||
* 'callback_write_data': WeeChat がコールバックを呼び出す際にコールバックに渡すポインタ;
|
||||
if not NULL, it must have been allocated with malloc (or similar function)
|
||||
and it will be automatically freed when the section is freed
|
||||
and it is automatically freed when the section is freed
|
||||
* callback_write_default:
|
||||
セクションのデフォルト値が必ずファイルに書き込まれる際に呼び出す関数、引数と戻り値:
|
||||
** 'const void *pointer': ポインタ
|
||||
|
@ -4442,7 +4442,7 @@ struct t_config_section *weechat_config_new_section (
|
|||
// TRANSLATION MISSING
|
||||
* 'callback_write_default_data': WeeChat がコールバックを呼び出す際にコールバックに渡すポインタ;
|
||||
if not NULL, it must have been allocated with malloc (or similar function)
|
||||
and it will be automatically freed when the section is freed
|
||||
and it is automatically freed when the section is freed
|
||||
* 'callback_create_option': セクションに新しいオプションを作成する際に呼び出す関数
|
||||
(セクションに新しいオプションを作成することを禁止する場合は
|
||||
NULL)、引数と戻り値:
|
||||
|
@ -4462,7 +4462,7 @@ struct t_config_section *weechat_config_new_section (
|
|||
// TRANSLATION MISSING
|
||||
* 'callback_create_option_data': WeeChat がコールバックを呼び出す際にコールバックに渡すポインタ;
|
||||
if not NULL, it must have been allocated with malloc (or similar function)
|
||||
and it will be automatically freed when the section is freed
|
||||
and it is automatically freed when the section is freed
|
||||
* 'callback_delete_option': セクションからオプションを削除する際に呼び出す関数
|
||||
(セクションからオプションを削除することを禁止する場合は
|
||||
NULL)、引数と戻り値:
|
||||
|
@ -4481,7 +4481,7 @@ struct t_config_section *weechat_config_new_section (
|
|||
// TRANSLATION MISSING
|
||||
* 'callback_delete_option_data': WeeChat がコールバックを呼び出す際にコールバックに渡すポインタ;
|
||||
if not NULL, it must have been allocated with malloc (or similar function)
|
||||
and it will be automatically freed when the section is freed
|
||||
and it is automatically freed when the section is freed
|
||||
|
||||
戻り値:
|
||||
|
||||
|
@ -4725,7 +4725,7 @@ struct t_config_option *weechat_config_new_option (
|
|||
// TRANSLATION MISSING
|
||||
* 'callback_check_value_data': WeeChat がコールバックを呼び出す際にコールバックに渡すポインタ;
|
||||
if not NULL, it must have been allocated with malloc (or similar function)
|
||||
and it will be automatically freed when the option is freed
|
||||
and it is automatically freed when the option is freed
|
||||
* 'callback_change': オプションの値を変更した際に呼び出す関数
|
||||
(任意)、引数:
|
||||
** 'const void *pointer': ポインタ
|
||||
|
@ -4736,7 +4736,7 @@ struct t_config_option *weechat_config_new_option (
|
|||
// TRANSLATION MISSING
|
||||
* 'callback_change_data': WeeChat がコールバックを呼び出す際にコールバックに渡すポインタ;
|
||||
if not NULL, it must have been allocated with malloc (or similar function)
|
||||
and it will be automatically freed when the option is freed
|
||||
and it is automatically freed when the option is freed
|
||||
* 'callback_delete': オプションを削除する前に際に呼び出す関数
|
||||
(任意)、引数:
|
||||
** 'const void *pointer': ポインタ
|
||||
|
@ -4747,7 +4747,7 @@ struct t_config_option *weechat_config_new_option (
|
|||
// TRANSLATION MISSING
|
||||
* 'callback_delete_data': WeeChat がコールバックを呼び出す際にコールバックに渡すポインタ;
|
||||
if not NULL, it must have been allocated with malloc (or similar function)
|
||||
and it will be automatically freed when the option is freed
|
||||
and it is automatically freed when the option is freed
|
||||
|
||||
戻り値:
|
||||
|
||||
|
@ -7124,7 +7124,7 @@ struct t_hook *weechat_hook_command (const char *command,
|
|||
// TRANSLATION MISSING
|
||||
* 'callback_data': WeeChat がコールバックを呼び出す際にコールバックに渡すポインタ;
|
||||
if not NULL, it must have been allocated with malloc (or similar function)
|
||||
and it will be automatically freed when the hook is deleted
|
||||
and it is automatically freed when the hook is deleted
|
||||
|
||||
デフォルトの補完候補コードは:
|
||||
|
||||
|
@ -7251,7 +7251,7 @@ struct t_hook *weechat_hook_command_run (const char *command,
|
|||
// TRANSLATION MISSING
|
||||
* 'callback_data': WeeChat がコールバックを呼び出す際にコールバックに渡すポインタ;
|
||||
if not NULL, it must have been allocated with malloc (or similar function)
|
||||
and it will be automatically freed when the hook is deleted
|
||||
and it is automatically freed when the hook is deleted
|
||||
|
||||
[NOTE]
|
||||
コールバックは 'WEECHAT_RC_OK' または 'WEECHAT_RC_OK_EAT'
|
||||
|
@ -7328,7 +7328,7 @@ struct t_hook *weechat_hook_timer (long interval,
|
|||
// TRANSLATION MISSING
|
||||
* 'callback_data': WeeChat がコールバックを呼び出す際にコールバックに渡すポインタ;
|
||||
if not NULL, it must have been allocated with malloc (or similar function)
|
||||
and it will be automatically freed when the hook is deleted
|
||||
and it is automatically freed when the hook is deleted
|
||||
|
||||
戻り値:
|
||||
|
||||
|
@ -7405,7 +7405,7 @@ struct t_hook *weechat_hook_fd (int fd,
|
|||
// TRANSLATION MISSING
|
||||
* 'callback_data': WeeChat がコールバックを呼び出す際にコールバックに渡すポインタ;
|
||||
if not NULL, it must have been allocated with malloc (or similar function)
|
||||
and it will be automatically freed when the hook is deleted
|
||||
and it is automatically freed when the hook is deleted
|
||||
|
||||
戻り値:
|
||||
|
||||
|
@ -7502,7 +7502,7 @@ struct t_hook *weechat_hook_process (const char *command,
|
|||
// TRANSLATION MISSING
|
||||
* 'callback_data': WeeChat がコールバックを呼び出す際にコールバックに渡すポインタ;
|
||||
if not NULL, it must have been allocated with malloc (or similar function)
|
||||
and it will be automatically freed when the hook is deleted
|
||||
and it is automatically freed when the hook is deleted
|
||||
|
||||
戻り値:
|
||||
|
||||
|
@ -7872,7 +7872,7 @@ struct t_hook *weechat_hook_connect (const char *proxy,
|
|||
// TRANSLATION MISSING
|
||||
* 'callback_data': WeeChat がコールバックを呼び出す際にコールバックに渡すポインタ;
|
||||
if not NULL, it must have been allocated with malloc (or similar function)
|
||||
and it will be automatically freed when the hook is deleted
|
||||
and it is automatically freed when the hook is deleted
|
||||
|
||||
戻り値:
|
||||
|
||||
|
@ -8030,7 +8030,7 @@ struct t_hook *weechat_hook_print (struct t_gui_buffer *buffer,
|
|||
// TRANSLATION MISSING
|
||||
* 'callback_data': WeeChat がコールバックを呼び出す際にコールバックに渡すポインタ;
|
||||
if not NULL, it must have been allocated with malloc (or similar function)
|
||||
and it will be automatically freed when the hook is deleted
|
||||
and it is automatically freed when the hook is deleted
|
||||
|
||||
戻り値:
|
||||
|
||||
|
@ -8119,7 +8119,7 @@ struct t_hook *weechat_hook_signal (const char *signal,
|
|||
// TRANSLATION MISSING
|
||||
* 'callback_data': WeeChat がコールバックを呼び出す際にコールバックに渡すポインタ;
|
||||
if not NULL, it must have been allocated with malloc (or similar function)
|
||||
and it will be automatically freed when the hook is deleted
|
||||
and it is automatically freed when the hook is deleted
|
||||
|
||||
戻り値:
|
||||
|
||||
|
@ -9034,7 +9034,7 @@ Arguments:
|
|||
// TRANSLATION MISSING
|
||||
* 'callback_data': WeeChat がコールバックを呼び出す際にコールバックに渡すポインタ;
|
||||
if not NULL, it must have been allocated with malloc (or similar function)
|
||||
and it will be automatically freed when the hook is deleted
|
||||
and it is automatically freed when the hook is deleted
|
||||
|
||||
戻り値:
|
||||
|
||||
|
@ -9395,7 +9395,7 @@ struct t_hook *weechat_hook_config (const char *option,
|
|||
// TRANSLATION MISSING
|
||||
* 'callback_data': WeeChat がコールバックを呼び出す際にコールバックに渡すポインタ;
|
||||
if not NULL, it must have been allocated with malloc (or similar function)
|
||||
and it will be automatically freed when the hook is deleted
|
||||
and it is automatically freed when the hook is deleted
|
||||
|
||||
戻り値:
|
||||
|
||||
|
@ -9474,7 +9474,7 @@ struct t_hook *weechat_hook_completion (const char *completion_item,
|
|||
// TRANSLATION MISSING
|
||||
* 'callback_data': WeeChat がコールバックを呼び出す際にコールバックに渡すポインタ;
|
||||
if not NULL, it must have been allocated with malloc (or similar function)
|
||||
and it will be automatically freed when the hook is deleted
|
||||
and it is automatically freed when the hook is deleted
|
||||
|
||||
[NOTE]
|
||||
補完名はグローバルです (WeeChat
|
||||
|
@ -9658,7 +9658,7 @@ struct t_hook *weechat_hook_modifier (const char *modifier,
|
|||
// TRANSLATION MISSING
|
||||
* 'callback_data': WeeChat がコールバックを呼び出す際にコールバックに渡すポインタ;
|
||||
if not NULL, it must have been allocated with malloc (or similar function)
|
||||
and it will be automatically freed when the hook is deleted
|
||||
and it is automatically freed when the hook is deleted
|
||||
|
||||
戻り値:
|
||||
|
||||
|
@ -9898,7 +9898,7 @@ struct t_hook *weechat_hook_info (const char *info_name,
|
|||
// TRANSLATION MISSING
|
||||
* 'callback_data': WeeChat がコールバックを呼び出す際にコールバックに渡すポインタ;
|
||||
if not NULL, it must have been allocated with malloc (or similar function)
|
||||
and it will be automatically freed when the hook is deleted
|
||||
and it is automatically freed when the hook is deleted
|
||||
|
||||
戻り値:
|
||||
|
||||
|
@ -9977,7 +9977,7 @@ struct t_hook *weechat_hook_info_hashtable (const char *info_name,
|
|||
// TRANSLATION MISSING
|
||||
* 'callback_data': WeeChat がコールバックを呼び出す際にコールバックに渡すポインタ;
|
||||
if not NULL, it must have been allocated with malloc (or similar function)
|
||||
and it will be automatically freed when the hook is deleted
|
||||
and it is automatically freed when the hook is deleted
|
||||
|
||||
戻り値:
|
||||
|
||||
|
@ -10061,7 +10061,7 @@ struct t_hook *weechat_hook_infolist (const char *infolist_name,
|
|||
// TRANSLATION MISSING
|
||||
* 'callback_data': WeeChat がコールバックを呼び出す際にコールバックに渡すポインタ;
|
||||
if not NULL, it must have been allocated with malloc (or similar function)
|
||||
and it will be automatically freed when the hook is deleted
|
||||
and it is automatically freed when the hook is deleted
|
||||
|
||||
戻り値:
|
||||
|
||||
|
@ -10141,7 +10141,7 @@ struct t_hook *weechat_hook_hdata (const char *hdata_name,
|
|||
// TRANSLATION MISSING
|
||||
* 'callback_data': WeeChat がコールバックを呼び出す際にコールバックに渡すポインタ;
|
||||
if not NULL, it must have been allocated with malloc (or similar function)
|
||||
and it will be automatically freed when the hook is deleted
|
||||
and it is automatically freed when the hook is deleted
|
||||
|
||||
戻り値:
|
||||
|
||||
|
@ -10205,7 +10205,7 @@ struct t_hook *weechat_hook_focus (const char *area,
|
|||
// TRANSLATION MISSING
|
||||
* 'callback_data': WeeChat がコールバックを呼び出す際にコールバックに渡すポインタ;
|
||||
if not NULL, it must have been allocated with malloc (or similar function)
|
||||
and it will be automatically freed when the hook is deleted
|
||||
and it is automatically freed when the hook is deleted
|
||||
|
||||
[IMPORTANT]
|
||||
マウスジェスチャの場合、コールバックを 2 回呼び出します: 1
|
||||
|
@ -10567,7 +10567,7 @@ struct t_gui_buffer *weechat_buffer_new (const char *name,
|
|||
// TRANSLATION MISSING
|
||||
* 'input_callback_data': WeeChat がコールバックを呼び出す際にコールバックに渡すポインタ;
|
||||
if not NULL, it must have been allocated with malloc (or similar function)
|
||||
and it will be automatically freed when the buffer is closed
|
||||
and it is automatically freed when the buffer is closed
|
||||
* 'close_callback':
|
||||
バッファを閉じる際に呼び出す関数、引数と戻り値:
|
||||
** 'const void *pointer': ポインタ
|
||||
|
@ -10580,7 +10580,7 @@ struct t_gui_buffer *weechat_buffer_new (const char *name,
|
|||
// TRANSLATION MISSING
|
||||
* 'close_callback_data': WeeChat がコールバックを呼び出す際にコールバックに渡すポインタ;
|
||||
if not NULL, it must have been allocated with malloc (or similar function)
|
||||
and it will be automatically freed when the buffer is closed
|
||||
and it is automatically freed when the buffer is closed
|
||||
|
||||
戻り値:
|
||||
|
||||
|
@ -15397,22 +15397,43 @@ WeeChat をアップグレードする (コマンド "/upgrade") 関数。
|
|||
|
||||
==== upgrade_new
|
||||
|
||||
_バージョン 1.5 で更新。_
|
||||
|
||||
アップグレード用のファイルを作成または読み込み。
|
||||
|
||||
プロトタイプ:
|
||||
|
||||
[source,C]
|
||||
----
|
||||
struct t_upgrade_file *weechat_upgrade_new (const char *filename, int write);
|
||||
struct t_upgrade_file *upgrade_file_new (const char *filename,
|
||||
int (*callback_read)(const void *pointer,
|
||||
void *data,
|
||||
struct t_upgrade_file *upgrade_file,
|
||||
int object_id,
|
||||
struct t_infolist *infolist),
|
||||
const void *callback_read_pointer,
|
||||
void *callback_read_data);
|
||||
----
|
||||
|
||||
引数:
|
||||
|
||||
* 'filename': ファイルの名前 (WeeChat
|
||||
はこの名前に拡張子 ".upgrade" を追加します)
|
||||
* 'write':
|
||||
** '1': ファイルを作成 (書き込みモード、アップグレード前)
|
||||
** '0': ファイルを読み込む (アップグレード後)
|
||||
* 'callback_read': アップグレードファイル内の各オブジェクトを読み込む際に呼び出す関数
|
||||
引数と戻り値:
|
||||
** 'const void *pointer': ポインタ
|
||||
** 'void *data': ポインタ
|
||||
** 'struct t_upgrade_file *upgrade_file': アップグレードファイルへのポインタ
|
||||
** 'int object_id': オブジェクトの識別番号
|
||||
** 'struct t_infolist *infolist': オブジェクトの内容を含むインフォリスト
|
||||
** 戻り値:
|
||||
*** 'WEECHAT_RC_OK'
|
||||
*** 'WEECHAT_RC_ERROR'
|
||||
* 'callback_read_pointer': WeeChat がコールバックを呼び出す際にコールバックに渡すポインタ
|
||||
// TRANSLATION MISSING
|
||||
* 'callback_read_data': WeeChat がコールバックを呼び出す際にコールバックに渡すポインタ;
|
||||
if not NULL, it must have been allocated with malloc (or similar function)
|
||||
and it is automatically freed when the upgrade file is closed
|
||||
|
||||
戻り値:
|
||||
|
||||
|
@ -15422,7 +15443,8 @@ C 言語での使用例:
|
|||
|
||||
[source,C]
|
||||
----
|
||||
struct t_upgrade_file *upgrade_file = weechat_upgrade_new ("my_file", 1);
|
||||
struct t_upgrade_file *upgrade_file = weechat_upgrade_new ("my_file",
|
||||
NULL, NULL, NULL);
|
||||
----
|
||||
|
||||
スクリプト (Python) での使用例:
|
||||
|
@ -15430,10 +15452,10 @@ struct t_upgrade_file *upgrade_file = weechat_upgrade_new ("my_file", 1);
|
|||
[source,python]
|
||||
----
|
||||
# プロトタイプ
|
||||
upgrade_file = weechat.upgrade_new(filename, write)
|
||||
upgrade_file = weechat.upgrade_new(filename, callback_read, callback_read_data)
|
||||
|
||||
# 例
|
||||
upgrade_file = weechat.upgrade_new("my_file", 1)
|
||||
upgrade_file = weechat.upgrade_new("my_file", "", "")
|
||||
----
|
||||
|
||||
==== upgrade_write_object
|
||||
|
@ -15486,34 +15508,20 @@ weechat.upgrade_write_object(upgrade_file, 1, infolist)
|
|||
|
||||
==== upgrade_read
|
||||
|
||||
_バージョン 1.5 で更新。_
|
||||
|
||||
アップグレードファイルを読み込む。
|
||||
|
||||
プロトタイプ:
|
||||
|
||||
[source,C]
|
||||
----
|
||||
int weechat_upgrade_read (struct t_upgrade_file *upgrade_file,
|
||||
int (*callback_read)(void *data,
|
||||
struct t_upgrade_file *upgrade_file,
|
||||
int object_id,
|
||||
struct t_infolist *infolist),
|
||||
void *callback_read_data);
|
||||
int weechat_upgrade_read (struct t_upgrade_file *upgrade_file);
|
||||
----
|
||||
|
||||
引数:
|
||||
|
||||
* 'upgrade_file': アップグレードファイルへのポインタ
|
||||
* 'callback_read': アップグレードファイル内の各オブジェクトを読み込む際に呼び出す関数
|
||||
引数と戻り値:
|
||||
** 'void *data': ポインタ
|
||||
** 'struct t_upgrade_file *upgrade_file': アップグレードファイルへのポインタ
|
||||
** 'int object_id': オブジェクトの識別番号
|
||||
** 'struct t_infolist *infolist': オブジェクトの内容を含むインフォリスト
|
||||
** 戻り値:
|
||||
*** 'WEECHAT_RC_OK'
|
||||
*** 'WEECHAT_RC_ERROR'
|
||||
* 'callback_read_data': WeeChat が read
|
||||
コールバックを呼び出す際にコールバックに渡すポインタ
|
||||
|
||||
戻り値:
|
||||
|
||||
|
@ -15523,16 +15531,7 @@ C 言語での使用例:
|
|||
|
||||
[source,C]
|
||||
----
|
||||
int
|
||||
my_upgrade_read_cb (struct t_upgrade_file *upgrade_file,
|
||||
int object_id,
|
||||
struct t_infolist *infolist)
|
||||
{
|
||||
/* read variables... */
|
||||
return WEECHAT_RC_OK;
|
||||
}
|
||||
|
||||
weechat_upgrade_read (upgrade_file, &my_upgrade_read_cb, NULL);
|
||||
weechat_upgrade_read (upgrade_file);
|
||||
----
|
||||
|
||||
スクリプト (Python) での使用例:
|
||||
|
@ -15540,14 +15539,10 @@ weechat_upgrade_read (upgrade_file, &my_upgrade_read_cb, NULL);
|
|||
[source,python]
|
||||
----
|
||||
# プロトタイプ
|
||||
rc = weechat.upgrade_read(upgrade_file, callback_read, callback_read_data)
|
||||
rc = weechat.upgrade_read(upgrade_file)
|
||||
|
||||
# 例
|
||||
def my_upgrade_read_cb(upgrade_file, object_id, infolist):
|
||||
# read variables...
|
||||
return weechat.WEECHAT_RC_OK
|
||||
|
||||
weechat.upgrade_read(upgrade_file, "my_upgrade_read_cb", ""))
|
||||
weechat.upgrade_read(upgrade_file)
|
||||
----
|
||||
|
||||
==== upgrade_close
|
||||
|
|
Loading…
Reference in New Issue