From ee011ea82b58d08ae6599dbccd6123193a25b372 Mon Sep 17 00:00:00 2001 From: "Enrico Weigelt, metux IT consult" Date: Tue, 6 Feb 2024 16:22:04 +0100 Subject: [PATCH] xfree86: common: move non-exported funcs from dgaproc.h to separate header The typdef and defines from dgaproc.h are used by drivers, so it needs to remain part of the public API. But no need to clutter the public header with non-exported function declarations. Signed-off-by: Enrico Weigelt, metux IT consult Part-of: --- hw/xfree86/common/dgaproc.h | 12 ------------ hw/xfree86/common/dgaproc_priv.h | 19 +++++++++++++++++++ hw/xfree86/common/xf86Cursor.c | 1 + hw/xfree86/common/xf86DGA.c | 1 + hw/xfree86/common/xf86Events.c | 1 + hw/xfree86/common/xf86Xinput.c | 1 + hw/xfree86/common/xf86cmap.c | 1 + hw/xfree86/modes/xf86DiDGA.c | 1 + 8 files changed, 25 insertions(+), 12 deletions(-) create mode 100644 hw/xfree86/common/dgaproc_priv.h diff --git a/hw/xfree86/common/dgaproc.h b/hw/xfree86/common/dgaproc.h index b9f003056..45b8481a8 100644 --- a/hw/xfree86/common/dgaproc.h +++ b/hw/xfree86/common/dgaproc.h @@ -52,16 +52,4 @@ typedef struct { int reserved2; } XDGAModeRec, *XDGAModePtr; -/* DDX interface */ - -extern Bool DGAScreenAvailable(ScreenPtr pScreen); -extern Bool DGAActive(int Index); - -extern Bool DGAVTSwitch(void); -extern Bool DGAStealButtonEvent(DeviceIntPtr dev, int Index, - int button, int is_down); -extern Bool DGAStealMotionEvent(DeviceIntPtr dev, int Index, int dx, int dy); -extern Bool DGAStealKeyEvent(DeviceIntPtr dev, int Index, - int key_code, int is_down); - #endif /* __DGAPROC_H */ diff --git a/hw/xfree86/common/dgaproc_priv.h b/hw/xfree86/common/dgaproc_priv.h new file mode 100644 index 000000000..05d8f2bee --- /dev/null +++ b/hw/xfree86/common/dgaproc_priv.h @@ -0,0 +1,19 @@ +/* SPDX-License-Identifier: MIT OR X11 + * + * Copyright © 2024 Enrico Weigelt, metux IT consult + */ +#ifndef __XSERVER_XFREE86_DGAPROC_H +#define __XSERVER_XFREE86_DGAPROC_H + +#include "screenint.h" +#include "input.h" + +Bool DGAScreenAvailable(ScreenPtr pScreen); +Bool DGAActive(int Index); + +Bool DGAVTSwitch(void); +Bool DGAStealButtonEvent(DeviceIntPtr dev, int Index, int button, int is_down); +Bool DGAStealMotionEvent(DeviceIntPtr dev, int Index, int dx, int dy); +Bool DGAStealKeyEvent(DeviceIntPtr dev, int Index, int key_code, int is_down); + +#endif /* __XSERVER_XFREE86_DGAPROC_H */ diff --git a/hw/xfree86/common/xf86Cursor.c b/hw/xfree86/common/xf86Cursor.c index 8bb68a56f..37ae26c9a 100644 --- a/hw/xfree86/common/xf86Cursor.c +++ b/hw/xfree86/common/xf86Cursor.c @@ -46,6 +46,7 @@ #ifdef XFreeXDGA #include "dgaproc.h" +#include "dgaproc_priv.h" #endif typedef struct _xf86EdgeRec { diff --git a/hw/xfree86/common/xf86DGA.c b/hw/xfree86/common/xf86DGA.c index fa70ba2f0..fc1d73aaf 100644 --- a/hw/xfree86/common/xf86DGA.c +++ b/hw/xfree86/common/xf86DGA.c @@ -47,6 +47,7 @@ #include "xf86str.h" #include "xf86Priv.h" #include "dgaproc.h" +#include "dgaproc_priv.h" #include #include "colormapst.h" #include "pixmapstr.h" diff --git a/hw/xfree86/common/xf86Events.c b/hw/xfree86/common/xf86Events.c index 395bbc7b3..404c37e46 100644 --- a/hw/xfree86/common/xf86Events.c +++ b/hw/xfree86/common/xf86Events.c @@ -65,6 +65,7 @@ #ifdef XFreeXDGA #include "dgaproc.h" +#include "dgaproc_priv.h" #endif #include diff --git a/hw/xfree86/common/xf86Xinput.c b/hw/xfree86/common/xf86Xinput.c index 5b9823ed2..245db5776 100644 --- a/hw/xfree86/common/xf86Xinput.c +++ b/hw/xfree86/common/xf86Xinput.c @@ -98,6 +98,7 @@ #ifdef XFreeXDGA #include "dgaproc.h" +#include "dgaproc_priv.h" #endif #include "xkbsrv.h" diff --git a/hw/xfree86/common/xf86cmap.c b/hw/xfree86/common/xf86cmap.c index 8588c9fba..501125671 100644 --- a/hw/xfree86/common/xf86cmap.c +++ b/hw/xfree86/common/xf86cmap.c @@ -55,6 +55,7 @@ #ifdef XFreeXDGA #include #include "dgaproc.h" +#include "dgaproc_priv.h" #endif #include "xf86cmap.h" diff --git a/hw/xfree86/modes/xf86DiDGA.c b/hw/xfree86/modes/xf86DiDGA.c index 368649852..114b6932f 100644 --- a/hw/xfree86/modes/xf86DiDGA.c +++ b/hw/xfree86/modes/xf86DiDGA.c @@ -28,6 +28,7 @@ #include "xf86DDC.h" #include "xf86_OSproc.h" #include "dgaproc.h" +#include "dgaproc_priv.h" #include "xf86Crtc.h" #include "xf86Modes.h" #include "gcstruct.h"