Re: Widget Peek functions



Tim Janik <timj@gtk.org> writes:

> On 29 Feb 2000, Havoc Pennington wrote:
> 
> > 
> > Karl Nelson <kenelson@ece.ucdavis.edu> writes:
> > > The Gtk-- crew was trying to implement a quick and dirty image
> > > loader so that we can load images prior to realization for 
> > > some applications.  This involved loading the pixmap with the
> > > colormap from the top of the gtk+ colormap stack.  
> > >
> > 
> > If the widget is created (but unrealized) can't you use
> > gtk_widget_get_colormap()?
> 
> sure, but that only works if you know exactly what widget you're
> going stuff the pixmap in. you can't create the pixmaps prior
> to the widgets this way (unless you create a temporary widget just
> to query the colormap <shrug>)..

If you don't know what widget you are going to stuff the pixmap in,
then peeking at the colormap is just broken, because the user
could push a different colormap, or add it to a widget that they
created at some completely different time. You are just adding
a strange failure mode.

I think this has been resolved with the addition of gdk-pixbuf.  You
can load the image as a pixbuf (no colormap needed), and we should
have API functions that take gdk-pixbuf everywhere we have pixmaps
now.

Regards,
                                        Owen

















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