Commit 00b96de3 authored by Peter Hutterer's avatar Peter Hutterer

Revert "libinput-drv: Move properties to a separate header"

Missing the pkg-config file, updated patch coming up.

This reverts commit 8ceed9c7.
parent 8ceed9c7
......@@ -21,7 +21,7 @@
DISTCHECK_CONFIGURE_FLAGS = --with-sdkdir='$${includedir}/xorg'
SUBDIRS = src include man
SUBDIRS = src man
MAINTAINERCLEANFILES = ChangeLog INSTALL
.PHONY: ChangeLog INSTALL
......
......@@ -68,7 +68,6 @@ DRIVER_NAME=libinput
AC_SUBST([DRIVER_NAME])
AC_CONFIG_FILES([Makefile
include/Makefile
src/Makefile
man/Makefile])
AC_OUTPUT
sdk_HEADERS = libinput-properties.h
/*
* Copyright © 2015 Red Hat, Inc.
*
* Permission to use, copy, modify, distribute, and sell this software
* and its documentation for any purpose is hereby granted without
* fee, provided that the above copyright notice appear in all copies
* and that both that copyright notice and this permission notice
* appear in supporting documentation, and that the name of Red Hat
* not be used in advertising or publicity pertaining to distribution
* of the software without specific, written prior permission. Red
* Hat makes no representations about the suitability of this software
* for any purpose. It is provided "as is" without express or implied
* warranty.
*
* THE AUTHORS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
* INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN
* NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY SPECIAL, INDIRECT OR
* CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
* OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
* NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef _LIBINPUT_PROPERTIES_H_
#define _LIBINPUT_PROPERTIES_H_
/* Tapping enabled/disabled: BOOL, 1 value */
#define LIBINPUT_PROP_TAP "libinput Tapping Enabled"
/* Calibration matrix: FLOAT, 9 values of a 3x3 matrix, in rows */
#define LIBINPUT_PROP_CALIBRATION "libinput Calibration Matrix"
/* Pointer accel speed: FLOAT, 1 value, 32 bit */
#define LIBINPUT_PROP_ACCEL "libinput Accel Speed"
/* Natural scrolling: BOOL, 1 value */
#define LIBINPUT_PROP_NATURAL_SCROLL "libinput Natural Scrolling Enabled"
/* Send-events mode: BOOL read-only, 2 values in order disabled,
disabled-on-external-mouse */
#define LIBINPUT_PROP_SENDEVENTS_AVAILABLE "libinput Send Events Modes Available"
/* Send-events mode: BOOL, 2 values in order disabled,
disabled-on-external-mouse */
#define LIBINPUT_PROP_SENDEVENTS_ENABLED "libinput Send Events Mode Enabled"
/* Left-handed enabled/disabled: BOOL, 1 value */
#define LIBINPUT_PROP_LEFT_HANDED "libinput Left Handed Enabled"
/* Scroll method: BOOL read-only, 3 values in order 2fg, edge, button.
shows available scroll methods */
#define LIBINPUT_PROP_SCROLL_METHODS_AVAILABLE "libinput Scroll Methods Available"
/* Scroll method: BOOL, 3 values in order 2fg, edge, button
only one is enabled at a time at max */
#define LIBINPUT_PROP_SCROLL_METHOD_ENABLED "libinput Scroll Method Enabled"
/* Scroll button for button scrolling: 32-bit int, 1 value */
#define LIBINPUT_PROP_SCROLL_BUTTON "libinput Button Scrolling Button"
#endif /* _LIBINPUT_PROPERTIES_H_ */
......@@ -41,8 +41,6 @@
#include <X11/Xatom.h>
#include "libinput-properties.h"
#ifndef XI86_SERVER_FD
#define XI86_SERVER_FD 0x20
#endif
......@@ -59,6 +57,31 @@
*/
#define TOUCH_AXIS_MAX 0xffff
/* Tapping enabled/disabled: BOOL, 1 value */
#define PROP_TAP "libinput Tapping Enabled"
/* Calibration matrix: FLOAT, 9 values of a 3x3 matrix, in rows */
#define PROP_CALIBRATION "libinput Calibration Matrix"
/* Pointer accel speed: FLOAT, 1 value, 32 bit */
#define PROP_ACCEL "libinput Accel Speed"
/* Natural scrolling: BOOL, 1 value */
#define PROP_NATURAL_SCROLL "libinput Natural Scrolling Enabled"
/* Send-events mode: BOOL read-only, 2 values in order disabled,
disabled-on-external-mouse */
#define PROP_SENDEVENTS_AVAILABLE "libinput Send Events Modes Available"
/* Send-events mode: BOOL, 2 values in order disabled,
disabled-on-external-mouse */
#define PROP_SENDEVENTS_ENABLED "libinput Send Events Mode Enabled"
/* Left-handed enabled/disabled: BOOL, 1 value */
#define PROP_LEFT_HANDED "libinput Left Handed Enabled"
/* Scroll method: BOOL read-only, 3 values in order 2fg, edge, button.
shows available scroll methods */
#define PROP_SCROLL_METHODS_AVAILABLE "libinput Scroll Methods Available"
/* Scroll method: BOOL, 3 values in order 2fg, edge, button
only one is enabled at a time at max */
#define PROP_SCROLL_METHOD_ENABLED "libinput Scroll Method Enabled"
/* Scroll button for button scrolling: 32-bit int, 1 value */
#define PROP_SCROLL_BUTTON "libinput Button Scrolling Button"
struct xf86libinput_driver {
struct libinput *libinput;
int device_enabled_count;
......@@ -1595,7 +1618,7 @@ LibinputInitProperty(DeviceIntPtr dev)
if (libinput_device_config_tap_get_finger_count(device) > 0) {
BOOL tap = driver_data->options.tapping;
prop_tap = MakeAtom(LIBINPUT_PROP_TAP, strlen(LIBINPUT_PROP_TAP), TRUE);
prop_tap = MakeAtom(PROP_TAP, strlen(PROP_TAP), TRUE);
rc = XIChangeDeviceProperty(dev, prop_tap, XA_INTEGER, 8,
PropModeReplace, 1, &tap, FALSE);
if (rc != Success)
......@@ -1613,8 +1636,8 @@ LibinputInitProperty(DeviceIntPtr dev)
calibration[7] = 0;
calibration[8] = 1;
prop_calibration = MakeAtom(LIBINPUT_PROP_CALIBRATION,
strlen(LIBINPUT_PROP_CALIBRATION),
prop_calibration = MakeAtom(PROP_CALIBRATION,
strlen(PROP_CALIBRATION),
TRUE);
rc = XIChangeDeviceProperty(dev, prop_calibration, prop_float, 32,
......@@ -1627,7 +1650,7 @@ LibinputInitProperty(DeviceIntPtr dev)
if (libinput_device_config_accel_is_available(device)) {
float speed = driver_data->options.speed;
prop_accel = MakeAtom(LIBINPUT_PROP_ACCEL, strlen(LIBINPUT_PROP_ACCEL), TRUE);
prop_accel = MakeAtom(PROP_ACCEL, strlen(PROP_ACCEL), TRUE);
rc = XIChangeDeviceProperty(dev, prop_accel, prop_float, 32,
PropModeReplace, 1, &speed, FALSE);
if (rc != Success)
......@@ -1638,8 +1661,8 @@ LibinputInitProperty(DeviceIntPtr dev)
if (libinput_device_config_scroll_has_natural_scroll(device)) {
BOOL natural_scroll = driver_data->options.natural_scrolling;
prop_natural_scroll = MakeAtom(LIBINPUT_PROP_NATURAL_SCROLL,
strlen(LIBINPUT_PROP_NATURAL_SCROLL),
prop_natural_scroll = MakeAtom(PROP_NATURAL_SCROLL,
strlen(PROP_NATURAL_SCROLL),
TRUE);
rc = XIChangeDeviceProperty(dev, prop_natural_scroll, XA_INTEGER, 8,
PropModeReplace, 1, &natural_scroll, FALSE);
......@@ -1658,8 +1681,8 @@ LibinputInitProperty(DeviceIntPtr dev)
if (sendevent_modes & LIBINPUT_CONFIG_SEND_EVENTS_DISABLED_ON_EXTERNAL_MOUSE)
modes[1] = TRUE;
prop_sendevents_available = MakeAtom(LIBINPUT_PROP_SENDEVENTS_AVAILABLE,
strlen(LIBINPUT_PROP_SENDEVENTS_AVAILABLE),
prop_sendevents_available = MakeAtom(PROP_SENDEVENTS_AVAILABLE,
strlen(PROP_SENDEVENTS_AVAILABLE),
TRUE);
rc = XIChangeDeviceProperty(dev, prop_sendevents_available,
XA_INTEGER, 8,
......@@ -1680,8 +1703,8 @@ LibinputInitProperty(DeviceIntPtr dev)
break;
}
prop_sendevents_enabled = MakeAtom(LIBINPUT_PROP_SENDEVENTS_ENABLED,
strlen(LIBINPUT_PROP_SENDEVENTS_ENABLED),
prop_sendevents_enabled = MakeAtom(PROP_SENDEVENTS_ENABLED,
strlen(PROP_SENDEVENTS_ENABLED),
TRUE);
rc = XIChangeDeviceProperty(dev, prop_sendevents_enabled,
XA_INTEGER, 8,
......@@ -1695,8 +1718,8 @@ LibinputInitProperty(DeviceIntPtr dev)
if (libinput_device_config_left_handed_is_available(device)) {
BOOL left_handed = driver_data->options.left_handed;
prop_left_handed = MakeAtom(LIBINPUT_PROP_LEFT_HANDED,
strlen(LIBINPUT_PROP_LEFT_HANDED),
prop_left_handed = MakeAtom(PROP_LEFT_HANDED,
strlen(PROP_LEFT_HANDED),
TRUE);
rc = XIChangeDeviceProperty(dev, prop_left_handed,
XA_INTEGER, 8,
......@@ -1719,8 +1742,8 @@ LibinputInitProperty(DeviceIntPtr dev)
methods[2] = TRUE;
prop_scroll_methods_available =
MakeAtom(LIBINPUT_PROP_SCROLL_METHODS_AVAILABLE,
strlen(LIBINPUT_PROP_SCROLL_METHODS_AVAILABLE),
MakeAtom(PROP_SCROLL_METHODS_AVAILABLE,
strlen(PROP_SCROLL_METHODS_AVAILABLE),
TRUE);
rc = XIChangeDeviceProperty(dev,
prop_scroll_methods_available,
......@@ -1752,8 +1775,8 @@ LibinputInitProperty(DeviceIntPtr dev)
}
prop_scroll_method_enabled =
MakeAtom(LIBINPUT_PROP_SCROLL_METHOD_ENABLED,
strlen(LIBINPUT_PROP_SCROLL_METHOD_ENABLED),
MakeAtom(PROP_SCROLL_METHOD_ENABLED,
strlen(PROP_SCROLL_METHOD_ENABLED),
TRUE);
rc = XIChangeDeviceProperty(dev,
prop_scroll_method_enabled,
......@@ -1773,8 +1796,8 @@ LibinputInitProperty(DeviceIntPtr dev)
LIBINPUT_CONFIG_SCROLL_ON_BUTTON_DOWN) {
CARD32 scroll_button = driver_data->options.scroll_button;
prop_scroll_button = MakeAtom(LIBINPUT_PROP_SCROLL_BUTTON,
strlen(LIBINPUT_PROP_SCROLL_BUTTON),
prop_scroll_button = MakeAtom(PROP_SCROLL_BUTTON,
strlen(PROP_SCROLL_BUTTON),
TRUE);
rc = XIChangeDeviceProperty(dev, prop_scroll_button,
XA_CARDINAL, 32,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment