482e0cb352
In order to send events to specific windows associated with the barrier, we need to move the code that handles barriers to somewhere where it's easier to construct and send events. Rather than duplicating XSync with its XSyncSelectAlarm, re-use the existing XI infrastructure. For now, just move a bunch of code over, rename some things, and initialize the new structures, but still consider it a separate codebase. Pointer barrier requests are still handled by XFixes, so this is a weird intermediate state. It's unknown whether we'll add explicit requests to pointer barriers inside XI. Signed-off-by: Jasper St. Pierre <jstpierre@mecheye.net> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
48 lines
907 B
C
48 lines
907 B
C
|
|
#ifdef HAVE_DIX_CONFIG_H
|
|
#include <dix-config.h>
|
|
#endif
|
|
|
|
#ifndef _XIBARRIERS_H_
|
|
#define _XIBARRIERS_H_
|
|
|
|
#include "resource.h"
|
|
|
|
extern _X_EXPORT RESTYPE PointerBarrierType;
|
|
|
|
struct PointerBarrier {
|
|
CARD16 x1, x2, y1, y2;
|
|
CARD32 directions;
|
|
};
|
|
|
|
int
|
|
barrier_get_direction(int, int, int, int);
|
|
BOOL
|
|
barrier_is_blocking(const struct PointerBarrier *, int, int, int, int,
|
|
double *);
|
|
BOOL
|
|
barrier_is_blocking_direction(const struct PointerBarrier *, int);
|
|
void
|
|
barrier_clamp_to_barrier(struct PointerBarrier *barrier, int dir, int *x,
|
|
int *y);
|
|
|
|
#include <xfixesint.h>
|
|
|
|
int
|
|
XICreatePointerBarrier(ClientPtr client,
|
|
xXFixesCreatePointerBarrierReq * stuff);
|
|
|
|
int
|
|
XIDestroyPointerBarrier(ClientPtr client,
|
|
xXFixesDestroyPointerBarrierReq * stuff);
|
|
|
|
Bool
|
|
XIBarrierInit(void);
|
|
|
|
#endif /* _XIBARRIERS_H_ */
|
|
|
|
|
|
|
|
|
|
|