Skip to content

Commit 0658352

Browse files
committed
docs
1 parent 723705e commit 0658352

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

src/handler.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,15 @@ use super::*;
22
use crate::platform::Result;
33

44
pub trait WindowHandler: 'static {
5+
/// Requests the handler to draw a new frame.
6+
///
7+
/// If this returns an error, the window will be considered unable to render its contents, and
8+
/// will be subsequently closed.
59
fn on_frame(&self) -> core::result::Result<(), HandlerError>;
10+
/// Informs the handler that the window has been resized.
11+
///
12+
/// If this returns an error, the resize operation will be reverted in order to keep the current
13+
/// size.
614
fn resized(&self, new_size: WindowSize) -> core::result::Result<(), HandlerError>;
715
fn on_event(&self, event: Event) -> EventStatus;
816
}

0 commit comments

Comments
 (0)