2 *Copyright (C) 1994-2000 The XFree86 Project, Inc. All Rights Reserved.
4 *Permission is hereby granted, free of charge, to any person obtaining
5 * a copy of this software and associated documentation files (the
6 *"Software"), to deal in the Software without restriction, including
7 *without limitation the rights to use, copy, modify, merge, publish,
8 *distribute, sublicense, and/or sell copies of the Software, and to
9 *permit persons to whom the Software is furnished to do so, subject to
10 *the following conditions:
12 *The above copyright notice and this permission notice shall be
13 *included in all copies or substantial portions of the Software.
15 *THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
16 *EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
17 *MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
18 *NONINFRINGEMENT. IN NO EVENT SHALL THE XFREE86 PROJECT BE LIABLE FOR
19 *ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
20 *CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
21 *WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
23 *Except as contained in this notice, the name of the XFree86 Project
24 *shall not be used in advertising or otherwise to promote the sale, use
25 *or other dealings in this Software without prior written authorization
26 *from the XFree86 Project.
28 * Authors: Dakshinamurthy Karra
35 #ifdef HAVE_XWIN_CONFIG_H
36 #include <xwin-config.h>
41 #ifdef XWIN_MULTIWINDOWEXTWM
42 static RootlessFrameProcsRec winMWExtWMProcs
= {
43 winMWExtWMCreateFrame
,
44 winMWExtWMDestroyFrame
,
47 winMWExtWMResizeFrame
,
48 winMWExtWMRestackFrame
,
49 winMWExtWMReshapeFrame
,
52 winMWExtWMStartDrawing
,
53 winMWExtWMStopDrawing
,
54 winMWExtWMUpdateRegion
,
55 winMWExtWMDamageRects
,
56 winMWExtWMRootlessSwitchWindow
,
57 NULL
, //winMWExtWMDoReorderWindow,
58 NULL
, //winMWExtWMHideWindow,
59 NULL
, //winMWExtWMUpdateColorMap,
61 NULL
, //winMWExtWMCopyBytes,
75 winSaveScreen(ScreenPtr pScreen
, int on
);
78 * Determine what type of screen we are initializing
79 * and call the appropriate procedure to intiailize
80 * that type of screen.
84 winScreenInit(ScreenPtr pScreen
, int argc
, char **argv
)
86 winScreenInfoPtr pScreenInfo
= &g_ScreenInfo
[pScreen
->myNum
];
87 winPrivScreenPtr pScreenPriv
;
92 winDebug("winScreenInit - dwWidth: %ld dwHeight: %ld\n",
93 pScreenInfo
->dwWidth
, pScreenInfo
->dwHeight
);
96 /* Allocate privates for this screen */
97 if (!winAllocatePrivates(pScreen
)) {
98 ErrorF("winScreenInit - Couldn't allocate screen privates\n");
102 /* Get a pointer to the privates structure that was allocated */
103 pScreenPriv
= winGetScreenPriv(pScreen
);
105 /* Save a pointer to this screen in the screen info structure */
106 pScreenInfo
->pScreen
= pScreen
;
108 /* Save a pointer to the screen info in the screen privates structure */
109 /* This allows us to get back to the screen info from a screen pointer */
110 pScreenPriv
->pScreenInfo
= pScreenInfo
;
113 * Determine which engine to use.
115 * NOTE: This is done once per screen because each screen possibly has
116 * a preferred engine specified on the command line.
118 if (!winSetEngine(pScreen
)) {
119 ErrorF("winScreenInit - winSetEngine () failed\n");
123 /* Horribly misnamed function: Allow engine to adjust BPP for screen */
124 dwInitialBPP
= pScreenInfo
->dwBPP
;
126 if (!(*pScreenPriv
->pwinAdjustVideoMode
) (pScreen
)) {
127 ErrorF("winScreenInit - winAdjustVideoMode () failed\n");
131 if (dwInitialBPP
== WIN_DEFAULT_BPP
) {
132 /* No -depth parameter was passed, let the user know the depth being used */
134 ("winScreenInit - Using Windows display depth of %d bits per pixel\n",
135 (int) pScreenInfo
->dwBPP
);
137 else if (dwInitialBPP
!= pScreenInfo
->dwBPP
) {
138 /* Warn user if engine forced a depth different to -depth parameter */
140 ("winScreenInit - Command line depth of %d bpp overidden by engine, using %d bpp\n",
141 (int) dwInitialBPP
, (int) pScreenInfo
->dwBPP
);
144 ErrorF("winScreenInit - Using command line depth of %d bpp\n",
145 (int) pScreenInfo
->dwBPP
);
148 /* Check for supported display depth */
149 if (!(WIN_SUPPORTED_BPPS
& (1 << (pScreenInfo
->dwBPP
- 1)))) {
150 ErrorF("winScreenInit - Unsupported display depth: %d\n"
151 "Change your Windows display depth to 15, 16, 24, or 32 bits "
152 "per pixel.\n", (int) pScreenInfo
->dwBPP
);
153 ErrorF("winScreenInit - Supported depths: %08x\n", WIN_SUPPORTED_BPPS
);
160 * Check that all monitors have the same display depth if we are using
163 if (pScreenInfo
->fMultipleMonitors
164 && !GetSystemMetrics(SM_SAMEDISPLAYFORMAT
)) {
165 ErrorF("winScreenInit - Monitors do not all have same pixel format / "
167 if (pScreenInfo
->dwEngine
== WIN_SERVER_SHADOW_GDI
) {
169 ("winScreenInit - Performance may suffer off primary display.\n");
172 ErrorF("winScreenInit - Using primary display only.\n");
173 pScreenInfo
->fMultipleMonitors
= FALSE
;
177 /* Create display window */
178 if (!(*pScreenPriv
->pwinCreateBoundingWindow
) (pScreen
)) {
179 ErrorF("winScreenInit - pwinCreateBoundingWindow () " "failed\n");
183 /* Get a device context */
184 hdc
= GetDC(pScreenPriv
->hwndScreen
);
186 /* Are we using multiple monitors? */
187 if (pScreenInfo
->fMultipleMonitors
) {
189 * In this case, some of the defaults set in
190 * winInitializeScreenDefaults() are not correct ...
192 if (!pScreenInfo
->fUserGaveHeightAndWidth
) {
193 pScreenInfo
->dwWidth
= GetSystemMetrics(SM_CXVIRTUALSCREEN
);
194 pScreenInfo
->dwHeight
= GetSystemMetrics(SM_CYVIRTUALSCREEN
);
198 /* Release the device context */
199 ReleaseDC(pScreenPriv
->hwndScreen
, hdc
);
201 /* Clear the visuals list */
202 miClearVisualTypes();
204 /* Call the engine dependent screen initialization procedure */
205 if (!((*pScreenPriv
->pwinFinishScreenInit
) (pScreen
->myNum
, pScreen
, argc
, argv
))) {
206 ErrorF("winScreenInit - winFinishScreenInit () failed\n");
208 /* call the engine dependent screen close procedure to clean up from a failure */
209 pScreenPriv
->pwinCloseScreen(pScreen
);
214 if (!g_fSoftwareCursor
)
215 winInitCursor(pScreen
);
217 winErrorFVerb(2, "winScreenInit - Using software cursor\n");
220 Note the screen origin in a normalized coordinate space where (0,0) is at the top left
221 of the native virtual desktop area
223 pScreen
->x
= pScreenInfo
->dwInitialX
- GetSystemMetrics(SM_XVIRTUALSCREEN
);
224 pScreen
->y
= pScreenInfo
->dwInitialY
- GetSystemMetrics(SM_YVIRTUALSCREEN
);
226 ErrorF("Screen %d added at virtual desktop coordinate (%d,%d).\n",
227 pScreen
->myNum
, pScreen
->x
, pScreen
->y
);
230 winDebug("winScreenInit - returning\n");
237 winCreateScreenResources(ScreenPtr pScreen
)
239 winScreenPriv(pScreen
);
242 result
= pScreenPriv
->pwinCreateScreenResources(pScreen
);
244 /* Now the screen bitmap has been wrapped in a pixmap,
245 add that to the Shadow framebuffer */
246 if (!shadowAdd(pScreen
, pScreen
->devPrivate
,
247 pScreenPriv
->pwinShadowUpdate
, NULL
, 0, 0)) {
248 ErrorF("winCreateScreenResources - shadowAdd () failed\n");
255 /* See Porting Layer Definition - p. 20 */
257 winFinishScreenInitFB(int i
, ScreenPtr pScreen
, int argc
, char **argv
)
259 winScreenPriv(pScreen
);
260 winScreenInfo
*pScreenInfo
= pScreenPriv
->pScreenInfo
;
261 VisualPtr pVisual
= NULL
;
263 #if defined(XWIN_CLIPBOARD) || defined(XWIN_MULTIWINDOW)
267 /* Create framebuffer */
268 if (!(*pScreenPriv
->pwinInitScreen
) (pScreen
)) {
269 ErrorF("winFinishScreenInitFB - Could not allocate framebuffer\n");
274 * Calculate the number of bits that are used to represent color in each pixel,
275 * the color depth for the screen
277 if (pScreenInfo
->dwBPP
== 8)
278 pScreenInfo
->dwDepth
= 8;
280 pScreenInfo
->dwDepth
= winCountBits(pScreenPriv
->dwRedMask
)
281 + winCountBits(pScreenPriv
->dwGreenMask
)
282 + winCountBits(pScreenPriv
->dwBlueMask
);
284 winErrorFVerb(2, "winFinishScreenInitFB - Masks: %08x %08x %08x\n",
285 (unsigned int) pScreenPriv
->dwRedMask
,
286 (unsigned int) pScreenPriv
->dwGreenMask
,
287 (unsigned int) pScreenPriv
->dwBlueMask
);
290 if (!(*pScreenPriv
->pwinInitVisuals
) (pScreen
)) {
291 ErrorF("winFinishScreenInitFB - winInitVisuals failed\n");
295 /* Apparently we need this for the render extension */
298 /* Start fb initialization */
299 if (!fbSetupScreen(pScreen
,
301 pScreenInfo
->dwWidth
, pScreenInfo
->dwHeight
,
302 monitorResolution
, monitorResolution
,
303 pScreenInfo
->dwStride
, pScreenInfo
->dwBPP
)) {
304 ErrorF("winFinishScreenInitFB - fbSetupScreen failed\n");
308 /* Override default colormap routines if visual class is dynamic */
309 if (pScreenInfo
->dwDepth
== 8
310 && (pScreenInfo
->dwEngine
== WIN_SERVER_SHADOW_GDI
311 || (pScreenInfo
->dwEngine
== WIN_SERVER_SHADOW_DDNL
312 && pScreenInfo
->fFullScreen
)
313 || (pScreenInfo
->dwEngine
== WIN_SERVER_SHADOW_DD
314 && pScreenInfo
->fFullScreen
))) {
315 winSetColormapFunctions(pScreen
);
318 * NOTE: Setting whitePixel to 255 causes Magic 7.1 to allocate its
319 * own colormap, as it cannot allocate 7 planes in the default
320 * colormap. Setting whitePixel to 1 allows Magic to get 7
321 * planes in the default colormap, so it doesn't create its
322 * own colormap. This latter situation is highly desireable,
323 * as it keeps the Magic window viewable when switching to
324 * other X clients that use the default colormap.
326 pScreen
->blackPixel
= 0;
327 pScreen
->whitePixel
= 1;
330 /* Place our save screen function */
331 pScreen
->SaveScreen
= winSaveScreen
;
333 /* Finish fb initialization */
334 if (!fbFinishScreenInit(pScreen
,
336 pScreenInfo
->dwWidth
, pScreenInfo
->dwHeight
,
337 monitorResolution
, monitorResolution
,
338 pScreenInfo
->dwStride
, pScreenInfo
->dwBPP
)) {
339 ErrorF("winFinishScreenInitFB - fbFinishScreenInit failed\n");
343 /* Save a pointer to the root visual */
344 for (pVisual
= pScreen
->visuals
;
345 pVisual
->vid
!= pScreen
->rootVisual
; pVisual
++);
346 pScreenPriv
->pRootVisual
= pVisual
;
349 * Setup points to the block and wakeup handlers. Pass a pointer
350 * to the current screen as pWakeupdata.
352 pScreen
->BlockHandler
= winBlockHandler
;
353 pScreen
->WakeupHandler
= winWakeupHandler
;
355 /* Render extension initialization, calls miPictureInit */
356 if (!fbPictureInit(pScreen
, NULL
, 0)) {
357 ErrorF("winFinishScreenInitFB - fbPictureInit () failed\n");
362 /* Initialize resize and rotate support */
363 if (!winRandRInit(pScreen
)) {
364 ErrorF("winFinishScreenInitFB - winRandRInit () failed\n");
369 /* Setup the cursor routines */
371 winDebug("winFinishScreenInitFB - Calling miDCInitialize ()\n");
373 miDCInitialize(pScreen
, &g_winPointerCursorFuncs
);
375 /* KDrive does winCreateDefColormap right after miDCInitialize */
376 /* Create a default colormap */
378 winDebug("winFinishScreenInitFB - Calling winCreateDefColormap ()\n");
380 if (!winCreateDefColormap(pScreen
)) {
381 ErrorF("winFinishScreenInitFB - Could not create colormap\n");
385 /* Initialize the shadow framebuffer layer */
386 if ((pScreenInfo
->dwEngine
== WIN_SERVER_SHADOW_GDI
387 || pScreenInfo
->dwEngine
== WIN_SERVER_SHADOW_DD
388 || pScreenInfo
->dwEngine
== WIN_SERVER_SHADOW_DDNL
)
389 #ifdef XWIN_MULTIWINDOWEXTWM
390 && !pScreenInfo
->fMWExtWM
394 winDebug("winFinishScreenInitFB - Calling shadowSetup ()\n");
396 if (!shadowSetup(pScreen
)) {
397 ErrorF("winFinishScreenInitFB - shadowSetup () failed\n");
401 /* Wrap CreateScreenResources so we can add the screen pixmap
402 to the Shadow framebuffer after it's been created */
403 pScreenPriv
->pwinCreateScreenResources
= pScreen
->CreateScreenResources
;
404 pScreen
->CreateScreenResources
= winCreateScreenResources
;
407 #ifdef XWIN_MULTIWINDOWEXTWM
408 /* Handle multi-window external window manager mode */
409 if (pScreenInfo
->fMWExtWM
) {
410 winDebug("winScreenInit - MultiWindowExtWM - Calling RootlessInit\n");
412 RootlessInit(pScreen
, &winMWExtWMProcs
);
414 winDebug("winScreenInit - MultiWindowExtWM - RootlessInit returned\n");
416 rootless_CopyBytes_threshold
= 0;
417 /* FIXME: How many? Profiling needed? */
418 rootless_CopyWindow_threshold
= 1;
420 winWindowsWMExtensionInit();
424 /* Handle rootless mode */
425 if (pScreenInfo
->fRootless
) {
426 /* Define the WRAP macro temporarily for local use */
429 pScreenPriv->a = pScreen->a; \
431 winDebug("winScreenInit - null screen fn " #a "\n"); \
432 pScreenPriv->a = NULL; \
435 /* Save a pointer to each lower-level window procedure */
439 WRAP(UnrealizeWindow
);
440 WRAP(PositionWindow
);
441 WRAP(ChangeWindowAttributes
);
444 /* Assign rootless window procedures to be top level procedures */
445 pScreen
->CreateWindow
= winCreateWindowRootless
;
446 pScreen
->DestroyWindow
= winDestroyWindowRootless
;
447 pScreen
->PositionWindow
= winPositionWindowRootless
;
448 /*pScreen->ChangeWindowAttributes = winChangeWindowAttributesRootless; */
449 pScreen
->RealizeWindow
= winMapWindowRootless
;
450 pScreen
->UnrealizeWindow
= winUnmapWindowRootless
;
451 pScreen
->SetShape
= winSetShapeRootless
;
453 /* Undefine the WRAP macro, as it is not needed elsewhere */
457 #ifdef XWIN_MULTIWINDOW
458 /* Handle multi window mode */
459 else if (pScreenInfo
->fMultiWindow
) {
460 /* Define the WRAP macro temporarily for local use */
463 pScreenPriv->a = pScreen->a; \
465 winDebug("null screen fn " #a "\n"); \
466 pScreenPriv->a = NULL; \
469 /* Save a pointer to each lower-level window procedure */
473 WRAP(UnrealizeWindow
);
474 WRAP(PositionWindow
);
475 WRAP(ChangeWindowAttributes
);
476 WRAP(ReparentWindow
);
483 /* Assign multi-window window procedures to be top level procedures */
484 pScreen
->CreateWindow
= winCreateWindowMultiWindow
;
485 pScreen
->DestroyWindow
= winDestroyWindowMultiWindow
;
486 pScreen
->PositionWindow
= winPositionWindowMultiWindow
;
487 /*pScreen->ChangeWindowAttributes = winChangeWindowAttributesMultiWindow; */
488 pScreen
->RealizeWindow
= winMapWindowMultiWindow
;
489 pScreen
->UnrealizeWindow
= winUnmapWindowMultiWindow
;
490 pScreen
->ReparentWindow
= winReparentWindowMultiWindow
;
491 pScreen
->RestackWindow
= winRestackWindowMultiWindow
;
492 pScreen
->ResizeWindow
= winResizeWindowMultiWindow
;
493 pScreen
->MoveWindow
= winMoveWindowMultiWindow
;
494 pScreen
->CopyWindow
= winCopyWindowMultiWindow
;
495 pScreen
->SetShape
= winSetShapeMultiWindow
;
497 /* Undefine the WRAP macro, as it is not needed elsewhere */
502 /* Wrap either fb's or shadow's CloseScreen with our CloseScreen */
503 pScreenPriv
->CloseScreen
= pScreen
->CloseScreen
;
504 pScreen
->CloseScreen
= pScreenPriv
->pwinCloseScreen
;
506 #if defined(XWIN_CLIPBOARD) || defined(XWIN_MULTIWINDOW)
507 /* Create a mutex for modules in separate threads to wait for */
508 iReturn
= pthread_mutex_init(&pScreenPriv
->pmServerStarted
, NULL
);
510 ErrorF("winFinishScreenInitFB - pthread_mutex_init () failed: %d\n",
515 /* Own the mutex for modules in separate threads */
516 iReturn
= pthread_mutex_lock(&pScreenPriv
->pmServerStarted
);
518 ErrorF("winFinishScreenInitFB - pthread_mutex_lock () failed: %d\n",
523 /* Set the ServerStarted flag to false */
524 pScreenPriv
->fServerStarted
= FALSE
;
527 #ifdef XWIN_MULTIWINDOWEXTWM
528 pScreenPriv
->fRestacking
= FALSE
;
531 #if defined(XWIN_MULTIWINDOW) || defined(XWIN_MULTIWINDOWEXTWM)
533 #ifdef XWIN_MULTIWINDOW
534 || pScreenInfo
->fMultiWindow
536 #ifdef XWIN_MULTIWINDOWEXTWM
537 || pScreenInfo
->fInternalWM
541 winDebug("winFinishScreenInitFB - Calling winInitWM.\n");
544 /* Initialize multi window mode */
545 if (!winInitWM(&pScreenPriv
->pWMInfo
,
546 &pScreenPriv
->ptWMProc
,
547 &pScreenPriv
->ptXMsgProc
,
548 &pScreenPriv
->pmServerStarted
,
549 pScreenInfo
->dwScreen
, (HWND
) &pScreenPriv
->hwndScreen
,
550 #ifdef XWIN_MULTIWINDOWEXTWM
551 pScreenInfo
->fInternalWM
||
554 ErrorF("winFinishScreenInitFB - winInitWM () failed.\n");
560 /* Tell the server that we are enabled */
561 pScreenPriv
->fEnabled
= TRUE
;
563 /* Tell the server that we have a valid depth */
564 pScreenPriv
->fBadDepth
= FALSE
;
567 winDebug("winFinishScreenInitFB - returning\n");
573 #ifdef XWIN_NATIVEGDI
574 /* See Porting Layer Definition - p. 20 */
577 winFinishScreenInitNativeGDI(int i
,
578 ScreenPtr pScreen
, int argc
, char **argv
)
580 winScreenPriv(pScreen
);
581 winScreenInfoPtr pScreenInfo
= &g_ScreenInfo
[i
];
582 VisualPtr pVisuals
= NULL
;
583 DepthPtr pDepths
= NULL
;
584 VisualID rootVisual
= 0;
585 int nVisuals
= 0, nDepths
= 0, nRootDepth
= 0;
587 /* Ignore user input (mouse, keyboard) */
588 pScreenInfo
->fIgnoreInput
= FALSE
;
590 /* Get device contexts for the screen and shadow bitmap */
591 pScreenPriv
->hdcScreen
= GetDC(pScreenPriv
->hwndScreen
);
592 if (pScreenPriv
->hdcScreen
== NULL
)
593 FatalError("winFinishScreenInitNativeGDI - Couldn't get a DC\n");
596 if (!(*pScreenPriv
->pwinInitVisuals
) (pScreen
)) {
597 ErrorF("winFinishScreenInitNativeGDI - pwinInitVisuals failed\n");
601 /* Initialize the mi visuals */
602 if (!miInitVisuals(&pVisuals
, &pDepths
, &nVisuals
, &nDepths
, &nRootDepth
,
604 ((unsigned long) 1 << (pScreenInfo
->dwDepth
- 1)), 8,
606 ErrorF("winFinishScreenInitNativeGDI - miInitVisuals () failed\n");
610 /* Initialize the CloseScreen procedure pointer */
611 pScreen
->CloseScreen
= NULL
;
613 /* Initialize the mi code */
614 if (!miScreenInit(pScreen
, NULL
, /* No framebuffer */
615 pScreenInfo
->dwWidth
, pScreenInfo
->dwHeight
,
616 monitorResolution
, monitorResolution
,
617 pScreenInfo
->dwStride
,
618 nRootDepth
, nDepths
, pDepths
, rootVisual
,
619 nVisuals
, pVisuals
)) {
620 ErrorF("winFinishScreenInitNativeGDI - miScreenInit failed\n");
624 pScreen
->defColormap
= FakeClientID(0);
627 * Register our block and wakeup handlers; these procedures
628 * process messages in our Windows message queue; specifically,
629 * they process mouse and keyboard input.
631 pScreen
->BlockHandler
= winBlockHandler
;
632 pScreen
->WakeupHandler
= winWakeupHandler
;
634 /* Place our save screen function */
635 pScreen
->SaveScreen
= winSaveScreen
;
638 pScreen
->CreatePixmap
= winCreatePixmapNativeGDI
;
639 pScreen
->DestroyPixmap
= winDestroyPixmapNativeGDI
;
641 /* Other Screen Routines */
642 pScreen
->QueryBestSize
= winQueryBestSizeNativeGDI
;
643 pScreen
->SaveScreen
= winSaveScreen
;
644 pScreen
->GetImage
= miGetImage
;
645 pScreen
->GetSpans
= winGetSpansNativeGDI
;
647 /* Window Procedures */
648 pScreen
->CreateWindow
= winCreateWindowNativeGDI
;
649 pScreen
->DestroyWindow
= winDestroyWindowNativeGDI
;
650 pScreen
->PositionWindow
= winPositionWindowNativeGDI
;
651 /*pScreen->ChangeWindowAttributes = winChangeWindowAttributesNativeGDI; */
652 pScreen
->RealizeWindow
= winMapWindowNativeGDI
;
653 pScreen
->UnrealizeWindow
= winUnmapWindowNativeGDI
;
656 pScreen
->CopyWindow
= winCopyWindowNativeGDI
;
659 pScreen
->RealizeFont
= winRealizeFontNativeGDI
;
660 pScreen
->UnrealizeFont
= winUnrealizeFontNativeGDI
;
663 pScreen
->CreateGC
= winCreateGCNativeGDI
;
665 /* Colormap Routines */
666 pScreen
->CreateColormap
= miInitializeColormap
;
667 pScreen
->DestroyColormap
=
668 (DestroyColormapProcPtr
) (void (*)(void)) NoopDDA
;
669 pScreen
->InstallColormap
= miInstallColormap
;
670 pScreen
->UninstallColormap
= miUninstallColormap
;
671 pScreen
->ListInstalledColormaps
= miListInstalledColormaps
;
672 pScreen
->StoreColors
= (StoreColorsProcPtr
) (void (*)(void)) NoopDDA
;
673 pScreen
->ResolveColor
= miResolveColor
;
676 pScreen
->BitmapToRegion
= winPixmapToRegionNativeGDI
;
678 ErrorF("winFinishScreenInitNativeGDI - calling miDCInitialize\n");
680 /* Set the default white and black pixel positions */
681 pScreen
->whitePixel
= pScreen
->blackPixel
= (Pixel
) 0;
683 /* Initialize the cursor */
684 if (!miDCInitialize(pScreen
, &g_winPointerCursorFuncs
)) {
685 ErrorF("winFinishScreenInitNativeGDI - miDCInitialize failed\n");
689 /* Create a default colormap */
690 if (!miCreateDefColormap(pScreen
)) {
691 ErrorF("winFinishScreenInitNativeGDI - miCreateDefColormap () "
696 ErrorF("winFinishScreenInitNativeGDI - miCreateDefColormap () "
699 /* mi doesn't use a CloseScreen procedure, so no need to wrap */
700 pScreen
->CloseScreen
= pScreenPriv
->pwinCloseScreen
;
702 /* Tell the server that we are enabled */
703 pScreenPriv
->fEnabled
= TRUE
;
705 ErrorF("winFinishScreenInitNativeGDI - Successful addition of "
706 "screen %p\n", pScreen
);
712 /* See Porting Layer Definition - p. 33 */
714 winSaveScreen(ScreenPtr pScreen
, int on
)