Top Level GObject


I was wondering what is the proper way to add over-ridable functions to
my top level GObject. I have my top level object (inherits from GObject)
which has a set of functions which just return false.

What I want to do is create a bunch of objects which inherit from my top
level object and then implement the set of functions which return false
from the top level object. So, in my derived object...

static void
x_class_init (XClass *klass)
        GObjectClass *o_class;

        parent_class = g_type_class_peek_parent (klass);

        o_class = (GObjectClass *) klass;

        o_class->finalize = x_finalize;

        /* override my set of functions */
        o_class->a = x_a;
        o_class->b = x_b;

I am assuming I put these in my top level object's Class struct? Is this
the proper place? Should I be creating an interface? What is the proper
way to go about this?

Thanks for your help. s.s.

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