e4e0ed8e0d17653656256b8c073428cc88a0e8b9
1 //#include <lttv/menu.h>
5 inline LttvMenus
*lttv_menus_new() {
6 return g_array_new(FALSE
, FALSE
, sizeof(lttv_menu_closure
));
9 /* MD: delete elements of the array also, but don't free pointed addresses
12 inline void lttv_menus_destroy(LttvMenus
*h
) {
13 g_array_free(h
, TRUE
);
16 inline void lttv_menus_add(LttvMenus
*h
, lttv_constructor f
, char* menuPath
, char* menuText
)
20 /* if h is null, do nothing, or popup a warning message */
24 c
.menuPath
= menuPath
;
25 c
.menuText
= menuText
;
26 g_array_append_val(h
,c
);
29 gboolean
lttv_menus_remove(LttvMenus
*h
, lttv_constructor f
)
31 lttv_menu_closure
* tmp
;
33 for(i
=0;i
<h
->len
;i
++){
34 tmp
= & g_array_index(h
, lttv_menu_closure
, i
);
35 if(tmp
->con
== f
)break;
38 g_array_remove_index(h
, i
);
44 unsigned lttv_menus_number(LttvMenus
*h
)
This page took 0.033038 seconds and 4 git commands to generate.