Exemple #1
0
        static void Initialize(IntPtr ptr, IntPtr data)
        {
            IntPtr ifaceptr = new IntPtr(ptr.ToInt64() + class_offset);
            GstColorBalanceClass native_iface = (GstColorBalanceClass)Marshal.PtrToStructure(ifaceptr, typeof(GstColorBalanceClass));

            native_iface.ListChannels = iface.ListChannels;
            native_iface.SetValue     = iface.SetValue;
            native_iface.GetValue     = iface.GetValue;

            GCHandle            gch     = (GCHandle)data;
            ColorBalanceAdapter adapter = gch.Target as ColorBalanceAdapter;

            ColorBalanceImplementor implementor = adapter.Implementor;

            if (implementor != null)
            {
                PropertyInfo pi = implementor.GetType().GetProperty("BalanceType", BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Static | BindingFlags.FlattenHierarchy);
                if (pi != null && pi.PropertyType == typeof(Gst.Interfaces.ColorBalanceType))
                {
                    native_iface.BalanceType = (Gst.Interfaces.ColorBalanceType)pi.GetValue(null, null);
                }
            }

            Marshal.StructureToPtr(native_iface, ifaceptr, false);
            gch.Free();
        }
Exemple #2
0
 static void SetValue_cb(IntPtr inst, IntPtr channel, int value)
 {
     try {
         ColorBalanceImplementor __obj = GLib.Object.GetObject(inst, false) as ColorBalanceImplementor;
         __obj.SetValue(GLib.Object.GetObject(channel) as Gst.Interfaces.ColorBalanceChannel, value);
     } catch (Exception e) {
         GLib.ExceptionManager.RaiseUnhandledException(e, false);
     }
 }
Exemple #3
0
 static int GetValue_cb(IntPtr inst, IntPtr channel)
 {
     try {
         ColorBalanceImplementor __obj = GLib.Object.GetObject(inst, false) as ColorBalanceImplementor;
         int __result = __obj.GetValue(GLib.Object.GetObject(channel) as Gst.Interfaces.ColorBalanceChannel);
         return(__result);
     } catch (Exception e) {
         GLib.ExceptionManager.RaiseUnhandledException(e, true);
         // NOTREACHED: above call does not return.
         throw e;
     }
 }
Exemple #4
0
 static IntPtr ListChannels_cb(IntPtr inst)
 {
     try {
         ColorBalanceImplementor __obj = GLib.Object.GetObject(inst, false) as ColorBalanceImplementor;
         Gst.Interfaces.ColorBalanceChannel[] __result = __obj.ListChannels();
         return(new GLib.List(__result, typeof(Gst.Interfaces.ColorBalanceChannel), false, false) == null ? IntPtr.Zero : new GLib.List(__result, typeof(Gst.Interfaces.ColorBalanceChannel), false, false).Handle);
     } catch (Exception e) {
         GLib.ExceptionManager.RaiseUnhandledException(e, true);
         // NOTREACHED: above call does not return.
         throw e;
     }
 }
Exemple #5
0
 public ColorBalanceAdapter(ColorBalanceImplementor implementor)
 {
     if (implementor == null)
     {
         throw new ArgumentNullException("implementor");
     }
     else if (!(implementor is GLib.Object))
     {
         throw new ArgumentException("implementor must be a subclass of GLib.Object");
     }
     this.implementor = implementor as GLib.Object;
 }
Exemple #6
0
		public ColorBalanceAdapter (ColorBalanceImplementor implementor)
		{
			if (implementor == null)
				throw new ArgumentNullException ("implementor");
			else if (!(implementor is Gst.GLib.Object))
				throw new ArgumentException ("implementor must be a subclass of Gst.GLib.Object");
			this.implementor = implementor as Gst.GLib.Object;
		}