[−][src]Struct cat_engine::DefaultWindow
Окно, включает в себя графические функции и обработчик событий. A window with graphic functions and an event listener included.
Все события обрабатываются и добавляются в очередь внешней обработки (DefaultWindow.events) для работы с ними вне структуры окна.
All events are handled and added to the outer handling queue (DefaultWindow.events) to work with them outside of the window structure.
Implementations
impl DefaultWindow
[src]
pub fn new<F>(setting: F) -> Result<DefaultWindow, DisplayCreationError> where
F: FnOnce(Vec<MonitorHandle>, &mut WindowSettings),
[src]
F: FnOnce(Vec<MonitorHandle>, &mut WindowSettings),
Создаёт окно.
Creates the window.
pub fn next_event(&mut self) -> Option<WindowEvent>
[src]
Возвращает следующее событие окна.
Блокирует поток, пока не получит следующее событие.
Returns next window event.
Blocks the thread until it receives the next event.
pub fn into_paged_window(self) -> PagedWindow
[src]
Converts into PagedWindow
.
Saves the 'auto_hide' feature state (the window hidden or not).
pub fn into_dynamic_window<'a>(self) -> DynamicWindow<'a>
[src]
Converts into DynamicWindow
.
Ignores the 'auto_hide' feature state (the window hidden or not).
Trait Implementations
impl Window for DefaultWindow
[src]
type UserEvent = InnerWindowEvent
fn window_base(&self) -> &WindowBase<Self::UserEvent>
[src]
fn window_base_mut(&mut self) -> &mut WindowBase<Self::UserEvent>
[src]
fn raw(
window_builder: WindowBuilder,
context_builder: ContextBuilder<NotCurrent>,
graphics_settings: GraphicsSettings,
event_loop: EventLoop<Self::UserEvent>,
initial_colour: Option<Colour>,
mouse_cursor_icon_settings: MouseCursorIconSettings<PathBuf>
) -> Result<DefaultWindow, DisplayCreationError>
[src]
window_builder: WindowBuilder,
context_builder: ContextBuilder<NotCurrent>,
graphics_settings: GraphicsSettings,
event_loop: EventLoop<Self::UserEvent>,
initial_colour: Option<Colour>,
mouse_cursor_icon_settings: MouseCursorIconSettings<PathBuf>
) -> Result<DefaultWindow, DisplayCreationError>
fn new<F>(setting: F) -> Result<Self, DisplayCreationError> where
F: FnOnce(Vec<MonitorHandle>, &mut WindowSettings),
[src]
F: FnOnce(Vec<MonitorHandle>, &mut WindowSettings),
fn display(&self) -> &Display
[src]
fn graphics(&mut self) -> &mut Graphics2D
[src]
fn draw_raw<F: FnOnce(&mut DrawParameters, &mut Frame)>(
&self,
f: F
) -> Result<(), SwapBuffersError>
[src]
&self,
f: F
) -> Result<(), SwapBuffersError>
fn draw<F: FnOnce(&mut DrawParameters, &mut Graphics)>(
&self,
f: F
) -> Result<(), SwapBuffersError>
[src]
&self,
f: F
) -> Result<(), SwapBuffersError>
fn set_alpha(&mut self, alpha: f32)
[src]
fn set_smooth(&mut self, smooth: f32)
[src]
fn set_new_smooth(&mut self, smooth: f32)
[src]
fn draw_smooth<F: FnOnce(f32, &mut DrawParameters, &mut Graphics)>(
&mut self,
f: F
) -> Result<f32, SwapBuffersError>
[src]
&mut self,
f: F
) -> Result<f32, SwapBuffersError>
fn screenshot(&self) -> Option<DynamicImage>
[src]
fn save_screenshot<P: AsRef<Path>>(&self, path: P)
[src]
fn set_user_cursor_visible(&mut self, visible: bool)
[src]
Auto Trait Implementations
impl !RefUnwindSafe for DefaultWindow
impl !Send for DefaultWindow
impl !Sync for DefaultWindow
impl Unpin for DefaultWindow
impl !UnwindSafe for DefaultWindow
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> SetParameter for T
fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Result where
T: Parameter<Self>,
T: Parameter<Self>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,