Пример #1
0
 public string GetStringProperty (string name)
 {
     GLib.Value val = new GLib.Value ();
     val.Init (GLib.GType.String);
     IntPtr native_name = GLib.Marshaller.StringToPtrGStrdup (name);
     g_object_get_property (raw, native_name, ref val);
     GLib.Marshaller.Free (native_name);
     return val.Val as string;
 }
Пример #2
0
 public IntPtr GetProperty (string name)
 {
     GLib.Value val = new GLib.Value ();
     val.Init (GLib.GType.Object);
     IntPtr native_name = GLib.Marshaller.StringToPtrGStrdup (name);
     g_object_get_property (raw, native_name, ref val);
     GLib.Marshaller.Free (native_name);
     return ((GLib.Object)(val.Val)).Handle;
 }
Пример #3
0
        public GLib.Value ChildGetProperty(Gtk.Widget child, string property_name)
        {
            var value  = new GLib.Value();
            var cclass = ((GTypeInstance)Marshal.PtrToStructure(Handle, typeof(GTypeInstance))).GTypeClass;
            var prop   = gtk_container_class_find_child_property(cclass, property_name);

            value.Init(prop.value_type);
            gtk_container_child_get_property(Handle, child.Handle, property_name, ref value);

            return(value);
        }
Пример #4
0
            public void GetValue(Gtk.TreeIter iter, int col, ref GLib.Value val)
            {
                ITreeNode node = GetNode(iter);

                val.Init(ctypes [col]);

                object col_val;

                if (getters [col] is PropertyInfo)
                {
                    col_val = ((PropertyInfo)getters [col]).GetValue(node, null);
                }
                else
                {
                    col_val = ((FieldInfo)getters [col]).GetValue(node);
                }
                val.Val = col_val;
            }