diff options
author | Melody Horn <melody@boringcactus.com> | 2021-11-14 02:04:39 -0700 |
---|---|---|
committer | Melody Horn <melody@boringcactus.com> | 2021-11-14 02:04:39 -0700 |
commit | b0b7b736fa33be1e363d20c134793082e42e7047 (patch) | |
tree | 967cd10ceedc35642c480e16a4f9acb1a0f17448 /src | |
parent | 2c422c2841f24be9a3fb65b1bf090bc847bae2b4 (diff) | |
download | shit-wx-sys-canon.tar.gz shit-wx-sys-canon.zip |
Diffstat (limited to 'src')
-rw-r--r-- | src/lib.rs | 2 | ||||
-rw-r--r-- | src/wx-sys.cpp | 4 | ||||
-rw-r--r-- | src/wx-sys.h | 2 |
3 files changed, 4 insertions, 4 deletions
@@ -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 <wx/msgdlg.h> -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 <memory> -void message_box(); +void message_box(rust::Str message); |