ei_scroll
Scroll Object
Interface for scroll requests and events.
This interface is only provided once per device and where a client
requests ei_scroll.release
the interface does not get
re-initialized. An EIS implementation may adjust the behavior of the
device (including removing the device) if the interface is releasd.
Note that for a client to receive objects of this type, it must announce
support for this interface in ei_handshake.interface_version.
Requests
ei_scroll.release
Since Version1 Request Opcode0
ei_scroll.release()
Notification that the client is no longer interested in this object.
The EIS implementation will release any resources related to this object and
send the ei_scroll.destroyed
event once complete.
ei_scroll.scroll
Since Version1 Request Opcode1
ei_scroll.scroll(x, y)
Argument | Type | Summary |
---|---|---|
x | float |
the x movement in logical pixels |
y | float |
the y movement in logical pixels |
This request is only available for clients of ei_handshake.context_type.sender
.
Generate a a smooth (pixel-precise) scroll event on this pointer.
Clients must not send ei_scroll.scroll_discrete
events for the same event,
the EIS implementation is responsible for emulation of discrete
scroll events.
It is a client bug to send this request more than once
within the same ei_device.frame
and the EIS implementation
may ignore either or all such requests and/or disconnect the client.
It is a protocol violation to send this request for a client
of an ei_handshake.context_type
other than sender.
ei_scroll.scroll_discrete
Since Version1 Request Opcode2
ei_scroll.scroll_discrete(x, y)
Argument | Type | Summary |
---|---|---|
x | int32 |
the x movement in fractions or multiples of 120 |
y | int32 |
the y movement in fractions or multiples of 120 |
This request is only available for clients of ei_handshake.context_type.sender
.
Generate a a discrete (e.g. wheel) scroll event on this pointer.
Clients must not send ei_scroll.scroll
events for the same event,
the EIS implementation is responsible for emulation of smooth
scroll events.
A discrete scroll event is based logical scroll units (equivalent to one mouse wheel click). The value for one scroll unit is 120, a fraction or multiple thereof represents a fraction or multiple of a wheel click.
It is a client bug to send this request more than once
within the same ei_device.frame
and the EIS implementation
may ignore either or all such requests and/or disconnect the client.
It is a protocol violation to send this request for a client
of an ei_handshake.context_type
other than sender.
ei_scroll.scroll_stop
Since Version1 Request Opcode3
ei_scroll.scroll_stop(x, y, is_cancel)
Argument | Type | Summary |
---|---|---|
x | uint32 |
nonzero if this axis stopped scrolling |
y | uint32 |
nonzero if this axis stopped scrolling |
is_cancel | uint32 |
nonzero to indicate this is a cancel event |
This request is only available for clients of ei_handshake.context_type.sender
.
Generate a a scroll stop or cancel event on this pointer.
A scroll stop event notifies the EIS implementation that the interaction causing a
scroll motion previously triggered with ei_scroll.scroll
or
ei_scroll.scroll_discrete
has stopped. For example, if all
fingers are lifted off a touchpad, two-finger scrolling has logically
stopped. The EIS implementation may use this information to e.g. start kinetic scrolling
previously based on the previous finger speed.
If is_cancel is nonzero, the event represents a cancellation of the current interaction. This indicates that the interaction has stopped to the point where further (server-emulated) scroll events from this device are wrong.
It is a client bug to send this request more than once
within the same ei_device.frame
and the EIS implementation
may ignore either or all such requests and/or disconnect the client.
It is a client bug to send this request for an axis that
had a a nonzero value in either ei_scroll.scroll
or ei_scroll.scroll_discrete
in the current frame and the EIS implementation
may ignore either or all such requests and/or disconnect the client.
It is a protocol violation to send this request for a client
of an ei_handshake.context_type
other than sender.
Events
ei_scroll.destroyed
Since Version1 Event Opcode0
ei_scroll.destroyed(serial)
Argument | Type | Summary |
---|---|---|
serial | uint32 |
this event’s serial number |
Immediately after sending this request, the object is considered destroyed by the EIS implementation. It must no longer be used by the client.
This object has been removed and a client should release all associated resources.
This object will be destroyed by the EIS implementation immmediately after after this event is sent and as such the client must not attempt to use it after that point.
ei_scroll.scroll
Since Version1 Event Opcode1
ei_scroll.scroll(x, y)
Argument | Type | Summary |
---|---|---|
x | float |
|
y | float |
This event is only available for clients of ei_handshake.context_type.receiver
.
See the ei_scroll.scroll
request for details.
It is a protocol violation to send this request for a client
of an ei_handshake.context_type
other than receiver.
ei_scroll.scroll_discrete
Since Version1 Event Opcode2
ei_scroll.scroll_discrete(x, y)
Argument | Type | Summary |
---|---|---|
x | int32 |
|
y | int32 |
This event is only available for clients of ei_handshake.context_type.receiver
.
See the ei_scroll.scroll_discrete
request for details.
It is a protocol violation to send this request for a client
of an ei_handshake.context_type
other than receiver.
ei_scroll.scroll_stop
Since Version1 Event Opcode3
ei_scroll.scroll_stop(x, y, is_cancel)
Argument | Type | Summary |
---|---|---|
x | uint32 |
|
y | uint32 |
|
is_cancel | uint32 |
This event is only available for clients of ei_handshake.context_type.receiver
.
See the ei_scroll.scroll_stop
request for details.
It is a protocol violation to send this request for a client
of an ei_handshake.context_type
other than receiver.