Re: [gtk-list] Re: gdk_window_copy_area




Patrice Fortier <Patrice.Fortier@aquarel.fr> writes:

> > Just noticed this function. It seems to pretty much to be a synonym
> > for the more traditional gdk_draw_pixmap. (Admittedly with a more
> > intuitive name, but I don't like having two functions that do
>   ^^^^^^^^^^^^^^
> > the same thing - at the very least one should call the other.)
> 
> you said it all...
> 
> > When was added? (I don't think it was there a few months ago,
> > but I could be wrong...) Would people holler if it was removed?
> 
> I guess yes.
> As gdk_window and gdk_pixmap are quite well separated, this is usefull
> to have both. 
> This is not really a technical problem, but calling a window function
> to do a pixmap function job will be disturbing...
> I don't think it's a good idea to mess up the API just to avoid 10
> lines of code because it's duplication...
> 
> If you want just one function, just do like in X.
> Define explicitly a type like gdk_drawable to write function on both
> gdk_window and gdk_pixmap.

Actually, there is already a GdkDrawable type. (It is just a synonym
for GdkWindow/GdkPixmap in C, but in mappings to OO languages, it
should be the parent class of GdkWindow, GdkPixmap and GdkBitmap)

It is the first argument to the gdk_draw_* functions. So you might
argue that renaming gdk_draw_pixmap to gdk_draw_drawable would
solve the confusion. But that, I don't think will happen.

I suppose both need to be left in there for now. Perhaps we can
do something useful with the duplication when we add more logic
for XCopyArea and graphics exposes.

Regards,
                                        Owen



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