mirror of
https://github.com/WerWolv/ImHex.git
synced 2026-03-30 13:05:25 -05:00
* Rework libimhex-rs to use autocxx * Remove Bookmarks::add overload * Remove manual usage of cxx-rs
43 lines
868 B
Rust
43 lines
868 B
Rust
use autocxx::prelude::*;
|
|
|
|
include_cpp! {
|
|
#include "hex/api/imhex_api.hpp"
|
|
|
|
safety!(unsafe)
|
|
|
|
generate!("hex::ImHexApi::Common::closeImHex")
|
|
generate!("hex::ImHexApi::Common::restartImHex")
|
|
generate!("hex::ImHexApi::Bookmarks::add")
|
|
}
|
|
|
|
//pub use crate::ffi::*;
|
|
|
|
/// API for working with imhex bookmarks/highlights
|
|
pub mod bookmarks;
|
|
|
|
/// API for working with imhex itself
|
|
pub mod imhex;
|
|
|
|
mod imhex_api;
|
|
|
|
pub use imgui;
|
|
|
|
#[doc(inline)]
|
|
pub use imhex_api::Color;
|
|
|
|
/// A macro for declaring the init function for your plugin
|
|
///
|
|
/// ## Example
|
|
///
|
|
/// ```
|
|
/// #[hex::plugin_setup(
|
|
/// /* Display name*/ "Example Rust",
|
|
/// /* Author */ "WerWolv",
|
|
/// /* Description */ "Example Rust plugin used as template for plugin devs"
|
|
/// )]
|
|
/// fn init() {
|
|
/// // plugin initialization logic here
|
|
/// }
|
|
/// ```
|
|
pub use imhex_macros::plugin_setup;
|