build out geany_load_module
This commit is contained in:
19
src/lib.rs
19
src/lib.rs
@@ -1,3 +1,18 @@
|
||||
extern fn geany_load_module () {
|
||||
|
||||
#![allow(non_upper_case_globals)]
|
||||
#![allow(non_camel_case_types)]
|
||||
#![allow(non_snake_case)]
|
||||
|
||||
use std::ffi::CString;
|
||||
include!(concat!(env!("OUT_DIR"), "/bindings.rs"));
|
||||
|
||||
#[no_mangle]
|
||||
pub extern "C" fn geany_load_module (plugin: *mut GeanyPlugin) {
|
||||
println!("loading shenlong module");
|
||||
unsafe {
|
||||
(*(*plugin).info).name = CString::new("Project Shenlong").unwrap().into_raw();
|
||||
(*(*plugin).info).description = CString::new("Experimental Geany plugin project").unwrap().into_raw();
|
||||
(*(*plugin).info).version = CString::new("0.0.1").unwrap().into_raw();
|
||||
(*(*plugin).info).author = CString::new("Adrian Malacoda <malacoda@monarch-pass.net>").unwrap().into_raw();
|
||||
geany_plugin_register(plugin, 235, GEANY_API_VERSION as i32, GEANY_ABI_VERSION as i32);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user