(submit/split-input.h) include: move private definitions out of input.h

It's not good having the public server api headers clobbered with private
definitions, so cleaning them up.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This commit is contained in:
Enrico Weigelt, metux IT consult 2024-02-12 17:43:56 +01:00
parent 048d41d96c
commit 0bc252a068
54 changed files with 411 additions and 289 deletions

View File

@ -37,6 +37,7 @@
#include <X11/extensions/XI.h>
#include <X11/extensions/XIproto.h>
#include "dix/input_priv.h"
#include "dix/dix_priv.h"
#include "dix/exevents_priv.h"
#include "miext/extinit_priv.h"

View File

@ -58,6 +58,7 @@ SOFTWARE.
#include <X11/extensions/XIproto.h> /* control constants */
#include "dix/exevents_priv.h"
#include "dix/input_priv.h"
#include "inputstr.h" /* DeviceIntPtr */
#include "XIstubs.h"

View File

@ -93,6 +93,7 @@ SOFTWARE.
#include "dix/dix_priv.h"
#include "dix/eventconvert.h"
#include "dix/exevents_priv.h"
#include "dix/input_priv.h"
#include "inputstr.h"
#include "windowstr.h"

View File

@ -56,16 +56,18 @@ SOFTWARE.
#include <X11/X.h> /* for inputstr.h */
#include <X11/Xproto.h> /* Request macro */
#include "inputstr.h" /* DeviceIntPtr */
#include <X11/extensions/XI.h>
#include <X11/extensions/XIproto.h>
#include "dix/input_priv.h"
#include "inputstr.h" /* DeviceIntPtr */
#include "XIstubs.h"
#include "extnsionst.h"
#include "exevents.h"
#include "xace.h"
#include "xkbsrv.h"
#include "xkbstr.h"
#include "listdev.h"
/***********************************************************************

View File

@ -40,6 +40,7 @@ from The Open Group.
#include <X11/extensions/XIproto.h>
#include "dix/exevents_priv.h"
#include "dix/input_priv.h"
#include "inputstr.h" /* DeviceIntPtr */
#include "windowstr.h" /* window structure */

View File

@ -54,12 +54,14 @@ SOFTWARE.
#include <dix-config.h>
#endif
#include "inputstr.h" /* DeviceIntPtr */
#include <X11/extensions/XI.h>
#include <X11/extensions/XIproto.h>
#include "dix/input_priv.h"
#include "inputstr.h" /* DeviceIntPtr */
#include "exevents.h"
#include "exglobals.h"
#include "setbmap.h"
/***********************************************************************

View File

@ -54,12 +54,14 @@ SOFTWARE.
#include <dix-config.h>
#endif
#include "inputstr.h" /* DeviceIntPtr */
#include <X11/extensions/XI.h>
#include <X11/extensions/XIproto.h>
#include "dix/input_priv.h"
#include "inputstr.h" /* DeviceIntPtr */
#include "XIstubs.h"
#include "exglobals.h"
#include "setdval.h"
/***********************************************************************

View File

@ -54,13 +54,15 @@ SOFTWARE.
#include <dix-config.h>
#endif
#include "inputstr.h" /* DeviceIntPtr */
#include <X11/extensions/XI.h>
#include <X11/extensions/XI2.h>
#include <X11/extensions/XIproto.h>
#include "dix/input_priv.h"
#include "inputstr.h" /* DeviceIntPtr */
#include "exevents.h"
#include "exglobals.h"
#include "setmmap.h"
/***********************************************************************

View File

@ -54,12 +54,14 @@ SOFTWARE.
#include <dix-config.h>
#endif
#include "inputstr.h" /* DeviceIntPtr */
#include <X11/extensions/XI.h>
#include <X11/extensions/XIproto.h>
#include "dix/input_priv.h"
#include "inputstr.h" /* DeviceIntPtr */
#include "XIstubs.h"
#include "exglobals.h"
#include "setmode.h"
/***********************************************************************

View File

@ -38,6 +38,7 @@
#include "dix/dix_priv.h"
#include "dix/exevents_priv.h"
#include "dix/input_priv.h"
#include "inputstr.h" /* DeviceIntPtr */
#include "windowstr.h" /* window structure */

View File

@ -46,6 +46,7 @@
#endif
#include "dix/dix_priv.h"
#include "dix/input_priv.h"
#include "xibarriers.h"
#include "scrnintstr.h"

View File

@ -42,6 +42,7 @@
#include "dix/dix_priv.h"
#include "dix/exevents_priv.h"
#include "dix/input_priv.h"
#include "inputstr.h" /* DeviceIntPtr */
#include "windowstr.h" /* window structure */

View File

@ -35,6 +35,7 @@
#include <X11/extensions/XI2proto.h>
#include "dix/exevents_priv.h"
#include "dix/input_priv.h"
#include "dix.h"
#include "inputstr.h"

View File

@ -37,6 +37,7 @@
#include <X11/extensions/XI2proto.h>
#include "dix/exevents_priv.h"
#include "dix/input_priv.h"
#include "inputstr.h"
#include "xkbstr.h"

View File

@ -41,6 +41,7 @@
#include "dix/dix_priv.h"
#include "dix/eventconvert.h"
#include "dix/exevents_priv.h"
#include "dix/input_priv.h"
#include "inputstr.h" /* DeviceIntPtr */
#include "windowstr.h" /* window structure */

View File

@ -59,6 +59,7 @@ SOFTWARE.
#include "dix/dix_priv.h"
#include "dix/exevents_priv.h"
#include "dix/input_priv.h"
#include "dix/ptrveloc_priv.h"
#include "xkb/xkbsrv_priv.h"

View File

@ -107,6 +107,7 @@ Equipment Corporation.
#include "dix/colormap_priv.h"
#include "dix/dix_priv.h"
#include "dix/input_priv.h"
#include "dix/gc_priv.h"
#include "dix/registry_priv.h"
#include "dix/screenint_priv.h"
@ -124,7 +125,6 @@ Equipment Corporation.
#include "colormapst.h"
#include "cursorstr.h"
#include "scrnintstr.h"
#include "input.h"
#include "servermd.h"
#include "extnsionst.h"
#include "dixfont.h"

