1
0
Fork 0

Fix format and setup platform specific dependencies

This commit is contained in:
Mirko Covizzi 2020-05-25 21:55:49 +02:00
parent e7c8a9780d
commit 5d429fd5ae
2 changed files with 24 additions and 25 deletions

View file

@ -1,13 +1,12 @@
[package]
name = "baseview"
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"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
winapi = { version = "0.3.8", features = ["libloaderapi", "winuser", "windef", "minwindef"] }
[[example]]
name = "windows_demo"
[target.'cfg(windows)'.dependencies]
winapi = { version = "0.3.8", features = ["libloaderapi", "winuser", "windef", "minwindef"] }

View file

@ -1,21 +1,21 @@
use std::ptr::null_mut;
use baseview::{WindowOpenOptions, create_window, handle_msg};
use baseview::Parent;
fn main() {
let window = WindowOpenOptions {
title: "Baseview",
width: 800,
height: 400,
parent: Parent::None
};
create_window(window);
loop {
if !handle_msg(null_mut()) {
break;
}
}
}
use std::ptr::null_mut;
use baseview::Parent;
use baseview::{create_window, handle_msg, WindowOpenOptions};
fn main() {
let window = WindowOpenOptions {
title: "Baseview",
width: 800,
height: 400,
parent: Parent::None,
};
create_window(window);
loop {
if !handle_msg(null_mut()) {
break;
}
}
}