diff options
author | Adam Jackson <ajax@redhat.com> | 2011-05-25 05:54:35 -0400 |
---|---|---|
committer | Adam Jackson <ajax@redhat.com> | 2011-05-31 15:10:51 -0400 |
commit | d45f5b2493bc0a2882bf972849b5c9c50cd533ca (patch) | |
tree | 08ee6bc366efad2b49299a6f6b350042c8d5af0b /xfixes/xfixes.h | |
parent | 4621bb270a36d35d4ab67f1d7fb47674683dfc5b (diff) |
fixes: Add support for pointer barriers
Implements pointer barriers as specified by version 5 of the XFIXES
protocol. Barriers are axis-aligned, zero-width lines that block pointer
movement for relative input devices. Barriers may block motion in either
the positive or negative direction, or both.
v3:
- Fix off-by-one in version_requests array
- Port to non-glib test harness
- Fix review notes from Søren Sandmann Pedersen, add tests to match
Co-authored-by: Peter Hutterer <peter.hutterer@who-t.net>
Tested-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'xfixes/xfixes.h')
-rw-r--r-- | xfixes/xfixes.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/xfixes/xfixes.h b/xfixes/xfixes.h index 1638350c2..5765e64b5 100644 --- a/xfixes/xfixes.h +++ b/xfixes/xfixes.h @@ -30,6 +30,7 @@ #include "resource.h" extern _X_EXPORT RESTYPE RegionResType; +extern _X_EXPORT RESTYPE PointerBarrierType; extern _X_EXPORT int XFixesErrorBase; #define VERIFY_REGION(pRegion, rid, client, mode) \ @@ -51,5 +52,21 @@ extern _X_EXPORT int XFixesErrorBase; extern _X_EXPORT RegionPtr XFixesRegionCopy (RegionPtr pRegion); +struct PointerBarrier { + CARD16 x1, x2, y1, y2; + CARD32 directions; +}; + + +extern int +barrier_get_direction(int, int, int, int); +extern BOOL +barrier_is_blocking(const struct PointerBarrier*, int, int, int, int, double*); +extern BOOL +barrier_is_blocking_direction(const struct PointerBarrier*, int); +extern void +barrier_clamp_to_barrier(struct PointerBarrier *barrier, int dir, int *x, int *y); + + #endif /* _XFIXES_H_ */ |