File: Gdk_DragContext.cs

package info (click to toggle)
gnome-subtitles 1.8-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, sid
  • size: 103,144 kB
  • sloc: xml: 406,395; cs: 364,495; ansic: 3,104; perl: 1,477; sh: 769; python: 545; javascript: 500; makefile: 49
file content (1483 lines) | stat: -rw-r--r-- 49,760 bytes parent folder | download
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
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
// This file was generated by the Gtk# code generator.
// Any changes made will be lost if regenerated.

namespace Gdk {

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

#region Autogenerated code
	public partial class DragContext : GLib.Object {

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

		protected DragContext() : base(IntPtr.Zero)
		{
			CreateNativeObject (new string [0], new GLib.Value [0]);
		}

		[GLib.Signal("drop-performed")]
		public event Gdk.DropPerformedHandler DropPerformed {
			add {
				this.AddSignalHandler ("drop-performed", value, typeof (Gdk.DropPerformedArgs));
			}
			remove {
				this.RemoveSignalHandler ("drop-performed", value);
			}
		}

		[GLib.Signal("cancel")]
		public event Gdk.CancelHandler Cancel {
			add {
				this.AddSignalHandler ("cancel", value, typeof (Gdk.CancelArgs));
			}
			remove {
				this.RemoveSignalHandler ("cancel", value);
			}
		}

		[GLib.Signal("dnd-finished")]
		public event System.EventHandler DndFinished {
			add {
				this.AddSignalHandler ("dnd-finished", value);
			}
			remove {
				this.RemoveSignalHandler ("dnd-finished", value);
			}
		}

		[GLib.Signal("action-changed")]
		public event Gdk.ActionChangedHandler ActionChanged {
			add {
				this.AddSignalHandler ("action-changed", value, typeof (Gdk.ActionChangedArgs));
			}
			remove {
				this.RemoveSignalHandler ("action-changed", value);
			}
		}

		static FindWindowNativeDelegate FindWindow_cb_delegate;
		static FindWindowNativeDelegate FindWindowVMCallback {
			get {
				if (FindWindow_cb_delegate == null)
					FindWindow_cb_delegate = new FindWindowNativeDelegate (FindWindow_cb);
				return FindWindow_cb_delegate;
			}
		}

		static void OverrideFindWindow (GLib.GType gtype)
		{
			OverrideFindWindow (gtype, FindWindowVMCallback);
		}

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

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate IntPtr FindWindowNativeDelegate (IntPtr inst, IntPtr drag_window, IntPtr screen, int x_root, int y_root, out int protocol);

		static IntPtr FindWindow_cb (IntPtr inst, IntPtr drag_window, IntPtr screen, int x_root, int y_root, out int protocol)
		{
			try {
				DragContext __obj = GLib.Object.GetObject (inst, false) as DragContext;
				Gdk.Window __result;
				Gdk.DragProtocol myprotocol;
				__result = __obj.OnFindWindow (GLib.Object.GetObject(drag_window) as Gdk.Window, GLib.Object.GetObject(screen) as Gdk.Screen, x_root, y_root, out myprotocol);
				protocol = (int) myprotocol;
				return __result == null ? IntPtr.Zero : __result.Handle;
			} catch (Exception e) {
				GLib.ExceptionManager.RaiseUnhandledException (e, true);
				// NOTREACHED: above call does not return.
				throw e;
			}
		}

		[GLib.DefaultSignalHandler(Type=typeof(Gdk.DragContext), ConnectionMethod="OverrideFindWindow")]
		protected virtual Gdk.Window OnFindWindow (Gdk.Window drag_window, Gdk.Screen screen, int x_root, int y_root, out Gdk.DragProtocol protocol)
		{
			return InternalFindWindow (drag_window, screen, x_root, y_root, out protocol);
		}

		private Gdk.Window InternalFindWindow (Gdk.Window drag_window, Gdk.Screen screen, int x_root, int y_root, out Gdk.DragProtocol protocol)
		{
			FindWindowNativeDelegate unmanaged = null;
			unsafe {
				IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("find_window"));
				unmanaged = (FindWindowNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(FindWindowNativeDelegate));
			}
			if (unmanaged == null) throw new InvalidOperationException ("No base method to invoke");

			int native_protocol;
			IntPtr __result = unmanaged (this.Handle, drag_window == null ? IntPtr.Zero : drag_window.Handle, screen == null ? IntPtr.Zero : screen.Handle, x_root, y_root, out native_protocol);
			protocol = (Gdk.DragProtocol) native_protocol;
			return GLib.Object.GetObject(__result) as Gdk.Window;
		}

		static GetSelectionNativeDelegate GetSelection_cb_delegate;
		static GetSelectionNativeDelegate GetSelectionVMCallback {
			get {
				if (GetSelection_cb_delegate == null)
					GetSelection_cb_delegate = new GetSelectionNativeDelegate (GetSelection_cb);
				return GetSelection_cb_delegate;
			}
		}

		static void OverrideGetSelection (GLib.GType gtype)
		{
			OverrideGetSelection (gtype, GetSelectionVMCallback);
		}

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

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

		static IntPtr GetSelection_cb (IntPtr inst)
		{
			try {
				DragContext __obj = GLib.Object.GetObject (inst, false) as DragContext;
				Gdk.Atom __result;
				__result = __obj.OnGetSelection ();
				return __result == null ? IntPtr.Zero : __result.Handle;
			} catch (Exception e) {
				GLib.ExceptionManager.RaiseUnhandledException (e, true);
				// NOTREACHED: above call does not return.
				throw e;
			}
		}

