Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

47 lines
1.6 KiB

  1. /******************************Module*Header*******************************\
  2. * Module Name: palette.hxx
  3. *
  4. * Copyright (c) 1996 Microsoft Corporation
  5. *
  6. \**************************************************************************/
  7. #ifndef __palette_hxx__
  8. #define __palette_hxx__
  9. typedef LONG (*PALETTEMANAGEPROC)(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam);
  10. /**************************************************************************\
  11. * SS_PAL(ETTE)
  12. *
  13. \**************************************************************************/
  14. class SS_PAL {
  15. public:
  16. HPALETTE hPal;
  17. BOOL bUseStatic;
  18. BOOL bTakeOver; // usually if in full screen mode
  19. //mf: !!! this should be per window !!!
  20. BOOL bFlush; // if palette needs to be flushed
  21. BOOL bSystemColorsInUse;
  22. UINT uiOldStaticUse; // original static mode at startup
  23. PIXELFORMATDESCRIPTOR pfd;
  24. PALETTEMANAGEPROC paletteManageProc;
  25. SS_PAL( HDC hdc, PIXELFORMATDESCRIPTOR *ppfd, BOOL bTakeOverPalette );
  26. ~SS_PAL();
  27. long Realize( HWND hwnd, HDC hdc, BOOL bForceBackground );
  28. void ReCreateRGBPalette();
  29. void SetDC( HDC hdcArg ) { hdc = hdcArg; }
  30. private:
  31. HWND hwnd; // cached here for convenience sometimes during processing
  32. HDC hdc; // "
  33. int nEntries; // number of entries in palette
  34. HPALETTE MakeRGBPalette();
  35. BOOL GrabStaticEntries();
  36. BOOL ReleaseStaticEntries();
  37. long Realize( BOOL bForceBackground );
  38. void Flush();
  39. };
  40. #endif // __palette_hxx__