use {
crate::{mode_private::Mode, types::RofiIntMatcher, GModule},
::std::{
ffi::c_void,
os::raw::{c_char, c_int, c_uint},
},
};
pub const ABI_VERSION: c_uint = 7;
pub const EXIT: c_int = 1000;
pub const NEXT_DIALOG: c_int = 1001;
pub const RELOAD_DIALOG: c_int = 1002;
pub const PREVIOUS_DIALOG: c_int = 1003;
pub const RESET_DIALOG: c_int = 1004;
pub mod menu {
use ::std::os::raw::c_int;
pub const OK: c_int = 0x00010000;
pub const CANCEL: c_int = 0x00020000;
pub const NEXT: c_int = 0x00040000;
pub const CUSTOM_INPUT: c_int = 0x00080000;
pub const ENTRY_DELETE: c_int = 0x00100000;
pub const QUICK_SWITCH: c_int = 0x00200000;
pub const CUSTOM_COMMAND: c_int = 0x00800000;
pub const PREVIOUS: c_int = 0x00400000;
pub const COMPLETE: c_int = 0x01000000;
pub const CUSTOM_ACTION: c_int = 0x10000000;
pub const LOWER_MASK: c_int = 0x0000FFF;
}
extern "C" {
pub fn mode_init(mode: *mut Mode) -> c_int;
pub fn mode_destroy(mode: *mut Mode);
pub fn mode_get_num_entries(mode: *const Mode) -> c_uint;
pub fn mode_get_display_value(
mode: *const Mode,
selected_line: c_uint,
state: *mut c_int,
attribute_list: *mut *mut glib_sys::GList,
get_entry: c_int,
) -> *mut c_char;
pub fn mode_get_icon(
mode: *mut Mode,
selected_line: c_uint,
height: c_int,
) -> *mut cairo_sys::cairo_surface_t;
pub fn mode_get_completion(mode: *const Mode, selected_line: c_uint) -> *const c_char;
pub fn mode_result(
mode: *mut Mode,
menu_retv: c_int,
input: *mut *mut c_char,
selected_line: c_uint,
) -> c_int;
pub fn mode_token_match(
mode: *const Mode,
tokens: *mut *mut RofiIntMatcher,
selected_line: c_uint,
) -> c_int;
pub fn mode_get_name(mode: *const Mode) -> *const c_char;
pub fn mode_free(mode: *mut *mut Mode);
pub fn mode_get_private_data(mode: *const Mode) -> *mut c_void;
pub fn mode_set_private_data(mode: *mut Mode, pd: *mut c_void);
pub fn mode_get_display_name(mode: *const Mode) -> *const c_char;
pub fn mode_set_config(mode: *mut Mode);
pub fn mode_preprocess_input(mode: *mut Mode, input: *const c_char) -> *const c_char;
pub fn mode_get_message(mode: *const Mode) -> *const c_char;
pub fn mode_create(mode: *const Mode) -> *mut Mode;
pub fn mode_completer_result(
sw: *mut Mode,
menu_retv: c_int,
input: *mut *mut c_char,
selected_line: c_uint,
path: *mut *mut c_char,
) -> c_uint;
pub fn mode_is_completer(sw: *const Mode) -> glib_sys::gboolean;
pub fn mode_get_abi_version(mode: *const Mode) -> c_int;
pub fn mode_plugin_set_module(mode: *mut Mode, module: *mut GModule);
pub fn mode_plugin_get_module(mode: *mut Mode) -> *mut GModule;
}