From df33e1c51bde33d69886e5cc02e866a34fdeb6c4 Mon Sep 17 00:00:00 2001 From: "Enrico Weigelt, metux IT consult" Date: Fri, 9 Feb 2024 17:29:39 +0100 Subject: [PATCH] xfree86: common: move private defs from xf86Xinput.h to xf86Xinput_priv.h public server module API headers shouldn't be clobbered with non-exported definitions, so move them out to private header file. Signed-off-by: Enrico Weigelt, metux IT consult Part-of: --- hw/xfree86/common/xf86Config.c | 1 + hw/xfree86/common/xf86Events.c | 2 +- hw/xfree86/common/xf86Helper.c | 2 +- hw/xfree86/common/xf86PM.c | 2 +- hw/xfree86/common/xf86Xinput.c | 2 +- hw/xfree86/common/xf86Xinput.h | 7 ------- hw/xfree86/common/xf86Xinput_priv.h | 15 +++++++++++++++ hw/xfree86/os-support/linux/systemd-logind.c | 2 +- 8 files changed, 21 insertions(+), 12 deletions(-) create mode 100644 hw/xfree86/common/xf86Xinput_priv.h diff --git a/hw/xfree86/common/xf86Config.c b/hw/xfree86/common/xf86Config.c index 7bb067073..e26399cc7 100644 --- a/hw/xfree86/common/xf86Config.c +++ b/hw/xfree86/common/xf86Config.c @@ -65,6 +65,7 @@ #include "xf86pciBus.h" #include "xf86Xinput.h" #include "loaderProcs.h" +#include "xf86Xinput_priv.h" #include "xkbsrv.h" #include "picture.h" diff --git a/hw/xfree86/common/xf86Events.c b/hw/xfree86/common/xf86Events.c index 2a595b6e3..6d275267d 100644 --- a/hw/xfree86/common/xf86Events.c +++ b/hw/xfree86/common/xf86Events.c @@ -77,7 +77,7 @@ #endif #include "inputstr.h" -#include "xf86Xinput.h" +#include "xf86Xinput_priv.h" #include "mipointer.h" #include "xkbsrv.h" #include "xkbstr.h" diff --git a/hw/xfree86/common/xf86Helper.c b/hw/xfree86/common/xf86Helper.c index 9839622f0..b35409921 100644 --- a/hw/xfree86/common/xf86Helper.c +++ b/hw/xfree86/common/xf86Helper.c @@ -57,7 +57,7 @@ #include "xf86_OSlib.h" #include "micmap.h" #include "xf86DDC.h" -#include "xf86Xinput.h" +#include "xf86Xinput_priv.h" #include "xf86InPriv.h" #include "xf86Config.h" #include "mivalidate.h" diff --git a/hw/xfree86/common/xf86PM.c b/hw/xfree86/common/xf86PM.c index ed7bdbd9f..427e9e0aa 100644 --- a/hw/xfree86/common/xf86PM.c +++ b/hw/xfree86/common/xf86PM.c @@ -32,7 +32,7 @@ #include #include "xf86.h" #include "xf86Priv.h" -#include "xf86Xinput.h" +#include "xf86Xinput_priv.h" #include "xf86_OSproc.h" int (*xf86PMGetEventFromOs) (int fd, pmEvent * events, int num) = NULL; diff --git a/hw/xfree86/common/xf86Xinput.c b/hw/xfree86/common/xf86Xinput.c index d0f9db52e..c2bf01968 100644 --- a/hw/xfree86/common/xf86Xinput.c +++ b/hw/xfree86/common/xf86Xinput.c @@ -64,7 +64,7 @@ #include "xf86.h" #include "xf86Priv.h" #include "xf86Config.h" -#include "xf86Xinput.h" +#include "xf86Xinput_priv.h" #include "XIstubs.h" #include "xf86Optrec.h" #include "mipointer.h" diff --git a/hw/xfree86/common/xf86Xinput.h b/hw/xfree86/common/xf86Xinput.h index 839a3b969..7d3d5e048 100644 --- a/hw/xfree86/common/xf86Xinput.h +++ b/hw/xfree86/common/xf86Xinput.h @@ -114,9 +114,6 @@ struct _InputInfoRec { InputAttributes *attrs; }; -/* xf86Globals.c */ -extern InputInfoPtr xf86InputDevs; - /* xf86Xinput.c */ extern _X_EXPORT void xf86PostMotionEvent(DeviceIntPtr device, int is_absolute, int first_valuator, int num_valuators, @@ -190,10 +187,6 @@ extern _X_EXPORT void xf86DisableDevice(DeviceIntPtr dev, Bool panic); extern _X_EXPORT void xf86EnableDevice(DeviceIntPtr dev); extern _X_EXPORT void xf86InputEnableVTProbe(void); -/* not exported */ -int xf86NewInputDevice(InputInfoPtr pInfo, DeviceIntPtr *pdev, BOOL is_auto); -InputInfoPtr xf86AllocateInput(void); - /* xf86Helper.c */ extern _X_EXPORT void xf86AddInputDriver(InputDriverPtr driver, void *module, int flags); diff --git a/hw/xfree86/common/xf86Xinput_priv.h b/hw/xfree86/common/xf86Xinput_priv.h new file mode 100644 index 000000000..b6fc9836a --- /dev/null +++ b/hw/xfree86/common/xf86Xinput_priv.h @@ -0,0 +1,15 @@ +/* SPDX-License-Identifier: MIT OR X11 + * + * Copyright © 2024 Enrico Weigelt, metux IT consult + */ +#ifndef _XSERVER__XF86XINPUT_H +#define _XSERVER__XF86XINPUT_H + +#include "xf86Xinput.h" + +extern InputInfoPtr xf86InputDevs; + +int xf86NewInputDevice(InputInfoPtr pInfo, DeviceIntPtr *pdev, BOOL is_auto); +InputInfoPtr xf86AllocateInput(void); + +#endif /* _XSERVER__XF86XINPUT_H */ diff --git a/hw/xfree86/os-support/linux/systemd-logind.c b/hw/xfree86/os-support/linux/systemd-logind.c index 791834627..efe710b3c 100644 --- a/hw/xfree86/os-support/linux/systemd-logind.c +++ b/hw/xfree86/os-support/linux/systemd-logind.c @@ -39,7 +39,7 @@ #include "linux.h" #include "xf86.h" #include "xf86platformBus.h" -#include "xf86Xinput.h" +#include "xf86Xinput_priv.h" #include "xf86Priv.h" #include "globals.h"