winit/examples
valadaptive f5dcd2aabe
Rework Drag-And-Drop API (#4079)
* Add cursor position drag and drop events.
* Reword drag events to match pointer ones.
* appkit: Use `convertPoint_fromView` for coordinate conversion.
* appkit: use ProtocolObject<dyn NSDraggingInfo>.
* x11: store dnd.position as pair of i16

  It's what translate_coords takes anyway, so the extra precision is
  misleading if we're going to cast it to i16 everywhere it's used.

  We can also simplify the "unpacking" from the XdndPosition message--we
  can and should use the value of 16 as the shift instead of
  size_of::<c_short> * 2 or something like that, because the specification
  gives us the constant 16.
* x11: store translated DnD coords.
* x11: don't emit DragLeave without DragEnter.
* windows: only emit DragEnter if valid.
* windows: in DnD, always set pdwEffect.

  It appears other apps (like Chromium) set pdwEffect on Drop too:
  61a391b86b/ui/base/dragdrop/drop_target_win.cc
* docs: make it clearer that drag events are for dragged *files*.
* examples/dnd: handle RedrawRequested event.

Co-authored-by: amrbashir <amr.bashir2015@gmail.com>
2025-01-28 21:10:40 +01:00
..
data Deprecate window creation with stale event loop 2024-02-21 14:44:29 +04:00
util examples/child_window: use distinct color/position for children 2025-01-10 18:07:17 +03:00
child_window.rs examples/child_window: use distinct color/position for children 2025-01-10 18:07:17 +03:00
control_flow.rs api: convert Window to dyn Window 2024-08-23 23:40:27 +03:00
dnd.rs Rework Drag-And-Drop API (#4079) 2025-01-28 21:10:40 +01:00
pump_events.rs api: convert Window to dyn Window 2024-08-23 23:40:27 +03:00
run_on_demand.rs Rename "inner size" to "surface size" (#3889) 2024-09-04 15:04:48 +02:00
window.rs Rework Drag-And-Drop API (#4079) 2025-01-28 21:10:40 +01:00
x11_embed.rs Rename "inner size" to "surface size" (#3889) 2024-09-04 15:04:48 +02:00