From b0b7b736fa33be1e363d20c134793082e42e7047 Mon Sep 17 00:00:00 2001 From: Melody Horn Date: Sun, 14 Nov 2021 02:04:39 -0700 Subject: holy shit did something just fucking work --- src/lib.rs | 2 +- src/wx-sys.cpp | 4 ++-- src/wx-sys.h | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/lib.rs b/src/lib.rs index 44af2fe..2fdd6f4 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -3,7 +3,7 @@ mod ffi { unsafe extern "C++" { include!("shit-wx-sys/src/wx-sys.h"); - fn message_box(); + fn message_box(message: &str); } } diff --git a/src/wx-sys.cpp b/src/wx-sys.cpp index 8e07962..229b018 100644 --- a/src/wx-sys.cpp +++ b/src/wx-sys.cpp @@ -1,6 +1,6 @@ #include "shit-wx-sys/src/wx-sys.h" #include -void message_box() { - wxMessageBox("Hello World!!!"); +void message_box(rust::Str message) { + wxMessageBox(std::string(message)); } diff --git a/src/wx-sys.h b/src/wx-sys.h index 68c4484..fa649f3 100644 --- a/src/wx-sys.h +++ b/src/wx-sys.h @@ -1,4 +1,4 @@ #include "rust/cxx.h" #include -void message_box(); +void message_box(rust::Str message); -- cgit v1.2.3