Re: introspection and icons



On Sun, Aug 06, 2000 at 07:29:20PM +0200, Tim Janik wrote:
> On Sun, 6 Aug 2000, Stephen White wrote:
> 
> > 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);

> gtk_get_widget_list() doesn't actually help any, since widget types
> are only known to the type system after gtk_<WIDGET>_get_type() has
> been called.

well, maybe instead of returning an array of characters, it should
return an array of function pointers which do

	xxx_get_type ();
	return g_strconcat (what you said below);

> with pixbuf available in gtk, i think we're better off, providing the
> icons in a standard format, i.e. png, and provide
> 
> gchar* gtk_make_widget_icon_path (GType widget_type);
> 
> e.g. for GTK_TYPE_BUTTON, this function would amount to
> g_strconcat (${pkgdatadir}, "/", g_type_name (GTK_TYPE_BUTTON), ".png", NULL);
> (pkgdatadir being /usr/local/share/gtk+/ for the default prefix)
> 
> the various widget types can be retrived generically by querying the
> child types of GTK_TYPE_WIDGET recursively.

Because this doesn't help either, since it wouldn't allow for libaries
to be installed in locations other than the one gtk is in.


Martijn




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