summaryrefslogtreecommitdiff
path: root/sources/generated/Gst/Bin.cs
blob: e320cd2489578bd5dc1d1df48434df98077bfc10 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
// This file was generated by the Gtk# code generator.
// Any changes made will be lost if regenerated.

namespace Gst {

	using System;
	using System.Collections;
	using System.Collections.Generic;
	using System.Runtime.InteropServices;

#region Autogenerated code
	public partial class Bin : Gst.Element, Gst.IChildProxy {

		public Bin (IntPtr raw) : base(raw) {}

		[DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern IntPtr gst_bin_new(IntPtr name);

		public Bin (string name) : base (IntPtr.Zero)
		{
			if (GetType () != typeof (Bin)) {
				var vals = new List<GLib.Value> ();
				var names = new List<string> ();
				names.Add ("name");
				vals.Add (new GLib.Value (name));
				CreateNativeObject (names.ToArray (), vals.ToArray ());
				return;
			}
			IntPtr native_name = GLib.Marshaller.StringToPtrGStrdup (name);
			Raw = gst_bin_new(native_name);
			GLib.Marshaller.Free (native_name);
		}

		[GLib.Property ("async-handling")]
		public bool AsyncHandling {
			get {
				GLib.Value val = GetProperty ("async-handling");
				bool ret = (bool) val;
				val.Dispose ();
				return ret;
			}
			set {
				GLib.Value val = new GLib.Value(value);
				SetProperty("async-handling", val);
				val.Dispose ();
			}
		}

		[GLib.Property ("message-forward")]
		public bool MessageForward {
			get {
				GLib.Value val = GetProperty ("message-forward");
				bool ret = (bool) val;
				val.Dispose ();
				return ret;
			}
			set {
				GLib.Value val = new GLib.Value(value);
				SetProperty("message-forward", val);
				val.Dispose ();
			}
		}

		public int Numchildren {
			get {
				unsafe {
					int* raw_ptr = (int*)(((byte*)Handle) + abi_info.GetFieldOffset("numchildren"));
					return (*raw_ptr);
				}
			}
		}

		public GLib.List Children {
			get {
				unsafe {
					IntPtr* raw_ptr = (IntPtr*)(((byte*)Handle) + abi_info.GetFieldOffset("children"));
					return new GLib.List((*raw_ptr));
				}
			}
		}

		public uint ChildrenCookie {
			get {
				unsafe {
					uint* raw_ptr = (uint*)(((byte*)Handle) + abi_info.GetFieldOffset("children_cookie"));
					return (*raw_ptr);
				}
			}
		}

		public Gst.Bus ChildBus {
			get {
				unsafe {
					IntPtr* raw_ptr = (IntPtr*)(((byte*)Handle) + abi_info.GetFieldOffset("child_bus"));
					return GLib.Object.GetObject((*raw_ptr)) as Gst.Bus;
				}
			}
		}

		public GLib.List Messages {
			get {
				unsafe {
					IntPtr* raw_ptr = (IntPtr*)(((byte*)Handle) + abi_info.GetFieldOffset("messages"));
					return new GLib.List((*raw_ptr));
				}
			}
		}

		public bool Polling {
			get {
				unsafe {
					bool* raw_ptr = (bool*)(((byte*)Handle) + abi_info.GetFieldOffset("polling"));
					return (*raw_ptr);
				}
			}
		}

		public bool StateDirty {
			get {
				unsafe {
					bool* raw_ptr = (bool*)(((byte*)Handle) + abi_info.GetFieldOffset("state_dirty"));
					return (*raw_ptr);
				}
			}
		}

		public bool ClockDirty {
			get {
				unsafe {
					bool* raw_ptr = (bool*)(((byte*)Handle) + abi_info.GetFieldOffset("clock_dirty"));
					return (*raw_ptr);
				}
			}
		}

		public Gst.Clock ProvidedClock {
			get {
				unsafe {
					IntPtr* raw_ptr = (IntPtr*)(((byte*)Handle) + abi_info.GetFieldOffset("provided_clock"));
					return GLib.Object.GetObject((*raw_ptr)) as Gst.Clock;
				}
			}
		}

		public Gst.Element ClockProvider {
			get {
				unsafe {
					IntPtr* raw_ptr = (IntPtr*)(((byte*)Handle) + abi_info.GetFieldOffset("clock_provider"));
					return GLib.Object.GetObject((*raw_ptr)) as Gst.Element;
				}
			}
		}

		[GLib.Signal("deep-element-added")]
		public event Gst.DeepElementAddedHandler DeepElementAdded {
			add {
				this.AddSignalHandler ("deep-element-added", value, typeof (Gst.DeepElementAddedArgs));
			}
			remove {
				this.RemoveSignalHandler ("deep-element-added", value);
			}
		}

		[GLib.Signal("deep-element-removed")]
		public event Gst.DeepElementRemovedHandler DeepElementRemoved {
			add {
				this.AddSignalHandler ("deep-element-removed", value, typeof (Gst.DeepElementRemovedArgs));
			}
			remove {
				this.RemoveSignalHandler ("deep-element-removed", value);
			}
		}

		[GLib.Signal("do-latency")]
		public event Gst.DoLatencyHandler DoLatency {
			add {
				this.AddSignalHandler ("do-latency", value, typeof (Gst.DoLatencyArgs));
			}
			remove {
				this.RemoveSignalHandler ("do-latency", value);
			}
		}

		[GLib.Signal("element-added")]
		public event Gst.ElementAddedHandler ElementAdded {
			add {
				this.AddSignalHandler ("element-added", value, typeof (Gst.ElementAddedArgs));
			}
			remove {
				this.RemoveSignalHandler ("element-added", value);
			}
		}

		[GLib.Signal("element-removed")]
		public event Gst.ElementRemovedHandler ElementRemoved {
			add {
				this.AddSignalHandler ("element-removed", value, typeof (Gst.ElementRemovedArgs));
			}
			remove {
				this.RemoveSignalHandler ("element-removed", value);
			}
		}

		static ElementAddedNativeDelegate ElementAdded_cb_delegate;
		static ElementAddedNativeDelegate ElementAddedVMCallback {
			get {
				if (ElementAdded_cb_delegate == null)
					ElementAdded_cb_delegate = new ElementAddedNativeDelegate (ElementAdded_cb);
				return ElementAdded_cb_delegate;
			}
		}

		static void OverrideElementAdded (GLib.GType gtype)
		{
			OverrideElementAdded (gtype, ElementAddedVMCallback);
		}

		static void OverrideElementAdded (GLib.GType gtype, ElementAddedNativeDelegate callback)
		{
			unsafe {
				IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("element_added"));
				*raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback);
			}
		}

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void ElementAddedNativeDelegate (IntPtr inst, IntPtr element);

