aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/lib.rs2
-rw-r--r--src/wx-sys.cpp4
-rw-r--r--src/wx-sys.h2
3 files changed, 4 insertions, 4 deletions
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 <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);