Exemple #1
0
        static IntPtr GetProperties_cb(IntPtr inst)
        {
            try {
                PropertyProbeImplementor __obj = GLib.Object.GetObject(inst, false) as PropertyProbeImplementor;

                string[]  properties      = __obj.Properties;
                GLib.List properties_list = new GLib.List(typeof(IntPtr));
                IntPtr    gclass          = Marshal.ReadIntPtr(inst);
                foreach (string prop in properties)
                {
                    IntPtr name  = GLib.Marshaller.StringToPtrGStrdup(prop);
                    IntPtr pspec = g_object_class_find_property(gclass, name);
                    GLib.Marshaller.Free(name);
                    if (pspec != IntPtr.Zero)
                    {
                        properties_list.Prepend(pspec);
                    }
                }

                /* FIXME: We leak the list! */
                return(properties_list.Handle);
            } catch (Exception e) {
                GLib.ExceptionManager.RaiseUnhandledException(e, true);
                // NOTREACHED: above call does not return.
                throw e;
            }
        }
 public PropertyProbeAdapter(PropertyProbeImplementor 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 #3
0
 static void ProbeProperty_cb(IntPtr inst, uint prop_id, IntPtr pspec)
 {
     try {
         PropertyProbeImplementor __obj = GLib.Object.GetObject(inst, false) as PropertyProbeImplementor;
         Gst.PropertyInfo         pi    = new Gst.PropertyInfo(pspec);
         __obj.ProbeProperty(pi.Name);
     } catch (Exception e) {
         GLib.ExceptionManager.RaiseUnhandledException(e, false);
     }
 }
Exemple #4
0
 public PropertyProbeAdapter(PropertyProbeImplementor 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 #5
0
 static bool NeedsProbe_cb(IntPtr inst, uint prop_id, IntPtr pspec)
 {
     try {
         PropertyProbeImplementor __obj = GLib.Object.GetObject(inst, false) as PropertyProbeImplementor;
         Gst.PropertyInfo         pi    = new Gst.PropertyInfo(pspec);
         bool __result = __obj.NeedsProbe(pi.Name);
         return(__result);
     } catch (Exception e) {
         GLib.ExceptionManager.RaiseUnhandledException(e, true);
         // NOTREACHED: above call does not return.
         throw e;
     }
 }
Exemple #6
0
        static IntPtr GetValues_cb(IntPtr inst, uint prop_id, IntPtr pspec)
        {
            try {
                PropertyProbeImplementor __obj = GLib.Object.GetObject(inst, false) as PropertyProbeImplementor;
                Gst.PropertyInfo         pi    = new Gst.PropertyInfo(pspec);
                object[]        values         = __obj.GetValues(pi.Name);
                GLib.ValueArray va             = new GLib.ValueArray((uint)values.Length);

                foreach (object v in values)
                {
                    va.Append(new GLib.Value(v));
                }
                return(va.Handle);
            } catch (Exception e) {
                GLib.ExceptionManager.RaiseUnhandledException(e, false);
                // NOTREACHED: above call does not return.
                throw e;
            }
        }