[PATCH 5/8] dga: Hide a bunch of implementation details

Adam Jackson ajax at redhat.com
Tue Jun 2 11:15:03 PDT 2015


Signed-off-by: Adam Jackson <ajax at redhat.com>
---
 hw/xfree86/common/dgaproc.h | 62 ++++++++-------------------------------------
 hw/xfree86/common/xf86DGA.c | 36 +++++++++++++-------------
 hw/xfree86/sdksyms.sh       |  6 -----
 3 files changed, 28 insertions(+), 76 deletions(-)

diff --git a/hw/xfree86/common/dgaproc.h b/hw/xfree86/common/dgaproc.h
index 87e923f..7925bd4 100644
--- a/hw/xfree86/common/dgaproc.h
+++ b/hw/xfree86/common/dgaproc.h
@@ -54,57 +54,15 @@ typedef struct {
 
 /* DDX interface */
 
-extern _X_EXPORT int
- DGASetMode(int Index, int num, XDGAModePtr mode, PixmapPtr *pPix);
-
-extern _X_EXPORT void
- DGASetInputMode(int Index, Bool keyboard, Bool mouse);
-
-extern _X_EXPORT void
- DGASelectInput(int Index, ClientPtr client, long mask);
-
-extern _X_EXPORT Bool DGAAvailable(int Index);
-extern _X_EXPORT Bool DGAScreenAvailable(ScreenPtr pScreen);
-extern _X_EXPORT Bool DGAActive(int Index);
-extern _X_EXPORT void DGAShutdown(void);
-extern _X_EXPORT void DGAInstallCmap(ColormapPtr cmap);
-extern _X_EXPORT int DGAGetViewportStatus(int Index);
-extern _X_EXPORT int DGASync(int Index);
-
-extern _X_EXPORT int
- DGAFillRect(int Index, int x, int y, int w, int h, unsigned long color);
-
-extern _X_EXPORT int
- DGABlitRect(int Index, int srcx, int srcy, int w, int h, int dstx, int dsty);
-
-extern _X_EXPORT int
-
-DGABlitTransRect(int Index,
-                 int srcx, int srcy,
-                 int w, int h, int dstx, int dsty, unsigned long color);
-
-extern _X_EXPORT int
- DGASetViewport(int Index, int x, int y, int mode);
-
-extern _X_EXPORT int DGAGetModes(int Index);
-extern _X_EXPORT int DGAGetOldDGAMode(int Index);
-
-extern _X_EXPORT int DGAGetModeInfo(int Index, XDGAModePtr mode, int num);
-
-extern _X_EXPORT Bool DGAVTSwitch(void);
-extern _X_EXPORT Bool DGAStealButtonEvent(DeviceIntPtr dev, int Index,
-                                          int button, int is_down);
-extern _X_EXPORT Bool DGAStealMotionEvent(DeviceIntPtr dev, int Index, int dx,
-                                          int dy);
-extern _X_EXPORT Bool DGAStealKeyEvent(DeviceIntPtr dev, int Index,
-                                       int key_code, int is_down);
-
-extern _X_EXPORT Bool DGAOpenFramebuffer(int Index, char **name,
-                                         unsigned char **mem, int *size,
-                                         int *offset, int *flags);
-extern _X_EXPORT void DGACloseFramebuffer(int Index);
-extern _X_EXPORT Bool DGAChangePixmapMode(int Index, int *x, int *y, int mode);
-extern _X_EXPORT int DGACreateColormap(int Index, ClientPtr client, int id,
-                                       int mode, int alloc);
+extern Bool DGAScreenAvailable(ScreenPtr pScreen);
+extern Bool DGAActive(int Index);
+extern void DGAShutdown(void);
+
+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/xf86DGA.c b/hw/xfree86/common/xf86DGA.c
index 9533e1c..c689dcb 100644
--- a/hw/xfree86/common/xf86DGA.c
+++ b/hw/xfree86/common/xf86DGA.c
@@ -471,7 +471,7 @@ xf86SetDGAMode(ScrnInfoPtr pScrn, int num, DGADevicePtr devRet)
 
 /*********** exported ones ***************/
 
-void
+static void
 DGASetInputMode(int index, Bool keyboard, Bool mouse)
 {
     ScreenPtr pScreen = screenInfo.screens[index];
@@ -488,7 +488,7 @@ DGASetInputMode(int index, Bool keyboard, Bool mouse)
     }
 }
 
-Bool
+static Bool
 DGAChangePixmapMode(int index, int *x, int *y, int mode)
 {
     DGAScreenPtr pScreenPriv;
@@ -560,7 +560,7 @@ DGAScreenAvailable(ScreenPtr pScreen)
     return FALSE;
 }
 
