Re: [gob-list] How do to use a gtk_type as a property type

From: Jean-Yves Lefort <jylefort_at_brutele.be>
Date: Tue, 28 Aug 2007 21:50:44 +0200

On Tue, 28 Aug 2007 20:55:41 +0300
"Dov Grobgeld" <dov.grobgeld_at_gmail.com> wrote:

> After having used gob2 extensively I finally and for the first time got
> stuck on something that I could not find in the documentation. How do I
> define a property that is defined by Gtk and not by Glib? It seems like the
> name mangling of the property name always sticks on G_TYPE_ to the property
> name. Shouldn't this be modifyable e.g. by doing GTK:ADJUSTMENT to make the
> property GTK_TYPE_ADJUSTMENT instead of G_TYPE_ADJUSTMENT?
>
> In particular, I'm trying to convert the following code from my
> gtk_image_viewer widget to gob:
>
> g_object_class_install_property (gobject_class,
> PROP_HADJUSTMENT,
> g_param_spec_object ("hadjustment",
> ("Horizontal adjustment"),
> ("The GtkAdjustment that determines the values
> of the horizontal position for this image_viewer."),
> GTK_TYPE_ADJUSTMENT,
> G_PARAM_READWRITE));

property OBJECT hadjustment (..., object_type = Gtk:Adjustment)

--
Jean-Yves Lefort <jylefort_at_brutele.be>

Received on Tue Aug 28 2007 - 12:52:04 CDT

This archive was generated by hypermail 2.2.0 : Sun Apr 17 2011 - 21:05:02 CDT