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 ControlBinding : Gst.Object {
14 protected ControlBinding (IntPtr raw) : base(raw) {}
16 protected ControlBinding() : base(IntPtr.Zero)
18 CreateNativeObject (new string [0], new GLib.Value [0]);
21 [GLib.Property ("name")]
22 public new string Name {
24 GLib.Value val = GetProperty ("name");
25 string ret = (string) val;
31 [GLib.Property ("object")]
32 public Gst.Object Object {
34 GLib.Value val = GetProperty ("object");
35 Gst.Object ret = (Gst.Object) val;
41 public string NameField {
44 IntPtr* raw_ptr = (IntPtr*)(((byte*)Handle) + abi_info.GetFieldOffset("name"));
45 return GLib.Marshaller.Utf8PtrToString ((*raw_ptr));
53 IntPtr* raw_ptr = (IntPtr*)(((byte*)Handle) + abi_info.GetFieldOffset("pspec"));
59 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
60 static extern void gst_control_binding_set_disabled(IntPtr raw, bool disabled);
62 public bool Disabled {
64 gst_control_binding_set_disabled(Handle, value);
68 static SyncValuesNativeDelegate SyncValues_cb_delegate;
69 static SyncValuesNativeDelegate SyncValuesVMCallback {
71 if (SyncValues_cb_delegate == null)
72 SyncValues_cb_delegate = new SyncValuesNativeDelegate (SyncValues_cb);
73 return SyncValues_cb_delegate;
77 static void OverrideSyncValues (GLib.GType gtype)
79 OverrideSyncValues (gtype, SyncValuesVMCallback);
82 static void OverrideSyncValues (GLib.GType gtype, SyncValuesNativeDelegate callback)
85 IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("sync_values"));
86 *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback);
90 [UnmanagedFunctionPointer (CallingConvention.Cdecl)]
91 delegate bool SyncValuesNativeDelegate (IntPtr inst, IntPtr _object, ulong timestamp, ulong last_sync);
93 static bool SyncValues_cb (IntPtr inst, IntPtr _object, ulong timestamp, ulong last_sync)
96 ControlBinding __obj = GLib.Object.GetObject (inst, false) as ControlBinding;
98 __result = __obj.OnSyncValues (GLib.Object.GetObject(_object) as Gst.Object, timestamp, last_sync);
100 } catch (Exception e) {
101 GLib.ExceptionManager.RaiseUnhandledException (e, true);
102 // NOTREACHED: above call does not return.
107 [GLib.DefaultSignalHandler(Type=typeof(Gst.ControlBinding), ConnectionMethod="OverrideSyncValues")]
108 protected virtual bool OnSyncValues (Gst.Object _object, ulong timestamp, ulong last_sync)
110 return InternalSyncValues (_object, timestamp, last_sync);
113 private bool InternalSyncValues (Gst.Object _object, ulong timestamp, ulong last_sync)
115 SyncValuesNativeDelegate unmanaged = null;
117 IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("sync_values"));
118 unmanaged = (SyncValuesNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(SyncValuesNativeDelegate));
120 if (unmanaged == null) return false;
122 bool __result = unmanaged (this.Handle, _object == null ? IntPtr.Zero : _object.Handle, timestamp, last_sync);
126 static GetValueNativeDelegate GetValue_cb_delegate;
127 static GetValueNativeDelegate GetValueVMCallback {
129 if (GetValue_cb_delegate == null)
130 GetValue_cb_delegate = new GetValueNativeDelegate (GetValue_cb);
131 return GetValue_cb_delegate;
135 static void OverrideGetValue (GLib.GType gtype)
137 OverrideGetValue (gtype, GetValueVMCallback);
140 static void OverrideGetValue (GLib.GType gtype, GetValueNativeDelegate callback)
143 IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("get_value"));
144 *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback);
148 [UnmanagedFunctionPointer (CallingConvention.Cdecl)]
149 delegate IntPtr GetValueNativeDelegate (IntPtr inst, ulong timestamp);
151 static IntPtr GetValue_cb (IntPtr inst, ulong timestamp)
154 ControlBinding __obj = GLib.Object.GetObject (inst, false) as ControlBinding;
156 __result = __obj.OnGetValue (timestamp);
157 return GLib.Marshaller.StructureToPtrAlloc (__result);
158 } catch (Exception e) {
159 GLib.ExceptionManager.RaiseUnhandledException (e, true);
160 // NOTREACHED: above call does not return.
165 [GLib.DefaultSignalHandler(Type=typeof(Gst.ControlBinding), ConnectionMethod="OverrideGetValue")]
166 protected virtual GLib.Value OnGetValue (ulong timestamp)
168 return InternalGetValue (timestamp);
171 private GLib.Value InternalGetValue (ulong timestamp)
173 GetValueNativeDelegate unmanaged = null;
175 IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("get_value"));
176 unmanaged = (GetValueNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(GetValueNativeDelegate));
178 if (unmanaged == null) return GLib.Value.Empty;
180 IntPtr __result = unmanaged (this.Handle, timestamp);
181 return (GLib.Value) Marshal.PtrToStructure (__result, typeof (GLib.Value));
185 // Internal representation of the wrapped structure ABI.
186 static GLib.AbiStruct _class_abi = null;
187 static public new GLib.AbiStruct class_abi {
189 if (_class_abi == null)
190 _class_abi = new GLib.AbiStruct (new List<GLib.AbiField>{
191 new GLib.AbiField("sync_values"
192 , Gst.Object.class_abi.Fields
193 , (uint) Marshal.SizeOf(typeof(IntPtr)) // sync_values
196 , (uint) Marshal.SizeOf(typeof(IntPtr))
199 new GLib.AbiField("get_value"
201 , (uint) Marshal.SizeOf(typeof(IntPtr)) // get_value
204 , (uint) Marshal.SizeOf(typeof(IntPtr))
207 new GLib.AbiField("get_value_array"
209 , (uint) Marshal.SizeOf(typeof(IntPtr)) // get_value_array
211 , "get_g_value_array"
212 , (uint) Marshal.SizeOf(typeof(IntPtr))
215 new GLib.AbiField("get_g_value_array"
217 , (uint) Marshal.SizeOf(typeof(IntPtr)) // get_g_value_array
220 , (uint) Marshal.SizeOf(typeof(IntPtr))
223 new GLib.AbiField("_gst_reserved"
225 , (uint) Marshal.SizeOf(typeof(IntPtr)) * 4 // _gst_reserved
226 , "get_g_value_array"
228 , (uint) Marshal.SizeOf(typeof(IntPtr))
238 // End of the ABI representation.
240 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
241 static extern IntPtr gst_control_binding_get_type();
243 public static new GLib.GType GType {
245 IntPtr raw_ret = gst_control_binding_get_type();
246 GLib.GType ret = new GLib.GType(raw_ret);
251 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
252 static extern bool gst_control_binding_get_g_value_array(IntPtr raw, ulong timestamp, ulong interval, uint n_values, IntPtr[] values);
254 public bool GetGValueArray(ulong timestamp, ulong interval, GLib.Value[] values) {
255 int cnt_values = values == null ? 0 : values.Length;
256 IntPtr[] native_values = new IntPtr [cnt_values];
257 for (int i = 0; i < cnt_values; i++)
258 native_values [i] = GLib.Marshaller.StructureToPtrAlloc (values[i]);
259 bool raw_ret = gst_control_binding_get_g_value_array(Handle, timestamp, interval, (uint) (values == null ? 0 : values.Length), native_values);
261 for (int i = 0; i < native_values.Length; i++) {
262 values [i] = (GLib.Value) Marshal.PtrToStructure (native_values[i], typeof (GLib.Value));
263 Marshal.FreeHGlobal (native_values[i]);
268 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
269 static extern IntPtr gst_control_binding_get_value(IntPtr raw, ulong timestamp);
271 public GLib.Value GetValue(ulong timestamp) {
272 IntPtr raw_ret = gst_control_binding_get_value(Handle, timestamp);
273 GLib.Value ret = (GLib.Value) Marshal.PtrToStructure (raw_ret, typeof (GLib.Value));
277 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
278 static extern bool gst_control_binding_is_disabled(IntPtr raw);
280 public bool IsDisabled {
282 bool raw_ret = gst_control_binding_is_disabled(Handle);
288 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
289 static extern bool gst_control_binding_sync_values(IntPtr raw, IntPtr _object, ulong timestamp, ulong last_sync);
291 public bool SyncValues(Gst.Object _object, ulong timestamp, ulong last_sync) {
292 bool raw_ret = gst_control_binding_sync_values(Handle, _object == null ? IntPtr.Zero : _object.Handle, timestamp, last_sync);
298 // Internal representation of the wrapped structure ABI.
299 static GLib.AbiStruct _abi_info = null;
300 static public new GLib.AbiStruct abi_info {
302 if (_abi_info == null)
303 _abi_info = new GLib.AbiStruct (new List<GLib.AbiField>{
304 new GLib.AbiField("name"
305 , Gst.Object.abi_info.Fields
306 , (uint) Marshal.SizeOf(typeof(IntPtr)) // name
309 , (uint) Marshal.SizeOf(typeof(IntPtr))
312 new GLib.AbiField("pspec"
314 , (uint) Marshal.SizeOf(typeof(IntPtr)) // pspec
317 , (uint) Marshal.SizeOf(typeof(IntPtr))
320 new GLib.AbiField("object"
322 , (uint) Marshal.SizeOf(typeof(IntPtr)) // object
325 , (uint) Marshal.SizeOf(typeof(IntPtr))
328 new GLib.AbiField("disabled"
330 , (uint) Marshal.SizeOf(typeof(bool)) // disabled
333 , (long) Marshal.OffsetOf(typeof(GstControlBinding_disabledAlign), "disabled")
336 // union struct ABI.abi
337 new GLib.AbiField("ABI.abi.priv"
339 , (uint) Marshal.SizeOf(typeof(IntPtr)) // ABI.abi.priv
342 , (uint) Marshal.SizeOf(typeof(IntPtr))
348 new GLib.AbiField("ABI._gst_reserved"
350 , (uint) Marshal.SizeOf(typeof(IntPtr)) * 4 // ABI._gst_reserved
353 , (uint) Marshal.SizeOf(typeof(IntPtr))
358 new GLib.AbiField("ABI"
360 , new List<List<string>>() { // union ABI
361 new List<string>() {"ABI.abi.priv"},
362 new List<string>() {"ABI._gst_reserved"}
374 [StructLayout(LayoutKind.Sequential)]
375 public struct GstControlBinding_disabledAlign
378 private bool disabled;
382 // End of the ABI representation.