Now with increment and decrement
This commit is contained in:
@@ -14,7 +14,9 @@ pub mod ffi {
|
||||
|
||||
type Module;
|
||||
|
||||
fn decrement(self: Pin<&mut Module>);
|
||||
fn get_name(self: &Module) -> String;
|
||||
fn increment(self: Pin<&mut Module>);
|
||||
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;
|
||||
|
||||
@@ -3,10 +3,18 @@
|
||||
namespace sword_rs {
|
||||
Module::Module(sword::SWModule* module) : module(module) { }
|
||||
|
||||
void Module::decrement() {
|
||||
this->module->decrement();
|
||||
}
|
||||
|
||||
rust::String Module::get_name() const {
|
||||
return rust::String(this->module->getName());
|
||||
}
|
||||
|
||||
void Module::increment() {
|
||||
this->module->increment();
|
||||
}
|
||||
|
||||
rust::String Module::render_text() {
|
||||
return std::string(
|
||||
(const char*) this->module->renderText()
|
||||
|
||||
@@ -13,8 +13,12 @@ namespace sword_rs {
|
||||
public:
|
||||
Module(sword::SWModule* module);
|
||||
|
||||
void decrement();
|
||||
|
||||
rust::String get_name() const;
|
||||
|
||||
void increment();
|
||||
|
||||
rust::String render_text();
|
||||
|
||||
void set_key_text(const rust::String& keyText);
|
||||
|
||||
Reference in New Issue
Block a user