Input

Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.

Printing only specified function

WL_EXPORT struct weston_touch_device * weston_touch_create_touch_device(struct weston_touch * touch, const char * syspath, void * backend_data, const struct weston_touch_device_ops * ops)

Register a touchscreen input device.

Parameters

struct weston_touch * touch
The parent weston_touch that identifies the seat.
const char * syspath
Unique device name.
void * backend_data
Backend private data if necessary.
const struct weston_touch_device_ops * ops
Calibration operations, or NULL for not able to run calibration.

Description

More detailed description here about what the function does.

Return

New touch device, or NULL on failure.

Printing all the file

WL_EXPORT struct weston_touch_device * weston_touch_create_touch_device(struct weston_touch * touch, const char * syspath, void * backend_data, const struct weston_touch_device_ops * ops)

Register a touchscreen input device.

Parameters

struct weston_touch * touch
The parent weston_touch that identifies the seat.
const char * syspath
Unique device name.
void * backend_data
Backend private data if necessary.
const struct weston_touch_device_ops * ops
Calibration operations, or NULL for not able to run calibration.

Description

More detailed description here about what the function does.

Return

New touch device, or NULL on failure.

WL_EXPORT void weston_touch_device_destroy(struct weston_touch_device * device)

Destroy the touch device.

Parameters

struct weston_touch_device * device
the device
WL_EXPORT bool weston_touch_device_can_calibrate(struct weston_touch_device * device)

Is it possible to run calibration on this touch device?

Parameters

struct weston_touch_device * device
the device
WL_EXPORT bool weston_pointer_has_focus_resource(struct weston_pointer * pointer)

Check if the pointer has focused resources.

Parameters

struct weston_pointer * pointer
The pointer to check for focused resources.

Return

Whether or not this pointer has focused resources

WL_EXPORT void weston_pointer_send_button(struct weston_pointer * pointer, const struct timespec * time, uint32_t button, enum wl_pointer_button_state state)

Send wl_pointer.button events to focused resources.

Parameters

struct weston_pointer * pointer
The pointer where the button events originates from.
const struct timespec * time
The timestamp of the event
uint32_t button
The button value of the event
enum wl_pointer_button_state state
The state enum value of the event

Description

For every resource that is currently in focus, send a wl_pointer.button event with the passed parameters. The focused resources are the wl_pointer resources of the client which currently has the surface with pointer focus.

WL_EXPORT void weston_pointer_send_axis(struct weston_pointer * pointer, const struct timespec * time, struct weston_pointer_axis_event * event)

Send wl_pointer.axis events to focused resources.

Parameters

struct weston_pointer * pointer
The pointer where the axis events originates from.
const struct timespec * time
The timestamp of the event
struct weston_pointer_axis_event * event
The axis value of the event

Description

For every resource that is currently in focus, send a wl_pointer.axis event with the passed parameters. The focused resources are the wl_pointer resources of the client which currently has the surface with pointer focus.

WL_EXPORT void weston_pointer_send_axis_source(struct weston_pointer * pointer, enum wl_pointer_axis_source source)

Send wl_pointer.axis_source events to focused resources.

Parameters

struct weston_pointer * pointer
The pointer where the axis_source events originates from.
enum wl_pointer_axis_source source
The axis_source enum value of the event

Description

For every resource that is currently in focus, send a wl_pointer.axis_source event with the passed parameter. The focused resources are the wl_pointer resources of the client which currently has the surface with pointer focus.

WL_EXPORT void weston_pointer_send_frame(struct weston_pointer * pointer)

Send wl_pointer.frame events to focused resources.

Parameters

struct weston_pointer * pointer
The pointer where the frame events originates from.

Description

For every resource that is currently in focus, send a wl_pointer.frame event. The focused resources are the wl_pointer resources of the client which currently has the surface with pointer focus.

WL_EXPORT bool weston_touch_has_focus_resource(struct weston_touch * touch)

Check if the touch has focused resources.

Parameters

struct weston_touch * touch
The touch to check for focused resources.

Return

Whether or not this touch has focused resources

