1 // This file was generated by the Gtk# code generator.
2 // Any changes made will be lost if regenerated.
7 using System.Collections;
8 using System.Collections.Generic;
9 using System.Runtime.InteropServices;
11 #region Autogenerated code
12 public partial class Promise : Gst.MiniObject {
14 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
15 static extern IntPtr gst_promise_get_type();
17 public static GLib.GType GType {
19 IntPtr raw_ret = gst_promise_get_type();
20 GLib.GType ret = new GLib.GType(raw_ret);
25 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
26 static extern void gst_promise_expire(IntPtr raw);
28 public void Expire() {
29 gst_promise_expire(Handle);
32 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
33 static extern IntPtr gst_promise_get_reply(IntPtr raw);
35 public Gst.Structure RetrieveReply() {
36 IntPtr raw_ret = gst_promise_get_reply(Handle);
37 Gst.Structure ret = raw_ret == IntPtr.Zero ? null : (Gst.Structure) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Structure), false);
41 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
42 static extern void gst_promise_interrupt(IntPtr raw);
44 public void Interrupt() {
45 gst_promise_interrupt(Handle);
48 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
49 static extern void gst_promise_reply(IntPtr raw, IntPtr s);
51 public void Reply(Gst.Structure s) {
53 gst_promise_reply(Handle, s == null ? IntPtr.Zero : s.Handle);
60 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
61 static extern int gst_promise_wait(IntPtr raw);
63 public Gst.PromiseResult Wait() {
64 int raw_ret = gst_promise_wait(Handle);
65 Gst.PromiseResult ret = (Gst.PromiseResult) raw_ret;
69 public Promise(IntPtr raw) : base(raw) {}
71 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
72 static extern IntPtr gst_promise_new();
76 Raw = gst_promise_new();
79 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
80 static extern IntPtr gst_promise_new_with_change_func(GstSharp.PromiseChangeFuncNative func, IntPtr user_data, GLib.DestroyNotify notify);
82 public Promise (Gst.PromiseChangeFunc func)
84 GstSharp.PromiseChangeFuncWrapper func_wrapper = new GstSharp.PromiseChangeFuncWrapper (func);
86 GLib.DestroyNotify notify;
88 user_data = IntPtr.Zero;
91 user_data = (IntPtr) GCHandle.Alloc (func_wrapper);
92 notify = GLib.DestroyHelper.NotifyHandler;
94 Raw = gst_promise_new_with_change_func(func_wrapper.NativeDelegate, user_data, notify);
98 // Internal representation of the wrapped structure ABI.
99 static GLib.AbiStruct _abi_info = null;
100 static public new GLib.AbiStruct abi_info {
102 if (_abi_info == null)
103 _abi_info = new GLib.AbiStruct (Gst.MiniObject.abi_info.Fields);
110 // End of the ABI representation.