Skip to content

ext_image_copy_capture_cursor_session_v1¤

wayland.ext_image_copy_capture_cursor_session_v1 ¤

Cursor capture session

This object represents a cursor capture session. It extends the base capture session with cursor-specific metadata.

Methods:

error ¤

events

enter ¤

enter() -> None

Cursor entered captured area

Sent when a cursor enters the captured area. It shall be generated before the "position" and "hotspot" events when and only when a cursor enters the area.

The cursor enters the captured area when the cursor image intersects with the captured area. Note, this is different from e.g. wl_pointer.enter.

leave ¤

leave() -> None

Cursor left captured area

Sent when a cursor leaves the captured area. No "position" or "hotspot" event is generated for the cursor until the cursor enters the captured area again.

position ¤

position(x: int, y: int) -> None

Position changed

Cursors outside the image capture source do not get captured and no event will be generated for them.

The given position is the position of the cursor's hotspot and it is relative to the main buffer's top left corner in transformed buffer pixel coordinates. The coordinates may be negative or greater than the main buffer size.

Parameters:

  • x ¤

    (int) –

    Position x coordinates

  • y ¤

    (int) –

    Position y coordinates

hotspot ¤

hotspot(x: int, y: int) -> None

Hotspot changed

The hotspot describes the offset between the cursor image and the position of the input device.

The given coordinates are the hotspot's offset from the origin in buffer coordinates.

Clients should not apply the hotspot immediately: the hotspot becomes effective when the next ext_image_copy_capture_frame_v1.ready event is received.

Compositors may delay this event until the client captures a new frame.

Parameters:

  • x ¤

    (int) –

    Hotspot x coordinates

  • y ¤

    (int) –

    Hotspot y coordinates

destroy ¤

destroy() -> None

Delete this object

Destroys the session. This request can be sent at any time by the client.

This request doesn't affect ext_image_copy_capture_frame_v1 objects created by this object.

get_capture_session ¤

get_capture_session() -> ext_image_copy_capture_session_v1

Get image copy capturer session

Gets the image copy capture session for this cursor session.

The session will produce frames of the cursor image. The compositor may pause the session when the cursor leaves the captured area.

This request must not be sent more than once, or else the duplicate_session protocol error is raised.

Returns:

on_enter ¤

on_enter() -> None

Cursor entered captured area.

Override to handle wayland.ext_image_copy_capture_cursor_session_v1.events.enter.

on_leave ¤

on_leave() -> None

Cursor left captured area.

Override to handle wayland.ext_image_copy_capture_cursor_session_v1.events.leave.

on_position ¤

on_position(x: int, y: int) -> None

on_hotspot ¤

on_hotspot(x: int, y: int) -> None