예제 #1
0
Bool
qtRealizeInstalledPaletteShadow (ScreenPtr pScreen)
{
#if 0	/* ### NOT YET */
	winScreenPriv(pScreen);
	winPrivCmapPtr	pCmapPriv = NULL;

#if QTDEBUG
	ErrorF ("qtRealizeInstalledPaletteShadow\n");
#endif

	/* Don't do anything if there is not a colormap */
	if (pScreenPriv->pcmapInstalled == NULL)
	{
#if QTDEBUG
		ErrorF ("qtRealizeInstalledPaletteShadow - No colormap "
			"installed\n");
#endif
		return TRUE;
	}

	pCmapPriv = winGetCmapPriv (pScreenPriv->pcmapInstalled);
  
	/* Realize our palette for the screen */
	if (RealizePalette (pScreenPriv->hdcScreen) == _ERROR)
	{
		ErrorF ("qtRealizeInstalledPaletteShadow - RealizePalette () "
			"failed\n");
		return FALSE;
	}
  
	/* Set the DIB color table */
	if (SetDIBColorTable (pScreenPriv->hdcShadow,
			      0,
			      WIN_NUM_PALETTE_ENTRIES,
			      pCmapPriv->rgbColors) == 0)
	{
		ErrorF ("qtRealizeInstalledPaletteShadow - SetDIBColorTable () "
			"failed\n");
		return FALSE;
	}
#endif  
	return TRUE;
}
예제 #2
0
파일: winshadgdi.c 프로젝트: Agnarr/xserver
static Bool
winRealizeInstalledPaletteShadowGDI (ScreenPtr pScreen)
{
  winScreenPriv(pScreen);
  winPrivCmapPtr	pCmapPriv = NULL;

#if CYGDEBUG
  winDebug ("winRealizeInstalledPaletteShadowGDI\n");
#endif

  /* Don't do anything if there is not a colormap */
  if (pScreenPriv->pcmapInstalled == NULL)
    {
#if CYGDEBUG
      winDebug ("winRealizeInstalledPaletteShadowGDI - No colormap "
	      "installed\n");
#endif
      return TRUE;
    }

  pCmapPriv = winGetCmapPriv (pScreenPriv->pcmapInstalled);
  
  /* Realize our palette for the screen */
  if (RealizePalette (pScreenPriv->hdcScreen) == GDI_ERROR)
    {
      ErrorF ("winRealizeInstalledPaletteShadowGDI - RealizePalette () "
	      "failed\n");
      return FALSE;
    }
  
  /* Set the DIB color table */
  if (SetDIBColorTable (pScreenPriv->hdcShadow,
			0,
			WIN_NUM_PALETTE_ENTRIES,
			pCmapPriv->rgbColors) == 0)
    {
      ErrorF ("winRealizeInstalledPaletteShadowGDI - SetDIBColorTable () "
	      "failed\n");
      return FALSE;
    }
  
  return TRUE;
}
예제 #3
0
파일: winshadgdi.c 프로젝트: Agnarr/xserver
static Bool
winBltExposedRegionsShadowGDI (ScreenPtr pScreen)
{
  winScreenPriv(pScreen);
  winScreenInfo		*pScreenInfo = pScreenPriv->pScreenInfo;
  winPrivCmapPtr	pCmapPriv = NULL;
  HDC			hdcUpdate;
  PAINTSTRUCT		ps;

  /* BeginPaint gives us an hdc that clips to the invalidated region */
  hdcUpdate = BeginPaint (pScreenPriv->hwndScreen, &ps);

  /* Realize the palette, if we have one */
  if (pScreenPriv->pcmapInstalled != NULL)
    {
      pCmapPriv = winGetCmapPriv (pScreenPriv->pcmapInstalled);
      
      SelectPalette (hdcUpdate, pCmapPriv->hPalette, FALSE);
      RealizePalette (hdcUpdate);
    }

  /* Our BitBlt will be clipped to the invalidated region */
  BitBlt (hdcUpdate,
	  0, 0,
	  pScreenInfo->dwWidth, pScreenInfo->dwHeight,
	  pScreenPriv->hdcShadow,
	  0, 0,
	  SRCCOPY);

  /* EndPaint frees the DC */
  EndPaint (pScreenPriv->hwndScreen, &ps);

#ifdef XWIN_MULTIWINDOW
  /* Redraw all windows */
  if (pScreenInfo->fMultiWindow)
    EnumThreadWindows(g_dwCurrentThreadID, winRedrawAllProcShadowGDI, 
            (LPARAM)pScreenPriv->hwndScreen);
#endif

  return TRUE;
}