		static void ElementAdded_cb (IntPtr inst, IntPtr element)
		{
			try {
				Bin __obj = GLib.Object.GetObject (inst, false) as Bin;
				__obj.OnElementAdded (GLib.Object.GetObject(element) as Gst.Element);
			} catch (Exception e) {
				GLib.ExceptionManager.RaiseUnhandledException (e, false);
			}
		}

		[GLib.DefaultSignalHandler(Type=typeof(Gst.Bin), ConnectionMethod="OverrideElementAdded")]
		protected virtual void OnElementAdded (Gst.Element element)
		{
			InternalElementAdded (element);
		}

		private void InternalElementAdded (Gst.Element element)
		{
			ElementAddedNativeDelegate unmanaged = null;
			unsafe {
				IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("element_added"));
				unmanaged = (ElementAddedNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(ElementAddedNativeDelegate));
			}
			if (unmanaged == null) return;

			unmanaged (this.Handle, element == null ? IntPtr.Zero : element.Handle);
		}

		static ElementRemovedNativeDelegate ElementRemoved_cb_delegate;
		static ElementRemovedNativeDelegate ElementRemovedVMCallback {
			get {
				if (ElementRemoved_cb_delegate == null)
					ElementRemoved_cb_delegate = new ElementRemovedNativeDelegate (ElementRemoved_cb);
				return ElementRemoved_cb_delegate;
			}
		}

		static void OverrideElementRemoved (GLib.GType gtype)
		{
			OverrideElementRemoved (gtype, ElementRemovedVMCallback);
		}

		static void OverrideElementRemoved (GLib.GType gtype, ElementRemovedNativeDelegate callback)
		{
			unsafe {
				IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("element_removed"));
				*raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback);
			}
		}

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void ElementRemovedNativeDelegate (IntPtr inst, IntPtr element);

		static void ElementRemoved_cb (IntPtr inst, IntPtr element)
		{
			try {
				Bin __obj = GLib.Object.GetObject (inst, false) as Bin;
				__obj.OnElementRemoved (GLib.Object.GetObject(element) as Gst.Element);
			} catch (Exception e) {
				GLib.ExceptionManager.RaiseUnhandledException (e, false);
			}
		}

		[GLib.DefaultSignalHandler(Type=typeof(Gst.Bin), ConnectionMethod="OverrideElementRemoved")]
		protected virtual void OnElementRemoved (Gst.Element element)
		{
			InternalElementRemoved (element);
		}

		private void InternalElementRemoved (Gst.Element element)
		{
			ElementRemovedNativeDelegate unmanaged = null;
			unsafe {
				IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("element_removed"));
				unmanaged = (ElementRemovedNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(ElementRemovedNativeDelegate));
			}
			if (unmanaged == null) return;

			unmanaged (this.Handle, element == null ? IntPtr.Zero : element.Handle);
		}

		static AddElementNativeDelegate AddElement_cb_delegate;
		static AddElementNativeDelegate AddElementVMCallback {
			get {
				if (AddElement_cb_delegate == null)
					AddElement_cb_delegate = new AddElementNativeDelegate (AddElement_cb);
				return AddElement_cb_delegate;
			}
		}

		static void OverrideAddElement (GLib.GType gtype)
		{
			OverrideAddElement (gtype, AddElementVMCallback);
		}

		static void OverrideAddElement (GLib.GType gtype, AddElementNativeDelegate callback)
		{
			unsafe {
				IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("add_element"));
				*raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback);
			}
		}

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate bool AddElementNativeDelegate (IntPtr inst, IntPtr element);

		static bool AddElement_cb (IntPtr inst, IntPtr element)
		{
			try {
				Bin __obj = GLib.Object.GetObject (inst, false) as Bin;
				bool __result;
				__result = __obj.OnAddElement (GLib.Object.GetObject(element) as Gst.Element);
				return __result;
			} catch (Exception e) {
				GLib.ExceptionManager.RaiseUnhandledException (e, true);
				// NOTREACHED: above call does not return.
				throw e;
			}
		}

		[GLib.DefaultSignalHandler(Type=typeof(Gst.Bin), ConnectionMethod="OverrideAddElement")]
		protected virtual bool OnAddElement (Gst.Element element)
		{
			return InternalAddElement (element);
		}

		private bool InternalAddElement (Gst.Element element)
		{
			AddElementNativeDelegate unmanaged = null;
			unsafe {
				IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("add_element"));
				unmanaged = (AddElementNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(AddElementNativeDelegate));
			}
			if (unmanaged == null) return false;

			bool __result = unmanaged (this.Handle, element == null ? IntPtr.Zero : element.Handle);
			return __result;
		}

		static RemoveElementNativeDelegate RemoveElement_cb_delegate;
		static RemoveElementNativeDelegate RemoveElementVMCallback {
			get {
				if (RemoveElement_cb_delegate == null)
					RemoveElement_cb_delegate = new RemoveElementNativeDelegate (RemoveElement_cb);
				return RemoveElement_cb_delegate;
			}
		}

		static void OverrideRemoveElement (GLib.GType gtype)
		{
			OverrideRemoveElement (gtype, RemoveElementVMCallback);
		}

		static void OverrideRemoveElement (GLib.GType gtype, RemoveElementNativeDelegate callback)
		{
			unsafe {
				IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("remove_element"));
				*raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback);
			}
		}

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate bool RemoveElementNativeDelegate (IntPtr inst, IntPtr element);

		static bool RemoveElement_cb (IntPtr inst, IntPtr element)
		{
			try {
				Bin __obj = GLib.Object.GetObject (inst, false) as Bin;
				bool __result;
				__result = __obj.OnRemoveElement (GLib.Object.GetObject(element) as Gst.Element);
				return __result;
			} catch (Exception e) {
				GLib.ExceptionManager.RaiseUnhandledException (e, true);
				// NOTREACHED: above call does not return.
				throw e;
			}
		}

		[GLib.DefaultSignalHandler(Type=typeof(Gst.Bin), ConnectionMethod="OverrideRemoveElement")]
		protected virtual bool OnRemoveElement (Gst.Element element)
		{
			return InternalRemoveElement (element);
		}

		private bool InternalRemoveElement (Gst.Element element)
		{
			RemoveElementNativeDelegate unmanaged = null;
			unsafe {
				IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("remove_element"));
				unmanaged = (RemoveElementNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(RemoveElementNativeDelegate));
			}
			if (unmanaged == null) return false;

			bool __result = unmanaged (this.Handle, element == null ? IntPtr.Zero : element.Handle);
			return __result;
		}

		static HandleMessageNativeDelegate HandleMessage_cb_delegate;
		static HandleMessageNativeDelegate HandleMessageVMCallback {
			get {
				if (HandleMessage_cb_delegate == null)
					HandleMessage_cb_delegate = new HandleMessageNativeDelegate (HandleMessage_cb);
				return HandleMessage_cb_delegate;
			}
		}

		static void OverrideHandleMessage (GLib.GType gtype)
		{
			OverrideHandleMessage (gtype, HandleMessageVMCallback);
		}

		static void OverrideHandleMessage (GLib.GType gtype, HandleMessageNativeDelegate callback)
		{
			unsafe {
				IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("handle_message"));
				*raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback);
			}
		}

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void HandleMessageNativeDelegate (IntPtr inst, IntPtr message);

		static void HandleMessage_cb (IntPtr inst, IntPtr message)
		{
			try {
				Bin __obj = GLib.Object.GetObject (inst, false) as Bin;
				__obj.OnHandleMessage (message == IntPtr.Zero ? null : (Gst.Message) GLib.Opaque.GetOpaque (message, typeof (Gst.Message), false));
			} catch (Exception e) {
				GLib.ExceptionManager.RaiseUnhandledException (e, false);
			}
		}

		[GLib.DefaultSignalHandler(Type=typeof(Gst.Bin), ConnectionMethod="OverrideHandleMessage")]
		protected virtual void OnHandleMessage (Gst.Message message)
		{
			InternalHandleMessage (message);
		}

		private void InternalHandleMessage (Gst.Message message)
		{
			HandleMessageNativeDelegate unmanaged = null;
			unsafe {
				IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("handle_message"));
				unmanaged = (HandleMessageNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(HandleMessageNativeDelegate));
			}
			if (unmanaged == null) return;

			unmanaged (this.Handle, message == null ? IntPtr.Zero : message.Handle);
		}

		static DoLatencyNativeDelegate DoLatency_cb_delegate;
		static DoLatencyNativeDelegate DoLatencyVMCallback {
			get {
				if (DoLatency_cb_delegate == null)
					DoLatency_cb_delegate = new DoLatencyNativeDelegate (DoLatency_cb);
				return DoLatency_cb_delegate;
			}
		}

		static void OverrideDoLatency (GLib.GType gtype)
		{
			OverrideDoLatency (gtype, DoLatencyVMCallback);
		}

		static void OverrideDoLatency (GLib.GType gtype, DoLatencyNativeDelegate callback)
		{
			unsafe {
				IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("do_latency"));
				*raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback);
			}
		}

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate bool DoLatencyNativeDelegate (IntPtr inst);

		static bool DoLatency_cb (IntPtr inst)
		{
			try {
				Bin __obj = GLib.Object.GetObject (inst, false) as Bin;
				bool __result;
				__result = __obj.OnDoLatency ();
				return __result;
			} catch (Exception e) {
				GLib.ExceptionManager.RaiseUnhandledException (e, true);
				// NOTREACHED: above call does not return.
				throw e;
			}
		}

		[GLib.DefaultSignalHandler(Type=typeof(Gst.Bin), ConnectionMethod="OverrideDoLatency")]
		protected virtual bool OnDoLatency ()
		{
			return InternalDoLatency ();
		}

		private bool InternalDoLatency ()
		{
			DoLatencyNativeDelegate unmanaged = null;
			unsafe {
				IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("do_latency"));
				unmanaged = (DoLatencyNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(DoLatencyNativeDelegate));
			}
			if (unmanaged == null) return false;

			bool __result = unmanaged (this.Handle);
			return __result;
		}

		static DeepElementAddedNativeDelegate DeepElementAdded_cb_delegate;
		static DeepElementAddedNativeDelegate DeepElementAddedVMCallback {
			get {
				if (DeepElementAdded_cb_delegate == null)
					DeepElementAdded_cb_delegate = new DeepElementAddedNativeDelegate (DeepElementAdded_cb);
				return DeepElementAdded_cb_delegate;
			}
		}

		static void OverrideDeepElementAdded (GLib.GType gtype)
		{
			OverrideDeepElementAdded (gtype, DeepElementAddedVMCallback);
		}

		static void OverrideDeepElementAdded (GLib.GType gtype, DeepElementAddedNativeDelegate callback)
		{
			unsafe {
				IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("deep_element_added"));
				*raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback);
			}
		}

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void DeepElementAddedNativeDelegate (IntPtr inst, IntPtr sub_bin, IntPtr element);

		static void DeepElementAdded_cb (IntPtr inst, IntPtr sub_bin, IntPtr element)
		{
			try {
				Bin __obj = GLib.Object.GetObject (inst, false) as Bin;
				__obj.OnDeepElementAdded (GLib.Object.GetObject(sub_bin) as Gst.Bin, GLib.Object.GetObject(element) as Gst.Element);
			} catch (Exception e) {
				GLib.ExceptionManager.RaiseUnhandledException (e, false);
			}
		}

		[GLib.DefaultSignalHandler(Type=typeof(Gst.Bin), ConnectionMethod="OverrideDeepElementAdded")]
		protected virtual void OnDeepElementAdded (Gst.Bin sub_bin, Gst.Element element)
		{
			InternalDeepElementAdded (sub_bin, element);
		}

		private void InternalDeepElementAdded (Gst.Bin sub_bin, Gst.Element element)
		{
			DeepElementAddedNativeDelegate unmanaged = null;
			unsafe {
				IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("deep_element_added"));
				unmanaged = (DeepElementAddedNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(DeepElementAddedNativeDelegate));
			}
			if (unmanaged == null) return;

			unmanaged (this.Handle, sub_bin == null ? IntPtr.Zero : sub_bin.Handle, element == null ? IntPtr.Zero : element.Handle);
		}

		static DeepElementRemovedNativeDelegate DeepElementRemoved_cb_delegate;
		static DeepElementRemovedNativeDelegate DeepElementRemovedVMCallback {
			get {
				if (DeepElementRemoved_cb_delegate == null)
					DeepElementRemoved_cb_delegate = new DeepElementRemovedNativeDelegate (DeepElementRemoved_cb);
				return DeepElementRemoved_cb_delegate;
			}
		}

		static void OverrideDeepElementRemoved (GLib.GType gtype)
		{
			OverrideDeepElementRemoved (gtype, DeepElementRemovedVMCallback);
		}

		static void OverrideDeepElementRemoved (GLib.GType gtype, DeepElementRemovedNativeDelegate callback)
		{
			unsafe {
				IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("deep_element_removed"));
				*raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback);
			}
		}

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void DeepElementRemovedNativeDelegate (IntPtr inst, IntPtr sub_bin, IntPtr element);

		static void DeepElementRemoved_cb (IntPtr inst, IntPtr sub_bin, IntPtr element)
		{
			try {
				Bin __obj = GLib.Object.GetObject (inst, false) as Bin;
				__obj.OnDeepElementRemoved (GLib.Object.GetObject(sub_bin) as Gst.Bin, GLib.Object.GetObject(element) as Gst.Element);
			} catch (Exception e) {
				GLib.ExceptionManager.RaiseUnhandledException (e, false);
			}
		}

		[GLib.DefaultSignalHandler(Type=typeof(Gst.Bin), ConnectionMethod="OverrideDeepElementRemoved")]
		protected virtual void OnDeepElementRemoved (Gst.Bin sub_bin, Gst.Element element)
		{
			InternalDeepElementRemoved (sub_bin, element);
		}

		private void InternalDeepElementRemoved (Gst.Bin sub_bin, Gst.Element element)
		{
			DeepElementRemovedNativeDelegate unmanaged = null;
			unsafe {
				IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("deep_element_removed"));
				unmanaged = (DeepElementRemovedNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(DeepElementRemovedNativeDelegate));
			}
			if (unmanaged == null) return;

			unmanaged (this.Handle, sub_bin == null ? IntPtr.Zero : sub_bin.Handle, element == null ? IntPtr.Zero : element.Handle);
		}


		// Internal representation of the wrapped structure ABI.
		static GLib.AbiStruct _class_abi = null;
		static public new GLib.AbiStruct class_abi {
			get {
				if (_class_abi == null)
					_class_abi = new GLib.AbiStruct (new List<GLib.AbiField>{ 
						new GLib.AbiField("pool"
							, Gst.Element.class_abi.Fields
							, (uint) Marshal.SizeOf(typeof(IntPtr)) // pool
							, null
							, "element_added"
							, (uint) Marshal.SizeOf(typeof(IntPtr))
							, 0
							),
						new GLib.AbiField("element_added"
							, -1
							, (uint) Marshal.SizeOf(typeof(IntPtr)) // element_added
							, "pool"
							, "element_removed"
							, (uint) Marshal.SizeOf(typeof(IntPtr))
							, 0
							),
						new GLib.AbiField("element_removed"
							, -1
							, (uint) Marshal.SizeOf(typeof(IntPtr)) // element_removed
							, "element_added"
							, "add_element"
							, (uint) Marshal.SizeOf(typeof(IntPtr))
							, 0
							),
						new GLib.AbiField("add_element"
							, -1
							, (uint) Marshal.SizeOf(typeof(IntPtr)) // add_element
							, "element_removed"
							, "remove_element"
							, (uint) Marshal.SizeOf(typeof(IntPtr))
							, 0
							),
						new GLib.AbiField("remove_element"
							, -1
							, (uint) Marshal.SizeOf(typeof(IntPtr)) // remove_element
							, "add_element"
							, "handle_message"
							, (uint) Marshal.SizeOf(typeof(IntPtr))
							, 0
							),
						new GLib.AbiField("handle_message"
							, -1
							, (uint) Marshal.SizeOf(typeof(IntPtr)) // handle_message
							, "remove_element"
							, "do_latency"
							, (uint) Marshal.SizeOf(typeof(IntPtr))
							, 0
							),
						new GLib.AbiField("do_latency"
							, -1
							, (uint) Marshal.SizeOf(typeof(IntPtr)) // do_latency
							, "handle_message"
							, "deep_element_added"
							, (uint) Marshal.SizeOf(typeof(IntPtr))
							, 0
							),
						new GLib.AbiField("deep_element_added"
							, -1
							, (uint) Marshal.SizeOf(typeof(IntPtr)) // deep_element_added
							, "do_latency"
							, "deep_element_removed"
							, (uint) Marshal.SizeOf(typeof(IntPtr))
							, 0
							),
						new GLib.AbiField("deep_element_removed"
							, -1
							, (uint) Marshal.SizeOf(typeof(IntPtr)) // deep_element_removed
							, "deep_element_added"
							, "_gst_reserved"
							, (uint) Marshal.SizeOf(typeof(IntPtr))
							, 0
							),
						new GLib.AbiField("_gst_reserved"
							, -1
							, (uint) Marshal.SizeOf(typeof(IntPtr)) * 2 // _gst_reserved
							, "deep_element_removed"
							, null
							, (uint) Marshal.SizeOf(typeof(IntPtr))
							, 0
							),
					});

				return _class_abi;
			}
		}


		// End of the ABI representation.

		[DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern IntPtr gst_bin_get_type();

		public static new GLib.GType GType { 
			get {
				IntPtr raw_ret = gst_bin_get_type();
				GLib.GType ret = new GLib.GType(raw_ret);
				return ret;
			}
		}

		[DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern bool gst_bin_add(IntPtr raw, IntPtr element);

		public bool Add(Gst.Element element) {
			bool raw_ret = gst_bin_add(Handle, element == null ? IntPtr.Zero : element.Handle);
			bool ret = raw_ret;
			return ret;
		}

		[DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern IntPtr gst_bin_find_unlinked_pad(IntPtr raw, int direction);

		public Gst.Pad FindUnlinkedPad(Gst.PadDirection direction) {
			IntPtr raw_ret = gst_bin_find_unlinked_pad(Handle, (int) direction);
			Gst.Pad ret = GLib.Object.GetObject(raw_ret, true) as Gst.Pad;
			return ret;
		}

		[DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern IntPtr gst_bin_get_by_interface(IntPtr raw, IntPtr iface);

		public Gst.Element GetByInterface(GLib.GType iface) {
			IntPtr raw_ret = gst_bin_get_by_interface(Handle, iface.Val);
			Gst.Element ret = GLib.Object.GetObject(raw_ret, true) as Gst.Element;
			return ret;
		}

		[DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern IntPtr gst_bin_get_by_name(IntPtr raw, IntPtr name);

		public Gst.Element GetByName(string name) {
			IntPtr native_name = GLib.Marshaller.StringToPtrGStrdup (name);
			IntPtr raw_ret = gst_bin_get_by_name(Handle, native_name);
			Gst.Element ret = GLib.Object.GetObject(raw_ret, true) as Gst.Element;
			GLib.Marshaller.Free (native_name);
			return ret;
		}

		[DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern IntPtr gst_bin_get_by_name_recurse_up(IntPtr raw, IntPtr name);

		public Gst.Element GetByNameRecurseUp(string name) {
			IntPtr native_name = GLib.Marshaller.StringToPtrGStrdup (name);
			IntPtr raw_ret = gst_bin_get_by_name_recurse_up(Handle, native_name);
			Gst.Element ret = GLib.Object.GetObject(raw_ret, true) as Gst.Element;
			GLib.Marshaller.Free (native_name);
			return ret;
		}

		[DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern int gst_bin_get_suppressed_flags(IntPtr raw);

		[DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern void gst_bin_set_suppressed_flags(IntPtr raw, int flags);

		public Gst.ElementFlags SuppressedFlags { 
			get {
				int raw_ret = gst_bin_get_suppressed_flags(Handle);
				Gst.ElementFlags ret = (Gst.ElementFlags) raw_ret;
				return ret;
			}
			set {
				gst_bin_set_suppressed_flags(Handle, (int) value);
			}
		}

		[DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern IntPtr gst_bin_iterate_all_by_element_factory_name(IntPtr raw, IntPtr factory_name);

		public Gst.Iterator IterateAllByElementFactoryName(string factory_name) {
			IntPtr native_factory_name = GLib.Marshaller.StringToPtrGStrdup (factory_name);
			IntPtr raw_ret = gst_bin_iterate_all_by_element_factory_name(Handle, native_factory_name);
			Gst.Iterator ret = raw_ret == IntPtr.Zero ? null : (Gst.Iterator) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Iterator), true);
			GLib.Marshaller.Free (native_factory_name);
			return ret;
		}

		[DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern IntPtr gst_bin_iterate_all_by_interface(IntPtr raw, IntPtr iface);

		public Gst.Iterator IterateAllByInterface(GLib.GType iface) {
			IntPtr raw_ret = gst_bin_iterate_all_by_interface(Handle, iface.Val);
			Gst.Iterator ret = raw_ret == IntPtr.Zero ? null : (Gst.Iterator) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Iterator), true);
			return ret;
		}

		[DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern IntPtr gst_bin_iterate_elements(IntPtr raw);

		public Gst.Iterator IterateElements() {
			IntPtr raw_ret = gst_bin_iterate_elements(Handle);
			Gst.Iterator ret = raw_ret == IntPtr.Zero ? null : (Gst.Iterator) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Iterator), true);
			return ret;
		}

		[DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern IntPtr gst_bin_iterate_recurse(IntPtr raw);

		public Gst.Iterator IterateRecurse() {
			IntPtr raw_ret = gst_bin_iterate_recurse(Handle);
			Gst.Iterator ret = raw_ret == IntPtr.Zero ? null : (Gst.Iterator) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Iterator), true);
			return ret;
		}

		[DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern IntPtr gst_bin_iterate_sinks(IntPtr raw);

		public Gst.Iterator IterateSinks() {
			IntPtr raw_ret = gst_bin_iterate_sinks(Handle);
			Gst.Iterator ret = raw_ret == IntPtr.Zero ? null : (Gst.Iterator) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Iterator), true);
			return ret;
		}

		[DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern IntPtr gst_bin_iterate_sorted(IntPtr raw);

		public Gst.Iterator IterateSorted() {
			IntPtr raw_ret = gst_bin_iterate_sorted(Handle);
			Gst.Iterator ret = raw_ret == IntPtr.Zero ? null : (Gst.Iterator) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Iterator), true);
			return ret;
		}

		[DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern IntPtr gst_bin_iterate_sources(IntPtr raw);

		public Gst.Iterator IterateSources() {
			IntPtr raw_ret = gst_bin_iterate_sources(Handle);
			Gst.Iterator ret = raw_ret == IntPtr.Zero ? null : (Gst.Iterator) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Iterator), true);
			return ret;
		}

		[DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern bool gst_bin_recalculate_latency(IntPtr raw);

		public bool RecalculateLatency() {
			bool raw_ret = gst_bin_recalculate_latency(Handle);
			bool ret = raw_ret;
			return ret;
		}

		[DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern bool gst_bin_remove(IntPtr raw, IntPtr element);

		public bool Remove(Gst.Element element) {
			bool raw_ret = gst_bin_remove(Handle, element == null ? IntPtr.Zero : element.Handle);
			bool ret = raw_ret;
			return ret;
		}

		[DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern bool gst_bin_sync_children_states(IntPtr raw);

		public bool SyncChildrenStates() {
			bool raw_ret = gst_bin_sync_children_states(Handle);
			bool ret = raw_ret;
			return ret;
		}

		[DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern void gst_child_proxy_child_added(IntPtr raw, IntPtr child, IntPtr name);

		public void ChildAdded(GLib.Object child, string name) {
			IntPtr native_name = GLib.Marshaller.StringToPtrGStrdup (name);
			gst_child_proxy_child_added(Handle, child == null ? IntPtr.Zero : child.Handle, native_name);
			GLib.Marshaller.Free (native_name);
		}

		[DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern void gst_child_proxy_child_removed(IntPtr raw, IntPtr child, IntPtr name);

		public void ChildRemoved(GLib.Object child, string name) {
			IntPtr native_name = GLib.Marshaller.StringToPtrGStrdup (name);
			gst_child_proxy_child_removed(Handle, child == null ? IntPtr.Zero : child.Handle, native_name);
			GLib.Marshaller.Free (native_name);
		}

		[DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern IntPtr gst_child_proxy_get_child_by_index(IntPtr raw, uint index);

		public GLib.Object GetChildByIndex(uint index) {
			IntPtr raw_ret = gst_child_proxy_get_child_by_index(Handle, index);
			GLib.Object ret = GLib.Object.GetObject (raw_ret);
			return ret;
		}

		[DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern IntPtr gst_child_proxy_get_child_by_name(IntPtr raw, IntPtr name);

		public GLib.Object GetChildByName(string name) {
			IntPtr native_name = GLib.Marshaller.StringToPtrGStrdup (name);
			IntPtr raw_ret = gst_child_proxy_get_child_by_name(Handle, native_name);
			GLib.Object ret = GLib.Object.GetObject (raw_ret);
			GLib.Marshaller.Free (native_name);
			return ret;
		}

		[DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern uint gst_child_proxy_get_children_count(IntPtr raw);

		public uint ChildrenCount { 
			get {
				uint raw_ret = gst_child_proxy_get_children_count(Handle);
				uint ret = raw_ret;
				return ret;
			}
		}

		[DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern bool gst_child_proxy_lookup(IntPtr raw, IntPtr name, out IntPtr target, out IntPtr pspec);

		public bool Lookup(string name, out GLib.Object target, out IntPtr pspec) {
			IntPtr native_name = GLib.Marshaller.StringToPtrGStrdup (name);
			IntPtr native_target;
			bool raw_ret = gst_child_proxy_lookup(Handle, native_name, out native_target, out pspec);
			bool ret = raw_ret;
			GLib.Marshaller.Free (native_name);
			target = GLib.Object.GetObject (native_target);
			return ret;
		}

		[GLib.Signal("child-removed")]
		public event Gst.ChildRemovedEventHandler ChildRemovedEvent {
			add {
				this.AddSignalHandler ("child-removed", value, typeof (Gst.ChildRemovedEventArgs));
			}
			remove {
				this.RemoveSignalHandler ("child-removed", value);
			}
		}

		[GLib.Signal("child-added")]
		public event Gst.ChildAddedEventHandler ChildAddedEvent {
			add {
				this.AddSignalHandler ("child-added", value, typeof (Gst.ChildAddedEventArgs));
			}
			remove {
				this.RemoveSignalHandler ("child-added", value);
			}
		}

		static ChildAddedEventNativeDelegate ChildAddedEvent_cb_delegate;
		static ChildAddedEventNativeDelegate ChildAddedEventVMCallback {
			get {
				if (ChildAddedEvent_cb_delegate == null)
					ChildAddedEvent_cb_delegate = new ChildAddedEventNativeDelegate (ChildAddedEvent_cb);
				return ChildAddedEvent_cb_delegate;
			}
		}

		static void OverrideChildAddedEvent (GLib.GType gtype)
		{
			OverrideChildAddedEvent (gtype, ChildAddedEventVMCallback);
		}

		static void OverrideChildAddedEvent (GLib.GType gtype, ChildAddedEventNativeDelegate callback)
		{
			OverrideVirtualMethod (gtype, "child-added", callback);
		}
		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void ChildAddedEventNativeDelegate (IntPtr inst, IntPtr _object, IntPtr name);

		static void ChildAddedEvent_cb (IntPtr inst, IntPtr _object, IntPtr name)
		{
			try {
				Gst.Bin __obj = GLib.Object.GetObject (inst, false) as Gst.Bin;
				__obj.OnChildAddedEvent (GLib.Object.GetObject (_object), GLib.Marshaller.Utf8PtrToString (name));
			} catch (Exception e) {
				GLib.ExceptionManager.RaiseUnhandledException (e, false);
			}
		}

		[GLib.DefaultSignalHandler(Type=typeof(Gst.Bin), ConnectionMethod="OverrideChildAddedEvent")]
		protected virtual void OnChildAddedEvent (GLib.Object _object, string name)
		{
			InternalChildAddedEvent (_object, name);
		}

		private void InternalChildAddedEvent (GLib.Object _object, string name)
		{
			GLib.Value ret = GLib.Value.Empty;
			GLib.ValueArray inst_and_params = new GLib.ValueArray (3);
			GLib.Value[] vals = new GLib.Value [3];
			vals [0] = new GLib.Value (this);
			inst_and_params.Append (vals [0]);
			vals [1] = new GLib.Value (_object);
			inst_and_params.Append (vals [1]);
			vals [2] = new GLib.Value (name);
			inst_and_params.Append (vals [2]);
			g_signal_chain_from_overridden (inst_and_params.ArrayPtr, ref ret);
			foreach (GLib.Value v in vals)
				v.Dispose ();
		}

		static ChildRemovedEventNativeDelegate ChildRemovedEvent_cb_delegate;
		static ChildRemovedEventNativeDelegate ChildRemovedEventVMCallback {
			get {
				if (ChildRemovedEvent_cb_delegate == null)
					ChildRemovedEvent_cb_delegate = new ChildRemovedEventNativeDelegate (ChildRemovedEvent_cb);
				return ChildRemovedEvent_cb_delegate;
			}
		}

		static void OverrideChildRemovedEvent (GLib.GType gtype)
		{
			OverrideChildRemovedEvent (gtype, ChildRemovedEventVMCallback);
		}

		static void OverrideChildRemovedEvent (GLib.GType gtype, ChildRemovedEventNativeDelegate callback)
		{
			OverrideVirtualMethod (gtype, "child-removed", callback);
		}
		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void ChildRemovedEventNativeDelegate (IntPtr inst, IntPtr _object, IntPtr name);

		static void ChildRemovedEvent_cb (IntPtr inst, IntPtr _object, IntPtr name)
		{
			try {
				Gst.Bin __obj = GLib.Object.GetObject (inst, false) as Gst.Bin;
				__obj.OnChildRemovedEvent (GLib.Object.GetObject (_object), GLib.Marshaller.Utf8PtrToString (name));
			} catch (Exception e) {
				GLib.ExceptionManager.RaiseUnhandledException (e, false);
			}
		}

		[GLib.DefaultSignalHandler(Type=typeof(Gst.Bin), ConnectionMethod="OverrideChildRemovedEvent")]
		protected virtual void OnChildRemovedEvent (GLib.Object _object, string name)
		{
			InternalChildRemovedEvent (_object, name);
		}

		private void InternalChildRemovedEvent (GLib.Object _object, string name)
		{
			GLib.Value ret = GLib.Value.Empty;
			GLib.ValueArray inst_and_params = new GLib.ValueArray (3);
			GLib.Value[] vals = new GLib.Value [3];
			vals [0] = new GLib.Value (this);
			inst_and_params.Append (vals [0]);
			vals [1] = new GLib.Value (_object);
			inst_and_params.Append (vals [1]);
			vals [2] = new GLib.Value (name);
			inst_and_params.Append (vals [2]);
			g_signal_chain_from_overridden (inst_and_params.ArrayPtr, ref ret);
			foreach (GLib.Value v in vals)
				v.Dispose ();
		}


		// Internal representation of the wrapped structure ABI.
		static GLib.AbiStruct _abi_info = null;
		static public new GLib.AbiStruct abi_info {
			get {
				if (_abi_info == null)
					_abi_info = new GLib.AbiStruct (new List<GLib.AbiField>{ 
						new GLib.AbiField("numchildren"
							, Gst.Element.abi_info.Fields
							, (uint) Marshal.SizeOf(typeof(int)) // numchildren
							, null
							, "children"
							, (long) Marshal.OffsetOf(typeof(GstBin_numchildrenAlign), "numchildren")
							, 0
							),
						new GLib.AbiField("children"
							, -1
							, (uint) Marshal.SizeOf(typeof(IntPtr)) // children
							, "numchildren"
							, "children_cookie"
							, (uint) Marshal.SizeOf(typeof(IntPtr))
							, 0
							),
						new GLib.AbiField("children_cookie"
							, -1
							, (uint) Marshal.SizeOf(typeof(uint)) // children_cookie
							, "children"
							, "child_bus"
							, (long) Marshal.OffsetOf(typeof(GstBin_children_cookieAlign), "children_cookie")
							, 0
							),
						new GLib.AbiField("child_bus"
							, -1
							, (uint) Marshal.SizeOf(typeof(IntPtr)) // child_bus
							, "children_cookie"
							, "messages"
							, (uint) Marshal.SizeOf(typeof(IntPtr))
							, 0
							),
						new GLib.AbiField("messages"
							, -1
							, (uint) Marshal.SizeOf(typeof(IntPtr)) // messages
							, "child_bus"
							, "polling"
							, (uint) Marshal.SizeOf(typeof(IntPtr))
							, 0
							),
						new GLib.AbiField("polling"
							, -1
							, (uint) Marshal.SizeOf(typeof(bool)) // polling
							, "messages"
							, "state_dirty"
							, (long) Marshal.OffsetOf(typeof(GstBin_pollingAlign), "polling")
							, 0
							),
						new GLib.AbiField("state_dirty"
							, -1
							, (uint) Marshal.SizeOf(typeof(bool)) // state_dirty
							, "polling"
							, "clock_dirty"
							, (long) Marshal.OffsetOf(typeof(GstBin_state_dirtyAlign), "state_dirty")
							, 0
							),
						new GLib.AbiField("clock_dirty"
							, -1
							, (uint) Marshal.SizeOf(typeof(bool)) // clock_dirty
							, "state_dirty"
							, "provided_clock"
							, (long) Marshal.OffsetOf(typeof(GstBin_clock_dirtyAlign), "clock_dirty")
							, 0
							),
						new GLib.AbiField("provided_clock"
							, -1
							, (uint) Marshal.SizeOf(typeof(IntPtr)) // provided_clock
							, "clock_dirty"
							, "clock_provider"
							, (uint) Marshal.SizeOf(typeof(IntPtr))
							, 0
							),
						new GLib.AbiField("clock_provider"
							, -1
							, (uint) Marshal.SizeOf(typeof(IntPtr)) // clock_provider
							, "provided_clock"
							, "priv"
							, (uint) Marshal.SizeOf(typeof(IntPtr))
							, 0
							),
						new GLib.AbiField("priv"
							, -1
							, (uint) Marshal.SizeOf(typeof(IntPtr)) // priv
							, "clock_provider"
							, "_gst_reserved"
							, (uint) Marshal.SizeOf(typeof(IntPtr))
							, 0
							),
						new GLib.AbiField("_gst_reserved"
							, -1
							, (uint) Marshal.SizeOf(typeof(IntPtr)) * 4 // _gst_reserved
							, "priv"
							, null
							, (uint) Marshal.SizeOf(typeof(IntPtr))
							, 0
							),
					});

				return _abi_info;
			}
		}

		[StructLayout(LayoutKind.Sequential)]
		public struct GstBin_numchildrenAlign
		{
			sbyte f1;
			private int numchildren;
		}

		[StructLayout(LayoutKind.Sequential)]
		public struct GstBin_children_cookieAlign
		{
			sbyte f1;
			private uint children_cookie;
		}

		[StructLayout(LayoutKind.Sequential)]
		public struct GstBin_pollingAlign
		{
			sbyte f1;
			private bool polling;
		}

		[StructLayout(LayoutKind.Sequential)]
		public struct GstBin_state_dirtyAlign
		{
			sbyte f1;
			private bool state_dirty;
		}

		[StructLayout(LayoutKind.Sequential)]
		public struct GstBin_clock_dirtyAlign
		{
			sbyte f1;
			private bool clock_dirty;
		}


		// End of the ABI representation.

#endregion
	}
}