Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Module MyHWND
- static WINDOW : Option<MyHWND> = None;
- fn get_window() -> MyHWND {
- match WINDOW {
- None => panic!("This should never happen")
- Some(foo) => foo
- }
- }
- struct MyHWND {
- handle: HWND;
- }
- impl Send for MyHWND;
- impl Sync for MyHWND;
- impl Debug for MyHWND {
- }
- impl MyHWND {
- fn get(&self) -> HWND {
- handle
- }
- }
- // Module Main
- let foo: MyHWND = winapi::getWindowHandle()
Add Comment
Please, Sign In to add comment