View File

@ -35,6 +35,7 @@
#include "dix/dix_priv.h"
#include "dix/eventconvert.h"
#include "dix/input_priv.h"
#include "inputstr.h"
#include "windowstr.h"

View File

@ -117,6 +117,7 @@ Equipment Corporation.
#include "dix/dix_priv.h"
#include "dix/eventconvert.h"
#include "dix/exevents_priv.h"
#include "dix/input_priv.h"
#include "xkb/xkbsrv_priv.h"
#include "misc.h"

View File

@ -29,6 +29,7 @@
#include "dix/dix_priv.h"
#include "dix/eventconvert.h"
#include "dix/input_priv.h"
#include "inputstr.h"
#include "scrnintstr.h"

View File

@ -31,11 +31,18 @@
#include <dix-config.h>
#endif
#include <math.h>
#include <limits.h>
#include <pixman.h>
#include <X11/X.h>
#include <X11/keysym.h>
#include <X11/Xproto.h>
#include <math.h>
#include <limits.h>
#include <X11/extensions/XI.h>
#include <X11/extensions/XI2.h>
#include <X11/extensions/XIproto.h>
#include <X11/extensions/XKBproto.h>
#include "dix/input_priv.h"
#include "misc.h"
#include "resource.h"
@ -52,7 +59,6 @@
#include "mi.h"
#include "windowstr.h"
#include <X11/extensions/XKBproto.h>
#include "xkbsrv.h"
#ifdef PANORAMIX
@ -60,10 +66,6 @@
#include "panoramiXsrv.h"
#endif
#include <X11/extensions/XI.h>
#include <X11/extensions/XI2.h>
#include <X11/extensions/XIproto.h>
#include <pixman.h>
#include "exglobals.h"
#include "exevents.h"
#include "extnsionst.h"

309
dix/input_priv.h Normal file
View File

