ff16c42dcfb582d9fdf15a06f5f92f892bce4744
1 #include <lttv/toolbar.h>
4 inline LttvToolbars
*lttv_toolbars_new() {
5 return g_array_new(FALSE
, FALSE
, sizeof(lttv_toolbar_closure
));
8 /* MD: delete elements of the array also, but don't free pointed addresses
11 inline void lttv_toolbars_destroy(LttvToolbars
*h
) {
12 g_critical("lttv_toolbars_destroy");
13 g_array_free(h
, TRUE
);
16 inline void lttv_toolbars_add(LttvToolbars
*h
, lttv_constructor f
, char* tooltip
, char ** pixmap
)
18 lttv_toolbar_closure c
;
20 /* if h is null, do nothing, or popup a warning message */
26 g_array_append_val(h
,c
);
29 gboolean
lttv_toolbars_remove(LttvToolbars
*h
, lttv_constructor f
)
31 lttv_toolbar_closure
* tmp
;
33 for(i
=0;i
<h
->len
;i
++){
34 tmp
= & g_array_index(h
, lttv_toolbar_closure
, i
);
35 if(tmp
->con
== f
)break;
38 g_array_remove_index(h
, i
);
43 unsigned lttv_toolbars_number(LttvToolbars
*h
)
This page took 0.030049 seconds and 3 git commands to generate.