static Bool cfb8_32WidSetupScreen( ScreenPtr pScreen, int xsize, int ysize, /* in pixels */ int dpix, int dpiy ){ if (!cfb8_32WidAllocatePrivates(pScreen)) return FALSE; pScreen->defColormap = FakeClientID(0); /* let CreateDefColormap do whatever it wants for pixels */ pScreen->blackPixel = pScreen->whitePixel = (Pixel) 0; pScreen->QueryBestSize = mfbQueryBestSize; /* SaveScreen */ pScreen->GetImage = cfb8_32WidGetImage; pScreen->GetSpans = cfb8_32WidGetSpans; pScreen->CreateWindow = cfb8_32WidCreateWindow; pScreen->DestroyWindow = cfb8_32WidDestroyWindow; pScreen->PositionWindow = cfb8_32WidPositionWindow; pScreen->ChangeWindowAttributes = cfb8_32WidChangeWindowAttributes; pScreen->RealizeWindow = cfb32MapWindow; /* OK */ pScreen->UnrealizeWindow = cfb32UnmapWindow; /* OK */ pScreen->PaintWindowBackground = cfb8_32WidPaintWindow; pScreen->PaintWindowBorder = cfb8_32WidPaintWindow; pScreen->CopyWindow = cfb8_32WidCopyWindow; pScreen->CreatePixmap = cfb32CreatePixmap; /* OK */ pScreen->DestroyPixmap = cfb32DestroyPixmap; /* OK */ pScreen->RealizeFont = mfbRealizeFont; pScreen->UnrealizeFont = mfbUnrealizeFont; pScreen->CreateGC = cfb8_32WidCreateGC; pScreen->CreateColormap = miInitializeColormap; pScreen->DestroyColormap = (void (*)())NoopDDA; pScreen->InstallColormap = miInstallColormap; pScreen->UninstallColormap = miUninstallColormap; pScreen->ListInstalledColormaps = miListInstalledColormaps; pScreen->StoreColors = (void (*)())NoopDDA; pScreen->ResolveColor = miResolveColor; pScreen->BitmapToRegion = mfbPixmapToRegion; mfbRegisterCopyPlaneProc (pScreen, cfbCopyPlane); return TRUE; }
static Bool cfb24_32SetupScreen( ScreenPtr pScreen, pointer pbits, /* pointer to screen bitmap */ int xsize, int ysize, /* in pixels */ int dpix, int dpiy, /* dots per inch */ int width /* pixel width of frame buffer */ ){ if (!cfb24_32AllocatePrivates(pScreen)) return FALSE; pScreen->defColormap = FakeClientID(0); /* let CreateDefColormap do whatever it wants for pixels */ pScreen->blackPixel = pScreen->whitePixel = (Pixel) 0; pScreen->QueryBestSize = mfbQueryBestSize; /* SaveScreen */ pScreen->GetImage = cfb24_32GetImage; pScreen->GetSpans = cfb24_32GetSpans; pScreen->CreateWindow = cfb24_32CreateWindow; pScreen->DestroyWindow = cfb24_32DestroyWindow; pScreen->PositionWindow = cfb24_32PositionWindow; pScreen->ChangeWindowAttributes = cfb24_32ChangeWindowAttributes; pScreen->RealizeWindow = cfb24MapWindow; /* OK */ pScreen->UnrealizeWindow = cfb24UnmapWindow; /* OK */ pScreen->PaintWindowBackground = cfb24PaintWindow; /* OK */ pScreen->PaintWindowBorder = cfb24PaintWindow; /* OK */ pScreen->CopyWindow = cfb24_32CopyWindow; pScreen->CreatePixmap = cfb24_32CreatePixmap; pScreen->DestroyPixmap = cfb24_32DestroyPixmap; pScreen->RealizeFont = mfbRealizeFont; pScreen->UnrealizeFont = mfbUnrealizeFont; pScreen->CreateGC = cfb24_32CreateGC; pScreen->CreateColormap = miInitializeColormap; pScreen->DestroyColormap = DestroyColormapNoop; pScreen->InstallColormap = miInstallColormap; pScreen->UninstallColormap = miUninstallColormap; pScreen->ListInstalledColormaps = miListInstalledColormaps; pScreen->StoreColors = StoreColorsNoop; pScreen->ResolveColor = miResolveColor; pScreen->BitmapToRegion = mfbPixmapToRegion; mfbRegisterCopyPlaneProc (pScreen, miCopyPlane); return TRUE; }