Fix format and setup platform specific dependencies
This commit is contained in:
parent
e7c8a9780d
commit
5d429fd5ae
|
@ -1,13 +1,12 @@
|
||||||
[package]
|
[package]
|
||||||
name = "baseview"
|
name = "baseview"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
authors = ["William Light <git@wrl.lhiaudio.com>"]
|
authors = ["William Light <git@wrl.lhiaudio.com>", "Mirko Covizzi <mrkcvzz@gmail.com>"]
|
||||||
edition = "2018"
|
edition = "2018"
|
||||||
|
|
||||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
winapi = { version = "0.3.8", features = ["libloaderapi", "winuser", "windef", "minwindef"] }
|
|
||||||
|
|
||||||
[[example]]
|
[target.'cfg(windows)'.dependencies]
|
||||||
name = "windows_demo"
|
winapi = { version = "0.3.8", features = ["libloaderapi", "winuser", "windef", "minwindef"] }
|
||||||
|
|
|
@ -1,21 +1,21 @@
|
||||||
use std::ptr::null_mut;
|
use std::ptr::null_mut;
|
||||||
|
|
||||||
use baseview::{WindowOpenOptions, create_window, handle_msg};
|
use baseview::Parent;
|
||||||
use baseview::Parent;
|
use baseview::{create_window, handle_msg, WindowOpenOptions};
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
let window = WindowOpenOptions {
|
let window = WindowOpenOptions {
|
||||||
title: "Baseview",
|
title: "Baseview",
|
||||||
width: 800,
|
width: 800,
|
||||||
height: 400,
|
height: 400,
|
||||||
parent: Parent::None
|
parent: Parent::None,
|
||||||
};
|
};
|
||||||
|
|
||||||
create_window(window);
|
create_window(window);
|
||||||
|
|
||||||
loop {
|
loop {
|
||||||
if !handle_msg(null_mut()) {
|
if !handle_msg(null_mut()) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue