示例#1
0
 public Value(GLib.Object obj, string prop_name, EnumWrapper wrap)
 {
     type = IntPtr.Zero;
     pad1 = new Padding();
     pad2 = new Padding();
     InitForProperty(obj.NativeType, prop_name);
     if (wrap.flags)
     {
         g_value_set_flags(ref this, (uint)(int)wrap);
     }
     else
     {
         g_value_set_enum(ref this, (int)wrap);
     }
 }
示例#2
0
 public Value(EnumWrapper wrap, string type_name)
 {
     type = IntPtr.Zero;
     pad1 = new Padding();
     pad2 = new Padding();
     g_value_init(ref this, GType.FromName(type_name).Val);
     if (wrap.flags)
     {
         g_value_set_flags(ref this, (uint)(int)wrap);
     }
     else
     {
         g_value_set_enum(ref this, (int)wrap);
     }
 }
        public Value(EnumWrapper wrap, string type_name)
        {
            type  = IntPtr.Zero;
            pad_1 = pad_2 = 0;
            IntPtr native = GLib.Marshaller.StringToPtrGStrdup(type_name);

            gtksharp_value_create_from_type_name(ref this, native);
            GLib.Marshaller.Free(native);
            if (wrap.flags)
            {
                g_value_set_flags(ref this, (uint)(int)wrap);
            }
            else
            {
                g_value_set_enum(ref this, (int)wrap);
            }
        }
        public Value(GLib.Object obj, string prop_name, EnumWrapper wrap)
        {
            type  = IntPtr.Zero;
            pad_1 = pad_2 = 0;
            IntPtr native = GLib.Marshaller.StringToPtrGStrdup(prop_name);

            gtksharp_value_create_from_type_and_property(ref this, obj.NativeType.Val, native);
            GLib.Marshaller.Free(native);
            if (wrap.flags)
            {
                g_value_set_flags(ref this, (uint)(int)wrap);
            }
            else
            {
                g_value_set_enum(ref this, (int)wrap);
            }
        }
示例#5
0
		public Value (EnumWrapper wrap, string type_name)
		{
			type = IntPtr.Zero;
			pad_1 = pad_2 = 0;
			IntPtr native = GLib.Marshaller.StringToPtrGStrdup (type_name);
			gtksharp_value_create_from_type_name (ref this, native);
			GLib.Marshaller.Free (native);
			if (wrap.flags)
				g_value_set_flags (ref this, (uint) (int) wrap); 
			else
				g_value_set_enum (ref this, (int) wrap); 
		}
示例#6
0
		public Value (GLib.Object obj, string prop_name, EnumWrapper wrap)
		{
			type = IntPtr.Zero;
			pad_1 = pad_2 = 0;
			IntPtr native = GLib.Marshaller.StringToPtrGStrdup (prop_name);
			gtksharp_value_create_from_type_and_property (ref this, obj.NativeType.Val, native);
			GLib.Marshaller.Free (native);
			if (wrap.flags)
				g_value_set_flags (ref this, (uint) (int) wrap); 
			else
				g_value_set_enum (ref this, (int) wrap); 
		}
示例#7
0
文件: Value.cs 项目: saraa/fishtastic
 public Value(GLib.Object obj, string prop_name, EnumWrapper wrap)
 {
     type = IntPtr.Zero;
     pad1 = new Padding ();
     pad2 = new Padding ();
     InitForProperty (obj.NativeType, prop_name);
     if (wrap.flags)
         g_value_set_flags (ref this, (uint) (int) wrap);
     else
         g_value_set_enum (ref this, (int) wrap);
 }
示例#8
0
文件: Value.cs 项目: saraa/fishtastic
 public Value(EnumWrapper wrap, string type_name)
 {
     type = IntPtr.Zero;
     pad1 = new Padding ();
     pad2 = new Padding ();
     g_value_init (ref this, GType.FromName (type_name).Val);
     if (wrap.flags)
         g_value_set_flags (ref this, (uint) (int) wrap);
     else
         g_value_set_enum (ref this, (int) wrap);
 }