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 Object : GLib.InitiallyUnowned {
14 protected Object (IntPtr raw) : base(raw) {}
16 protected Object() : base(IntPtr.Zero)
18 CreateNativeObject (new string [0], new GLib.Value [0]);
21 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
22 static extern IntPtr gst_object_get_name(IntPtr raw);
24 [GLib.Property ("name")]
27 IntPtr raw_ret = gst_object_get_name(Handle);
28 string ret = GLib.Marshaller.PtrToStringGFree(raw_ret);
32 GLib.Value val = new GLib.Value(value);
33 SetProperty("name", val);
38 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
39 static extern IntPtr gst_object_get_parent(IntPtr raw);
41 [GLib.Property ("parent")]
42 public Gst.Object Parent {
44 IntPtr raw_ret = gst_object_get_parent(Handle);
45 Gst.Object ret = GLib.Object.GetObject(raw_ret, true) as Gst.Object;
49 GLib.Value val = new GLib.Value(value);
50 SetProperty("parent", val);
55 public GLib.Mutex Lock {
58 IntPtr* raw_ptr = (IntPtr*)(((byte*)Handle) + abi_info.GetFieldOffset("lock"));
59 return new GLib.Mutex((*raw_ptr));
64 public string NameField {
67 IntPtr* raw_ptr = (IntPtr*)(((byte*)Handle) + abi_info.GetFieldOffset("name"));
68 return GLib.Marshaller.Utf8PtrToString ((*raw_ptr));
76 uint* raw_ptr = (uint*)(((byte*)Handle) + abi_info.GetFieldOffset("flags"));
82 uint* raw_ptr = (uint*)(((byte*)Handle) + abi_info.GetFieldOffset("flags"));
88 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
89 static extern ulong gst_object_get_control_rate(IntPtr raw);
91 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
92 static extern void gst_object_set_control_rate(IntPtr raw, ulong control_rate);
94 public ulong ControlRate {
96 ulong raw_ret = gst_object_get_control_rate(Handle);
101 gst_object_set_control_rate(Handle, value);
105 [GLib.Signal("deep-notify")]
106 public event Gst.DeepNotifyHandler DeepNotify {
108 this.AddSignalHandler ("deep-notify", value, typeof (Gst.DeepNotifyArgs));
111 this.RemoveSignalHandler ("deep-notify", value);
115 static DeepNotifyNativeDelegate DeepNotify_cb_delegate;
116 static DeepNotifyNativeDelegate DeepNotifyVMCallback {
118 if (DeepNotify_cb_delegate == null)
119 DeepNotify_cb_delegate = new DeepNotifyNativeDelegate (DeepNotify_cb);
120 return DeepNotify_cb_delegate;
124 static void OverrideDeepNotify (GLib.GType gtype)
126 OverrideDeepNotify (gtype, DeepNotifyVMCallback);
129 static void OverrideDeepNotify (GLib.GType gtype, DeepNotifyNativeDelegate callback)
132 IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("deep_notify"));
133 *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback);
137 [UnmanagedFunctionPointer (CallingConvention.Cdecl)]
138 delegate void DeepNotifyNativeDelegate (IntPtr inst, IntPtr prop_object, IntPtr prop);
140 static void DeepNotify_cb (IntPtr inst, IntPtr prop_object, IntPtr prop)
143 Object __obj = GLib.Object.GetObject (inst, false) as Object;
144 __obj.OnDeepNotify (GLib.Object.GetObject(prop_object) as Gst.Object, prop);
145 } catch (Exception e) {
146 GLib.ExceptionManager.RaiseUnhandledException (e, false);
150 [GLib.DefaultSignalHandler(Type=typeof(Gst.Object), ConnectionMethod="OverrideDeepNotify")]
151 protected virtual void OnDeepNotify (Gst.Object prop_object, IntPtr prop)
153 InternalDeepNotify (prop_object, prop);
156 private void InternalDeepNotify (Gst.Object prop_object, IntPtr prop)
158 DeepNotifyNativeDelegate unmanaged = null;
160 IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("deep_notify"));
161 unmanaged = (DeepNotifyNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(DeepNotifyNativeDelegate));
163 if (unmanaged == null) return;
165 unmanaged (this.Handle, prop_object == null ? IntPtr.Zero : prop_object.Handle, prop);
169 // Internal representation of the wrapped structure ABI.
170 static GLib.AbiStruct _class_abi = null;
171 static public new GLib.AbiStruct class_abi {
173 if (_class_abi == null)
174 _class_abi = new GLib.AbiStruct (new List<GLib.AbiField>{
175 new GLib.AbiField("path_string_separator"
176 , GLib.Object.class_abi.Fields
177 , (uint) Marshal.SizeOf(typeof(IntPtr)) // path_string_separator
180 , (uint) Marshal.SizeOf(typeof(IntPtr))
183 new GLib.AbiField("deep_notify"
185 , (uint) Marshal.SizeOf(typeof(IntPtr)) // deep_notify
186 , "path_string_separator"
188 , (uint) Marshal.SizeOf(typeof(IntPtr))
191 new GLib.AbiField("_gst_reserved"
193 , (uint) Marshal.SizeOf(typeof(IntPtr)) * 4 // _gst_reserved
196 , (uint) Marshal.SizeOf(typeof(IntPtr))
206 // End of the ABI representation.
208 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
209 static extern IntPtr gst_object_get_type();
211 public static new GLib.GType GType {
213 IntPtr raw_ret = gst_object_get_type();
214 GLib.GType ret = new GLib.GType(raw_ret);
219 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
220 static extern bool gst_object_check_uniqueness(IntPtr list, IntPtr name);
222 public static bool CheckUniqueness(GLib.List list, string name) {
223 IntPtr native_name = GLib.Marshaller.StringToPtrGStrdup (name);
224 bool raw_ret = gst_object_check_uniqueness(list == null ? IntPtr.Zero : list.Handle, native_name);
226 GLib.Marshaller.Free (native_name);
230 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
231 static extern void gst_object_default_deep_notify(IntPtr _object, IntPtr orig, IntPtr pspec, IntPtr[] excluded_props);
233 public static void DefaultDeepNotify(GLib.Object _object, Gst.Object orig, IntPtr pspec, string[] excluded_props) {
234 int cnt_excluded_props = excluded_props == null ? 0 : excluded_props.Length;
235 IntPtr[] native_excluded_props = new IntPtr [cnt_excluded_props + 1];
236 for (int i = 0; i < cnt_excluded_props; i++)
237 native_excluded_props [i] = GLib.Marshaller.StringToPtrGStrdup (excluded_props[i]);
238 native_excluded_props [cnt_excluded_props] = IntPtr.Zero;
239 gst_object_default_deep_notify(_object == null ? IntPtr.Zero : _object.Handle, orig == null ? IntPtr.Zero : orig.Handle, pspec, native_excluded_props);
240 for (int i = 0; i < native_excluded_props.Length - 1; i++) {
241 excluded_props [i] = GLib.Marshaller.Utf8PtrToString (native_excluded_props[i]);
242 GLib.Marshaller.Free (native_excluded_props[i]);
246 public static void DefaultDeepNotify(GLib.Object _object, Gst.Object orig, IntPtr pspec) {
247 DefaultDeepNotify (_object, orig, pspec, null);
250 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
251 static extern bool gst_object_replace(IntPtr oldobj, IntPtr newobj);
253 public static bool Replace(Gst.Object oldobj, Gst.Object newobj) {
254 bool raw_ret = gst_object_replace(oldobj == null ? IntPtr.Zero : oldobj.OwnedHandle, newobj == null ? IntPtr.Zero : newobj.Handle);
259 public static bool Replace() {
260 return Replace (null, null);
263 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
264 static extern bool gst_object_add_control_binding(IntPtr raw, IntPtr binding);
266 public bool AddControlBinding(Gst.ControlBinding binding) {
267 bool raw_ret = gst_object_add_control_binding(Handle, binding == null ? IntPtr.Zero : binding.Handle);
272 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
273 static extern void gst_object_default_error(IntPtr raw, IntPtr error, IntPtr debug);
275 public void DefaultError(IntPtr error, string debug) {
276 IntPtr native_debug = GLib.Marshaller.StringToPtrGStrdup (debug);
277 gst_object_default_error(Handle, error, native_debug);
278 GLib.Marshaller.Free (native_debug);
281 public void DefaultError(IntPtr error) {
282 DefaultError (error, null);
285 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
286 static extern IntPtr gst_object_get_control_binding(IntPtr raw, IntPtr property_name);
288 public Gst.ControlBinding GetControlBinding(string property_name) {
289 IntPtr native_property_name = GLib.Marshaller.StringToPtrGStrdup (property_name);
290 IntPtr raw_ret = gst_object_get_control_binding(Handle, native_property_name);
291 Gst.ControlBinding ret = GLib.Object.GetObject(raw_ret, true) as Gst.ControlBinding;
292 GLib.Marshaller.Free (native_property_name);
296 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
297 static extern bool gst_object_get_g_value_array(IntPtr raw, IntPtr property_name, ulong timestamp, ulong interval, uint n_values, IntPtr[] values);
299 public bool GetGValueArray(string property_name, ulong timestamp, ulong interval, GLib.Value[] values) {
300 IntPtr native_property_name = GLib.Marshaller.StringToPtrGStrdup (property_name);
301 int cnt_values = values == null ? 0 : values.Length;
302 IntPtr[] native_values = new IntPtr [cnt_values];
303 for (int i = 0; i < cnt_values; i++)
304 native_values [i] = GLib.Marshaller.StructureToPtrAlloc (values[i]);
305 bool raw_ret = gst_object_get_g_value_array(Handle, native_property_name, timestamp, interval, (uint) (values == null ? 0 : values.Length), native_values);
307 GLib.Marshaller.Free (native_property_name);
308 for (int i = 0; i < native_values.Length; i++) {
309 values [i] = (GLib.Value) Marshal.PtrToStructure (native_values[i], typeof (GLib.Value));
310 Marshal.FreeHGlobal (native_values[i]);
315 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
316 static extern IntPtr gst_object_get_path_string(IntPtr raw);
318 public string PathString {
320 IntPtr raw_ret = gst_object_get_path_string(Handle);
321 string ret = GLib.Marshaller.PtrToStringGFree(raw_ret);
326 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
327 static extern IntPtr gst_object_get_value(IntPtr raw, IntPtr property_name, ulong timestamp);
329 public GLib.Value GetValue(string property_name, ulong timestamp) {
330 IntPtr native_property_name = GLib.Marshaller.StringToPtrGStrdup (property_name);
331 IntPtr raw_ret = gst_object_get_value(Handle, native_property_name, timestamp);
332 GLib.Value ret = (GLib.Value) Marshal.PtrToStructure (raw_ret, typeof (GLib.Value));
333 GLib.Marshaller.Free (native_property_name);
337 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
338 static extern bool gst_object_has_active_control_bindings(IntPtr raw);
340 public bool HasActiveControlBindings {
342 bool raw_ret = gst_object_has_active_control_bindings(Handle);
348 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
349 static extern bool gst_object_has_ancestor(IntPtr raw, IntPtr ancestor);
352 public bool HasAncestor(Gst.Object ancestor) {
353 bool raw_ret = gst_object_has_ancestor(Handle, ancestor == null ? IntPtr.Zero : ancestor.Handle);
358 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
359 static extern bool gst_object_has_as_ancestor(IntPtr raw, IntPtr ancestor);
361 public bool HasAsAncestor(Gst.Object ancestor) {
362 bool raw_ret = gst_object_has_as_ancestor(Handle, ancestor == null ? IntPtr.Zero : ancestor.Handle);
367 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
368 static extern bool gst_object_has_as_parent(IntPtr raw, IntPtr parent);
370 public bool HasAsParent(Gst.Object parent) {
371 bool raw_ret = gst_object_has_as_parent(Handle, parent == null ? IntPtr.Zero : parent.Handle);
376 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
377 static extern IntPtr gst_object_ref(IntPtr raw);
379 public Gst.Object Ref() {
380 IntPtr raw_ret = gst_object_ref(Handle);
381 Gst.Object ret = GLib.Object.GetObject(raw_ret, true) as Gst.Object;
385 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
386 static extern bool gst_object_remove_control_binding(IntPtr raw, IntPtr binding);
388 public bool RemoveControlBinding(Gst.ControlBinding binding) {
389 bool raw_ret = gst_object_remove_control_binding(Handle, binding == null ? IntPtr.Zero : binding.Handle);
394 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
395 static extern void gst_object_set_control_binding_disabled(IntPtr raw, IntPtr property_name, bool disabled);
397 public void SetControlBindingDisabled(string property_name, bool disabled) {
398 IntPtr native_property_name = GLib.Marshaller.StringToPtrGStrdup (property_name);
399 gst_object_set_control_binding_disabled(Handle, native_property_name, disabled);
400 GLib.Marshaller.Free (native_property_name);
403 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
404 static extern void gst_object_set_control_bindings_disabled(IntPtr raw, bool disabled);
406 public bool ControlBindingsDisabled {
408 gst_object_set_control_bindings_disabled(Handle, value);
412 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
413 static extern bool gst_object_set_name(IntPtr raw, IntPtr name);
415 public bool SetName(string name) {
416 IntPtr native_name = GLib.Marshaller.StringToPtrGStrdup (name);
417 bool raw_ret = gst_object_set_name(Handle, native_name);
419 GLib.Marshaller.Free (native_name);
423 public bool SetName() {
424 return SetName (null);
427 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
428 static extern bool gst_object_set_parent(IntPtr raw, IntPtr parent);
430 public bool SetParent(Gst.Object parent) {
431 bool raw_ret = gst_object_set_parent(Handle, parent == null ? IntPtr.Zero : parent.Handle);
436 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
437 static extern ulong gst_object_suggest_next_sync(IntPtr raw);
439 public ulong SuggestNextSync() {
440 ulong raw_ret = gst_object_suggest_next_sync(Handle);
445 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
446 static extern bool gst_object_sync_values(IntPtr raw, ulong timestamp);
448 public bool SyncValues(ulong timestamp) {
449 bool raw_ret = gst_object_sync_values(Handle, timestamp);
454 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
455 static extern void gst_object_unparent(IntPtr raw);
457 public void Unparent() {
458 gst_object_unparent(Handle);
461 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
462 static extern void gst_object_unref(IntPtr raw);
464 public void Unref() {
465 gst_object_unref(Handle);
469 // Internal representation of the wrapped structure ABI.
470 static GLib.AbiStruct _abi_info = null;
471 static public new GLib.AbiStruct abi_info {
473 if (_abi_info == null)
474 _abi_info = new GLib.AbiStruct (new List<GLib.AbiField>{
475 new GLib.AbiField("lock"
476 , GLib.Object.abi_info.Fields
477 , (uint) Marshal.SizeOf(typeof(IntPtr)) // lock
480 , (uint) Marshal.SizeOf(typeof(IntPtr))
483 new GLib.AbiField("name"
485 , (uint) Marshal.SizeOf(typeof(IntPtr)) // name
488 , (uint) Marshal.SizeOf(typeof(IntPtr))
491 new GLib.AbiField("parent"
493 , (uint) Marshal.SizeOf(typeof(IntPtr)) // parent
496 , (uint) Marshal.SizeOf(typeof(IntPtr))
499 new GLib.AbiField("flags"
501 , (uint) Marshal.SizeOf(typeof(uint)) // flags
504 , (long) Marshal.OffsetOf(typeof(GstObject_flagsAlign), "flags")
507 new GLib.AbiField("control_bindings"
509 , (uint) Marshal.SizeOf(typeof(IntPtr)) // control_bindings
512 , (uint) Marshal.SizeOf(typeof(IntPtr))
515 new GLib.AbiField("control_rate"
517 , (uint) Marshal.SizeOf(typeof(ulong)) // control_rate
520 , (long) Marshal.OffsetOf(typeof(GstObject_control_rateAlign), "control_rate")
523 new GLib.AbiField("last_sync"
525 , (uint) Marshal.SizeOf(typeof(ulong)) // last_sync
528 , (long) Marshal.OffsetOf(typeof(GstObject_last_syncAlign), "last_sync")
531 new GLib.AbiField("_gst_reserved"
533 , (uint) Marshal.SizeOf(typeof(IntPtr)) // _gst_reserved
536 , (uint) Marshal.SizeOf(typeof(IntPtr))
545 [StructLayout(LayoutKind.Sequential)]
546 public struct GstObject_flagsAlign
552 [StructLayout(LayoutKind.Sequential)]
553 public struct GstObject_control_rateAlign
556 private ulong control_rate;
559 [StructLayout(LayoutKind.Sequential)]
560 public struct GstObject_last_syncAlign
563 private ulong last_sync;
567 // End of the ABI representation.