mirror of
https://github.com/DioxusLabs/dioxus
synced 2024-11-26 22:20:19 +00:00
expose all serialized events as public
This commit is contained in:
parent
b4ebf34595
commit
f7dff22552
15 changed files with 30 additions and 15 deletions
|
@ -49,8 +49,9 @@ impl PartialEq for AnimationData {
|
|||
}
|
||||
|
||||
#[cfg(feature = "serialize")]
|
||||
/// A serialized version of AnimationData
|
||||
#[derive(serde::Serialize, serde::Deserialize)]
|
||||
struct SerializedAnimationData {
|
||||
pub struct SerializedAnimationData {
|
||||
animation_name: String,
|
||||
pseudo_element: String,
|
||||
elapsed_time: f32,
|
||||
|
|
|
@ -37,8 +37,9 @@ impl ClipboardData {
|
|||
}
|
||||
|
||||
#[cfg(feature = "serialize")]
|
||||
/// A serialized version of ClipboardData
|
||||
#[derive(serde::Serialize, serde::Deserialize)]
|
||||
struct SerializedClipboardData {}
|
||||
pub struct SerializedClipboardData {}
|
||||
|
||||
#[cfg(feature = "serialize")]
|
||||
impl From<&ClipboardData> for SerializedClipboardData {
|
||||
|
|
|
@ -37,8 +37,9 @@ impl CompositionData {
|
|||
}
|
||||
|
||||
#[cfg(feature = "serialize")]
|
||||
/// A serialized version of CompositionData
|
||||
#[derive(serde::Serialize, serde::Deserialize)]
|
||||
struct SerializedCompositionData {
|
||||
pub struct SerializedCompositionData {
|
||||
data: String,
|
||||
}
|
||||
|
||||
|
|
|
@ -98,8 +98,9 @@ impl DragData {
|
|||
}
|
||||
|
||||
#[cfg(feature = "serialize")]
|
||||
/// A serialized version of DragData
|
||||
#[derive(serde::Serialize, serde::Deserialize)]
|
||||
struct SerializedDragData {
|
||||
pub struct SerializedDragData {
|
||||
mouse: crate::point_interaction::SerializedPointInteraction,
|
||||
}
|
||||
|
||||
|
|
|
@ -32,8 +32,9 @@ impl FocusData {
|
|||
}
|
||||
|
||||
#[cfg(feature = "serialize")]
|
||||
/// A serialized version of FocusData
|
||||
#[derive(serde::Serialize, serde::Deserialize)]
|
||||
struct SerializedFocusData {}
|
||||
pub struct SerializedFocusData {}
|
||||
|
||||
#[cfg(feature = "serialize")]
|
||||
impl From<&FocusData> for SerializedFocusData {
|
||||
|
|
|
@ -42,8 +42,9 @@ impl ImageData {
|
|||
}
|
||||
|
||||
#[cfg(feature = "serialize")]
|
||||
/// A serialized version of ImageData
|
||||
#[derive(serde::Serialize, serde::Deserialize)]
|
||||
struct SerializedImageData {
|
||||
pub struct SerializedImageData {
|
||||
load_error: bool,
|
||||
}
|
||||
|
||||
|
|
|
@ -79,8 +79,9 @@ impl KeyboardData {
|
|||
}
|
||||
|
||||
#[cfg(feature = "serialize")]
|
||||
/// A serialized version of KeyboardData
|
||||
#[derive(serde::Serialize, serde::Deserialize)]
|
||||
struct SerializedKeyboardData {
|
||||
pub struct SerializedKeyboardData {
|
||||
auto_repeating: bool,
|
||||
#[serde(deserialize_with = "resilient_deserialize_code")]
|
||||
code: Code,
|
||||
|
|
|
@ -31,8 +31,9 @@ impl MediaData {
|
|||
}
|
||||
|
||||
#[cfg(feature = "serialize")]
|
||||
/// A serialized version of MediaData
|
||||
#[derive(serde::Serialize, serde::Deserialize)]
|
||||
struct SerializedMediaData {}
|
||||
pub struct SerializedMediaData {}
|
||||
|
||||
#[cfg(feature = "serialize")]
|
||||
impl From<&MediaData> for SerializedMediaData {
|
||||
|
|
|
@ -208,8 +208,9 @@ impl PointInteraction for PointerData {
|
|||
}
|
||||
|
||||
#[cfg(feature = "serialize")]
|
||||
/// A serialized version of PointerData
|
||||
#[derive(serde::Serialize, serde::Deserialize)]
|
||||
struct SerializedPointerData {
|
||||
pub struct SerializedPointerData {
|
||||
/// Common data for all pointer/mouse events
|
||||
#[serde(flatten)]
|
||||
point_data: crate::point_interaction::SerializedPointInteraction,
|
||||
|
|
|
@ -32,8 +32,9 @@ impl PartialEq for ScrollData {
|
|||
}
|
||||
|
||||
#[cfg(feature = "serialize")]
|
||||
/// A serialized version of ScrollData
|
||||
#[derive(serde::Serialize, serde::Deserialize)]
|
||||
struct SerializedScrollData {}
|
||||
pub struct SerializedScrollData {}
|
||||
|
||||
#[cfg(feature = "serialize")]
|
||||
impl From<&ScrollData> for SerializedScrollData {
|
||||
|
|
|
@ -32,8 +32,9 @@ impl PartialEq for SelectionData {
|
|||
}
|
||||
|
||||
#[cfg(feature = "serialize")]
|
||||
/// A serialized version of SelectionData
|
||||
#[derive(serde::Serialize, serde::Deserialize)]
|
||||
struct SerializedSelectionData {}
|
||||
pub struct SerializedSelectionData {}
|
||||
|
||||
#[cfg(feature = "serialize")]
|
||||
impl From<&SelectionData> for SerializedSelectionData {
|
||||
|
|
|
@ -32,8 +32,9 @@ impl ToggleData {
|
|||
}
|
||||
|
||||
#[cfg(feature = "serialize")]
|
||||
/// A serialized version of ToggleData
|
||||
#[derive(serde::Serialize, serde::Deserialize)]
|
||||
struct SerializedToggleData {}
|
||||
pub struct SerializedToggleData {}
|
||||
|
||||
#[cfg(feature = "serialize")]
|
||||
impl From<&ToggleData> for SerializedToggleData {
|
||||
|
|
|
@ -59,8 +59,9 @@ impl TouchData {
|
|||
}
|
||||
|
||||
#[cfg(feature = "serialize")]
|
||||
/// A serialized version of TouchData
|
||||
#[derive(serde::Serialize, serde::Deserialize)]
|
||||
struct SerializedTouchData {
|
||||
pub struct SerializedTouchData {
|
||||
alt_key: bool,
|
||||
ctrl_key: bool,
|
||||
meta_key: bool,
|
||||
|
|
|
@ -38,8 +38,9 @@ impl TransitionData {
|
|||
}
|
||||
|
||||
#[cfg(feature = "serialize")]
|
||||
/// A serialized version of TransitionData
|
||||
#[derive(serde::Serialize, serde::Deserialize)]
|
||||
struct SerializedTransitionData {
|
||||
pub struct SerializedTransitionData {
|
||||
property_name: String,
|
||||
pseudo_element: String,
|
||||
elapsed_time: f32,
|
||||
|
|
|
@ -43,8 +43,9 @@ impl WheelData {
|
|||
}
|
||||
|
||||
#[cfg(feature = "serialize")]
|
||||
/// A serialized version of WheelData
|
||||
#[derive(serde::Serialize, serde::Deserialize)]
|
||||
struct SerializedWheelData {
|
||||
pub struct SerializedWheelData {
|
||||
delta: WheelDelta,
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue