geokernel-sys 1.5.31

Dynamically loaded C ABI bindings for the GeoKernel SDK
Documentation
use std::ffi::c_void;

#[cfg(windows)]
pub type WChar = u16;
#[cfg(not(windows))]
pub type WChar = i32;

#[repr(C)]
#[derive(Debug, Default, Clone, Copy, PartialEq)]
pub struct GeoKernelViewerExtent {
    pub x_min: f64,
    pub y_min: f64,
    pub x_max: f64,
    pub y_max: f64,
}
#[repr(C)]
#[derive(Debug, Default, Clone, Copy, PartialEq)]
pub struct GeoKernelViewerScreenRectangle {
    pub left: i32,
    pub top: i32,
    pub right: i32,
    pub bottom: i32,
}
#[repr(C)]
#[derive(Debug, Default, Clone, Copy)]
pub struct GeoKernelViewerEventData {
    pub event_type: i32,
    pub int_value: i32,
    pub int_value2: i32,
    pub double_value: f64,
    pub extent: GeoKernelViewerExtent,
    pub screen_rectangle: GeoKernelViewerScreenRectangle,
}
#[repr(C)]
#[derive(Debug, Default, Clone, Copy)]
pub struct GeoKernelViewerRouteSummary {
    pub succeeded: bool,
    pub total_distance: f64,
    pub total_time: f64,
    pub cost: f64,
    pub from_snap_distance: f64,
    pub to_snap_distance: f64,
    pub route_layer_index: i32,
}
pub type GeoKernelWindowCommandCallback = Option<unsafe extern "C" fn(i32, *mut c_void)>;
pub type GeoKernelWindowControlCallback =
    Option<unsafe extern "C" fn(i32, f64, *const WChar, *mut c_void)>;
pub type GeoKernelViewerEventCallback =
    Option<unsafe extern "C" fn(*const GeoKernelViewerEventData, *const WChar, *mut c_void)>;
pub type GeoKernelViewerLayerLoadProgressCallback =
    Option<unsafe extern "C" fn(i32, *const WChar, *mut c_void)>;
pub type GeoKernelViewerLayerLoadCancellationCallback =
    Option<unsafe extern "C" fn(*mut c_void) -> bool>;
pub type GeoKernelViewerSpatialIndexStateCallback = Option<unsafe extern "C" fn(i32, *mut c_void)>;
pub type GeoKernelAIProgressCallback =
    Option<unsafe extern "C" fn(i32, i32, i32, *const WChar, *mut c_void)>;
pub type GeoKernelAnalysisProgressCallback =
    Option<unsafe extern "C" fn(i32, *const WChar, *mut c_void)>;
pub type GeoKernelOperationCancellationCallback = Option<unsafe extern "C" fn(*mut c_void) -> i32>;
pub type GeoKernelOperationProgressCallback =
    Option<unsafe extern "C" fn(*mut c_void, i32, i32, i64, i64, *const WChar)>;
pub type GeoKernelOperationDiagnosticCallback =
    Option<unsafe extern "C" fn(*mut c_void, i32, *const WChar, *const WChar, *const WChar)>;
#[repr(C)]
#[derive(Clone, Copy)]
pub struct GeoKernelOperationContextV1 {
    pub struct_size: u32,
    pub version: u32,
    pub user_data: *mut c_void,
    pub cancellation: GeoKernelOperationCancellationCallback,
    pub progress: GeoKernelOperationProgressCallback,
    pub diagnostic: GeoKernelOperationDiagnosticCallback,
    pub maximum_memory_bytes: i64,
    pub maximum_output_rows: i64,
    pub maximum_runtime_milliseconds: i64,
    pub maximum_network_bytes: i64,
    pub maximum_spatial_area: f64,
}