Re: How to get stuff out of a GValue?




On Mon, 2007-11-19 at 11:50 +0100, Dan H wrote:
OK, I've got something in the form of a GValue (in this case, integer numeric data
obtained with gtk_container_child_get()), and I'd like to get access to the actual number inside. How is 
this done? I've looked into GValue's documentation, but all I see is stuff that deals only with GValues and 
no interface to the outside world of regular C types.

Any hints?

just one page further:

http://library.gnome.org/devel/gobject/stable/gobject-Standard-Parameter-and-Value-Types.html

usually, you get the type held by the GValue with G_VALUE_TYPE() and
then switch; obviously, if you know the type of the property already
then you can just use the right g_value_get_*() accessor.

ciao,
 Emmanuele.

-- 
Emmanuele Bassi,
W: http://www.emmanuelebassi.net
B: http://log.emmanuelebassi.net




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