@ -0,0 +1,309 @@
/* SPDX-License-Identifier: MIT OR X11
*
+ Copyright © 1987, 1998 The Open Group
* Copyright © 2024 Enrico Weigelt, metux IT consult <info@metux.net>
*/
#ifndef _XSERVER_INPUT_PRIV_H
#define _XSERVER_INPUT_PRIV_H
#include "input.h"
typedef struct _InputOption InputOption;
typedef struct _XI2Mask XI2Mask;
void InitCoreDevices(void);
void InitXTestDevices(void);
void DisableAllDevices(void);
int InitAndStartDevices(void);
void CloseDownDevices(void);
void AbortDevices(void);
void UndisplayDevices(void);
ValuatorClassPtr AllocValuatorClass(ValuatorClassPtr src, int numAxes);
void FreeDeviceClass(int type, void **class);
int ApplyPointerMapping(DeviceIntPtr pDev,
CARD8 *map,
int len,
ClientPtr client);
Bool BadDeviceMap(BYTE *buff,
int length,
unsigned low,
unsigned high,
XID *errval);
void NoteLedState(DeviceIntPtr keybd, int led, Bool on);
void MaybeStopHint(DeviceIntPtr device, ClientPtr client );
void ProcessPointerEvent(InternalEvent *ev, DeviceIntPtr mouse);
void ProcessKeyboardEvent(InternalEvent *ev, DeviceIntPtr keybd);
void CreateClassesChangedEvent(InternalEvent *event,
DeviceIntPtr master,
DeviceIntPtr slave,
int flags);
InternalEvent *UpdateFromMaster(InternalEvent *events,
DeviceIntPtr pDev,
int type,
int *num_events);
void PostSyntheticMotion(DeviceIntPtr pDev,
int x,
int y,
int screen,
unsigned long time);
void ReleaseButtonsAndKeys(DeviceIntPtr dev);
int AttachDevice(ClientPtr client, DeviceIntPtr slave, DeviceIntPtr master);
void DeepCopyDeviceClasses(DeviceIntPtr from,
DeviceIntPtr to,
DeviceChangedEvent *dce);
int change_modmap(ClientPtr client,
DeviceIntPtr dev,
KeyCode *map,
int max_keys_per_mod);
int AllocXTestDevice(ClientPtr client,
const char *name,
DeviceIntPtr *ptr,
DeviceIntPtr *keybd,
DeviceIntPtr master_ptr,
DeviceIntPtr master_keybd);
BOOL IsXTestDevice(DeviceIntPtr dev, DeviceIntPtr master);
DeviceIntPtr GetXTestDevice(DeviceIntPtr master);
void SendDevicePresenceEvent(int deviceid, int type);
void DeliverDeviceClassesChangedEvent(int sourceid, Time time);
/* touch support */
int GetTouchEvents(InternalEvent *events,
DeviceIntPtr pDev,
uint32_t ddx_touchid,
uint16_t type,
uint32_t flags,
const ValuatorMask *mask);
void QueueTouchEvents(DeviceIntPtr device,
int type,
uint32_t ddx_touchid,
int flags, const ValuatorMask *mask);
int GetTouchOwnershipEvents(InternalEvent *events,
DeviceIntPtr pDev,
TouchPointInfoPtr ti,
uint8_t mode,
XID resource,
uint32_t flags);
void GetDixTouchEnd(InternalEvent *ievent,
DeviceIntPtr dev,
TouchPointInfoPtr ti,
uint32_t flags);
void TouchInitDDXTouchPoint(DeviceIntPtr dev, DDXTouchPointInfoPtr ddxtouch);
DDXTouchPointInfoPtr TouchBeginDDXTouch(DeviceIntPtr dev, uint32_t ddx_id);
void TouchEndDDXTouch(DeviceIntPtr dev, DDXTouchPointInfoPtr ti);
DDXTouchPointInfoPtr TouchFindByDDXID(DeviceIntPtr dev,
uint32_t ddx_id,
Bool create);
Bool TouchInitTouchPoint(TouchClassPtr touch, ValuatorClassPtr v, int index);
void TouchFreeTouchPoint(DeviceIntPtr dev, int index);
TouchPointInfoPtr TouchBeginTouch(DeviceIntPtr dev,
int sourceid,
uint32_t touchid,
Bool emulate_pointer);
TouchPointInfoPtr TouchFindByClientID(DeviceIntPtr dev, uint32_t client_id);
void TouchEndTouch(DeviceIntPtr dev, TouchPointInfoPtr ti);
Bool TouchEventHistoryAllocate(TouchPointInfoPtr ti);
void TouchEventHistoryFree(TouchPointInfoPtr ti);
void TouchEventHistoryPush(TouchPointInfoPtr ti, const DeviceEvent *ev);
void TouchEventHistoryReplay(TouchPointInfoPtr ti, DeviceIntPtr dev, XID resource);
Bool TouchResourceIsOwner(TouchPointInfoPtr ti, XID resource);
void TouchAddListener(TouchPointInfoPtr ti,
XID resource,
int resource_type,
enum InputLevel level,
enum TouchListenerType type,
enum TouchListenerState state,
WindowPtr window,
GrabPtr grab);
Bool TouchRemoveListener(TouchPointInfoPtr ti, XID resource);
void TouchSetupListeners(DeviceIntPtr dev,
TouchPointInfoPtr ti,
InternalEvent *ev);
Bool TouchBuildSprite(DeviceIntPtr sourcedev,
TouchPointInfoPtr ti,
InternalEvent *ev);
Bool TouchBuildDependentSpriteTrace(DeviceIntPtr dev, SpritePtr sprite);
int TouchConvertToPointerEvent(const InternalEvent *ev,
InternalEvent *motion,
InternalEvent *button);
int TouchGetPointerEventType(const InternalEvent *ev);
void TouchRemovePointerGrab(DeviceIntPtr dev);
void TouchListenerGone(XID resource);
int TouchListenerAcceptReject(DeviceIntPtr dev,
TouchPointInfoPtr ti,
int listener,
int mode);
int TouchAcceptReject(ClientPtr client,
DeviceIntPtr dev,
int mode,
uint32_t touchid,
Window grab_window,
XID *error);
void TouchEndPhysicallyActiveTouches(DeviceIntPtr dev);
void TouchEmitTouchEnd(DeviceIntPtr dev,
TouchPointInfoPtr ti,
int flags,
XID resource);
void TouchAcceptAndEnd(DeviceIntPtr dev, int touchid);
/* Gesture support */
void InitGestureEvent(InternalEvent *ievent,
DeviceIntPtr dev,
CARD32 ms,
int type,
uint16_t num_touches,
uint32_t flags,
double delta_x,
double delta_y,
double delta_unaccel_x,
double delta_unaccel_y,
double scale,
double delta_angle);
int GetGestureEvents(InternalEvent *events,
DeviceIntPtr dev,
uint16_t type,
uint16_t num_touches,
uint32_t flags,
double delta_x,
double delta_y,
double delta_unaccel_x,
double delta_unaccel_y,
double scale,
double delta_angle);
void QueueGesturePinchEvents(DeviceIntPtr dev,
uint16_t type,
uint16_t num_touches,
uint32_t flags,
double delta_x,
double delta_y,
double delta_unaccel_x,
double delta_unaccel_y,
double scale,
double delta_angle);
void QueueGestureSwipeEvents(DeviceIntPtr dev,
uint16_t type,
uint16_t num_touches,
uint32_t flags,
double delta_x,
double delta_y,
double delta_unaccel_x,
double delta_unaccel_y);
Bool GestureInitGestureInfo(GestureInfoPtr gesture);
void GestureFreeGestureInfo(GestureInfoPtr gesture);
GestureInfoPtr GestureBeginGesture(DeviceIntPtr dev, InternalEvent *ev);
GestureInfoPtr GestureFindActiveByEventType(DeviceIntPtr dev, int type);
void GestureEndGesture(GestureInfoPtr gi);
Bool GestureResourceIsOwner(GestureInfoPtr gi, XID resource);
void GestureAddListener(GestureInfoPtr gi,
XID resource,
int resource_type,
enum GestureListenerType type,
WindowPtr window,
GrabPtr grab);
void GestureSetupListener(DeviceIntPtr dev, GestureInfoPtr gi, InternalEvent *ev);
Bool GestureBuildSprite(DeviceIntPtr sourcedev, GestureInfoPtr gi);
void GestureListenerGone(XID resource);
void GestureEndActiveGestures(DeviceIntPtr dev);
void GestureEmitGestureEndToOwner(DeviceIntPtr dev, GestureInfoPtr gi);
void ProcessGestureEvent(InternalEvent *ev, DeviceIntPtr dev);
/* misc event helpers */
void CopyPartialInternalEvent(InternalEvent* dst_event,
const InternalEvent* src_event);
Mask GetEventMask(DeviceIntPtr dev, xEvent *ev, InputClientsPtr clients);
Mask GetEventFilter(DeviceIntPtr dev, xEvent *event);
Bool WindowXI2MaskIsset(DeviceIntPtr dev, WindowPtr win, xEvent *ev);
int GetXI2MaskByte(XI2Mask *mask, DeviceIntPtr dev, int event_type);
void FixUpEventFromWindow(SpritePtr pSprite,
xEvent *xE,
WindowPtr pWin,
Window child,
Bool calcChild);
Bool PointInBorderSize(WindowPtr pWin, int x, int y);
WindowPtr XYToWindow(SpritePtr pSprite, int x, int y);
int EventIsDeliverable(DeviceIntPtr dev, int evtype, WindowPtr win);
Bool ActivatePassiveGrab(DeviceIntPtr dev,
GrabPtr grab,
InternalEvent *ev,
InternalEvent *real_event);
void ActivateGrabNoDelivery(DeviceIntPtr dev,
GrabPtr grab,
InternalEvent *event,
InternalEvent *real_event);
/**
* Masks specifying the type of event to deliver for an InternalEvent; used
* by EventIsDeliverable.
* @defgroup EventIsDeliverable return flags
* @{
*/
#define EVENT_XI1_MASK (1 << 0) /**< XI1.x event */
#define EVENT_CORE_MASK (1 << 1) /**< Core event */
#define EVENT_DONT_PROPAGATE_MASK (1 << 2) /**< DontPropagate mask set */
#define EVENT_XI2_MASK (1 << 3) /**< XI2 mask set on window */
/* @} */
enum EventDeliveryState {
EVENT_DELIVERED, /**< Event has been delivered to a client */
EVENT_NOT_DELIVERED, /**< Event was not delivered to any client */
EVENT_SKIP, /**< Event can be discarded by the caller */
EVENT_REJECTED, /**< Event was rejected for delivery to the client */
};
#define VALUATOR_MODE_ALL_AXES -1
int valuator_get_mode(DeviceIntPtr dev, int axis);
void valuator_set_mode(DeviceIntPtr dev, int axis, int mode);
/* Set to TRUE by default - os/utils.c sets it to FALSE on user request,
xfixes/cursor.c uses it to determine if the cursor is enabled */
extern Bool EnableCursor;
/* Set to FALSE by default - ChangeWindowAttributes sets it to TRUE on
* CWCursor, xfixes/cursor.c uses it to determine if the cursor is enabled
*/
extern Bool CursorVisible;
void valuator_mask_drop_unaccelerated(ValuatorMask *mask);
Bool point_on_screen(ScreenPtr pScreen, int x, int y);
void update_desktop_dimensions(void);
void input_constrain_cursor(DeviceIntPtr pDev,
ScreenPtr screen,
int current_x,
int current_y,
int dest_x,
int dest_y,
int *out_x,
int *out_y,
int *nevents,
InternalEvent* events);
void InputThreadPreInit(void);
void InputThreadInit(void);
void InputThreadFini(void);
int InputThreadRegisterDev(int fd,
NotifyFdProcPtr readInputProc,
void *readInputArgs);
int InputThreadUnregisterDev(int fd);
#endif /* _XSERVER_INPUT_PRIV_H */

