win64

Crates.iowin64
lib.rswin64
version0.0.1
sourcesrc
created_at2024-08-10 17:47:06.395319
updated_at2024-08-10 17:47:06.395319
descriptionAn opinionated modernization of the Win32 windowing library
homepage
repositoryhttps://github.com/GTLugo/win64
max_upload_size
id1332583
size46,513
Gabriel Lugo (GTLugo)

documentation

README

win64

An opinionated modernization of the Win32 windowing library for Rust

use win64::prelude::*;

fn main() {
  Window::new(
    &WindowClass::new(&WindowClassDescriptor::default()),
    &WindowDescriptor::default()
      .with_title("Test")
      .with_size(Some((800, 500))),
    UserData::new(),
  )
  .unwrap();

  MessagePump::wait().run();
}

struct UserData;

impl WindowProcedure for UserData {
  fn on_message(&mut self, window: Window, message: Message) -> ProcedureResult {
    if let win32::WM_DESTROY = message.id() {
      window.quit()
    }

    self.default_window_procedure(window, message)
  }
}
Commit count: 0

cargo fmt