		[GLib.DefaultSignalHandler(Type=typeof(Gdk.DragContext), ConnectionMethod="OverrideGetSelection")]
		protected virtual Gdk.Atom OnGetSelection ()
		{
			return InternalGetSelection ();
		}

		private Gdk.Atom InternalGetSelection ()
		{
			GetSelectionNativeDelegate unmanaged = null;
			unsafe {
				IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("get_selection"));
				unmanaged = (GetSelectionNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(GetSelectionNativeDelegate));
			}
			if (unmanaged == null) return null;

			IntPtr __result = unmanaged (this.Handle);
			return __result == IntPtr.Zero ? null : (Gdk.Atom) GLib.Opaque.GetOpaque (__result, typeof (Gdk.Atom), false);
		}

		static DragMotionNativeDelegate DragMotion_cb_delegate;
		static DragMotionNativeDelegate DragMotionVMCallback {
			get {
				if (DragMotion_cb_delegate == null)
					DragMotion_cb_delegate = new DragMotionNativeDelegate (DragMotion_cb);
				return DragMotion_cb_delegate;
			}
		}

		static void OverrideDragMotion (GLib.GType gtype)
		{
			OverrideDragMotion (gtype, DragMotionVMCallback);
		}

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

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate bool DragMotionNativeDelegate (IntPtr inst, IntPtr dest_window, int protocol, int root_x, int root_y, int suggested_action, int possible_actions, uint time_);

		static bool DragMotion_cb (IntPtr inst, IntPtr dest_window, int protocol, int root_x, int root_y, int suggested_action, int possible_actions, uint time_)
		{
			try {
				DragContext __obj = GLib.Object.GetObject (inst, false) as DragContext;
				bool __result;
				__result = __obj.OnDragMotion (GLib.Object.GetObject(dest_window) as Gdk.Window, (Gdk.DragProtocol) protocol, root_x, root_y, (Gdk.DragAction) suggested_action, (Gdk.DragAction) possible_actions, time_);
				return __result;
			} catch (Exception e) {
				GLib.ExceptionManager.RaiseUnhandledException (e, true);
				// NOTREACHED: above call does not return.
				throw e;
			}
		}

		[GLib.DefaultSignalHandler(Type=typeof(Gdk.DragContext), ConnectionMethod="OverrideDragMotion")]
		protected virtual bool OnDragMotion (Gdk.Window dest_window, Gdk.DragProtocol protocol, int root_x, int root_y, Gdk.DragAction suggested_action, Gdk.DragAction possible_actions, uint time_)
		{
			return InternalDragMotion (dest_window, protocol, root_x, root_y, suggested_action, possible_actions, time_);
		}

		private bool InternalDragMotion (Gdk.Window dest_window, Gdk.DragProtocol protocol, int root_x, int root_y, Gdk.DragAction suggested_action, Gdk.DragAction possible_actions, uint time_)
		{
			DragMotionNativeDelegate unmanaged = null;
			unsafe {
				IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("drag_motion"));
				unmanaged = (DragMotionNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(DragMotionNativeDelegate));
			}
			if (unmanaged == null) return false;

			bool __result = unmanaged (this.Handle, dest_window == null ? IntPtr.Zero : dest_window.Handle, (int) protocol, root_x, root_y, (int) suggested_action, (int) possible_actions, time_);
			return __result;
		}

		static DragStatusNativeDelegate DragStatus_cb_delegate;
		static DragStatusNativeDelegate DragStatusVMCallback {
			get {
				if (DragStatus_cb_delegate == null)
					DragStatus_cb_delegate = new DragStatusNativeDelegate (DragStatus_cb);
				return DragStatus_cb_delegate;
			}
		}

		static void OverrideDragStatus (GLib.GType gtype)
		{
			OverrideDragStatus (gtype, DragStatusVMCallback);
		}

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

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void DragStatusNativeDelegate (IntPtr inst, int action, uint time_);

		static void DragStatus_cb (IntPtr inst, int action, uint time_)
		{
			try {
				DragContext __obj = GLib.Object.GetObject (inst, false) as DragContext;
				__obj.OnDragStatus ((Gdk.DragAction) action, time_);
			} catch (Exception e) {
				GLib.ExceptionManager.RaiseUnhandledException (e, false);
			}
		}

		[GLib.DefaultSignalHandler(Type=typeof(Gdk.DragContext), ConnectionMethod="OverrideDragStatus")]
		protected virtual void OnDragStatus (Gdk.DragAction action, uint time_)
		{
			InternalDragStatus (action, time_);
		}

		private void InternalDragStatus (Gdk.DragAction action, uint time_)
		{
			DragStatusNativeDelegate unmanaged = null;
			unsafe {
				IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("drag_status"));
				unmanaged = (DragStatusNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(DragStatusNativeDelegate));
			}
			if (unmanaged == null) return;

			unmanaged (this.Handle, (int) action, time_);
		}

		static DragAbortNativeDelegate DragAbort_cb_delegate;
		static DragAbortNativeDelegate DragAbortVMCallback {
			get {
				if (DragAbort_cb_delegate == null)
					DragAbort_cb_delegate = new DragAbortNativeDelegate (DragAbort_cb);
				return DragAbort_cb_delegate;
			}
		}

		static void OverrideDragAbort (GLib.GType gtype)
		{
			OverrideDragAbort (gtype, DragAbortVMCallback);
		}

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

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void DragAbortNativeDelegate (IntPtr inst, uint time_);

		static void DragAbort_cb (IntPtr inst, uint time_)
		{
			try {
				DragContext __obj = GLib.Object.GetObject (inst, false) as DragContext;
				__obj.OnDragAbort (time_);
			} catch (Exception e) {
				GLib.ExceptionManager.RaiseUnhandledException (e, false);
			}
		}

		[GLib.DefaultSignalHandler(Type=typeof(Gdk.DragContext), ConnectionMethod="OverrideDragAbort")]
		protected virtual void OnDragAbort (uint time_)
		{
			InternalDragAbort (time_);
		}

		private void InternalDragAbort (uint time_)
		{
			DragAbortNativeDelegate unmanaged = null;
			unsafe {
				IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("drag_abort"));
				unmanaged = (DragAbortNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(DragAbortNativeDelegate));
			}
			if (unmanaged == null) return;

			unmanaged (this.Handle, time_);
		}

		static DragDropNativeDelegate DragDrop_cb_delegate;
		static DragDropNativeDelegate DragDropVMCallback {
			get {
				if (DragDrop_cb_delegate == null)
					DragDrop_cb_delegate = new DragDropNativeDelegate (DragDrop_cb);
				return DragDrop_cb_delegate;
			}
		}

		static void OverrideDragDrop (GLib.GType gtype)
		{
			OverrideDragDrop (gtype, DragDropVMCallback);
		}

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

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void DragDropNativeDelegate (IntPtr inst, uint time_);

		static void DragDrop_cb (IntPtr inst, uint time_)
		{
			try {
				DragContext __obj = GLib.Object.GetObject (inst, false) as DragContext;
				__obj.OnDragDrop (time_);
			} catch (Exception e) {
				GLib.ExceptionManager.RaiseUnhandledException (e, false);
			}
		}

		[GLib.DefaultSignalHandler(Type=typeof(Gdk.DragContext), ConnectionMethod="OverrideDragDrop")]
		protected virtual void OnDragDrop (uint time_)
		{
			InternalDragDrop (time_);
		}

		private void InternalDragDrop (uint time_)
		{
			DragDropNativeDelegate unmanaged = null;
			unsafe {
				IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("drag_drop"));
				unmanaged = (DragDropNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(DragDropNativeDelegate));
			}
			if (unmanaged == null) return;

			unmanaged (this.Handle, time_);
		}

		static DropReplyNativeDelegate DropReply_cb_delegate;
		static DropReplyNativeDelegate DropReplyVMCallback {
			get {
				if (DropReply_cb_delegate == null)
					DropReply_cb_delegate = new DropReplyNativeDelegate (DropReply_cb);
				return DropReply_cb_delegate;
			}
		}

		static void OverrideDropReply (GLib.GType gtype)
		{
			OverrideDropReply (gtype, DropReplyVMCallback);
		}

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

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void DropReplyNativeDelegate (IntPtr inst, bool accept, uint time_);

		static void DropReply_cb (IntPtr inst, bool accept, uint time_)
		{
			try {
				DragContext __obj = GLib.Object.GetObject (inst, false) as DragContext;
				__obj.OnDropReply (accept, time_);
			} catch (Exception e) {
				GLib.ExceptionManager.RaiseUnhandledException (e, false);
			}
		}

		[GLib.DefaultSignalHandler(Type=typeof(Gdk.DragContext), ConnectionMethod="OverrideDropReply")]
		protected virtual void OnDropReply (bool accept, uint time_)
		{
			InternalDropReply (accept, time_);
		}

		private void InternalDropReply (bool accept, uint time_)
		{
			DropReplyNativeDelegate unmanaged = null;
			unsafe {
				IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("drop_reply"));
				unmanaged = (DropReplyNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(DropReplyNativeDelegate));
			}
			if (unmanaged == null) return;

			unmanaged (this.Handle, accept, time_);
		}

		static DropFinishNativeDelegate DropFinish_cb_delegate;
		static DropFinishNativeDelegate DropFinishVMCallback {
			get {
				if (DropFinish_cb_delegate == null)
					DropFinish_cb_delegate = new DropFinishNativeDelegate (DropFinish_cb);
				return DropFinish_cb_delegate;
			}
		}

		static void OverrideDropFinish (GLib.GType gtype)
		{
			OverrideDropFinish (gtype, DropFinishVMCallback);
		}

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

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void DropFinishNativeDelegate (IntPtr inst, bool success, uint time_);

		static void DropFinish_cb (IntPtr inst, bool success, uint time_)
		{
			try {
				DragContext __obj = GLib.Object.GetObject (inst, false) as DragContext;
				__obj.OnDropFinish (success, time_);
			} catch (Exception e) {
				GLib.ExceptionManager.RaiseUnhandledException (e, false);
			}
		}

		[GLib.DefaultSignalHandler(Type=typeof(Gdk.DragContext), ConnectionMethod="OverrideDropFinish")]
		protected virtual void OnDropFinish (bool success, uint time_)
		{
			InternalDropFinish (success, time_);
		}

		private void InternalDropFinish (bool success, uint time_)
		{
			DropFinishNativeDelegate unmanaged = null;
			unsafe {
				IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("drop_finish"));
				unmanaged = (DropFinishNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(DropFinishNativeDelegate));
			}
			if (unmanaged == null) return;

			unmanaged (this.Handle, success, time_);
		}

		static DropStatusNativeDelegate DropStatus_cb_delegate;
		static DropStatusNativeDelegate DropStatusVMCallback {
			get {
				if (DropStatus_cb_delegate == null)
					DropStatus_cb_delegate = new DropStatusNativeDelegate (DropStatus_cb);
				return DropStatus_cb_delegate;
			}
		}

		static void OverrideDropStatus (GLib.GType gtype)
		{
			OverrideDropStatus (gtype, DropStatusVMCallback);
		}

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

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

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

		[GLib.DefaultSignalHandler(Type=typeof(Gdk.DragContext), ConnectionMethod="OverrideDropStatus")]
		protected virtual bool OnDropStatus ()
		{
			return InternalDropStatus ();
		}

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

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

		static GetDragWindowNativeDelegate GetDragWindow_cb_delegate;
		static GetDragWindowNativeDelegate GetDragWindowVMCallback {
			get {
				if (GetDragWindow_cb_delegate == null)
					GetDragWindow_cb_delegate = new GetDragWindowNativeDelegate (GetDragWindow_cb);
				return GetDragWindow_cb_delegate;
			}
		}

		static void OverrideGetDragWindow (GLib.GType gtype)
		{
			OverrideGetDragWindow (gtype, GetDragWindowVMCallback);
		}

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

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

		static IntPtr GetDragWindow_cb (IntPtr inst)
		{
			try {
				DragContext __obj = GLib.Object.GetObject (inst, false) as DragContext;
				Gdk.Window __result;
				__result = __obj.OnGetDragWindow ();
				return __result == null ? IntPtr.Zero : __result.Handle;
			} catch (Exception e) {
				GLib.ExceptionManager.RaiseUnhandledException (e, true);
				// NOTREACHED: above call does not return.
				throw e;
			}
		}

		[GLib.DefaultSignalHandler(Type=typeof(Gdk.DragContext), ConnectionMethod="OverrideGetDragWindow")]
		protected virtual Gdk.Window OnGetDragWindow ()
		{
			return InternalGetDragWindow ();
		}

		private Gdk.Window InternalGetDragWindow ()
		{
			GetDragWindowNativeDelegate unmanaged = null;
			unsafe {
				IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("get_drag_window"));
				unmanaged = (GetDragWindowNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(GetDragWindowNativeDelegate));
			}
			if (unmanaged == null) return null;

			IntPtr __result = unmanaged (this.Handle);
			return GLib.Object.GetObject(__result) as Gdk.Window;
		}

		static SetHotspotNativeDelegate SetHotspot_cb_delegate;
		static SetHotspotNativeDelegate SetHotspotVMCallback {
			get {
				if (SetHotspot_cb_delegate == null)
					SetHotspot_cb_delegate = new SetHotspotNativeDelegate (SetHotspot_cb);
				return SetHotspot_cb_delegate;
			}
		}

		static void OverrideSetHotspot (GLib.GType gtype)
		{
			OverrideSetHotspot (gtype, SetHotspotVMCallback);
		}

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

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void SetHotspotNativeDelegate (IntPtr inst, int hot_x, int hot_y);

		static void SetHotspot_cb (IntPtr inst, int hot_x, int hot_y)
		{
			try {
				DragContext __obj = GLib.Object.GetObject (inst, false) as DragContext;
				__obj.OnSetHotspot (hot_x, hot_y);
			} catch (Exception e) {
				GLib.ExceptionManager.RaiseUnhandledException (e, false);
			}
		}

		[GLib.DefaultSignalHandler(Type=typeof(Gdk.DragContext), ConnectionMethod="OverrideSetHotspot")]
		protected virtual void OnSetHotspot (int hot_x, int hot_y)
		{
			InternalSetHotspot (hot_x, hot_y);
		}

		private void InternalSetHotspot (int hot_x, int hot_y)
		{
			SetHotspotNativeDelegate unmanaged = null;
			unsafe {
				IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("set_hotspot"));
				unmanaged = (SetHotspotNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(SetHotspotNativeDelegate));
			}
			if (unmanaged == null) return;

			unmanaged (this.Handle, hot_x, hot_y);
		}

		static DropDoneNativeDelegate DropDone_cb_delegate;
		static DropDoneNativeDelegate DropDoneVMCallback {
			get {
				if (DropDone_cb_delegate == null)
					DropDone_cb_delegate = new DropDoneNativeDelegate (DropDone_cb);
				return DropDone_cb_delegate;
			}
		}

		static void OverrideDropDone (GLib.GType gtype)
		{
			OverrideDropDone (gtype, DropDoneVMCallback);
		}

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

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void DropDoneNativeDelegate (IntPtr inst, bool success);

		static void DropDone_cb (IntPtr inst, bool success)
		{
			try {
				DragContext __obj = GLib.Object.GetObject (inst, false) as DragContext;
				__obj.OnDropDone (success);
			} catch (Exception e) {
				GLib.ExceptionManager.RaiseUnhandledException (e, false);
			}
		}

		[GLib.DefaultSignalHandler(Type=typeof(Gdk.DragContext), ConnectionMethod="OverrideDropDone")]
		protected virtual void OnDropDone (bool success)
		{
			InternalDropDone (success);
		}

		private void InternalDropDone (bool success)
		{
			DropDoneNativeDelegate unmanaged = null;
			unsafe {
				IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("drop_done"));
				unmanaged = (DropDoneNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(DropDoneNativeDelegate));
			}
			if (unmanaged == null) return;

			unmanaged (this.Handle, success);
		}

		static ManageDndNativeDelegate ManageDnd_cb_delegate;
		static ManageDndNativeDelegate ManageDndVMCallback {
			get {
				if (ManageDnd_cb_delegate == null)
					ManageDnd_cb_delegate = new ManageDndNativeDelegate (ManageDnd_cb);
				return ManageDnd_cb_delegate;
			}
		}

		static void OverrideManageDnd (GLib.GType gtype)
		{
			OverrideManageDnd (gtype, ManageDndVMCallback);
		}

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

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate bool ManageDndNativeDelegate (IntPtr inst, IntPtr ipc_window, int actions);

		static bool ManageDnd_cb (IntPtr inst, IntPtr ipc_window, int actions)
		{
			try {
				DragContext __obj = GLib.Object.GetObject (inst, false) as DragContext;
				bool __result;
				__result = __obj.OnManageDnd (GLib.Object.GetObject(ipc_window) as Gdk.Window, (Gdk.DragAction) actions);
				return __result;
			} catch (Exception e) {
				GLib.ExceptionManager.RaiseUnhandledException (e, true);
				// NOTREACHED: above call does not return.
				throw e;
			}
		}

		[GLib.DefaultSignalHandler(Type=typeof(Gdk.DragContext), ConnectionMethod="OverrideManageDnd")]
		protected virtual bool OnManageDnd (Gdk.Window ipc_window, Gdk.DragAction actions)
		{
			return InternalManageDnd (ipc_window, actions);
		}

		private bool InternalManageDnd (Gdk.Window ipc_window, Gdk.DragAction actions)
		{
			ManageDndNativeDelegate unmanaged = null;
			unsafe {
				IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("manage_dnd"));
				unmanaged = (ManageDndNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(ManageDndNativeDelegate));
			}
			if (unmanaged == null) return false;

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

		static SetCursorNativeDelegate SetCursor_cb_delegate;
		static SetCursorNativeDelegate SetCursorVMCallback {
			get {
				if (SetCursor_cb_delegate == null)
					SetCursor_cb_delegate = new SetCursorNativeDelegate (SetCursor_cb);
				return SetCursor_cb_delegate;
			}
		}

		static void OverrideSetCursor (GLib.GType gtype)
		{
			OverrideSetCursor (gtype, SetCursorVMCallback);
		}

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

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void SetCursorNativeDelegate (IntPtr inst, IntPtr cursor);

		static void SetCursor_cb (IntPtr inst, IntPtr cursor)
		{
			try {
				DragContext __obj = GLib.Object.GetObject (inst, false) as DragContext;
				__obj.OnSetCursor (GLib.Object.GetObject(cursor) as Gdk.Cursor);
			} catch (Exception e) {
				GLib.ExceptionManager.RaiseUnhandledException (e, false);
			}
		}

		[GLib.DefaultSignalHandler(Type=typeof(Gdk.DragContext), ConnectionMethod="OverrideSetCursor")]
		protected virtual void OnSetCursor (Gdk.Cursor cursor)
		{
			InternalSetCursor (cursor);
		}

		private void InternalSetCursor (Gdk.Cursor cursor)
		{
			SetCursorNativeDelegate unmanaged = null;
			unsafe {
				IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("set_cursor"));
				unmanaged = (SetCursorNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(SetCursorNativeDelegate));
			}
			if (unmanaged == null) return;

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

		static CancelNativeDelegate Cancel_cb_delegate;
		static CancelNativeDelegate CancelVMCallback {
			get {
				if (Cancel_cb_delegate == null)
					Cancel_cb_delegate = new CancelNativeDelegate (Cancel_cb);
				return Cancel_cb_delegate;
			}
		}

		static void OverrideCancel (GLib.GType gtype)
		{
			OverrideCancel (gtype, CancelVMCallback);
		}

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

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void CancelNativeDelegate (IntPtr inst, int reason);

		static void Cancel_cb (IntPtr inst, int reason)
		{
			try {
				DragContext __obj = GLib.Object.GetObject (inst, false) as DragContext;
				__obj.OnCancel ((Gdk.DragCancelReason) reason);
			} catch (Exception e) {
				GLib.ExceptionManager.RaiseUnhandledException (e, false);
			}
		}

		[GLib.DefaultSignalHandler(Type=typeof(Gdk.DragContext), ConnectionMethod="OverrideCancel")]
		protected virtual void OnCancel (Gdk.DragCancelReason reason)
		{
			InternalCancel (reason);
		}

		private void InternalCancel (Gdk.DragCancelReason reason)
		{
			CancelNativeDelegate unmanaged = null;
			unsafe {
				IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("cancel"));
				unmanaged = (CancelNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(CancelNativeDelegate));
			}
			if (unmanaged == null) return;

			unmanaged (this.Handle, (int) reason);
		}

		static DropPerformedNativeDelegate DropPerformed_cb_delegate;
		static DropPerformedNativeDelegate DropPerformedVMCallback {
			get {
				if (DropPerformed_cb_delegate == null)
					DropPerformed_cb_delegate = new DropPerformedNativeDelegate (DropPerformed_cb);
				return DropPerformed_cb_delegate;
			}
		}

		static void OverrideDropPerformed (GLib.GType gtype)
		{
			OverrideDropPerformed (gtype, DropPerformedVMCallback);
		}

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

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void DropPerformedNativeDelegate (IntPtr inst, uint time);

		static void DropPerformed_cb (IntPtr inst, uint time)
		{
			try {
				DragContext __obj = GLib.Object.GetObject (inst, false) as DragContext;
				__obj.OnDropPerformed (time);
			} catch (Exception e) {
				GLib.ExceptionManager.RaiseUnhandledException (e, false);
			}
		}

		[GLib.DefaultSignalHandler(Type=typeof(Gdk.DragContext), ConnectionMethod="OverrideDropPerformed")]
		protected virtual void OnDropPerformed (uint time)
		{
			InternalDropPerformed (time);
		}

		private void InternalDropPerformed (uint time)
		{
			DropPerformedNativeDelegate unmanaged = null;
			unsafe {
				IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("drop_performed"));
				unmanaged = (DropPerformedNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(DropPerformedNativeDelegate));
			}
			if (unmanaged == null) return;

			unmanaged (this.Handle, time);
		}

		static DndFinishedNativeDelegate DndFinished_cb_delegate;
		static DndFinishedNativeDelegate DndFinishedVMCallback {
			get {
				if (DndFinished_cb_delegate == null)
					DndFinished_cb_delegate = new DndFinishedNativeDelegate (DndFinished_cb);
				return DndFinished_cb_delegate;
			}
		}

		static void OverrideDndFinished (GLib.GType gtype)
		{
			OverrideDndFinished (gtype, DndFinishedVMCallback);
		}

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

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void DndFinishedNativeDelegate (IntPtr inst);

		static void DndFinished_cb (IntPtr inst)
		{
			try {
				DragContext __obj = GLib.Object.GetObject (inst, false) as DragContext;
				__obj.OnDndFinished ();
			} catch (Exception e) {
				GLib.ExceptionManager.RaiseUnhandledException (e, false);
			}
		}

		[GLib.DefaultSignalHandler(Type=typeof(Gdk.DragContext), ConnectionMethod="OverrideDndFinished")]
		protected virtual void OnDndFinished ()
		{
			InternalDndFinished ();
		}

		private void InternalDndFinished ()
		{
			DndFinishedNativeDelegate unmanaged = null;
			unsafe {
				IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("dnd_finished"));
				unmanaged = (DndFinishedNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(DndFinishedNativeDelegate));
			}
			if (unmanaged == null) return;

			unmanaged (this.Handle);
		}

		static HandleEventNativeDelegate HandleEvent_cb_delegate;
		static HandleEventNativeDelegate HandleEventVMCallback {
			get {
				if (HandleEvent_cb_delegate == null)
					HandleEvent_cb_delegate = new HandleEventNativeDelegate (HandleEvent_cb);
				return HandleEvent_cb_delegate;
			}
		}

		static void OverrideHandleEvent (GLib.GType gtype)
		{
			OverrideHandleEvent (gtype, HandleEventVMCallback);
		}

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

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate bool HandleEventNativeDelegate (IntPtr inst, IntPtr evnt);

		static bool HandleEvent_cb (IntPtr inst, IntPtr evnt)
		{
			try {
				DragContext __obj = GLib.Object.GetObject (inst, false) as DragContext;
				bool __result;
				__result = __obj.OnHandleEvent (Gdk.Event.GetEvent (evnt));
				return __result;
			} catch (Exception e) {
				GLib.ExceptionManager.RaiseUnhandledException (e, true);
				// NOTREACHED: above call does not return.
				throw e;
			}
		}

		[GLib.DefaultSignalHandler(Type=typeof(Gdk.DragContext), ConnectionMethod="OverrideHandleEvent")]
		protected virtual bool OnHandleEvent (Gdk.Event evnt)
		{
			return InternalHandleEvent (evnt);
		}

		private bool InternalHandleEvent (Gdk.Event evnt)
		{
			HandleEventNativeDelegate unmanaged = null;
			unsafe {
				IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("handle_event"));
				unmanaged = (HandleEventNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(HandleEventNativeDelegate));
			}
			if (unmanaged == null) return false;

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

		static ActionChangedNativeDelegate ActionChanged_cb_delegate;
		static ActionChangedNativeDelegate ActionChangedVMCallback {
			get {
				if (ActionChanged_cb_delegate == null)
					ActionChanged_cb_delegate = new ActionChangedNativeDelegate (ActionChanged_cb);
				return ActionChanged_cb_delegate;
			}
		}

		static void OverrideActionChanged (GLib.GType gtype)
		{
			OverrideActionChanged (gtype, ActionChangedVMCallback);
		}

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

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void ActionChangedNativeDelegate (IntPtr inst, int action);

		static void ActionChanged_cb (IntPtr inst, int action)
		{
			try {
				DragContext __obj = GLib.Object.GetObject (inst, false) as DragContext;
				__obj.OnActionChanged ((Gdk.DragAction) action);
			} catch (Exception e) {
				GLib.ExceptionManager.RaiseUnhandledException (e, false);
			}
		}

		[GLib.DefaultSignalHandler(Type=typeof(Gdk.DragContext), ConnectionMethod="OverrideActionChanged")]
		protected virtual void OnActionChanged (Gdk.DragAction action)
		{
			InternalActionChanged (action);
		}

		private void InternalActionChanged (Gdk.DragAction action)
		{
			ActionChangedNativeDelegate unmanaged = null;
			unsafe {
				IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("action_changed"));
				unmanaged = (ActionChangedNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(ActionChangedNativeDelegate));
			}
			if (unmanaged == null) return;

			unmanaged (this.Handle, (int) action);
		}

		static CommitDragStatusNativeDelegate CommitDragStatus_cb_delegate;
		static CommitDragStatusNativeDelegate CommitDragStatusVMCallback {
			get {
				if (CommitDragStatus_cb_delegate == null)
					CommitDragStatus_cb_delegate = new CommitDragStatusNativeDelegate (CommitDragStatus_cb);
				return CommitDragStatus_cb_delegate;
			}
		}

		static void OverrideCommitDragStatus (GLib.GType gtype)
		{
			OverrideCommitDragStatus (gtype, CommitDragStatusVMCallback);
		}

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

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void CommitDragStatusNativeDelegate (IntPtr inst);

		static void CommitDragStatus_cb (IntPtr inst)
		{
			try {
				DragContext __obj = GLib.Object.GetObject (inst, false) as DragContext;
				__obj.OnCommitDragStatus ();
			} catch (Exception e) {
				GLib.ExceptionManager.RaiseUnhandledException (e, false);
			}
		}

		[GLib.DefaultSignalHandler(Type=typeof(Gdk.DragContext), ConnectionMethod="OverrideCommitDragStatus")]
		protected virtual void OnCommitDragStatus ()
		{
			InternalCommitDragStatus ();
		}

		private void InternalCommitDragStatus ()
		{
			CommitDragStatusNativeDelegate unmanaged = null;
			unsafe {
				IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("commit_drag_status"));
				unmanaged = (CommitDragStatusNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(CommitDragStatusNativeDelegate));
			}
			if (unmanaged == null) return;

			unmanaged (this.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("find_window"
							, GLib.Object.class_abi.Fields
							, (uint) Marshal.SizeOf(typeof(IntPtr)) // find_window
							, null
							, "get_selection"
							, (uint) Marshal.SizeOf(typeof(IntPtr))
							, 0
							),
						new GLib.AbiField("get_selection"
							, -1
							, (uint) Marshal.SizeOf(typeof(IntPtr)) // get_selection
							, "find_window"
							, "drag_motion"
							, (uint) Marshal.SizeOf(typeof(IntPtr))
							, 0
							),
						new GLib.AbiField("drag_motion"
							, -1
							, (uint) Marshal.SizeOf(typeof(IntPtr)) // drag_motion
							, "get_selection"
							, "drag_status"
							, (uint) Marshal.SizeOf(typeof(IntPtr))
							, 0
							),
						new GLib.AbiField("drag_status"
							, -1
							, (uint) Marshal.SizeOf(typeof(IntPtr)) // drag_status
							, "drag_motion"
							, "drag_abort"
							, (uint) Marshal.SizeOf(typeof(IntPtr))
							, 0
							),
						new GLib.AbiField("drag_abort"
							, -1
							, (uint) Marshal.SizeOf(typeof(IntPtr)) // drag_abort
							, "drag_status"
							, "drag_drop"
							, (uint) Marshal.SizeOf(typeof(IntPtr))
							, 0
							),
						new GLib.AbiField("drag_drop"
							, -1
							, (uint) Marshal.SizeOf(typeof(IntPtr)) // drag_drop
							, "drag_abort"
							, "drop_reply"
							, (uint) Marshal.SizeOf(typeof(IntPtr))
							, 0
							),
						new GLib.AbiField("drop_reply"
							, -1
							, (uint) Marshal.SizeOf(typeof(IntPtr)) // drop_reply
							, "drag_drop"
							, "drop_finish"
							, (uint) Marshal.SizeOf(typeof(IntPtr))
							, 0
							),
						new GLib.AbiField("drop_finish"
							, -1
							, (uint) Marshal.SizeOf(typeof(IntPtr)) // drop_finish
							, "drop_reply"
							, "drop_status"
							, (uint) Marshal.SizeOf(typeof(IntPtr))
							, 0
							),
						new GLib.AbiField("drop_status"
							, -1
							, (uint) Marshal.SizeOf(typeof(IntPtr)) // drop_status
							, "drop_finish"
							, "get_drag_window"
							, (uint) Marshal.SizeOf(typeof(IntPtr))
							, 0
							),
						new GLib.AbiField("get_drag_window"
							, -1
							, (uint) Marshal.SizeOf(typeof(IntPtr)) // get_drag_window
							, "drop_status"
							, "set_hotspot"
							, (uint) Marshal.SizeOf(typeof(IntPtr))
							, 0
							),
						new GLib.AbiField("set_hotspot"
							, -1
							, (uint) Marshal.SizeOf(typeof(IntPtr)) // set_hotspot
							, "get_drag_window"
							, "drop_done"
							, (uint) Marshal.SizeOf(typeof(IntPtr))
							, 0
							),
						new GLib.AbiField("drop_done"
							, -1
							, (uint) Marshal.SizeOf(typeof(IntPtr)) // drop_done
							, "set_hotspot"
							, "manage_dnd"
							, (uint) Marshal.SizeOf(typeof(IntPtr))
							, 0
							),
						new GLib.AbiField("manage_dnd"
							, -1
							, (uint) Marshal.SizeOf(typeof(IntPtr)) // manage_dnd
							, "drop_done"
							, "set_cursor"
							, (uint) Marshal.SizeOf(typeof(IntPtr))
							, 0
							),
						new GLib.AbiField("set_cursor"
							, -1
							, (uint) Marshal.SizeOf(typeof(IntPtr)) // set_cursor
							, "manage_dnd"
							, "cancel"
							, (uint) Marshal.SizeOf(typeof(IntPtr))
							, 0
							),
						new GLib.AbiField("cancel"
							, -1
							, (uint) Marshal.SizeOf(typeof(IntPtr)) // cancel
							, "set_cursor"
							, "drop_performed"
							, (uint) Marshal.SizeOf(typeof(IntPtr))
							, 0
							),
						new GLib.AbiField("drop_performed"
							, -1
							, (uint) Marshal.SizeOf(typeof(IntPtr)) // drop_performed
							, "cancel"
							, "dnd_finished"
							, (uint) Marshal.SizeOf(typeof(IntPtr))
							, 0
							),
						new GLib.AbiField("dnd_finished"
							, -1
							, (uint) Marshal.SizeOf(typeof(IntPtr)) // dnd_finished
							, "drop_performed"
							, "handle_event"
							, (uint) Marshal.SizeOf(typeof(IntPtr))
							, 0
							),
						new GLib.AbiField("handle_event"
							, -1
							, (uint) Marshal.SizeOf(typeof(IntPtr)) // handle_event
							, "dnd_finished"
							, "action_changed"
							, (uint) Marshal.SizeOf(typeof(IntPtr))
							, 0
							),
						new GLib.AbiField("action_changed"
							, -1
							, (uint) Marshal.SizeOf(typeof(IntPtr)) // action_changed
							, "handle_event"
							, "commit_drag_status"
							, (uint) Marshal.SizeOf(typeof(IntPtr))
							, 0
							),
						new GLib.AbiField("commit_drag_status"
							, -1
							, (uint) Marshal.SizeOf(typeof(IntPtr)) // commit_drag_status
							, "action_changed"
							, null
							, (uint) Marshal.SizeOf(typeof(IntPtr))
							, 0
							),
					});

				return _class_abi;
			}
		}


		// End of the ABI representation.

		[DllImport("gdk-3-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern int gdk_drag_context_get_actions(IntPtr raw);

		public Gdk.DragAction Actions { 
			get {
				int raw_ret = gdk_drag_context_get_actions(Handle);
				Gdk.DragAction ret = (Gdk.DragAction) raw_ret;
				return ret;
			}
		}

		[DllImport("gdk-3-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern IntPtr gdk_drag_context_get_dest_window(IntPtr raw);

		public Gdk.Window DestWindow { 
			get {
				IntPtr raw_ret = gdk_drag_context_get_dest_window(Handle);
				Gdk.Window ret = GLib.Object.GetObject(raw_ret) as Gdk.Window;
				return ret;
			}
		}

		[DllImport("gdk-3-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern IntPtr gdk_drag_context_get_device(IntPtr raw);

		[DllImport("gdk-3-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern void gdk_drag_context_set_device(IntPtr raw, IntPtr device);

		public Gdk.Device Device { 
			get {
				IntPtr raw_ret = gdk_drag_context_get_device(Handle);
				Gdk.Device ret = GLib.Object.GetObject(raw_ret) as Gdk.Device;
				return ret;
			}
			set {
				gdk_drag_context_set_device(Handle, value == null ? IntPtr.Zero : value.Handle);
			}
		}

		[DllImport("gdk-3-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern IntPtr gdk_drag_context_get_drag_window(IntPtr raw);

		public Gdk.Window DragWindow { 
			get {
				IntPtr raw_ret = gdk_drag_context_get_drag_window(Handle);
				Gdk.Window ret = GLib.Object.GetObject(raw_ret) as Gdk.Window;
				return ret;
			}
		}

		[DllImport("gdk-3-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern int gdk_drag_context_get_protocol(IntPtr raw);

		public Gdk.DragProtocol Protocol { 
			get {
				int raw_ret = gdk_drag_context_get_protocol(Handle);
				Gdk.DragProtocol ret = (Gdk.DragProtocol) raw_ret;
				return ret;
			}
		}

		[DllImport("gdk-3-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern int gdk_drag_context_get_selected_action(IntPtr raw);

		public Gdk.DragAction SelectedAction { 
			get {
				int raw_ret = gdk_drag_context_get_selected_action(Handle);
				Gdk.DragAction ret = (Gdk.DragAction) raw_ret;
				return ret;
			}
		}

		[DllImport("gdk-3-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern IntPtr gdk_drag_context_get_source_window(IntPtr raw);

		public Gdk.Window SourceWindow { 
			get {
				IntPtr raw_ret = gdk_drag_context_get_source_window(Handle);
				Gdk.Window ret = GLib.Object.GetObject(raw_ret) as Gdk.Window;
				return ret;
			}
		}

		[DllImport("gdk-3-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern int gdk_drag_context_get_suggested_action(IntPtr raw);

		public Gdk.DragAction SuggestedAction { 
			get {
				int raw_ret = gdk_drag_context_get_suggested_action(Handle);
				Gdk.DragAction ret = (Gdk.DragAction) raw_ret;
				return ret;
			}
		}

		[DllImport("gdk-3-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern IntPtr gdk_drag_context_get_type();

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

		[DllImport("gdk-3-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern IntPtr gdk_drag_context_list_targets(IntPtr raw);

		public Gdk.Atom[] ListTargets() {
			IntPtr raw_ret = gdk_drag_context_list_targets(Handle);
			Gdk.Atom[] ret = (Gdk.Atom[]) GLib.Marshaller.ListPtrToArray (raw_ret, typeof(GLib.List), false, false, typeof(Gdk.Atom));
			return ret;
		}

		[DllImport("gdk-3-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern bool gdk_drag_context_manage_dnd(IntPtr raw, IntPtr ipc_window, int actions);

		public bool ManageDnd(Gdk.Window ipc_window, Gdk.DragAction actions) {
			bool raw_ret = gdk_drag_context_manage_dnd(Handle, ipc_window == null ? IntPtr.Zero : ipc_window.Handle, (int) actions);
			bool ret = raw_ret;
			return ret;
		}

		[DllImport("gdk-3-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern void gdk_drag_context_set_hotspot(IntPtr raw, int hot_x, int hot_y);

		public void SetHotspot(int hot_x, int hot_y) {
			gdk_drag_context_set_hotspot(Handle, hot_x, hot_y);
		}


		// 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 (GLib.Object.abi_info.Fields);

				return _abi_info;
			}
		}


		// End of the ABI representation.

#endregion
	}
}