View File

@ -28,10 +28,10 @@
#endif
#include "dix/exevents_priv.h"
#include "dix/input_priv.h"
#include "exglobals.h"
#include "misc.h"
#include "input.h"
#include "inputstr.h"
#include "xace.h"
#include "xkbsrv.h"

View File

@ -88,6 +88,7 @@ Equipment Corporation.
#include "dix/callback_priv.h"
#include "dix/dix_priv.h"
#include "dix/input_priv.h"
#include "dix/gc_priv.h"
#include "dix/registry_priv.h"
#include "dix/selection_priv.h"

View File

@ -31,6 +31,7 @@
#include "dix/dix_priv.h"
#include "dix/eventconvert.h"
#include "dix/exevents_priv.h"
#include "dix/input_priv.h"
#include "inputstr.h"
#include "scrnintstr.h"

View File

@ -103,6 +103,7 @@ Equipment Corporation.
#include "dix/colormap_priv.h"
#include "dix/dix_priv.h"
#include "dix/exevents_priv.h"
#include "dix/input_priv.h"
#include "dix/property_priv.h"
#include "dix/selection_priv.h"
#include "os/auth.h"
@ -115,7 +116,6 @@ Equipment Corporation.
#include "validate.h"
#include "windowstr.h"
#include "propertyst.h"
#include "input.h"
#include "inputstr.h"
#include "resource.h"
#include "colormapst.h"

View File

@ -27,9 +27,6 @@
#include <dix-config.h>
#endif
#include "hostx.h"
#include "input.h"
#include <stdlib.h>
#include <stdio.h>
#include <unistd.h>
@ -37,12 +34,15 @@
#include <errno.h>
#include <time.h>
#include <err.h>
#include <sys/ipc.h>
#include <sys/shm.h>
#include <sys/time.h>
#include <sys/mman.h>
#include "dix/input_priv.h"
#include "hostx.h"
#define X_INCLUDE_STRING_H
#include <X11/Xos_r.h>
#include <X11/keysym.h>

View File

@ -36,10 +36,12 @@
#include <stdio.h>
#include <sys/file.h> /* needed for FNONBLOCK & FASYNC */
#include "xkbsrv.h"
#include <X11/extensions/XI.h>
#include <X11/extensions/XIproto.h>
#include "dix/input_priv.h"
#include "xkbsrv.h"
#include "XIstubs.h" /* even though we don't use stubs. cute, no? */
#include "exevents.h"
#include "exglobals.h"

View File

@ -31,7 +31,10 @@
#include <X11/X.h>
#include <X11/Xmd.h>
#include "input.h"
#include <X11/extensions/XIproto.h>
#include "dix/input_priv.h"
#include "cursor.h"
#include "mipointer.h"
#include "scrnintstr.h"
@ -41,7 +44,6 @@
#include "xf86Priv.h"
#include "xf86_OSproc.h"
#include <X11/extensions/XIproto.h>
#include "xf86Xinput.h"
#ifdef XFreeXDGA

View File

@ -57,6 +57,10 @@
#include <X11/X.h>
#include <X11/Xproto.h>
#include <X11/Xatom.h>
#include <X11/extensions/XI.h>
#include <X11/extensions/XIproto.h>
#include "dix/input_priv.h"
#include "dix/dix_priv.h"
@ -72,11 +76,8 @@
#include "dgaproc_priv.h"
#endif
#include <X11/extensions/XI.h>
#include <X11/extensions/XIproto.h>
#include "inputstr.h"
#include "xf86Xinput.h"
#include "mi.h"
#include "mipointer.h"

View File

