示例#1
0
 static void OverrideListDevices(GLib.GType gtype, ListDevicesNativeDelegate callback)
 {
     unsafe {
         IntPtr *raw_ptr = (IntPtr *)(((long)gtype.GetClassPtr()) + (long)class_abi.GetFieldOffset("list_devices"));
         *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate)callback);
     }
 }
示例#2
0
		private Gdk.Device[] InternalListDevices (Gdk.DeviceType type)
		{
			ListDevicesNativeDelegate unmanaged = class_abi.BaseOverride<ListDevicesNativeDelegate>(this.LookupGType(), "list_devices");
			if (unmanaged == null) return null;

			IntPtr __result = unmanaged (this.Handle, (int) type);
			return (Gdk.Device[]) GLib.Marshaller.ListPtrToArray (__result, typeof(GLib.List), true, false, typeof(Gdk.Device));
		}
示例#3
0
        private Gdk.Device[] InternalListDevices(Gdk.DeviceType type)
        {
            ListDevicesNativeDelegate unmanaged = null;

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

            IntPtr __result = unmanaged(this.Handle, (int)type);

            return((Gdk.Device[])GLib.Marshaller.ListPtrToArray(__result, typeof(GLib.List), true, false, typeof(Gdk.Device)));
        }
示例#4
0
		static void OverrideListDevices (GLib.GType gtype, ListDevicesNativeDelegate callback)
		{
			GdkDisplayClass class_iface = GetClassStruct (gtype, false);
			class_iface.ListDevices = callback;
			OverrideClassStruct (gtype, class_iface);
		}