From 7f9f3df1810d439ca823ff6fbefa5288e73f0d64 Mon Sep 17 00:00:00 2001 From: "Enrico Weigelt, metux IT consult" Date: Fri, 9 Feb 2024 17:29:39 +0100 Subject: [PATCH] (submit/cleanup-api-xfree86) 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 --- hw/xfree86/common/xf86Config.c | 1 + hw/xfree86/common/xf86Events.c | 3 ++- 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, 22 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 fce7c401d..7e1a1d49f 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 0ce862fc9..9cf811d5d 100644 --- a/hw/xfree86/common/xf86Events.c +++ b/hw/xfree86/common/xf86Events.c @@ -77,7 +77,8 @@ #endif #include "inputstr.h" -#include "xf86Xinput.h" +#include "xf86Xinput_priv.h" + #include "mi.h" #include "mipointer.h" diff --git a/hw/xfree86/common/xf86Helper.c b/hw/xfree86/common/xf86Helper.c index 1e7a375c8..91f8eded5 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 "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 98e74d549..ab986579f 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 "xf86Optrec.h" #include "mipointer.h" #include "loaderProcs.h" diff --git a/hw/xfree86/common/xf86Xinput.h b/hw/xfree86/common/xf86Xinput.h index 6c4eaede1..730cd760d 100644 --- a/hw/xfree86/common/xf86Xinput.h +++ b/hw/xfree86/common/xf86Xinput.h @@ -115,9 +115,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, @@ -191,10 +188,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 c6a24fc7b..5352edcd0 100644 --- a/hw/xfree86/os-support/linux/systemd-logind.c +++ b/hw/xfree86/os-support/linux/systemd-logind.c @@ -38,7 +38,7 @@ #include "linux.h" #include "xf86.h" #include "xf86platformBus.h" -#include "xf86Xinput.h" +#include "xf86Xinput_priv.h" #include "xf86Priv.h" #include "globals.h"