@ -42,6 +42,7 @@
#include <X11/X.h>
#include "dix/dix_priv.h"
#include "dix/input_priv.h"
#include "mi.h"
#include "os.h"

View File

@ -50,12 +50,12 @@
#include <X11/Xatom.h>
#include "config/dbus-core.h"
#include "dix/input_priv.h"
#include "dix/screenint_priv.h"
#include "os/cmdline.h"
#include "os/ddx_priv.h"
#include "os/osdep.h"
#include "input.h"
#include "servermd.h"
#include "windowstr.h"
#include "scrnintstr.h"

View File

@ -26,6 +26,9 @@
#endif
#include <X11/X.h>
#include "dix/input_priv.h"
#include "os.h"
#include "globals.h"
#include "xf86.h"

View File

@ -59,6 +59,7 @@
#include "dix/dix_priv.h"
#include "dix/ptrveloc_priv.h"
#include "dix/input_priv.h"
#include "xf86.h"
#include "xf86Priv.h"

View File

@ -24,6 +24,9 @@
#include <xorg-config.h>
#endif
#include <X11/extensions/render.h>
#include "dix/input_priv.h"
#include "dix/screenint_priv.h"
#include "xf86.h"
@ -36,7 +39,6 @@
#include "windowstr.h"
#include "inputstr.h"
#include "randrstr_priv.h"
#include <X11/extensions/render.h>
#include "xf86cmap.h"
#include "xf86Crtc.h"

View File

@ -31,6 +31,7 @@
#include "dix/dix_priv.h"
#include "dix/exevents_priv.h"
#include "dix/input_priv.h"
#include <inputstr.h>
#include <xkbsrv.h>

View File

@ -30,6 +30,7 @@
#include <X11/Xatom.h>
#include "dix/dix_priv.h"
#include "dix/input_priv.h"
#include "randr/randrstr_priv.h"
#include "xwayland-cvt.h"

View File

@ -37,6 +37,7 @@
#include <X11/Xatom.h>
#include <X11/Xfuncproto.h>
#include "dix/input_priv.h"
#include "dix/property_priv.h"
#include "miext/extinit_priv.h"
#include "os/osdep.h"

View File

@ -31,6 +31,7 @@
#include <libei.h>
#include "dix/dix_priv.h"
#include "dix/input_priv.h"
#include "os/client_priv.h"
#include <inputstr.h>

View File

