From 2c422c2841f24be9a3fb65b1bf090bc847bae2b4 Mon Sep 17 00:00:00 2001 From: Melody Horn Date: Sat, 30 Oct 2021 00:21:27 -0600 Subject: ..what is even fucking happening --- examples/hello-world.rs | 20 ++------------------ 1 file changed, 2 insertions(+), 18 deletions(-) (limited to 'examples/hello-world.rs') diff --git a/examples/hello-world.rs b/examples/hello-world.rs index 9fe521c..9928016 100644 --- a/examples/hello-world.rs +++ b/examples/hello-world.rs @@ -1,21 +1,5 @@ -use std::ffi::CString; -use std::ptr::null_mut; - -use shit_wx_sys::*; +use shit_wx_sys as wx; fn main() { - unsafe { - let message = "It's alive!!"; - let c_string_message = CString::new(message).unwrap(); - let message = - wxString::FromAscii(c_string_message.as_ptr(), message.len().try_into().unwrap()); - wxMessageBox( - (&message) as *const wxString, - (&message) as *const wxString, - (wxOK as i32) | wxGeometryCentre_wxCENTER, - null_mut(), - wxDefaultCoord, - wxDefaultCoord, - ); - } + wx::message_box(); } -- cgit v1.2.3