Setting verse key by text
Add the ability to set a very key by text Make the main.rs iterate random verses in John 3
This commit is contained in:
+3
-1
@@ -5,14 +5,16 @@ pub mod ffi {
|
||||
include!("sword_rs/src/cxx/module.h");
|
||||
|
||||
type Mgr;
|
||||
type Module;
|
||||
|
||||
fn new_mgr() -> UniquePtr<Mgr>;
|
||||
fn new_mgr_with_path(path: &String) -> UniquePtr<Mgr>;
|
||||
fn get_modules(self: &Mgr) -> Vec<String>;
|
||||
fn get_module(self: Pin<&mut Mgr>, name: &String) -> UniquePtr<Module>;
|
||||
|
||||
type Module;
|
||||
|
||||
fn get_name(self: &Module) -> String;
|
||||
fn set_key_text(self: Pin<&mut Module>, key_text: &String) -> ();
|
||||
fn strip_text(self: Pin<&mut Module>) -> String;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,4 +20,8 @@ class Module {
|
||||
(const char*) this->module->stripText()
|
||||
);
|
||||
}
|
||||
|
||||
void set_key_text(const rust::String& keyText) {
|
||||
this->module->setKeyText(std::string(keyText).c_str());
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user