public static CFMachPort CreateTap (IntPtr processSerialNumber, CGEventTapLocation location, CGEventTapPlacement place, CGEventTapOptions options, CGEventMask mask, CGEventTapCallback cback, IntPtr data) { var r = CGEventTapCreateForPSN (processSerialNumber, location, place, options, mask, cback, data); if (r == IntPtr.Zero) return null; return new CFMachPort (r); }
public static CFMachPort CreateTap(IntPtr processSerialNumber, CGEventTapLocation location, CGEventTapPlacement place, CGEventTapOptions options, CGEventMask mask, CGEventTapCallback cback, IntPtr data) { var r = CGEventTapCreateForPSN(processSerialNumber, location, place, options, mask, cback, data); if (r == IntPtr.Zero) { return(null); } return(new CFMachPort(r)); }
extern static IntPtr CGEventTapCreateForPSN(IntPtr processSerialNumer, CGEventTapLocation location, CGEventTapPlacement place, CGEventTapOptions options, CGEventMask mask, CGEventTapCallback cback, IntPtr data);
extern static IntPtr CGEventTapCreate(CGEventTapLocation location, CGEventTapPlacement place, CGEventTapOptions options, CGEventMask mask, CGEventTapCallback cback, IntPtr data);
extern static IntPtr CGEventTapCreateForPSN (IntPtr processSerialNumer, CGEventTapLocation location, CGEventTapPlacement place, CGEventTapOptions options, CGEventMask mask, CGEventTapCallback cback, IntPtr data);
extern static IntPtr CGEventTapCreate (CGEventTapLocation location, CGEventTapPlacement place, CGEventTapOptions options, CGEventMask mask, CGEventTapCallback cback, IntPtr data);
public static CFMachPort?CreateTap(CGEventTapLocation location, CGEventTapPlacement place, CGEventTapOptions options, CGEventMask mask, CGEventTapCallback cback, IntPtr data) { var r = CGEventTapCreate(location, place, options, mask, cback, data); if (r == IntPtr.Zero) { return(null); } return(new CFMachPort(r, true)); }