androidx.compose.ui.input.mouse


Classes

MouseScrollEvent

This class is deprecated. Use Modifier.pointerInput + PointerEventType.Scroll.See the comment to mouseScrollFilter

MouseScrollUnit

This class is deprecated. Use Modifier.pointerInput + PointerEventType.Scroll.See the comment to mouseScrollFilter

MouseScrollUnit.Line

This class is deprecated. Use Modifier.pointerInput + PointerEventType.Scroll.See the comment to mouseScrollFilter

MouseScrollUnit.Page

This class is deprecated. Use Modifier.pointerInput + PointerEventType.Scroll.See the comment to mouseScrollFilter

Enums

MouseScrollOrientation

This enum is deprecated. Use Modifier.pointerInput + PointerEventType.Scroll.See the comment to mouseScrollFilter

Extension functions summary

Modifier
Modifier.mouseScrollFilter(
    onMouseScroll: (event: MouseScrollEvent, bounds: IntSize) -> Boolean
)

This function is deprecated. Use Modifier.pointerInput + PointerEventType.Scroll

Extension functions

mouseScrollFilter

fun Modifier.mouseScrollFilter(
    onMouseScroll: (event: MouseScrollEvent, bounds: IntSize) -> Boolean
): Modifier

Adding this modifier to the modifier parameter of a component will allow it to intercept scroll events from mouse wheel and touchpad.

Parameters
onMouseScroll: (event: MouseScrollEvent, bounds: IntSize) -> Boolean

This callback is invoked when the user interacts with the mouse wheel or touchpad. While implementing this callback, return true to stop propagation of this event. If you return false, the scroll event will be sent to this mouseScrollFilter's parent.