Gtk3: How to invoke gtk_stock_list_ids? - SOLVED

> Since there is no GtkStock class, the functions gtk_stock_* are mapped to Gtk3::stock_*. So:
>  my @stock_items = @{Gtk3::stock_list_ids ()};
> Yeah, that's pretty ugly. But there's not much that gobject-introspection could do differently here.

Anyway it works for me. Thank you.

I'm famliar with Perl but new to Gtk and I did not realize that there is no GtkStock
object (rtm!).
Is it always this way when there is no object available: Prepend the function with Gtk3:: ?

> We could manually
re-map these functions in Gtk3 to > Gtk3::Stock::*, however.
> Would that
be worthwhile? Also, the dereference is needed because Gtk3::stock_list_ids returns an array ref currently,
> but I think I'll change it to return a list.

Perl programmers are used to handle array refs, so don't care. And if you want to use the returned list
as a parameter you will need a scalar variable.

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]