Пример #1
0
            private NSDragOperation SendRawDragEvent(NSDraggingInfo sender, RawDragEventType type)
            {
                Action <RawInputEventArgs> input      = _tl.Input;
                IDragDropDevice            dragDevice = _tl._dragDevice;
                IInputRoot root = _tl?.InputRoot;

                if (root == null || dragDevice == null || input == null)
                {
                    return(NSDragOperation.None);
                }

                var          dragOp = DraggingInfo.ConvertDragOperation(sender.DraggingSourceOperationMask);
                DraggingInfo info   = new DraggingInfo(sender);
                var          pt     = TranslateLocalPoint(info.Location);
                var          args   = new RawDragEvent(dragDevice, type, root, pt, info, dragOp);

                input(args);
                return(DraggingInfo.ConvertDragOperation(args.Effects));
            }
Пример #2
0
 public override void DraggedImageEndedAtOperation(NSImage image, CGPoint screenPoint, NSDragOperation operation)
 {
     _result.OnNext(DraggingInfo.ConvertDragOperation(operation));
     _result.OnCompleted();
 }
Пример #3
0
 public override NSDragOperation DraggingSourceOperationMaskForLocal(bool flag)
 {
     return(DraggingInfo.ConvertDragOperation(_allowedEffects));
 }