Re: introspection and icons
- From: Stephen White <spwhite chariot net au>
- To: gtk-devel-list gnome org
- Subject: Re: introspection and icons
- Date: Sun, 6 Aug 2000 16:25:53 +0930 (CST)
On Sat, 5 Aug 2000, Martijn van Beers wrote:
> No need to make the API very elaborate I think, so just a function
> to get the path where the icons are, and one to get an array of
> widget names. With that information, and the fact that all the
> icons are in a standard image file format (.png, .xpm?) the
> builder can get an icon for each widget:
>
> G_MODULE_EXPORT gchar *gtk_get_widget_icon_path (void);
> G_MODULE_EXPORT gchar **gtk_get_widget_list (void);
There's function calls like:
gtk_vbox_get_type()
gtk_button_get_type()
gtk_window_get_type()
which already exist. To fit into the existing scheme, the icons could
be layered in with the following calls:
gtk_vbox_get_icon()
gtk_button_get_icon()
gtk_window_get_icon()
It makes writing the icon support a little more difficult, but the Gtk
API would be more consistent overall.
The downside of this is being unable to grab any kind of icon, because
the function name is hard-coded. This problem also applies to grabbing
any kind of type, so perhaps this could be cleaned up at the same time.
--
spwhite@chariot.net.au
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]