Hi, Am Montag, den 09.05.2005, 14:41 +0100 schrieb Gustavo J. A. M. Carneiro: > On Mon, 2005-05-09 at 10:29 -0300, Johan Dahlin wrote: > > >>Johan, Gustavo: would this be breaking the API in subtle ways, or is it > > >>a nice addition to PyGTK? Let's get a bug on it if the former. > > >> > > >> > > > > > > In either case I don't like very much making the PyGTK API different > > >from the GTK+ one. Maybe there's a reason why only the pixel value is > > >returned. Perhaps GTK+ doesn't have RGB values at hand, and so looking > > >them up involves an extra X server roundtrip. > > > > > > > > Can still be done lazily, if that turns out to be an issue. > > That's a good idea. The problem is how to find out, on getattr, if > the RGB values have already been fetched or not. Where to store such > state?
Isn't there a PyObject where a normal pythonish field can be added for that ? Or is GdkColor a generated boxed "struct" which cannot have such things ? If it comes to worse, the GdkColor struct has a weird size and the internal padding could be abused for that *grins* (GdkColor has 10 bytes but most compilers pad on dword boundaries - 16 bytes). just kidding :) > [...] cheers, Danny -- www.keyserver.net key id A334AEA6
signature.asc
Description: Dies ist ein digital signierter Nachrichtenteil
_______________________________________________ pygtk mailing list [email protected] http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/
