コード例 #1
0
ファイル: CALayer.cs プロジェクト: Anomalous-Software/maccore
		public static CADisplayLink Create (NSAction action)
		{
			var dispatcher = new NSActionDispatcher (action);
			var rv = Create (dispatcher, NSActionDispatcher.Selector);
			rv.dispatcher = dispatcher;
			return rv;
		}
コード例 #2
0
        public void InvokeOnMainThread(NSAction action)
        {
            var d = new NSActionDispatcher(action);

            Messaging.void_objc_msgSend_intptr_intptr_bool(d.Handle, selPerformSelectorOnMainThreadWithObjectWaitUntilDone,
                                                           NSActionDispatcher.Selector.Handle, d.Handle, true);
            GC.KeepAlive(d);
        }
コード例 #3
0
ファイル: NSObject2.cs プロジェクト: Terricide/monomac
        public void InvokeOnMainThread(Action action)
        {
            using (var d = new NSActionDispatcher(action)) {
#if MONOMAC
                Messaging.void_objc_msgSend_intptr_intptr_bool(d.Handle, Selector.PerformSelectorOnMainThreadWithObjectWaitUntilDoneHandle,
                                                               NSActionDispatcher.Selector.Handle, d.Handle, true);
#else
                Messaging.void_objc_msgSend_intptr_intptr_bool(d.Handle, Selector.GetHandle(Selector.PerformSelectorOnMainThreadWithObjectWaitUntilDone),
                                                               Selector.GetHandle(NSActionDispatcher.SelectorName), d.Handle, true);
#endif
            }
        }
コード例 #4
0
ファイル: NSObject.cs プロジェクト: roblillack/monomac
		public void InvokeOnMainThread (NSAction action)
		{
			var d = new NSActionDispatcher (action);
			Messaging.void_objc_msgSend_intptr_intptr_bool (d.Handle, selPerformSelectorOnMainThreadWithObjectWaitUntilDone, 
					NSActionDispatcher.Selector.Handle, d.Handle, true);
			GC.KeepAlive (d);
		}
コード例 #5
0
ファイル: CALayer.cs プロジェクト: Aycira/maccore
 public static CADisplayLink Create(NSAction action)
 {
     var d = new NSActionDispatcher (action);
     return Create (d, NSActionDispatcher.Selector);
 }
コード例 #6
0
 public void InvokeOnMainThread(NSAction action)
 {
     using (var d = new NSActionDispatcher (action)) {
     #if MONOMAC
         Messaging.void_objc_msgSend_intptr_intptr_bool (d.Handle, Selector.PerformSelectorOnMainThreadWithObjectWaitUntilDoneHandle,
                                                         NSActionDispatcher.Selector.Handle, d.Handle, true);
     #else
         Messaging.void_objc_msgSend_intptr_intptr_bool (d.Handle, Selector.GetHandle (Selector.PerformSelectorOnMainThreadWithObjectWaitUntilDone),
                                                         Selector.GetHandle (NSActionDispatcher.SelectorName), d.Handle, true);
     #endif
     }
 }
コード例 #7
0
ファイル: NSObject2.cs プロジェクト: officedrop/maccore
 public void InvokeOnMainThread(NSAction action)
 {
     using (var d = new NSActionDispatcher (action)) {
         Messaging.void_objc_msgSend_intptr_intptr_bool (d.Handle, Selector.PerformSelectorOnMainThreadWithObjectWaitUntilDone,
                                                         NSActionDispatcher.Selector.Handle, d.Handle, true);
     }
 }