File: Gtk_PrintOperation.cs

package info (click to toggle)
gnome-subtitles 1.8-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • 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 (1450 lines) | stat: -rw-r--r-- 48,426 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
// This file was generated by the Gtk# code generator.
// Any changes made will be lost if regenerated.

namespace Gtk {

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

#region Autogenerated code
	public partial class PrintOperation : GLib.Object, Gtk.IPrintOperationPreview {

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

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

		public PrintOperation () : base (IntPtr.Zero)
		{
			if (GetType () != typeof (PrintOperation)) {
				CreateNativeObject (new string [0], new GLib.Value[0]);
				return;
			}
			Raw = gtk_print_operation_new();
		}

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

		[DllImport("gtk-3-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern void gtk_print_operation_set_default_page_setup(IntPtr raw, IntPtr default_page_setup);

		[GLib.Property ("default-page-setup")]
		public Gtk.PageSetup DefaultPageSetup {
			get  {
				IntPtr raw_ret = gtk_print_operation_get_default_page_setup(Handle);
				Gtk.PageSetup ret = GLib.Object.GetObject(raw_ret) as Gtk.PageSetup;
				return ret;
			}
			set  {
				gtk_print_operation_set_default_page_setup(Handle, value == null ? IntPtr.Zero : value.Handle);
			}
		}

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

		[DllImport("gtk-3-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern void gtk_print_operation_set_print_settings(IntPtr raw, IntPtr print_settings);

		[GLib.Property ("print-settings")]
		public Gtk.PrintSettings PrintSettings {
			get  {
				IntPtr raw_ret = gtk_print_operation_get_print_settings(Handle);
				Gtk.PrintSettings ret = GLib.Object.GetObject(raw_ret) as Gtk.PrintSettings;
				return ret;
			}
			set  {
				gtk_print_operation_set_print_settings(Handle, value == null ? IntPtr.Zero : value.Handle);
			}
		}

		[DllImport("gtk-3-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern void gtk_print_operation_set_job_name(IntPtr raw, IntPtr job_name);

		[GLib.Property ("job-name")]
		public string JobName {
			get {
				GLib.Value val = GetProperty ("job-name");
				string ret = (string) val;
				val.Dispose ();
				return ret;
			}
			set  {
				IntPtr native_value = GLib.Marshaller.StringToPtrGStrdup (value);
				gtk_print_operation_set_job_name(Handle, native_value);
				GLib.Marshaller.Free (native_value);
			}
		}

		[DllImport("gtk-3-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern void gtk_print_operation_set_n_pages(IntPtr raw, int n_pages);

		[GLib.Property ("n-pages")]
		public int NPages {
			get {
				GLib.Value val = GetProperty ("n-pages");
				int ret = (int) val;
				val.Dispose ();
				return ret;
			}
			set  {
				gtk_print_operation_set_n_pages(Handle, value);
			}
		}

		[DllImport("gtk-3-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern void gtk_print_operation_set_current_page(IntPtr raw, int current_page);

		[GLib.Property ("current-page")]
		public int CurrentPage {
			get {
				GLib.Value val = GetProperty ("current-page");
				int ret = (int) val;
				val.Dispose ();
				return ret;
			}
			set  {
				gtk_print_operation_set_current_page(Handle, value);
			}
		}

		[DllImport("gtk-3-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern void gtk_print_operation_set_use_full_page(IntPtr raw, bool full_page);

		[GLib.Property ("use-full-page")]
		public bool UseFullPage {
			get {
				GLib.Value val = GetProperty ("use-full-page");
				bool ret = (bool) val;
				val.Dispose ();
				return ret;
			}
			set  {
				gtk_print_operation_set_use_full_page(Handle, value);
			}
		}

		[DllImport("gtk-3-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern void gtk_print_operation_set_track_print_status(IntPtr raw, bool track_status);

		[GLib.Property ("track-print-status")]
		public bool TrackPrintStatus {
			get {
				GLib.Value val = GetProperty ("track-print-status");
				bool ret = (bool) val;
				val.Dispose ();
				return ret;
			}
			set  {
				gtk_print_operation_set_track_print_status(Handle, value);
			}
		}

		[DllImport("gtk-3-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern void gtk_print_operation_set_unit(IntPtr raw, int unit);

		[GLib.Property ("unit")]
		public Gtk.Unit Unit {
			get {
				GLib.Value val = GetProperty ("unit");
				Gtk.Unit ret = (Gtk.Unit) (Enum) val;
				val.Dispose ();
				return ret;
			}
			set  {
				gtk_print_operation_set_unit(Handle, (int) value);
			}
		}

		[DllImport("gtk-3-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern void gtk_print_operation_set_show_progress(IntPtr raw, bool show_progress);

		[GLib.Property ("show-progress")]
		public bool ShowProgress {
			get {
				GLib.Value val = GetProperty ("show-progress");
				bool ret = (bool) val;
				val.Dispose ();
				return ret;
			}
			set  {
				gtk_print_operation_set_show_progress(Handle, value);
			}
		}

		[DllImport("gtk-3-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern void gtk_print_operation_set_allow_async(IntPtr raw, bool allow_async);

		[GLib.Property ("allow-async")]
		public bool AllowAsync {
			get {
				GLib.Value val = GetProperty ("allow-async");
				bool ret = (bool) val;
				val.Dispose ();
				return ret;
			}
			set  {
				gtk_print_operation_set_allow_async(Handle, value);
			}
		}

		[DllImport("gtk-3-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern void gtk_print_operation_set_export_filename(IntPtr raw, IntPtr filename);

		[GLib.Property ("export-filename")]
		public string ExportFilename {
			get {
				GLib.Value val = GetProperty ("export-filename");
				string ret = (string) val;
				val.Dispose ();
				return ret;
			}
			set  {
				IntPtr native_value = GLib.Marshaller.StringToPtrGStrdup (value);
				gtk_print_operation_set_export_filename(Handle, native_value);
				GLib.Marshaller.Free (native_value);
			}
		}

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

		[GLib.Property ("status")]
		public Gtk.PrintStatus Status {
			get  {
				int raw_ret = gtk_print_operation_get_status(Handle);
				Gtk.PrintStatus ret = (Gtk.PrintStatus) raw_ret;
				return ret;
			}
		}

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

		[GLib.Property ("status-string")]
		public string StatusString {
			get  {
				IntPtr raw_ret = gtk_print_operation_get_status_string(Handle);
				string ret = GLib.Marshaller.Utf8PtrToString (raw_ret);
				return ret;
			}
		}

		[DllImport("gtk-3-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern void gtk_print_operation_set_custom_tab_label(IntPtr raw, IntPtr label);

		[GLib.Property ("custom-tab-label")]
		public string CustomTabLabel {
			get {
				GLib.Value val = GetProperty ("custom-tab-label");
				string ret = (string) val;
				val.Dispose ();
				return ret;
			}
			set  {
				IntPtr native_value = GLib.Marshaller.StringToPtrGStrdup (value);
				gtk_print_operation_set_custom_tab_label(Handle, native_value);
				GLib.Marshaller.Free (native_value);
			}
		}

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

		[DllImport("gtk-3-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern void gtk_print_operation_set_support_selection(IntPtr raw, bool support_selection);

		[GLib.Property ("support-selection")]
		public bool SupportSelection {
			get  {
				bool raw_ret = gtk_print_operation_get_support_selection(Handle);
				bool ret = raw_ret;
				return ret;
			}
			set  {
				gtk_print_operation_set_support_selection(Handle, value);
			}
		}

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

		[DllImport("gtk-3-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern void gtk_print_operation_set_has_selection(IntPtr raw, bool has_selection);

		[GLib.Property ("has-selection")]
		public bool HasSelection {
			get  {
				bool raw_ret = gtk_print_operation_get_has_selection(Handle);
				bool ret = raw_ret;
				return ret;
			}
			set  {
				gtk_print_operation_set_has_selection(Handle, value);
			}
		}

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

		[DllImport("gtk-3-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern void gtk_print_operation_set_embed_page_setup(IntPtr raw, bool embed);

		[GLib.Property ("embed-page-setup")]
		public bool EmbedPageSetup {
			get  {
				bool raw_ret = gtk_print_operation_get_embed_page_setup(Handle);
				bool ret = raw_ret;
				return ret;
			}
			set  {
				gtk_print_operation_set_embed_page_setup(Handle, value);
			}
		}

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

		[GLib.Property ("n-pages-to-print")]
		public int NPagesToPrint {
			get  {
				int raw_ret = gtk_print_operation_get_n_pages_to_print(Handle);
				int ret = raw_ret;
				return ret;
			}
		}

		[GLib.Signal("draw-page")]
		public event Gtk.DrawPageHandler DrawPage {
			add {
				this.AddSignalHandler ("draw-page", value, typeof (Gtk.DrawPageArgs));
			}
			remove {
				this.RemoveSignalHandler ("draw-page", value);
			}
		}

		[GLib.Signal("status-changed")]
		public event System.EventHandler StatusChanged {
			add {
				this.AddSignalHandler ("status-changed", value);
			}
			remove {
				this.RemoveSignalHandler ("status-changed", value);
			}
		}

		[GLib.Signal("done")]
		public event Gtk.DoneHandler Done {
			add {
				this.AddSignalHandler ("done", value, typeof (Gtk.DoneArgs));
			}
			remove {
				this.RemoveSignalHandler ("done", value);
			}
		}

		[GLib.Signal("custom-widget-apply")]
		public event Gtk.CustomWidgetApplyHandler CustomWidgetApply {
			add {
				this.AddSignalHandler ("custom-widget-apply", value, typeof (Gtk.CustomWidgetApplyArgs));
			}
			remove {
				this.RemoveSignalHandler ("custom-widget-apply", value);
			}
		}

		[GLib.Signal("preview")]
		public event Gtk.PreviewHandler Preview {
			add {
				this.AddSignalHandler ("preview", value, typeof (Gtk.PreviewArgs));
			}
			remove {
				this.RemoveSignalHandler ("preview", value);
			}
		}

		[GLib.Signal("request-page-setup")]
		public event Gtk.RequestPageSetupHandler RequestPageSetup {
			add {
				this.AddSignalHandler ("request-page-setup", value, typeof (Gtk.RequestPageSetupArgs));
			}
			remove {
				this.RemoveSignalHandler ("request-page-setup", value);
			}
		}

		[GLib.Signal("create-custom-widget")]
		public event Gtk.CreateCustomWidgetHandler CreateCustomWidget {
			add {
				this.AddSignalHandler ("create-custom-widget", value, typeof (Gtk.CreateCustomWidgetArgs));
			}
			remove {
				this.RemoveSignalHandler ("create-custom-widget", value);
			}
		}

		[GLib.Signal("paginate")]
		public event Gtk.PaginateHandler Paginate {
			add {
				this.AddSignalHandler ("paginate", value, typeof (Gtk.PaginateArgs));
			}
			remove {
				this.RemoveSignalHandler ("paginate", value);
			}
		}

		[GLib.Signal("update-custom-widget")]
		public event Gtk.UpdateCustomWidgetHandler UpdateCustomWidget {
			add {
				this.AddSignalHandler ("update-custom-widget", value, typeof (Gtk.UpdateCustomWidgetArgs));
			}
			remove {
				this.RemoveSignalHandler ("update-custom-widget", value);
			}
		}

		[GLib.Signal("begin-print")]
		public event Gtk.BeginPrintHandler BeginPrint {
			add {
				this.AddSignalHandler ("begin-print", value, typeof (Gtk.BeginPrintArgs));
			}
			remove {
				this.RemoveSignalHandler ("begin-print", value);
			}
		}

		[GLib.Signal("end-print")]
		public event Gtk.EndPrintHandler EndPrint {
			add {
				this.AddSignalHandler ("end-print", value, typeof (Gtk.EndPrintArgs));
			}
			remove {
				this.RemoveSignalHandler ("end-print", value);
			}
		}

		static DoneNativeDelegate Done_cb_delegate;
		static DoneNativeDelegate DoneVMCallback {
			get {
				if (Done_cb_delegate == null)
					Done_cb_delegate = new DoneNativeDelegate (Done_cb);
				return Done_cb_delegate;
			}
		}

		static void OverrideDone (GLib.GType gtype)
		{
			OverrideDone (gtype, DoneVMCallback);
		}

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

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void DoneNativeDelegate (IntPtr inst, int result);

		static void Done_cb (IntPtr inst, int result)
		{
			try {
				PrintOperation __obj = GLib.Object.GetObject (inst, false) as PrintOperation;
				__obj.OnDone ((Gtk.PrintOperationResult) result);
			} catch (Exception e) {
				GLib.ExceptionManager.RaiseUnhandledException (e, false);
			}
		}

		[GLib.DefaultSignalHandler(Type=typeof(Gtk.PrintOperation), ConnectionMethod="OverrideDone")]
		protected virtual void OnDone (Gtk.PrintOperationResult result)
		{
			InternalDone (result);
		}

		private void InternalDone (Gtk.PrintOperationResult result)
		{
			DoneNativeDelegate unmanaged = null;
			unsafe {
				IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("done"));
				unmanaged = (DoneNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(DoneNativeDelegate));
			}
			if (unmanaged == null) return;

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

		static BeginPrintNativeDelegate BeginPrint_cb_delegate;
		static BeginPrintNativeDelegate BeginPrintVMCallback {
			get {
				if (BeginPrint_cb_delegate == null)
					BeginPrint_cb_delegate = new BeginPrintNativeDelegate (BeginPrint_cb);
				return BeginPrint_cb_delegate;
			}
		}

		static void OverrideBeginPrint (GLib.GType gtype)
		{
			OverrideBeginPrint (gtype, BeginPrintVMCallback);
		}

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

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void BeginPrintNativeDelegate (IntPtr inst, IntPtr context);

		static void BeginPrint_cb (IntPtr inst, IntPtr context)
		{
			try {
				PrintOperation __obj = GLib.Object.GetObject (inst, false) as PrintOperation;
				__obj.OnBeginPrint (GLib.Object.GetObject(context) as Gtk.PrintContext);
			} catch (Exception e) {
				GLib.ExceptionManager.RaiseUnhandledException (e, false);
			}
		}

		[GLib.DefaultSignalHandler(Type=typeof(Gtk.PrintOperation), ConnectionMethod="OverrideBeginPrint")]
		protected virtual void OnBeginPrint (Gtk.PrintContext context)
		{
			InternalBeginPrint (context);
		}

		private void InternalBeginPrint (Gtk.PrintContext context)
		{
			BeginPrintNativeDelegate unmanaged = null;
			unsafe {
				IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("begin_print"));
				unmanaged = (BeginPrintNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(BeginPrintNativeDelegate));
			}
			if (unmanaged == null) return;

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

		static PaginateNativeDelegate Paginate_cb_delegate;
		static PaginateNativeDelegate PaginateVMCallback {
			get {
				if (Paginate_cb_delegate == null)
					Paginate_cb_delegate = new PaginateNativeDelegate (Paginate_cb);
				return Paginate_cb_delegate;
			}
		}

		static void OverridePaginate (GLib.GType gtype)
		{
			OverridePaginate (gtype, PaginateVMCallback);
		}

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

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate bool PaginateNativeDelegate (IntPtr inst, IntPtr context);

		static bool Paginate_cb (IntPtr inst, IntPtr context)
		{
			try {
				PrintOperation __obj = GLib.Object.GetObject (inst, false) as PrintOperation;
				bool __result;
				__result = __obj.OnPaginate (GLib.Object.GetObject(context) as Gtk.PrintContext);
				return __result;
			} catch (Exception e) {
				GLib.ExceptionManager.RaiseUnhandledException (e, true);
				// NOTREACHED: above call does not return.
				throw e;
			}
		}

		[GLib.DefaultSignalHandler(Type=typeof(Gtk.PrintOperation), ConnectionMethod="OverridePaginate")]
		protected virtual bool OnPaginate (Gtk.PrintContext context)
		{
			return InternalPaginate (context);
		}

		private bool InternalPaginate (Gtk.PrintContext context)
		{
			PaginateNativeDelegate unmanaged = null;
			unsafe {
				IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("paginate"));
				unmanaged = (PaginateNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(PaginateNativeDelegate));
			}
			if (unmanaged == null) return false;

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

		static RequestPageSetupNativeDelegate RequestPageSetup_cb_delegate;
		static RequestPageSetupNativeDelegate RequestPageSetupVMCallback {
			get {
				if (RequestPageSetup_cb_delegate == null)
					RequestPageSetup_cb_delegate = new RequestPageSetupNativeDelegate (RequestPageSetup_cb);
				return RequestPageSetup_cb_delegate;
			}
		}

		static void OverrideRequestPageSetup (GLib.GType gtype)
		{
			OverrideRequestPageSetup (gtype, RequestPageSetupVMCallback);
		}

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

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void RequestPageSetupNativeDelegate (IntPtr inst, IntPtr context, int page_nr, IntPtr setup);

		static void RequestPageSetup_cb (IntPtr inst, IntPtr context, int page_nr, IntPtr setup)
		{
			try {
				PrintOperation __obj = GLib.Object.GetObject (inst, false) as PrintOperation;
				__obj.OnRequestPageSetup (GLib.Object.GetObject(context) as Gtk.PrintContext, page_nr, GLib.Object.GetObject(setup) as Gtk.PageSetup);
			} catch (Exception e) {
				GLib.ExceptionManager.RaiseUnhandledException (e, false);
			}
		}

		[GLib.DefaultSignalHandler(Type=typeof(Gtk.PrintOperation), ConnectionMethod="OverrideRequestPageSetup")]
		protected virtual void OnRequestPageSetup (Gtk.PrintContext context, int page_nr, Gtk.PageSetup setup)
		{
			InternalRequestPageSetup (context, page_nr, setup);
		}

		private void InternalRequestPageSetup (Gtk.PrintContext context, int page_nr, Gtk.PageSetup setup)
		{
			RequestPageSetupNativeDelegate unmanaged = null;
			unsafe {
				IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("request_page_setup"));
				unmanaged = (RequestPageSetupNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(RequestPageSetupNativeDelegate));
			}
			if (unmanaged == null) return;

			unmanaged (this.Handle, context == null ? IntPtr.Zero : context.Handle, page_nr, setup == null ? IntPtr.Zero : setup.Handle);
		}

		static DrawPageNativeDelegate DrawPage_cb_delegate;
		static DrawPageNativeDelegate DrawPageVMCallback {
			get {
				if (DrawPage_cb_delegate == null)
					DrawPage_cb_delegate = new DrawPageNativeDelegate (DrawPage_cb);
				return DrawPage_cb_delegate;
			}
		}

		static void OverrideDrawPage (GLib.GType gtype)
		{
			OverrideDrawPage (gtype, DrawPageVMCallback);
		}

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

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void DrawPageNativeDelegate (IntPtr inst, IntPtr context, int page_nr);

		static void DrawPage_cb (IntPtr inst, IntPtr context, int page_nr)
		{
			try {
				PrintOperation __obj = GLib.Object.GetObject (inst, false) as PrintOperation;
				__obj.OnDrawPage (GLib.Object.GetObject(context) as Gtk.PrintContext, page_nr);
			} catch (Exception e) {
				GLib.ExceptionManager.RaiseUnhandledException (e, false);
			}
		}

		[GLib.DefaultSignalHandler(Type=typeof(Gtk.PrintOperation), ConnectionMethod="OverrideDrawPage")]
		protected virtual void OnDrawPage (Gtk.PrintContext context, int page_nr)
		{
			InternalDrawPage (context, page_nr);
		}

		private void InternalDrawPage (Gtk.PrintContext context, int page_nr)
		{
			DrawPageNativeDelegate unmanaged = null;
			unsafe {
				IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("draw_page"));
				unmanaged = (DrawPageNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(DrawPageNativeDelegate));
			}
			if (unmanaged == null) return;

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

		static EndPrintNativeDelegate EndPrint_cb_delegate;
		static EndPrintNativeDelegate EndPrintVMCallback {
			get {
				if (EndPrint_cb_delegate == null)
					EndPrint_cb_delegate = new EndPrintNativeDelegate (EndPrint_cb);
				return EndPrint_cb_delegate;
			}
		}

		static void OverrideEndPrint (GLib.GType gtype)
		{
			OverrideEndPrint (gtype, EndPrintVMCallback);
		}

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

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void EndPrintNativeDelegate (IntPtr inst, IntPtr context);

		static void EndPrint_cb (IntPtr inst, IntPtr context)
		{
			try {
				PrintOperation __obj = GLib.Object.GetObject (inst, false) as PrintOperation;
				__obj.OnEndPrint (GLib.Object.GetObject(context) as Gtk.PrintContext);
			} catch (Exception e) {
				GLib.ExceptionManager.RaiseUnhandledException (e, false);
			}
		}

		[GLib.DefaultSignalHandler(Type=typeof(Gtk.PrintOperation), ConnectionMethod="OverrideEndPrint")]
		protected virtual void OnEndPrint (Gtk.PrintContext context)
		{
			InternalEndPrint (context);
		}

		private void InternalEndPrint (Gtk.PrintContext context)
		{
			EndPrintNativeDelegate unmanaged = null;
			unsafe {
				IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("end_print"));
				unmanaged = (EndPrintNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(EndPrintNativeDelegate));
			}
			if (unmanaged == null) return;

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

		static StatusChangedNativeDelegate StatusChanged_cb_delegate;
		static StatusChangedNativeDelegate StatusChangedVMCallback {
			get {
				if (StatusChanged_cb_delegate == null)
					StatusChanged_cb_delegate = new StatusChangedNativeDelegate (StatusChanged_cb);
				return StatusChanged_cb_delegate;
			}
		}

		static void OverrideStatusChanged (GLib.GType gtype)
		{
			OverrideStatusChanged (gtype, StatusChangedVMCallback);
		}

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

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

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

		[GLib.DefaultSignalHandler(Type=typeof(Gtk.PrintOperation), ConnectionMethod="OverrideStatusChanged")]
		protected virtual void OnStatusChanged ()
		{
			InternalStatusChanged ();
		}

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

			unmanaged (this.Handle);
		}

		static CreateCustomWidgetNativeDelegate CreateCustomWidget_cb_delegate;
		static CreateCustomWidgetNativeDelegate CreateCustomWidgetVMCallback {
			get {
				if (CreateCustomWidget_cb_delegate == null)
					CreateCustomWidget_cb_delegate = new CreateCustomWidgetNativeDelegate (CreateCustomWidget_cb);
				return CreateCustomWidget_cb_delegate;
			}
		}

		static void OverrideCreateCustomWidget (GLib.GType gtype)
		{
			OverrideCreateCustomWidget (gtype, CreateCustomWidgetVMCallback);
		}

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

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

		static IntPtr CreateCustomWidget_cb (IntPtr inst)
		{
			try {
				PrintOperation __obj = GLib.Object.GetObject (inst, false) as PrintOperation;
				Gtk.Widget __result;
				__result = __obj.OnCreateCustomWidget ();
				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(Gtk.PrintOperation), ConnectionMethod="OverrideCreateCustomWidget")]
		protected virtual Gtk.Widget OnCreateCustomWidget ()
		{
			return InternalCreateCustomWidget ();
		}

		private Gtk.Widget InternalCreateCustomWidget ()
		{
			CreateCustomWidgetNativeDelegate unmanaged = null;
			unsafe {
				IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("create_custom_widget"));
				unmanaged = (CreateCustomWidgetNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(CreateCustomWidgetNativeDelegate));
			}
			if (unmanaged == null) return null;

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

		static CustomWidgetApplyNativeDelegate CustomWidgetApply_cb_delegate;
		static CustomWidgetApplyNativeDelegate CustomWidgetApplyVMCallback {
			get {
				if (CustomWidgetApply_cb_delegate == null)
					CustomWidgetApply_cb_delegate = new CustomWidgetApplyNativeDelegate (CustomWidgetApply_cb);
				return CustomWidgetApply_cb_delegate;
			}
		}

		static void OverrideCustomWidgetApply (GLib.GType gtype)
		{
			OverrideCustomWidgetApply (gtype, CustomWidgetApplyVMCallback);
		}

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

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void CustomWidgetApplyNativeDelegate (IntPtr inst, IntPtr widget);

		static void CustomWidgetApply_cb (IntPtr inst, IntPtr widget)
		{
			try {
				PrintOperation __obj = GLib.Object.GetObject (inst, false) as PrintOperation;
				__obj.OnCustomWidgetApply (GLib.Object.GetObject(widget) as Gtk.Widget);
			} catch (Exception e) {
				GLib.ExceptionManager.RaiseUnhandledException (e, false);
			}
		}

		[GLib.DefaultSignalHandler(Type=typeof(Gtk.PrintOperation), ConnectionMethod="OverrideCustomWidgetApply")]
		protected virtual void OnCustomWidgetApply (Gtk.Widget widget)
		{
			InternalCustomWidgetApply (widget);
		}

		private void InternalCustomWidgetApply (Gtk.Widget widget)
		{
			CustomWidgetApplyNativeDelegate unmanaged = null;
			unsafe {
				IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("custom_widget_apply"));
				unmanaged = (CustomWidgetApplyNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(CustomWidgetApplyNativeDelegate));
			}
			if (unmanaged == null) return;

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

		static PreviewNativeDelegate Preview_cb_delegate;
		static PreviewNativeDelegate PreviewVMCallback {
			get {
				if (Preview_cb_delegate == null)
					Preview_cb_delegate = new PreviewNativeDelegate (Preview_cb);
				return Preview_cb_delegate;
			}
		}

		static void OverridePreview (GLib.GType gtype)
		{
			OverridePreview (gtype, PreviewVMCallback);
		}

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

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate bool PreviewNativeDelegate (IntPtr inst, IntPtr preview, IntPtr context, IntPtr parent);

		static bool Preview_cb (IntPtr inst, IntPtr preview, IntPtr context, IntPtr parent)
		{
			try {
				PrintOperation __obj = GLib.Object.GetObject (inst, false) as PrintOperation;
				bool __result;
				__result = __obj.OnPreview (Gtk.PrintOperationPreviewAdapter.GetObject (preview, false), GLib.Object.GetObject(context) as Gtk.PrintContext, GLib.Object.GetObject(parent) as Gtk.Window);
				return __result;
			} catch (Exception e) {
				GLib.ExceptionManager.RaiseUnhandledException (e, true);
				// NOTREACHED: above call does not return.
				throw e;
			}
		}

		[GLib.DefaultSignalHandler(Type=typeof(Gtk.PrintOperation), ConnectionMethod="OverridePreview")]
		protected virtual bool OnPreview (Gtk.IPrintOperationPreview preview, Gtk.PrintContext context, Gtk.Window parent)
		{
			return InternalPreview (preview, context, parent);
		}

		private bool InternalPreview (Gtk.IPrintOperationPreview preview, Gtk.PrintContext context, Gtk.Window parent)
		{
			PreviewNativeDelegate unmanaged = null;
			unsafe {
				IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("preview"));
				unmanaged = (PreviewNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(PreviewNativeDelegate));
			}
			if (unmanaged == null) return false;

			bool __result = unmanaged (this.Handle, preview == null ? IntPtr.Zero : ((preview is GLib.Object) ? (preview as GLib.Object).Handle : (preview as Gtk.PrintOperationPreviewAdapter).Handle), context == null ? IntPtr.Zero : context.Handle, parent == null ? IntPtr.Zero : parent.Handle);
			return __result;
		}

		static UpdateCustomWidgetNativeDelegate UpdateCustomWidget_cb_delegate;
		static UpdateCustomWidgetNativeDelegate UpdateCustomWidgetVMCallback {
			get {
				if (UpdateCustomWidget_cb_delegate == null)
					UpdateCustomWidget_cb_delegate = new UpdateCustomWidgetNativeDelegate (UpdateCustomWidget_cb);
				return UpdateCustomWidget_cb_delegate;
			}
		}

		static void OverrideUpdateCustomWidget (GLib.GType gtype)
		{
			OverrideUpdateCustomWidget (gtype, UpdateCustomWidgetVMCallback);
		}

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

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void UpdateCustomWidgetNativeDelegate (IntPtr inst, IntPtr widget, IntPtr setup, IntPtr settings);

		static void UpdateCustomWidget_cb (IntPtr inst, IntPtr widget, IntPtr setup, IntPtr settings)
		{
			try {
				PrintOperation __obj = GLib.Object.GetObject (inst, false) as PrintOperation;
				__obj.OnUpdateCustomWidget (GLib.Object.GetObject(widget) as Gtk.Widget, GLib.Object.GetObject(setup) as Gtk.PageSetup, GLib.Object.GetObject(settings) as Gtk.PrintSettings);
			} catch (Exception e) {
				GLib.ExceptionManager.RaiseUnhandledException (e, false);
			}
		}

		[GLib.DefaultSignalHandler(Type=typeof(Gtk.PrintOperation), ConnectionMethod="OverrideUpdateCustomWidget")]
		protected virtual void OnUpdateCustomWidget (Gtk.Widget widget, Gtk.PageSetup setup, Gtk.PrintSettings settings)
		{
			InternalUpdateCustomWidget (widget, setup, settings);
		}

		private void InternalUpdateCustomWidget (Gtk.Widget widget, Gtk.PageSetup setup, Gtk.PrintSettings settings)
		{
			UpdateCustomWidgetNativeDelegate unmanaged = null;
			unsafe {
				IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("update_custom_widget"));
				unmanaged = (UpdateCustomWidgetNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(UpdateCustomWidgetNativeDelegate));
			}
			if (unmanaged == null) return;

			unmanaged (this.Handle, widget == null ? IntPtr.Zero : widget.Handle, setup == null ? IntPtr.Zero : setup.Handle, settings == null ? IntPtr.Zero : settings.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("done"
							, GLib.Object.class_abi.Fields
							, (uint) Marshal.SizeOf(typeof(IntPtr)) // done
							, null
							, "begin_print"
							, (uint) Marshal.SizeOf(typeof(IntPtr))
							, 0
							),
						new GLib.AbiField("begin_print"
							, -1
							, (uint) Marshal.SizeOf(typeof(IntPtr)) // begin_print
							, "done"
							, "paginate"
							, (uint) Marshal.SizeOf(typeof(IntPtr))
							, 0
							),
						new GLib.AbiField("paginate"
							, -1
							, (uint) Marshal.SizeOf(typeof(IntPtr)) // paginate
							, "begin_print"
							, "request_page_setup"
							, (uint) Marshal.SizeOf(typeof(IntPtr))
							, 0
							),
						new GLib.AbiField("request_page_setup"
							, -1
							, (uint) Marshal.SizeOf(typeof(IntPtr)) // request_page_setup
							, "paginate"
							, "draw_page"
							, (uint) Marshal.SizeOf(typeof(IntPtr))
							, 0
							),
						new GLib.AbiField("draw_page"
							, -1
							, (uint) Marshal.SizeOf(typeof(IntPtr)) // draw_page
							, "request_page_setup"
							, "end_print"
							, (uint) Marshal.SizeOf(typeof(IntPtr))
							, 0
							),
						new GLib.AbiField("end_print"
							, -1
							, (uint) Marshal.SizeOf(typeof(IntPtr)) // end_print
							, "draw_page"
							, "status_changed"
							, (uint) Marshal.SizeOf(typeof(IntPtr))
							, 0
							),
						new GLib.AbiField("status_changed"
							, -1
							, (uint) Marshal.SizeOf(typeof(IntPtr)) // status_changed
							, "end_print"
							, "create_custom_widget"
							, (uint) Marshal.SizeOf(typeof(IntPtr))
							, 0
							),
						new GLib.AbiField("create_custom_widget"
							, -1
							, (uint) Marshal.SizeOf(typeof(IntPtr)) // create_custom_widget
							, "status_changed"
							, "custom_widget_apply"
							, (uint) Marshal.SizeOf(typeof(IntPtr))
							, 0
							),
						new GLib.AbiField("custom_widget_apply"
							, -1
							, (uint) Marshal.SizeOf(typeof(IntPtr)) // custom_widget_apply
							, "create_custom_widget"
							, "preview"
							, (uint) Marshal.SizeOf(typeof(IntPtr))
							, 0
							),
						new GLib.AbiField("preview"
							, -1
							, (uint) Marshal.SizeOf(typeof(IntPtr)) // preview
							, "custom_widget_apply"
							, "update_custom_widget"
							, (uint) Marshal.SizeOf(typeof(IntPtr))
							, 0
							),
						new GLib.AbiField("update_custom_widget"
							, -1
							, (uint) Marshal.SizeOf(typeof(IntPtr)) // update_custom_widget
							, "preview"
							, "_gtk_reserved1"
							, (uint) Marshal.SizeOf(typeof(IntPtr))
							, 0
							),
						new GLib.AbiField("_gtk_reserved1"
							, -1
							, (uint) Marshal.SizeOf(typeof(IntPtr)) // _gtk_reserved1
							, "update_custom_widget"
							, "_gtk_reserved2"
							, (uint) Marshal.SizeOf(typeof(IntPtr))
							, 0
							),
						new GLib.AbiField("_gtk_reserved2"
							, -1
							, (uint) Marshal.SizeOf(typeof(IntPtr)) // _gtk_reserved2
							, "_gtk_reserved1"
							, "_gtk_reserved3"
							, (uint) Marshal.SizeOf(typeof(IntPtr))
							, 0
							),
						new GLib.AbiField("_gtk_reserved3"
							, -1
							, (uint) Marshal.SizeOf(typeof(IntPtr)) // _gtk_reserved3
							, "_gtk_reserved2"
							, "_gtk_reserved4"
							, (uint) Marshal.SizeOf(typeof(IntPtr))
							, 0
							),
						new GLib.AbiField("_gtk_reserved4"
							, -1
							, (uint) Marshal.SizeOf(typeof(IntPtr)) // _gtk_reserved4
							, "_gtk_reserved3"
							, "_gtk_reserved5"
							, (uint) Marshal.SizeOf(typeof(IntPtr))
							, 0
							),
						new GLib.AbiField("_gtk_reserved5"
							, -1
							, (uint) Marshal.SizeOf(typeof(IntPtr)) // _gtk_reserved5
							, "_gtk_reserved4"
							, "_gtk_reserved6"
							, (uint) Marshal.SizeOf(typeof(IntPtr))
							, 0
							),
						new GLib.AbiField("_gtk_reserved6"
							, -1
							, (uint) Marshal.SizeOf(typeof(IntPtr)) // _gtk_reserved6
							, "_gtk_reserved5"
							, "_gtk_reserved7"
							, (uint) Marshal.SizeOf(typeof(IntPtr))
							, 0
							),
						new GLib.AbiField("_gtk_reserved7"
							, -1
							, (uint) Marshal.SizeOf(typeof(IntPtr)) // _gtk_reserved7
							, "_gtk_reserved6"
							, "_gtk_reserved8"
							, (uint) Marshal.SizeOf(typeof(IntPtr))
							, 0
							),
						new GLib.AbiField("_gtk_reserved8"
							, -1
							, (uint) Marshal.SizeOf(typeof(IntPtr)) // _gtk_reserved8
							, "_gtk_reserved7"
							, null
							, (uint) Marshal.SizeOf(typeof(IntPtr))
							, 0
							),
					});

				return _class_abi;
			}
		}


		// End of the ABI representation.

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

		public void Cancel() {
			gtk_print_operation_cancel(Handle);
		}

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

		public void DrawPageFinish() {
			gtk_print_operation_draw_page_finish(Handle);
		}

		[DllImport("gtk-3-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern unsafe void gtk_print_operation_get_error(IntPtr raw, out IntPtr error);

		public unsafe void GetError() {
			IntPtr error = IntPtr.Zero;
			gtk_print_operation_get_error(Handle, out error);
			if (error != IntPtr.Zero) throw new GLib.GException (error);
		}

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

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

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

		public bool IsFinished { 
			get {
				bool raw_ret = gtk_print_operation_is_finished(Handle);
				bool ret = raw_ret;
				return ret;
			}
		}

		[DllImport("gtk-3-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern void gtk_print_operation_portal_launch_preview(IntPtr raw, IntPtr surface, IntPtr parent, IntPtr filename);

		public void PortalLaunchPreview(Cairo.Surface surface, Gtk.Window parent, string filename) {
			IntPtr native_filename = GLib.Marshaller.StringToPtrGStrdup (filename);
			gtk_print_operation_portal_launch_preview(Handle, surface.Handle, parent == null ? IntPtr.Zero : parent.Handle, native_filename);
			GLib.Marshaller.Free (native_filename);
		}

		[DllImport("gtk-3-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern int gtk_print_operation_portal_run_dialog(IntPtr raw, bool show_dialog, IntPtr parent, out bool do_print);

		public Gtk.PrintOperationResult PortalRunDialog(bool show_dialog, Gtk.Window parent, out bool do_print) {
			int raw_ret = gtk_print_operation_portal_run_dialog(Handle, show_dialog, parent == null ? IntPtr.Zero : parent.Handle, out do_print);
			Gtk.PrintOperationResult ret = (Gtk.PrintOperationResult) raw_ret;
			return ret;
		}

		[DllImport("gtk-3-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern unsafe int gtk_print_operation_run(IntPtr raw, int action, IntPtr parent, out IntPtr error);

		public unsafe Gtk.PrintOperationResult Run(Gtk.PrintOperationAction action, Gtk.Window parent) {
			IntPtr error = IntPtr.Zero;
			int raw_ret = gtk_print_operation_run(Handle, (int) action, parent == null ? IntPtr.Zero : parent.Handle, out error);
			Gtk.PrintOperationResult ret = (Gtk.PrintOperationResult) raw_ret;
			if (error != IntPtr.Zero) throw new GLib.GException (error);
			return ret;
		}

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

		public void SetDeferDrawing() {
			gtk_print_operation_set_defer_drawing(Handle);
		}

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

		public void EndPreview() {
			gtk_print_operation_preview_end_preview(Handle);
		}

		[DllImport("gtk-3-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern bool gtk_print_operation_preview_is_selected(IntPtr raw, int page_nr);

		public bool IsSelected(int page_nr) {
			bool raw_ret = gtk_print_operation_preview_is_selected(Handle, page_nr);
			bool ret = raw_ret;
			return ret;
		}

		[DllImport("gtk-3-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern void gtk_print_operation_preview_render_page(IntPtr raw, int page_nr);

		public void RenderPage(int page_nr) {
			gtk_print_operation_preview_render_page(Handle, page_nr);
		}

		[GLib.Signal("ready")]
		public event Gtk.ReadyHandler Ready {
			add {
				this.AddSignalHandler ("ready", value, typeof (Gtk.ReadyArgs));
			}
			remove {
				this.RemoveSignalHandler ("ready", value);
			}
		}

		[GLib.Signal("got-page-size")]
		public event Gtk.GotPageSizeHandler GotPageSize {
			add {
				this.AddSignalHandler ("got-page-size", value, typeof (Gtk.GotPageSizeArgs));
			}
			remove {
				this.RemoveSignalHandler ("got-page-size", value);
			}
		}

		static ReadyNativeDelegate Ready_cb_delegate;
		static ReadyNativeDelegate ReadyVMCallback {
			get {
				if (Ready_cb_delegate == null)
					Ready_cb_delegate = new ReadyNativeDelegate (Ready_cb);
				return Ready_cb_delegate;
			}
		}

		static void OverrideReady (GLib.GType gtype)
		{
			OverrideReady (gtype, ReadyVMCallback);
		}

		static void OverrideReady (GLib.GType gtype, ReadyNativeDelegate callback)
		{
			OverrideVirtualMethod (gtype, "ready", callback);
		}
		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void ReadyNativeDelegate (IntPtr inst, IntPtr context);

		static void Ready_cb (IntPtr inst, IntPtr context)
		{
			try {
				Gtk.PrintOperation __obj = GLib.Object.GetObject (inst, false) as Gtk.PrintOperation;
				__obj.OnReady (GLib.Object.GetObject(context) as Gtk.PrintContext);
			} catch (Exception e) {
				GLib.ExceptionManager.RaiseUnhandledException (e, false);
			}
		}

		[GLib.DefaultSignalHandler(Type=typeof(Gtk.PrintOperation), ConnectionMethod="OverrideReady")]
		protected virtual void OnReady (Gtk.PrintContext context)
		{
			InternalReady (context);
		}

		private void InternalReady (Gtk.PrintContext context)
		{
			GLib.Value ret = GLib.Value.Empty;
			GLib.ValueArray inst_and_params = new GLib.ValueArray (2);
			GLib.Value[] vals = new GLib.Value [2];
			vals [0] = new GLib.Value (this);
			inst_and_params.Append (vals [0]);
			vals [1] = new GLib.Value (context);
			inst_and_params.Append (vals [1]);
			g_signal_chain_from_overridden (inst_and_params.ArrayPtr, ref ret);
			foreach (GLib.Value v in vals)
				v.Dispose ();
		}

		static GotPageSizeNativeDelegate GotPageSize_cb_delegate;
		static GotPageSizeNativeDelegate GotPageSizeVMCallback {
			get {
				if (GotPageSize_cb_delegate == null)
					GotPageSize_cb_delegate = new GotPageSizeNativeDelegate (GotPageSize_cb);
				return GotPageSize_cb_delegate;
			}
		}

		static void OverrideGotPageSize (GLib.GType gtype)
		{
			OverrideGotPageSize (gtype, GotPageSizeVMCallback);
		}

		static void OverrideGotPageSize (GLib.GType gtype, GotPageSizeNativeDelegate callback)
		{
			OverrideVirtualMethod (gtype, "got-page-size", callback);
		}
		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void GotPageSizeNativeDelegate (IntPtr inst, IntPtr context, IntPtr page_setup);

		static void GotPageSize_cb (IntPtr inst, IntPtr context, IntPtr page_setup)
		{
			try {
				Gtk.PrintOperation __obj = GLib.Object.GetObject (inst, false) as Gtk.PrintOperation;
				__obj.OnGotPageSize (GLib.Object.GetObject(context) as Gtk.PrintContext, GLib.Object.GetObject(page_setup) as Gtk.PageSetup);
			} catch (Exception e) {
				GLib.ExceptionManager.RaiseUnhandledException (e, false);
			}
		}

		[GLib.DefaultSignalHandler(Type=typeof(Gtk.PrintOperation), ConnectionMethod="OverrideGotPageSize")]
		protected virtual void OnGotPageSize (Gtk.PrintContext context, Gtk.PageSetup page_setup)
		{
			InternalGotPageSize (context, page_setup);
		}

		private void InternalGotPageSize (Gtk.PrintContext context, Gtk.PageSetup page_setup)
		{
			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 (context);
			inst_and_params.Append (vals [1]);
			vals [2] = new GLib.Value (page_setup);
			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("priv"
							, GLib.Object.abi_info.Fields
							, (uint) Marshal.SizeOf(typeof(IntPtr)) // priv
							, null
							, null
							, (uint) Marshal.SizeOf(typeof(IntPtr))
							, 0
							),
					});

				return _abi_info;
			}
		}


		// End of the ABI representation.

#endregion
	}
}