#![allow(non_camel_case_types)]
#![allow(non_upper_case_globals)]
use std::os::raw::c_char;
use std::os::raw::c_uint;
use std::os::raw::c_void;
#[cfg(target_os = "windows")]
pub type nfdnchar_t = u16;
#[cfg(not(target_os = "windows"))]
pub type nfdnchar_t = c_char;
pub type nfdfiltersize_t = c_uint;
pub type nfdpathset_t = c_void;
#[repr(C)]
#[allow(dead_code)]
pub enum nfdresult_t {
NFD_ERROR,
NFD_OKAY,
NFD_CANCEL,
}
#[repr(C)]
#[allow(dead_code)]
pub struct nfdnfilteritem_t {
pub name: *mut nfdnchar_t, pub spec: *mut nfdnchar_t,
}
#[repr(C)]
#[allow(dead_code)]
pub struct nfdpathsetenum_t {
pub ptr: *mut c_void,
}
extern "C" {
pub fn NFD_Init() -> nfdresult_t;
pub fn NFD_Quit();
pub fn NFD_GetError() -> *const c_char;
pub fn NFD_FreePathN(filePath: *mut nfdnchar_t);
pub fn NFD_OpenDialogN(
outPath: *mut *mut nfdnchar_t,
filterList: *const nfdnfilteritem_t,
filterCount: nfdfiltersize_t,
defaultPath: *const nfdnchar_t,
) -> nfdresult_t;
pub fn NFD_OpenDialogMultipleN(
outPaths: *mut *mut nfdpathset_t,
filterList: *const nfdnfilteritem_t,
filterCount: nfdfiltersize_t,
defaultPath: *const nfdnchar_t,
) -> nfdresult_t;
pub fn NFD_SaveDialogN(
outPath: *mut *mut nfdnchar_t,
filterList: *const nfdnfilteritem_t,
filterCount: nfdfiltersize_t,
defaultPath: *const nfdnchar_t,
defaultName: *const nfdnchar_t,
) -> nfdresult_t;
pub fn NFD_PickFolderN(
outPath: *mut *mut nfdnchar_t,
defaultPath: *const nfdnchar_t,
) -> nfdresult_t;
pub fn NFD_PathSet_Free(pathSet: *mut nfdpathset_t);
pub fn NFD_PathSet_GetEnum(
pathSet: *mut nfdpathset_t,
outEnumerator: *mut nfdpathsetenum_t,
) -> nfdresult_t;
#[cfg(not(target_os = "linux"))]
pub fn NFD_PathSet_FreeEnum(enumerator: *mut nfdpathsetenum_t);
pub fn NFD_PathSet_EnumNextN(
enumerator: *mut nfdpathsetenum_t,
outPath: *mut *mut nfdnchar_t,
) -> nfdresult_t;
#[cfg_attr(not(target_os = "linux"), link_name = "NFD_FreePathN")]
pub fn NFD_PathSet_FreePathN(filePath: *mut nfdnchar_t);
}