summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2011-01-20 21:16:24 -0800
committerKeith Packard <keithp@keithp.com>2011-01-20 21:16:24 -0800
commit57a1d9b85331f6fe19d5111f5163139572ffbf02 (patch)
tree63a2e42309afdaec073a00b01118363ec2fb8caa /include
parent24ce650cf4f0c6fa72faecd38c53d40703e6c959 (diff)
parent64237697994871adfcf4905b5784e75cd7281579 (diff)
Merge remote branch 'whot/for-keith'
Diffstat (limited to 'include')
-rw-r--r--include/dix.h7
-rw-r--r--include/input.h6
-rw-r--r--include/inputstr.h82
3 files changed, 53 insertions, 42 deletions
diff --git a/include/dix.h b/include/dix.h
index 7485e8ed4..12e4b5977 100644
--- a/include/dix.h
+++ b/include/dix.h
@@ -372,6 +372,13 @@ extern void AllowSome(
extern void ReleaseActiveGrabs(
ClientPtr client);
+extern GrabPtr CheckPassiveGrabsOnWindow(
+ WindowPtr /* pWin */,
+ DeviceIntPtr /* device */,
+ DeviceEvent * /* event */,
+ BOOL /* checkCore */,
+ BOOL /* activate */);
+
extern _X_EXPORT int DeliverEventsToWindow(
DeviceIntPtr /* pWin */,
WindowPtr /* pWin */,
diff --git a/include/input.h b/include/input.h
index 9f3227fb0..f96a0a988 100644
--- a/include/input.h
+++ b/include/input.h
@@ -103,6 +103,7 @@ typedef struct _OtherClients *OtherClientsPtr;
typedef struct _InputClients *InputClientsPtr;
typedef struct _DeviceIntRec *DeviceIntPtr;
typedef struct _ClassesRec *ClassesPtr;
+typedef struct _SpriteRec *SpritePtr;
typedef union _GrabMask GrabMask;
typedef struct _EventList {
@@ -525,13 +526,15 @@ extern _X_EXPORT InputAttributes *DuplicateInputAttributes(InputAttributes *attr
extern _X_EXPORT void FreeInputAttributes(InputAttributes *attrs);
/* misc event helpers */
+extern Mask GetEventMask(DeviceIntPtr dev, xEvent* ev, InputClientsPtr clients);
extern Mask GetEventFilter(DeviceIntPtr dev, xEvent *event);
extern Mask GetWindowXI2Mask(DeviceIntPtr dev, WindowPtr win, xEvent* ev);
-void FixUpEventFromWindow(DeviceIntPtr pDev,
+void FixUpEventFromWindow(SpritePtr pSprite,
xEvent *xE,
WindowPtr pWin,
Window child,
Bool calcChild);
+extern WindowPtr XYToWindow(SpritePtr pSprite, int x, int y);
extern int EventIsDeliverable(DeviceIntPtr dev, InternalEvent* event,
WindowPtr win);
/**
@@ -567,6 +570,7 @@ extern _X_HIDDEN void valuator_set_mode(DeviceIntPtr dev, int axis, int mode);
extern Bool EnableCursor;
extern _X_EXPORT ValuatorMask *valuator_mask_new(int num_valuators);
+extern _X_EXPORT void valuator_mask_free(ValuatorMask **mask);
extern _X_EXPORT void valuator_mask_set_range(ValuatorMask *mask,
int first_valuator, int num_valuators,
const int* valuators);
diff --git a/include/inputstr.h b/include/inputstr.h
index 44de9c44a..b74ee0454 100644
--- a/include/inputstr.h
+++ b/include/inputstr.h
@@ -203,6 +203,47 @@ typedef struct _GrabRec {
unsigned char xi2mask[EMASKSIZE][XI2MASKSIZE];
} GrabRec;
+/**
+ * Sprite information for a device.
+ */
+typedef struct _SpriteRec {
+ CursorPtr current;
+ BoxRec hotLimits; /* logical constraints of hot spot */
+ Bool confined; /* confined to screen */
+ RegionPtr hotShape; /* additional logical shape constraint */
+ BoxRec physLimits; /* physical constraints of hot spot */
+ WindowPtr win; /* window of logical position */
+ HotSpot hot; /* logical pointer position */
+ HotSpot hotPhys; /* physical pointer position */
+#ifdef PANORAMIX
+ ScreenPtr screen; /* all others are in Screen 0 coordinates */
+ RegionRec Reg1; /* Region 1 for confining motion */
+ RegionRec Reg2; /* Region 2 for confining virtual motion */
+ WindowPtr windows[MAXSCREENS];
+ WindowPtr confineWin; /* confine window */
+#endif
+ /* The window trace information is used at dix/events.c to avoid having
+ * to compute all the windows between the root and the current pointer
+ * window each time a button or key goes down. The grabs on each of those
+ * windows must be checked.
+ * spriteTraces should only be used at dix/events.c! */
+ WindowPtr *spriteTrace;
+ int spriteTraceSize;
+ int spriteTraceGood;
+
+ /* Due to delays between event generation and event processing, it is
+ * possible that the pointer has crossed screen boundaries between the
+ * time in which it begins generating events and the time when
+ * those events are processed.
+ *
+ * pEnqueueScreen: screen the pointer was on when the event was generated
+ * pDequeueScreen: screen the pointer was on when the event is processed
+ */
+ ScreenPtr pEnqueueScreen;
+ ScreenPtr pDequeueScreen;
+
+} SpriteRec;
+
typedef struct _KeyClassRec {
int sourceid;
CARD8 down[DOWN_LENGTH];
@@ -360,47 +401,6 @@ typedef struct _ClassesRec {
} ClassesRec;
-/**
- * Sprite information for a device.
- */
-typedef struct {
- CursorPtr current;
- BoxRec hotLimits; /* logical constraints of hot spot */
- Bool confined; /* confined to screen */
- RegionPtr hotShape; /* additional logical shape constraint */
- BoxRec physLimits; /* physical constraints of hot spot */
- WindowPtr win; /* window of logical position */
- HotSpot hot; /* logical pointer position */
- HotSpot hotPhys; /* physical pointer position */
-#ifdef PANORAMIX
- ScreenPtr screen; /* all others are in Screen 0 coordinates */
- RegionRec Reg1; /* Region 1 for confining motion */
- RegionRec Reg2; /* Region 2 for confining virtual motion */
- WindowPtr windows[MAXSCREENS];
- WindowPtr confineWin; /* confine window */
-#endif
- /* The window trace information is used at dix/events.c to avoid having
- * to compute all the windows between the root and the current pointer
- * window each time a button or key goes down. The grabs on each of those
- * windows must be checked.
- * spriteTraces should only be used at dix/events.c! */
- WindowPtr *spriteTrace;
- int spriteTraceSize;
- int spriteTraceGood;
-
- /* Due to delays between event generation and event processing, it is
- * possible that the pointer has crossed screen boundaries between the
- * time in which it begins generating events and the time when
- * those events are processed.
- *
- * pEnqueueScreen: screen the pointer was on when the event was generated
- * pDequeueScreen: screen the pointer was on when the event is processed
- */
- ScreenPtr pEnqueueScreen;
- ScreenPtr pDequeueScreen;
-
-} SpriteRec, *SpritePtr;
-
/* Device properties */
typedef struct _XIPropertyValue
{