XPLMHandleMouseWheel_f

Type Alias XPLMHandleMouseWheel_f 

Source
pub type XPLMHandleMouseWheel_f = Option<unsafe extern "C" fn(inWindowID: XPLMWindowID, x: c_int, y: c_int, wheel: c_int, clicks: c_int, inRefcon: *mut c_void) -> c_int>;
Expand description

XPLMHandleMouseWheel_f

The SDK calls your mouse wheel callback when one of the mouse wheels is scrolled within your window. Return 1 to consume the mouse wheel movement or 0 to pass them on to a lower window. (If your window appears opaque to the user, you should consume mouse wheel scrolling even if it does nothing.) The number of “clicks” indicates how far the wheel was turned since the last callback. The wheel is 0 for the vertical axis or 1 for the horizontal axis (for OS/mouse combinations that support this).

The units for x and y values match the units used in your window. Thus, for “modern” windows (those created via XPLMCreateWindowEx() and compiled against the XPLM300 library), the units are boxels, while legacy windows will get pixels. Legacy windows have their origin in the lower left of the main X-Plane window, while modern windows have their origin in the lower left of the global desktop space. In both cases, x increases as you move right, and y increases as you move up.

Aliased Type§

pub enum XPLMHandleMouseWheel_f {
    None,
    Some(unsafe extern "C" fn(*mut c_void, i32, i32, i32, i32, *mut c_void) -> i32),
}

Variants§

§1.0.0

None

No value.

§1.0.0

Some(unsafe extern "C" fn(*mut c_void, i32, i32, i32, i32, *mut c_void) -> i32)

Some value of type T.