-Bool
+static Bool
 DGAAvailable(int index)
 {
     ScreenPtr pScreen;
@@ -606,7 +606,7 @@ DGAShutdown(void)
 
 /* Called by the extension to initialize a mode */
 
-int
+static int
 DGASetMode(int index, int num, XDGAModePtr mode, PixmapPtr *pPix)
 {
     ScrnInfoPtr pScrn = xf86Screens[index];
@@ -626,7 +626,7 @@ DGASetMode(int index, int num, XDGAModePtr mode, PixmapPtr *pPix)
 
 /* Called from the extension to let the DDX know which events are requested */
 
-void
+static void
 DGASelectInput(int index, ClientPtr client, long mask)
 {
     DGAScreenPtr pScreenPriv = DGA_GET_SCREEN_PRIV(screenInfo.screens[index]);
@@ -636,7 +636,7 @@ DGASelectInput(int index, ClientPtr client, long mask)
     pScreenPriv->input = mask;
 }
 
-int
+static int
 DGAGetViewportStatus(int index)
 {
     DGAScreenPtr pScreenPriv = DGA_GET_SCREEN_PRIV(screenInfo.screens[index]);
@@ -649,7 +649,7 @@ DGAGetViewportStatus(int index)
     return (*pScreenPriv->funcs->GetViewport) (pScreenPriv->pScrn);
 }
 
-int
+static int
 DGASetViewport(int index, int x, int y, int mode)
 {
     DGAScreenPtr pScreenPriv = DGA_GET_SCREEN_PRIV(screenInfo.screens[index]);
@@ -675,7 +675,7 @@ BitsClear(CARD32 data)
     return bits;
 }
 
-int
+static int
 DGACreateColormap(int index, ClientPtr client, int id, int mode, int alloc)
 {
     ScreenPtr pScreen = screenInfo.screens[index];
@@ -744,7 +744,7 @@ DGACreateColormap(int index, ClientPtr client, int id, int mode, int alloc)
 
 /*  Called by the extension to install a colormap on DGA active screens */
 
-void
+static void
 DGAInstallCmap(ColormapPtr cmap)
 {
     ScreenPtr pScreen = cmap->pScreen;
@@ -760,7 +760,7 @@ DGAInstallCmap(ColormapPtr cmap)
     (*pScreen->InstallColormap) (cmap);
 }
 
-int
+static int
 DGASync(int index)
 {
     DGAScreenPtr pScreenPriv = DGA_GET_SCREEN_PRIV(screenInfo.screens[index]);
@@ -773,7 +773,7 @@ DGASync(int index)
     return Success;
 }
 
-int
+static int
 DGAFillRect(int index, int x, int y, int w, int h, unsigned long color)
 {
     DGAScreenPtr pScreenPriv = DGA_GET_SCREEN_PRIV(screenInfo.screens[index]);
@@ -789,7 +789,7 @@ DGAFillRect(int index, int x, int y, int w, int h, unsigned long color)
     return BadMatch;
 }
 
-int
+static int
 DGABlitRect(int index, int srcx, int srcy, int w, int h, int dstx, int dsty)
 {
     DGAScreenPtr pScreenPriv = DGA_GET_SCREEN_PRIV(screenInfo.screens[index]);
@@ -806,7 +806,7 @@ DGABlitRect(int index, int srcx, int srcy, int w, int h, int dstx, int dsty)
     return BadMatch;
 }
 
-int
+static int
 DGABlitTransRect(int index,
                  int srcx, int srcy,
                  int w, int h, int dstx, int dsty, unsigned long color)
@@ -826,7 +826,7 @@ DGABlitTransRect(int index,
     return BadMatch;
 }
 
-int
+static int
 DGAGetModes(int index)
 {
     DGAScreenPtr pScreenPriv = DGA_GET_SCREEN_PRIV(screenInfo.screens[index]);
@@ -836,7 +836,7 @@ DGAGetModes(int index)
     return pScreenPriv->numModes;
 }
 
-int
+static int
 DGAGetModeInfo(int index, XDGAModePtr mode, int num)
 {
     DGAScreenPtr pScreenPriv = DGA_GET_SCREEN_PRIV(screenInfo.screens[index]);
@@ -1126,7 +1126,7 @@ DGAProcessPointerEvent(ScreenPtr pScreen, DGAEvent * event, DeviceIntPtr mouse)
     }
 }
 
-Bool
+static Bool
 DGAOpenFramebuffer(int index,
                    char **name,
                    unsigned char **mem, int *size, int *offset, int *flags)
@@ -1140,7 +1140,7 @@ DGAOpenFramebuffer(int index,
                                                    flags);
 }
 
-void
+static void
 DGACloseFramebuffer(int index)
 {
     DGAScreenPtr pScreenPriv = DGA_GET_SCREEN_PRIV(screenInfo.screens[index]);
@@ -1152,7 +1152,7 @@ DGACloseFramebuffer(int index)
 
 /*  For DGA 1.0 backwards compatibility only */
 
-int
+static int
 DGAGetOldDGAMode(int index)
 {
     DGAScreenPtr pScreenPriv = DGA_GET_SCREEN_PRIV(screenInfo.screens[index]);
diff --git a/hw/xfree86/sdksyms.sh b/hw/xfree86/sdksyms.sh
index e141522..334ed24 100755
--- a/hw/xfree86/sdksyms.sh
+++ b/hw/xfree86/sdksyms.sh
@@ -180,12 +180,6 @@ cat > sdksyms.c << EOF
 #endif
 
 
-/* hw/xfree86/dixmods/extmod/Makefile.am -- module */
-#ifdef XFreeXDGA
-#include "dgaproc.h"
-#endif
-
-
 /* hw/xfree86/parser/Makefile.am */
 #include "xf86Parser.h"
 #include "xf86Optrec.h"
-- 
2.4.1



More information about the xorg-devel mailing list