[−][src]Struct cat_engine::WindowBase
Основа для окон для создания более сложных окон. A window base for creating more complex windows.
Fields
display: Display
A window with a GL context.
graphics2d: Graphics2D
A graphics base for 2D rendering.
event_loop: EventLoop<InnerWindowEvent>
An event loop.
event_loop_proxy: EventLoopProxy<InnerWindowEvent>
Used to send custom events to the event loop.
update_interval: Duration
feature != "lazy"
next_update: Instant
feature != "lazy"
frames_passed: u32
feature = "fps_counter"
time: Instant
feature = "fps_counter"
Implementations
impl WindowBase
[src]
pub fn raw(
window_builder: WindowBuilder,
context_builder: ContextBuilder<'_, NotCurrent>,
graphics_settings: GraphicsSettings,
event_loop: EventLoop<InnerWindowEvent>,
general_settings: GeneralSettings
) -> Result<WindowBase, DisplayCreationError>
[src]
window_builder: WindowBuilder,
context_builder: ContextBuilder<'_, NotCurrent>,
graphics_settings: GraphicsSettings,
event_loop: EventLoop<InnerWindowEvent>,
general_settings: GeneralSettings
) -> Result<WindowBase, DisplayCreationError>
pub fn request_event_loop_close(
&self
) -> Result<(), EventLoopClosed<InnerWindowEvent>>
[src]
&self
) -> Result<(), EventLoopClosed<InnerWindowEvent>>
Останавливает цикл событий, отправляя событие для остановки.
Возвращает Err
, если цикл уже остановлен.
Stops the event loop by sending the stopping event.
Returns Err
if the loop has been already stopped.
impl WindowBase
[src]
Функции для рисования. Drawing functions.
pub fn draw<F: FnOnce(&mut DrawParameters<'_>, &mut Graphics<'_, '_>)>(
&mut self,
f: F
) -> Result<(), SwapBuffersError>
[src]
&mut self,
f: F
) -> Result<(), SwapBuffersError>
Выполняет замыкание.
Executes the closure.
impl WindowBase
[src]
pub fn screenshot(&self) -> Option<DynamicImage>
[src]
Возвращает скриншот.
Returns a screenshot.
pub fn save_screenshot<P: AsRef<Path>>(&self, path: P)
[src]
Сохраняет скриншот в формате png.
Saves a screenshot in png format.
Auto Trait Implementations
impl !RefUnwindSafe for WindowBase
impl !Send for WindowBase
impl !Sync for WindowBase
impl Unpin for WindowBase
impl !UnwindSafe for WindowBase
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,
pub 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, 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.
pub 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>,