Re: Warnings in custom container example of GTKmm Book



On 2/20/08, Murray Cumming <murrayc murrayc com> wrote:
>
>  On Mon, 2008-02-18 at 21:21 -0600, Jonathon Jongsma wrote:
>  > I looked into this a little bit and it looks like several vfuncs for
>  > GtkContainer are not wrapped in gtkmm.
>  >   Specifically, the following
>  > vfuncs are not wrapped: add(), remove(), check_resize(),
>  > set_focus_child().
>
>
> These are signals, not vfuncs. We do wrap them.
>
>  So I don't think that's the problem.

Hmm, really?  Sometimes it's very difficult to tell them apart in the C code.
In any case, the warnings appear to be coming from the function
gtk_container_remove_unimplemented() in gtkcontainer.c.  And if you
notice in gtk_container_class_init(), this function is set to be the
default handler for remove:

  class->remove = gtk_container_remove_unimplemented;

So, classes that inherit from Container are intended to do something
to prevent that function from running and we're clearly not doing that
in our example.  I guess I'll have to investigate a little more.

>  > murray, I don't know much about ABI compatibility and gmmproc -- are we
>  > able to wrap these vfuncs?
>
>
> If we really did have to add vfuncs (or signals with default signal
>  handlers) then that would break ABI because they are virtual methods.

yes, that's what I suspected.  Is there any way that we can 'reserve'
space for future vfuncs like they do in GTK+?

-- 
jonner


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