static PresetDefault () { IntPtr type = gst_preset_get_type (); if (type == IntPtr.Zero) throw new Exception ("Can't get GstPreset interface type"); IntPtr native_iface = g_type_default_interface_ref (type); if (native_iface == IntPtr.Zero) throw new Exception ("Can't get GstPreset default interface vtable"); default_iface = (GstPresetInterface) Marshal.PtrToStructure (native_iface, typeof (GstPresetInterface)); }
static void Initialize(IntPtr ptr, IntPtr data) { IntPtr ifaceptr = new IntPtr(ptr.ToInt64() + class_offset); GstPresetInterface native_iface = (GstPresetInterface)Marshal.PtrToStructure(ifaceptr, typeof(GstPresetInterface)); native_iface.GetPresetNames = iface.GetPresetNames; native_iface.GetPropertyNames = iface.GetPropertyNames; native_iface.LoadPreset = iface.LoadPreset; native_iface.SavePreset = iface.SavePreset; native_iface.RenamePreset = iface.RenamePreset; native_iface.DeletePreset = iface.DeletePreset; native_iface.SetMeta = iface.SetMeta; native_iface.GetMeta = iface.GetMeta; Marshal.StructureToPtr(native_iface, ifaceptr, false); }
static PresetDefault() { IntPtr type = gst_preset_get_type(); if (type == IntPtr.Zero) { throw new Exception("Can't get GstPreset interface type"); } IntPtr native_iface = g_type_default_interface_ref(type); if (native_iface == IntPtr.Zero) { throw new Exception("Can't get GstPreset default interface vtable"); } default_iface = (GstPresetInterface)Marshal.PtrToStructure(native_iface, typeof(GstPresetInterface)); }