all lists on lists.proxmox.com
 help / color / mirror / Atom feed
From: Dominik Csapak <d.csapak@proxmox.com>
To: yew-devel@lists.proxmox.com
Subject: [PATCH yew-widget-toolkit v2 3/4] touch: gesture detector: derive Clone and PartialEq for Events
Date: Thu, 16 Apr 2026 10:47:29 +0200	[thread overview]
Message-ID: <20260416085849.1062721-3-d.csapak@proxmox.com> (raw)
In-Reply-To: <20260416085849.1062721-1-d.csapak@proxmox.com>

Since these are exposed via the callbacks, it's useful to derive at
least these traits.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
---
new in v2

 src/touch/gesture_detector.rs | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/touch/gesture_detector.rs b/src/touch/gesture_detector.rs
index d3b4452..47a0850 100644
--- a/src/touch/gesture_detector.rs
+++ b/src/touch/gesture_detector.rs
@@ -19,6 +19,7 @@ use crate::widget::Container;
 /// An event that can happen from a [`PointerEvent`] or a [`Touch`]
 ///
 /// For convenience, expose the most important values from the underlying events
+#[derive(Clone, PartialEq)]
 pub enum InputEvent {
     PointerEvent(PointerEvent),
     Touch(Touch),
@@ -67,6 +68,7 @@ impl From<Touch> for InputEvent {
 }
 
 /// Like [PointerEvent](web_sys::PointerEvent), but includes the swipe direction
+#[derive(Clone, PartialEq)]
 pub struct GestureSwipeEvent {
     event: InputEvent,
     /// Direction angle (from -180 to +180 degree)
-- 
2.47.3





  parent reply	other threads:[~2026-04-16  8:58 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-16  8:47 [PATCH yew-widget-toolkit v2 1/4] touch: gesture detector: implement pinch zoom gesture Dominik Csapak
2026-04-16  8:47 ` [PATCH yew-widget-toolkit v2 2/4] touch: gesture detector: unify on_drag{_start,_update,_end} callbacks Dominik Csapak
2026-04-16  8:47 ` Dominik Csapak [this message]
2026-04-16  8:47 ` [PATCH yew-widget-toolkit v2 4/4] touch: gesture detector: add missing comment for swipe callback Dominik Csapak

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260416085849.1062721-3-d.csapak@proxmox.com \
    --to=d.csapak@proxmox.com \
    --cc=yew-devel@lists.proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal