summaryrefslogtreecommitdiff
path: root/Xi/xibarriers.h
blob: 8f2993f85e5de7424e0f65cc1a661fb209602a92 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47

#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_ */