pub struct Window;Expand description
Zero-sized type that hosts window lifecycle functions.
All methods are static (no self receiver) and generate FFI wrappers
via the #[goud_api] proc-macro.
Implementations§
Source§impl Window
impl Window
Sourcepub fn create(_width: u32, _height: u32, _title: &str) -> GoudContextId
pub fn create(_width: u32, _height: u32, _title: &str) -> GoudContextId
Creates a new context with an empty ECS World.
Platform and rendering state are managed separately (e.g., via the
FFI WindowState in ffi/window.rs). The context only owns a World
for ECS storage.
Returns a context ID on success, or GOUD_INVALID_CONTEXT_ID on
failure.
Sourcepub fn destroy(context_id: GoudContextId) -> bool
pub fn destroy(context_id: GoudContextId) -> bool
Destroys a windowed context and releases all resources.
This destroys the window, OpenGL context, and ECS world.
Returns true on success, false on error.
Auto Trait Implementations§
impl Freeze for Window
impl RefUnwindSafe for Window
impl Send for Window
impl Sync for Window
impl Unpin for Window
impl UnsafeUnpin for Window
impl UnwindSafe for Window
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<S> FromSample<S> for S
impl<S> FromSample<S> for S
fn from_sample_(s: S) -> S
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more