Пример #1
0
 public VnodeMonitor(int fileDescriptor, VnodeMonitorKind vnodeKind, DispatchQueue queue = null)
 {
     if (type_vnode == IntPtr.Zero)
         type_vnode = Dlfcn.dlsym (Libraries.System.Handle, "_dispatch_source_type_vnode");
     this.queue = queue;
     fd = -1;
     handle = dispatch_source_create (type_vnode,
                      handle: (IntPtr) fileDescriptor,
                      mask:   (IntPtr) vnodeKind,
                      queue:  queue == null ? IntPtr.Zero : queue.Handle);
 }
Пример #2
0
            public VnodeMonitor(string path, VnodeMonitorKind vnodeKind, DispatchQueue queue = null)
            {
                if (path == null)
                    throw new ArgumentNullException ("path");

                fd = open (path, O_EVTONLY);
                if (fd == -1)
                    throw new IOException ("Failure to open the file", Marshal.GetLastWin32Error ());
                if (type_vnode == IntPtr.Zero)
                    type_vnode = Dlfcn.dlsym (Libraries.System.Handle, "_dispatch_source_type_vnode");
                this.queue = queue;

                handle = dispatch_source_create (type_vnode,
                                 handle: (IntPtr) fd,
                                 mask:   (IntPtr) vnodeKind,
                                 queue:  queue == null ? IntPtr.Zero : queue.Handle);
            }
Пример #3
0
 public static SKAction RunBlock(Action block, DispatchQueue queue)
 {
     return Run (block, queue);
 }
Пример #4
0
 public void BeginLoadCubeMap(NSUrl [] urls, GLKTextureOperations textureOperations, DispatchQueue queue, GLKTextureLoaderCallback onComplete)
 {
     using (var array = NSArray.FromNSObjects (urls))
         BeginLoadCubeMap (array, textureOperations == null ? null : textureOperations.Dictionary, queue, onComplete);
 }
Пример #5
0
 public DispatchQueueSynchronizationContext(DispatchQueue dispatchQueue)
 {
     if (dispatchQueue == null)
         throw new ArgumentNullException ("dispatchQueue");
     this.queue = dispatchQueue;
 }
Пример #6
0
        public void SetDispatchQueue(DispatchQueue queue)
        {
            IntPtr q = queue == null ? IntPtr.Zero : queue.Handle;

            Check ();
            CFMessagePortSetDispatchQueue (handle, q);
        }
Пример #7
0
 public MachSend(int machPort, bool sendDead = false, DispatchQueue queue = null)
 {
     if (type_mach_send == IntPtr.Zero)
         type_mach_send = Dlfcn.dlsym (Libraries.System.Handle, "_dispatch_source_type_mach_send");
     this.queue = queue;
     handle = dispatch_source_create (type_mach_send,
                      handle: (IntPtr) machPort,
                      mask:   (IntPtr) (sendDead ? 1 : 0),
                      queue:  queue == null ? IntPtr.Zero : queue.Handle);
 }
Пример #8
0
		public void Notify (DispatchQueue queue, NSAction action)
		{
			if (queue == null)
				throw new ArgumentNullException ("queue");
			if (action == null)
				throw new ArgumentNullException ("action");

			Check ();
			dispatch_group_notify_f (handle, queue.handle, (IntPtr) GCHandle.Alloc (Tuple.Create (action, queue)), DispatchQueue.static_dispatch);
		}
Пример #9
0
 public DataOr(DispatchQueue queue = null)
 {
     if (type_data_or == IntPtr.Zero)
         type_data_or = Dlfcn.dlsym (Libraries.System.Handle, "_dispatch_source_type_data_or");
     this.queue = queue;
     handle = dispatch_source_create (type_data_or,
                      handle: IntPtr.Zero,
                      mask:   IntPtr.Zero,
                      queue:  queue == null ? IntPtr.Zero : queue.Handle);
 }
Пример #10
0
 public MachReceive(int machPort, DispatchQueue queue = null)
 {
     if (type_mach_recv == IntPtr.Zero)
         type_mach_recv = Dlfcn.dlsym (Libraries.System.Handle, "_dispatch_source_type_mach_recv");
     this.queue = queue;
     handle = dispatch_source_create (type_mach_recv,
                      handle: (IntPtr) machPort,
                      mask:   IntPtr.Zero,
                      queue:  queue == null ? IntPtr.Zero : queue.Handle);
 }
Пример #11
0
 public void BeginTextureLoad(CGImage image, GLKTextureOperations textureOperations, DispatchQueue queue, GLKTextureLoaderCallback onComplete)
 {
     BeginTextureLoad (image, textureOperations == null ? null : textureOperations.Dictionary, queue, onComplete);
 }
Пример #12
0
 public void BeginTextureLoad(NSUrl filePath, GLKTextureOperations textureOperations, DispatchQueue queue, GLKTextureLoaderCallback onComplete)
 {
     BeginTextureLoad (filePath, textureOperations == null ? null : textureOperations.Dictionary, queue, onComplete);
 }
