summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorKeith Packard <keithp@neko.keithp.com>2006-11-04 17:46:26 -0800
committerKeith Packard <keithp@neko.keithp.com>2006-11-04 17:46:26 -0800
commit028bbdc0417173803695808ba9f48498519273a3 (patch)
tree1df4feed40b78d346f57a3b20163469137740f30 /include
parent50504c68e1d407232cf83465981b235e542ef31f (diff)
parent8deaaa312ad7f9b492a2ae8ad17d74650112c25c (diff)
Merge master back to randr-1.2
Diffstat (limited to 'include')
-rw-r--r--include/Makefile.am1
-rw-r--r--include/XIstubs.h12
-rw-r--r--include/config.h31
-rw-r--r--include/dix-config.h.in18
-rw-r--r--include/exevents.h13
-rw-r--r--include/extinit.h6
-rw-r--r--include/input.h88
-rw-r--r--include/inputstr.h73
-rw-r--r--include/kdrive-config.h.in6
-rw-r--r--include/os.h10
10 files changed, 228 insertions, 30 deletions
diff --git a/include/Makefile.am b/include/Makefile.am
index 9e340d72d..9f07fa650 100644
--- a/include/Makefile.am
+++ b/include/Makefile.am
@@ -7,6 +7,7 @@ sdk_HEADERS = \
closure.h \
colormap.h \
colormapst.h \
+ config.h \
cursor.h \
cursorstr.h \
dix.h \
diff --git a/include/XIstubs.h b/include/XIstubs.h
index 45f6eb10c..6797e0732 100644
--- a/include/XIstubs.h
+++ b/include/XIstubs.h
@@ -26,18 +26,6 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#ifndef XI_STUBS_H
#define XI_STUBS_H 1
-int
-ChangeKeyboardDevice (
- DeviceIntPtr /* old_dev */,
- DeviceIntPtr /* new_dev */);
-
-int
-ChangePointerDevice (
- DeviceIntPtr /* old_dev */,
- DeviceIntPtr /* new_dev */,
- unsigned char /* x */,
- unsigned char /* y */);
-
void
CloseInputDevice (
DeviceIntPtr /* d */,
diff --git a/include/config.h b/include/config.h
new file mode 100644
index 000000000..0c304b15e
--- /dev/null
+++ b/include/config.h
@@ -0,0 +1,31 @@
+/*
+ * Copyright © 2006 Daniel Stone
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and its
+ * documentation for any purpose is hereby granted without fee, provided that
+ * the above copyright notice appear in all copies and that both that
+ * copyright notice and this permission notice appear in supporting
+ * documentation, and that the name of the copyright holders and/or authors
+ * not be used in advertising or publicity pertaining to distribution of the
+ * software without specific, written prior permission. The copyright holders
+ * and/or authors make no representations about the suitability of this
+ * software for any purpose. It is provided "as is" without express or
+ * implied warranty.
+ *
+ * THE COPYRIGHT HOLDERS AND/OR AUTHORS DISCLAIM ALL WARRANTIES WITH REGARD
+ * TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS, IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND/OR AUTHORS BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER
+ * RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF
+ * CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
+ * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#ifndef CONFIG_H
+#define CONFIG_H
+
+void configInitialise(void);
+void configFini(void);
+void configDispatch(void);
+
+#endif /* CONFIG_H */
diff --git a/include/dix-config.h.in b/include/dix-config.h.in
index 84d693f5c..7aabae2ec 100644
--- a/include/dix-config.h.in
+++ b/include/dix-config.h.in
@@ -448,7 +448,25 @@
/* Define to 1 if modules should avoid the libcwrapper */
#undef NO_LIBCWRAPPER
+/* Support D-BUS */
+#undef HAVE_DBUS
+
+/* Use only built-in fonts */
+#undef BUILTIN_FONTS
+
+/* Avoid using font servers */
+#undef NOFONTSERVERACCESS
+
+/* Use an empty root cursor */
+#undef NULL_ROOT_CURSOR
+
/* Have a monotonic clock from clock_gettime() */
#undef MONOTONIC_CLOCK
+/* Define to 1 if the DTrace Xserver provider probes should be built in */
+#undef XSERVER_DTRACE
+
+/* Path to XErrorDB file */
+#undef XERRORDB_PATH
+
#endif /* _DIX_CONFIG_H_ */
diff --git a/include/exevents.h b/include/exevents.h
index 1169a6c4e..7fbaddbb5 100644
--- a/include/exevents.h
+++ b/include/exevents.h
@@ -179,4 +179,17 @@ extern int DeviceEventSuppressForWindow(
Mask /* mask */,
int /* maskndx */);
+void FindInterestedChildren(
+ DeviceIntPtr /* dev */,
+ WindowPtr /* p1 */,
+ Mask /* mask */,
+ xEvent * /* ev */,
+ int /* count */);
+
+void SendEventToAllWindows(
+ DeviceIntPtr /* dev */,
+ Mask /* mask */,
+ xEvent * /* ev */,
+ int /* count */);
+
#endif /* EXEVENTS_H */
diff --git a/include/extinit.h b/include/extinit.h
index b1a0f215d..2087d74d6 100644
--- a/include/extinit.h
+++ b/include/extinit.h
@@ -104,6 +104,12 @@ SDeviceMappingNotifyEvent (
);
void
+SDevicePresenceNotifyEvent (
+ devicePresenceNotify * /* from */,
+ devicePresenceNotify * /* to */
+ );
+
+void
FixExtensionEvents (
ExtensionEntry * /* extEntry */
);
diff --git a/include/input.h b/include/input.h
index c0cee2458..f2fe6d137 100644
--- a/include/input.h
+++ b/include/input.h
@@ -59,6 +59,10 @@ SOFTWARE.
#define DEVICE_OFF 2
#define DEVICE_CLOSE 3
+#define POINTER_RELATIVE (1 << 1)
+#define POINTER_ABSOLUTE (1 << 2)
+#define POINTER_ACCELERATE (1 << 3)
+
#define MAP_LENGTH 256
#define DOWN_LENGTH 32 /* 256/8 => number of bytes to hold 256 bits */
#define NullGrab ((GrabPtr)NULL)
@@ -161,6 +165,14 @@ extern void ResetDevicePrivateIndex(void);
extern KeybdCtrl defaultKeyboardControl;
extern PtrCtrl defaultPointerControl;
+typedef struct _InputOption {
+ char *key;
+ char *value;
+ struct _InputOption *next;
+} InputOption;
+
+extern void InitCoreDevices(void);
+
extern DeviceIntPtr AddInputDevice(
DeviceProc /*deviceProc*/,
Bool /*autoStart*/);
@@ -168,6 +180,9 @@ extern DeviceIntPtr AddInputDevice(
extern Bool EnableDevice(
DeviceIntPtr /*device*/);
+extern Bool ActivateDevice(
+ DeviceIntPtr /*device*/);
+
extern Bool DisableDevice(
DeviceIntPtr /*device*/);
@@ -175,7 +190,7 @@ extern int InitAndStartDevices(void);
extern void CloseDownDevices(void);
-extern void RemoveDevice(
+extern int RemoveDevice(
DeviceIntPtr /*dev*/);
extern int NumMotionEvents(void);
@@ -225,6 +240,9 @@ extern Bool InitValuatorClassDeviceStruct(
int /*numMotionEvents*/,
int /*mode*/);
+extern Bool InitAbsoluteClassDeviceStruct(
+ DeviceIntPtr /*device*/);
+
extern Bool InitFocusClassDeviceStruct(
DeviceIntPtr /*device*/);
@@ -294,7 +312,8 @@ extern Bool InitPointerDeviceStruct(
int /*numButtons*/,
ValuatorMotionProcPtr /*motionProc*/,
PtrCtrlProcPtr /*controlProc*/,
- int /*numMotionEvents*/);
+ int /*numMotionEvents*/,
+ int /*numAxes*/);
extern Bool InitKeyboardDeviceStruct(
DevicePtr /*device*/,
@@ -356,7 +375,7 @@ extern void CoreProcessKeyboardEvent(
extern Bool LegalModifier(
unsigned int /*key*/,
- DevicePtr /*pDev*/);
+ DeviceIntPtr /*pDev*/);
extern void ProcessInputEvents(void);
@@ -364,4 +383,67 @@ extern void InitInput(
int /*argc*/,
char ** /*argv*/);
+extern int GetMaximumEventsNum(void);
+
+extern int GetPointerEvents(
+ xEvent *events,
+ DeviceIntPtr pDev,
+ int type,
+ int buttons,
+ int flags,
+ int first_valuator,
+ int num_valuators,
+ int *valuators);
+
+extern int GetKeyboardEvents(
+ xEvent *events,
+ DeviceIntPtr pDev,
+ int type,
+ int key_code);
+
+extern int GetKeyboardValuatorEvents(
+ xEvent *events,
+ DeviceIntPtr pDev,
+ int type,
+ int key_code,
+ int first_valuator,
+ int num_valuator,
+ int *valuators);
+
+extern int GetProximityEvents(
+ xEvent *events,
+ DeviceIntPtr pDev,
+ int type,
+ int first_valuator,
+ int num_valuators,
+ int *valuators);
+
+extern int GetMotionHistorySize(
+ void);
+
+extern void AllocateMotionHistory(
+ DeviceIntPtr pDev);
+
+extern int GetMotionHistory(
+ DeviceIntPtr pDev,
+ xTimecoord *buff,
+ unsigned long start,
+ unsigned long stop,
+ ScreenPtr pScreen);
+
+extern void SwitchCoreKeyboard(DeviceIntPtr pDev);
+extern void SwitchCorePointer(DeviceIntPtr pDev);
+
+extern DeviceIntPtr LookupDeviceIntRec(
+ CARD8 deviceid);
+
+/* Implemented by the DDX. */
+extern int NewInputDeviceRequest(
+ InputOption *options);
+
+extern void DDXRingBell(
+ int volume,
+ int pitch,
+ int duration);
+
#endif /* INPUT_H */
diff --git a/include/inputstr.h b/include/inputstr.h
index 5e2e26968..ada94e6b4 100644
--- a/include/inputstr.h
+++ b/include/inputstr.h
@@ -62,6 +62,8 @@ SOFTWARE.
#define EMASKSIZE MAX_DEVICES
+extern int CoreDevicePrivatesIndex, CoreDevicePrivatesGeneration;
+
/* Kludge: OtherClients and InputClients must be compatible, see code */
typedef struct _OtherClients {
@@ -91,15 +93,15 @@ typedef struct _OtherInputMasks {
*/
#define MasksPerDetailMask 8 /* 256 keycodes and 256 possible
- modifier combinations, but only
- 3 buttons. */
+ modifier combinations, but only
+ 3 buttons. */
- typedef struct _DetailRec { /* Grab details may be bit masks */
- unsigned short exact;
- Mask *pMask;
- } DetailRec;
+typedef struct _DetailRec { /* Grab details may be bit masks */
+ unsigned short exact;
+ Mask *pMask;
+} DetailRec;
- typedef struct _GrabRec {
+typedef struct _GrabRec {
GrabPtr next; /* for chain of passive grabs */
XID resource;
DeviceIntPtr device;
@@ -129,6 +131,8 @@ typedef struct _KeyClassRec {
unsigned short prev_state;
#ifdef XKB
struct _XkbSrvInfo *xkbInfo;
+#else
+ void *pad0;
#endif
} KeyClassRec, *KeyClassPtr;
@@ -142,12 +146,20 @@ typedef struct _AxisInfo {
typedef struct _ValuatorClassRec {
ValuatorMotionProcPtr GetMotionProc;
- int numMotionEvents;
- WindowPtr motionHintWindow;
- AxisInfoPtr axes;
- unsigned short numAxes;
- int *axisVal;
- CARD8 mode;
+ int numMotionEvents;
+ int first_motion;
+ int last_motion;
+ void *motion;
+
+ WindowPtr motionHintWindow;
+
+ AxisInfoPtr axes;
+ unsigned short numAxes;
+ int *axisVal;
+ int lastx, lasty; /* last event recorded, not posted to
+ * client; see dix/devices.c */
+ int dxremaind, dyremaind; /* for acceleration */
+ CARD8 mode;
} ValuatorClassRec, *ValuatorClassPtr;
typedef struct _ButtonClassRec {
@@ -158,7 +170,9 @@ typedef struct _ButtonClassRec {
CARD8 down[DOWN_LENGTH];
CARD8 map[MAP_LENGTH];
#ifdef XKB
- union _XkbAction * xkb_acts;
+ union _XkbAction *xkb_acts;
+#else
+ void *pad0;
#endif
} ButtonClassRec, *ButtonClassPtr;
@@ -175,6 +189,26 @@ typedef struct _ProximityClassRec {
char pad;
} ProximityClassRec, *ProximityClassPtr;
+typedef struct _AbsoluteClassRec {
+ /* Calibration. */
+ int min_x;
+ int max_x;
+ int min_y;
+ int max_y;
+ int flip_x;
+ int flip_y;
+ int rotation;
+ int button_threshold;
+
+ /* Area. */
+ int offset_x;
+ int offset_y;
+ int width;
+ int height;
+ int screen;
+ XID following;
+} AbsoluteClassRec, *AbsoluteClassPtr;
+
typedef struct _KbdFeedbackClassRec *KbdFeedbackPtr;
typedef struct _PtrFeedbackClassRec *PtrFeedbackPtr;
typedef struct _IntegerFeedbackClassRec *IntegerFeedbackPtr;
@@ -189,6 +223,8 @@ typedef struct _KbdFeedbackClassRec {
KbdFeedbackPtr next;
#ifdef XKB
struct _XkbSrvLedInfo *xkb_sli;
+#else
+ void *pad0;
#endif
} KbdFeedbackClassRec;
@@ -223,6 +259,8 @@ typedef struct _LedFeedbackClassRec {
LedFeedbackPtr next;
#ifdef XKB
struct _XkbSrvLedInfo *xkb_sli;
+#else
+ void *pad0;
#endif
} LedFeedbackClassRec;
@@ -248,6 +286,8 @@ typedef struct _DeviceIntRec {
used to initialize, turn on, or
turn off the device */
Bool inited; /* TRUE if INIT returns Success */
+ Bool enabled; /* TRUE if ON returns Success */
+ Bool coreEvents; /* TRUE if device also sends core */
GrabPtr grab; /* the grabber - used by DIX */
struct {
Bool frozen;
@@ -274,6 +314,7 @@ typedef struct _DeviceIntRec {
ButtonClassPtr button;
FocusClassPtr focus;
ProximityClassPtr proximity;
+ AbsoluteClassPtr absolute;
KbdFeedbackPtr kbdfeed;
PtrFeedbackPtr ptrfeed;
IntegerFeedbackPtr intfeed;
@@ -281,7 +322,9 @@ typedef struct _DeviceIntRec {
BellFeedbackPtr bell;
LedFeedbackPtr leds;
#ifdef XKB
- struct _XkbInterest * xkb_interest;
+ struct _XkbInterest *xkb_interest;
+#else
+ void *pad0;
#endif
DevUnion *devPrivates;
int nPrivates;
diff --git a/include/kdrive-config.h.in b/include/kdrive-config.h.in
index 2f454d702..3bc779218 100644
--- a/include/kdrive-config.h.in
+++ b/include/kdrive-config.h.in
@@ -25,4 +25,10 @@
/* Verbose debugging output hilarity */
#undef DEBUG
+/* Have the backtrace() function. */
+#undef HAVE_BACKTRACE
+
+/* Have execinfo.h for backtrace(). */
+#undef HAVE_EXECINFO_H
+
#endif /* _KDRIVE_CONFIG_H_ */
diff --git a/include/os.h b/include/os.h
index 4c4967164..d4eed220f 100644
--- a/include/os.h
+++ b/include/os.h
@@ -147,6 +147,10 @@ extern void CheckConnections(void);
extern void CloseDownConnection(ClientPtr /*client*/);
+extern void AddGeneralSocket(int /*fd*/);
+
+extern void RemoveGeneralSocket(int /*fd*/);
+
extern void AddEnabledDevice(int /*fd*/);
extern void RemoveEnabledDevice(int /*fd*/);
@@ -506,6 +510,12 @@ __attribute((noreturn))
#endif
;
+#ifdef DEBUG
+#define DebugF ErrorF
+#else
+#define DebugF(x, ...) /* */
+#endif
+
extern void VErrorF(const char *f, va_list args);
extern void ErrorF(const char *f, ...) _printf_attribute(1,2);
extern void Error(char *str);