summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJon TURNEY <jon.turney@dronecode.org.uk>2009-10-13 14:48:17 +0100
committerJon TURNEY <jon.turney@dronecode.org.uk>2011-01-19 14:02:14 +0000
commit708d0b9781c6f3f0c0ae7052f45223b1c2524809 (patch)
treeda84eec122954f10f0860a7689ca5f1f544e723c
parentc6aa4755ec355101a62bef86dbb090262fe806f6 (diff)
Cygwin/X: Enable building of nativegdi and primaryfb engines to avoid further rusting
Some trivial build fixes required Also fill out all function pointers for primaryfb engine Also tidy up the man page section describing drawing engines. Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net> Tested-by: Colin Harrison <colin.harrison@virgin.net>
-rw-r--r--configure.ac4
-rw-r--r--hw/xwin/InitOutput.c3
-rw-r--r--hw/xwin/man/XWin.man26
-rw-r--r--hw/xwin/win.h12
-rw-r--r--hw/xwin/winpfbdd.c8
-rw-r--r--hw/xwin/winwindow.c1
6 files changed, 45 insertions, 9 deletions
diff --git a/configure.ac b/configure.ac
index 45286eaf4..120321e7c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1903,8 +1903,8 @@ AM_CONDITIONAL(XWIN_MULTIWINDOW, [test "x$XWIN" = xyes])
AM_CONDITIONAL(XWIN_MULTIWINDOWEXTWM, [test "x$XWIN" = xyes && test "x$WINDOWSWM" = xyes])
AM_CONDITIONAL(XWIN_CLIPBOARD, [test "x$XWIN" = xyes])
AM_CONDITIONAL(XWIN_GLX_WINDOWS, [test "x$XWIN" = xyes && false])
-AM_CONDITIONAL(XWIN_NATIVEGDI, [test "x$XWIN" = xyes && false])
-AM_CONDITIONAL(XWIN_PRIMARYFB, [test "x$XWIN" = xyes && false])
+AM_CONDITIONAL(XWIN_NATIVEGDI, [test "x$XWIN" = xyes])
+AM_CONDITIONAL(XWIN_PRIMARYFB, [test "x$XWIN" = xyes])
AM_CONDITIONAL(XWIN_RANDR, [test "x$XWIN" = xyes])
AM_CONDITIONAL(XWIN_XV, [test "x$XWIN" = xyes && test "x$XV" = xyes])
diff --git a/hw/xwin/InitOutput.c b/hw/xwin/InitOutput.c
index 38a658d77..bf04cf13f 100644
--- a/hw/xwin/InitOutput.c
+++ b/hw/xwin/InitOutput.c
@@ -755,6 +755,9 @@ winUseMsg (void)
"\t\t1 - Shadow GDI\n"
"\t\t2 - Shadow DirectDraw\n"
"\t\t4 - Shadow DirectDraw4 Non-Locking\n"
+#ifdef XWIN_PRIMARYFB
+ "\t\t8 - Primary DirectDraw - obsolete\n"
+#endif
#ifdef XWIN_NATIVEGDI
"\t\t16 - Native GDI - experimental\n"
#endif
diff --git a/hw/xwin/man/XWin.man b/hw/xwin/man/XWin.man
index 51268f69a..76abdca09 100644
--- a/hw/xwin/man/XWin.man
+++ b/hw/xwin/man/XWin.man
@@ -190,15 +190,27 @@ respectively).
.TP 8
.B "\-engine \fIengine_type_id\fP"
This option, which is intended for Cygwin/X developers,
-overrides the server's automatically selected engine type. This
-parameter will be ignored if the specified engine type is not
-supported on the current system. The supported engine type ids are 1
-- Shadow GDI, 2 - Shadow DirectDraw, and 4 - Shadow DirectDraw Non-Locking.
-Additionally, there are engines with type ids
-8 - Primary DirectDraw (obsolete) and 16 - Native GDI (experimental and barely functional).
-Default behavior is to determine the engine with optimum performance that
+overrides the server's automatically selected drawing engine type. This
+parameter will be ignored if the specified drawing engine type is not
+supported on the current system.
+
+Default behavior is to select the drawing engine with optimum performance that
supports the specified depth and window configuration.
+The engine type ids are:
+.RS
+.IP 1 4
+Shadow GDI
+.IP 2 4
+Shadow DirectDraw
+.IP 4 4
+Shadow DirectDraw Non-Locking
+.IP 8 4
+Primary DirectDraw (unsupported, obsolete)
+.IP 16 4
+Native GDI (unsupported, experimental and barely functional)
+.RE
+
.SH FULLSCREEN OPTIONS
.TP 8
.B "\-depth \fIdepth\fP"
diff --git a/hw/xwin/win.h b/hw/xwin/win.h
index 44307813c..6ac48c5e9 100644
--- a/hw/xwin/win.h
+++ b/hw/xwin/win.h
@@ -315,6 +315,12 @@ typedef Bool (*winFinishCreateWindowsWindowProcPtr)(WindowPtr pWin);
typedef Bool (*winCreateScreenResourcesProc)(ScreenPtr);
+#ifdef XWIN_NATIVEGDI
+/* Typedefs for native GDI wrappers */
+typedef Bool (*RealizeFontPtr) (ScreenPtr pScreen, FontPtr pFont);
+typedef Bool (*UnrealizeFontPtr)(ScreenPtr pScreen, FontPtr pFont);
+#endif
+
/*
* GC (graphics context) privates
@@ -588,6 +594,12 @@ typedef struct _winPrivScreenRec
SetShapeProcPtr SetShape;
winCursorRec cursor;
+
+#ifdef XWIN_NATIVEGDI
+ RealizeFontPtr RealizeFont;
+ UnrealizeFontPtr UnrealizeFont;
+#endif
+
} winPrivScreenRec;
diff --git a/hw/xwin/winpfbdd.c b/hw/xwin/winpfbdd.c
index 7859c6b19..8251a3722 100644
--- a/hw/xwin/winpfbdd.c
+++ b/hw/xwin/winpfbdd.c
@@ -666,7 +666,15 @@ winSetEngineFunctionsPrimaryDD (ScreenPtr pScreen)
pScreenPriv->pwinBltExposedRegions
= (winBltExposedRegionsProcPtr) (void (*)(void))NoopDDA;
pScreenPriv->pwinActivateApp = winActivateAppPrimaryDD;
+ pScreenPriv->pwinRedrawScreen = NULL;
+ pScreenPriv->pwinRealizeInstalledPalette = NULL;
+ pScreenPriv->pwinInstallColormap = NULL;
+ pScreenPriv->pwinStoreColors = NULL;
+ pScreenPriv->pwinCreateColormap = NULL;
+ pScreenPriv->pwinDestroyColormap = NULL;
pScreenPriv->pwinHotKeyAltTab = winHotKeyAltTabPrimaryDD;
+ pScreenPriv->pwinCreatePrimarySurface = (winCreatePrimarySurfaceProcPtr) (void (*)(void))NoopDDA;
+ pScreenPriv->pwinReleasePrimarySurface = (winReleasePrimarySurfaceProcPtr) (void (*)(void))NoopDDA;
#ifdef XWIN_MULTIWINDOW
pScreenPriv->pwinFinishCreateWindowsWindow =
(winFinishCreateWindowsWindowProcPtr) (void (*)(void))NoopDDA;
diff --git a/hw/xwin/winwindow.c b/hw/xwin/winwindow.c
index 783760f4b..7975d71a9 100644
--- a/hw/xwin/winwindow.c
+++ b/hw/xwin/winwindow.c
@@ -58,6 +58,7 @@ winReshapeRootless (WindowPtr pWin);
Bool
winCreateWindowNativeGDI (WindowPtr pWin)
{
+ Bool fResult = TRUE;
ScreenPtr pScreen = pWin->drawable.pScreen;
winWindowPriv(pWin);
winScreenPriv(pScreen);