Source code of Windows XP (NT5)
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.

70 lines
2.1 KiB

  1. /******************************Module*Header*******************************\
  2. * Module Name: glscrnsv.hxx
  3. *
  4. * Defines and externals for screen saver common shell
  5. *
  6. * Copyright (c) 1996 Microsoft Corporation
  7. *
  8. \**************************************************************************/
  9. #ifndef __glscrnsv_hxx__
  10. #define __glscrnsv_hxx__
  11. #include "sscommon.h"
  12. #include "sswproc.hxx"
  13. #include "palette.hxx"
  14. // Screen saver mode types
  15. enum {
  16. SS_TYPE_FULLSCREEN = 0, // full-screen (/s)
  17. SS_TYPE_PREVIEW, // child preview (/p)
  18. SS_TYPE_NORMAL, // normal window (/w)
  19. SS_TYPE_CONFIG // config dialog (/c), ()
  20. };
  21. // Various flags
  22. #define SS_PALETTE_TAKEOVER (1 << 0)
  23. /**************************************************************************\
  24. * SCRNSAVE
  25. *
  26. \**************************************************************************/
  27. class SCRNSAVE {
  28. public:
  29. PSSW psswMain; // top level window
  30. PSSW psswGL; // the window running GL (temporary)
  31. BOOL bInForeground; // TRUE if ss is in foreground (has focus)
  32. int type; // type (e.g. /s, /p, /c)
  33. SS_PAL *pssPal; // global palette
  34. PSSC pssc; // client screen saver configuration request
  35. SS_GL_CONFIG GLc; // GL configuration (for old style)
  36. SSW_TABLE sswTable; // table of HWND/PSSW pairs
  37. HBRUSH hbrBg; // global bg brush
  38. int flags; // various flags
  39. SCRNSAVE( int type, LPARAM lParam );
  40. SCRNSAVE( int type );
  41. ~SCRNSAVE();
  42. BOOL SetupInitialWindows();
  43. PSSW CreateChildWindow( FLOATER_INFO *pFloater );
  44. PSSW CreateChildWindow( PSSW psswParent, FLOATER_INFO *pFloater );
  45. BOOL bInBackground() { return !bInForeground; }
  46. BOOL bResSwitch;
  47. #ifdef SS_DEBUG
  48. SS_TIMER timer;
  49. BOOL bDoTiming;
  50. #endif
  51. private:
  52. void Init(); // called by constructors
  53. LPARAM initParam; // param passed in at startup
  54. BOOL CreateInitialWindows();
  55. BOOL CreateMainWindow();
  56. void CloseWindows();
  57. };
  58. // one and only screen saver instance
  59. extern SCRNSAVE *gpss;
  60. #endif // __glscrnsv_hxx__