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.

181 lines
7.7 KiB

  1. /*****************************************************************************\
  2. * *
  3. * scrnsave.h Windows 3.1 screensaver defines and definitions.
  4. * *
  5. * Version 1.0 *
  6. * *
  7. * NOTE: windows.h must be #included first *
  8. * *
  9. * Copyright (c) 1992, Microsoft Corp. All rights reserved. *
  10. * *
  11. \*****************************************************************************/
  12. #ifndef _INC_SCRNSAVE
  13. #define _INC_SCRNSAVE
  14. #ifndef RC_INVOKED
  15. #pragma pack(1) /* Assume byte packing throughout */
  16. #endif /* !RC_INVOKED */
  17. #ifdef __cplusplus
  18. extern "C" { /* Assume C declarations for C++ */
  19. #endif /* __cplusplus */
  20. /* Icon resource ID.
  21. *
  22. * This should be the first icon used and must have this resource number.
  23. * This is needed as the first icon in the file will be grabbed
  24. */
  25. #define ID_APP 100
  26. #define DLG_CHANGEPASSWORD 2000
  27. #define DLG_ENTERPASSWORD 2001
  28. #define DLG_INVALIDPASSWORD 2002
  29. #define DLG_SCRNSAVECONFIGURE 2003
  30. #define idsIsPassword 1000
  31. #define idsIniFile 1001
  32. #define idsScreenSaver 1002
  33. #define idsPassword 1003
  34. #define idsDifferentPW 1004
  35. #define idsChangePW 1005
  36. #define idsBadOldPW 1006
  37. #define idsAppName 1007
  38. #define idsNoHelpMemory 1008
  39. #define idsHelpFile 1009
  40. #define idsDefKeyword 1010
  41. /* This function is the Window Procedure for the screen saver. It is
  42. * up to the programmer to handle any of the messages that wish to be
  43. * interpretted. Any unused messages are then passed back to
  44. * DefScreenSaverProc if desired which will take default action on any
  45. * unprocessed message...
  46. */
  47. LRESULT WINAPI ScreenSaverProc(HWND, unsigned, UINT, LPARAM);
  48. /* This function performs default message processing. Currently handles
  49. * the following messages:
  50. *
  51. * WM_SYSCOMMAND: return FALSE if wParam is SC_SCREENSAVE or SC_CLOSE
  52. *
  53. * WM_DESTROY: PostQuitMessage(0)
  54. *
  55. * WM_SETCURSOR: By default, this will set the cursor to a null cursor,
  56. * thereby removing it from the screen.
  57. *
  58. * WM_LBUTTONDOWN:
  59. * WM_MBUTTONDOWN:
  60. * WM_RBUTTONDOWN:
  61. * WM_KEYDOWN:
  62. * WM_KEYUP:
  63. * WM_MOUSEMOVE: By default, these will cause the program to terminate.
  64. * Unless the password option is enabled. In that case
  65. * the DlgGetPassword() dialog box is brought up.
  66. *
  67. * WM_NCACTIVATE:
  68. * WM_ACTIVATEAPP:
  69. * WM_ACTIVATE: By default, if the wParam parameter is FALSE (signifying
  70. * that transfer is being taken away from the application),
  71. * then the program will terminate. Termination is
  72. * accomplished by generating a WM_CLOSE message. This way,
  73. * if the user sets something up in the WM_CREATE, a
  74. * WM_DESTROY will be generated and it can be destroyed
  75. * properly.
  76. * This message is ignored, however is the password option
  77. * is enabled.
  78. */
  79. LRESULT WINAPI DefScreenSaverProc(HWND, UINT, WPARAM, LPARAM);
  80. /* A function is also needed for configuring the screen saver. The function
  81. * should be exactly like it is below and must be exported such that the
  82. * program can use MAKEPROCINSTANCE on it and call up a dialog box. Further-
  83. * more, the template used for the dialog must be called
  84. * ScreenSaverConfigure to allow the main function to access it...
  85. */
  86. BOOL WINAPI ScreenSaverConfigureDialog(HWND, UINT, WPARAM, LPARAM);
  87. /* This function is called from the ScreenSaveConfigureDialog() to change
  88. * the Screen Saver's password. Note: passwords are GLOBAL to all
  89. * screen savers using this model. Whether or not the password is enabled
  90. * is LOCAL to a particular screen saver.
  91. */
  92. BOOL WINAPI DlgChangePassword(HWND, UINT, WPARAM, LPARAM);
  93. /* To allow the programmer the ability to register child control windows, this
  94. * function is called prior to the creation of the dialog box. Any
  95. * registering that is required should be done here, or return TRUE if none
  96. * is needed...
  97. */
  98. BOOL _cdecl RegisterDialogClasses(HINSTANCE);
  99. /* The following three functions are called by DefScreenSaverProc and must
  100. * be exported by all screensavers using this model.
  101. */
  102. BOOL WINAPI DlgGetPassword(HWND, UINT, WPARAM, LPARAM);
  103. BOOL WINAPI DlgInvalidPassword(HWND, UINT, WPARAM, LPARAM);
  104. DWORD WINAPI HelpMessageFilterHookFunction(int, WORD, LPMSG);
  105. //***************************************************************************** // ;Internal
  106. //*********************** R E B O O T A P I ***************************** // ;Internal
  107. //***************************************************************************** // ;Internal
  108. // ;Internal
  109. BOOL WINAPI DisableReboot( VOID ); // Disables Ctrl-Alt-Del // ;Internal
  110. BOOL WINAPI EnableReboot( VOID ); // Enables Ctrl-Alt-Del // ;Internal
  111. // ;Internal
  112. // ;Internal
  113. //*****************************************************************************
  114. //*********************** QUICK TIMER A P I *****************************
  115. //*****************************************************************************
  116. BOOL PASCAL SetQuickTimer(HWND hWnd, WORD wTimer, WORD wQuickTime);
  117. void PASCAL KillQuickTimer(void);
  118. //*****************************************************************************
  119. //*****************************************************************************
  120. extern int WINAPI GetSystemMetricsX(int);
  121. #define GetSystemMetrics GetSystemMetricsX
  122. //*****************************************************************************
  123. /*
  124. * There are only three other points that should be of notice:
  125. * 1) The screen saver must have a string declared as 'szAppName' contaning the
  126. * name of the screen saver, and it must be declared as a global.
  127. * 2) The screen saver EXE file should be renamed to a file with a SCR
  128. * extension so that the screen saver dialog form the control panel can
  129. * find it when is searches for screen savers.
  130. */
  131. #define WS_GT (WS_GROUP | WS_TABSTOP)
  132. #define MAXFILELEN 13
  133. #define TITLEBARNAMELEN 40
  134. #define BUFFLEN 255
  135. /* The following globals are defined in scrnsave.lib */
  136. extern HINSTANCE _cdecl hMainInstance;
  137. extern HWND _cdecl hMainWindow;
  138. extern HWND _cdecl hParentWindow;
  139. extern BOOL _cdecl fConfigure;
  140. extern BOOL _cdecl fPreview;
  141. extern BOOL _cdecl fInstall;
  142. extern char _cdecl szName[TITLEBARNAMELEN];
  143. extern char _cdecl szIsPassword[22];
  144. extern char _cdecl szIniFile[MAXFILELEN];
  145. extern char _cdecl szScreenSaver[22];
  146. extern char _cdecl szPassword[16];
  147. extern char _cdecl szDifferentPW[BUFFLEN];
  148. extern char _cdecl szChangePW[30];
  149. extern char _cdecl szBadOldPW[BUFFLEN];
  150. extern char _cdecl szHelpFile[MAXFILELEN];
  151. extern char _cdecl szNoHelpMemory[BUFFLEN];
  152. extern HOOKPROC _cdecl fpMessageFilter;
  153. #ifdef __cplusplus
  154. }
  155. #endif /* __cplusplus */
  156. #ifndef RC_INVOKED
  157. #pragma pack()
  158. #endif /* !RC_INVOKED */
  159. #endif /* !_INC_SCRNSAVE */