Function input_sys::libinput_event_tablet_tool_get_proximity_state[][src]

pub unsafe extern "C" fn libinput_event_tablet_tool_get_proximity_state(
    event: *mut libinput_event_tablet_tool
) -> libinput_tablet_tool_proximity_state
Expand description

@ingroup event_tablet

Returns the new proximity state of a tool from a proximity event. Used to check whether or not a tool came in or out of proximity during an event of type @ref LIBINPUT_EVENT_TABLET_TOOL_PROXIMITY.

The proximity state represents the logical proximity state which does not necessarily match when a tool comes into sensor range or leaves the sensor range. On some tools this range does not represent the physical range but a reduced tool-specific logical range. If the range is reduced, this is done transparent to the caller.

For example, the Wacom mouse and lens cursor tools are usually used in relative mode, lying flat on the tablet. Movement typically follows the interaction normal mouse movements have, i.e. slightly lift the tool and place it in a separate location. The proximity detection on Wacom tablets however extends further than the user may lift the mouse, i.e. the tool may not be lifted out of physical proximity. For such tools, libinput provides software-emulated proximity.

@param event The libinput tablet tool event @return The new proximity state of the tool from the event.

@since 1.2