Re: GType stuff again!



On Tue, 2006-09-19 at 11:43 +0200, Johannes Schmid wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Hi!
> 
> I tried out the examples in gtkmm to find out if they are able to handle
> their GTypenames correclty. Unfortunately they do not:
> 
> std::cout << g_type_name(get_type()) << std::endl;
> 
> in the cellrenderercustom example just gives me
> "gtkmm__GtkCellRenderer". But of course g_object_new(type) will give not
> give me a custom but a standart CellRenderer.
> 
> Anyway, I still need something that gives me a custom type that
> g_object_new can handle.

i am confused. since g_object_new cannot possibly instantiate a C++
object, what is the value of get_type() returning a value that can be
used at the C level?

you can't create C++ objects (the ones that gtkmm is composed of) from C
without a *lot* more glue code (eg. factory functions declared extern
"C" that return each type of object as a gpointer etc etc)

--p





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