Пример #13
0
 public void BeginLoadCubeMap(string fileName, GLKTextureOperations textureOperations, DispatchQueue queue, GLKTextureLoaderCallback onComplete)
 {
     BeginLoadCubeMap (fileName, textureOperations == null ? null : textureOperations.Dictionary, queue, onComplete);
 }
Пример #14
0
 public WriteMonitor(int fileDescriptor, DispatchQueue queue = null)
 {
     if (type_write == IntPtr.Zero)
         type_write = Dlfcn.dlsym (Libraries.System.Handle, "_dispatch_source_type_write");
     this.queue = queue;
     handle = dispatch_source_create (type_write,
                      handle: (IntPtr) fileDescriptor,
                      mask: IntPtr.Zero,
                      queue: queue == null ? IntPtr.Zero : queue.Handle);
 }
Пример #15
0
 public MemoryPressure(MemoryPressureFlags monitorFlags = MemoryPressureFlags.Normal | MemoryPressureFlags.Warn, DispatchQueue queue = null)
 {
     if (type_memorypressure == IntPtr.Zero)
         type_memorypressure = Dlfcn.dlsym (Libraries.System.Handle, "_dispatch_source_type_memorypressure");
     this.queue = queue;
     handle = dispatch_source_create (type_memorypressure,
                      handle: IntPtr.Zero,
                      mask:   (IntPtr) monitorFlags,
                      queue:  queue == null ? IntPtr.Zero : queue.Handle);
 }
Пример #16
0
		public void SetTargetQueue (DispatchQueue queue)
		{
			// note: null is allowed because DISPATCH_TARGET_QUEUE_DEFAULT is defined as NULL (dispatch/queue.h)
			IntPtr q = queue == null ? IntPtr.Zero : queue.Handle;
			dispatch_set_target_queue (handle, q);
		}
Пример #17
0
 public ProcessMonitor(int processId, ProcessMonitorFlags monitorKind = ProcessMonitorFlags.Exit, DispatchQueue queue = null)
 {
     if (type_proc == IntPtr.Zero)
         type_proc = Dlfcn.dlsym (Libraries.System.Handle, "_dispatch_source_type_proc");
     this.queue = queue;
     handle = dispatch_source_create (type_proc,
                      handle: (IntPtr) processId,
                      mask:   (IntPtr) monitorKind,
                      queue:  queue == null ? IntPtr.Zero : queue.Handle);
 }
Пример #18
0
		extern static void dispatch_group_notify_f (IntPtr group, IntPtr queue, IntPtr context, DispatchQueue.dispatch_callback_t block);
Пример #19
0
 public SignalMonitor(int signalNumber, DispatchQueue queue = null)
 {
     if (type_signal == IntPtr.Zero)
         type_signal = Dlfcn.dlsym (Libraries.System.Handle, "_dispatch_source_type_signal");
     this.queue = queue;
     handle = dispatch_source_create (type_signal,
                      handle: (IntPtr) signalNumber,
                      mask:   IntPtr.Zero,
                      queue:  queue == null ? IntPtr.Zero : queue.Handle);
 }
Пример #20
0
 public void SetSampleBufferDelegateAndQueue(AVCaptureVideoDataOutputSampleBufferDelegate sampleBufferDelegate, DispatchQueue queue)
 {
     SetSampleBufferDelegate (sampleBufferDelegate, queue);
 }
Пример #21
0
 public Timer(DispatchQueue queue = null)
     : this(false, queue)
 {
 }
Пример #22
0
		public bool SetDispatchQueue (DispatchQueue queue)
		{
			return SCNetworkReachabilitySetDispatchQueue (handle, queue == null ? IntPtr.Zero : queue.Handle);
		}
Пример #23
0
 public Timer(bool strict = false, DispatchQueue queue = null)
 {
     if (type_timer == IntPtr.Zero)
         type_timer = Dlfcn.dlsym (Libraries.System.Handle, "_dispatch_source_type_timer");
     this.queue = queue;
     handle = dispatch_source_create (type_timer,
                      handle: IntPtr.Zero,
                      mask: strict ? (IntPtr) 1 : IntPtr.Zero,
                      queue: queue == null ? IntPtr.Zero : queue.Handle);
 }
Пример #24
0
 public CBCentralManager(DispatchQueue dispatchQueue)
     : this(new _CBCentralManagerDelegate (), dispatchQueue)
 {
 }
Пример #25
0
 public void BeginLoadCubeMap(string [] files, GLKTextureOperations textureOperations, DispatchQueue queue, GLKTextureLoaderCallback onComplete)
 {
     using (var array = NSArray.FromStrings (files))
         BeginLoadCubeMap (array, textureOperations == null ? null : textureOperations.Dictionary, queue, onComplete);
 }