@ -37,6 +37,8 @@
#include <../xfree86/common/xorgVersion.h>
#include "win.h"
#include "dix/input_priv.h"
void
OsVendorVErrorF(const char *pszFormat, va_list va_args)
{

View File

@ -288,9 +288,6 @@ extern _X_EXPORT void set_button_down(DeviceIntPtr pDev, int button, int type);
extern _X_EXPORT void set_button_up(DeviceIntPtr pDev, int button, int type);
extern _X_EXPORT int button_is_down(DeviceIntPtr pDev, int button, int type);
extern void InitCoreDevices(void);
extern void InitXTestDevices(void);
extern _X_EXPORT DeviceIntPtr AddInputDevice(ClientPtr /*client */ ,
DeviceProc /*deviceProc */ ,
Bool /*autoStart */ );
@ -303,13 +300,6 @@ extern _X_EXPORT Bool ActivateDevice(DeviceIntPtr /*device */ ,
extern _X_EXPORT Bool DisableDevice(DeviceIntPtr /*device */ ,
BOOL /* sendevent */ );
extern void DisableAllDevices(void);
extern int InitAndStartDevices(void);
extern void CloseDownDevices(void);
extern void AbortDevices(void);
extern void UndisplayDevices(void);
extern _X_EXPORT int RemoveDevice(DeviceIntPtr /*dev */ ,
BOOL /* sendevent */ );
@ -329,11 +319,6 @@ extern _X_EXPORT Bool InitButtonClassDeviceStruct(DeviceIntPtr /*device */ ,
Atom * /* labels */ ,
CARD8 * /*map */ );
extern _X_INTERNAL ValuatorClassPtr AllocValuatorClass(ValuatorClassPtr src,
int numAxes);
extern _X_INTERNAL void FreeDeviceClass(int type, void **class);
extern _X_EXPORT Bool InitValuatorClassDeviceStruct(DeviceIntPtr /*device */ ,
int /*numAxes */ ,
Atom * /* labels */ ,
@ -430,30 +415,6 @@ extern _X_EXPORT Bool InitKeyboardDeviceStructFromString(DeviceIntPtr dev,
BellProcPtr bell_func,
KbdCtrlProcPtr ctrl_func);
extern int ApplyPointerMapping(DeviceIntPtr /* pDev */ ,
CARD8 * /* map */ ,
int /* len */ ,
ClientPtr /* client */ );
extern Bool BadDeviceMap(BYTE * /*buff */ ,
int /*length */ ,
unsigned /*low */ ,
unsigned /*high */ ,
XID * /*errval */ );
extern void NoteLedState(DeviceIntPtr /*keybd */ ,
int /*led */ ,
Bool /*on */ );
extern void MaybeStopHint(DeviceIntPtr /*device */ ,
ClientPtr /*client */ );
extern void ProcessPointerEvent(InternalEvent * /* ev */ ,
DeviceIntPtr /*mouse */ );
extern void ProcessKeyboardEvent(InternalEvent * /*ev */ ,
DeviceIntPtr /*keybd */ );
extern _X_EXPORT void ProcessInputEvents(void);
extern _X_EXPORT void InitInput(int /*argc */ ,
@ -465,14 +426,6 @@ extern _X_EXPORT int GetMaximumEventsNum(void);
extern _X_EXPORT InternalEvent *InitEventList(int num_events);
extern _X_EXPORT void FreeEventList(InternalEvent *list, int num_events);
extern void CreateClassesChangedEvent(InternalEvent *event,
DeviceIntPtr master,
DeviceIntPtr slave, int flags);
extern InternalEvent *UpdateFromMaster(InternalEvent *events,
DeviceIntPtr pDev,
int type, int *num_events);
extern _X_EXPORT int GetPointerEvents(InternalEvent *events,
DeviceIntPtr pDev,
int type,
@ -493,54 +446,6 @@ extern _X_EXPORT void QueueKeyboardEvents(DeviceIntPtr pDev,
int type,
int key_code);
extern int GetTouchEvents(InternalEvent *events,
DeviceIntPtr pDev,
uint32_t ddx_touchid,
uint16_t type,
uint32_t flags, const ValuatorMask *mask);
void QueueTouchEvents(DeviceIntPtr device,
int type,
uint32_t ddx_touchid,
int flags, const ValuatorMask *mask);
void InitGestureEvent(InternalEvent *ievent, DeviceIntPtr dev, CARD32 ms,
int type, uint16_t num_touches, uint32_t flags,
double delta_x, double delta_y,
double delta_unaccel_x, double delta_unaccel_y,
double scale, double delta_angle);
int GetGestureEvents(InternalEvent *events, DeviceIntPtr dev,
uint16_t type, uint16_t num_touches, uint32_t flags,
double delta_x, double delta_y,
double delta_unaccel_x,
double delta_unaccel_y,
double scale, double delta_angle);
void QueueGesturePinchEvents(DeviceIntPtr dev, uint16_t type,
uint16_t num_touches, uint32_t flags,
double delta_x, double delta_y,
double delta_unaccel_x,
double delta_unaccel_y,
double scale, double delta_angle);
void QueueGestureSwipeEvents(DeviceIntPtr dev, uint16_t type,
uint16_t num_touches, uint32_t flags,
double delta_x, double delta_y,
double delta_unaccel_x,
double delta_unaccel_y);
extern int GetTouchOwnershipEvents(InternalEvent *events,
DeviceIntPtr pDev,
TouchPointInfoPtr ti,
uint8_t mode, XID resource, uint32_t flags);
extern void GetDixTouchEnd(InternalEvent *ievent,
DeviceIntPtr dev,
TouchPointInfoPtr ti,
uint32_t flags);
extern _X_EXPORT int GetProximityEvents(InternalEvent *events,
DeviceIntPtr pDev,
int type, const ValuatorMask *mask);
@ -548,12 +453,6 @@ extern _X_EXPORT int GetProximityEvents(InternalEvent *events,
extern _X_EXPORT void QueueProximityEvents(DeviceIntPtr pDev,
int type, const ValuatorMask *mask);
#ifdef PANORAMIX
_X_EXPORT
#endif
extern void PostSyntheticMotion(DeviceIntPtr pDev,
int x, int y, int screen, unsigned long time);
extern _X_EXPORT int GetMotionHistorySize(void);
extern _X_EXPORT void AllocateMotionHistory(DeviceIntPtr pDev);
@ -564,11 +463,6 @@ extern _X_EXPORT int GetMotionHistory(DeviceIntPtr pDev,
unsigned long stop,
ScreenPtr pScreen, BOOL core);
extern void ReleaseButtonsAndKeys(DeviceIntPtr dev);
extern int AttachDevice(ClientPtr client,
DeviceIntPtr slave, DeviceIntPtr master);
extern _X_EXPORT DeviceIntPtr GetPairedDevice(DeviceIntPtr kbd);
extern _X_EXPORT DeviceIntPtr GetMaster(DeviceIntPtr dev, int type);
@ -578,25 +472,11 @@ extern _X_EXPORT int AllocDevicePair(ClientPtr client,
DeviceIntPtr *keybd,
DeviceProc ptr_proc,
DeviceProc keybd_proc, Bool master);
extern void DeepCopyDeviceClasses(DeviceIntPtr from,
DeviceIntPtr to, DeviceChangedEvent *dce);
/* Helper functions. */
extern _X_EXPORT int generate_modkeymap(ClientPtr client, DeviceIntPtr dev,
KeyCode **modkeymap,
int *max_keys_per_mod);
extern int change_modmap(ClientPtr client, DeviceIntPtr dev, KeyCode *map,
int max_keys_per_mod);
extern int AllocXTestDevice(ClientPtr client, const char *name,
DeviceIntPtr *ptr, DeviceIntPtr *keybd,
DeviceIntPtr master_ptr, DeviceIntPtr master_keybd);
extern BOOL IsXTestDevice(DeviceIntPtr dev, DeviceIntPtr master);
extern DeviceIntPtr GetXTestDevice(DeviceIntPtr master);
extern void SendDevicePresenceEvent(int deviceid, int type);
extern void DeliverDeviceClassesChangedEvent(int sourceid, Time time);
extern _X_EXPORT InputAttributes *DuplicateInputAttributes(InputAttributes *
attrs);
extern _X_EXPORT void FreeInputAttributes(InputAttributes * attrs);
enum TouchListenerState {
TOUCH_LISTENER_AWAITING_BEGIN = 0, /**< Waiting for a TouchBegin event */
@ -622,103 +502,10 @@ enum GestureListenerType {
GESTURE_LISTENER_REGULAR
};
extern void TouchInitDDXTouchPoint(DeviceIntPtr dev,
DDXTouchPointInfoPtr ddxtouch);
extern DDXTouchPointInfoPtr TouchBeginDDXTouch(DeviceIntPtr dev,
uint32_t ddx_id);
extern void TouchEndDDXTouch(DeviceIntPtr dev, DDXTouchPointInfoPtr ti);
extern DDXTouchPointInfoPtr TouchFindByDDXID(DeviceIntPtr dev,
uint32_t ddx_id, Bool create);
extern Bool TouchInitTouchPoint(TouchClassPtr touch, ValuatorClassPtr v,
int index);
extern void TouchFreeTouchPoint(DeviceIntPtr dev, int index);
extern TouchPointInfoPtr TouchBeginTouch(DeviceIntPtr dev, int sourceid,
uint32_t touchid,
Bool emulate_pointer);
extern TouchPointInfoPtr TouchFindByClientID(DeviceIntPtr dev,
uint32_t client_id);
extern void TouchEndTouch(DeviceIntPtr dev, TouchPointInfoPtr ti);
extern Bool TouchEventHistoryAllocate(TouchPointInfoPtr ti);
extern void TouchEventHistoryFree(TouchPointInfoPtr ti);
extern void TouchEventHistoryPush(TouchPointInfoPtr ti, const DeviceEvent *ev);
extern void TouchEventHistoryReplay(TouchPointInfoPtr ti, DeviceIntPtr dev,
XID resource);
extern Bool TouchResourceIsOwner(TouchPointInfoPtr ti, XID resource);
extern void TouchAddListener(TouchPointInfoPtr ti, XID resource, int resource_type,
enum InputLevel level, enum TouchListenerType type,
enum TouchListenerState state, WindowPtr window, GrabPtr grab);
extern Bool TouchRemoveListener(TouchPointInfoPtr ti, XID resource);
extern void TouchSetupListeners(DeviceIntPtr dev, TouchPointInfoPtr ti,
InternalEvent *ev);
extern Bool TouchBuildSprite(DeviceIntPtr sourcedev, TouchPointInfoPtr ti,
InternalEvent *ev);
extern Bool TouchBuildDependentSpriteTrace(DeviceIntPtr dev, SpritePtr sprite);
extern int TouchConvertToPointerEvent(const InternalEvent *ev,
InternalEvent *motion,
InternalEvent *button);
extern int TouchGetPointerEventType(const InternalEvent *ev);
extern void TouchRemovePointerGrab(DeviceIntPtr dev);
extern void TouchListenerGone(XID resource);
extern int TouchListenerAcceptReject(DeviceIntPtr dev, TouchPointInfoPtr ti,
int listener, int mode);
extern int TouchAcceptReject(ClientPtr client, DeviceIntPtr dev, int mode,
uint32_t touchid, Window grab_window, XID *error);
extern void TouchEndPhysicallyActiveTouches(DeviceIntPtr dev);
extern void TouchEmitTouchEnd(DeviceIntPtr dev, TouchPointInfoPtr ti, int flags, XID resource);
extern void TouchAcceptAndEnd(DeviceIntPtr dev, int touchid);
extern _X_EXPORT InputAttributes *DuplicateInputAttributes(InputAttributes *
attrs);
extern Bool GestureInitGestureInfo(GestureInfoPtr gesture);
extern void GestureFreeGestureInfo(GestureInfoPtr gesture);
extern GestureInfoPtr GestureBeginGesture(DeviceIntPtr dev, InternalEvent *ev);
extern GestureInfoPtr GestureFindActiveByEventType(DeviceIntPtr dev, int type);
extern void GestureEndGesture(GestureInfoPtr gi);
extern Bool GestureResourceIsOwner(GestureInfoPtr gi, XID resource);
extern void GestureAddListener(GestureInfoPtr gi, XID resource, int resource_type,
enum GestureListenerType type,
WindowPtr window, GrabPtr grab);
extern void GestureSetupListener(DeviceIntPtr dev, GestureInfoPtr gi,
InternalEvent *ev);
extern Bool GestureBuildSprite(DeviceIntPtr sourcedev, GestureInfoPtr gi);
extern void GestureListenerGone(XID resource);
extern void GestureEndActiveGestures(DeviceIntPtr dev);
extern void GestureEmitGestureEndToOwner(DeviceIntPtr dev, GestureInfoPtr gi);
extern void ProcessGestureEvent(InternalEvent *ev, DeviceIntPtr dev);
/* misc event helpers */
extern void CopyPartialInternalEvent(InternalEvent* dst_event, const InternalEvent* src_event);
extern Mask GetEventMask(DeviceIntPtr dev, xEvent *ev, InputClientsPtr clients);
extern Mask GetEventFilter(DeviceIntPtr dev, xEvent *event);
extern Bool WindowXI2MaskIsset(DeviceIntPtr dev, WindowPtr win, xEvent *ev);
extern int GetXI2MaskByte(XI2Mask *mask, DeviceIntPtr dev, int event_type);
void FixUpEventFromWindow(SpritePtr pSprite,
xEvent *xE,
WindowPtr pWin, Window child, Bool calcChild);
extern Bool PointInBorderSize(WindowPtr pWin, int x, int y);
extern WindowPtr XYToWindow(SpritePtr pSprite, int x, int y);
extern int EventIsDeliverable(DeviceIntPtr dev, int evtype, WindowPtr win);
extern Bool ActivatePassiveGrab(DeviceIntPtr dev, GrabPtr grab,
InternalEvent *ev, InternalEvent *real_event);
extern void ActivateGrabNoDelivery(DeviceIntPtr dev, GrabPtr grab,
InternalEvent *event,
InternalEvent *real_event);
/**
* Masks specifying the type of event to deliver for an InternalEvent; used
* by EventIsDeliverable.
* @defgroup EventIsDeliverable return flags
* @{
*/
#define EVENT_XI1_MASK (1 << 0) /**< XI1.x event */
#define EVENT_CORE_MASK (1 << 1) /**< Core event */
#define EVENT_DONT_PROPAGATE_MASK (1 << 2) /**< DontPropagate mask set */
#define EVENT_XI2_MASK (1 << 3) /**< XI2 mask set on window */
/* @} */
enum EventDeliveryState {
EVENT_DELIVERED, /**< Event has been delivered to a client */
EVENT_NOT_DELIVERED, /**< Event was not delivered to any client */
EVENT_SKIP, /**< Event can be discarded by the caller */
EVENT_REJECTED, /**< Event was rejected for delivery to the client */
};
extern _X_EXPORT void FreeInputAttributes(InputAttributes * attrs);
/* Implemented by the DDX. */
extern _X_EXPORT int NewInputDeviceRequest(InputOption *options,
@ -726,22 +513,7 @@ extern _X_EXPORT int NewInputDeviceRequest(InputOption *options,
DeviceIntPtr *dev);
extern _X_EXPORT void DeleteInputDeviceRequest(DeviceIntPtr dev);
extern _X_EXPORT void RemoveInputDeviceTraces(const char *config_info);
extern _X_EXPORT void DDXRingBell(int volume, int pitch, int duration);
#define VALUATOR_MODE_ALL_AXES -1
extern _X_HIDDEN int valuator_get_mode(DeviceIntPtr dev, int axis);
extern _X_HIDDEN void valuator_set_mode(DeviceIntPtr dev, int axis, int mode);
/* Set to TRUE by default - os/utils.c sets it to FALSE on user request,
xfixes/cursor.c uses it to determine if the cursor is enabled */
extern Bool EnableCursor;
/* Set to FALSE by default - ChangeWindowAttributes sets it to TRUE on
* CWCursor, xfixes/cursor.c uses it to determine if the cursor is enabled
*/
extern Bool CursorVisible;
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,
@ -783,8 +555,6 @@ extern _X_EXPORT Bool valuator_mask_fetch_unaccelerated(const ValuatorMask *mask
int valuator,
double *accel,
double *unaccel);
extern _X_HIDDEN void valuator_mask_drop_unaccelerated(ValuatorMask *mask);
/* InputOption handling interface */
extern _X_EXPORT InputOption *input_option_new(InputOption *list,
const char *key,
@ -800,30 +570,11 @@ extern _X_EXPORT void input_option_set_key(InputOption *opt, const char *key);
extern _X_EXPORT void input_option_set_value(InputOption *opt,
const char *value);
extern _X_HIDDEN Bool point_on_screen(ScreenPtr pScreen, int x, int y);
extern _X_HIDDEN void update_desktop_dimensions(void);
extern _X_HIDDEN void input_constrain_cursor(DeviceIntPtr pDev, ScreenPtr screen,
int current_x, int current_y,
int dest_x, int dest_y,
int *out_x, int *out_y,
int *nevents, InternalEvent* events);
extern _X_EXPORT void input_lock(void);
extern _X_EXPORT void input_unlock(void);
extern _X_EXPORT void input_force_unlock(void);
extern _X_EXPORT int in_input_thread(void);
extern void InputThreadPreInit(void);
extern void InputThreadInit(void);
extern void InputThreadFini(void);
extern int InputThreadRegisterDev(int fd,
NotifyFdProcPtr readInputProc,
void *readInputArgs);
extern int InputThreadUnregisterDev(int fd);
extern _X_EXPORT Bool InputThreadEnable;
#endif /* INPUT_H */

View File

@ -55,6 +55,7 @@ in this Software without prior written authorization from The Open Group.
#include <X11/Xproto.h>
#include "dix/dix_priv.h"
#include "dix/input_priv.h"
#include "misc.h"
#include "windowstr.h"

View File

@ -50,6 +50,9 @@ SOFTWARE.
#include <X11/X.h>
#include <X11/extensions/shapeconst.h>
#include "dix/input_priv.h"
#include "regionstr.h"
#include "region.h"
#include "mi.h"

View File

@ -24,6 +24,8 @@
#include <dix-config.h>
#endif
#include "dix/input_priv.h"
#include "scrnintstr.h"
#include "misync_priv.h"
#include "misyncstr.h"

View File

@ -35,6 +35,7 @@
#include <unistd.h>
#include <pthread.h>
#include "dix/input_priv.h"
#include "os/ddx_priv.h"
#include "inputstr.h"

View File

@ -89,12 +89,12 @@ OR PERFORMANCE OF THIS SOFTWARE.
#include <X11/Xos.h>
#include "dix/dix_priv.h"
#include "dix/input_priv.h"
#include "os/audit.h"
#include "os/ddx_priv.h"
#include "os/fmt.h"
#include "os/osdep.h"
#include "input.h"
#include "opaque.h"
#ifdef WIN32

View File

@ -106,6 +106,7 @@ __stdcall unsigned long GetTickCount(void);
#endif
#include "dix/dix_priv.h"
#include "dix/input_priv.h"
#include "miext/extinit_priv.h"
#include "os/auth.h"
#include "os/cmdline.h"

View File

@ -37,6 +37,7 @@
#include "dix/dix_priv.h"
#include "dix/eventconvert.h"
#include "dix/exevents_priv.h"
#include "dix/input_priv.h"
#include "misc.h"
#include "resource.h"

View File

@ -29,11 +29,13 @@
#endif
#include <stdint.h>
#include "dix/input_priv.h"
#include "misc.h"
#include "scrnintstr.h"
#include "dix.h"
#include "dixstruct.h"
#include "tests-common.h"
static void

View File

@ -29,10 +29,12 @@
#endif
#include <stdint.h>
#include "dix/input_priv.h"
#include "inputstr.h"
#include "assert.h"
#include "scrnintstr.h"
#include "tests-common.h"
static void

View File

@ -31,6 +31,7 @@
#include <X11/Xatom.h>
#include "dix/dix_priv.h"
#include "dix/input_priv.h"
#include "miext/extinit_priv.h"
#include "input.h"
@ -41,7 +42,6 @@
#include "xkbsrv.h"
#include "xserver-properties.h"
#include "syncsrv.h"
#include "tests-common.h"
/**

View File

@ -38,6 +38,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
#include <X11/keysym.h>
#include <X11/extensions/XIproto.h>
#include "dix/input_priv.h"
#include "xkb/xkbsrv_priv.h"
#include "exglobals.h"

View File

@ -36,6 +36,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
#include <X11/keysym.h>
#include "dix/dix_priv.h"
#include "dix/input_priv.h"
#include "xkb/xkbsrv_priv.h"
#include "misc.h"

View File

@ -35,6 +35,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
#include <X11/Xproto.h>
#include <X11/keysym.h>
#include "dix/input_priv.h"
#include "xkb/xkbsrv_priv.h"
#include "misc.h"