Input¶
All input file¶
Enums
Functions
-
static void
maybe_warp_confined_pointer
(struct weston_pointer_constraint *constraint)¶
-
static void
empty_region
(pixman_region32_t *region)¶
-
static void
region_init_infinite
(pixman_region32_t *region)
-
static void
send_timestamp
(struct wl_resource *resource, const struct timespec *time)¶
-
static void
send_timestamps_for_input_resource
(struct wl_resource *input_resource, struct wl_list *list, const struct timespec *time)¶
-
static void
remove_input_resource_from_timestamps
(struct wl_resource *input_resource, struct wl_list *list)¶
-
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
- Return
- New touch device, or NULL on failure.
- Parameters
touch
: The parent weston_touch that identifies the seat.syspath
: Unique device name.backend_data
: Backend private data if necessary.ops
: Calibration operations, or NULL for not able to run calibration.
-
WL_EXPORT void weston_touch_device_destroy(struct weston_touch_device * device)
Destroy the touch device.
-
WL_EXPORT bool weston_touch_device_can_calibrate(struct weston_touch_device * device)
Is it possible to run calibration on this touch device?
-
static enum weston_touch_mode
weston_touch_device_get_mode
(struct weston_touch_device *device)¶
-
static struct weston_pointer_client *
weston_pointer_client_create
(struct wl_client *client)¶
-
static void
weston_pointer_client_destroy
(struct weston_pointer_client *pointer_client)¶
-
static bool
weston_pointer_client_is_empty
(struct weston_pointer_client *pointer_client)¶
-
static struct weston_pointer_client *
weston_pointer_get_pointer_client
(struct weston_pointer *pointer, struct wl_client *client)¶
-
static struct weston_pointer_client *
weston_pointer_ensure_pointer_client
(struct weston_pointer *pointer, struct wl_client *client)¶
-
static void
weston_pointer_cleanup_pointer_client
(struct weston_pointer *pointer, struct weston_pointer_client *pointer_client)¶
-
static void
unbind_pointer_client_resource
(struct wl_resource *resource)¶
-
static void
unbind_resource
(struct wl_resource *resource)
-
WL_EXPORT void weston_pointer_motion_to_abs(struct weston_pointer * pointer, struct weston_pointer_motion_event * event, wl_fixed_t * x, wl_fixed_t * y)
-
static bool
weston_pointer_motion_to_rel
(struct weston_pointer *pointer, struct weston_pointer_motion_event *event, double *dx, double *dy, double *dx_unaccel, double *dy_unaccel)¶
-
WL_EXPORT void weston_seat_repick(struct weston_seat * seat)
-
static void
weston_compositor_idle_inhibit
(struct weston_compositor *compositor)¶
-
static void
weston_compositor_idle_release
(struct weston_compositor *compositor)¶
-
static void
pointer_focus_view_destroyed
(struct wl_listener *listener, void *data)¶
-
static void
pointer_focus_resource_destroyed
(struct wl_listener *listener, void *data)¶
-
static void
keyboard_focus_resource_destroyed
(struct wl_listener *listener, void *data)¶
-
static void
touch_focus_view_destroyed
(struct wl_listener *listener, void *data)¶
-
static void
touch_focus_resource_destroyed
(struct wl_listener *listener, void *data)¶
-
static void
move_resources
(struct wl_list *destination, struct wl_list *source)¶
-
static void
move_resources_for_client
(struct wl_list *destination, struct wl_list *source, struct wl_client *client)¶
-
static void
default_grab_pointer_focus
(struct weston_pointer_grab *grab)¶
-
static void
pointer_send_relative_motion
(struct weston_pointer *pointer, const struct timespec *time, struct weston_pointer_motion_event *event)¶
-
static void
pointer_send_motion
(struct weston_pointer *pointer, const struct timespec *time, wl_fixed_t sx, wl_fixed_t sy)¶
-
WL_EXPORT void weston_pointer_send_motion(struct weston_pointer * pointer, const struct timespec * time, struct weston_pointer_motion_event * event)
-
static void
default_grab_pointer_motion
(struct weston_pointer_grab *grab, const struct timespec *time, struct weston_pointer_motion_event *event)¶
-
WL_EXPORT bool weston_pointer_has_focus_resource(struct weston_pointer * pointer)
Check if the pointer has focused resources.
- Return
- Whether or not this pointer has focused resources
- Parameters
pointer
: The pointer to check for 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.
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.
- Parameters
pointer
: The pointer where the button events originates from.time
: The timestamp of the eventbutton
: The button value of the eventvalue
: The state enum value of the event
-
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.
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.
- Parameters
pointer
: The pointer where the axis events originates from.time
: The timestamp of the eventevent
: The axis value of the event
-
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.
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.
- Parameters
pointer
: The pointer where the axis_source events originates from.source
: The axis_source enum value of the event
-
static void
pointer_send_frame
(struct wl_resource *resource)¶
-
WL_EXPORT void weston_pointer_send_frame(struct weston_pointer * pointer)
Send wl_pointer.frame events to focused resources.
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.
- Parameters
pointer
: The pointer where the frame events originates from.
-
static void
default_grab_pointer_axis
(struct weston_pointer_grab *grab, const struct timespec *time, struct weston_pointer_axis_event *event)¶
-
static void
default_grab_pointer_axis_source
(struct weston_pointer_grab *grab, enum wl_pointer_axis_source source)¶
-
static void
default_grab_pointer_frame
(struct weston_pointer_grab *grab)¶
-
static void
default_grab_pointer_cancel
(struct weston_pointer_grab *grab)¶
-
WL_EXPORT bool weston_touch_has_focus_resource(struct weston_touch * touch)
Check if the touch has focused resources.
- Return
- Whether or not this touch has focused resources
- Parameters
touch
: The touch to check for 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.
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.
- Parameters
touch
: The touch where the down events originates from.time
: The timestamp of the eventtouch_id
: The touch_id value of the eventx
: The x value of the eventy
: The y value of the event
-
static void
default_grab_touch_down
(struct weston_touch_grab *grab, const struct timespec *time, int touch_id, wl_fixed_t x, wl_fixed_t y)¶
-
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.
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.
- Parameters
touch
: The touch where the up events originates from.time
: The timestamp of the eventtouch_id
: The touch_id value of the event
-
static void
default_grab_touch_up
(struct weston_touch_grab *grab, const struct timespec *time, int touch_id)¶
-
WL_EXPORT void weston_touch_send_motion(struct weston_touch * touch, const struct timespec * time, int touch_id, wl_fixed_t x, wl_fixed_t y)
Send wl_touch.motion events to focused resources.
For every resource that is currently in focus, send a wl_touch.motion event with the passed parameters. The focused resources are the wl_touch resources of the client which currently has the surface with touch focus.
- Parameters
touch
: The touch where the motion events originates from.time
: The timestamp of the eventtouch_id
: The touch_id value of the eventx
: The x value of the eventy
: The y value of the event
-
static void
default_grab_touch_motion
(struct weston_touch_grab *grab, const struct timespec *time, int touch_id, wl_fixed_t x, wl_fixed_t y)¶
-
WL_EXPORT void weston_touch_send_frame(struct weston_touch * touch)
Send wl_touch.frame events to focused resources.
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.
- Parameters
touch
: The touch where the frame events originates from.
-
static void
default_grab_touch_frame
(struct weston_touch_grab *grab)¶
-
static void
default_grab_touch_cancel
(struct weston_touch_grab *grab)¶
-
WL_EXPORT bool weston_keyboard_has_focus_resource(struct weston_keyboard * keyboard)
Check if the keyboard has focused resources.
- Return
- Whether or not this keyboard has focused resources
- Parameters
keyboard
: The keyboard to check for 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.
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.
- Parameters
keyboard
: The keyboard where the key events originates from.time
: The timestamp of the eventkey
: The key value of the eventstate
: The state enum value of the event
-
static void
default_grab_keyboard_key
(struct weston_keyboard_grab *grab, const struct timespec *time, uint32_t key, uint32_t state)¶
-
static void
send_modifiers_to_resource
(struct weston_keyboard *keyboard, struct wl_resource *resource, uint32_t serial)¶
-
static void
send_modifiers_to_client_in_list
(struct wl_client *client, struct wl_list *list, uint32_t serial, struct weston_keyboard *keyboard)¶
-
static struct weston_pointer_client *
find_pointer_client_for_surface
(struct weston_pointer *pointer, struct weston_surface *surface)¶
-
static struct weston_pointer_client *
find_pointer_client_for_view
(struct weston_pointer *pointer, struct weston_view *view)¶
-
static struct wl_resource *
find_resource_for_surface
(struct wl_list *list, struct weston_surface *surface)¶
-
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.
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).
- Parameters
keyboard
: The keyboard where the modifiers events originates from.serial
: The serial of the eventmods_depressed
: The mods_depressed value of the eventmods_latched
: The mods_latched value of the eventmods_locked
: The mods_locked value of the eventgroup
: The group value of the event
-
static void
default_grab_keyboard_modifiers
(struct weston_keyboard_grab *grab, uint32_t serial, uint32_t mods_depressed, uint32_t mods_latched, uint32_t mods_locked, uint32_t group)¶
-
static void
default_grab_keyboard_cancel
(struct weston_keyboard_grab *grab)¶
-
static void
pointer_unmap_sprite
(struct weston_pointer *pointer)¶
-
static void
pointer_handle_sprite_destroy
(struct wl_listener *listener, void *data)¶
-
static void
weston_pointer_reset_state
(struct weston_pointer *pointer)¶
-
static 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.
-
static struct weston_pointer *
weston_pointer_create
(struct weston_seat *seat)¶
-
static void
weston_pointer_destroy
(struct weston_pointer *pointer)¶
-
void
weston_pointer_set_default_grab
(struct weston_pointer *pointer, const struct weston_pointer_grab_interface *interface)
-
static struct weston_keyboard *
weston_keyboard_create
(void)¶
-
static void
weston_xkb_info_destroy
(struct weston_xkb_info *xkb_info)¶
-
static void
weston_keyboard_destroy
(struct weston_keyboard *keyboard)¶
-
static void
weston_touch_reset_state
(struct weston_touch *touch)¶
-
static struct weston_touch *
weston_touch_create
(void)¶
-
static void
weston_touch_destroy
(struct weston_touch *touch)¶
-
static void
seat_send_updated_caps
(struct weston_seat *seat)¶
-
WL_EXPORT void weston_pointer_clear_focus(struct weston_pointer * pointer)
Clear the pointer focus
This can be used to unset pointer focus and set the co-ordinates to the arbitrary values we use for the no focus case.
- Parameters
pointer
: the pointer to clear focus for.
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_pointer_set_focus(struct weston_pointer * pointer, struct weston_view * view, wl_fixed_t sx, wl_fixed_t sy)
-
static void
send_enter_to_resource_list
(struct wl_list *list, struct weston_keyboard *keyboard, struct weston_surface *surface, uint32_t serial)¶
-
WL_EXPORT void weston_keyboard_set_focus(struct weston_keyboard * keyboard, struct weston_surface * surface)
-
WL_EXPORT void weston_keyboard_start_grab(struct weston_keyboard * keyboard, struct weston_keyboard_grab * grab)
-
WL_EXPORT void weston_keyboard_end_grab(struct weston_keyboard * keyboard)
-
static void
weston_keyboard_cancel_grab
(struct weston_keyboard *keyboard)¶
-
WL_EXPORT void weston_pointer_start_grab(struct weston_pointer * pointer, struct weston_pointer_grab * grab)
-
WL_EXPORT void weston_pointer_end_grab(struct weston_pointer * pointer)
-
static void
weston_pointer_cancel_grab
(struct weston_pointer *pointer)¶
-
WL_EXPORT void weston_touch_start_grab(struct weston_touch * touch, struct weston_touch_grab * grab)
-
WL_EXPORT void weston_touch_end_grab(struct weston_touch * touch)
-
static void
weston_touch_cancel_grab
(struct weston_touch *touch)¶
-
static void
weston_pointer_clamp_for_output
(struct weston_pointer *pointer, struct weston_output *output, wl_fixed_t *fx, wl_fixed_t *fy)¶
-
WL_EXPORT void weston_pointer_clamp(struct weston_pointer * pointer, wl_fixed_t * fx, wl_fixed_t * fy)
-
static void
weston_pointer_move_to
(struct weston_pointer *pointer, wl_fixed_t x, wl_fixed_t y)¶
-
WL_EXPORT void weston_pointer_move(struct weston_pointer * pointer, struct weston_pointer_motion_event * event)
-
WL_EXPORT void notify_motion(struct weston_seat * seat, const struct timespec * time, struct weston_pointer_motion_event * event)
-
static void
run_modifier_bindings
(struct weston_seat *seat, uint32_t old, uint32_t new)¶
-
WL_EXPORT void notify_motion_absolute(struct weston_seat * seat, const struct timespec * time, double x, double y)
-
static unsigned int
peek_next_activate_serial
(struct weston_compositor *c)¶
-
static void
inc_activate_serial
(struct weston_compositor *c)¶
-
WL_EXPORT void weston_view_activate(struct weston_view * view, struct weston_seat * seat, uint32_t flags)
-
WL_EXPORT void notify_button(struct weston_seat * seat, const struct timespec * time, int32_t button, enum wl_pointer_button_state state)
-
WL_EXPORT void notify_axis(struct weston_seat * seat, const struct timespec * time, struct weston_pointer_axis_event * event)
-
WL_EXPORT void notify_axis_source(struct weston_seat * seat, uint32_t source)
-
WL_EXPORT void notify_pointer_frame(struct weston_seat * seat)
-
WL_EXPORT int weston_keyboard_set_locks(struct weston_keyboard * keyboard, uint32_t mask, uint32_t value)
-
WL_EXPORT void notify_modifiers(struct weston_seat * seat, uint32_t serial)
-
static void
update_modifier_state
(struct weston_seat *seat, uint32_t serial, uint32_t key, enum wl_keyboard_key_state state)¶
-
WL_EXPORT void weston_keyboard_send_keymap(struct weston_keyboard * kbd, struct wl_resource * resource)
-
static void
send_modifiers
(struct wl_resource *resource, uint32_t serial, struct weston_keyboard *keyboard)¶
-
static struct weston_xkb_info *
weston_xkb_info_create
(struct xkb_keymap *keymap)¶
-
static void
update_keymap
(struct weston_seat *seat)¶
-
WL_EXPORT void notify_key(struct weston_seat * seat, const struct timespec * time, uint32_t key, enum wl_keyboard_key_state state, enum weston_key_state_update update_state)
-
WL_EXPORT void notify_pointer_focus(struct weston_seat * seat, struct weston_output * output, double x, double y)
-
static void
destroy_device_saved_kbd_focus
(struct wl_listener *listener, void *data)¶
-
WL_EXPORT void notify_keyboard_focus_in(struct weston_seat * seat, struct wl_array * keys, enum weston_key_state_update update_state)
-
WL_EXPORT void notify_keyboard_focus_out(struct weston_seat * seat)
-
WL_EXPORT void weston_touch_set_focus(struct weston_touch * touch, struct weston_view * view)
-
static void
process_touch_normal
(struct weston_touch_device *device, const struct timespec *time, int touch_id, double double_x, double double_y, int touch_type)¶
-
static enum weston_touch_mode
get_next_touch_mode
(enum weston_touch_mode from)¶
-
static void
weston_compositor_update_touch_mode
(struct weston_compositor *compositor)¶ Global touch mode update
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
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
- weston_touch_mode
-
void
weston_compositor_set_touch_mode_calib
(struct weston_compositor *compositor) Start transition to calibrator touch event handling
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
- 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.
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 double_x and double_y are used for normal operation.
- Parameters
device
: The physical device that generated the event.time
: The event timestamp.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.norm
: Normalized device X, Y coordinates in calibration space, or NULL.touch_type
: Either WL_TOUCH_DOWN, WL_TOUCH_UP, or WL_TOUCH_MOTION.
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 void notify_touch_frame(struct weston_touch_device * device)
-
WL_EXPORT void notify_touch_cancel(struct weston_touch_device * device)
-
static int
pointer_cursor_surface_get_label
(struct weston_surface *surface, char *buf, size_t len)¶
-
static void
pointer_cursor_surface_committed
(struct weston_surface *es, int32_t dx, int32_t dy)¶
-
static void
pointer_set_cursor
(struct wl_client *client, struct wl_resource *resource, uint32_t serial, struct wl_resource *surface_resource, int32_t x, int32_t y)¶
-
static void
pointer_release
(struct wl_client *client, struct wl_resource *resource)¶
-
static void
seat_get_pointer
(struct wl_client *client, struct wl_resource *resource, uint32_t id)¶
-
static void
destroy_keyboard_resource
(struct wl_resource *resource)¶
-
static void
keyboard_release
(struct wl_client *client, struct wl_resource *resource)¶
-
static bool
should_send_modifiers_to_client
(struct weston_seat *seat, struct wl_client *client)¶
-
static void
seat_get_keyboard
(struct wl_client *client, struct wl_resource *resource, uint32_t id)¶
-
static void
destroy_touch_resource
(struct wl_resource *resource)¶
-
static void
touch_release
(struct wl_client *client, struct wl_resource *resource)¶
-
static void
seat_get_touch
(struct wl_client *client, struct wl_resource *resource, uint32_t id)¶
-
static void
seat_release
(struct wl_client *client, struct wl_resource *resource)¶
-
static void
bind_seat
(struct wl_client *client, void *data, uint32_t version, uint32_t id)¶
-
static void
relative_pointer_destroy
(struct wl_client *client, struct wl_resource *resource)¶
-
static void
relative_pointer_manager_destroy
(struct wl_client *client, struct wl_resource *resource)¶
-
static void
relative_pointer_manager_get_relative_pointer
(struct wl_client *client, struct wl_resource *resource, uint32_t id, struct wl_resource *pointer_resource)¶
-
static void
bind_relative_pointer_manager
(struct wl_client *client, void *data, uint32_t version, uint32_t id)¶
-
WL_EXPORT int weston_compositor_set_xkb_rule_names(struct weston_compositor * ec, struct xkb_rule_names * names)
-
void
weston_compositor_xkb_destroy
(struct weston_compositor *ec)
-
static int
weston_compositor_build_global_keymap
(struct weston_compositor *ec)¶
-
WL_EXPORT void weston_seat_update_keymap(struct weston_seat * seat, struct xkb_keymap * keymap)
-
WL_EXPORT int weston_seat_init_keyboard(struct weston_seat * seat, struct xkb_keymap * keymap)
-
static void
weston_keyboard_reset_state
(struct weston_keyboard *keyboard)¶
-
WL_EXPORT void weston_seat_release_keyboard(struct weston_seat * seat)
-
WL_EXPORT void weston_seat_init_pointer(struct weston_seat * seat)
-
WL_EXPORT void weston_seat_release_pointer(struct weston_seat * seat)
-
WL_EXPORT void weston_seat_init_touch(struct weston_seat * seat)
-
WL_EXPORT void weston_seat_release_touch(struct weston_seat * seat)
-
WL_EXPORT void weston_seat_init(struct weston_seat * seat, struct weston_compositor * ec, const char * seat_name)
-
WL_EXPORT void weston_seat_release(struct weston_seat * seat)
-
WL_EXPORT struct weston_keyboard* weston_seat_get_keyboard(struct weston_seat * seat)
Get a seat’s keyboard pointer
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.
- Return
- The seat’s keyboard pointer, or NULL if no keyboard is present
- Parameters
seat
: The seat to query
-
WL_EXPORT struct weston_pointer* weston_seat_get_pointer(struct weston_seat * seat)
Get a seat’s pointer pointer
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.
- Return
- The seat’s pointer pointer, or NULL if no pointer device is present
- Parameters
seat
: The seat to query
-
static enum pointer_constraint_type
pointer_constraint_get_type
(struct weston_pointer_constraint *constraint)¶
-
static void
pointer_constraint_notify_activated
(struct weston_pointer_constraint *constraint)¶
-
static void
pointer_constraint_notify_deactivated
(struct weston_pointer_constraint *constraint)¶
-
static struct weston_pointer_constraint *
get_pointer_constraint_for_pointer
(struct weston_surface *surface, struct weston_pointer *pointer)¶
-
WL_EXPORT struct weston_touch* weston_seat_get_touch(struct weston_seat * seat)
Get a seat’s touch pointer
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.
- Return
- The seat’s touch pointer, or NULL if no touch device is present
- Parameters
seat
: The seat to query
-
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
seat
: The seat to query
-
static void
enable_pointer_constraint
(struct weston_pointer_constraint *constraint, struct weston_view *view)¶
-
static bool
is_pointer_constraint_enabled
(struct weston_pointer_constraint *constraint)¶
-
static void
weston_pointer_constraint_disable
(struct weston_pointer_constraint *constraint)¶
-
void
weston_pointer_constraint_destroy
(struct weston_pointer_constraint *constraint)
-
static void
disable_pointer_constraint
(struct weston_pointer_constraint *constraint)¶
-
static bool
is_within_constraint_region
(struct weston_pointer_constraint *constraint, wl_fixed_t sx, wl_fixed_t sy)¶
-
static void
maybe_enable_pointer_constraint
(struct weston_pointer_constraint *constraint)¶
-
static void
locked_pointer_grab_pointer_focus
(struct weston_pointer_grab *grab)¶
-
static void
locked_pointer_grab_pointer_motion
(struct weston_pointer_grab *grab, const struct timespec *time, struct weston_pointer_motion_event *event)¶
-
static void
locked_pointer_grab_pointer_axis
(struct weston_pointer_grab *grab, const struct timespec *time, struct weston_pointer_axis_event *event)¶
-
static void
locked_pointer_grab_pointer_axis_source
(struct weston_pointer_grab *grab, uint32_t source)¶
-
static void
locked_pointer_grab_pointer_frame
(struct weston_pointer_grab *grab)¶
-
static void
locked_pointer_grab_pointer_cancel
(struct weston_pointer_grab *grab)¶
-
static void
pointer_constraint_constrain_resource_destroyed
(struct wl_resource *resource)¶
-
static void
pointer_constraint_surface_activate
(struct wl_listener *listener, void *data)¶
-
static void
pointer_constraint_pointer_destroyed
(struct wl_listener *listener, void *data)¶
-
static void
pointer_constraint_surface_destroyed
(struct wl_listener *listener, void *data)¶
-
static void
pointer_constraint_surface_committed
(struct wl_listener *listener, void *data)¶
-
static struct weston_pointer_constraint *
weston_pointer_constraint_create
(struct weston_surface *surface, struct weston_pointer *pointer, struct weston_region *region, enum zwp_pointer_constraints_v1_lifetime lifetime, struct wl_resource *cr, const struct weston_pointer_grab_interface *grab_interface)¶
-
static void
init_pointer_constraint
(struct wl_resource *pointer_constraints_resource, uint32_t id, struct weston_surface *surface, struct weston_pointer *pointer, struct weston_region *region, enum zwp_pointer_constraints_v1_lifetime lifetime, const struct wl_interface *interface, const void *implementation, const struct weston_pointer_grab_interface *grab_interface)¶
-
static void
pointer_constraints_destroy
(struct wl_client *client, struct wl_resource *resource)¶
-
static void
locked_pointer_destroy
(struct wl_client *client, struct wl_resource *resource)¶
-
static void
locked_pointer_set_cursor_position_hint
(struct wl_client *client, struct wl_resource *resource, wl_fixed_t surface_x, wl_fixed_t surface_y)¶
-
static void
locked_pointer_set_region
(struct wl_client *client, struct wl_resource *resource, struct wl_resource *region_resource)¶
-
static void
pointer_constraints_lock_pointer
(struct wl_client *client, struct wl_resource *resource, uint32_t id, struct wl_resource *surface_resource, struct wl_resource *pointer_resource, struct wl_resource *region_resource, uint32_t lifetime)¶
-
static void
confined_pointer_grab_pointer_focus
(struct weston_pointer_grab *grab)¶
-
static struct border *
add_border
(struct wl_array *array, double x1, double y1, double x2, double y2, enum motion_direction blocking_dir)¶
-
static int
compare_lines_x
(const void *a, const void *b)¶
-
static void
add_non_overlapping_edges
(pixman_box32_t *boxes, int band_above_start, int band_below_start, int band_below_end, struct wl_array *borders)¶
-
static void
add_band_bottom_edges
(pixman_box32_t *boxes, int band_start, int band_end, struct wl_array *borders)¶
-
static void
region_to_outline
(pixman_region32_t *region, struct wl_array *borders)¶
-
static struct border *
get_closest_border
(struct wl_array *borders, struct line *motion, uint32_t directions)¶
-
static void
weston_pointer_clamp_event_to_region
(struct weston_pointer *pointer, struct weston_pointer_motion_event *event, pixman_region32_t *region, wl_fixed_t *clamped_x, wl_fixed_t *clamped_y)¶
-
static void
confined_pointer_grab_pointer_motion
(struct weston_pointer_grab *grab, const struct timespec *time, struct weston_pointer_motion_event *event)¶
-
static void
confined_pointer_grab_pointer_axis
(struct weston_pointer_grab *grab, const struct timespec *time, struct weston_pointer_axis_event *event)¶
-
static void
confined_pointer_grab_pointer_axis_source
(struct weston_pointer_grab *grab, uint32_t source)¶
-
static void
confined_pointer_grab_pointer_frame
(struct weston_pointer_grab *grab)¶
-
static void
confined_pointer_grab_pointer_cancel
(struct weston_pointer_grab *grab)¶
-
static void
confined_pointer_destroy
(struct wl_client *client, struct wl_resource *resource)¶
-
static void
confined_pointer_set_region
(struct wl_client *client, struct wl_resource *resource, struct wl_resource *region_resource)¶
-
static void
pointer_constraints_confine_pointer
(struct wl_client *client, struct wl_resource *resource, uint32_t id, struct wl_resource *surface_resource, struct wl_resource *pointer_resource, struct wl_resource *region_resource, uint32_t lifetime)¶
-
static void
bind_pointer_constraints
(struct wl_client *client, void *data, uint32_t version, uint32_t id)¶
-
static void
input_timestamps_destroy
(struct wl_client *client, struct wl_resource *resource)¶
-
static void
input_timestamps_manager_destroy
(struct wl_client *client, struct wl_resource *resource)¶
-
static void
input_timestamps_manager_get_keyboard_timestamps
(struct wl_client *client, struct wl_resource *resource, uint32_t id, struct wl_resource *keyboard_resource)¶
-
static void
input_timestamps_manager_get_pointer_timestamps
(struct wl_client *client, struct wl_resource *resource, uint32_t id, struct wl_resource *pointer_resource)¶
-
static void
input_timestamps_manager_get_touch_timestamps
(struct wl_client *client, struct wl_resource *resource, uint32_t id, struct wl_resource *touch_resource)¶
-
static void
bind_input_timestamps_manager
(struct wl_client *client, void *data, uint32_t version, uint32_t id)¶
-
int
weston_input_init
(struct weston_compositor *compositor)
Variables
-
const struct weston_pointer_grab_interface
default_pointer_grab_interface
= { default_grab_pointer_focus, default_grab_pointer_motion, default_grab_pointer_button, default_grab_pointer_axis, default_grab_pointer_axis_source, default_grab_pointer_frame, default_grab_pointer_cancel,}¶
-
const struct weston_touch_grab_interface
default_touch_grab_interface
= { default_grab_touch_down, default_grab_touch_up, default_grab_touch_motion, default_grab_touch_frame, default_grab_touch_cancel,}¶
-
const struct weston_keyboard_grab_interface
default_keyboard_grab_interface
= { default_grab_keyboard_key, default_grab_keyboard_modifiers, default_grab_keyboard_cancel,}¶
-
const struct wl_pointer_interface
pointer_interface
= { pointer_set_cursor, pointer_release}¶
-
const struct wl_keyboard_interface
keyboard_interface
= { keyboard_release}¶
-
const struct wl_touch_interface
touch_interface
= { touch_release}¶
-
const struct wl_seat_interface
seat_interface
= { seat_get_pointer, seat_get_keyboard, seat_get_touch, seat_release,}¶
-
const struct zwp_relative_pointer_v1_interface
relative_pointer_interface
= { relative_pointer_destroy}¶
-
const struct zwp_relative_pointer_manager_v1_interface
relative_pointer_manager
= { relative_pointer_manager_destroy, relative_pointer_manager_get_relative_pointer,}¶
-
static const struct zwp_locked_pointer_v1_interface
locked_pointer_interface
= { locked_pointer_destroy, locked_pointer_set_cursor_position_hint, locked_pointer_set_region,}¶
-
static const struct zwp_confined_pointer_v1_interface
confined_pointer_interface
= { confined_pointer_destroy, confined_pointer_set_region,}¶
-
const struct weston_pointer_grab_interface
locked_pointer_grab_interface
= { locked_pointer_grab_pointer_focus, locked_pointer_grab_pointer_motion, locked_pointer_grab_pointer_button, locked_pointer_grab_pointer_axis, locked_pointer_grab_pointer_axis_source, locked_pointer_grab_pointer_frame, locked_pointer_grab_pointer_cancel,}¶
-
const struct weston_pointer_grab_interface
confined_pointer_grab_interface
= { confined_pointer_grab_pointer_focus, confined_pointer_grab_pointer_motion, confined_pointer_grab_pointer_button, confined_pointer_grab_pointer_axis, confined_pointer_grab_pointer_axis_source, confined_pointer_grab_pointer_frame, confined_pointer_grab_pointer_cancel,}¶
-
const struct zwp_pointer_constraints_v1_interface
pointer_constraints_interface
= { pointer_constraints_destroy, pointer_constraints_lock_pointer, pointer_constraints_confine_pointer,}¶
-
const struct zwp_input_timestamps_v1_interface
input_timestamps_interface
= { input_timestamps_destroy,}¶
-
const struct zwp_input_timestamps_manager_v1_interface
input_timestamps_manager_interface
= { input_timestamps_manager_destroy, input_timestamps_manager_get_keyboard_timestamps, input_timestamps_manager_get_pointer_timestamps, input_timestamps_manager_get_touch_timestamps,}¶
-
struct
vec2d
¶
-
struct
line
¶
-
struct
border
¶
Printing only group?¶
-
group
input
This is the input group
Functions
-
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
- Return
- New touch device, or NULL on failure.
- Parameters
touch
: The parent weston_touch that identifies the seat.syspath
: Unique device name.backend_data
: Backend private data if necessary.ops
: Calibration operations, or NULL for not able to run calibration.
-
WL_EXPORT bool weston_pointer_has_focus_resource(struct weston_pointer * pointer)
Check if the pointer has focused resources.
- Return
- Whether or not this pointer has focused resources
- Parameters
pointer
: The pointer to check for focused resources.
-