WL_EXPORT void weston_touch_send_down(struct weston_touch * touch, const struct timespec * time, int touch_id, wl_fixed_t x, wl_fixed_t y)

Send wl_touch.down events to focused resources.

Parameters

struct weston_touch * touch
The touch where the down events originates from.
const struct timespec * time
The timestamp of the event
int touch_id
The touch_id value of the event
wl_fixed_t x
The x value of the event
wl_fixed_t y
The y value of the event

Description

For every resource that is currently in focus, send a wl_touch.down event with the passed parameters. The focused resources are the wl_touch resources of the client which currently has the surface with touch focus.

WL_EXPORT void weston_touch_send_up(struct weston_touch * touch, const struct timespec * time, int touch_id)

Send wl_touch.up events to focused resources.

Parameters

struct weston_touch * touch
The touch where the up events originates from.
const struct timespec * time
The timestamp of the event
int touch_id
The touch_id value of the event

Description

For every resource that is currently in focus, send a wl_touch.up event with the passed parameters. The focused resources are the wl_touch resources of the client which currently has the surface with touch focus.

WL_EXPORT void weston_touch_send_frame(struct weston_touch * touch)

Send wl_touch.frame events to focused resources.

Parameters

struct weston_touch * touch
The touch where the frame events originates from.

Description

For every resource that is currently in focus, send a wl_touch.frame event. The focused resources are the wl_touch resources of the client which currently has the surface with touch focus.

WL_EXPORT bool weston_keyboard_has_focus_resource(struct weston_keyboard * keyboard)

Check if the keyboard has focused resources.

Parameters

struct weston_keyboard * keyboard
The keyboard to check for focused resources.

Return

Whether or not this keyboard has focused resources

WL_EXPORT void weston_keyboard_send_key(struct weston_keyboard * keyboard, const struct timespec * time, uint32_t key, enum wl_keyboard_key_state state)

Send wl_keyboard.key events to focused resources.

Parameters

struct weston_keyboard * keyboard
The keyboard where the key events originates from.
const struct timespec * time
The timestamp of the event
uint32_t key
The key value of the event
enum wl_keyboard_key_state state
The state enum value of the event

Description

For every resource that is currently in focus, send a wl_keyboard.key event with the passed parameters. The focused resources are the wl_keyboard resources of the client which currently has the surface with keyboard focus.

WL_EXPORT void weston_keyboard_send_modifiers(struct weston_keyboard * keyboard, uint32_t serial, uint32_t mods_depressed, uint32_t mods_latched, uint32_t mods_locked, uint32_t group)

Send wl_keyboard.modifiers events to focused resources and pointer focused resources.

Parameters

struct weston_keyboard * keyboard
The keyboard where the modifiers events originates from.
uint32_t serial
The serial of the event
uint32_t mods_depressed
The mods_depressed value of the event
uint32_t mods_latched
The mods_latched value of the event
uint32_t mods_locked
The mods_locked value of the event
uint32_t group
The group value of the event

Description

For every resource that is currently in focus, send a wl_keyboard.modifiers event with the passed parameters. The focused resources are the wl_keyboard resources of the client which currently has the surface with keyboard focus. This also sends wl_keyboard.modifiers events to the wl_keyboard resources of the client having pointer focus (if different from the keyboard focus client).

WL_EXPORT void weston_pointer_clear_focus(struct weston_pointer * pointer)

Parameters

struct weston_pointer * pointer
the pointer to clear focus for.

Description

This can be used to unset pointer focus and set the co-ordinates to the arbitrary values we use for the no focus case.

There’s no requirement to use this function. For example, passing the results of a weston_compositor_pick_view() directly to weston_pointer_set_focus() will do the right thing when no view is found.

WL_EXPORT void weston_keyboard_start_grab(struct weston_keyboard * keyboard, struct weston_keyboard_grab * grab)

Users of this function must manually manage the keyboard focus

Parameters

struct weston_keyboard * keyboard
pointer to a weston_keyboard
struct weston_keyboard_grab * grab
pointer to weston_keyboard_grab
void weston_pointer_handle_output_destroy(struct wl_listener * listener, void * data)

