-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implements RuntimeWindow::update_cursor (#1191)
- Loading branch information
1 parent
d81f3dd
commit 99ed881
Showing
3 changed files
with
30 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,12 @@ | ||
use std::error::Error; | ||
use winit::dpi::PhysicalSize; | ||
use winit::dpi::{PhysicalPosition, PhysicalSize}; | ||
|
||
/// Encapsulates winit window with window-specific logic. | ||
/// | ||
/// The event loop will exit immediately if any method return an error. | ||
pub trait RuntimeWindow { | ||
fn update_size(&self, v: PhysicalSize<u32>) -> Result<(), Box<dyn Error + Send + Sync>>; | ||
fn update_cursor(&self, v: PhysicalPosition<f64>) -> Result<(), Box<dyn Error + Send + Sync>>; | ||
fn update_scale_factor(&self, v: f64) -> Result<(), Box<dyn Error + Send + Sync>>; | ||
fn redraw(&self) -> Result<(), Box<dyn Error + Send + Sync>>; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters