Ejemplo n.º 1
0
 void InitForProperty(GType gtype, string name)
 {
     IntPtr p_name = Marshaller.StringToPtrGStrdup (name);
     ParamSpec spec = new ParamSpec (g_object_class_find_property (gtype.ClassPtr, p_name));
     Marshaller.Free (p_name);
     g_value_init (ref this, spec.ValueType.Val);
 }
Ejemplo n.º 2
0
        static IntPtr RegisterProperty(GType type, string name, string nick, string blurb, uint property_id, GType property_type, bool can_read, bool can_write)
        {
            IntPtr declaring_class = type.ClassPtr;
            ParamSpec pspec = new ParamSpec (name, nick, blurb, property_type, can_read, can_write);

            g_object_class_install_property (declaring_class, property_id, pspec.Handle);
            return pspec.Handle;
        }