remove FileDropEvent
we have no implementations for it, so it's just dead code for now.
This commit is contained in:
parent
ce708a8515
commit
4d9c6c3131
|
@ -15,8 +15,7 @@ impl WindowHandler for MyProgram {
|
||||||
match event {
|
match event {
|
||||||
Event::Mouse(e) => println!("Mouse event: {:?}", e),
|
Event::Mouse(e) => println!("Mouse event: {:?}", e),
|
||||||
Event::Keyboard(e) => println!("Keyboard event: {:?}", e),
|
Event::Keyboard(e) => println!("Keyboard event: {:?}", e),
|
||||||
Event::Window(e) => println!("Window event: {:?}", e),
|
Event::Window(e) => println!("Window event: {:?}", e)
|
||||||
Event::FileDrop(e) => println!("File drop event: {:?}", e),
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
17
src/event.rs
17
src/event.rs
|
@ -1,5 +1,3 @@
|
||||||
use std::path::PathBuf;
|
|
||||||
|
|
||||||
#[derive(Debug, Clone, Copy, PartialEq)]
|
#[derive(Debug, Clone, Copy, PartialEq)]
|
||||||
pub enum KeyboardEvent {
|
pub enum KeyboardEvent {
|
||||||
KeyPressed(u32),
|
KeyPressed(u32),
|
||||||
|
@ -89,22 +87,9 @@ pub enum WindowEvent {
|
||||||
WillClose,
|
WillClose,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(PartialEq, Clone, Debug)]
|
|
||||||
pub enum FileDropEvent {
|
|
||||||
/// A file is being hovered over the window.
|
|
||||||
FileHovered(PathBuf),
|
|
||||||
|
|
||||||
/// A file has beend dropped into the window.
|
|
||||||
FileDropped(PathBuf),
|
|
||||||
|
|
||||||
/// A file was hovered, but has exited the window.
|
|
||||||
FilesHoveredLeft,
|
|
||||||
}
|
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
pub enum Event {
|
pub enum Event {
|
||||||
Mouse(MouseEvent),
|
Mouse(MouseEvent),
|
||||||
Keyboard(KeyboardEvent),
|
Keyboard(KeyboardEvent),
|
||||||
Window(WindowEvent),
|
Window(WindowEvent)
|
||||||
FileDrop(FileDropEvent),
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,7 +11,7 @@ use cocoa::foundation::{NSAutoreleasePool, NSPoint, NSRect, NSSize, NSString};
|
||||||
use raw_window_handle::{macos::MacOSHandle, HasRawWindowHandle, RawWindowHandle};
|
use raw_window_handle::{macos::MacOSHandle, HasRawWindowHandle, RawWindowHandle};
|
||||||
|
|
||||||
use crate::{
|
use crate::{
|
||||||
Event, FileDropEvent, KeyboardEvent, MouseButton, MouseEvent, ScrollDelta, WindowEvent,
|
Event, KeyboardEvent, MouseButton, MouseEvent, ScrollDelta, WindowEvent,
|
||||||
WindowHandler, WindowOpenOptions,
|
WindowHandler, WindowOpenOptions,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -19,7 +19,7 @@ use std::rc::Rc;
|
||||||
use raw_window_handle::{windows::WindowsHandle, HasRawWindowHandle, RawWindowHandle};
|
use raw_window_handle::{windows::WindowsHandle, HasRawWindowHandle, RawWindowHandle};
|
||||||
|
|
||||||
use crate::{
|
use crate::{
|
||||||
Event, FileDropEvent, KeyboardEvent, MouseButton, MouseEvent, Parent::WithParent, ScrollDelta,
|
Event, KeyboardEvent, MouseButton, MouseEvent, Parent::WithParent, ScrollDelta,
|
||||||
WindowEvent, WindowHandler, WindowInfo, WindowOpenOptions,
|
WindowEvent, WindowHandler, WindowInfo, WindowOpenOptions,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,7 @@ use raw_window_handle::{unix::XlibHandle, HasRawWindowHandle, RawWindowHandle};
|
||||||
|
|
||||||
use super::XcbConnection;
|
use super::XcbConnection;
|
||||||
use crate::{
|
use crate::{
|
||||||
Event, FileDropEvent, KeyboardEvent, MouseButton, MouseEvent, Parent, ScrollDelta, WindowEvent,
|
Event, KeyboardEvent, MouseButton, MouseEvent, Parent, ScrollDelta, WindowEvent,
|
||||||
WindowHandler, WindowOpenOptions,
|
WindowHandler, WindowOpenOptions,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue