How do I find out an object's type using the GTK+ (1.2) type syst em?



I have a situation like the following:

void
setParms(GtkOpenmapProj* proj, ...) {
  ...
  class->normalize_latitude(proj, ...);
}

GtkOpenmapProj is a base class that has multiple sub-types. Each of the
subtypes may
override the normalize_latitude method of the GtkOpenmapProj class. However,
I don't
know which of the subtypes is passed into my function, just that its some
sub-type of 
GtkOpenmapProj. How do I find which type identifier to feed to
gtk_type_class() so
that I can obtain the class struct for the proper sub-type (and use the
proper
normalize_latitude function)? How does GTK+ handle polymorphism?

Thanks for any help.

By the way, I'm assuming use of the GTK+ 1.2 version of the type system. I
understand
that the system may change some with 2.0, but I'm trying to learn the
"simpler" system
first. It also helps that a book is available for the earlier system (GGAD).
---------------------------------
Michael Bowman
mbowman arinc com
(410) 266-4876



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