public PresetAdapter(IPresetImplementor 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; }
static bool SavePreset_cb(IntPtr inst, IntPtr name) { try { IPresetImplementor __obj = GLib.Object.GetObject(inst, false) as IPresetImplementor; bool __result; __result = __obj.SavePreset(GLib.Marshaller.Utf8PtrToString(name)); return(__result); } catch (Exception e) { GLib.ExceptionManager.RaiseUnhandledException(e, true); // NOTREACHED: above call does not return. throw e; } }
static IntPtr GetPropertyNames_cb(IntPtr inst) { try { IPresetImplementor __obj = GLib.Object.GetObject(inst, false) as IPresetImplementor; string[] __result; __result = __obj.PropertyNames; return(GLib.Marshaller.StringArrayToNullTermStrvPointer(__result)); } catch (Exception e) { GLib.ExceptionManager.RaiseUnhandledException(e, true); // NOTREACHED: above call does not return. throw e; } }
static bool GetMeta_cb(IntPtr inst, IntPtr name, IntPtr tag, out IntPtr value) { try { IPresetImplementor __obj = GLib.Object.GetObject(inst, false) as IPresetImplementor; bool __result; string myvalue; __result = __obj.GetMeta(GLib.Marshaller.Utf8PtrToString(name), GLib.Marshaller.Utf8PtrToString(tag), out myvalue); value = GLib.Marshaller.StringToPtrGStrdup(myvalue); return(__result); } catch (Exception e) { GLib.ExceptionManager.RaiseUnhandledException(e, true); // NOTREACHED: above call does not return. throw e; } }