diff options
| author | Henrik Rydberg <rydberg@euromail.se> | 2011-02-15 14:48:57 +0100 |
|---|---|---|
| committer | Henrik Rydberg <rydberg@euromail.se> | 2011-02-15 14:48:57 +0100 |
| commit | 3244deffa1aedbb6c1af8c2dc993f1d771373c6a (patch) | |
| tree | 2e5a234d628c7065d5a75620639b3a7305fa33ab /include/utouch | |
| parent | 814bc7eb456af9439c88d9c7617816934183b959 (diff) | |
Optional XI2.1 support
This patchs adds optional XI2.1 support to utouch-frame. The
utouch/frame-xi2.h header contains helper functions equivalent
to utouch/frame-mtdev.h. In addition, the device-to-screen mapping
is handled via XEvents and optionally XIPropertyEvent. The latter
allows free device placement via xinput set-prop, useful in multi-
head setups, thanks to Chase Douglas. Touch frame events can be tested
using the utouch-frame-test-xi2 tool. Use --with-xi to enable.
Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
Diffstat (limited to 'include/utouch')
| -rw-r--r-- | include/utouch/frame-xi2.h | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/include/utouch/frame-xi2.h b/include/utouch/frame-xi2.h new file mode 100644 index 0000000..5849c40 --- /dev/null +++ b/include/utouch/frame-xi2.h | |||
| @@ -0,0 +1,49 @@ | |||
| 1 | /***************************************************************************** | ||
| 2 | * | ||
| 3 | * utouch-frame - Touch Frame Library | ||
| 4 | * | ||
| 5 | * Copyright (C) 2010-2011 Canonical Ltd. | ||
| 6 | * | ||
| 7 | * This program is free software: you can redistribute it and/or modify it | ||
| 8 | * under the terms of the GNU General Public License as published by the | ||
| 9 | * Free Software Foundation, either version 3 of the License, or (at your | ||
| 10 | * option) any later version. | ||
| 11 | * | ||
| 12 | * This program is distributed in the hope that it will be useful, but | ||
| 13 | * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
| 15 | * General Public License for more details. | ||
| 16 | * | ||
| 17 | * You should have received a copy of the GNU General Public License along | ||
| 18 | * with this program. If not, see <http://www.gnu.org/licenses/>. | ||
| 19 | * | ||
| 20 | ****************************************************************************/ | ||
| 21 | |||
| 22 | #ifndef _UTOUCH_FRAME_XI2_H | ||
| 23 | #define _UTOUCH_FRAME_XI2_H | ||
| 24 | |||
| 25 | #ifdef __cplusplus | ||
| 26 | extern "C" { | ||
| 27 | #endif | ||
| 28 | |||
| 29 | #define MTDEV_NO_LEGACY_API | ||
| 30 | |||
| 31 | #include <utouch/frame.h> | ||
| 32 | #include <X11/extensions/XInput2.h> | ||
| 33 | |||
| 34 | int utouch_frame_is_supported_xi2(Display *dpy, const XIDeviceInfo *dev); | ||
| 35 | |||
| 36 | int utouch_frame_init_xi2(utouch_frame_handle fh, | ||
| 37 | Display *dpy, const XIDeviceInfo *dev); | ||
| 38 | |||
| 39 | int utouch_frame_configure_xi2(utouch_frame_handle fh, | ||
| 40 | const XConfigureEvent *ev); | ||
| 41 | |||
| 42 | const struct utouch_frame * | ||
| 43 | utouch_frame_pump_xi2(utouch_frame_handle fh, const XIDeviceEvent *ev); | ||
| 44 | |||
| 45 | #ifdef __cplusplus | ||
| 46 | } | ||
| 47 | #endif | ||
| 48 | |||
| 49 | #endif | ||
