Documentation for <wlr/types/wlr_relative_pointer_v1.h>

Back to index

Table of contents

struct wlr_relative_pointer_manager_v1

struct wlr_relative_pointer_manager_v1 {
	struct wl_global *global;
	struct wl_list relative_pointers;
	struct {
		struct wl_signal destroy;
		struct wl_signal new_relative_pointer;
	} events;
	struct wl_listener display_destroy_listener;
	void *data;
};

A global interface used for getting the relative pointer object for a given pointer.

wlr_relative_pointer_manager_v1_create()

struct wlr_relative_pointer_manager_v1 *wlr_relative_pointer_manager_v1_create(​struct wl_display *display);

wlr_relative_pointer_manager_v1_send_relative_motion()

void wlr_relative_pointer_manager_v1_send_relative_motion(​struct wlr_relative_pointer_manager_v1 *manager, struct wlr_seat *seat, uint64_t time_usec, double dx, double dy, double dx_unaccel, double dy_unaccel);

Send a relative motion event to the seat. Time is given in microseconds (unlike wl_pointer which uses milliseconds).

struct wlr_relative_pointer_v1

struct wlr_relative_pointer_v1 {
	struct wl_resource *resource;
	struct wl_resource *pointer_resource;
	struct wlr_seat *seat;
	struct wl_list link;
	struct {
		struct wl_signal destroy;
	} events;
	struct wl_listener seat_destroy;
	struct wl_listener pointer_destroy;
	void *data;
};

A wp_relative_pointer object is an extension to the wl_pointer interface used for emitting relative pointer events. It shares the same focus as wl_pointer objects of the same seat and will only emit events when it has focus.

wlr_relative_pointer_v1_from_resource()

struct wlr_relative_pointer_v1 *wlr_relative_pointer_v1_from_resource(​struct wl_resource *resource);

Get a relative pointer from its resource. Returns NULL if inert.