-
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_size (#1186)
- Loading branch information
1 parent
5993de2
commit 276520f
Showing
3 changed files
with
39 additions
and
5 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,7 +1,9 @@ | ||
use std::error::Error; | ||
use winit::dpi::PhysicalSize; | ||
|
||
/// Encapsulates winit window with application-specific logic. | ||
pub trait RuntimeWindow { | ||
fn update_size(&self, v: PhysicalSize<u32>) -> Result<(), Box<dyn Error>>; | ||
fn update_scale_factor(&self, v: f64) -> Result<(), Box<dyn Error>>; | ||
fn redraw(&self) -> Result<(), Box<dyn Error>>; | ||
} |
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