RE: g_object_copy()



If deep-copy is not implemented in Gtk/Gdk, shouldn't it be 
added? It would make bindings to python which has deep-copy 
ability more transparent.

What would happen when you deep-copied a GtkWidget? If the source was shown,
would the copy immediately be shown? If the source was in a container, would
the copy be in the same container? What if that container could only have
one child widget? Should it get all the signal handler connections too? It
gets silly.

For Gdk GObjects, most of them are shared resources so there isn't much
point in copying them instead of refcounting them - that would just be less
efficient.

It doesn't make sense for many things, and that's why there is no deep-copy.
Some types do have copy functions, but the meaning is very specific to the
type.

Murray Cumming
www.murrayc.com
murrayc usa net



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