Now with formatting available
This commit is contained in:
@@ -15,6 +15,7 @@ pub mod ffi {
|
||||
type Module;
|
||||
|
||||
fn get_name(self: &Module) -> String;
|
||||
fn render_text(self: Pin<&mut Module>) -> String;
|
||||
fn set_key_text(self: Pin<&mut Module>, key_text: &String) -> ();
|
||||
fn strip_text(self: Pin<&mut Module>) -> String;
|
||||
}
|
||||
|
||||
+10
-4
@@ -7,13 +7,19 @@ namespace sword_rs {
|
||||
return rust::String(this->module->getName());
|
||||
}
|
||||
|
||||
rust::String Module::render_text() {
|
||||
return std::string(
|
||||
(const char*) this->module->renderText()
|
||||
);
|
||||
}
|
||||
|
||||
void Module::set_key_text(const rust::String& keyText) {
|
||||
this->module->setKeyText(std::string(keyText).c_str());
|
||||
}
|
||||
|
||||
rust::String Module::strip_text() {
|
||||
return std::string(
|
||||
(const char*) this->module->stripText()
|
||||
);
|
||||
}
|
||||
|
||||
void Module::set_key_text(const rust::String& keyText) {
|
||||
this->module->setKeyText(std::string(keyText).c_str());
|
||||
}
|
||||
}
|
||||
|
||||
+3
-1
@@ -15,8 +15,10 @@ namespace sword_rs {
|
||||
|
||||
rust::String get_name() const;
|
||||
|
||||
rust::String strip_text();
|
||||
rust::String render_text();
|
||||
|
||||
void set_key_text(const rust::String& keyText);
|
||||
|
||||
rust::String strip_text();
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user