public RawDragEvent(IDragDropDevice inputDevice, RawDragEventType type, IInputRoot root, Point location, IDataObject data, DragDropEffects effects, RawInputModifiers modifiers) : base(inputDevice, 0, root) { Type = type; Location = location; Data = data; Effects = effects; Modifiers = (InputModifiers)modifiers; }
public RawDragEvent(IDragDropDevice inputDevice, RawDragEventType type, IInputElement inputRoot, Point location, IDataObject data, DragDropEffects effects) : base(inputDevice, 0) { Type = type; InputRoot = inputRoot; Location = location; Data = data; Effects = effects; }
public RawDragEvent(IDragDropDevice inputDevice, RawDragEventType type, IInputRoot root, Point location, IDataObject data, DragDropEffects effects, RawInputModifiers modifiers) : base(inputDevice, 0, root) { Type = type; Location = location; Data = data; Effects = effects; KeyModifiers = modifiers.ToKeyModifiers(); #pragma warning disable CS0618 // Type or member is obsolete Modifiers = (InputModifiers)modifiers; #pragma warning restore CS0618 // Type or member is obsolete }
private DragDropEffects RaiseEventAndUpdateCursor(RawDragEventType type, IInputRoot root, Point pt, RawInputModifiers modifiers) { _lastPosition = pt; RawDragEvent rawEvent = new RawDragEvent(_dragDrop, type, root, pt, _draggedData, _allowedEffects, modifiers); var tl = root.GetSelfAndVisualAncestors().OfType <TopLevel>().FirstOrDefault(); tl.PlatformImpl?.Input(rawEvent); var effect = GetPreferredEffect(rawEvent.Effects & _allowedEffects, modifiers); UpdateCursor(root, effect); return(effect); }
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)); }