File: Gdk_Seat.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 (711 lines) | stat: -rw-r--r-- 24,491 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
// 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 Seat : GLib.Object {

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

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

		static DeviceAddedNativeDelegate DeviceAdded_cb_delegate;
		static DeviceAddedNativeDelegate DeviceAddedVMCallback {
			get {
				if (DeviceAdded_cb_delegate == null)
					DeviceAdded_cb_delegate = new DeviceAddedNativeDelegate (DeviceAdded_cb);
				return DeviceAdded_cb_delegate;
			}
		}

		static void OverrideDeviceAdded (GLib.GType gtype)
		{
			OverrideDeviceAdded (gtype, DeviceAddedVMCallback);
		}

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

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void DeviceAddedNativeDelegate (IntPtr inst, IntPtr device);

		static void DeviceAdded_cb (IntPtr inst, IntPtr device)
		{
			try {
				Seat __obj = GLib.Object.GetObject (inst, false) as Seat;
				__obj.OnDeviceAdded (GLib.Object.GetObject(device) as Gdk.Device);
			} catch (Exception e) {
				GLib.ExceptionManager.RaiseUnhandledException (e, false);
			}
		}

		[GLib.DefaultSignalHandler(Type=typeof(Gdk.Seat), ConnectionMethod="OverrideDeviceAdded")]
		protected virtual void OnDeviceAdded (Gdk.Device device)
		{
			InternalDeviceAdded (device);
		}

		private void InternalDeviceAdded (Gdk.Device device)
		{
			DeviceAddedNativeDelegate unmanaged = null;
			unsafe {
				IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("device_added"));
				unmanaged = (DeviceAddedNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(DeviceAddedNativeDelegate));
			}
			if (unmanaged == null) return;

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

		static DeviceRemovedNativeDelegate DeviceRemoved_cb_delegate;
		static DeviceRemovedNativeDelegate DeviceRemovedVMCallback {
			get {
				if (DeviceRemoved_cb_delegate == null)
					DeviceRemoved_cb_delegate = new DeviceRemovedNativeDelegate (DeviceRemoved_cb);
				return DeviceRemoved_cb_delegate;
			}
		}

		static void OverrideDeviceRemoved (GLib.GType gtype)
		{
			OverrideDeviceRemoved (gtype, DeviceRemovedVMCallback);
		}

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

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void DeviceRemovedNativeDelegate (IntPtr inst, IntPtr device);

		static void DeviceRemoved_cb (IntPtr inst, IntPtr device)
		{
			try {
				Seat __obj = GLib.Object.GetObject (inst, false) as Seat;
				__obj.OnDeviceRemoved (GLib.Object.GetObject(device) as Gdk.Device);
			} catch (Exception e) {
				GLib.ExceptionManager.RaiseUnhandledException (e, false);
			}
		}

		[GLib.DefaultSignalHandler(Type=typeof(Gdk.Seat), ConnectionMethod="OverrideDeviceRemoved")]
		protected virtual void OnDeviceRemoved (Gdk.Device device)
		{
			InternalDeviceRemoved (device);
		}

		private void InternalDeviceRemoved (Gdk.Device device)
		{
			DeviceRemovedNativeDelegate unmanaged = null;
			unsafe {
				IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("device_removed"));
				unmanaged = (DeviceRemovedNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(DeviceRemovedNativeDelegate));
			}
			if (unmanaged == null) return;

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

		static DeviceChangedNativeDelegate DeviceChanged_cb_delegate;
		static DeviceChangedNativeDelegate DeviceChangedVMCallback {
			get {
				if (DeviceChanged_cb_delegate == null)
					DeviceChanged_cb_delegate = new DeviceChangedNativeDelegate (DeviceChanged_cb);
				return DeviceChanged_cb_delegate;
			}
		}

		static void OverrideDeviceChanged (GLib.GType gtype)
		{
			OverrideDeviceChanged (gtype, DeviceChangedVMCallback);
		}

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

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void DeviceChangedNativeDelegate (IntPtr inst, IntPtr device);

		static void DeviceChanged_cb (IntPtr inst, IntPtr device)
		{
			try {
				Seat __obj = GLib.Object.GetObject (inst, false) as Seat;
				__obj.OnDeviceChanged (GLib.Object.GetObject(device) as Gdk.Device);
			} catch (Exception e) {
				GLib.ExceptionManager.RaiseUnhandledException (e, false);
			}
		}

		[GLib.DefaultSignalHandler(Type=typeof(Gdk.Seat), ConnectionMethod="OverrideDeviceChanged")]
		protected virtual void OnDeviceChanged (Gdk.Device device)
		{
			InternalDeviceChanged (device);
		}

		private void InternalDeviceChanged (Gdk.Device device)
		{
			DeviceChangedNativeDelegate unmanaged = null;
			unsafe {
				IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("device_changed"));
				unmanaged = (DeviceChangedNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(DeviceChangedNativeDelegate));
			}
			if (unmanaged == null) return;

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

		static GetCapabilitiesNativeDelegate GetCapabilities_cb_delegate;
		static GetCapabilitiesNativeDelegate GetCapabilitiesVMCallback {
			get {
				if (GetCapabilities_cb_delegate == null)
					GetCapabilities_cb_delegate = new GetCapabilitiesNativeDelegate (GetCapabilities_cb);
				return GetCapabilities_cb_delegate;
			}
		}

		static void OverrideGetCapabilities (GLib.GType gtype)
		{
			OverrideGetCapabilities (gtype, GetCapabilitiesVMCallback);
		}

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

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

		static int GetCapabilities_cb (IntPtr inst)
		{
			try {
				Seat __obj = GLib.Object.GetObject (inst, false) as Seat;
				Gdk.SeatCapabilities __result;
				__result = __obj.OnGetCapabilities ();
				return (int) __result;
			} catch (Exception e) {
				GLib.ExceptionManager.RaiseUnhandledException (e, true);
				// NOTREACHED: above call does not return.
				throw e;
			}
		}

		[GLib.DefaultSignalHandler(Type=typeof(Gdk.Seat), ConnectionMethod="OverrideGetCapabilities")]
		protected virtual Gdk.SeatCapabilities OnGetCapabilities ()
		{
			return InternalGetCapabilities ();
		}

		private Gdk.SeatCapabilities InternalGetCapabilities ()
		{
			GetCapabilitiesNativeDelegate unmanaged = null;
			unsafe {
				IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("get_capabilities"));
				unmanaged = (GetCapabilitiesNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(GetCapabilitiesNativeDelegate));
			}
			if (unmanaged == null) return (Gdk.SeatCapabilities) 0;

			int __result = unmanaged (this.Handle);
			return (Gdk.SeatCapabilities) __result;
		}

		static GrabNativeDelegate Grab_cb_delegate;
		static GrabNativeDelegate GrabVMCallback {
			get {
				if (Grab_cb_delegate == null)
					Grab_cb_delegate = new GrabNativeDelegate (Grab_cb);
				return Grab_cb_delegate;
			}
		}

		static void OverrideGrab (GLib.GType gtype)
		{
			OverrideGrab (gtype, GrabVMCallback);
		}

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

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate int GrabNativeDelegate (IntPtr inst, IntPtr window, int capabilities, bool owner_events, IntPtr cursor, IntPtr evnt, GdkSharp.SeatGrabPrepareFuncNative prepare_func, IntPtr prepare_func_data);

		static int Grab_cb (IntPtr inst, IntPtr window, int capabilities, bool owner_events, IntPtr cursor, IntPtr evnt, GdkSharp.SeatGrabPrepareFuncNative prepare_func, IntPtr prepare_func_data)
		{
			try {
				Seat __obj = GLib.Object.GetObject (inst, false) as Seat;
				Gdk.GrabStatus __result;
				GdkSharp.SeatGrabPrepareFuncInvoker prepare_func_invoker = new GdkSharp.SeatGrabPrepareFuncInvoker (prepare_func, prepare_func_data);
				__result = __obj.OnGrab (GLib.Object.GetObject(window) as Gdk.Window, (Gdk.SeatCapabilities) capabilities, owner_events, GLib.Object.GetObject(cursor) as Gdk.Cursor, Gdk.Event.GetEvent (evnt), prepare_func_invoker.Handler);
				return (int) __result;
			} catch (Exception e) {
				GLib.ExceptionManager.RaiseUnhandledException (e, true);
				// NOTREACHED: above call does not return.
				throw e;
			}
		}

		[GLib.DefaultSignalHandler(Type=typeof(Gdk.Seat), ConnectionMethod="OverrideGrab")]
		protected virtual Gdk.GrabStatus OnGrab (Gdk.Window window, Gdk.SeatCapabilities capabilities, bool owner_events, Gdk.Cursor cursor, Gdk.Event evnt, Gdk.SeatGrabPrepareFunc prepare_func)
		{
			return InternalGrab (window, capabilities, owner_events, cursor, evnt, prepare_func);
		}

		private Gdk.GrabStatus InternalGrab (Gdk.Window window, Gdk.SeatCapabilities capabilities, bool owner_events, Gdk.Cursor cursor, Gdk.Event evnt, Gdk.SeatGrabPrepareFunc prepare_func)
		{
			GrabNativeDelegate unmanaged = null;
			unsafe {
				IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("grab"));
				unmanaged = (GrabNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(GrabNativeDelegate));
			}
			if (unmanaged == null) return (Gdk.GrabStatus) 0;

			GdkSharp.SeatGrabPrepareFuncWrapper prepare_func_wrapper = new GdkSharp.SeatGrabPrepareFuncWrapper (prepare_func);
			int __result = unmanaged (this.Handle, window == null ? IntPtr.Zero : window.Handle, (int) capabilities, owner_events, cursor == null ? IntPtr.Zero : cursor.Handle, evnt == null ? IntPtr.Zero : evnt.Handle, prepare_func_wrapper.NativeDelegate, IntPtr.Zero);
			return (Gdk.GrabStatus) __result;
		}

		static UngrabNativeDelegate Ungrab_cb_delegate;
		static UngrabNativeDelegate UngrabVMCallback {
			get {
				if (Ungrab_cb_delegate == null)
					Ungrab_cb_delegate = new UngrabNativeDelegate (Ungrab_cb);
				return Ungrab_cb_delegate;
			}
		}

		static void OverrideUngrab (GLib.GType gtype)
		{
			OverrideUngrab (gtype, UngrabVMCallback);
		}

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

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

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

		[GLib.DefaultSignalHandler(Type=typeof(Gdk.Seat), ConnectionMethod="OverrideUngrab")]
		protected virtual void OnUngrab ()
		{
			InternalUngrab ();
		}

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

			unmanaged (this.Handle);
		}

		static GetMasterNativeDelegate GetMaster_cb_delegate;
		static GetMasterNativeDelegate GetMasterVMCallback {
			get {
				if (GetMaster_cb_delegate == null)
					GetMaster_cb_delegate = new GetMasterNativeDelegate (GetMaster_cb);
				return GetMaster_cb_delegate;
			}
		}

		static void OverrideGetMaster (GLib.GType gtype)
		{
			OverrideGetMaster (gtype, GetMasterVMCallback);
		}

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

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate IntPtr GetMasterNativeDelegate (IntPtr inst, int capability);

		static IntPtr GetMaster_cb (IntPtr inst, int capability)
		{
			try {
				Seat __obj = GLib.Object.GetObject (inst, false) as Seat;
				Gdk.Device __result;
				__result = __obj.OnGetMaster ((Gdk.SeatCapabilities) capability);
				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.Seat), ConnectionMethod="OverrideGetMaster")]
		protected virtual Gdk.Device OnGetMaster (Gdk.SeatCapabilities capability)
		{
			return InternalGetMaster (capability);
		}

		private Gdk.Device InternalGetMaster (Gdk.SeatCapabilities capability)
		{
			GetMasterNativeDelegate unmanaged = null;
			unsafe {
				IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("get_master"));
				unmanaged = (GetMasterNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(GetMasterNativeDelegate));
			}
			if (unmanaged == null) return null;

			IntPtr __result = unmanaged (this.Handle, (int) capability);
			return GLib.Object.GetObject(__result) as Gdk.Device;
		}

		static GetSlavesNativeDelegate GetSlaves_cb_delegate;
		static GetSlavesNativeDelegate GetSlavesVMCallback {
			get {
				if (GetSlaves_cb_delegate == null)
					GetSlaves_cb_delegate = new GetSlavesNativeDelegate (GetSlaves_cb);
				return GetSlaves_cb_delegate;
			}
		}

		static void OverrideGetSlaves (GLib.GType gtype)
		{
			OverrideGetSlaves (gtype, GetSlavesVMCallback);
		}

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

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate IntPtr GetSlavesNativeDelegate (IntPtr inst, int capabilities);

		static IntPtr GetSlaves_cb (IntPtr inst, int capabilities)
		{
			try {
				Seat __obj = GLib.Object.GetObject (inst, false) as Seat;
				GLib.List __result;
				__result = __obj.OnGetSlaves ((Gdk.SeatCapabilities) capabilities);
				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.Seat), ConnectionMethod="OverrideGetSlaves")]
		protected virtual GLib.List OnGetSlaves (Gdk.SeatCapabilities capabilities)
		{
			return InternalGetSlaves (capabilities);
		}

		private GLib.List InternalGetSlaves (Gdk.SeatCapabilities capabilities)
		{
			GetSlavesNativeDelegate unmanaged = null;
			unsafe {
				IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("get_slaves"));
				unmanaged = (GetSlavesNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(GetSlavesNativeDelegate));
			}
			if (unmanaged == null) return null;

			IntPtr __result = unmanaged (this.Handle, (int) capabilities);
			return new GLib.List(__result);
		}

		static GetToolNativeDelegate GetTool_cb_delegate;
		static GetToolNativeDelegate GetToolVMCallback {
			get {
				if (GetTool_cb_delegate == null)
					GetTool_cb_delegate = new GetToolNativeDelegate (GetTool_cb);
				return GetTool_cb_delegate;
			}
		}

		static void OverrideGetTool (GLib.GType gtype)
		{
			OverrideGetTool (gtype, GetToolVMCallback);
		}

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

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate IntPtr GetToolNativeDelegate (IntPtr inst, ulong serial);

		static IntPtr GetTool_cb (IntPtr inst, ulong serial)
		{
			try {
				Seat __obj = GLib.Object.GetObject (inst, false) as Seat;
				Gdk.DeviceTool __result;
				__result = __obj.OnGetTool (serial);
				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.Seat), ConnectionMethod="OverrideGetTool")]
		protected virtual Gdk.DeviceTool OnGetTool (ulong serial)
		{
			return InternalGetTool (serial);
		}

		private Gdk.DeviceTool InternalGetTool (ulong serial)
		{
			GetToolNativeDelegate unmanaged = null;
			unsafe {
				IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("get_tool"));
				unmanaged = (GetToolNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(GetToolNativeDelegate));
			}
			if (unmanaged == null) return null;

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


		// 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("device_added"
							, GLib.Object.class_abi.Fields
							, (uint) Marshal.SizeOf(typeof(IntPtr)) // device_added
							, null
							, "device_removed"
							, (uint) Marshal.SizeOf(typeof(IntPtr))
							, 0
							),
						new GLib.AbiField("device_removed"
							, -1
							, (uint) Marshal.SizeOf(typeof(IntPtr)) // device_removed
							, "device_added"
							, "device_changed"
							, (uint) Marshal.SizeOf(typeof(IntPtr))
							, 0
							),
						new GLib.AbiField("device_changed"
							, -1
							, (uint) Marshal.SizeOf(typeof(IntPtr)) // device_changed
							, "device_removed"
							, "get_capabilities"
							, (uint) Marshal.SizeOf(typeof(IntPtr))
							, 0
							),
						new GLib.AbiField("get_capabilities"
							, -1
							, (uint) Marshal.SizeOf(typeof(IntPtr)) // get_capabilities
							, "device_changed"
							, "grab"
							, (uint) Marshal.SizeOf(typeof(IntPtr))
							, 0
							),
						new GLib.AbiField("grab"
							, -1
							, (uint) Marshal.SizeOf(typeof(IntPtr)) // grab
							, "get_capabilities"
							, "ungrab"
							, (uint) Marshal.SizeOf(typeof(IntPtr))
							, 0
							),
						new GLib.AbiField("ungrab"
							, -1
							, (uint) Marshal.SizeOf(typeof(IntPtr)) // ungrab
							, "grab"
							, "get_master"
							, (uint) Marshal.SizeOf(typeof(IntPtr))
							, 0
							),
						new GLib.AbiField("get_master"
							, -1
							, (uint) Marshal.SizeOf(typeof(IntPtr)) // get_master
							, "ungrab"
							, "get_slaves"
							, (uint) Marshal.SizeOf(typeof(IntPtr))
							, 0
							),
						new GLib.AbiField("get_slaves"
							, -1
							, (uint) Marshal.SizeOf(typeof(IntPtr)) // get_slaves
							, "get_master"
							, "get_tool"
							, (uint) Marshal.SizeOf(typeof(IntPtr))
							, 0
							),
						new GLib.AbiField("get_tool"
							, -1
							, (uint) Marshal.SizeOf(typeof(IntPtr)) // get_tool
							, "get_slaves"
							, 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_seat_get_capabilities(IntPtr raw);

		public Gdk.SeatCapabilities Capabilities { 
			get {
				int raw_ret = gdk_seat_get_capabilities(Handle);
				Gdk.SeatCapabilities ret = (Gdk.SeatCapabilities) raw_ret;
				return ret;
			}
		}

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

		public Gdk.Display Display { 
			get {
				IntPtr raw_ret = gdk_seat_get_display(Handle);
				Gdk.Display ret = GLib.Object.GetObject(raw_ret) as Gdk.Display;
				return ret;
			}
		}

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

		public Gdk.Device Keyboard { 
			get {
				IntPtr raw_ret = gdk_seat_get_keyboard(Handle);
				Gdk.Device ret = GLib.Object.GetObject(raw_ret) as Gdk.Device;
				return ret;
			}
		}

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

		public Gdk.Device Pointer { 
			get {
				IntPtr raw_ret = gdk_seat_get_pointer(Handle);
				Gdk.Device ret = GLib.Object.GetObject(raw_ret) as Gdk.Device;
				return ret;
			}
		}

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

		public GLib.List GetSlaves(Gdk.SeatCapabilities capabilities) {
			IntPtr raw_ret = gdk_seat_get_slaves(Handle, (int) capabilities);
			GLib.List ret = new GLib.List(raw_ret);
			return ret;
		}

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

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

		[DllImport("gdk-3-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern int gdk_seat_grab(IntPtr raw, IntPtr window, int capabilities, bool owner_events, IntPtr cursor, IntPtr evnt, GdkSharp.SeatGrabPrepareFuncNative prepare_func, IntPtr prepare_func_data);

		public Gdk.GrabStatus Grab(Gdk.Window window, Gdk.SeatCapabilities capabilities, bool owner_events, Gdk.Cursor cursor, Gdk.Event evnt, Gdk.SeatGrabPrepareFunc prepare_func) {
			GdkSharp.SeatGrabPrepareFuncWrapper prepare_func_wrapper = new GdkSharp.SeatGrabPrepareFuncWrapper (prepare_func);
			int raw_ret = gdk_seat_grab(Handle, window == null ? IntPtr.Zero : window.Handle, (int) capabilities, owner_events, cursor == null ? IntPtr.Zero : cursor.Handle, evnt == null ? IntPtr.Zero : evnt.Handle, prepare_func_wrapper.NativeDelegate, IntPtr.Zero);
			Gdk.GrabStatus ret = (Gdk.GrabStatus) raw_ret;
			return ret;
		}

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

		public void Ungrab() {
			gdk_seat_ungrab(Handle);
		}


		// 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
	}
}