Exemple #1
0
 public IterFuncWrapper(TotemPlParser.IterFunc managed)
 {
     this.managed = managed;
     if (managed != null)
     {
         NativeDelegate = new IterFuncNative(NativeCallback);
     }
 }
        public unsafe bool Write(Gtk.TreeModel model, TotemPlParser.IterFunc func, string output, TotemPlParser.Type type)
        {
            TotemPlParserSharp.IterFuncWrapper func_wrapper = new TotemPlParserSharp.IterFuncWrapper(func);
            IntPtr output_as_native = GLib.Marshaller.StringToPtrGStrdup(output);
            IntPtr error            = IntPtr.Zero;
            bool   raw_ret          = totem_pl_parser_write(Handle, model == null ? IntPtr.Zero : model.Handle, func_wrapper.NativeDelegate, output_as_native, (int)type, IntPtr.Zero, out error);
            bool   ret = raw_ret;

            GLib.Marshaller.Free(output_as_native);
            if (error != IntPtr.Zero)
            {
                throw new GLib.GException(error);
            }
            return(ret);
        }
 public IterFuncWrapper(TotemPlParser.IterFunc managed)
 {
     this.managed = managed;
     if (managed != null)
         NativeDelegate = new IterFuncNative (NativeCallback);
 }