pScreen->ConstrainCursor        = vmwareConstrainCursor; pScreen->CursorLimits           = vmwareCursorLimits; pScreen->DisplayCursor          = vmwareDisplayCursor; pScreen->RealizeCursor          = vmwareRealizeCursor; pScreen->UnrealizeCursor        = vmwareUnrealizeCursor; pScreen->RecolorCursor          = vmwareRecolorCursor; pScreen->SetCursorPosition      = vmwareSetCursorPosition;
ScreenToPrivate(ScreenPtr pScreen, ScrnInfoPtr pScrn){    VMWAREPtr pVMWARE = VMWAREPTR(pScrn);    pVMWARE->ScrnFuncs = *pScreen;    funcglob = &pVMWARE->ScrnFuncs;    scrnglob = pScrn;    pScreen->CloseScreen = VMWARECloseScreen;    pScreen->SaveScreen = VMWARESaveScreen;#if 0    pScreen->QueryBestSize = vmwareQueryBestSize;    pScreen->GetImage = vmwareGetImage;    pScreen->GetSpans = vmwareGetSpans;    pScreen->PointerNonInterestBox = vmwarePointerNonInterestBox;    pScreen->SourceValidate = vmwareSourceValidate;    pScreen->CreateWindow           = vmwareCreateWindow;    pScreen->DestroyWindow          = vmwareDestroyWindow;    pScreen->PositionWindow         = vmwarePositionWindow;    pScreen->ChangeWindowAttributes = vmwareChangeWindowAttributes;    pScreen->RealizeWindow          = vmwareRealizeWindow;    pScreen->UnrealizeWindow        = vmwareUnrealizeWindow;    pScreen->ValidateTree           = vmwareValidateTree;//    pScreen->PostValidateTree       = vmwarePostValidateTree;    pScreen->WindowExposures        = vmwareWindowExposures;    pScreen->PaintWindowBackground  = vmwarePaintWindowBackground;    pScreen->PaintWindowBorder      = vmwarePaintWindowBorder;    pScreen->CopyWindow             = vmwareCopyWindow;    pScreen->ClearToBackground      = vmwareClearToBackground;    pScreen->ClipNotify             = vmwareClipNotify;    pScreen->RestackWindow          = vmwareRestackWindow;    /* Pixmap procedures */    pScreen->CreatePixmap           = vmwareCreatePixmap;    pScreen->DestroyPixmap          = vmwareDestroyPixmap;    /* Backing store procedures */    pScreen->SaveDoomedAreas        = vmwareSaveDoomedAreas;    pScreen->RestoreAreas           = vmwareRestoreAreas;    pScreen->ExposeCopy             = vmwareExposeCopy;    pScreen->TranslateBackingStore  = vmwareTranslateBackingStore;    pScreen->ClearBackingStore      = vmwareClearBackingStore;    pScreen->DrawGuarantee          = vmwareDrawGuarantee;    /*     * A read/write copy of the lower level backing store vector is needed now     * that the functions can be wrapped.     *///    pScreen->BackingStoreFuncs      = vmwareBackingStoreFuncs;    /* Font procedures */    pScreen->RealizeFont            = vmwareRealizeFont;    pScreen->UnrealizeFont          = vmwareUnrealizeFont;    /* Cursor Procedures */    pScreen->ConstrainCursor        = vmwareConstrainCursor;    pScreen->CursorLimits           = vmwareCursorLimits;    pScreen->DisplayCursor          = vmwareDisplayCursor;    pScreen->RealizeCursor          = vmwareRealizeCursor;    pScreen->UnrealizeCursor        = vmwareUnrealizeCursor;    pScreen->RecolorCursor          = vmwareRecolorCursor;    pScreen->SetCursorPosition      = vmwareSetCursorPosition;    /* GC procedures */    pScreen->CreateGC               = vmwareCreateGC;    /* Colormap procedures */    pScreen->CreateColormap         = vmwareCreateColormap;    pScreen->DestroyColormap        = vmwareDestroyColormap;    pScreen->InstallColormap        = vmwareInstallColormap;    pScreen->UninstallColormap      = vmwareUninstallColormap;    pScreen->ListInstalledColormaps = vmwareListInstalledColormaps;    pScreen->StoreColors            = vmwareStoreColors;    pScreen->ResolveColor           = vmwareResolveColor;    pScreen->GetWindowPixmap        = vmwareGetWindowPixmap;    pScreen->SetWindowPixmap        = vmwareSetWindowPixmap;    pScreen->GetScreenPixmap        = vmwareGetScreenPixmap;    pScreen->SetScreenPixmap        = vmwareSetScreenPixmap;#endif    pScreen->PaintWindowBackground  = vmwarePaintWindow;    pScreen->PaintWindowBorder      = vmwarePaintWindow;    pScreen->CopyWindow             = vmwareCopyWindow;    pScreen->CreateGC               = vmwareCreateGC;    pScreen->GetSpans               = vmwareGetSpans;    pScreen->GetImage               = vmwareGetImage;    pScreen->BlockHandler           = vmwareBlockHandler;    pScreen->SaveDoomedAreas        = vmwareSaveDoomedAreas;    pScreen->RestoreAreas           = vmwareRestoreAreas;    vmwareGCPrivateIndex = AllocateGCPrivateIndex();    if (!AllocateGCPrivate(pScreen, vmwareGCPrivateIndex,	    sizeof(vmwarePrivGC))) return;    switch (pScrn->bitsPerPixel) {    case 8:	pVMWARE->Pmsk = 0x000000FF;	break;    case 16:	pVMWARE->Pmsk = 0x0000FFFF;	break;    case 24:	pVMWARE->Pmsk = 0x00FFFFFF;	break;    case 32:	pVMWARE->Pmsk = 0xFFFFFFFF;	break;    }}