1
0
mirror of https://github.com/weechat/weechat.git synced 2026-07-10 11:43:13 +02:00

api: allow update for some variables of hdata, add new functions hdata_update and hdata_set

This commit is contained in:
Sebastien Helleu
2012-08-27 09:47:46 +02:00
parent e767346a19
commit df80aa5fc9
54 changed files with 2953 additions and 1713 deletions
+10 -9
View File
@@ -1715,17 +1715,18 @@ gui_key_hdata_key_cb (void *data, const char *hdata_name)
/* make C compiler happy */
(void) data;
hdata = hdata_new (NULL, hdata_name, "prev_key", "next_key");
hdata = hdata_new (NULL, hdata_name, "prev_key", "next_key",
0, NULL, NULL);
if (hdata)
{
HDATA_VAR(struct t_gui_key, key, STRING, NULL, NULL);
HDATA_VAR(struct t_gui_key, area_type, POINTER, NULL, NULL);
HDATA_VAR(struct t_gui_key, area_name, POINTER, NULL, NULL);
HDATA_VAR(struct t_gui_key, area_key, STRING, NULL, NULL);
HDATA_VAR(struct t_gui_key, command, STRING, NULL, NULL);
HDATA_VAR(struct t_gui_key, score, INTEGER, NULL, NULL);
HDATA_VAR(struct t_gui_key, prev_key, POINTER, NULL, hdata_name);
HDATA_VAR(struct t_gui_key, next_key, POINTER, NULL, hdata_name);
HDATA_VAR(struct t_gui_key, key, STRING, 0, NULL, NULL);
HDATA_VAR(struct t_gui_key, area_type, POINTER, 0, NULL, NULL);
HDATA_VAR(struct t_gui_key, area_name, POINTER, 0, NULL, NULL);
HDATA_VAR(struct t_gui_key, area_key, STRING, 0, NULL, NULL);
HDATA_VAR(struct t_gui_key, command, STRING, 0, NULL, NULL);
HDATA_VAR(struct t_gui_key, score, INTEGER, 0, NULL, NULL);
HDATA_VAR(struct t_gui_key, prev_key, POINTER, 0, NULL, hdata_name);
HDATA_VAR(struct t_gui_key, next_key, POINTER, 0, NULL, hdata_name);
for (i = 0; i < GUI_KEY_NUM_CONTEXTS; i++)
{
snprintf (str_list, sizeof (str_list),