mirror of
https://gitlab.freedesktop.org/libinput/libinput.git
synced 2026-03-22 03:20:35 +01:00
Compare commits
39 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1bfbcd8603 | ||
|
|
14dcc65912 | ||
|
|
305387be6f | ||
|
|
65052a92e3 | ||
|
|
200a863dac | ||
|
|
c68345f8b4 | ||
|
|
7e70b0a1b4 | ||
|
|
473563ea1f | ||
|
|
6e60f8fb19 | ||
|
|
9694d91f7c | ||
|
|
3325b8179b | ||
|
|
67312a7c4e | ||
|
|
05eb41b8cc | ||
|
|
652e8e4e56 | ||
|
|
df712c9dbb | ||
|
|
a7736c03f0 | ||
|
|
9c781d07c3 | ||
|
|
e5ab320b0a | ||
|
|
13e82c582e | ||
|
|
88f0ad5a27 | ||
|
|
c13567bb68 | ||
|
|
0488af4b90 | ||
|
|
424e27ff23 | ||
|
|
0ae355ad59 | ||
|
|
6e7a52b87f | ||
|
|
ca0a00d31f | ||
|
|
9c715276a4 | ||
|
|
1543d52a83 | ||
|
|
ffb779cfc5 | ||
|
|
c6bcdcb0a5 | ||
|
|
64d1fa77d4 | ||
|
|
cbbac5ebd0 | ||
|
|
be5c7723b2 | ||
|
|
c8ce949b4e | ||
|
|
1e860c98d3 | ||
|
|
710b4a2fa5 | ||
|
|
90073ea07a | ||
|
|
992a30f0a0 | ||
|
|
cfa64f4912 |
35 changed files with 783 additions and 481 deletions
392
.gitlab-ci.yml
392
.gitlab-ci.yml
|
|
@ -24,12 +24,25 @@
|
||||||
# <distribution>:<version>@activity:
|
# <distribution>:<version>@activity:
|
||||||
# e.g. fedora:29@build-default
|
# e.g. fedora:29@build-default
|
||||||
|
|
||||||
|
include:
|
||||||
|
# Arch container builder template
|
||||||
|
- project: 'wayland/ci-templates'
|
||||||
|
ref: c73dae8b84697ef18e2dbbf4fed7386d9652b0cd # see https://docs.gitlab.com/ee/ci/yaml/#includefile
|
||||||
|
file: '/templates/arch.yml'
|
||||||
|
# Fedora container builder template
|
||||||
|
- project: 'wayland/ci-templates'
|
||||||
|
ref: c73dae8b84697ef18e2dbbf4fed7386d9652b0cd # see https://docs.gitlab.com/ee/ci/yaml/#includefile
|
||||||
|
file: '/templates/fedora.yml'
|
||||||
|
# Ubuntu container builder template
|
||||||
|
- project: 'wayland/ci-templates'
|
||||||
|
ref: c73dae8b84697ef18e2dbbf4fed7386d9652b0cd # see https://docs.gitlab.com/ee/ci/yaml/#includefile
|
||||||
|
file: '/templates/ubuntu.yml'
|
||||||
|
|
||||||
stages:
|
stages:
|
||||||
- bootstrapping # creates the initial container image (optional)
|
- container_prep # rebuild the container images if there is a change
|
||||||
- container_check # check if the current container images are up to date
|
|
||||||
- container_prep # rebuild the container images if previous step failed
|
|
||||||
- build # for actually building things
|
- build # for actually building things
|
||||||
- deploy # trigger wayland's website generation
|
- deploy # trigger wayland's website generation
|
||||||
|
- container_clean # clean up unused container images
|
||||||
|
|
||||||
variables:
|
variables:
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
@ -42,22 +55,35 @@ variables:
|
||||||
# See the documentation here: #
|
# See the documentation here: #
|
||||||
# https://wayland.freedesktop.org/libinput/doc/latest/building_libinput.html #
|
# https://wayland.freedesktop.org/libinput/doc/latest/building_libinput.html #
|
||||||
###############################################################################
|
###############################################################################
|
||||||
FEDORA_RPMS: 'git gcc gcc-c++ pkgconf-pkg-config meson check-devel libudev-devel libevdev-devel doxygen graphviz python3-sphinx python3-recommonmark libwacom-devel cairo-devel gtk3-devel glib2-devel mtdev-devel'
|
FEDORA_RPMS: 'git gcc gcc-c++ pkgconf-pkg-config meson check-devel libudev-devel libevdev-devel doxygen graphviz python3-sphinx python3-recommonmark libwacom-devel cairo-devel gtk3-devel glib2-devel mtdev-devel'
|
||||||
UBUNTU_DEBS: 'git gcc g++ pkg-config meson check libudev-dev libevdev-dev doxygen graphviz python3-sphinx python3-recommonmark python3-sphinx-rtd-theme libwacom-dev libcairo2-dev libgtk-3-dev libglib2.0-dev libmtdev-dev'
|
UBUNTU_CUSTOM_DEBS: 'git gcc g++ pkg-config meson check libudev-dev libevdev-dev doxygen graphviz python3-sphinx python3-recommonmark python3-sphinx-rtd-theme libwacom-dev libcairo2-dev libgtk-3-dev libglib2.0-dev libmtdev-dev'
|
||||||
ARCH_PKGS: 'git gcc pkgconfig meson check libsystemd libevdev doxygen graphviz python-sphinx python-recommonmark libwacom gtk3 mtdev diffutils'
|
ARCH_PKGS: 'git gcc pkgconfig meson check libsystemd libevdev doxygen graphviz python-sphinx python-recommonmark python-sphinx_rtd_theme libwacom gtk3 mtdev diffutils'
|
||||||
FREEBSD_BUILD_PKGS: 'meson'
|
FREEBSD_BUILD_PKGS: 'meson'
|
||||||
FREEBSD_PKGS: 'libepoll-shim libudev-devd libevdev libwacom gtk3 libmtdev '
|
FREEBSD_PKGS: 'libepoll-shim libudev-devd libevdev libwacom gtk3 libmtdev '
|
||||||
############################ end of package lists #############################
|
############################ end of package lists #############################
|
||||||
|
|
||||||
|
# these tags should be updated each time the list of packages is updated
|
||||||
|
# changing these will force rebuilding the associated image
|
||||||
|
# Note: these tags have no meaning and are not tied to a particular
|
||||||
|
# libinput version
|
||||||
|
FEDORA_TAG: '2019-03-15.0'
|
||||||
|
UBUNTU_TAG: '2019-03-15.0'
|
||||||
|
ARCH_TAG: '2019-04-14.0'
|
||||||
|
FREEBSD_TAG: '2019-03-15.0'
|
||||||
|
|
||||||
|
UBUNTU_EXEC: "bash .gitlab-ci/ubuntu_install.sh $UBUNTU_CUSTOM_DEBS"
|
||||||
|
|
||||||
|
UPSTREAM_REPO: libinput/libinput
|
||||||
|
BUILDAH_IMAGE: $CI_REGISTRY/wayland/ci-templates/buildah:latest
|
||||||
|
FEDORA_CONTAINER_IMAGE: $CI_REGISTRY_IMAGE/fedora/$FEDORA_VERSION:$FEDORA_TAG
|
||||||
|
UBUNTU_CONTAINER_IMAGE: $CI_REGISTRY_IMAGE/ubuntu/$UBUNTU_VERSION:$UBUNTU_TAG
|
||||||
|
ARCH_CONTAINER_IMAGE: $CI_REGISTRY_IMAGE/archlinux/rolling:$ARCH_TAG
|
||||||
|
FREEBSD_CONTAINER_IMAGE: $CI_REGISTRY_IMAGE/freebsd/11.2:$FREEBSD_TAG
|
||||||
|
|
||||||
MESON_BUILDDIR: "build dir"
|
MESON_BUILDDIR: "build dir"
|
||||||
NINJA_ARGS: 'test'
|
NINJA_ARGS: 'test'
|
||||||
MESON_ARGS: ''
|
MESON_ARGS: ''
|
||||||
# We do not use CI_PROJECT_NAMESPACE or CI_REGISTRY_IMAGE because we want
|
|
||||||
# forks to use these particular images
|
|
||||||
PROJECT_NAMESPACE: libinput
|
|
||||||
FEDORA_CONTAINER_IMAGE: $CI_REGISTRY/$PROJECT_NAMESPACE/$CI_PROJECT_NAME/fedora/$FEDORA_VERSION
|
|
||||||
UBUNTU_CONTAINER_IMAGE: $CI_REGISTRY/$PROJECT_NAMESPACE/$CI_PROJECT_NAME/ubuntu/$UBUNTU_VERSION
|
|
||||||
ARCH_CONTAINER_IMAGE: $CI_REGISTRY/$PROJECT_NAMESPACE/$CI_PROJECT_NAME/arch/rolling
|
|
||||||
FREEBSD_CONTAINER_IMAGE: $CI_REGISTRY/$PROJECT_NAMESPACE/$CI_PROJECT_NAME/freebsd/11.2
|
|
||||||
# Until we have a VM with full access, we cannot run the test suite runner
|
# Until we have a VM with full access, we cannot run the test suite runner
|
||||||
SKIP_LIBINPUT_TEST_SUITE_RUNNER: 1
|
SKIP_LIBINPUT_TEST_SUITE_RUNNER: 1
|
||||||
# udev isn't available/working properly in the containers
|
# udev isn't available/working properly in the containers
|
||||||
|
|
@ -80,245 +106,98 @@ variables:
|
||||||
- meson configure "$MESON_BUILDDIR"
|
- meson configure "$MESON_BUILDDIR"
|
||||||
- ninja -C "$MESON_BUILDDIR" $NINJA_ARGS
|
- ninja -C "$MESON_BUILDDIR" $NINJA_ARGS
|
||||||
|
|
||||||
# special rule to not expose the container creation runners to other users
|
|
||||||
# than those who have set up the CI to push on the registry.
|
|
||||||
# Users who have write access to libinput/libinput will have write
|
|
||||||
# access to the registry, so the libinput/libinput is a catch-all for
|
|
||||||
# our core developers.
|
|
||||||
#
|
|
||||||
# we can add as many users as we want by adding a new line like:
|
|
||||||
# - $GITLAB_USER_LOGIN == "someone"
|
|
||||||
.restrict_container_creation: &restrict_container_creation
|
|
||||||
only:
|
|
||||||
variables:
|
|
||||||
# Note: this is a set of logical OR, not AND
|
|
||||||
- $CI_PROJECT_PATH == "libinput/libinput"
|
|
||||||
|
|
||||||
#################################################################
|
#################################################################
|
||||||
# #
|
# #
|
||||||
# bootstrapping stage #
|
# container prep stage #
|
||||||
# #
|
|
||||||
#################################################################
|
|
||||||
|
|
||||||
# we need a minimalist image capable of buildah, podman, skopeo, curl,
|
|
||||||
# jq, date and test. Instead of using a full fedora and install the
|
|
||||||
# dependencies, we can build an alpine container through buildah with
|
|
||||||
# the script at `ci/bootstrap.sh`
|
|
||||||
bootstrap:
|
|
||||||
stage: bootstrapping
|
|
||||||
when: manual
|
|
||||||
image: $CI_REGISTRY/$PROJECT_NAMESPACE/$CI_PROJECT_NAME/containers:latest
|
|
||||||
script:
|
|
||||||
- podman login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
|
|
||||||
- bash ci/bootstrap.sh $CI_REGISTRY/$PROJECT_NAMESPACE/$CI_PROJECT_NAME/containers:latest
|
|
||||||
- podman images
|
|
||||||
- podman push --quiet $CI_REGISTRY/$PROJECT_NAMESPACE/$CI_PROJECT_NAME/containers:latest
|
|
||||||
# add an extra tag to the docker registry:
|
|
||||||
- skopeo copy docker://$CI_REGISTRY/$PROJECT_NAMESPACE/$CI_PROJECT_NAME/containers:latest docker://$CI_REGISTRY/$PROJECT_NAMESPACE/$CI_PROJECT_NAME/containers:$CI_JOB_ID
|
|
||||||
<<: *restrict_container_creation
|
|
||||||
|
|
||||||
#################################################################
|
|
||||||
# #
|
|
||||||
# container check stage #
|
|
||||||
# #
|
|
||||||
#################################################################
|
|
||||||
|
|
||||||
.container-check:
|
|
||||||
stage: container_check
|
|
||||||
image: $CI_REGISTRY/$PROJECT_NAMESPACE/$CI_PROJECT_NAME/containers:latest
|
|
||||||
script:
|
|
||||||
# get the full container image name (CURRENT_CONTAINER_IMAGE still has indirections)
|
|
||||||
- CONTAINER_IMAGE=$(eval echo "$CURRENT_CONTAINER_IMAGE")
|
|
||||||
|
|
||||||
# get the date of the current image
|
|
||||||
- IMG_DATE=$(skopeo inspect docker://$CONTAINER_IMAGE | jq -r '.Created' | cut -dT -f1)
|
|
||||||
|
|
||||||
- TODAY_SECS=$(date -u +%s)
|
|
||||||
- IMG_SECS=$(date -u --date="$IMG_DATE" +%s)
|
|
||||||
- echo "today $TODAY_SECS, image $IMG_SECS"
|
|
||||||
- echo "image age $(($TODAY_SECS - $IMG_SECS))s"
|
|
||||||
|
|
||||||
# check if image is less than a week old
|
|
||||||
- test $(($IMG_SECS + 604800)) -gt $TODAY_SECS
|
|
||||||
|
|
||||||
# export an artefact telling the next stage that the image is valid
|
|
||||||
- touch .img_ready
|
|
||||||
artifacts:
|
|
||||||
name: image-$CURRENT_CONTAINER_IMAGE-check
|
|
||||||
expire_in: 6 hrs
|
|
||||||
paths:
|
|
||||||
- .img_ready
|
|
||||||
allow_failure: true
|
|
||||||
<<: *restrict_container_creation
|
|
||||||
|
|
||||||
|
|
||||||
# TODO: check that the RPMS/DEBS are all in the current images
|
|
||||||
|
|
||||||
fedora:28@container-check:
|
|
||||||
extends: .container-check
|
|
||||||
variables:
|
|
||||||
GIT_STRATEGY: none
|
|
||||||
FEDORA_VERSION: 28
|
|
||||||
CURRENT_CONTAINER_IMAGE: $FEDORA_CONTAINER_IMAGE:latest
|
|
||||||
|
|
||||||
fedora:29@container-check:
|
|
||||||
extends: .container-check
|
|
||||||
variables:
|
|
||||||
GIT_STRATEGY: none
|
|
||||||
FEDORA_VERSION: 29
|
|
||||||
CURRENT_CONTAINER_IMAGE: $FEDORA_CONTAINER_IMAGE:latest
|
|
||||||
|
|
||||||
ubuntu:18.10@container-check:
|
|
||||||
extends: .container-check
|
|
||||||
variables:
|
|
||||||
GIT_STRATEGY: none
|
|
||||||
UBUNTU_VERSION: "18.10"
|
|
||||||
CURRENT_CONTAINER_IMAGE: $UBUNTU_CONTAINER_IMAGE:latest
|
|
||||||
|
|
||||||
ubuntu:18.04@container-check:
|
|
||||||
extends: .container-check
|
|
||||||
variables:
|
|
||||||
GIT_STRATEGY: none
|
|
||||||
UBUNTU_VERSION: "18.04"
|
|
||||||
CURRENT_CONTAINER_IMAGE: $UBUNTU_CONTAINER_IMAGE:latest
|
|
||||||
|
|
||||||
arch:rolling@container-check:
|
|
||||||
extends: .container-check
|
|
||||||
variables:
|
|
||||||
GIT_STRATEGY: none
|
|
||||||
CURRENT_CONTAINER_IMAGE: $ARCH_CONTAINER_IMAGE:latest
|
|
||||||
|
|
||||||
freebsd:11.2@container-check:
|
|
||||||
extends: .container-check
|
|
||||||
variables:
|
|
||||||
GIT_STRATEGY: none
|
|
||||||
CURRENT_CONTAINER_IMAGE: $FREEBSD_CONTAINER_IMAGE:latest
|
|
||||||
|
|
||||||
#################################################################
|
|
||||||
# #
|
|
||||||
# container prep stage #
|
|
||||||
# #
|
# #
|
||||||
#################################################################
|
#################################################################
|
||||||
|
|
||||||
#
|
#
|
||||||
# This stage will recreate the container images only if the previous
|
# This stage will recreate the container images only if the image
|
||||||
# stage had a build failure, i.e. the image is too old or if it is
|
# is too old or if it is missing some dependencies.
|
||||||
# missing some dependencies.
|
|
||||||
#
|
#
|
||||||
|
|
||||||
.container-prep:
|
.pull_upstream_or_rebuild: &pull_upstream_or_rebuild
|
||||||
stage: container_prep
|
|
||||||
image: $CI_REGISTRY/$PROJECT_NAMESPACE/$CI_PROJECT_NAME/containers:latest
|
|
||||||
before_script:
|
before_script:
|
||||||
# if the check was successful, we just skip recreating the container image
|
|
||||||
- test -e .img_ready && exit 0
|
|
||||||
|
|
||||||
# log in to the registry
|
# log in to the registry
|
||||||
- podman login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
|
- podman login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
|
||||||
<<: *restrict_container_creation
|
|
||||||
|
|
||||||
.fedora@container-prep:
|
# get the full container image name (DISTRIB_VERSION still has indirections)
|
||||||
extends: .container-prep
|
- IMAGE=$(eval echo "$DISTRIB_FLAVOR/$DISTRIB_VERSION:$TAG")
|
||||||
script:
|
|
||||||
- buildcntr=$(buildah from --quiet fedora:$FEDORA_VERSION)
|
|
||||||
- buildah run $buildcntr dnf upgrade -y
|
|
||||||
- buildah run $buildcntr dnf install -y $FEDORA_RPMS
|
|
||||||
- buildah run $buildcntr dnf clean all
|
|
||||||
- buildah config --workingdir /app $buildcntr
|
|
||||||
# tag the current container
|
|
||||||
- buildah commit --quiet $buildcntr $FEDORA_CONTAINER_IMAGE:latest
|
|
||||||
# clean up the working container
|
|
||||||
- buildah rm $buildcntr
|
|
||||||
|
|
||||||
# push the container image to the libinput registry
|
- |
|
||||||
- podman push --quiet $FEDORA_CONTAINER_IMAGE:latest
|
# force rebuild if schedule, reuse otherwise
|
||||||
- skopeo copy docker://$FEDORA_CONTAINER_IMAGE:latest docker://$FEDORA_CONTAINER_IMAGE:$CI_JOB_ID
|
if [[ $CI_PIPELINE_SOURCE != "schedule" ]] ;
|
||||||
|
then
|
||||||
|
# pull the latest upstream image if it exists
|
||||||
|
skopeo copy docker://$CI_REGISTRY/$UPSTREAM_REPO/$IMAGE \
|
||||||
|
docker://$CI_REGISTRY_IMAGE/$IMAGE && exit 0 || true ;
|
||||||
|
|
||||||
|
# check if our image is already in the current registry
|
||||||
|
skopeo inspect docker://$CI_REGISTRY_IMAGE/$IMAGE > /dev/null && exit 0 || true ;
|
||||||
|
fi
|
||||||
|
|
||||||
fedora:28@container-prep:
|
fedora:28@container-prep:
|
||||||
extends: .fedora@container-prep
|
extends: .fedora@container-build
|
||||||
|
stage: container_prep
|
||||||
variables:
|
variables:
|
||||||
GIT_STRATEGY: none
|
GIT_STRATEGY: none
|
||||||
FEDORA_VERSION: 28
|
FEDORA_VERSION: 28
|
||||||
dependencies:
|
DISTRIB_FLAVOR: fedora
|
||||||
# Note: we can not use $FEDORA_VERSION here
|
DISTRIB_VERSION: $FEDORA_VERSION
|
||||||
- fedora:28@container-check
|
TAG: $FEDORA_TAG
|
||||||
|
<<: *pull_upstream_or_rebuild
|
||||||
|
|
||||||
fedora:29@container-prep:
|
fedora:29@container-prep:
|
||||||
extends: .fedora@container-prep
|
extends: .fedora@container-build
|
||||||
|
stage: container_prep
|
||||||
variables:
|
variables:
|
||||||
GIT_STRATEGY: none
|
GIT_STRATEGY: none
|
||||||
FEDORA_VERSION: 29
|
FEDORA_VERSION: 29
|
||||||
dependencies:
|
DISTRIB_FLAVOR: fedora
|
||||||
# Note: we can not use $FEDORA_VERSION here
|
DISTRIB_VERSION: $FEDORA_VERSION
|
||||||
- fedora:29@container-check
|
TAG: $FEDORA_TAG
|
||||||
|
<<: *pull_upstream_or_rebuild
|
||||||
|
|
||||||
.ubuntu@container-prep:
|
|
||||||
extends: .container-prep
|
|
||||||
script:
|
|
||||||
- buildcntr=$(buildah from --quiet ubuntu:$UBUNTU_VERSION)
|
|
||||||
- buildah run $buildcntr env DEBIAN_FRONTEND=noninteractive apt-get update
|
|
||||||
- buildah run $buildcntr env DEBIAN_FRONTEND=noninteractive apt-get install -y software-properties-common
|
|
||||||
- buildah run $buildcntr env DEBIAN_FRONTEND=noninteractive add-apt-repository universe
|
|
||||||
- buildah run $buildcntr env DEBIAN_FRONTEND=noninteractive apt-get update
|
|
||||||
- buildah run $buildcntr env DEBIAN_FRONTEND=noninteractive apt-get install -y $UBUNTU_DEBS
|
|
||||||
- buildah run $buildcntr env DEBIAN_FRONTEND=noninteractive apt-get clean
|
|
||||||
- buildah config --workingdir /app $buildcntr
|
|
||||||
# tag the current container
|
|
||||||
- buildah commit --quiet $buildcntr $UBUNTU_CONTAINER_IMAGE:latest
|
|
||||||
# clean up the working container
|
|
||||||
- buildah rm $buildcntr
|
|
||||||
|
|
||||||
# push the container image to the libinput registry
|
|
||||||
- podman push --quiet $UBUNTU_CONTAINER_IMAGE:latest
|
|
||||||
- skopeo copy docker://$UBUNTU_CONTAINER_IMAGE:latest docker://$UBUNTU_CONTAINER_IMAGE:$CI_JOB_ID
|
|
||||||
|
|
||||||
ubuntu:18.10@container-prep:
|
ubuntu:18.10@container-prep:
|
||||||
extends: .ubuntu@container-prep
|
extends: .ubuntu@container-build
|
||||||
|
stage: container_prep
|
||||||
variables:
|
variables:
|
||||||
GIT_STRATEGY: none
|
GIT_STRATEGY: none
|
||||||
UBUNTU_VERSION: "18.10"
|
UBUNTU_VERSION: "18.10"
|
||||||
dependencies:
|
DISTRIB_FLAVOR: ubuntu
|
||||||
# Note: we can not use $UBUNTU_VERSION here
|
DISTRIB_VERSION: $UBUNTU_VERSION
|
||||||
- ubuntu:18.10@container-check
|
TAG: $UBUNTU_TAG
|
||||||
|
<<: *pull_upstream_or_rebuild
|
||||||
|
|
||||||
ubuntu:18.04@container-prep:
|
ubuntu:18.04@container-prep:
|
||||||
extends: .ubuntu@container-prep
|
extends: .ubuntu@container-build
|
||||||
|
stage: container_prep
|
||||||
variables:
|
variables:
|
||||||
GIT_STRATEGY: none
|
GIT_STRATEGY: none
|
||||||
UBUNTU_VERSION: "18.04"
|
UBUNTU_VERSION: "18.04"
|
||||||
dependencies:
|
DISTRIB_FLAVOR: ubuntu
|
||||||
# Note: we can not use $UBUNTU_VERSION here
|
DISTRIB_VERSION: $UBUNTU_VERSION
|
||||||
- ubuntu:18.04@container-check
|
TAG: $UBUNTU_TAG
|
||||||
|
<<: *pull_upstream_or_rebuild
|
||||||
|
|
||||||
.arch@container-prep:
|
|
||||||
extends: .container-prep
|
|
||||||
script:
|
|
||||||
- buildcntr=$(buildah from --quiet archlinux/base)
|
|
||||||
- buildah run $buildcntr pacman -S --refresh
|
|
||||||
- buildah run $buildcntr pacman -S --sysupgrade --noconfirm
|
|
||||||
- buildah run $buildcntr pacman -S --noconfirm $ARCH_PKGS
|
|
||||||
# in case it doesn't exist yet, otherwise pacman clean fails
|
|
||||||
- buildah run $buildcntr mkdir -p /var/cache/pacman/pkg
|
|
||||||
- buildah run $buildcntr pacman -S --clean --noconfirm
|
|
||||||
- buildah config --workingdir /app $buildcntr
|
|
||||||
# tag the current container
|
|
||||||
- buildah commit --quiet $buildcntr $ARCH_CONTAINER_IMAGE:latest
|
|
||||||
# clean up the working container
|
|
||||||
- buildah rm $buildcntr
|
|
||||||
|
|
||||||
# push the container image to the libinput registry
|
|
||||||
- podman push --quiet $ARCH_CONTAINER_IMAGE:latest
|
|
||||||
- skopeo copy docker://$ARCH_CONTAINER_IMAGE:latest docker://$ARCH_CONTAINER_IMAGE:$CI_JOB_ID
|
|
||||||
|
|
||||||
arch:rolling@container-prep:
|
arch:rolling@container-prep:
|
||||||
extends: .arch@container-prep
|
extends: .arch@container-build
|
||||||
|
stage: container_prep
|
||||||
variables:
|
variables:
|
||||||
GIT_STRATEGY: none
|
GIT_STRATEGY: none
|
||||||
dependencies:
|
ARCH_VERSION: rolling
|
||||||
- arch:rolling@container-check
|
DISTRIB_FLAVOR: archlinux
|
||||||
|
DISTRIB_VERSION: $ARCH_VERSION
|
||||||
|
TAG: $ARCH_TAG
|
||||||
|
<<: *pull_upstream_or_rebuild
|
||||||
|
|
||||||
.freebsd@container-prep:
|
.freebsd@container-prep:
|
||||||
extends: .container-prep
|
stage: container_prep
|
||||||
|
image: $BUILDAH_IMAGE
|
||||||
|
<<: *pull_upstream_or_rebuild
|
||||||
script:
|
script:
|
||||||
- buildcntr=$(buildah from --quiet myfreeweb/freebsd-cross:latest)
|
- buildcntr=$(buildah from --quiet myfreeweb/freebsd-cross:latest)
|
||||||
- buildah run $buildcntr apk add --no-cache $FREEBSD_BUILD_PKGS
|
- buildah run $buildcntr apk add --no-cache $FREEBSD_BUILD_PKGS
|
||||||
|
|
@ -326,75 +205,49 @@ arch:rolling@container-prep:
|
||||||
- buildah run $buildcntr pkg -r /freebsd install -y $FREEBSD_PKGS
|
- buildah run $buildcntr pkg -r /freebsd install -y $FREEBSD_PKGS
|
||||||
- buildah config --workingdir /app $buildcntr
|
- buildah config --workingdir /app $buildcntr
|
||||||
# tag the current container
|
# tag the current container
|
||||||
- buildah commit --quiet $buildcntr $FREEBSD_CONTAINER_IMAGE:latest
|
- buildah commit --quiet $buildcntr $FREEBSD_CONTAINER_IMAGE
|
||||||
# clean up the working container
|
# clean up the working container
|
||||||
- buildah rm $buildcntr
|
- buildah rm $buildcntr
|
||||||
|
|
||||||
# push the container image to the libinput registry
|
# push the container image to the libinput registry
|
||||||
- podman push --quiet $FREEBSD_CONTAINER_IMAGE:latest
|
- podman push --quiet $FREEBSD_CONTAINER_IMAGE
|
||||||
- skopeo copy docker://$FREEBSD_CONTAINER_IMAGE:latest docker://$FREEBSD_CONTAINER_IMAGE:$CI_JOB_ID
|
- skopeo copy docker://$FREEBSD_CONTAINER_IMAGE docker://$CI_REGISTRY_IMAGE/freebsd/$FREEBSD_VERSION:$CI_JOB_ID
|
||||||
|
|
||||||
freebsd:11.2@container-prep:
|
freebsd:11.2@container-prep:
|
||||||
extends: .freebsd@container-prep
|
extends: .freebsd@container-prep
|
||||||
variables:
|
variables:
|
||||||
GIT_STRATEGY: none
|
GIT_STRATEGY: none
|
||||||
dependencies:
|
FREEBSD_VERSION: "11.2"
|
||||||
# Note: we can not use $FREEBSD_VERSION here
|
DISTRIB_FLAVOR: freebsd
|
||||||
- freebsd:11.2@container-check
|
DISTRIB_VERSION: $FREEBSD_VERSION
|
||||||
|
TAG: $FREEBSD_TAG
|
||||||
|
|
||||||
# Add some manual runners to be able to recreate the cache on a day
|
|
||||||
# the list of the rpms changed
|
|
||||||
|
|
||||||
fedora:28@force-container-prep:
|
|
||||||
extends: fedora:28@container-prep
|
|
||||||
when: manual
|
|
||||||
dependencies: []
|
|
||||||
|
|
||||||
fedora:29@force-container-prep:
|
|
||||||
extends: fedora:29@container-prep
|
|
||||||
when: manual
|
|
||||||
dependencies: []
|
|
||||||
|
|
||||||
ubuntu:18.10@force-container-prep:
|
|
||||||
extends: ubuntu:18.10@container-prep
|
|
||||||
when: manual
|
|
||||||
dependencies: []
|
|
||||||
|
|
||||||
ubuntu:18.04@force-container-prep:
|
|
||||||
extends: ubuntu:18.04@container-prep
|
|
||||||
when: manual
|
|
||||||
dependencies: []
|
|
||||||
|
|
||||||
arch:rolling@force-container-prep:
|
|
||||||
extends: arch:rolling@container-prep
|
|
||||||
when: manual
|
|
||||||
dependencies: []
|
|
||||||
|
|
||||||
freebsd:11.2@force-container-prep:
|
|
||||||
extends: freebsd:11.2@container-prep
|
|
||||||
when: manual
|
|
||||||
dependencies: []
|
|
||||||
|
|
||||||
#################################################################
|
#################################################################
|
||||||
# #
|
# #
|
||||||
# container clean stage #
|
# container clean stage #
|
||||||
# run during the check stage #
|
# run during the clean stage #
|
||||||
# #
|
# #
|
||||||
#################################################################
|
#################################################################
|
||||||
|
|
||||||
#
|
#
|
||||||
# This stage will look for the container images we currently have in
|
# This stage will look for the container images we currently have in
|
||||||
# the registry and will remove any that are not tagged as 'latest'
|
# the registry and will remove any that are not tagged with the provided
|
||||||
|
# $container_image:$tag
|
||||||
#
|
#
|
||||||
.container-clean:
|
.container-clean:
|
||||||
stage: container_check
|
stage: container_clean
|
||||||
image: $CI_REGISTRY/$PROJECT_NAMESPACE/$CI_PROJECT_NAME/containers:latest
|
image: $BUILDAH_IMAGE
|
||||||
script:
|
script:
|
||||||
# get the full container image name (CURRENT_CONTAINER_IMAGE still has indirections)
|
# get the full container image name (CURRENT_CONTAINER_IMAGE still has indirections)
|
||||||
- CONTAINER_IMAGE=$(eval echo "$CURRENT_CONTAINER_IMAGE")
|
- CONTAINER_IMAGE=$(eval echo "$CURRENT_CONTAINER_IMAGE")
|
||||||
- GITLAB=$(echo $CI_PROJECT_URL | cut -f3 -d/)
|
- GITLAB=$(echo $CI_PROJECT_URL | cut -f3 -d/)
|
||||||
- REPOSITORY=$(echo $CONTAINER_IMAGE | cut -f2- -d/)
|
- REPOSITORY=$(echo $CONTAINER_IMAGE | cut -f2- -d/ | cut -f1 -d:)
|
||||||
- IMAGE_PATH=$(echo $CONTAINER_IMAGE | cut -f1 -d:)
|
- IMAGE_PATH=$(echo $CONTAINER_IMAGE | cut -f1 -d:)
|
||||||
|
- LATEST_TAG=$(echo $CONTAINER_IMAGE | cut -f2 -d:)
|
||||||
|
|
||||||
|
# log in to the registry (read only)
|
||||||
|
- podman login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
|
||||||
|
|
||||||
# get the r/w token from the settings to access the registry
|
# get the r/w token from the settings to access the registry
|
||||||
#
|
#
|
||||||
|
|
@ -416,10 +269,14 @@ freebsd:11.2@force-container-prep:
|
||||||
| sed -r 's/(\{"token":"|"\})//g')
|
| sed -r 's/(\{"token":"|"\})//g')
|
||||||
|
|
||||||
# get the digest of the latest image
|
# get the digest of the latest image
|
||||||
- LATEST_MANIFEST=$(skopeo inspect docker://$IMAGE_PATH:latest | jq -r '.Digest')
|
- LATEST_MANIFEST=$(skopeo inspect docker://$IMAGE_PATH:$LATEST_TAG | jq -r '.Digest')
|
||||||
|
|
||||||
# get the list of tags
|
# get the list of tags
|
||||||
- TAGS=$(skopeo inspect docker://$IMAGE_PATH | jq -r '.RepoTags[]')
|
- TAGS=$(skopeo inspect docker://$IMAGE_PATH:$LATEST_TAG | jq -r '.RepoTags[]')
|
||||||
|
# FIXME: is the above command working properly? If not, use below:
|
||||||
|
# - TAGS=$(curl -X GET -H "accept:application/vnd.docker.distribution.manifest.v2+json"
|
||||||
|
# -H "authorization:Bearer $REGISTRY_TOKEN"
|
||||||
|
# https://$CI_REGISTRY/v2/$REPOSITORY/tags/list | jq -r '.tags[]')
|
||||||
|
|
||||||
# iterate over the tags
|
# iterate over the tags
|
||||||
- for tag in $TAGS;
|
- for tag in $TAGS;
|
||||||
|
|
@ -431,18 +288,13 @@ freebsd:11.2@force-container-prep:
|
||||||
curl https://$CI_REGISTRY/v2/$REPOSITORY/manifests/$MANIFEST --silent
|
curl https://$CI_REGISTRY/v2/$REPOSITORY/manifests/$MANIFEST --silent
|
||||||
-H "accept:application/vnd.docker.distribution.manifest.v2+json"
|
-H "accept:application/vnd.docker.distribution.manifest.v2+json"
|
||||||
-H "authorization:Bearer $REGISTRY_TOKEN"
|
-H "authorization:Bearer $REGISTRY_TOKEN"
|
||||||
--fail --show-error -X DELETE
|
--fail --show-error -X DELETE || true
|
||||||
;fi
|
;fi
|
||||||
;done
|
;done
|
||||||
dependencies: []
|
dependencies: []
|
||||||
allow_failure: true
|
allow_failure: true
|
||||||
<<: *restrict_container_creation
|
only:
|
||||||
|
- schedules
|
||||||
bootstrap@container-clean:
|
|
||||||
extends: .container-clean
|
|
||||||
variables:
|
|
||||||
GIT_STRATEGY: none
|
|
||||||
CURRENT_CONTAINER_IMAGE: $CI_REGISTRY/$PROJECT_NAMESPACE/$CI_PROJECT_NAME/containers
|
|
||||||
|
|
||||||
fedora:28@container-clean:
|
fedora:28@container-clean:
|
||||||
extends: .container-clean
|
extends: .container-clean
|
||||||
|
|
@ -502,7 +354,7 @@ freebsd:11.2@container-clean:
|
||||||
|
|
||||||
.fedora-build@template:
|
.fedora-build@template:
|
||||||
extends: .build@template
|
extends: .build@template
|
||||||
image: $FEDORA_CONTAINER_IMAGE:latest
|
image: $FEDORA_CONTAINER_IMAGE
|
||||||
|
|
||||||
fedora:28@default-build:
|
fedora:28@default-build:
|
||||||
extends: .fedora-build@template
|
extends: .fedora-build@template
|
||||||
|
|
@ -613,7 +465,7 @@ fedora:29@valgrind:
|
||||||
|
|
||||||
.ubuntu@template:
|
.ubuntu@template:
|
||||||
extends: .build@template
|
extends: .build@template
|
||||||
image: $UBUNTU_CONTAINER_IMAGE:latest
|
image: $UBUNTU_CONTAINER_IMAGE
|
||||||
|
|
||||||
ubuntu:18.10@default-build:
|
ubuntu:18.10@default-build:
|
||||||
extends: .ubuntu@template
|
extends: .ubuntu@template
|
||||||
|
|
@ -630,7 +482,7 @@ ubuntu:18.04@default-build:
|
||||||
#
|
#
|
||||||
.arch@template:
|
.arch@template:
|
||||||
extends: .build@template
|
extends: .build@template
|
||||||
image: $ARCH_CONTAINER_IMAGE:latest
|
image: $ARCH_CONTAINER_IMAGE
|
||||||
|
|
||||||
arch:rolling@default-build:
|
arch:rolling@default-build:
|
||||||
extends: .arch@template
|
extends: .arch@template
|
||||||
|
|
@ -640,7 +492,7 @@ arch:rolling@default-build:
|
||||||
#
|
#
|
||||||
.freebsd@template:
|
.freebsd@template:
|
||||||
extends: .build@template
|
extends: .build@template
|
||||||
image: $FREEBSD_CONTAINER_IMAGE:latest
|
image: $FREEBSD_CONTAINER_IMAGE
|
||||||
variables:
|
variables:
|
||||||
MESON_ARGS: '--cross-file freebsd -Ddocumentation=false -Dtests=false -Depoll-dir=/freebsd/usr/local/'
|
MESON_ARGS: '--cross-file freebsd -Ddocumentation=false -Dtests=false -Depoll-dir=/freebsd/usr/local/'
|
||||||
# Can't run FreeBSD tests on Linux machine, so NINJA_ARGS shouldn't be "test"
|
# Can't run FreeBSD tests on Linux machine, so NINJA_ARGS shouldn't be "test"
|
||||||
|
|
@ -654,7 +506,7 @@ freebsd:11.2@default-build:
|
||||||
#
|
#
|
||||||
|
|
||||||
wayland-web:
|
wayland-web:
|
||||||
image: $CI_REGISTRY/$PROJECT_NAMESPACE/$CI_PROJECT_NAME/containers:latest
|
image: $BUILDAH_IMAGE
|
||||||
stage: deploy
|
stage: deploy
|
||||||
script:
|
script:
|
||||||
- curl --request POST
|
- curl --request POST
|
||||||
|
|
|
||||||
13
.gitlab-ci/ubuntu_install.sh
Normal file
13
.gitlab-ci/ubuntu_install.sh
Normal file
|
|
@ -0,0 +1,13 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -e
|
||||||
|
set -x
|
||||||
|
|
||||||
|
export DEBIAN_FRONTEND=noninteractive
|
||||||
|
|
||||||
|
apt-get install -y software-properties-common
|
||||||
|
add-apt-repository universe
|
||||||
|
apt-get update
|
||||||
|
apt-get -y upgrade
|
||||||
|
|
||||||
|
apt-get install -y $@
|
||||||
137
ci/bootstrap.sh
137
ci/bootstrap.sh
|
|
@ -1,137 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
|
|
||||||
# build container
|
|
||||||
|
|
||||||
set -o xtrace
|
|
||||||
|
|
||||||
TAG=$1
|
|
||||||
|
|
||||||
cat > /etc/containers/storage.conf <<EOF
|
|
||||||
[storage]
|
|
||||||
driver = "vfs"
|
|
||||||
EOF
|
|
||||||
|
|
||||||
buildcntr1=$(buildah from --quiet golang:alpine)
|
|
||||||
buildmnt1=$(buildah mount $buildcntr1)
|
|
||||||
|
|
||||||
buildah run $buildcntr1 apk add --update \
|
|
||||||
--no-cache \
|
|
||||||
--repository http://dl-3.alpinelinux.org/alpine/edge/testing/ \
|
|
||||||
bash git make gcc musl-dev glib-dev ostree-dev \
|
|
||||||
bats bzip2 python3-dev \
|
|
||||||
gpgme-dev linux-headers btrfs-progs-dev \
|
|
||||||
libselinux-dev lvm2-dev libseccomp-dev
|
|
||||||
|
|
||||||
# build runc
|
|
||||||
buildah run $buildcntr1 go get github.com/opencontainers/runc
|
|
||||||
buildah config --workingdir /go/src/github.com/opencontainers/runc/ $buildcntr1
|
|
||||||
buildah run $buildcntr1 bash -c 'make'
|
|
||||||
buildah run $buildcntr1 bash -c 'make install'
|
|
||||||
|
|
||||||
# build skopeo
|
|
||||||
buildah run $buildcntr1 git clone --depth 1 --branch master https://github.com/containers/skopeo /go/src/github.com/containers/skopeo
|
|
||||||
buildah config --workingdir /go/src/github.com/containers/skopeo/ $buildcntr1
|
|
||||||
buildah run $buildcntr1 bash -c 'make binary-local'
|
|
||||||
|
|
||||||
# build libpod
|
|
||||||
buildah run $buildcntr1 git clone --depth 1 --branch master https://github.com/containers/libpod /go/src/github.com/containers/libpod
|
|
||||||
buildah config --workingdir /go/src/github.com/containers/libpod/ $buildcntr1
|
|
||||||
buildah run $buildcntr1 bash -c 'make install.tools'
|
|
||||||
buildah run $buildcntr1 bash -c 'make'
|
|
||||||
buildah run $buildcntr1 bash -c 'make install'
|
|
||||||
|
|
||||||
# build buildah
|
|
||||||
buildah run $buildcntr1 git clone --depth 1 --branch master https://github.com/containers/buildah /go/src/github.com/containers/buildah
|
|
||||||
buildah config --workingdir /go/src/github.com/containers/buildah/ $buildcntr1
|
|
||||||
buildah run $buildcntr1 bash -c 'make install.tools'
|
|
||||||
buildah run $buildcntr1 bash -c 'make'
|
|
||||||
buildah run $buildcntr1 bash -c 'make install'
|
|
||||||
|
|
||||||
# build conmon
|
|
||||||
buildah run $buildcntr1 git clone --depth 1 --branch master https://github.com/kubernetes-sigs/cri-o /go/src/github.com/kubernetes-sigs/cri-o
|
|
||||||
buildah config --workingdir /go/src/github.com/kubernetes-sigs/cri-o/ $buildcntr1
|
|
||||||
buildah run $buildcntr1 bash -c 'make install.tools'
|
|
||||||
buildah run $buildcntr1 bash -c 'make'
|
|
||||||
buildah run $buildcntr1 bash -c 'make install'
|
|
||||||
|
|
||||||
|
|
||||||
buildcntr2=$(buildah from --quiet alpine:latest)
|
|
||||||
buildmnt2=$(buildah mount $buildcntr2)
|
|
||||||
buildah run $buildcntr2 apk add --update \
|
|
||||||
--no-cache \
|
|
||||||
--repository http://dl-3.alpinelinux.org/alpine/edge/testing/ \
|
|
||||||
bash jq curl glib gpgme ostree lvm2 libselinux libseccomp \
|
|
||||||
iptables ip6tables
|
|
||||||
cp $buildmnt1/usr/local/sbin/runc $buildmnt2/usr/sbin/runc
|
|
||||||
cp $buildmnt1/go/src/github.com/containers/skopeo/skopeo $buildmnt2/usr/bin/skopeo
|
|
||||||
cp $buildmnt1/usr/local/bin/podman $buildmnt2/usr/bin/podman
|
|
||||||
cp $buildmnt1/usr/local/bin/buildah $buildmnt2/usr/bin/buildah
|
|
||||||
cp $buildmnt1/usr/local/bin/crio $buildmnt2/usr/bin/crio
|
|
||||||
mkdir $buildmnt2/usr/libexec/crio
|
|
||||||
cp $buildmnt1/usr/local/libexec/crio/conmon $buildmnt2/usr/libexec/crio/conmon
|
|
||||||
cp $buildmnt1/usr/local/libexec/crio/pause $buildmnt2/usr/libexec/crio/pause
|
|
||||||
|
|
||||||
mkdir $buildmnt2/etc/containers
|
|
||||||
|
|
||||||
cat > $buildmnt2/etc/containers/registries.conf <<EOF
|
|
||||||
# This is a system-wide configuration file used to
|
|
||||||
# keep track of registries for various container backends.
|
|
||||||
# It adheres to TOML format and does not support recursive
|
|
||||||
# lists of registries.
|
|
||||||
|
|
||||||
# The default location for this configuration file is /etc/containers/registries.conf.
|
|
||||||
|
|
||||||
# The only valid categories are: 'registries.search', 'registries.insecure',
|
|
||||||
# and 'registries.block'.
|
|
||||||
|
|
||||||
[registries.search]
|
|
||||||
registries = ['docker.io', 'registry.fedoraproject.org', 'quay.io', 'registry.centos.org']
|
|
||||||
|
|
||||||
# If you need to access insecure registries, add the registry's fully-qualified name.
|
|
||||||
# An insecure registry is one that does not have a valid SSL certificate or only does HTTP.
|
|
||||||
[registries.insecure]
|
|
||||||
registries = []
|
|
||||||
|
|
||||||
|
|
||||||
# If you need to block pull access from a registry, uncomment the section below
|
|
||||||
# and add the registries fully-qualified name.
|
|
||||||
#
|
|
||||||
# Docker only
|
|
||||||
[registries.block]
|
|
||||||
registries = []
|
|
||||||
EOF
|
|
||||||
|
|
||||||
cat > $buildmnt2/etc/containers/policy.json <<EOF
|
|
||||||
{
|
|
||||||
"default": [
|
|
||||||
{
|
|
||||||
"type": "insecureAcceptAnything"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"transports":
|
|
||||||
{
|
|
||||||
"docker-daemon":
|
|
||||||
{
|
|
||||||
"": [{"type":"insecureAcceptAnything"}]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
EOF
|
|
||||||
|
|
||||||
cat > $buildmnt2/etc/containers/storage.conf <<EOF
|
|
||||||
# This file is is the configuration file for all tools
|
|
||||||
# that use the containers/storage library.
|
|
||||||
# See man 5 containers-storage.conf for more information
|
|
||||||
# The "container storage" table contains all of the server options.
|
|
||||||
[storage]
|
|
||||||
|
|
||||||
# Default Storage Driver
|
|
||||||
driver = "vfs"
|
|
||||||
EOF
|
|
||||||
|
|
||||||
buildah unmount $buildcntr2
|
|
||||||
buildah commit --quiet $buildcntr2 $TAG
|
|
||||||
|
|
||||||
#clean up build
|
|
||||||
|
|
||||||
buildah rm $buildcntr1 $buildcntr2
|
|
||||||
|
|
@ -10,18 +10,33 @@ dd {
|
||||||
}
|
}
|
||||||
|
|
||||||
.title .ingroups {
|
.title .ingroups {
|
||||||
font-size: 200%;
|
font-size: 50%;
|
||||||
}
|
}
|
||||||
|
|
||||||
h1 {
|
h1 {
|
||||||
font-size: 300%;
|
font-size: 150%;
|
||||||
background-image: none;
|
color: #354C7B;
|
||||||
background-color: #D6E5FF;
|
background: none;
|
||||||
padding-left: 10px;
|
border-bottom: 1px solid #879ECB;
|
||||||
|
font-size: 150%;
|
||||||
|
font-weight: normal;
|
||||||
|
padding-top: 8px;
|
||||||
|
padding-bottom: 8px;
|
||||||
|
padding-left: 0px;
|
||||||
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
h2 {
|
h2 {
|
||||||
font-size: 200%;
|
font-size: 120%;
|
||||||
|
color: #354C7B;
|
||||||
|
background: none;
|
||||||
|
border-bottom: 1px solid #879ECB;
|
||||||
|
font-size: 150%;
|
||||||
|
font-weight: normal;
|
||||||
|
padding-top: 8px;
|
||||||
|
padding-bottom: 8px;
|
||||||
|
padding-left: 0px;
|
||||||
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.sm-dox li {
|
.sm-dox li {
|
||||||
|
|
@ -73,6 +88,10 @@ h2 {
|
||||||
background-color: #F0F0F0;
|
background-color: #F0F0F0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
div.header {
|
||||||
|
border: none;
|
||||||
|
}
|
||||||
|
|
||||||
td.fieldname {
|
td.fieldname {
|
||||||
font-family: 'Roboto Mono', monospace;
|
font-family: 'Roboto Mono', monospace;
|
||||||
}
|
}
|
||||||
|
|
@ -94,3 +113,8 @@ a {
|
||||||
color: #2873b0;
|
color: #2873b0;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.navpath ul {
|
||||||
|
background-image: none;
|
||||||
|
background-color: #F0F0F0;
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -183,3 +183,6 @@ AttrEventCodeDisable=EV_ABS;BTN_STYLUS;EV_KEY:0x123;
|
||||||
Disables the evdev event type/code tuples on the device. Entries may be
|
Disables the evdev event type/code tuples on the device. Entries may be
|
||||||
a named event type, or a named event code, or a named event type with a
|
a named event type, or a named event code, or a named event type with a
|
||||||
hexadecimal event code, separated by a single colon.
|
hexadecimal event code, separated by a single colon.
|
||||||
|
AttrPointingStickIntegration=internal|external
|
||||||
|
Indicates the integration of the pointing stick. This is a string enum.
|
||||||
|
Only needed for external pointing sticks. These are rare.
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,7 @@ The most common tools used are:
|
||||||
- ``libinput quirks``: show quirks assigned to a device, see
|
- ``libinput quirks``: show quirks assigned to a device, see
|
||||||
:ref:`here <libinput-quirks>`
|
:ref:`here <libinput-quirks>`
|
||||||
|
|
||||||
Most the tools must be run as root to have access to the kernel's
|
Most of the tools must be run as root to have access to the kernel's
|
||||||
``/dev/input/event*`` device files.
|
``/dev/input/event*`` device files.
|
||||||
|
|
||||||
.. _libinput-list-devices:
|
.. _libinput-list-devices:
|
||||||
|
|
@ -69,7 +69,7 @@ The above listing shows example output for a touchpad. The
|
||||||
default configuration for this device, for options that have more than a
|
default configuration for this device, for options that have more than a
|
||||||
binary state all available options are listed, with the default one prefixed
|
binary state all available options are listed, with the default one prefixed
|
||||||
with an asterisk (``*``). In the example above, the default click method is
|
with an asterisk (``*``). In the example above, the default click method is
|
||||||
button-areas but clickinger is available.
|
button-areas but clickfinger is available.
|
||||||
|
|
||||||
.. note:: This tool is intended for human-consumption and may change its output
|
.. note:: This tool is intended for human-consumption and may change its output
|
||||||
at any time.
|
at any time.
|
||||||
|
|
|
||||||
|
|
@ -27,6 +27,9 @@ required for a touchpad device and how to add the required
|
||||||
change at any time**. Users are advised to :ref:`report a bug <reporting_bugs>`
|
change at any time**. Users are advised to :ref:`report a bug <reporting_bugs>`
|
||||||
with the updated pressure ranges when testing has completed.
|
with the updated pressure ranges when testing has completed.
|
||||||
|
|
||||||
|
.. note:: Most distributions ship ``libinput measure`` in a separate
|
||||||
|
``libinput-utils`` package.
|
||||||
|
|
||||||
Use the ``libinput measure touchpad-pressure`` tool provided by libinput.
|
Use the ``libinput measure touchpad-pressure`` tool provided by libinput.
|
||||||
This tool will search for your touchpad device and print some pressure
|
This tool will search for your touchpad device and print some pressure
|
||||||
statistics, including whether a touch is/was considered logically down.
|
statistics, including whether a touch is/was considered logically down.
|
||||||
|
|
@ -124,6 +127,9 @@ required for a touchpad device and how to add the required
|
||||||
change at any time**. Users are advised to :ref:`report a bug <reporting_bugs>`
|
change at any time**. Users are advised to :ref:`report a bug <reporting_bugs>`
|
||||||
with the updated pressure ranges when testing has completed.
|
with the updated pressure ranges when testing has completed.
|
||||||
|
|
||||||
|
.. note:: Most distributions ship ``libinput measure`` in a separate
|
||||||
|
``libinput-utils`` package.
|
||||||
|
|
||||||
Use the ``libinput measure touch-size`` tool provided by libinput.
|
Use the ``libinput measure touch-size`` tool provided by libinput.
|
||||||
This tool will search for your touchpad device and print some touch size
|
This tool will search for your touchpad device and print some touch size
|
||||||
statistics, including whether a touch is/was considered logically down.
|
statistics, including whether a touch is/was considered logically down.
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
project('libinput', 'c',
|
project('libinput', 'c',
|
||||||
version : '1.13.0',
|
version : '1.13.3',
|
||||||
license : 'MIT/Expat',
|
license : 'MIT/Expat',
|
||||||
default_options : [ 'c_std=gnu99', 'warning_level=2' ],
|
default_options : [ 'c_std=gnu99', 'warning_level=2' ],
|
||||||
meson_version : '>= 0.41.0')
|
meson_version : '>= 0.41.0')
|
||||||
|
|
@ -259,8 +259,8 @@ quirks_data = [
|
||||||
'quirks/30-vendor-microsoft.quirks',
|
'quirks/30-vendor-microsoft.quirks',
|
||||||
'quirks/30-vendor-razer.quirks',
|
'quirks/30-vendor-razer.quirks',
|
||||||
'quirks/30-vendor-synaptics.quirks',
|
'quirks/30-vendor-synaptics.quirks',
|
||||||
'quirks/30-vendor-wacom.quirks',
|
|
||||||
'quirks/30-vendor-vmware.quirks',
|
'quirks/30-vendor-vmware.quirks',
|
||||||
|
'quirks/30-vendor-wacom.quirks',
|
||||||
'quirks/50-system-acer.quirks',
|
'quirks/50-system-acer.quirks',
|
||||||
'quirks/50-system-apple.quirks',
|
'quirks/50-system-apple.quirks',
|
||||||
'quirks/50-system-asus.quirks',
|
'quirks/50-system-asus.quirks',
|
||||||
|
|
@ -271,8 +271,13 @@ quirks_data = [
|
||||||
'quirks/50-system-hp.quirks',
|
'quirks/50-system-hp.quirks',
|
||||||
'quirks/50-system-lenovo.quirks',
|
'quirks/50-system-lenovo.quirks',
|
||||||
'quirks/50-system-system76.quirks',
|
'quirks/50-system-system76.quirks',
|
||||||
|
'quirks/50-system-toshiba.quirks',
|
||||||
]
|
]
|
||||||
|
|
||||||
|
test('quirks-in-meson.build',
|
||||||
|
find_program('quirks/test-quirks-in-meson.build.sh'),
|
||||||
|
args : [meson.source_root()])
|
||||||
|
|
||||||
config_h.set_quoted('LIBINPUT_QUIRKS_FILES', ':'.join(quirks_data))
|
config_h.set_quoted('LIBINPUT_QUIRKS_FILES', ':'.join(quirks_data))
|
||||||
config_h.set_quoted('LIBINPUT_QUIRKS_SRCDIR', dir_src_quirks)
|
config_h.set_quoted('LIBINPUT_QUIRKS_SRCDIR', dir_src_quirks)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -39,3 +39,9 @@ MatchUdevType=mouse
|
||||||
MatchVendor=0x17EF
|
MatchVendor=0x17EF
|
||||||
MatchProduct=0x6049
|
MatchProduct=0x6049
|
||||||
ModelLenovoScrollPoint=1
|
ModelLenovoScrollPoint=1
|
||||||
|
|
||||||
|
[IBM USB Travel Keyboard with Ultra Nav Mouse]
|
||||||
|
MatchUdevType=pointingstick
|
||||||
|
MatchVendor=0x04B3
|
||||||
|
MatchProduct=0x301E
|
||||||
|
AttrTrackpointMultiplier=1.50
|
||||||
|
|
|
||||||
|
|
@ -14,6 +14,14 @@ MatchVendor=0x05AC
|
||||||
MatchBus=bluetooth
|
MatchBus=bluetooth
|
||||||
MatchUdevType=touchpad
|
MatchUdevType=touchpad
|
||||||
ModelAppleTouchpad=1
|
ModelAppleTouchpad=1
|
||||||
|
AttrTouchSizeRange=150:130
|
||||||
|
|
||||||
|
[Apple Touchpads Bluetooth (new vendor ID)]
|
||||||
|
MatchVendor=0x004C
|
||||||
|
MatchBus=bluetooth
|
||||||
|
MatchUdevType=touchpad
|
||||||
|
ModelAppleTouchpad=1
|
||||||
|
AttrTouchSizeRange=150:130
|
||||||
|
|
||||||
[Apple Internal Keyboard]
|
[Apple Internal Keyboard]
|
||||||
MatchName=*Apple Inc. Apple Internal Keyboard*
|
MatchName=*Apple Inc. Apple Internal Keyboard*
|
||||||
|
|
|
||||||
|
|
@ -41,3 +41,9 @@ MatchDMIModalias=dmi:*svnHP:pnHPSpectrex360Convertible15-bl1XX:*
|
||||||
AttrPressureRange=55:40
|
AttrPressureRange=55:40
|
||||||
AttrThumbPressureThreshold=90
|
AttrThumbPressureThreshold=90
|
||||||
AttrPalmPressureThreshold=100
|
AttrPalmPressureThreshold=100
|
||||||
|
|
||||||
|
[HP Spectre x360 Convertible 13-ap0xxx]
|
||||||
|
MatchUdevType=tablet
|
||||||
|
MatchName=ELAN2514:00 04F3:2812
|
||||||
|
MatchDMIModalias=dmi:*svnHP:pnHPSpectrex360Convertible13-ap0xxx:*
|
||||||
|
ModelTabletNoProximityOut=1
|
||||||
|
|
|
||||||
|
|
@ -20,6 +20,11 @@ MatchName=Synaptics tm2964-001
|
||||||
MatchDMIModalias=dmi:*svnLENOVO:*:pvrThinkPadT440p*
|
MatchDMIModalias=dmi:*svnLENOVO:*:pvrThinkPadT440p*
|
||||||
ModelLenovoT450Touchpad=1
|
ModelLenovoT450Touchpad=1
|
||||||
|
|
||||||
|
[Lenovo T480 Trackpoint]
|
||||||
|
MatchName=*TPPS/2 IBM TrackPoint
|
||||||
|
MatchDMIModalias=dmi:*svnLENOVO:*:pvrThinkPadT480:*
|
||||||
|
AttrTrackpointMultiplier=0.4
|
||||||
|
|
||||||
[Lenovo T480s Touchpad]
|
[Lenovo T480s Touchpad]
|
||||||
MatchName=Elan Touchpad
|
MatchName=Elan Touchpad
|
||||||
MatchDMIModalias=dmi:*svnLENOVO:*:pvrThinkPadT480s*
|
MatchDMIModalias=dmi:*svnLENOVO:*:pvrThinkPadT480s*
|
||||||
|
|
@ -40,6 +45,11 @@ MatchName=*TPPS/2 IBM TrackPoint
|
||||||
MatchDMIModalias=dmi:*svnLENOVO:*pvrThinkPadX20??:*
|
MatchDMIModalias=dmi:*svnLENOVO:*pvrThinkPadX20??:*
|
||||||
AttrTrackpointMultiplier=1.25
|
AttrTrackpointMultiplier=1.25
|
||||||
|
|
||||||
|
[Lenovo X230 Trackpoint]
|
||||||
|
MatchName=*TPPS/2 IBM TrackPoint
|
||||||
|
MatchDMIModalias=dmi:*svnLENOVO:*pvrThinkPadX230:*
|
||||||
|
AttrTrackpointMultiplier=0.25
|
||||||
|
|
||||||
[Lenovo P50 Touchpad]
|
[Lenovo P50 Touchpad]
|
||||||
MatchName=SynPS/2 Synaptics TouchPad
|
MatchName=SynPS/2 Synaptics TouchPad
|
||||||
MatchDMIModalias=dmi:*svnLENOVO:*:pvrThinkPadP50*:
|
MatchDMIModalias=dmi:*svnLENOVO:*:pvrThinkPadP50*:
|
||||||
|
|
@ -76,13 +86,20 @@ MatchName=*TPPS/2 Elan TrackPoint*
|
||||||
MatchDMIModalias=dmi:*svnLENOVO:*:pvrThinkPadX1Carbon6th*
|
MatchDMIModalias=dmi:*svnLENOVO:*:pvrThinkPadX1Carbon6th*
|
||||||
AttrTrackpointMultiplier=0.4
|
AttrTrackpointMultiplier=0.4
|
||||||
|
|
||||||
[Lenovo ThinkPad Compact USB Keyboard with TrackPoint]
|
[Lenovo ThinkPad Compact USB Keyboard with TrackPoint (keyboard)]
|
||||||
MatchUdevType=keyboard
|
MatchUdevType=keyboard
|
||||||
MatchBus=usb
|
MatchBus=usb
|
||||||
MatchVendor=0x17EF
|
MatchVendor=0x17EF
|
||||||
MatchProduct=0x6047
|
MatchProduct=0x6047
|
||||||
AttrKeyboardIntegration=external
|
AttrKeyboardIntegration=external
|
||||||
|
|
||||||
|
[Lenovo ThinkPad Compact USB Keyboard with TrackPoint (trackpoint)]
|
||||||
|
MatchUdevType=pointingstick
|
||||||
|
MatchBus=usb
|
||||||
|
MatchVendor=0x17EF
|
||||||
|
MatchProduct=0x6047
|
||||||
|
AttrPointingStickIntegration=external
|
||||||
|
|
||||||
# Lenovo Thinkpad Yoga (not the consumer versions) disables the keyboard
|
# Lenovo Thinkpad Yoga (not the consumer versions) disables the keyboard
|
||||||
# mechanically. We must not disable the keyboard because some keys are
|
# mechanically. We must not disable the keyboard because some keys are
|
||||||
# still accessible on the screen and volume rocker.
|
# still accessible on the screen and volume rocker.
|
||||||
|
|
@ -92,6 +109,11 @@ MatchName=AT Translated Set 2 keyboard
|
||||||
MatchDMIModalias=dmi:*svnLENOVO:*pvrThinkPad*Yoga*:*
|
MatchDMIModalias=dmi:*svnLENOVO:*pvrThinkPad*Yoga*:*
|
||||||
ModelTabletModeNoSuspend=1
|
ModelTabletModeNoSuspend=1
|
||||||
|
|
||||||
|
[Lenovo X1 Yoga Trackpoint 1st gen]
|
||||||
|
MatchName=*TPPS/2 IBM TrackPoint
|
||||||
|
MatchDMIModalias=dmi:*svnLENOVO:*:pvrThinkPadX1Yoga1st:*
|
||||||
|
AttrTrackpointMultiplier=1.25
|
||||||
|
|
||||||
# Lenovo Carbon X1 6th gen (RMI4 only, PS/2 is broken on this device,
|
# Lenovo Carbon X1 6th gen (RMI4 only, PS/2 is broken on this device,
|
||||||
# sends bogus ABS_MT_TOOL_TYPE events for MT_TOOL_PALM
|
# sends bogus ABS_MT_TOOL_TYPE events for MT_TOOL_PALM
|
||||||
[Lenovo Carbon X1 6th gen]
|
[Lenovo Carbon X1 6th gen]
|
||||||
|
|
|
||||||
5
quirks/test-quirks-in-meson.build.sh
Executable file
5
quirks/test-quirks-in-meson.build.sh
Executable file
|
|
@ -0,0 +1,5 @@
|
||||||
|
#!/bin/bash -e
|
||||||
|
|
||||||
|
pushd "$1" > /dev/null
|
||||||
|
diff -u1 <(grep -o 'quirks/.*\.quirks' meson.build) <(ls quirks/*.quirks)
|
||||||
|
popd > /dev/null
|
||||||
|
|
@ -311,7 +311,7 @@ fallback_flush_mt_down(struct fallback_dispatch *dispatch,
|
||||||
if (seat_slot == -1)
|
if (seat_slot == -1)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
seat->slot_map |= 1 << seat_slot;
|
seat->slot_map |= bit(seat_slot);
|
||||||
point = slot->point;
|
point = slot->point;
|
||||||
slot->hysteresis_center = point;
|
slot->hysteresis_center = point;
|
||||||
evdev_transform_absolute(device, &point);
|
evdev_transform_absolute(device, &point);
|
||||||
|
|
@ -374,7 +374,7 @@ fallback_flush_mt_up(struct fallback_dispatch *dispatch,
|
||||||
if (seat_slot == -1)
|
if (seat_slot == -1)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
seat->slot_map &= ~(1 << seat_slot);
|
seat->slot_map &= ~bit(seat_slot);
|
||||||
|
|
||||||
touch_notify_touch_up(base, time, slot_idx, seat_slot);
|
touch_notify_touch_up(base, time, slot_idx, seat_slot);
|
||||||
|
|
||||||
|
|
@ -402,7 +402,7 @@ fallback_flush_mt_cancel(struct fallback_dispatch *dispatch,
|
||||||
if (seat_slot == -1)
|
if (seat_slot == -1)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
seat->slot_map &= ~(1 << seat_slot);
|
seat->slot_map &= ~bit(seat_slot);
|
||||||
|
|
||||||
touch_notify_touch_cancel(base, time, slot_idx, seat_slot);
|
touch_notify_touch_cancel(base, time, slot_idx, seat_slot);
|
||||||
|
|
||||||
|
|
@ -434,7 +434,7 @@ fallback_flush_st_down(struct fallback_dispatch *dispatch,
|
||||||
if (seat_slot == -1)
|
if (seat_slot == -1)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
seat->slot_map |= 1 << seat_slot;
|
seat->slot_map |= bit(seat_slot);
|
||||||
|
|
||||||
point = dispatch->abs.point;
|
point = dispatch->abs.point;
|
||||||
evdev_transform_absolute(device, &point);
|
evdev_transform_absolute(device, &point);
|
||||||
|
|
@ -484,7 +484,7 @@ fallback_flush_st_up(struct fallback_dispatch *dispatch,
|
||||||
if (seat_slot == -1)
|
if (seat_slot == -1)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
seat->slot_map &= ~(1 << seat_slot);
|
seat->slot_map &= ~bit(seat_slot);
|
||||||
|
|
||||||
touch_notify_touch_up(base, time, -1, seat_slot);
|
touch_notify_touch_up(base, time, -1, seat_slot);
|
||||||
|
|
||||||
|
|
@ -509,7 +509,7 @@ fallback_flush_st_cancel(struct fallback_dispatch *dispatch,
|
||||||
if (seat_slot == -1)
|
if (seat_slot == -1)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
seat->slot_map &= ~(1 << seat_slot);
|
seat->slot_map &= ~bit(seat_slot);
|
||||||
|
|
||||||
touch_notify_touch_cancel(base, time, -1, seat_slot);
|
touch_notify_touch_cancel(base, time, -1, seat_slot);
|
||||||
|
|
||||||
|
|
@ -1382,8 +1382,8 @@ fallback_tablet_mode_switch_event(uint64_t time,
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
fallback_keyboard_pair_tablet_mode(struct evdev_device *keyboard,
|
fallback_pair_tablet_mode(struct evdev_device *keyboard,
|
||||||
struct evdev_device *tablet_mode_switch)
|
struct evdev_device *tablet_mode_switch)
|
||||||
{
|
{
|
||||||
struct fallback_dispatch *dispatch =
|
struct fallback_dispatch *dispatch =
|
||||||
fallback_dispatch(keyboard->dispatch);
|
fallback_dispatch(keyboard->dispatch);
|
||||||
|
|
@ -1391,8 +1391,12 @@ fallback_keyboard_pair_tablet_mode(struct evdev_device *keyboard,
|
||||||
if ((keyboard->tags & EVDEV_TAG_EXTERNAL_KEYBOARD))
|
if ((keyboard->tags & EVDEV_TAG_EXTERNAL_KEYBOARD))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if ((keyboard->tags &
|
if ((keyboard->tags & EVDEV_TAG_TRACKPOINT)) {
|
||||||
(EVDEV_TAG_TRACKPOINT|EVDEV_TAG_INTERNAL_KEYBOARD)) == 0)
|
if (keyboard->tags & EVDEV_TAG_EXTERNAL_MOUSE)
|
||||||
|
return;
|
||||||
|
/* This filters out all internal keyboard-like devices (Video
|
||||||
|
* Switch) */
|
||||||
|
} else if ((keyboard->tags & EVDEV_TAG_INTERNAL_KEYBOARD) == 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (evdev_device_has_model_quirk(keyboard,
|
if (evdev_device_has_model_quirk(keyboard,
|
||||||
|
|
@ -1429,7 +1433,7 @@ fallback_interface_device_added(struct evdev_device *device,
|
||||||
struct evdev_device *added_device)
|
struct evdev_device *added_device)
|
||||||
{
|
{
|
||||||
fallback_lid_pair_keyboard(device, added_device);
|
fallback_lid_pair_keyboard(device, added_device);
|
||||||
fallback_keyboard_pair_tablet_mode(device, added_device);
|
fallback_pair_tablet_mode(device, added_device);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
|
||||||
|
|
@ -797,7 +797,7 @@ tp_click_get_default_method(struct tp_dispatch *tp)
|
||||||
|
|
||||||
if (!tp->buttons.is_clickpad)
|
if (!tp->buttons.is_clickpad)
|
||||||
return LIBINPUT_CONFIG_CLICK_METHOD_NONE;
|
return LIBINPUT_CONFIG_CLICK_METHOD_NONE;
|
||||||
else if (libevdev_get_id_vendor(tp->device->evdev) == VENDOR_ID_APPLE)
|
else if (evdev_device_has_model_quirk(device, QUIRK_MODEL_APPLE_TOUCHPAD))
|
||||||
return LIBINPUT_CONFIG_CLICK_METHOD_CLICKFINGER;
|
return LIBINPUT_CONFIG_CLICK_METHOD_CLICKFINGER;
|
||||||
|
|
||||||
return LIBINPUT_CONFIG_CLICK_METHOD_BUTTON_AREAS;
|
return LIBINPUT_CONFIG_CLICK_METHOD_BUTTON_AREAS;
|
||||||
|
|
|
||||||
|
|
@ -28,6 +28,10 @@
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
#include <limits.h>
|
#include <limits.h>
|
||||||
|
|
||||||
|
#if HAVE_LIBWACOM
|
||||||
|
#include <libwacom/libwacom.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "quirks.h"
|
#include "quirks.h"
|
||||||
#include "evdev-mt-touchpad.h"
|
#include "evdev-mt-touchpad.h"
|
||||||
|
|
||||||
|
|
@ -464,6 +468,30 @@ tp_get_delta(struct tp_touch *t)
|
||||||
return delta;
|
return delta;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static inline int32_t
|
||||||
|
rotated(struct tp_dispatch *tp, unsigned int code, int value)
|
||||||
|
{
|
||||||
|
const struct input_absinfo *absinfo;
|
||||||
|
|
||||||
|
if (!tp->device->left_handed.enabled ||
|
||||||
|
!tp->left_handed.rotate)
|
||||||
|
return value;
|
||||||
|
|
||||||
|
switch (code) {
|
||||||
|
case ABS_X:
|
||||||
|
case ABS_MT_POSITION_X:
|
||||||
|
absinfo = tp->device->abs.absinfo_x;
|
||||||
|
break;
|
||||||
|
case ABS_Y:
|
||||||
|
case ABS_MT_POSITION_Y:
|
||||||
|
absinfo = tp->device->abs.absinfo_y;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
abort();
|
||||||
|
}
|
||||||
|
return absinfo->maximum - (value - absinfo->minimum);
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
tp_process_absolute(struct tp_dispatch *tp,
|
tp_process_absolute(struct tp_dispatch *tp,
|
||||||
const struct input_event *e,
|
const struct input_event *e,
|
||||||
|
|
@ -476,7 +504,7 @@ tp_process_absolute(struct tp_dispatch *tp,
|
||||||
evdev_device_check_abs_axis_range(tp->device,
|
evdev_device_check_abs_axis_range(tp->device,
|
||||||
e->code,
|
e->code,
|
||||||
e->value);
|
e->value);
|
||||||
t->point.x = e->value;
|
t->point.x = rotated(tp, e->code, e->value);
|
||||||
t->time = time;
|
t->time = time;
|
||||||
t->dirty = true;
|
t->dirty = true;
|
||||||
tp->queued |= TOUCHPAD_EVENT_MOTION;
|
tp->queued |= TOUCHPAD_EVENT_MOTION;
|
||||||
|
|
@ -485,7 +513,7 @@ tp_process_absolute(struct tp_dispatch *tp,
|
||||||
evdev_device_check_abs_axis_range(tp->device,
|
evdev_device_check_abs_axis_range(tp->device,
|
||||||
e->code,
|
e->code,
|
||||||
e->value);
|
e->value);
|
||||||
t->point.y = e->value;
|
t->point.y = rotated(tp, e->code, e->value);
|
||||||
t->time = time;
|
t->time = time;
|
||||||
t->dirty = true;
|
t->dirty = true;
|
||||||
tp->queued |= TOUCHPAD_EVENT_MOTION;
|
tp->queued |= TOUCHPAD_EVENT_MOTION;
|
||||||
|
|
@ -536,7 +564,7 @@ tp_process_absolute_st(struct tp_dispatch *tp,
|
||||||
evdev_device_check_abs_axis_range(tp->device,
|
evdev_device_check_abs_axis_range(tp->device,
|
||||||
e->code,
|
e->code,
|
||||||
e->value);
|
e->value);
|
||||||
t->point.x = e->value;
|
t->point.x = rotated(tp, e->code, e->value);
|
||||||
t->time = time;
|
t->time = time;
|
||||||
t->dirty = true;
|
t->dirty = true;
|
||||||
tp->queued |= TOUCHPAD_EVENT_MOTION;
|
tp->queued |= TOUCHPAD_EVENT_MOTION;
|
||||||
|
|
@ -545,7 +573,7 @@ tp_process_absolute_st(struct tp_dispatch *tp,
|
||||||
evdev_device_check_abs_axis_range(tp->device,
|
evdev_device_check_abs_axis_range(tp->device,
|
||||||
e->code,
|
e->code,
|
||||||
e->value);
|
e->value);
|
||||||
t->point.y = e->value;
|
t->point.y = rotated(tp, e->code, e->value);
|
||||||
t->time = time;
|
t->time = time;
|
||||||
t->dirty = true;
|
t->dirty = true;
|
||||||
tp->queued |= TOUCHPAD_EVENT_MOTION;
|
tp->queued |= TOUCHPAD_EVENT_MOTION;
|
||||||
|
|
@ -3700,11 +3728,80 @@ tp_change_to_left_handed(struct evdev_device *device)
|
||||||
device->left_handed.enabled = device->left_handed.want_enabled;
|
device->left_handed.enabled = device->left_handed.want_enabled;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static bool
|
||||||
|
tp_init_left_handed_rotation(struct tp_dispatch *tp,
|
||||||
|
struct evdev_device *device)
|
||||||
|
{
|
||||||
|
bool rotate = false;
|
||||||
|
#if HAVE_LIBWACOM
|
||||||
|
WacomDeviceDatabase *db;
|
||||||
|
WacomDevice **devices = NULL,
|
||||||
|
**d;
|
||||||
|
WacomDevice *dev;
|
||||||
|
uint32_t vid = evdev_device_get_id_vendor(device),
|
||||||
|
pid = evdev_device_get_id_product(device);
|
||||||
|
|
||||||
|
db = libwacom_database_new();
|
||||||
|
if (!db) {
|
||||||
|
evdev_log_info(device,
|
||||||
|
"Failed to initialize libwacom context.\n");
|
||||||
|
goto out;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Check if we have a device with the same vid/pid. If not,
|
||||||
|
we need to loop through all devices and check their paired
|
||||||
|
device. */
|
||||||
|
dev = libwacom_new_from_usbid(db, vid, pid, NULL);
|
||||||
|
if (dev) {
|
||||||
|
rotate = libwacom_is_reversible(dev);
|
||||||
|
libwacom_destroy(dev);
|
||||||
|
goto out;
|
||||||
|
}
|
||||||
|
|
||||||
|
devices = libwacom_list_devices_from_database(db, NULL);
|
||||||
|
if (!devices)
|
||||||
|
goto out;
|
||||||
|
d = devices;
|
||||||
|
while(*d) {
|
||||||
|
const WacomMatch *paired;
|
||||||
|
|
||||||
|
paired = libwacom_get_paired_device(*d);
|
||||||
|
if (paired &&
|
||||||
|
libwacom_match_get_vendor_id(paired) == vid &&
|
||||||
|
libwacom_match_get_product_id(paired) == pid) {
|
||||||
|
rotate = libwacom_is_reversible(dev);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
d++;
|
||||||
|
}
|
||||||
|
|
||||||
|
free(devices);
|
||||||
|
out:
|
||||||
|
if (db)
|
||||||
|
libwacom_database_destroy(db);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
return rotate;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
tp_init_left_handed(struct tp_dispatch *tp,
|
||||||
|
struct evdev_device *device)
|
||||||
|
{
|
||||||
|
bool want_left_handed = true;
|
||||||
|
|
||||||
|
if (device->model_flags & EVDEV_MODEL_APPLE_TOUCHPAD_ONEBUTTON)
|
||||||
|
want_left_handed = false;
|
||||||
|
if (want_left_handed)
|
||||||
|
evdev_init_left_handed(device, tp_change_to_left_handed);
|
||||||
|
|
||||||
|
tp->left_handed.rotate = tp_init_left_handed_rotation(tp, device);
|
||||||
|
}
|
||||||
|
|
||||||
struct evdev_dispatch *
|
struct evdev_dispatch *
|
||||||
evdev_mt_touchpad_create(struct evdev_device *device)
|
evdev_mt_touchpad_create(struct evdev_device *device)
|
||||||
{
|
{
|
||||||
struct tp_dispatch *tp;
|
struct tp_dispatch *tp;
|
||||||
bool want_left_handed = true;
|
|
||||||
|
|
||||||
evdev_tag_touchpad(device, device->udev_device);
|
evdev_tag_touchpad(device, device->udev_device);
|
||||||
|
|
||||||
|
|
@ -3723,10 +3820,7 @@ evdev_mt_touchpad_create(struct evdev_device *device)
|
||||||
tp->sendevents.config.get_mode = tp_sendevents_get_mode;
|
tp->sendevents.config.get_mode = tp_sendevents_get_mode;
|
||||||
tp->sendevents.config.get_default_mode = tp_sendevents_get_default_mode;
|
tp->sendevents.config.get_default_mode = tp_sendevents_get_default_mode;
|
||||||
|
|
||||||
if (device->model_flags & EVDEV_MODEL_APPLE_TOUCHPAD_ONEBUTTON)
|
tp_init_left_handed(tp, device);
|
||||||
want_left_handed = false;
|
|
||||||
if (want_left_handed)
|
|
||||||
evdev_init_left_handed(device, tp_change_to_left_handed);
|
|
||||||
|
|
||||||
return &tp->base;
|
return &tp->base;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -485,6 +485,11 @@ struct tp_dispatch {
|
||||||
struct libinput_event_listener listener;
|
struct libinput_event_listener listener;
|
||||||
struct evdev_device *tablet_mode_switch;
|
struct evdev_device *tablet_mode_switch;
|
||||||
} tablet_mode_switch;
|
} tablet_mode_switch;
|
||||||
|
|
||||||
|
struct {
|
||||||
|
/* true if the axes need rotation when left-handed is on*/
|
||||||
|
bool rotate;
|
||||||
|
} left_handed;
|
||||||
};
|
};
|
||||||
|
|
||||||
static inline struct tp_dispatch*
|
static inline struct tp_dispatch*
|
||||||
|
|
|
||||||
34
src/evdev.c
34
src/evdev.c
|
|
@ -50,7 +50,7 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define DEFAULT_WHEEL_CLICK_ANGLE 15
|
#define DEFAULT_WHEEL_CLICK_ANGLE 15
|
||||||
#define DEFAULT_BUTTON_SCROLL_TIMEOUT ms2us(38)
|
#define DEFAULT_BUTTON_SCROLL_TIMEOUT ms2us(200)
|
||||||
|
|
||||||
enum evdev_device_udev_tags {
|
enum evdev_device_udev_tags {
|
||||||
EVDEV_UDEV_TAG_INPUT = bit(0),
|
EVDEV_UDEV_TAG_INPUT = bit(0),
|
||||||
|
|
@ -387,10 +387,34 @@ static void
|
||||||
evdev_tag_trackpoint(struct evdev_device *device,
|
evdev_tag_trackpoint(struct evdev_device *device,
|
||||||
struct udev_device *udev_device)
|
struct udev_device *udev_device)
|
||||||
{
|
{
|
||||||
if (libevdev_has_property(device->evdev,
|
struct quirks_context *quirks;
|
||||||
INPUT_PROP_POINTING_STICK) ||
|
struct quirks *q;
|
||||||
parse_udev_flag(device, udev_device, "ID_INPUT_POINTINGSTICK"))
|
char *prop;
|
||||||
device->tags |= EVDEV_TAG_TRACKPOINT;
|
|
||||||
|
if (!libevdev_has_property(device->evdev,
|
||||||
|
INPUT_PROP_POINTING_STICK) &&
|
||||||
|
!parse_udev_flag(device, udev_device, "ID_INPUT_POINTINGSTICK"))
|
||||||
|
return;
|
||||||
|
|
||||||
|
device->tags |= EVDEV_TAG_TRACKPOINT;
|
||||||
|
|
||||||
|
quirks = evdev_libinput_context(device)->quirks;
|
||||||
|
q = quirks_fetch_for_device(quirks, device->udev_device);
|
||||||
|
if (q && quirks_get_string(q, QUIRK_ATTR_TRACKPOINT_INTEGRATION, &prop)) {
|
||||||
|
if (streq(prop, "internal")) {
|
||||||
|
/* noop, this is the default anyway */
|
||||||
|
} else if (streq(prop, "external")) {
|
||||||
|
device->tags |= EVDEV_TAG_EXTERNAL_MOUSE;
|
||||||
|
evdev_log_info(device,
|
||||||
|
"is an external pointing stick\n");
|
||||||
|
} else {
|
||||||
|
evdev_log_info(device,
|
||||||
|
"tagged with unknown value %s\n",
|
||||||
|
prop);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
quirks_unref(q);
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void
|
static inline void
|
||||||
|
|
|
||||||
244
src/libinput.h
244
src/libinput.h
|
|
@ -90,6 +90,8 @@ struct libinput_seat;
|
||||||
*
|
*
|
||||||
* This struct is refcounted, use libinput_tablet_tool_ref() and
|
* This struct is refcounted, use libinput_tablet_tool_ref() and
|
||||||
* libinput_tablet_tool_unref().
|
* libinput_tablet_tool_unref().
|
||||||
|
*
|
||||||
|
* @since 1.2
|
||||||
*/
|
*/
|
||||||
struct libinput_tablet_tool;
|
struct libinput_tablet_tool;
|
||||||
|
|
||||||
|
|
@ -151,6 +153,8 @@ struct libinput_event_touch;
|
||||||
* LIBINPUT_EVENT_TABLET_TOOL_AXIS, @ref
|
* LIBINPUT_EVENT_TABLET_TOOL_AXIS, @ref
|
||||||
* LIBINPUT_EVENT_TABLET_TOOL_PROXIMITY and @ref
|
* LIBINPUT_EVENT_TABLET_TOOL_PROXIMITY and @ref
|
||||||
* LIBINPUT_EVENT_TABLET_TOOL_BUTTON.
|
* LIBINPUT_EVENT_TABLET_TOOL_BUTTON.
|
||||||
|
*
|
||||||
|
* @since 1.2
|
||||||
*/
|
*/
|
||||||
struct libinput_event_tablet_tool;
|
struct libinput_event_tablet_tool;
|
||||||
|
|
||||||
|
|
@ -162,6 +166,8 @@ struct libinput_event_tablet_tool;
|
||||||
* the tablet pad itself. Valid event types for this event are @ref
|
* the tablet pad itself. Valid event types for this event are @ref
|
||||||
* LIBINPUT_EVENT_TABLET_PAD_BUTTON, @ref LIBINPUT_EVENT_TABLET_PAD_RING and
|
* LIBINPUT_EVENT_TABLET_PAD_BUTTON, @ref LIBINPUT_EVENT_TABLET_PAD_RING and
|
||||||
* @ref LIBINPUT_EVENT_TABLET_PAD_STRIP.
|
* @ref LIBINPUT_EVENT_TABLET_PAD_STRIP.
|
||||||
|
*
|
||||||
|
* @since 1.3
|
||||||
*/
|
*/
|
||||||
struct libinput_event_tablet_pad;
|
struct libinput_event_tablet_pad;
|
||||||
|
|
||||||
|
|
@ -275,6 +281,8 @@ enum libinput_pointer_axis_source {
|
||||||
*
|
*
|
||||||
* The source for a @ref LIBINPUT_EVENT_TABLET_PAD_RING event. See
|
* The source for a @ref LIBINPUT_EVENT_TABLET_PAD_RING event. See
|
||||||
* libinput_event_tablet_pad_get_ring_source() for details.
|
* libinput_event_tablet_pad_get_ring_source() for details.
|
||||||
|
*
|
||||||
|
* @since 1.3
|
||||||
*/
|
*/
|
||||||
enum libinput_tablet_pad_ring_axis_source {
|
enum libinput_tablet_pad_ring_axis_source {
|
||||||
LIBINPUT_TABLET_PAD_RING_SOURCE_UNKNOWN = 1,
|
LIBINPUT_TABLET_PAD_RING_SOURCE_UNKNOWN = 1,
|
||||||
|
|
@ -290,6 +298,8 @@ enum libinput_tablet_pad_ring_axis_source {
|
||||||
*
|
*
|
||||||
* The source for a @ref LIBINPUT_EVENT_TABLET_PAD_STRIP event. See
|
* The source for a @ref LIBINPUT_EVENT_TABLET_PAD_STRIP event. See
|
||||||
* libinput_event_tablet_pad_get_strip_source() for details.
|
* libinput_event_tablet_pad_get_strip_source() for details.
|
||||||
|
*
|
||||||
|
* @since 1.3
|
||||||
*/
|
*/
|
||||||
enum libinput_tablet_pad_strip_axis_source {
|
enum libinput_tablet_pad_strip_axis_source {
|
||||||
LIBINPUT_TABLET_PAD_STRIP_SOURCE_UNKNOWN = 1,
|
LIBINPUT_TABLET_PAD_STRIP_SOURCE_UNKNOWN = 1,
|
||||||
|
|
@ -319,6 +329,8 @@ enum libinput_tablet_pad_strip_axis_source {
|
||||||
* type of the device. For devices with adjustable physical properties
|
* type of the device. For devices with adjustable physical properties
|
||||||
* the tool type remains the same, i.e. putting a Wacom stroke nib into a
|
* the tool type remains the same, i.e. putting a Wacom stroke nib into a
|
||||||
* classic pen leaves the tool type as @ref LIBINPUT_TABLET_TOOL_TYPE_PEN.
|
* classic pen leaves the tool type as @ref LIBINPUT_TABLET_TOOL_TYPE_PEN.
|
||||||
|
*
|
||||||
|
* @since 1.2
|
||||||
*/
|
*/
|
||||||
enum libinput_tablet_tool_type {
|
enum libinput_tablet_tool_type {
|
||||||
LIBINPUT_TABLET_TOOL_TYPE_PEN = 1, /**< A generic pen */
|
LIBINPUT_TABLET_TOOL_TYPE_PEN = 1, /**< A generic pen */
|
||||||
|
|
@ -344,6 +356,8 @@ enum libinput_tablet_tool_type {
|
||||||
* On some hardware a tool goes out of proximity when it ceases to touch the
|
* On some hardware a tool goes out of proximity when it ceases to touch the
|
||||||
* surface. On other hardware, the tool is still detectable within a short
|
* surface. On other hardware, the tool is still detectable within a short
|
||||||
* distance (a few cm) off the surface.
|
* distance (a few cm) off the surface.
|
||||||
|
*
|
||||||
|
* @since 1.2
|
||||||
*/
|
*/
|
||||||
enum libinput_tablet_tool_proximity_state {
|
enum libinput_tablet_tool_proximity_state {
|
||||||
LIBINPUT_TABLET_TOOL_PROXIMITY_STATE_OUT = 0,
|
LIBINPUT_TABLET_TOOL_PROXIMITY_STATE_OUT = 0,
|
||||||
|
|
@ -358,6 +372,8 @@ enum libinput_tablet_tool_proximity_state {
|
||||||
*
|
*
|
||||||
* The tip contact state of a tool is a binary state signalling whether the tool is
|
* The tip contact state of a tool is a binary state signalling whether the tool is
|
||||||
* touching the surface of the tablet device.
|
* touching the surface of the tablet device.
|
||||||
|
*
|
||||||
|
* @since 1.2
|
||||||
*/
|
*/
|
||||||
enum libinput_tablet_tool_tip_state {
|
enum libinput_tablet_tool_tip_state {
|
||||||
LIBINPUT_TABLET_TOOL_TIP_UP = 0,
|
LIBINPUT_TABLET_TOOL_TIP_UP = 0,
|
||||||
|
|
@ -388,6 +404,8 @@ enum libinput_tablet_tool_tip_state {
|
||||||
*
|
*
|
||||||
* This struct is refcounted, use libinput_tablet_pad_mode_group_ref() and
|
* This struct is refcounted, use libinput_tablet_pad_mode_group_ref() and
|
||||||
* libinput_tablet_pad_mode_group_unref().
|
* libinput_tablet_pad_mode_group_unref().
|
||||||
|
*
|
||||||
|
* @since 1.4
|
||||||
*/
|
*/
|
||||||
struct libinput_tablet_pad_mode_group;
|
struct libinput_tablet_pad_mode_group;
|
||||||
|
|
||||||
|
|
@ -403,6 +421,8 @@ struct libinput_tablet_pad_mode_group;
|
||||||
* ring and strip with the correct mode group.
|
* ring and strip with the correct mode group.
|
||||||
*
|
*
|
||||||
* @return the number of mode groups available on this device
|
* @return the number of mode groups available on this device
|
||||||
|
*
|
||||||
|
* @since 1.4
|
||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
libinput_device_tablet_pad_get_num_mode_groups(struct libinput_device *device);
|
libinput_device_tablet_pad_get_num_mode_groups(struct libinput_device *device);
|
||||||
|
|
@ -426,6 +446,8 @@ libinput_device_tablet_pad_get_num_mode_groups(struct libinput_device *device);
|
||||||
* @param index A mode group index
|
* @param index A mode group index
|
||||||
* @return the mode group with the given index or NULL if an invalid index
|
* @return the mode group with the given index or NULL if an invalid index
|
||||||
* is given.
|
* is given.
|
||||||
|
*
|
||||||
|
* @since 1.4
|
||||||
*/
|
*/
|
||||||
struct libinput_tablet_pad_mode_group*
|
struct libinput_tablet_pad_mode_group*
|
||||||
libinput_device_tablet_pad_get_mode_group(struct libinput_device *device,
|
libinput_device_tablet_pad_get_mode_group(struct libinput_device *device,
|
||||||
|
|
@ -440,6 +462,8 @@ libinput_device_tablet_pad_get_mode_group(struct libinput_device *device,
|
||||||
*
|
*
|
||||||
* @param group A previously obtained mode group
|
* @param group A previously obtained mode group
|
||||||
* @return the numeric index this mode group represents, starting at 0
|
* @return the numeric index this mode group represents, starting at 0
|
||||||
|
*
|
||||||
|
* @since 1.4
|
||||||
*/
|
*/
|
||||||
unsigned int
|
unsigned int
|
||||||
libinput_tablet_pad_mode_group_get_index(struct libinput_tablet_pad_mode_group *group);
|
libinput_tablet_pad_mode_group_get_index(struct libinput_tablet_pad_mode_group *group);
|
||||||
|
|
@ -458,6 +482,8 @@ libinput_tablet_pad_mode_group_get_index(struct libinput_tablet_pad_mode_group *
|
||||||
*
|
*
|
||||||
* @param group A previously obtained mode group
|
* @param group A previously obtained mode group
|
||||||
* @return the number of modes available in this mode group
|
* @return the number of modes available in this mode group
|
||||||
|
*
|
||||||
|
* @since 1.4
|
||||||
*/
|
*/
|
||||||
unsigned int
|
unsigned int
|
||||||
libinput_tablet_pad_mode_group_get_num_modes(struct libinput_tablet_pad_mode_group *group);
|
libinput_tablet_pad_mode_group_get_num_modes(struct libinput_tablet_pad_mode_group *group);
|
||||||
|
|
@ -478,6 +504,8 @@ libinput_tablet_pad_mode_group_get_num_modes(struct libinput_tablet_pad_mode_gro
|
||||||
* @return the numeric index of the current mode in this group, starting at 0
|
* @return the numeric index of the current mode in this group, starting at 0
|
||||||
*
|
*
|
||||||
* @see libinput_event_tablet_pad_get_mode
|
* @see libinput_event_tablet_pad_get_mode
|
||||||
|
*
|
||||||
|
* @since 1.4
|
||||||
*/
|
*/
|
||||||
unsigned int
|
unsigned int
|
||||||
libinput_tablet_pad_mode_group_get_mode(struct libinput_tablet_pad_mode_group *group);
|
libinput_tablet_pad_mode_group_get_mode(struct libinput_tablet_pad_mode_group *group);
|
||||||
|
|
@ -491,6 +519,8 @@ libinput_tablet_pad_mode_group_get_mode(struct libinput_tablet_pad_mode_group *g
|
||||||
* @param button A button index, starting at 0
|
* @param button A button index, starting at 0
|
||||||
* @return true if the given button index is part of this mode group or
|
* @return true if the given button index is part of this mode group or
|
||||||
* false otherwise
|
* false otherwise
|
||||||
|
*
|
||||||
|
* @since 1.4
|
||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
libinput_tablet_pad_mode_group_has_button(struct libinput_tablet_pad_mode_group *group,
|
libinput_tablet_pad_mode_group_has_button(struct libinput_tablet_pad_mode_group *group,
|
||||||
|
|
@ -505,6 +535,8 @@ libinput_tablet_pad_mode_group_has_button(struct libinput_tablet_pad_mode_group
|
||||||
* @param ring A ring index, starting at 0
|
* @param ring A ring index, starting at 0
|
||||||
* @return true if the given ring index is part of this mode group or
|
* @return true if the given ring index is part of this mode group or
|
||||||
* false otherwise
|
* false otherwise
|
||||||
|
*
|
||||||
|
* @since 1.4
|
||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
libinput_tablet_pad_mode_group_has_ring(struct libinput_tablet_pad_mode_group *group,
|
libinput_tablet_pad_mode_group_has_ring(struct libinput_tablet_pad_mode_group *group,
|
||||||
|
|
@ -519,6 +551,8 @@ libinput_tablet_pad_mode_group_has_ring(struct libinput_tablet_pad_mode_group *g
|
||||||
* @param strip A strip index, starting at 0
|
* @param strip A strip index, starting at 0
|
||||||
* @return true if the given strip index is part of this mode group or
|
* @return true if the given strip index is part of this mode group or
|
||||||
* false otherwise
|
* false otherwise
|
||||||
|
*
|
||||||
|
* @since 1.4
|
||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
libinput_tablet_pad_mode_group_has_strip(struct libinput_tablet_pad_mode_group *group,
|
libinput_tablet_pad_mode_group_has_strip(struct libinput_tablet_pad_mode_group *group,
|
||||||
|
|
@ -539,6 +573,8 @@ libinput_tablet_pad_mode_group_has_strip(struct libinput_tablet_pad_mode_group *
|
||||||
* @param button A button index, starting at 0
|
* @param button A button index, starting at 0
|
||||||
* @retval non-zero if the button is a mode toggle button for this group, or
|
* @retval non-zero if the button is a mode toggle button for this group, or
|
||||||
* zero otherwise
|
* zero otherwise
|
||||||
|
*
|
||||||
|
* @since 1.4
|
||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
libinput_tablet_pad_mode_group_button_is_toggle(struct libinput_tablet_pad_mode_group *group,
|
libinput_tablet_pad_mode_group_button_is_toggle(struct libinput_tablet_pad_mode_group *group,
|
||||||
|
|
@ -552,6 +588,8 @@ libinput_tablet_pad_mode_group_button_is_toggle(struct libinput_tablet_pad_mode_
|
||||||
*
|
*
|
||||||
* @param group A previously obtained mode group
|
* @param group A previously obtained mode group
|
||||||
* @return The passed mode group
|
* @return The passed mode group
|
||||||
|
*
|
||||||
|
* @since 1.4
|
||||||
*/
|
*/
|
||||||
struct libinput_tablet_pad_mode_group *
|
struct libinput_tablet_pad_mode_group *
|
||||||
libinput_tablet_pad_mode_group_ref(
|
libinput_tablet_pad_mode_group_ref(
|
||||||
|
|
@ -565,6 +603,8 @@ libinput_tablet_pad_mode_group_ref(
|
||||||
*
|
*
|
||||||
* @param group A previously obtained mode group
|
* @param group A previously obtained mode group
|
||||||
* @return NULL if the group was destroyed, otherwise the passed mode group
|
* @return NULL if the group was destroyed, otherwise the passed mode group
|
||||||
|
*
|
||||||
|
* @since 1.4
|
||||||
*/
|
*/
|
||||||
struct libinput_tablet_pad_mode_group *
|
struct libinput_tablet_pad_mode_group *
|
||||||
libinput_tablet_pad_mode_group_unref(
|
libinput_tablet_pad_mode_group_unref(
|
||||||
|
|
@ -581,6 +621,7 @@ libinput_tablet_pad_mode_group_unref(
|
||||||
* @param user_data Caller-specific data pointer
|
* @param user_data Caller-specific data pointer
|
||||||
* @see libinput_tablet_pad_mode_group_get_user_data
|
* @see libinput_tablet_pad_mode_group_get_user_data
|
||||||
*
|
*
|
||||||
|
* @since 1.4
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
libinput_tablet_pad_mode_group_set_user_data(
|
libinput_tablet_pad_mode_group_set_user_data(
|
||||||
|
|
@ -595,6 +636,8 @@ libinput_tablet_pad_mode_group_set_user_data(
|
||||||
* @param group A previously obtained mode group
|
* @param group A previously obtained mode group
|
||||||
* @return Caller-specific data pointer or NULL if none was set
|
* @return Caller-specific data pointer or NULL if none was set
|
||||||
* @see libinput_tablet_pad_mode_group_set_user_data
|
* @see libinput_tablet_pad_mode_group_set_user_data
|
||||||
|
*
|
||||||
|
* @since 1.4
|
||||||
*/
|
*/
|
||||||
void *
|
void *
|
||||||
libinput_tablet_pad_mode_group_get_user_data(
|
libinput_tablet_pad_mode_group_get_user_data(
|
||||||
|
|
@ -608,6 +651,8 @@ libinput_tablet_pad_mode_group_get_user_data(
|
||||||
* off position. If a switch is logically on during initialization, libinput
|
* off position. If a switch is logically on during initialization, libinput
|
||||||
* sends an event of type @ref LIBINPUT_EVENT_SWITCH_TOGGLE with a state
|
* sends an event of type @ref LIBINPUT_EVENT_SWITCH_TOGGLE with a state
|
||||||
* @ref LIBINPUT_SWITCH_STATE_ON.
|
* @ref LIBINPUT_SWITCH_STATE_ON.
|
||||||
|
*
|
||||||
|
* @since 1.7
|
||||||
*/
|
*/
|
||||||
enum libinput_switch_state {
|
enum libinput_switch_state {
|
||||||
LIBINPUT_SWITCH_STATE_OFF = 0,
|
LIBINPUT_SWITCH_STATE_OFF = 0,
|
||||||
|
|
@ -618,6 +663,8 @@ enum libinput_switch_state {
|
||||||
* @ingroup device
|
* @ingroup device
|
||||||
*
|
*
|
||||||
* The type of a switch.
|
* The type of a switch.
|
||||||
|
*
|
||||||
|
* @since 1.7
|
||||||
*/
|
*/
|
||||||
enum libinput_switch {
|
enum libinput_switch {
|
||||||
/**
|
/**
|
||||||
|
|
@ -649,6 +696,8 @@ enum libinput_switch {
|
||||||
* @struct libinput_event_switch
|
* @struct libinput_event_switch
|
||||||
*
|
*
|
||||||
* A switch event representing a changed state in a switch.
|
* A switch event representing a changed state in a switch.
|
||||||
|
*
|
||||||
|
* @since 1.7
|
||||||
*/
|
*/
|
||||||
struct libinput_event_switch;
|
struct libinput_event_switch;
|
||||||
|
|
||||||
|
|
@ -714,6 +763,8 @@ enum libinput_event_type {
|
||||||
* An event of type @ref LIBINPUT_EVENT_TABLET_TOOL_AXIS is sent
|
* An event of type @ref LIBINPUT_EVENT_TABLET_TOOL_AXIS is sent
|
||||||
* when the tip state does not change. See the documentation for
|
* when the tip state does not change. See the documentation for
|
||||||
* @ref LIBINPUT_EVENT_TABLET_TOOL_TIP for more details.
|
* @ref LIBINPUT_EVENT_TABLET_TOOL_TIP for more details.
|
||||||
|
*
|
||||||
|
* @since 1.2
|
||||||
*/
|
*/
|
||||||
LIBINPUT_EVENT_TABLET_TOOL_AXIS = 600,
|
LIBINPUT_EVENT_TABLET_TOOL_AXIS = 600,
|
||||||
/**
|
/**
|
||||||
|
|
@ -739,6 +790,8 @@ enum libinput_event_type {
|
||||||
* down on the stylus are marked as released. Button release events for
|
* down on the stylus are marked as released. Button release events for
|
||||||
* each button that was held down on the stylus are sent before the
|
* each button that was held down on the stylus are sent before the
|
||||||
* proximity out event.
|
* proximity out event.
|
||||||
|
*
|
||||||
|
* @since 1.2
|
||||||
*/
|
*/
|
||||||
LIBINPUT_EVENT_TABLET_TOOL_PROXIMITY,
|
LIBINPUT_EVENT_TABLET_TOOL_PROXIMITY,
|
||||||
/**
|
/**
|
||||||
|
|
@ -762,6 +815,8 @@ enum libinput_event_type {
|
||||||
*
|
*
|
||||||
* If a button state change occurs at the same time as a tip state
|
* If a button state change occurs at the same time as a tip state
|
||||||
* change, the order of events is device-dependent.
|
* change, the order of events is device-dependent.
|
||||||
|
*
|
||||||
|
* @since 1.2
|
||||||
*/
|
*/
|
||||||
LIBINPUT_EVENT_TABLET_TOOL_TIP,
|
LIBINPUT_EVENT_TABLET_TOOL_TIP,
|
||||||
/**
|
/**
|
||||||
|
|
@ -778,6 +833,8 @@ enum libinput_event_type {
|
||||||
* by the tablet pad. See @ref LIBINPUT_EVENT_TABLET_PAD_BUTTON.
|
* by the tablet pad. See @ref LIBINPUT_EVENT_TABLET_PAD_BUTTON.
|
||||||
*
|
*
|
||||||
* @see LIBINPUT_EVENT_TABLET_BUTTON
|
* @see LIBINPUT_EVENT_TABLET_BUTTON
|
||||||
|
*
|
||||||
|
* @since 1.2
|
||||||
*/
|
*/
|
||||||
LIBINPUT_EVENT_TABLET_TOOL_BUTTON,
|
LIBINPUT_EVENT_TABLET_TOOL_BUTTON,
|
||||||
|
|
||||||
|
|
@ -787,17 +844,23 @@ enum libinput_event_type {
|
||||||
*
|
*
|
||||||
* This event is not to be confused with the button events emitted
|
* This event is not to be confused with the button events emitted
|
||||||
* by tools on a tablet (@ref LIBINPUT_EVENT_TABLET_TOOL_BUTTON).
|
* by tools on a tablet (@ref LIBINPUT_EVENT_TABLET_TOOL_BUTTON).
|
||||||
|
*
|
||||||
|
* @since 1.3
|
||||||
*/
|
*/
|
||||||
LIBINPUT_EVENT_TABLET_PAD_BUTTON = 700,
|
LIBINPUT_EVENT_TABLET_PAD_BUTTON = 700,
|
||||||
/**
|
/**
|
||||||
* A status change on a tablet ring with the @ref
|
* A status change on a tablet ring with the @ref
|
||||||
* LIBINPUT_DEVICE_CAP_TABLET_PAD capability.
|
* LIBINPUT_DEVICE_CAP_TABLET_PAD capability.
|
||||||
|
*
|
||||||
|
* @since 1.3
|
||||||
*/
|
*/
|
||||||
LIBINPUT_EVENT_TABLET_PAD_RING,
|
LIBINPUT_EVENT_TABLET_PAD_RING,
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A status change on a strip on a device with the @ref
|
* A status change on a strip on a device with the @ref
|
||||||
* LIBINPUT_DEVICE_CAP_TABLET_PAD capability.
|
* LIBINPUT_DEVICE_CAP_TABLET_PAD capability.
|
||||||
|
*
|
||||||
|
* @since 1.3
|
||||||
*/
|
*/
|
||||||
LIBINPUT_EVENT_TABLET_PAD_STRIP,
|
LIBINPUT_EVENT_TABLET_PAD_STRIP,
|
||||||
|
|
||||||
|
|
@ -808,6 +871,9 @@ enum libinput_event_type {
|
||||||
LIBINPUT_EVENT_GESTURE_PINCH_UPDATE,
|
LIBINPUT_EVENT_GESTURE_PINCH_UPDATE,
|
||||||
LIBINPUT_EVENT_GESTURE_PINCH_END,
|
LIBINPUT_EVENT_GESTURE_PINCH_END,
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @since 1.7
|
||||||
|
*/
|
||||||
LIBINPUT_EVENT_SWITCH_TOGGLE = 900,
|
LIBINPUT_EVENT_SWITCH_TOGGLE = 900,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -935,6 +1001,8 @@ libinput_event_get_gesture_event(struct libinput_event *event);
|
||||||
* The inverse of this function is libinput_event_tablet_tool_get_base_event().
|
* The inverse of this function is libinput_event_tablet_tool_get_base_event().
|
||||||
*
|
*
|
||||||
* @return A tablet tool event, or NULL for other events
|
* @return A tablet tool event, or NULL for other events
|
||||||
|
*
|
||||||
|
* @since 1.2
|
||||||
*/
|
*/
|
||||||
struct libinput_event_tablet_tool *
|
struct libinput_event_tablet_tool *
|
||||||
libinput_event_get_tablet_tool_event(struct libinput_event *event);
|
libinput_event_get_tablet_tool_event(struct libinput_event *event);
|
||||||
|
|
@ -961,6 +1029,8 @@ libinput_event_get_tablet_pad_event(struct libinput_event *event);
|
||||||
* The inverse of this function is libinput_event_switch_get_base_event().
|
* The inverse of this function is libinput_event_switch_get_base_event().
|
||||||
*
|
*
|
||||||
* @return A switch event, or NULL for other events
|
* @return A switch event, or NULL for other events
|
||||||
|
*
|
||||||
|
* @since 1.7
|
||||||
*/
|
*/
|
||||||
struct libinput_event_switch *
|
struct libinput_event_switch *
|
||||||
libinput_event_get_switch_event(struct libinput_event *event);
|
libinput_event_get_switch_event(struct libinput_event *event);
|
||||||
|
|
@ -1823,6 +1893,8 @@ libinput_event_gesture_get_angle_delta(struct libinput_event_gesture *event);
|
||||||
* @ingroup event_tablet
|
* @ingroup event_tablet
|
||||||
*
|
*
|
||||||
* @return The generic libinput_event of this event
|
* @return The generic libinput_event of this event
|
||||||
|
*
|
||||||
|
* @since 1.2
|
||||||
*/
|
*/
|
||||||
struct libinput_event *
|
struct libinput_event *
|
||||||
libinput_event_tablet_tool_get_base_event(struct libinput_event_tablet_tool *event);
|
libinput_event_tablet_tool_get_base_event(struct libinput_event_tablet_tool *event);
|
||||||
|
|
@ -1843,6 +1915,8 @@ libinput_event_tablet_tool_get_base_event(struct libinput_event_tablet_tool *eve
|
||||||
*
|
*
|
||||||
* @param event The libinput tablet tool event
|
* @param event The libinput tablet tool event
|
||||||
* @return 1 if the axis was updated or 0 otherwise
|
* @return 1 if the axis was updated or 0 otherwise
|
||||||
|
*
|
||||||
|
* @since 1.2
|
||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
libinput_event_tablet_tool_x_has_changed(
|
libinput_event_tablet_tool_x_has_changed(
|
||||||
|
|
@ -1864,6 +1938,8 @@ libinput_event_tablet_tool_x_has_changed(
|
||||||
*
|
*
|
||||||
* @param event The libinput tablet tool event
|
* @param event The libinput tablet tool event
|
||||||
* @return 1 if the axis was updated or 0 otherwise
|
* @return 1 if the axis was updated or 0 otherwise
|
||||||
|
*
|
||||||
|
* @since 1.2
|
||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
libinput_event_tablet_tool_y_has_changed(
|
libinput_event_tablet_tool_y_has_changed(
|
||||||
|
|
@ -1885,6 +1961,8 @@ libinput_event_tablet_tool_y_has_changed(
|
||||||
*
|
*
|
||||||
* @param event The libinput tablet tool event
|
* @param event The libinput tablet tool event
|
||||||
* @return 1 if the axis was updated or 0 otherwise
|
* @return 1 if the axis was updated or 0 otherwise
|
||||||
|
*
|
||||||
|
* @since 1.2
|
||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
libinput_event_tablet_tool_pressure_has_changed(
|
libinput_event_tablet_tool_pressure_has_changed(
|
||||||
|
|
@ -1908,6 +1986,8 @@ libinput_event_tablet_tool_pressure_has_changed(
|
||||||
*
|
*
|
||||||
* @param event The libinput tablet tool event
|
* @param event The libinput tablet tool event
|
||||||
* @return 1 if the axis was updated or 0 otherwise
|
* @return 1 if the axis was updated or 0 otherwise
|
||||||
|
*
|
||||||
|
* @since 1.2
|
||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
libinput_event_tablet_tool_distance_has_changed(
|
libinput_event_tablet_tool_distance_has_changed(
|
||||||
|
|
@ -1929,6 +2009,8 @@ libinput_event_tablet_tool_distance_has_changed(
|
||||||
*
|
*
|
||||||
* @param event The libinput tablet tool event
|
* @param event The libinput tablet tool event
|
||||||
* @return 1 if the axis was updated or 0 otherwise
|
* @return 1 if the axis was updated or 0 otherwise
|
||||||
|
*
|
||||||
|
* @since 1.2
|
||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
libinput_event_tablet_tool_tilt_x_has_changed(
|
libinput_event_tablet_tool_tilt_x_has_changed(
|
||||||
|
|
@ -1950,6 +2032,8 @@ libinput_event_tablet_tool_tilt_x_has_changed(
|
||||||
*
|
*
|
||||||
* @param event The libinput tablet tool event
|
* @param event The libinput tablet tool event
|
||||||
* @return 1 if the axis was updated or 0 otherwise
|
* @return 1 if the axis was updated or 0 otherwise
|
||||||
|
*
|
||||||
|
* @since 1.2
|
||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
libinput_event_tablet_tool_tilt_y_has_changed(
|
libinput_event_tablet_tool_tilt_y_has_changed(
|
||||||
|
|
@ -1970,6 +2054,8 @@ libinput_event_tablet_tool_tilt_y_has_changed(
|
||||||
*
|
*
|
||||||
* @param event The libinput tablet tool event
|
* @param event The libinput tablet tool event
|
||||||
* @return 1 if the axis was updated or 0 otherwise
|
* @return 1 if the axis was updated or 0 otherwise
|
||||||
|
*
|
||||||
|
* @since 1.2
|
||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
libinput_event_tablet_tool_rotation_has_changed(
|
libinput_event_tablet_tool_rotation_has_changed(
|
||||||
|
|
@ -1990,6 +2076,8 @@ libinput_event_tablet_tool_rotation_has_changed(
|
||||||
*
|
*
|
||||||
* @param event The libinput tablet tool event
|
* @param event The libinput tablet tool event
|
||||||
* @return 1 if the axis was updated or 0 otherwise
|
* @return 1 if the axis was updated or 0 otherwise
|
||||||
|
*
|
||||||
|
* @since 1.2
|
||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
libinput_event_tablet_tool_slider_has_changed(
|
libinput_event_tablet_tool_slider_has_changed(
|
||||||
|
|
@ -2010,6 +2098,8 @@ libinput_event_tablet_tool_slider_has_changed(
|
||||||
*
|
*
|
||||||
* @param event The libinput tablet tool event
|
* @param event The libinput tablet tool event
|
||||||
* @return 1 if the axis was updated or 0 otherwise
|
* @return 1 if the axis was updated or 0 otherwise
|
||||||
|
*
|
||||||
|
* @since 1.2
|
||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
libinput_event_tablet_tool_wheel_has_changed(
|
libinput_event_tablet_tool_wheel_has_changed(
|
||||||
|
|
@ -2028,6 +2118,8 @@ libinput_event_tablet_tool_wheel_has_changed(
|
||||||
*
|
*
|
||||||
* @param event The libinput tablet tool event
|
* @param event The libinput tablet tool event
|
||||||
* @return The current value of the the axis
|
* @return The current value of the the axis
|
||||||
|
*
|
||||||
|
* @since 1.2
|
||||||
*/
|
*/
|
||||||
double
|
double
|
||||||
libinput_event_tablet_tool_get_x(struct libinput_event_tablet_tool *event);
|
libinput_event_tablet_tool_get_x(struct libinput_event_tablet_tool *event);
|
||||||
|
|
@ -2045,6 +2137,8 @@ libinput_event_tablet_tool_get_x(struct libinput_event_tablet_tool *event);
|
||||||
*
|
*
|
||||||
* @param event The libinput tablet tool event
|
* @param event The libinput tablet tool event
|
||||||
* @return The current value of the the axis
|
* @return The current value of the the axis
|
||||||
|
*
|
||||||
|
* @since 1.2
|
||||||
*/
|
*/
|
||||||
double
|
double
|
||||||
libinput_event_tablet_tool_get_y(struct libinput_event_tablet_tool *event);
|
libinput_event_tablet_tool_get_y(struct libinput_event_tablet_tool *event);
|
||||||
|
|
@ -2062,6 +2156,8 @@ libinput_event_tablet_tool_get_y(struct libinput_event_tablet_tool *event);
|
||||||
*
|
*
|
||||||
* @param event The libinput tablet event
|
* @param event The libinput tablet event
|
||||||
* @return The relative x movement since the last event
|
* @return The relative x movement since the last event
|
||||||
|
*
|
||||||
|
* @since 1.2
|
||||||
*/
|
*/
|
||||||
double
|
double
|
||||||
libinput_event_tablet_tool_get_dx(struct libinput_event_tablet_tool *event);
|
libinput_event_tablet_tool_get_dx(struct libinput_event_tablet_tool *event);
|
||||||
|
|
@ -2079,6 +2175,8 @@ libinput_event_tablet_tool_get_dx(struct libinput_event_tablet_tool *event);
|
||||||
*
|
*
|
||||||
* @param event The libinput tablet event
|
* @param event The libinput tablet event
|
||||||
* @return The relative y movement since the last event
|
* @return The relative y movement since the last event
|
||||||
|
*
|
||||||
|
* @since 1.2
|
||||||
*/
|
*/
|
||||||
double
|
double
|
||||||
libinput_event_tablet_tool_get_dy(struct libinput_event_tablet_tool *event);
|
libinput_event_tablet_tool_get_dy(struct libinput_event_tablet_tool *event);
|
||||||
|
|
@ -2093,6 +2191,8 @@ libinput_event_tablet_tool_get_dy(struct libinput_event_tablet_tool *event);
|
||||||
*
|
*
|
||||||
* @param event The libinput tablet tool event
|
* @param event The libinput tablet tool event
|
||||||
* @return The current value of the the axis
|
* @return The current value of the the axis
|
||||||
|
*
|
||||||
|
* @since 1.2
|
||||||
*/
|
*/
|
||||||
double
|
double
|
||||||
libinput_event_tablet_tool_get_pressure(struct libinput_event_tablet_tool *event);
|
libinput_event_tablet_tool_get_pressure(struct libinput_event_tablet_tool *event);
|
||||||
|
|
@ -2107,6 +2207,8 @@ libinput_event_tablet_tool_get_pressure(struct libinput_event_tablet_tool *event
|
||||||
*
|
*
|
||||||
* @param event The libinput tablet tool event
|
* @param event The libinput tablet tool event
|
||||||
* @return The current value of the the axis
|
* @return The current value of the the axis
|
||||||
|
*
|
||||||
|
* @since 1.2
|
||||||
*/
|
*/
|
||||||
double
|
double
|
||||||
libinput_event_tablet_tool_get_distance(struct libinput_event_tablet_tool *event);
|
libinput_event_tablet_tool_get_distance(struct libinput_event_tablet_tool *event);
|
||||||
|
|
@ -2125,6 +2227,8 @@ libinput_event_tablet_tool_get_distance(struct libinput_event_tablet_tool *event
|
||||||
*
|
*
|
||||||
* @param event The libinput tablet tool event
|
* @param event The libinput tablet tool event
|
||||||
* @return The current value of the axis in degrees
|
* @return The current value of the axis in degrees
|
||||||
|
*
|
||||||
|
* @since 1.2
|
||||||
*/
|
*/
|
||||||
double
|
double
|
||||||
libinput_event_tablet_tool_get_tilt_x(struct libinput_event_tablet_tool *event);
|
libinput_event_tablet_tool_get_tilt_x(struct libinput_event_tablet_tool *event);
|
||||||
|
|
@ -2143,6 +2247,8 @@ libinput_event_tablet_tool_get_tilt_x(struct libinput_event_tablet_tool *event);
|
||||||
*
|
*
|
||||||
* @param event The libinput tablet tool event
|
* @param event The libinput tablet tool event
|
||||||
* @return The current value of the the axis in degrees
|
* @return The current value of the the axis in degrees
|
||||||
|
*
|
||||||
|
* @since 1.2
|
||||||
*/
|
*/
|
||||||
double
|
double
|
||||||
libinput_event_tablet_tool_get_tilt_y(struct libinput_event_tablet_tool *event);
|
libinput_event_tablet_tool_get_tilt_y(struct libinput_event_tablet_tool *event);
|
||||||
|
|
@ -2163,6 +2269,8 @@ libinput_event_tablet_tool_get_tilt_y(struct libinput_event_tablet_tool *event);
|
||||||
*
|
*
|
||||||
* @param event The libinput tablet tool event
|
* @param event The libinput tablet tool event
|
||||||
* @return The current value of the the axis
|
* @return The current value of the the axis
|
||||||
|
*
|
||||||
|
* @since 1.2
|
||||||
*/
|
*/
|
||||||
double
|
double
|
||||||
libinput_event_tablet_tool_get_rotation(struct libinput_event_tablet_tool *event);
|
libinput_event_tablet_tool_get_rotation(struct libinput_event_tablet_tool *event);
|
||||||
|
|
@ -2179,6 +2287,8 @@ libinput_event_tablet_tool_get_rotation(struct libinput_event_tablet_tool *event
|
||||||
*
|
*
|
||||||
* @param event The libinput tablet tool event
|
* @param event The libinput tablet tool event
|
||||||
* @return The current value of the the axis
|
* @return The current value of the the axis
|
||||||
|
*
|
||||||
|
* @since 1.2
|
||||||
*/
|
*/
|
||||||
double
|
double
|
||||||
libinput_event_tablet_tool_get_slider_position(struct libinput_event_tablet_tool *event);
|
libinput_event_tablet_tool_get_slider_position(struct libinput_event_tablet_tool *event);
|
||||||
|
|
@ -2206,6 +2316,8 @@ libinput_event_tablet_tool_get_wheel_delta(
|
||||||
* @return The delta of the wheel, in discrete steps, compared to the last event
|
* @return The delta of the wheel, in discrete steps, compared to the last event
|
||||||
*
|
*
|
||||||
* @see libinput_event_tablet_tool_get_wheel_delta_discrete
|
* @see libinput_event_tablet_tool_get_wheel_delta_discrete
|
||||||
|
*
|
||||||
|
* @since 1.2
|
||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
libinput_event_tablet_tool_get_wheel_delta_discrete(
|
libinput_event_tablet_tool_get_wheel_delta_discrete(
|
||||||
|
|
@ -2227,6 +2339,8 @@ libinput_event_tablet_tool_get_wheel_delta_discrete(
|
||||||
* @param event The libinput tablet tool event
|
* @param event The libinput tablet tool event
|
||||||
* @param width The current output screen width
|
* @param width The current output screen width
|
||||||
* @return the current absolute x coordinate transformed to a screen coordinate
|
* @return the current absolute x coordinate transformed to a screen coordinate
|
||||||
|
*
|
||||||
|
* @since 1.2
|
||||||
*/
|
*/
|
||||||
double
|
double
|
||||||
libinput_event_tablet_tool_get_x_transformed(struct libinput_event_tablet_tool *event,
|
libinput_event_tablet_tool_get_x_transformed(struct libinput_event_tablet_tool *event,
|
||||||
|
|
@ -2248,6 +2362,8 @@ libinput_event_tablet_tool_get_x_transformed(struct libinput_event_tablet_tool *
|
||||||
* @param event The libinput tablet tool event
|
* @param event The libinput tablet tool event
|
||||||
* @param height The current output screen height
|
* @param height The current output screen height
|
||||||
* @return the current absolute y coordinate transformed to a screen coordinate
|
* @return the current absolute y coordinate transformed to a screen coordinate
|
||||||
|
*
|
||||||
|
* @since 1.2
|
||||||
*/
|
*/
|
||||||
double
|
double
|
||||||
libinput_event_tablet_tool_get_y_transformed(struct libinput_event_tablet_tool *event,
|
libinput_event_tablet_tool_get_y_transformed(struct libinput_event_tablet_tool *event,
|
||||||
|
|
@ -2272,6 +2388,8 @@ libinput_event_tablet_tool_get_y_transformed(struct libinput_event_tablet_tool *
|
||||||
*
|
*
|
||||||
* @param event The libinput tablet tool event
|
* @param event The libinput tablet tool event
|
||||||
* @return The new tool triggering this event
|
* @return The new tool triggering this event
|
||||||
|
*
|
||||||
|
* @since 1.2
|
||||||
*/
|
*/
|
||||||
struct libinput_tablet_tool *
|
struct libinput_tablet_tool *
|
||||||
libinput_event_tablet_tool_get_tool(struct libinput_event_tablet_tool *event);
|
libinput_event_tablet_tool_get_tool(struct libinput_event_tablet_tool *event);
|
||||||
|
|
@ -2299,6 +2417,8 @@ libinput_event_tablet_tool_get_tool(struct libinput_event_tablet_tool *event);
|
||||||
*
|
*
|
||||||
* @param event The libinput tablet tool event
|
* @param event The libinput tablet tool event
|
||||||
* @return The new proximity state of the tool from the event.
|
* @return The new proximity state of the tool from the event.
|
||||||
|
*
|
||||||
|
* @since 1.2
|
||||||
*/
|
*/
|
||||||
enum libinput_tablet_tool_proximity_state
|
enum libinput_tablet_tool_proximity_state
|
||||||
libinput_event_tablet_tool_get_proximity_state(struct libinput_event_tablet_tool *event);
|
libinput_event_tablet_tool_get_proximity_state(struct libinput_event_tablet_tool *event);
|
||||||
|
|
@ -2313,6 +2433,8 @@ libinput_event_tablet_tool_get_proximity_state(struct libinput_event_tablet_tool
|
||||||
*
|
*
|
||||||
* @param event The libinput tablet tool event
|
* @param event The libinput tablet tool event
|
||||||
* @return The new tip state of the tool from the event.
|
* @return The new tip state of the tool from the event.
|
||||||
|
*
|
||||||
|
* @since 1.2
|
||||||
*/
|
*/
|
||||||
enum libinput_tablet_tool_tip_state
|
enum libinput_tablet_tool_tip_state
|
||||||
libinput_event_tablet_tool_get_tip_state(struct libinput_event_tablet_tool *event);
|
libinput_event_tablet_tool_get_tip_state(struct libinput_event_tablet_tool *event);
|
||||||
|
|
@ -2328,6 +2450,8 @@ libinput_event_tablet_tool_get_tip_state(struct libinput_event_tablet_tool *even
|
||||||
*
|
*
|
||||||
* @param event The libinput tablet tool event
|
* @param event The libinput tablet tool event
|
||||||
* @return the button triggering this event
|
* @return the button triggering this event
|
||||||
|
*
|
||||||
|
* @since 1.2
|
||||||
*/
|
*/
|
||||||
uint32_t
|
uint32_t
|
||||||
libinput_event_tablet_tool_get_button(struct libinput_event_tablet_tool *event);
|
libinput_event_tablet_tool_get_button(struct libinput_event_tablet_tool *event);
|
||||||
|
|
@ -2342,6 +2466,8 @@ libinput_event_tablet_tool_get_button(struct libinput_event_tablet_tool *event);
|
||||||
*
|
*
|
||||||
* @param event The libinput tablet tool event
|
* @param event The libinput tablet tool event
|
||||||
* @return the button state triggering this event
|
* @return the button state triggering this event
|
||||||
|
*
|
||||||
|
* @since 1.2
|
||||||
*/
|
*/
|
||||||
enum libinput_button_state
|
enum libinput_button_state
|
||||||
libinput_event_tablet_tool_get_button_state(struct libinput_event_tablet_tool *event);
|
libinput_event_tablet_tool_get_button_state(struct libinput_event_tablet_tool *event);
|
||||||
|
|
@ -2358,6 +2484,8 @@ libinput_event_tablet_tool_get_button_state(struct libinput_event_tablet_tool *e
|
||||||
*
|
*
|
||||||
* @param event The libinput tablet tool event
|
* @param event The libinput tablet tool event
|
||||||
* @return the seat wide pressed button count for the key of this event
|
* @return the seat wide pressed button count for the key of this event
|
||||||
|
*
|
||||||
|
* @since 1.2
|
||||||
*/
|
*/
|
||||||
uint32_t
|
uint32_t
|
||||||
libinput_event_tablet_tool_get_seat_button_count(struct libinput_event_tablet_tool *event);
|
libinput_event_tablet_tool_get_seat_button_count(struct libinput_event_tablet_tool *event);
|
||||||
|
|
@ -2370,6 +2498,8 @@ libinput_event_tablet_tool_get_seat_button_count(struct libinput_event_tablet_to
|
||||||
*
|
*
|
||||||
* @param event The libinput tablet tool event
|
* @param event The libinput tablet tool event
|
||||||
* @return The event time for this event
|
* @return The event time for this event
|
||||||
|
*
|
||||||
|
* @since 1.2
|
||||||
*/
|
*/
|
||||||
uint32_t
|
uint32_t
|
||||||
libinput_event_tablet_tool_get_time(struct libinput_event_tablet_tool *event);
|
libinput_event_tablet_tool_get_time(struct libinput_event_tablet_tool *event);
|
||||||
|
|
@ -2382,6 +2512,8 @@ libinput_event_tablet_tool_get_time(struct libinput_event_tablet_tool *event);
|
||||||
*
|
*
|
||||||
* @param event The libinput tablet tool event
|
* @param event The libinput tablet tool event
|
||||||
* @return The event time for this event in microseconds
|
* @return The event time for this event in microseconds
|
||||||
|
*
|
||||||
|
* @since 1.2
|
||||||
*/
|
*/
|
||||||
uint64_t
|
uint64_t
|
||||||
libinput_event_tablet_tool_get_time_usec(struct libinput_event_tablet_tool *event);
|
libinput_event_tablet_tool_get_time_usec(struct libinput_event_tablet_tool *event);
|
||||||
|
|
@ -2406,6 +2538,8 @@ libinput_event_tablet_tool_get_time_usec(struct libinput_event_tablet_tool *even
|
||||||
* @return The tool type for this tool object
|
* @return The tool type for this tool object
|
||||||
*
|
*
|
||||||
* @see libinput_tablet_tool_get_tool_id
|
* @see libinput_tablet_tool_get_tool_id
|
||||||
|
*
|
||||||
|
* @since 1.2
|
||||||
*/
|
*/
|
||||||
enum libinput_tablet_tool_type
|
enum libinput_tablet_tool_type
|
||||||
libinput_tablet_tool_get_type(struct libinput_tablet_tool *tool);
|
libinput_tablet_tool_get_type(struct libinput_tablet_tool *tool);
|
||||||
|
|
@ -2426,6 +2560,8 @@ libinput_tablet_tool_get_type(struct libinput_tablet_tool *tool);
|
||||||
* @return The tool ID for this tool object or 0 if none is provided
|
* @return The tool ID for this tool object or 0 if none is provided
|
||||||
*
|
*
|
||||||
* @see libinput_tablet_tool_get_type
|
* @see libinput_tablet_tool_get_type
|
||||||
|
*
|
||||||
|
* @since 1.2
|
||||||
*/
|
*/
|
||||||
uint64_t
|
uint64_t
|
||||||
libinput_tablet_tool_get_tool_id(struct libinput_tablet_tool *tool);
|
libinput_tablet_tool_get_tool_id(struct libinput_tablet_tool *tool);
|
||||||
|
|
@ -2440,6 +2576,8 @@ libinput_tablet_tool_get_tool_id(struct libinput_tablet_tool *tool);
|
||||||
* @return The passed tool
|
* @return The passed tool
|
||||||
*
|
*
|
||||||
* @see libinput_tablet_tool_unref
|
* @see libinput_tablet_tool_unref
|
||||||
|
*
|
||||||
|
* @since 1.2
|
||||||
*/
|
*/
|
||||||
struct libinput_tablet_tool *
|
struct libinput_tablet_tool *
|
||||||
libinput_tablet_tool_ref(struct libinput_tablet_tool *tool);
|
libinput_tablet_tool_ref(struct libinput_tablet_tool *tool);
|
||||||
|
|
@ -2455,6 +2593,8 @@ libinput_tablet_tool_ref(struct libinput_tablet_tool *tool);
|
||||||
* @return NULL if the tool was destroyed otherwise the passed tool
|
* @return NULL if the tool was destroyed otherwise the passed tool
|
||||||
*
|
*
|
||||||
* @see libinput_tablet_tool_ref
|
* @see libinput_tablet_tool_ref
|
||||||
|
*
|
||||||
|
* @since 1.2
|
||||||
*/
|
*/
|
||||||
struct libinput_tablet_tool *
|
struct libinput_tablet_tool *
|
||||||
libinput_tablet_tool_unref(struct libinput_tablet_tool *tool);
|
libinput_tablet_tool_unref(struct libinput_tablet_tool *tool);
|
||||||
|
|
@ -2466,6 +2606,8 @@ libinput_tablet_tool_unref(struct libinput_tablet_tool *tool);
|
||||||
*
|
*
|
||||||
* @param tool The tool to check the axis capabilities of
|
* @param tool The tool to check the axis capabilities of
|
||||||
* @return Nonzero if the axis is available, zero otherwise.
|
* @return Nonzero if the axis is available, zero otherwise.
|
||||||
|
*
|
||||||
|
* @since 1.2
|
||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
libinput_tablet_tool_has_pressure(struct libinput_tablet_tool *tool);
|
libinput_tablet_tool_has_pressure(struct libinput_tablet_tool *tool);
|
||||||
|
|
@ -2477,6 +2619,8 @@ libinput_tablet_tool_has_pressure(struct libinput_tablet_tool *tool);
|
||||||
*
|
*
|
||||||
* @param tool The tool to check the axis capabilities of
|
* @param tool The tool to check the axis capabilities of
|
||||||
* @return Nonzero if the axis is available, zero otherwise.
|
* @return Nonzero if the axis is available, zero otherwise.
|
||||||
|
*
|
||||||
|
* @since 1.2
|
||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
libinput_tablet_tool_has_distance(struct libinput_tablet_tool *tool);
|
libinput_tablet_tool_has_distance(struct libinput_tablet_tool *tool);
|
||||||
|
|
@ -2488,6 +2632,8 @@ libinput_tablet_tool_has_distance(struct libinput_tablet_tool *tool);
|
||||||
*
|
*
|
||||||
* @param tool The tool to check the axis capabilities of
|
* @param tool The tool to check the axis capabilities of
|
||||||
* @return Nonzero if the axis is available, zero otherwise.
|
* @return Nonzero if the axis is available, zero otherwise.
|
||||||
|
*
|
||||||
|
* @since 1.2
|
||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
libinput_tablet_tool_has_tilt(struct libinput_tablet_tool *tool);
|
libinput_tablet_tool_has_tilt(struct libinput_tablet_tool *tool);
|
||||||
|
|
@ -2499,6 +2645,8 @@ libinput_tablet_tool_has_tilt(struct libinput_tablet_tool *tool);
|
||||||
*
|
*
|
||||||
* @param tool The tool to check the axis capabilities of
|
* @param tool The tool to check the axis capabilities of
|
||||||
* @return Nonzero if the axis is available, zero otherwise.
|
* @return Nonzero if the axis is available, zero otherwise.
|
||||||
|
*
|
||||||
|
* @since 1.2
|
||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
libinput_tablet_tool_has_rotation(struct libinput_tablet_tool *tool);
|
libinput_tablet_tool_has_rotation(struct libinput_tablet_tool *tool);
|
||||||
|
|
@ -2510,6 +2658,8 @@ libinput_tablet_tool_has_rotation(struct libinput_tablet_tool *tool);
|
||||||
*
|
*
|
||||||
* @param tool The tool to check the axis capabilities of
|
* @param tool The tool to check the axis capabilities of
|
||||||
* @return Nonzero if the axis is available, zero otherwise.
|
* @return Nonzero if the axis is available, zero otherwise.
|
||||||
|
*
|
||||||
|
* @since 1.2
|
||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
libinput_tablet_tool_has_slider(struct libinput_tablet_tool *tool);
|
libinput_tablet_tool_has_slider(struct libinput_tablet_tool *tool);
|
||||||
|
|
@ -2521,6 +2671,8 @@ libinput_tablet_tool_has_slider(struct libinput_tablet_tool *tool);
|
||||||
*
|
*
|
||||||
* @param tool The tool to check the axis capabilities of
|
* @param tool The tool to check the axis capabilities of
|
||||||
* @return Nonzero if the axis is available, zero otherwise.
|
* @return Nonzero if the axis is available, zero otherwise.
|
||||||
|
*
|
||||||
|
* @since 1.2
|
||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
libinput_tablet_tool_has_wheel(struct libinput_tablet_tool *tool);
|
libinput_tablet_tool_has_wheel(struct libinput_tablet_tool *tool);
|
||||||
|
|
@ -2535,6 +2687,8 @@ libinput_tablet_tool_has_wheel(struct libinput_tablet_tool *tool);
|
||||||
* @param code button code to check for
|
* @param code button code to check for
|
||||||
*
|
*
|
||||||
* @return 1 if the tool supports this button code, 0 if it does not
|
* @return 1 if the tool supports this button code, 0 if it does not
|
||||||
|
*
|
||||||
|
* @since 1.2
|
||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
libinput_tablet_tool_has_button(struct libinput_tablet_tool *tool,
|
libinput_tablet_tool_has_button(struct libinput_tablet_tool *tool,
|
||||||
|
|
@ -2553,6 +2707,8 @@ libinput_tablet_tool_has_button(struct libinput_tablet_tool *tool,
|
||||||
* @return 1 if the tool can be uniquely identified, 0 otherwise.
|
* @return 1 if the tool can be uniquely identified, 0 otherwise.
|
||||||
*
|
*
|
||||||
* @see libinput_tablet_tool_get_serial
|
* @see libinput_tablet_tool_get_serial
|
||||||
|
*
|
||||||
|
* @since 1.2
|
||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
libinput_tablet_tool_is_unique(struct libinput_tablet_tool *tool);
|
libinput_tablet_tool_is_unique(struct libinput_tablet_tool *tool);
|
||||||
|
|
@ -2590,6 +2746,8 @@ libinput_tablet_tool_is_unique(struct libinput_tablet_tool *tool);
|
||||||
* @return The tool serial number
|
* @return The tool serial number
|
||||||
*
|
*
|
||||||
* @see libinput_tablet_tool_is_unique
|
* @see libinput_tablet_tool_is_unique
|
||||||
|
*
|
||||||
|
* @since 1.2
|
||||||
*/
|
*/
|
||||||
uint64_t
|
uint64_t
|
||||||
libinput_tablet_tool_get_serial(struct libinput_tablet_tool *tool);
|
libinput_tablet_tool_get_serial(struct libinput_tablet_tool *tool);
|
||||||
|
|
@ -2603,6 +2761,8 @@ libinput_tablet_tool_get_serial(struct libinput_tablet_tool *tool);
|
||||||
*
|
*
|
||||||
* @param tool The libinput tool
|
* @param tool The libinput tool
|
||||||
* @return The user data associated with the tool object
|
* @return The user data associated with the tool object
|
||||||
|
*
|
||||||
|
* @since 1.2
|
||||||
*/
|
*/
|
||||||
void *
|
void *
|
||||||
libinput_tablet_tool_get_user_data(struct libinput_tablet_tool *tool);
|
libinput_tablet_tool_get_user_data(struct libinput_tablet_tool *tool);
|
||||||
|
|
@ -2614,6 +2774,8 @@ libinput_tablet_tool_get_user_data(struct libinput_tablet_tool *tool);
|
||||||
*
|
*
|
||||||
* @param tool The libinput tool
|
* @param tool The libinput tool
|
||||||
* @param user_data The user data to associate with the tool object
|
* @param user_data The user data to associate with the tool object
|
||||||
|
*
|
||||||
|
* @since 1.2
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
libinput_tablet_tool_set_user_data(struct libinput_tablet_tool *tool,
|
libinput_tablet_tool_set_user_data(struct libinput_tablet_tool *tool,
|
||||||
|
|
@ -2624,12 +2786,16 @@ libinput_tablet_tool_set_user_data(struct libinput_tablet_tool *tool,
|
||||||
*
|
*
|
||||||
* Events that come from the pad of tablet devices. For events from the
|
* Events that come from the pad of tablet devices. For events from the
|
||||||
* tablet tools, see @ref event_tablet.
|
* tablet tools, see @ref event_tablet.
|
||||||
|
*
|
||||||
|
* @since 1.3
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @ingroup event_tablet_pad
|
* @ingroup event_tablet_pad
|
||||||
*
|
*
|
||||||
* @return The generic libinput_event of this event
|
* @return The generic libinput_event of this event
|
||||||
|
*
|
||||||
|
* @since 1.3
|
||||||
*/
|
*/
|
||||||
struct libinput_event *
|
struct libinput_event *
|
||||||
libinput_event_tablet_pad_get_base_event(struct libinput_event_tablet_pad *event);
|
libinput_event_tablet_pad_get_base_event(struct libinput_event_tablet_pad *event);
|
||||||
|
|
@ -2653,6 +2819,8 @@ libinput_event_tablet_pad_get_base_event(struct libinput_event_tablet_pad *event
|
||||||
* @param event The libinput tablet pad event
|
* @param event The libinput tablet pad event
|
||||||
* @return The current value of the the axis
|
* @return The current value of the the axis
|
||||||
* @retval -1 The finger was lifted
|
* @retval -1 The finger was lifted
|
||||||
|
*
|
||||||
|
* @since 1.3
|
||||||
*/
|
*/
|
||||||
double
|
double
|
||||||
libinput_event_tablet_pad_get_ring_position(struct libinput_event_tablet_pad *event);
|
libinput_event_tablet_pad_get_ring_position(struct libinput_event_tablet_pad *event);
|
||||||
|
|
@ -2670,6 +2838,8 @@ libinput_event_tablet_pad_get_ring_position(struct libinput_event_tablet_pad *ev
|
||||||
*
|
*
|
||||||
* @param event The libinput tablet pad event
|
* @param event The libinput tablet pad event
|
||||||
* @return The index of the ring that changed state
|
* @return The index of the ring that changed state
|
||||||
|
*
|
||||||
|
* @since 1.3
|
||||||
*/
|
*/
|
||||||
unsigned int
|
unsigned int
|
||||||
libinput_event_tablet_pad_get_ring_number(struct libinput_event_tablet_pad *event);
|
libinput_event_tablet_pad_get_ring_number(struct libinput_event_tablet_pad *event);
|
||||||
|
|
@ -2687,6 +2857,8 @@ libinput_event_tablet_pad_get_ring_number(struct libinput_event_tablet_pad *even
|
||||||
*
|
*
|
||||||
* @param event The libinput tablet pad event
|
* @param event The libinput tablet pad event
|
||||||
* @return The source of the ring interaction
|
* @return The source of the ring interaction
|
||||||
|
*
|
||||||
|
* @since 1.3
|
||||||
*/
|
*/
|
||||||
enum libinput_tablet_pad_ring_axis_source
|
enum libinput_tablet_pad_ring_axis_source
|
||||||
libinput_event_tablet_pad_get_ring_source(struct libinput_event_tablet_pad *event);
|
libinput_event_tablet_pad_get_ring_source(struct libinput_event_tablet_pad *event);
|
||||||
|
|
@ -2710,6 +2882,8 @@ libinput_event_tablet_pad_get_ring_source(struct libinput_event_tablet_pad *even
|
||||||
* @param event The libinput tablet pad event
|
* @param event The libinput tablet pad event
|
||||||
* @return The current value of the the axis
|
* @return The current value of the the axis
|
||||||
* @retval -1 The finger was lifted
|
* @retval -1 The finger was lifted
|
||||||
|
*
|
||||||
|
* @since 1.3
|
||||||
*/
|
*/
|
||||||
double
|
double
|
||||||
libinput_event_tablet_pad_get_strip_position(struct libinput_event_tablet_pad *event);
|
libinput_event_tablet_pad_get_strip_position(struct libinput_event_tablet_pad *event);
|
||||||
|
|
@ -2727,6 +2901,8 @@ libinput_event_tablet_pad_get_strip_position(struct libinput_event_tablet_pad *e
|
||||||
*
|
*
|
||||||
* @param event The libinput tablet pad event
|
* @param event The libinput tablet pad event
|
||||||
* @return The index of the strip that changed state
|
* @return The index of the strip that changed state
|
||||||
|
*
|
||||||
|
* @since 1.3
|
||||||
*/
|
*/
|
||||||
unsigned int
|
unsigned int
|
||||||
libinput_event_tablet_pad_get_strip_number(struct libinput_event_tablet_pad *event);
|
libinput_event_tablet_pad_get_strip_number(struct libinput_event_tablet_pad *event);
|
||||||
|
|
@ -2744,6 +2920,8 @@ libinput_event_tablet_pad_get_strip_number(struct libinput_event_tablet_pad *eve
|
||||||
*
|
*
|
||||||
* @param event The libinput tablet pad event
|
* @param event The libinput tablet pad event
|
||||||
* @return The source of the strip interaction
|
* @return The source of the strip interaction
|
||||||
|
*
|
||||||
|
* @since 1.3
|
||||||
*/
|
*/
|
||||||
enum libinput_tablet_pad_strip_axis_source
|
enum libinput_tablet_pad_strip_axis_source
|
||||||
libinput_event_tablet_pad_get_strip_source(struct libinput_event_tablet_pad *event);
|
libinput_event_tablet_pad_get_strip_source(struct libinput_event_tablet_pad *event);
|
||||||
|
|
@ -2765,6 +2943,8 @@ libinput_event_tablet_pad_get_strip_source(struct libinput_event_tablet_pad *eve
|
||||||
*
|
*
|
||||||
* @param event The libinput tablet pad event
|
* @param event The libinput tablet pad event
|
||||||
* @return the button triggering this event
|
* @return the button triggering this event
|
||||||
|
*
|
||||||
|
* @since 1.3
|
||||||
*/
|
*/
|
||||||
uint32_t
|
uint32_t
|
||||||
libinput_event_tablet_pad_get_button_number(struct libinput_event_tablet_pad *event);
|
libinput_event_tablet_pad_get_button_number(struct libinput_event_tablet_pad *event);
|
||||||
|
|
@ -2780,6 +2960,8 @@ libinput_event_tablet_pad_get_button_number(struct libinput_event_tablet_pad *ev
|
||||||
*
|
*
|
||||||
* @param event The libinput tablet pad event
|
* @param event The libinput tablet pad event
|
||||||
* @return the button state triggering this event
|
* @return the button state triggering this event
|
||||||
|
*
|
||||||
|
* @since 1.3
|
||||||
*/
|
*/
|
||||||
enum libinput_button_state
|
enum libinput_button_state
|
||||||
libinput_event_tablet_pad_get_button_state(struct libinput_event_tablet_pad *event);
|
libinput_event_tablet_pad_get_button_state(struct libinput_event_tablet_pad *event);
|
||||||
|
|
@ -2810,6 +2992,8 @@ libinput_event_tablet_pad_get_button_state(struct libinput_event_tablet_pad *eve
|
||||||
* the event
|
* the event
|
||||||
*
|
*
|
||||||
* @see libinput_tablet_pad_mode_group_get_mode
|
* @see libinput_tablet_pad_mode_group_get_mode
|
||||||
|
*
|
||||||
|
* @since 1.4
|
||||||
*/
|
*/
|
||||||
unsigned int
|
unsigned int
|
||||||
libinput_event_tablet_pad_get_mode(struct libinput_event_tablet_pad *event);
|
libinput_event_tablet_pad_get_mode(struct libinput_event_tablet_pad *event);
|
||||||
|
|
@ -2831,6 +3015,8 @@ libinput_event_tablet_pad_get_mode(struct libinput_event_tablet_pad *event);
|
||||||
* @return the mode group of the button, ring or strip that caused this event
|
* @return the mode group of the button, ring or strip that caused this event
|
||||||
*
|
*
|
||||||
* @see libinput_device_tablet_pad_get_mode_group
|
* @see libinput_device_tablet_pad_get_mode_group
|
||||||
|
*
|
||||||
|
* @since 1.4
|
||||||
*/
|
*/
|
||||||
struct libinput_tablet_pad_mode_group *
|
struct libinput_tablet_pad_mode_group *
|
||||||
libinput_event_tablet_pad_get_mode_group(struct libinput_event_tablet_pad *event);
|
libinput_event_tablet_pad_get_mode_group(struct libinput_event_tablet_pad *event);
|
||||||
|
|
@ -2843,6 +3029,8 @@ libinput_event_tablet_pad_get_mode_group(struct libinput_event_tablet_pad *event
|
||||||
*
|
*
|
||||||
* @param event The libinput tablet pad event
|
* @param event The libinput tablet pad event
|
||||||
* @return The event time for this event
|
* @return The event time for this event
|
||||||
|
*
|
||||||
|
* @since 1.3
|
||||||
*/
|
*/
|
||||||
uint32_t
|
uint32_t
|
||||||
libinput_event_tablet_pad_get_time(struct libinput_event_tablet_pad *event);
|
libinput_event_tablet_pad_get_time(struct libinput_event_tablet_pad *event);
|
||||||
|
|
@ -2855,6 +3043,8 @@ libinput_event_tablet_pad_get_time(struct libinput_event_tablet_pad *event);
|
||||||
*
|
*
|
||||||
* @param event The libinput tablet pad event
|
* @param event The libinput tablet pad event
|
||||||
* @return The event time for this event in microseconds
|
* @return The event time for this event in microseconds
|
||||||
|
*
|
||||||
|
* @since 1.3
|
||||||
*/
|
*/
|
||||||
uint64_t
|
uint64_t
|
||||||
libinput_event_tablet_pad_get_time_usec(struct libinput_event_tablet_pad *event);
|
libinput_event_tablet_pad_get_time_usec(struct libinput_event_tablet_pad *event);
|
||||||
|
|
@ -2877,6 +3067,8 @@ libinput_event_tablet_pad_get_time_usec(struct libinput_event_tablet_pad *event)
|
||||||
*
|
*
|
||||||
* @param event The libinput switch event
|
* @param event The libinput switch event
|
||||||
* @return The switch triggering this event
|
* @return The switch triggering this event
|
||||||
|
*
|
||||||
|
* @since 1.7
|
||||||
*/
|
*/
|
||||||
enum libinput_switch
|
enum libinput_switch
|
||||||
libinput_event_switch_get_switch(struct libinput_event_switch *event);
|
libinput_event_switch_get_switch(struct libinput_event_switch *event);
|
||||||
|
|
@ -2893,6 +3085,8 @@ libinput_event_switch_get_switch(struct libinput_event_switch *event);
|
||||||
*
|
*
|
||||||
* @param event The libinput switch event
|
* @param event The libinput switch event
|
||||||
* @return The switch state triggering this event
|
* @return The switch state triggering this event
|
||||||
|
*
|
||||||
|
* @since 1.7
|
||||||
*/
|
*/
|
||||||
enum libinput_switch_state
|
enum libinput_switch_state
|
||||||
libinput_event_switch_get_switch_state(struct libinput_event_switch *event);
|
libinput_event_switch_get_switch_state(struct libinput_event_switch *event);
|
||||||
|
|
@ -2901,6 +3095,8 @@ libinput_event_switch_get_switch_state(struct libinput_event_switch *event);
|
||||||
* @ingroup event_switch
|
* @ingroup event_switch
|
||||||
*
|
*
|
||||||
* @return The generic libinput_event of this event
|
* @return The generic libinput_event of this event
|
||||||
|
*
|
||||||
|
* @since 1.7
|
||||||
*/
|
*/
|
||||||
struct libinput_event *
|
struct libinput_event *
|
||||||
libinput_event_switch_get_base_event(struct libinput_event_switch *event);
|
libinput_event_switch_get_base_event(struct libinput_event_switch *event);
|
||||||
|
|
@ -2913,6 +3109,8 @@ libinput_event_switch_get_base_event(struct libinput_event_switch *event);
|
||||||
*
|
*
|
||||||
* @param event The libinput switch event
|
* @param event The libinput switch event
|
||||||
* @return The event time for this event
|
* @return The event time for this event
|
||||||
|
*
|
||||||
|
* @since 1.7
|
||||||
*/
|
*/
|
||||||
uint32_t
|
uint32_t
|
||||||
libinput_event_switch_get_time(struct libinput_event_switch *event);
|
libinput_event_switch_get_time(struct libinput_event_switch *event);
|
||||||
|
|
@ -2925,6 +3123,8 @@ libinput_event_switch_get_time(struct libinput_event_switch *event);
|
||||||
*
|
*
|
||||||
* @param event The libinput switch event
|
* @param event The libinput switch event
|
||||||
* @return The event time for this event in microseconds
|
* @return The event time for this event in microseconds
|
||||||
|
*
|
||||||
|
* @since 1.7
|
||||||
*/
|
*/
|
||||||
uint64_t
|
uint64_t
|
||||||
libinput_event_switch_get_time_usec(struct libinput_event_switch *event);
|
libinput_event_switch_get_time_usec(struct libinput_event_switch *event);
|
||||||
|
|
@ -3782,6 +3982,8 @@ libinput_device_keyboard_has_key(struct libinput_device *device,
|
||||||
*
|
*
|
||||||
* @return The number of simultaneous touches or 0 if unknown, -1
|
* @return The number of simultaneous touches or 0 if unknown, -1
|
||||||
* on error.
|
* on error.
|
||||||
|
*
|
||||||
|
* @since 1.11
|
||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
libinput_device_touch_get_touch_count(struct libinput_device *device);
|
libinput_device_touch_get_touch_count(struct libinput_device *device);
|
||||||
|
|
@ -3797,6 +3999,8 @@ libinput_device_touch_get_touch_count(struct libinput_device *device);
|
||||||
*
|
*
|
||||||
* @return 1 if the device supports this switch, 0 if it does not, -1
|
* @return 1 if the device supports this switch, 0 if it does not, -1
|
||||||
* on error.
|
* on error.
|
||||||
|
*
|
||||||
|
* @since 1.9
|
||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
libinput_device_switch_has_switch(struct libinput_device *device,
|
libinput_device_switch_has_switch(struct libinput_device *device,
|
||||||
|
|
@ -3813,6 +4017,8 @@ libinput_device_switch_has_switch(struct libinput_device *device,
|
||||||
* @param device A current input device
|
* @param device A current input device
|
||||||
*
|
*
|
||||||
* @return The number of buttons supported by the device.
|
* @return The number of buttons supported by the device.
|
||||||
|
*
|
||||||
|
* @since 1.3
|
||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
libinput_device_tablet_pad_get_num_buttons(struct libinput_device *device);
|
libinput_device_tablet_pad_get_num_buttons(struct libinput_device *device);
|
||||||
|
|
@ -3828,6 +4034,8 @@ libinput_device_tablet_pad_get_num_buttons(struct libinput_device *device);
|
||||||
* @return The number of rings or 0 if the device has no rings.
|
* @return The number of rings or 0 if the device has no rings.
|
||||||
*
|
*
|
||||||
* @see libinput_event_tablet_pad_get_ring_number
|
* @see libinput_event_tablet_pad_get_ring_number
|
||||||
|
*
|
||||||
|
* @since 1.3
|
||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
libinput_device_tablet_pad_get_num_rings(struct libinput_device *device);
|
libinput_device_tablet_pad_get_num_rings(struct libinput_device *device);
|
||||||
|
|
@ -3843,6 +4051,8 @@ libinput_device_tablet_pad_get_num_rings(struct libinput_device *device);
|
||||||
* @return The number of strips or 0 if the device has no strips.
|
* @return The number of strips or 0 if the device has no strips.
|
||||||
*
|
*
|
||||||
* @see libinput_event_tablet_pad_get_strip_number
|
* @see libinput_event_tablet_pad_get_strip_number
|
||||||
|
*
|
||||||
|
* @since 1.3
|
||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
libinput_device_tablet_pad_get_num_strips(struct libinput_device *device);
|
libinput_device_tablet_pad_get_num_strips(struct libinput_device *device);
|
||||||
|
|
@ -4061,6 +4271,8 @@ libinput_device_config_tap_get_default_enabled(struct libinput_device *device);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @ingroup config
|
* @ingroup config
|
||||||
|
*
|
||||||
|
* @since 1.5
|
||||||
*/
|
*/
|
||||||
enum libinput_config_tap_button_map {
|
enum libinput_config_tap_button_map {
|
||||||
/** 1/2/3 finger tap maps to left/right/middle */
|
/** 1/2/3 finger tap maps to left/right/middle */
|
||||||
|
|
@ -4096,6 +4308,8 @@ enum libinput_config_tap_button_map {
|
||||||
*
|
*
|
||||||
* @see libinput_device_config_tap_get_button_map
|
* @see libinput_device_config_tap_get_button_map
|
||||||
* @see libinput_device_config_tap_get_default_button_map
|
* @see libinput_device_config_tap_get_default_button_map
|
||||||
|
*
|
||||||
|
* @since 1.5
|
||||||
*/
|
*/
|
||||||
enum libinput_config_status
|
enum libinput_config_status
|
||||||
libinput_device_config_tap_set_button_map(struct libinput_device *device,
|
libinput_device_config_tap_set_button_map(struct libinput_device *device,
|
||||||
|
|
@ -4117,6 +4331,8 @@ libinput_device_config_tap_set_button_map(struct libinput_device *device,
|
||||||
*
|
*
|
||||||
* @see libinput_device_config_tap_set_button_map
|
* @see libinput_device_config_tap_set_button_map
|
||||||
* @see libinput_device_config_tap_get_default_button_map
|
* @see libinput_device_config_tap_get_default_button_map
|
||||||
|
*
|
||||||
|
* @since 1.5
|
||||||
*/
|
*/
|
||||||
enum libinput_config_tap_button_map
|
enum libinput_config_tap_button_map
|
||||||
libinput_device_config_tap_get_button_map(struct libinput_device *device);
|
libinput_device_config_tap_get_button_map(struct libinput_device *device);
|
||||||
|
|
@ -4137,6 +4353,8 @@ libinput_device_config_tap_get_button_map(struct libinput_device *device);
|
||||||
*
|
*
|
||||||
* @see libinput_device_config_tap_set_button_map
|
* @see libinput_device_config_tap_set_button_map
|
||||||
* @see libinput_device_config_tap_get_default_button_map
|
* @see libinput_device_config_tap_get_default_button_map
|
||||||
|
*
|
||||||
|
* @since 1.5
|
||||||
*/
|
*/
|
||||||
enum libinput_config_tap_button_map
|
enum libinput_config_tap_button_map
|
||||||
libinput_device_config_tap_get_default_button_map(struct libinput_device *device);
|
libinput_device_config_tap_get_default_button_map(struct libinput_device *device);
|
||||||
|
|
@ -4147,6 +4365,8 @@ libinput_device_config_tap_get_default_button_map(struct libinput_device *device
|
||||||
* A config status to distinguish or set dragging on a device. Currently
|
* A config status to distinguish or set dragging on a device. Currently
|
||||||
* implemented for tap-and-drag only, see
|
* implemented for tap-and-drag only, see
|
||||||
* libinput_device_config_tap_set_drag_enabled()
|
* libinput_device_config_tap_set_drag_enabled()
|
||||||
|
*
|
||||||
|
* @since 1.2
|
||||||
*/
|
*/
|
||||||
enum libinput_config_drag_state {
|
enum libinput_config_drag_state {
|
||||||
/**
|
/**
|
||||||
|
|
@ -4176,6 +4396,8 @@ enum libinput_config_drag_state {
|
||||||
*
|
*
|
||||||
* @see libinput_device_config_tap_drag_get_enabled
|
* @see libinput_device_config_tap_drag_get_enabled
|
||||||
* @see libinput_device_config_tap_drag_get_default_enabled
|
* @see libinput_device_config_tap_drag_get_default_enabled
|
||||||
|
*
|
||||||
|
* @since 1.2
|
||||||
*/
|
*/
|
||||||
enum libinput_config_status
|
enum libinput_config_status
|
||||||
libinput_device_config_tap_set_drag_enabled(struct libinput_device *device,
|
libinput_device_config_tap_set_drag_enabled(struct libinput_device *device,
|
||||||
|
|
@ -4193,6 +4415,8 @@ libinput_device_config_tap_set_drag_enabled(struct libinput_device *device,
|
||||||
*
|
*
|
||||||
* @see libinput_device_config_tap_drag_set_enabled
|
* @see libinput_device_config_tap_drag_set_enabled
|
||||||
* @see libinput_device_config_tap_drag_get_default_enabled
|
* @see libinput_device_config_tap_drag_get_default_enabled
|
||||||
|
*
|
||||||
|
* @since 1.2
|
||||||
*/
|
*/
|
||||||
enum libinput_config_drag_state
|
enum libinput_config_drag_state
|
||||||
libinput_device_config_tap_get_drag_enabled(struct libinput_device *device);
|
libinput_device_config_tap_get_drag_enabled(struct libinput_device *device);
|
||||||
|
|
@ -4211,6 +4435,8 @@ libinput_device_config_tap_get_drag_enabled(struct libinput_device *device);
|
||||||
*
|
*
|
||||||
* @see libinput_device_config_tap_drag_set_enabled
|
* @see libinput_device_config_tap_drag_set_enabled
|
||||||
* @see libinput_device_config_tap_drag_get_enabled
|
* @see libinput_device_config_tap_drag_get_enabled
|
||||||
|
*
|
||||||
|
* @since 1.2
|
||||||
*/
|
*/
|
||||||
enum libinput_config_drag_state
|
enum libinput_config_drag_state
|
||||||
libinput_device_config_tap_get_default_drag_enabled(struct libinput_device *device);
|
libinput_device_config_tap_get_default_drag_enabled(struct libinput_device *device);
|
||||||
|
|
@ -4605,6 +4831,8 @@ libinput_device_config_accel_get_default_speed(struct libinput_device *device);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @ingroup config
|
* @ingroup config
|
||||||
|
*
|
||||||
|
* @since 1.1
|
||||||
*/
|
*/
|
||||||
enum libinput_config_accel_profile {
|
enum libinput_config_accel_profile {
|
||||||
/**
|
/**
|
||||||
|
|
@ -4637,6 +4865,8 @@ enum libinput_config_accel_profile {
|
||||||
* @param device The device to configure
|
* @param device The device to configure
|
||||||
*
|
*
|
||||||
* @return A bitmask of all configurable modes available on this device.
|
* @return A bitmask of all configurable modes available on this device.
|
||||||
|
*
|
||||||
|
* @since 1.1
|
||||||
*/
|
*/
|
||||||
uint32_t
|
uint32_t
|
||||||
libinput_device_config_accel_get_profiles(struct libinput_device *device);
|
libinput_device_config_accel_get_profiles(struct libinput_device *device);
|
||||||
|
|
@ -4651,6 +4881,8 @@ libinput_device_config_accel_get_profiles(struct libinput_device *device);
|
||||||
* @param mode The mode to set the device to.
|
* @param mode The mode to set the device to.
|
||||||
*
|
*
|
||||||
* @return A config status code
|
* @return A config status code
|
||||||
|
*
|
||||||
|
* @since 1.1
|
||||||
*/
|
*/
|
||||||
enum libinput_config_status
|
enum libinput_config_status
|
||||||
libinput_device_config_accel_set_profile(struct libinput_device *device,
|
libinput_device_config_accel_set_profile(struct libinput_device *device,
|
||||||
|
|
@ -4664,6 +4896,8 @@ libinput_device_config_accel_set_profile(struct libinput_device *device,
|
||||||
* @param device The device to configure
|
* @param device The device to configure
|
||||||
*
|
*
|
||||||
* @return The currently configured pointer acceleration profile.
|
* @return The currently configured pointer acceleration profile.
|
||||||
|
*
|
||||||
|
* @since 1.1
|
||||||
*/
|
*/
|
||||||
enum libinput_config_accel_profile
|
enum libinput_config_accel_profile
|
||||||
libinput_device_config_accel_get_profile(struct libinput_device *device);
|
libinput_device_config_accel_get_profile(struct libinput_device *device);
|
||||||
|
|
@ -4676,6 +4910,8 @@ libinput_device_config_accel_get_profile(struct libinput_device *device);
|
||||||
* @param device The device to configure
|
* @param device The device to configure
|
||||||
*
|
*
|
||||||
* @return The default acceleration profile for this device.
|
* @return The default acceleration profile for this device.
|
||||||
|
*
|
||||||
|
* @since 1.1
|
||||||
*/
|
*/
|
||||||
enum libinput_config_accel_profile
|
enum libinput_config_accel_profile
|
||||||
libinput_device_config_accel_get_default_profile(struct libinput_device *device);
|
libinput_device_config_accel_get_default_profile(struct libinput_device *device);
|
||||||
|
|
@ -5362,6 +5598,8 @@ libinput_device_config_dwt_get_default_enabled(struct libinput_device *device);
|
||||||
* @see libinput_device_config_rotation_set_angle
|
* @see libinput_device_config_rotation_set_angle
|
||||||
* @see libinput_device_config_rotation_get_angle
|
* @see libinput_device_config_rotation_get_angle
|
||||||
* @see libinput_device_config_rotation_get_default_angle
|
* @see libinput_device_config_rotation_get_default_angle
|
||||||
|
*
|
||||||
|
* @since 1.4
|
||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
libinput_device_config_rotation_is_available(struct libinput_device *device);
|
libinput_device_config_rotation_is_available(struct libinput_device *device);
|
||||||
|
|
@ -5395,6 +5633,8 @@ libinput_device_config_rotation_is_available(struct libinput_device *device);
|
||||||
* @see libinput_device_config_rotation_is_available
|
* @see libinput_device_config_rotation_is_available
|
||||||
* @see libinput_device_config_rotation_get_angle
|
* @see libinput_device_config_rotation_get_angle
|
||||||
* @see libinput_device_config_rotation_get_default_angle
|
* @see libinput_device_config_rotation_get_default_angle
|
||||||
|
*
|
||||||
|
* @since 1.4
|
||||||
*/
|
*/
|
||||||
enum libinput_config_status
|
enum libinput_config_status
|
||||||
libinput_device_config_rotation_set_angle(struct libinput_device *device,
|
libinput_device_config_rotation_set_angle(struct libinput_device *device,
|
||||||
|
|
@ -5413,6 +5653,8 @@ libinput_device_config_rotation_set_angle(struct libinput_device *device,
|
||||||
* @see libinput_device_config_rotation_is_available
|
* @see libinput_device_config_rotation_is_available
|
||||||
* @see libinput_device_config_rotation_set_angle
|
* @see libinput_device_config_rotation_set_angle
|
||||||
* @see libinput_device_config_rotation_get_default_angle
|
* @see libinput_device_config_rotation_get_default_angle
|
||||||
|
*
|
||||||
|
* @since 1.4
|
||||||
*/
|
*/
|
||||||
unsigned int
|
unsigned int
|
||||||
libinput_device_config_rotation_get_angle(struct libinput_device *device);
|
libinput_device_config_rotation_get_angle(struct libinput_device *device);
|
||||||
|
|
@ -5430,6 +5672,8 @@ libinput_device_config_rotation_get_angle(struct libinput_device *device);
|
||||||
* @see libinput_device_config_rotation_is_available
|
* @see libinput_device_config_rotation_is_available
|
||||||
* @see libinput_device_config_rotation_set_angle
|
* @see libinput_device_config_rotation_set_angle
|
||||||
* @see libinput_device_config_rotation_get_angle
|
* @see libinput_device_config_rotation_get_angle
|
||||||
|
*
|
||||||
|
* @since 1.4
|
||||||
*/
|
*/
|
||||||
unsigned int
|
unsigned int
|
||||||
libinput_device_config_rotation_get_default_angle(struct libinput_device *device);
|
libinput_device_config_rotation_get_default_angle(struct libinput_device *device);
|
||||||
|
|
|
||||||
|
|
@ -261,6 +261,7 @@ quirk_get_name(enum quirk q)
|
||||||
case QUIRK_ATTR_PALM_SIZE_THRESHOLD: return "AttrPalmSizeThreshold";
|
case QUIRK_ATTR_PALM_SIZE_THRESHOLD: return "AttrPalmSizeThreshold";
|
||||||
case QUIRK_ATTR_LID_SWITCH_RELIABILITY: return "AttrLidSwitchReliability";
|
case QUIRK_ATTR_LID_SWITCH_RELIABILITY: return "AttrLidSwitchReliability";
|
||||||
case QUIRK_ATTR_KEYBOARD_INTEGRATION: return "AttrKeyboardIntegration";
|
case QUIRK_ATTR_KEYBOARD_INTEGRATION: return "AttrKeyboardIntegration";
|
||||||
|
case QUIRK_ATTR_TRACKPOINT_INTEGRATION: return "AttrPointingStickIntegration";
|
||||||
case QUIRK_ATTR_TPKBCOMBO_LAYOUT: return "AttrTPKComboLayout";
|
case QUIRK_ATTR_TPKBCOMBO_LAYOUT: return "AttrTPKComboLayout";
|
||||||
case QUIRK_ATTR_PRESSURE_RANGE: return "AttrPressureRange";
|
case QUIRK_ATTR_PRESSURE_RANGE: return "AttrPressureRange";
|
||||||
case QUIRK_ATTR_PALM_PRESSURE_THRESHOLD: return "AttrPalmPressureThreshold";
|
case QUIRK_ATTR_PALM_PRESSURE_THRESHOLD: return "AttrPalmPressureThreshold";
|
||||||
|
|
@ -661,6 +662,13 @@ parse_attr(struct quirks_context *ctx,
|
||||||
p->type = PT_STRING;
|
p->type = PT_STRING;
|
||||||
p->value.s = safe_strdup(value);
|
p->value.s = safe_strdup(value);
|
||||||
rc = true;
|
rc = true;
|
||||||
|
} else if (streq(key, quirk_get_name(QUIRK_ATTR_TRACKPOINT_INTEGRATION))) {
|
||||||
|
p->id = QUIRK_ATTR_TRACKPOINT_INTEGRATION;
|
||||||
|
if (!streq(value, "internal") && !streq(value, "external"))
|
||||||
|
goto out;
|
||||||
|
p->type = PT_STRING;
|
||||||
|
p->value.s = safe_strdup(value);
|
||||||
|
rc = true;
|
||||||
} else if (streq(key, quirk_get_name(QUIRK_ATTR_TPKBCOMBO_LAYOUT))) {
|
} else if (streq(key, quirk_get_name(QUIRK_ATTR_TPKBCOMBO_LAYOUT))) {
|
||||||
p->id = QUIRK_ATTR_TPKBCOMBO_LAYOUT;
|
p->id = QUIRK_ATTR_TPKBCOMBO_LAYOUT;
|
||||||
if (!streq(value, "below"))
|
if (!streq(value, "below"))
|
||||||
|
|
@ -1227,6 +1235,7 @@ match_fill_udev_type(struct match *m,
|
||||||
{ "ID_INPUT_TABLET_PAD", UDEV_TABLET_PAD },
|
{ "ID_INPUT_TABLET_PAD", UDEV_TABLET_PAD },
|
||||||
{ "ID_INPUT_JOYSTICK", UDEV_JOYSTICK },
|
{ "ID_INPUT_JOYSTICK", UDEV_JOYSTICK },
|
||||||
{ "ID_INPUT_KEYBOARD", UDEV_KEYBOARD },
|
{ "ID_INPUT_KEYBOARD", UDEV_KEYBOARD },
|
||||||
|
{ "ID_INPUT_KEY", UDEV_KEYBOARD },
|
||||||
};
|
};
|
||||||
struct ut_map *map;
|
struct ut_map *map;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -96,6 +96,7 @@ enum quirk {
|
||||||
QUIRK_ATTR_PALM_SIZE_THRESHOLD,
|
QUIRK_ATTR_PALM_SIZE_THRESHOLD,
|
||||||
QUIRK_ATTR_LID_SWITCH_RELIABILITY,
|
QUIRK_ATTR_LID_SWITCH_RELIABILITY,
|
||||||
QUIRK_ATTR_KEYBOARD_INTEGRATION,
|
QUIRK_ATTR_KEYBOARD_INTEGRATION,
|
||||||
|
QUIRK_ATTR_TRACKPOINT_INTEGRATION,
|
||||||
QUIRK_ATTR_TPKBCOMBO_LAYOUT,
|
QUIRK_ATTR_TPKBCOMBO_LAYOUT,
|
||||||
QUIRK_ATTR_PRESSURE_RANGE,
|
QUIRK_ATTR_PRESSURE_RANGE,
|
||||||
QUIRK_ATTR_PALM_PRESSURE_THRESHOLD,
|
QUIRK_ATTR_PALM_PRESSURE_THRESHOLD,
|
||||||
|
|
|
||||||
|
|
@ -71,8 +71,10 @@ static struct input_id input_id = {
|
||||||
};
|
};
|
||||||
|
|
||||||
static int events[] = {
|
static int events[] = {
|
||||||
|
EV_KEY, BTN_TOOL_FINGER,
|
||||||
EV_KEY, BTN_TOUCH,
|
EV_KEY, BTN_TOUCH,
|
||||||
INPUT_PROP_MAX, INPUT_PROP_DIRECT,
|
EV_KEY, BTN_TOOL_DOUBLETAP,
|
||||||
|
INPUT_PROP_MAX, INPUT_PROP_POINTER,
|
||||||
-1, -1,
|
-1, -1,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -87,7 +89,7 @@ static const char udev_rule[] =
|
||||||
|
|
||||||
TEST_DEVICE("wacom-bamboo-2fg-finger",
|
TEST_DEVICE("wacom-bamboo-2fg-finger",
|
||||||
.type = LITEST_WACOM_BAMBOO_2FG_FINGER,
|
.type = LITEST_WACOM_BAMBOO_2FG_FINGER,
|
||||||
.features = LITEST_TOUCH,
|
.features = LITEST_TOUCHPAD,
|
||||||
.interface = &interface,
|
.interface = &interface,
|
||||||
|
|
||||||
.name = "Wacom Bamboo 2F 4x5 Finger",
|
.name = "Wacom Bamboo 2F 4x5 Finger",
|
||||||
|
|
|
||||||
|
|
@ -112,7 +112,7 @@ static const char udev_rule[] =
|
||||||
"\n"
|
"\n"
|
||||||
"LABEL=\"rule_end\"";
|
"LABEL=\"rule_end\"";
|
||||||
|
|
||||||
TEST_DEVICE("wacom-finger",
|
TEST_DEVICE("wacom-intuos5-finger",
|
||||||
.type = LITEST_WACOM_FINGER,
|
.type = LITEST_WACOM_FINGER,
|
||||||
.features = LITEST_TOUCHPAD,
|
.features = LITEST_TOUCHPAD,
|
||||||
.interface = &interface,
|
.interface = &interface,
|
||||||
|
|
|
||||||
|
|
@ -100,7 +100,7 @@ static const char udev_rule[] =
|
||||||
"\n"
|
"\n"
|
||||||
"LABEL=\"pad_end\"";
|
"LABEL=\"pad_end\"";
|
||||||
|
|
||||||
TEST_DEVICE("wacom-pad",
|
TEST_DEVICE("wacom-intuos5-pad",
|
||||||
.type = LITEST_WACOM_INTUOS5_PAD,
|
.type = LITEST_WACOM_INTUOS5_PAD,
|
||||||
.features = LITEST_TABLET_PAD | LITEST_RING,
|
.features = LITEST_TABLET_PAD | LITEST_RING,
|
||||||
.interface = &interface,
|
.interface = &interface,
|
||||||
|
|
|
||||||
|
|
@ -151,7 +151,7 @@ static const char udev_rule[] =
|
||||||
"\n"
|
"\n"
|
||||||
"LABEL=\"rule_end\"";
|
"LABEL=\"rule_end\"";
|
||||||
|
|
||||||
TEST_DEVICE("wacom-intuos-tablet",
|
TEST_DEVICE("wacom-intuos5-tablet",
|
||||||
.type = LITEST_WACOM_INTUOS,
|
.type = LITEST_WACOM_INTUOS,
|
||||||
.features = LITEST_TABLET | LITEST_DISTANCE | LITEST_TOOL_SERIAL | LITEST_TILT | LITEST_TOOL_MOUSE | LITEST_HOVER,
|
.features = LITEST_TABLET | LITEST_DISTANCE | LITEST_TOOL_SERIAL | LITEST_TILT | LITEST_TOOL_MOUSE | LITEST_HOVER,
|
||||||
.interface = &interface,
|
.interface = &interface,
|
||||||
|
|
|
||||||
|
|
@ -3640,7 +3640,7 @@ litest_timeout_softbuttons(void)
|
||||||
void
|
void
|
||||||
litest_timeout_buttonscroll(void)
|
litest_timeout_buttonscroll(void)
|
||||||
{
|
{
|
||||||
msleep(45);
|
msleep(300);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
|
||||||
|
|
@ -173,6 +173,7 @@ START_TEST(gestures_swipe_3fg_btntool)
|
||||||
};
|
};
|
||||||
|
|
||||||
if (libevdev_get_num_slots(dev->evdev) > 2 ||
|
if (libevdev_get_num_slots(dev->evdev) > 2 ||
|
||||||
|
!libevdev_has_event_code(dev->evdev, EV_KEY, BTN_TOOL_TRIPLETAP) ||
|
||||||
!libinput_device_has_capability(dev->libinput_device,
|
!libinput_device_has_capability(dev->libinput_device,
|
||||||
LIBINPUT_DEVICE_CAP_GESTURE))
|
LIBINPUT_DEVICE_CAP_GESTURE))
|
||||||
return;
|
return;
|
||||||
|
|
|
||||||
|
|
@ -1204,6 +1204,39 @@ START_TEST(quirks_parse_string_attr)
|
||||||
}
|
}
|
||||||
END_TEST
|
END_TEST
|
||||||
|
|
||||||
|
START_TEST(quirks_parse_integration_attr)
|
||||||
|
{
|
||||||
|
struct litest_device *dev = litest_current_device();
|
||||||
|
char *do_not_use; /* freed before we can use it */
|
||||||
|
bool
|
||||||
|
|
||||||
|
rc = test_attr_parse(dev,
|
||||||
|
QUIRK_ATTR_KEYBOARD_INTEGRATION,
|
||||||
|
"internal",
|
||||||
|
(qparsefunc)quirks_get_string,
|
||||||
|
&do_not_use);
|
||||||
|
ck_assert(rc);
|
||||||
|
rc = test_attr_parse(dev,
|
||||||
|
QUIRK_ATTR_KEYBOARD_INTEGRATION,
|
||||||
|
"external",
|
||||||
|
(qparsefunc)quirks_get_string,
|
||||||
|
&do_not_use);
|
||||||
|
ck_assert(rc);
|
||||||
|
rc = test_attr_parse(dev,
|
||||||
|
QUIRK_ATTR_TRACKPOINT_INTEGRATION,
|
||||||
|
"internal",
|
||||||
|
(qparsefunc)quirks_get_string,
|
||||||
|
&do_not_use);
|
||||||
|
ck_assert(rc);
|
||||||
|
rc = test_attr_parse(dev,
|
||||||
|
QUIRK_ATTR_TRACKPOINT_INTEGRATION,
|
||||||
|
"external",
|
||||||
|
(qparsefunc)quirks_get_string,
|
||||||
|
&do_not_use);
|
||||||
|
ck_assert(rc);
|
||||||
|
}
|
||||||
|
END_TEST
|
||||||
|
|
||||||
START_TEST(quirks_model_one)
|
START_TEST(quirks_model_one)
|
||||||
{
|
{
|
||||||
struct litest_device *dev = litest_current_device();
|
struct litest_device *dev = litest_current_device();
|
||||||
|
|
@ -1432,6 +1465,7 @@ TEST_COLLECTION(quirks)
|
||||||
litest_add_for_device("quirks:parsing", quirks_parse_uint_attr, LITEST_MOUSE);
|
litest_add_for_device("quirks:parsing", quirks_parse_uint_attr, LITEST_MOUSE);
|
||||||
litest_add_for_device("quirks:parsing", quirks_parse_double_attr, LITEST_MOUSE);
|
litest_add_for_device("quirks:parsing", quirks_parse_double_attr, LITEST_MOUSE);
|
||||||
litest_add_for_device("quirks:parsing", quirks_parse_string_attr, LITEST_MOUSE);
|
litest_add_for_device("quirks:parsing", quirks_parse_string_attr, LITEST_MOUSE);
|
||||||
|
litest_add_for_device("quirks:parsing", quirks_parse_integration_attr, LITEST_MOUSE);
|
||||||
|
|
||||||
litest_add_for_device("quirks:model", quirks_model_one, LITEST_MOUSE);
|
litest_add_for_device("quirks:model", quirks_model_one, LITEST_MOUSE);
|
||||||
litest_add_for_device("quirks:model", quirks_model_zero, LITEST_MOUSE);
|
litest_add_for_device("quirks:model", quirks_model_zero, LITEST_MOUSE);
|
||||||
|
|
|
||||||
|
|
@ -936,8 +936,8 @@ START_TEST(touchpad_2fg_tap_n_drag_3fg_btntool)
|
||||||
struct litest_device *dev = litest_current_device();
|
struct litest_device *dev = litest_current_device();
|
||||||
struct libinput *li = dev->libinput;
|
struct libinput *li = dev->libinput;
|
||||||
|
|
||||||
if (libevdev_get_abs_maximum(dev->evdev,
|
if (libevdev_get_abs_maximum(dev->evdev, ABS_MT_SLOT) > 2 ||
|
||||||
ABS_MT_SLOT) > 2)
|
!libevdev_has_event_code(dev->evdev, EV_KEY, BTN_TOOL_TRIPLETAP))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
litest_enable_tap(dev->libinput_device);
|
litest_enable_tap(dev->libinput_device);
|
||||||
|
|
@ -1676,7 +1676,8 @@ START_TEST(touchpad_3fg_tap_pressure_btntool)
|
||||||
struct litest_device *dev = litest_current_device();
|
struct litest_device *dev = litest_current_device();
|
||||||
struct libinput *li = dev->libinput;
|
struct libinput *li = dev->libinput;
|
||||||
|
|
||||||
if (libevdev_get_abs_maximum(dev->evdev, ABS_MT_SLOT) >= 2)
|
if (libevdev_get_abs_maximum(dev->evdev, ABS_MT_SLOT) >= 2 ||
|
||||||
|
!libevdev_has_event_code(dev->evdev, EV_KEY, BTN_TOOL_TRIPLETAP))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
/* libinput doesn't export when it uses pressure detection, so we
|
/* libinput doesn't export when it uses pressure detection, so we
|
||||||
|
|
@ -1736,8 +1737,9 @@ START_TEST(touchpad_3fg_tap_hover_btntool)
|
||||||
struct litest_device *dev = litest_current_device();
|
struct litest_device *dev = litest_current_device();
|
||||||
struct libinput *li = dev->libinput;
|
struct libinput *li = dev->libinput;
|
||||||
|
|
||||||
if (libevdev_get_abs_maximum(dev->evdev, ABS_MT_SLOT) >= 2)
|
if (libevdev_get_abs_maximum(dev->evdev, ABS_MT_SLOT) >= 2 ||
|
||||||
return;
|
!libevdev_has_event_code(dev->evdev, EV_KEY, BTN_TOOL_TRIPLETAP))
|
||||||
|
return;
|
||||||
|
|
||||||
/* libinput doesn't export when it uses pressure detection, so we
|
/* libinput doesn't export when it uses pressure detection, so we
|
||||||
* need to reconstruct this here. Specifically, semi-mt devices are
|
* need to reconstruct this here. Specifically, semi-mt devices are
|
||||||
|
|
@ -1789,8 +1791,8 @@ START_TEST(touchpad_3fg_tap_btntool)
|
||||||
enum libinput_config_tap_button_map map = _i; /* ranged test */
|
enum libinput_config_tap_button_map map = _i; /* ranged test */
|
||||||
unsigned int button = 0;
|
unsigned int button = 0;
|
||||||
|
|
||||||
if (libevdev_get_abs_maximum(dev->evdev,
|
if (libevdev_get_abs_maximum(dev->evdev, ABS_MT_SLOT) > 2 ||
|
||||||
ABS_MT_SLOT) > 2)
|
!libevdev_has_event_code(dev->evdev, EV_KEY, BTN_TOOL_TRIPLETAP))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
litest_enable_tap(dev->libinput_device);
|
litest_enable_tap(dev->libinput_device);
|
||||||
|
|
@ -1839,8 +1841,8 @@ START_TEST(touchpad_3fg_tap_btntool_inverted)
|
||||||
enum libinput_config_tap_button_map map = _i; /* ranged test */
|
enum libinput_config_tap_button_map map = _i; /* ranged test */
|
||||||
unsigned int button = 0;
|
unsigned int button = 0;
|
||||||
|
|
||||||
if (libevdev_get_abs_maximum(dev->evdev,
|
if (libevdev_get_abs_maximum(dev->evdev, ABS_MT_SLOT) > 2 ||
|
||||||
ABS_MT_SLOT) > 2)
|
!libevdev_has_event_code(dev->evdev, EV_KEY, BTN_TOOL_TRIPLETAP))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
litest_enable_tap(dev->libinput_device);
|
litest_enable_tap(dev->libinput_device);
|
||||||
|
|
@ -1889,8 +1891,8 @@ START_TEST(touchpad_3fg_tap_btntool_pointerjump)
|
||||||
enum libinput_config_tap_button_map map = _i; /* ranged test */
|
enum libinput_config_tap_button_map map = _i; /* ranged test */
|
||||||
unsigned int button = 0;
|
unsigned int button = 0;
|
||||||
|
|
||||||
if (libevdev_get_abs_maximum(dev->evdev,
|
if (libevdev_get_abs_maximum(dev->evdev, ABS_MT_SLOT) > 2 ||
|
||||||
ABS_MT_SLOT) > 2)
|
!libevdev_has_event_code(dev->evdev, EV_KEY, BTN_TOOL_TRIPLETAP))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
litest_enable_tap(dev->libinput_device);
|
litest_enable_tap(dev->libinput_device);
|
||||||
|
|
|
||||||
|
|
@ -2096,6 +2096,7 @@ START_TEST(touchpad_palm_clickfinger_size_2fg)
|
||||||
litest_assert_empty_queue(li);
|
litest_assert_empty_queue(li);
|
||||||
}
|
}
|
||||||
END_TEST
|
END_TEST
|
||||||
|
|
||||||
START_TEST(touchpad_left_handed)
|
START_TEST(touchpad_left_handed)
|
||||||
{
|
{
|
||||||
struct litest_device *dev = litest_current_device();
|
struct litest_device *dev = litest_current_device();
|
||||||
|
|
@ -2430,6 +2431,64 @@ START_TEST(touchpad_left_handed_clickpad_delayed)
|
||||||
}
|
}
|
||||||
END_TEST
|
END_TEST
|
||||||
|
|
||||||
|
static inline bool
|
||||||
|
touchpad_has_rotation(struct libevdev *evdev)
|
||||||
|
{
|
||||||
|
return libevdev_get_id_vendor(evdev) == VENDOR_ID_WACOM;
|
||||||
|
}
|
||||||
|
|
||||||
|
START_TEST(touchpad_left_handed_rotation)
|
||||||
|
{
|
||||||
|
struct litest_device *dev = litest_current_device();
|
||||||
|
struct libinput_device *d = dev->libinput_device;
|
||||||
|
struct libinput *li = dev->libinput;
|
||||||
|
enum libinput_config_status status;
|
||||||
|
struct libinput_event *event;
|
||||||
|
struct libinput_event_pointer *p;
|
||||||
|
bool rotate = touchpad_has_rotation(dev->evdev);
|
||||||
|
|
||||||
|
if (!libinput_device_config_left_handed_is_available(d))
|
||||||
|
return;
|
||||||
|
|
||||||
|
status = libinput_device_config_left_handed_set(d, 1);
|
||||||
|
ck_assert_int_eq(status, LIBINPUT_CONFIG_STATUS_SUCCESS);
|
||||||
|
|
||||||
|
litest_drain_events(li);
|
||||||
|
|
||||||
|
litest_touch_down(dev, 0, 20, 80);
|
||||||
|
litest_touch_move_to(dev, 0, 20, 80, 80, 20, 20);
|
||||||
|
litest_touch_up(dev, 0);
|
||||||
|
libinput_dispatch(li);
|
||||||
|
|
||||||
|
event = libinput_get_event(li);
|
||||||
|
ck_assert_notnull(event);
|
||||||
|
do {
|
||||||
|
double x, y, ux, uy;
|
||||||
|
|
||||||
|
p = litest_is_motion_event(event);
|
||||||
|
|
||||||
|
x = libinput_event_pointer_get_dx(p);
|
||||||
|
y = libinput_event_pointer_get_dy(p);
|
||||||
|
ux = libinput_event_pointer_get_dx_unaccelerated(p);
|
||||||
|
uy = libinput_event_pointer_get_dy_unaccelerated(p);
|
||||||
|
|
||||||
|
if (rotate) {
|
||||||
|
ck_assert_double_lt(x, 0);
|
||||||
|
ck_assert_double_gt(y, 0);
|
||||||
|
ck_assert_double_lt(ux, 0);
|
||||||
|
ck_assert_double_gt(uy, 0);
|
||||||
|
} else {
|
||||||
|
ck_assert_double_gt(x, 0);
|
||||||
|
ck_assert_double_lt(y, 0);
|
||||||
|
ck_assert_double_gt(ux, 0);
|
||||||
|
ck_assert_double_lt(uy, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
libinput_event_destroy(event);
|
||||||
|
} while ((event = libinput_get_event(li)));
|
||||||
|
}
|
||||||
|
END_TEST
|
||||||
|
|
||||||
static void
|
static void
|
||||||
hover_continue(struct litest_device *dev, unsigned int slot,
|
hover_continue(struct litest_device *dev, unsigned int slot,
|
||||||
int x, int y)
|
int x, int y)
|
||||||
|
|
@ -7010,6 +7069,7 @@ TEST_COLLECTION(touchpad)
|
||||||
litest_add("touchpad:left-handed", touchpad_left_handed_tapping_2fg, LITEST_TOUCHPAD, LITEST_SINGLE_TOUCH);
|
litest_add("touchpad:left-handed", touchpad_left_handed_tapping_2fg, LITEST_TOUCHPAD, LITEST_SINGLE_TOUCH);
|
||||||
litest_add("touchpad:left-handed", touchpad_left_handed_delayed, LITEST_TOUCHPAD|LITEST_BUTTON, LITEST_CLICKPAD);
|
litest_add("touchpad:left-handed", touchpad_left_handed_delayed, LITEST_TOUCHPAD|LITEST_BUTTON, LITEST_CLICKPAD);
|
||||||
litest_add("touchpad:left-handed", touchpad_left_handed_clickpad_delayed, LITEST_CLICKPAD, LITEST_APPLE_CLICKPAD);
|
litest_add("touchpad:left-handed", touchpad_left_handed_clickpad_delayed, LITEST_CLICKPAD, LITEST_APPLE_CLICKPAD);
|
||||||
|
litest_add("touchpad:left-handed", touchpad_left_handed_rotation, LITEST_TOUCHPAD, LITEST_ANY);
|
||||||
|
|
||||||
/* Semi-MT hover tests aren't generic, they only work on this device and
|
/* Semi-MT hover tests aren't generic, they only work on this device and
|
||||||
* ignore the semi-mt capability (it doesn't matter for the tests) */
|
* ignore the semi-mt capability (it doesn't matter for the tests) */
|
||||||
|
|
|
||||||
|
|
@ -31,6 +31,13 @@
|
||||||
...
|
...
|
||||||
fun:g_malloc0
|
fun:g_malloc0
|
||||||
}
|
}
|
||||||
|
{
|
||||||
|
<g_get_language_names_malloc>
|
||||||
|
Memcheck:Leak
|
||||||
|
fun:malloc
|
||||||
|
...
|
||||||
|
fun:g_get_language_names_with_category
|
||||||
|
}
|
||||||
{
|
{
|
||||||
libunwind:msync_uninitialized_bytes
|
libunwind:msync_uninitialized_bytes
|
||||||
Memcheck:Param
|
Memcheck:Param
|
||||||
|
|
|
||||||
|
|
@ -229,7 +229,7 @@ print_evdev_event(struct record_context *ctx, struct input_event *ev)
|
||||||
|
|
||||||
snprintf(desc,
|
snprintf(desc,
|
||||||
sizeof(desc),
|
sizeof(desc),
|
||||||
"%s / %-20s %4d%s",
|
"%s / %-20s %6d%s",
|
||||||
tname,
|
tname,
|
||||||
cname,
|
cname,
|
||||||
ev->value,
|
ev->value,
|
||||||
|
|
@ -237,7 +237,7 @@ print_evdev_event(struct record_context *ctx, struct input_event *ev)
|
||||||
}
|
}
|
||||||
|
|
||||||
iprintf(ctx,
|
iprintf(ctx,
|
||||||
"- [%3lu, %6u, %3d, %3d, %5d] # %s\n",
|
"- [%3lu, %6u, %3d, %3d, %6d] # %s\n",
|
||||||
ev->time.tv_sec,
|
ev->time.tv_sec,
|
||||||
(unsigned int)ev->time.tv_usec,
|
(unsigned int)ev->time.tv_usec,
|
||||||
ev->type,
|
ev->type,
|
||||||
|
|
|
||||||
|
|
@ -54,7 +54,7 @@ class TestLibinputTool(unittest.TestCase):
|
||||||
# never get rc 2 (invalid usage)
|
# never get rc 2 (invalid usage)
|
||||||
self.assertIn(rc, [0, 1])
|
self.assertIn(rc, [0, 1])
|
||||||
|
|
||||||
def run_command_unrecognised_option(self, args):
|
def run_command_unrecognized_option(self, args):
|
||||||
rc, stdout, stderr = self.run_command(args)
|
rc, stdout, stderr = self.run_command(args)
|
||||||
self.assertEqual(rc, 2)
|
self.assertEqual(rc, 2)
|
||||||
self.assertTrue(stdout.startswith('Usage') or stdout == '')
|
self.assertTrue(stdout.startswith('Usage') or stdout == '')
|
||||||
|
|
@ -66,7 +66,7 @@ class TestLibinputTool(unittest.TestCase):
|
||||||
self.assertTrue(stdout.startswith('Usage') or stdout == '')
|
self.assertTrue(stdout.startswith('Usage') or stdout == '')
|
||||||
self.assertIn('requires an argument', stderr)
|
self.assertIn('requires an argument', stderr)
|
||||||
|
|
||||||
def run_command_unrecognised_tool(self, args):
|
def run_command_unrecognized_tool(self, args):
|
||||||
rc, stdout, stderr = self.run_command(args)
|
rc, stdout, stderr = self.run_command(args)
|
||||||
self.assertEqual(rc, 2)
|
self.assertEqual(rc, 2)
|
||||||
self.assertTrue(stdout.startswith('Usage') or stdout == '')
|
self.assertTrue(stdout.startswith('Usage') or stdout == '')
|
||||||
|
|
@ -89,16 +89,16 @@ class TestLibinputCommand(TestLibinputTool):
|
||||||
self.assertEqual(stderr, '')
|
self.assertEqual(stderr, '')
|
||||||
|
|
||||||
def test_invalid_arguments(self):
|
def test_invalid_arguments(self):
|
||||||
self.run_command_unrecognised_option(['--banana'])
|
self.run_command_unrecognized_option(['--banana'])
|
||||||
self.run_command_unrecognised_option(['--foo'])
|
self.run_command_unrecognized_option(['--foo'])
|
||||||
self.run_command_unrecognised_option(['--quiet'])
|
self.run_command_unrecognized_option(['--quiet'])
|
||||||
self.run_command_unrecognised_option(['--verbose'])
|
self.run_command_unrecognized_option(['--verbose'])
|
||||||
self.run_command_unrecognised_option(['--quiet', 'foo'])
|
self.run_command_unrecognized_option(['--quiet', 'foo'])
|
||||||
|
|
||||||
def test_invalid_tools(self):
|
def test_invalid_tools(self):
|
||||||
self.run_command_unrecognised_tool(['foo'])
|
self.run_command_unrecognized_tool(['foo'])
|
||||||
self.run_command_unrecognised_tool(['debug'])
|
self.run_command_unrecognized_tool(['debug'])
|
||||||
self.run_command_unrecognised_tool(['foo', '--quiet'])
|
self.run_command_unrecognized_tool(['foo', '--quiet'])
|
||||||
|
|
||||||
|
|
||||||
class TestToolWithOptions(object):
|
class TestToolWithOptions(object):
|
||||||
|
|
@ -183,9 +183,9 @@ class TestDebugEvents(TestToolWithOptions, TestLibinputTool):
|
||||||
self.assertEqual(rc, 0)
|
self.assertEqual(rc, 0)
|
||||||
|
|
||||||
def test_invalid_arguments(self):
|
def test_invalid_arguments(self):
|
||||||
self.run_command_unrecognised_option(['--banana'])
|
self.run_command_unrecognized_option(['--banana'])
|
||||||
self.run_command_unrecognised_option(['--foo'])
|
self.run_command_unrecognized_option(['--foo'])
|
||||||
self.run_command_unrecognised_option(['--version'])
|
self.run_command_unrecognized_option(['--version'])
|
||||||
|
|
||||||
|
|
||||||
class TestDebugGUI(TestToolWithOptions, TestLibinputTool):
|
class TestDebugGUI(TestToolWithOptions, TestLibinputTool):
|
||||||
|
|
@ -201,10 +201,10 @@ class TestDebugGUI(TestToolWithOptions, TestLibinputTool):
|
||||||
self.assertEqual(rc, 0)
|
self.assertEqual(rc, 0)
|
||||||
|
|
||||||
def test_invalid_arguments(self):
|
def test_invalid_arguments(self):
|
||||||
self.run_command_unrecognised_option(['--quiet'])
|
self.run_command_unrecognized_option(['--quiet'])
|
||||||
self.run_command_unrecognised_option(['--banana'])
|
self.run_command_unrecognized_option(['--banana'])
|
||||||
self.run_command_unrecognised_option(['--foo'])
|
self.run_command_unrecognized_option(['--foo'])
|
||||||
self.run_command_unrecognised_option(['--version'])
|
self.run_command_unrecognized_option(['--version'])
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
|
|
|
||||||
|
|
@ -110,7 +110,9 @@ int main(int argc, char **argv)
|
||||||
if (!device)
|
if (!device)
|
||||||
goto out;
|
goto out;
|
||||||
|
|
||||||
handle_absfuzz(device);
|
if (udev_device_get_property_value(device, "ID_INPUT_TOUCHPAD") ||
|
||||||
|
udev_device_get_property_value(device, "ID_INPUT_TOUCHSCREEN"))
|
||||||
|
handle_absfuzz(device);
|
||||||
|
|
||||||
rc = 0;
|
rc = 0;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue