Esempio n. 1
0
        public virtual void Unschedule(NSRunLoop aRunLoop, string forMode)
        {
            if (aRunLoop == null)
                throw new ArgumentNullException ("aRunLoop");
            if (forMode == null)
                throw new ArgumentNullException ("forMode");
            var nsforMode = NSString.CreateNative (forMode);

            if (IsDirectBinding) {
                Messaging.void_objc_msgSend_IntPtr_IntPtr (this.Handle, Selector.GetHandle ("unscheduleFromRunLoop:forMode:"), aRunLoop.Handle, nsforMode);
            } else {
                Messaging.void_objc_msgSendSuper_IntPtr_IntPtr (this.SuperHandle, Selector.GetHandle ("unscheduleFromRunLoop:forMode:"), aRunLoop.Handle, nsforMode);
            }
            NSString.ReleaseNative (nsforMode);
        }
Esempio n. 2
0
        public virtual void Unschedule(NSRunLoop aRunLoop, string forMode)
        {
            if (aRunLoop == null)
            {
                throw new ArgumentNullException("aRunLoop");
            }
            if (forMode == null)
            {
                throw new ArgumentNullException("forMode");
            }
            var nsforMode = NSString.CreateNative(forMode);

            if (IsDirectBinding)
            {
                Messaging.void_objc_msgSend_IntPtr_IntPtr(this.Handle, Selector.GetHandle("unscheduleFromRunLoop:forMode:"), aRunLoop.Handle, nsforMode);
            }
            else
            {
                Messaging.void_objc_msgSendSuper_IntPtr_IntPtr(this.SuperHandle, Selector.GetHandle("unscheduleFromRunLoop:forMode:"), aRunLoop.Handle, nsforMode);
            }
            NSString.ReleaseNative(nsforMode);
        }
Esempio n. 3
0
 public void ScheduleWithRunLoop(NSRunLoop runLoop)
 {
     ScheduleWithRunLoop (runLoop.GetCFRunLoop (), CFRunLoop.ModeDefault);
 }
Esempio n. 4
0
 public void ScheduleWithRunLoop(NSRunLoop runLoop, NSString runLoopMode)
 {
     ScheduleWithRunLoop (runLoop.GetCFRunLoop (), runLoopMode);
 }
Esempio n. 5
0
 public void AddToRunLoop(NSRunLoop runloop, NSRunLoopMode mode)
 {
     AddToRunLoop (runloop, NSRunLoop.FromEnum (mode));
 }
Esempio n. 6
0
        //
        // Dispatch timers not supported
        //
        // CMTimebaseAddTimerDispatchSource
        // CMTimebaseRemoveTimerDispatchSource
        // CMTimebaseSetTimerDispatchSourceNextFireTime
        // CMTimebaseSetTimerDispatchSourceToFireImmediately

        #endregion Other

        #if !COREBUILD

        public CMTimebaseError AddTimer(NSTimer timer, NSRunLoop runloop)
        {
            if (timer == null)
                throw new ArgumentNullException ("timer");
            if (runloop == null)
                throw new ArgumentNullException ("runloop");

            // NSRunloop and CFRunloop[Ref] are NOT toll free bridged types
            using (var cf = runloop.GetCFRunLoop ())
                return CMTimebaseAddTimer (Handle, timer.Handle, cf.Handle);
        }