Verify if the pointer is in a valid position and move it if it isn’t.

Parameters

struct wl_listener * listener
a wl_listener
void * data
a generic pointer
void weston_compositor_update_touch_mode(struct weston_compositor * compositor)

Global touch mode update

Parameters

struct weston_compositor * compositor
the weston_compositor

Description

If no seat has a touch down and the compositor is in a PREP touch mode, set the compositor to the goal touch mode.

Calls calibrator if touch mode changed.

void weston_compositor_set_touch_mode_normal(struct weston_compositor * compositor)

Start transition to normal touch event handling

Parameters

struct weston_compositor * compositor
the weston_compositor

Description

The touch event mode changes when all touches on all touch devices have been lifted. If no touches are currently down, the transition is immediate.

see also weston_touch_mode

void weston_compositor_set_touch_mode_calib(struct weston_compositor * compositor)

Start transition to calibrator touch event handling

Parameters

struct weston_compositor * compositor
the weston_compositor

Description

The touch event mode changes when all touches on all touch devices have been lifted. If no touches are currently down, the transition is immediate.

see also weston_touch_mode

WL_EXPORT void notify_touch_normalized(struct weston_touch_device * device, const struct timespec * time, int touch_id, double x, double y, const struct weston_point2d_device_normalized * norm, int touch_type)

Feed in touch down, motion, and up events, calibratable device.

Parameters

struct weston_touch_device * device
The physical device that generated the event.
const struct timespec * time
The event timestamp.
int touch_id
ID for the touch point of this event (multi-touch).
double x
X coordinate in compositor global space.
double y
Y coordinate in compositor global space.
const struct weston_point2d_device_normalized * norm
Normalized device X, Y coordinates in calibration space, or NULL.
int touch_type
Either WL_TOUCH_DOWN, WL_TOUCH_UP, or WL_TOUCH_MOTION.

Description

It assumes always the correct cycle sequence until it gets here: touch_down → touch_update → … → touch_update → touch_end. The driver is responsible for sending along such order.

Coordinates x and y are used for normal operation.

Coordinates norm are only used for touch device calibration. If and only if the weston_touch_device does not support calibrating, norm must be NULL.

The calibration space is the normalized coordinate space [0.0, 1.0]×[0.0, 1.0] of the weston_touch_device. This is assumed to map to the similar normalized coordinate space of the associated weston_output.

WL_EXPORT struct weston_keyboard * weston_seat_get_keyboard(struct weston_seat * seat)

Get a seat’s keyboard pointer

Parameters

struct weston_seat * seat
The seat to query

Return

The seat’s keyboard pointer, or NULL if no keyboard is present

The keyboard pointer for a seat isn’t freed when all keyboards are removed, so it should only be used when the seat’s keyboard_device_count is greater than zero. This function does that test and only returns a pointer when a keyboard is present.

WL_EXPORT struct weston_pointer * weston_seat_get_pointer(struct weston_seat * seat)

Get a seat’s pointer pointer

Parameters

struct weston_seat * seat
The seat to query

Return

The seat’s pointer pointer, or NULL if no pointer device is present

The pointer pointer for a seat isn’t freed when all mice are removed, so it should only be used when the seat’s pointer_device_count is greater than zero. This function does that test and only returns a pointer when a pointing device is present.

WL_EXPORT struct weston_touch * weston_seat_get_touch(struct weston_seat * seat)

Get a seat’s touch pointer

Parameters

struct weston_seat * seat
The seat to query

Return

The seat’s touch pointer, or NULL if no touch device is present

The touch pointer for a seat isn’t freed when all touch devices are removed, so it should only be used when the seat’s touch_device_count is greater than zero. This function does that test and only returns a pointer when a touch device is present.

WL_EXPORT void weston_seat_set_keyboard_focus(struct weston_seat * seat, struct weston_surface * surface)

Sets the keyboard focus to the given surface

Parameters

struct weston_seat * seat
The seat to query
struct weston_surface * surface
the weston surface to use