reactos/win32ss/user/ntuser
George Bișoc 181b666fc4
[NTUSER] Stubplement the Win32 power manager
In order for the NT power manager to interact with the Win32 subsystem (thus the whole rest of the system), the Win32 kernel-mode subsystem provides a mechanism that communicates with the kernel power manager via power callouts (aka power requests as per Windows' PDB symbols).
Such mechanism enters in action as soon as Win32 callout routines are estabilished with the PsEstablishWin32Callouts() function.

The NT power manager, the power policy manager respectively, invokes a power callout to denote an exceptional phenomena as a result of power policies or capabilities changes, turning ON/OFF the display, a system time change has occurred, etc.
Such scenarios are described as power events of which the NT power manager sends a WIN32_POWEREVENT_PARAMETERS packet to Win32k via the estabilished "PowerEventCallout" pointer function callout.
For other callouts that inform the Win32 subsystem of impeding power state changes across the system or devices, these are sent as WIN32_POWERSTATE_PARAMETERS packets with its own separate callout.

The purpose of such mechanism is to give Win32k the opportunity to do power related tasks and alert every application of such power events in accordance with what it gets notified by the NT power manager.
Currently this patch stubplements this mechanism in ROS, it is only just the barebones for now. The development of the Win32 power manager will go in parallel with the kernel power manager development (expand, improve, fix the code of issues that whatever may arise).
So far only the PsW32SystemTime power event is implemented for the moment being. This work was decoupled from PR #5719 to avoid clobbering it too much.

=== TODO ===

- Implement power states management communication with the kernel power manager
- Implement the rest of the power events in IntHandlePowerEventWorker
- Implement power event handling in CSRSS (or WinSrv?) which handles any of the events that could not be handled by Win32k otherwise
- Estabilish the power state callout in PsEstablishWin32Callouts() (currently there is no a pointer function that gets assigned to such callout)

CORE-18969
2024-07-13 11:30:19 +02:00
..
misc [WIN32SS] Fix const-ness of registry helper functions (#6525) 2024-02-23 21:26:12 +09:00
accelerator.c [NTUSER] Use UserHMGetHandle macro (#6244) 2024-01-05 07:16:44 +07:00
accelerator.h Git conversion: Make reactos the root directory, move rosapps, rostests, wallpapers into modules, and delete rossubsys. 2017-10-03 07:45:34 +00:00
callback.c [NTUSER][USER32][IMM32] Initialize pKL->piiex by using ImmLoadLayout (#4645) 2022-09-05 08:34:00 +09:00
callback.h [NTUSER][USER32][IMM32] Initialize pKL->piiex by using ImmLoadLayout (#4645) 2022-09-05 08:34:00 +09:00
callproc.c Git conversion: Make reactos the root directory, move rosapps, rostests, wallpapers into modules, and delete rossubsys. 2017-10-03 07:45:34 +00:00
caret.c [NTUSER] Use UserHMGetHandle macro (#6244) 2024-01-05 07:16:44 +07:00
caret.h Git conversion: Make reactos the root directory, move rosapps, rostests, wallpapers into modules, and delete rossubsys. 2017-10-03 07:45:34 +00:00
class.c [NTUSER] Check class name existence on IntGetAtomFromStringOrAtom (#6184) 2024-01-10 08:01:37 +09:00
class.h [WIN32SS][USER32] Add Ghost codes (retrial of #1100) (#1112) 2018-12-11 12:30:59 +09:00
clipboard.c [NTUSER] Use UserHMGetHandle macro (#6244) 2024-01-05 07:16:44 +07:00
clipboard.h Git conversion: Make reactos the root directory, move rosapps, rostests, wallpapers into modules, and delete rossubsys. 2017-10-03 07:45:34 +00:00
console.c [FORMATTING] Remove trailing whitespace. Addendum to 34593d93. 2021-09-13 03:52:22 +02:00
csr.c [FORMATTING] Remove trailing whitespace. Addendum to 34593d93. 2021-09-13 03:52:22 +02:00
csr.h [FORMATTING] Remove trailing whitespace. Addendum to 34593d93. 2021-09-13 03:52:22 +02:00
cursoricon.c [NTUSER] UserSetCursorPos(): Use an early return 2024-04-20 13:57:35 -06:00
cursoricon.h Git conversion: Make reactos the root directory, move rosapps, rostests, wallpapers into modules, and delete rossubsys. 2017-10-03 07:45:34 +00:00
dce.h [REACTOS] Addendum to 5c7ce4475e - Fix MSVC 2015 build 2021-05-12 11:04:29 +02:00
dde.c Git conversion: Make reactos the root directory, move rosapps, rostests, wallpapers into modules, and delete rossubsys. 2017-10-03 07:45:34 +00:00
defwnd.c [UXTHEME][NTUSER] Check class style for CS_NOCLOSE instead of window style (#7130) 2024-07-10 19:49:09 +02:00
desktop.c [NTUSER] Use UserHMGetHandle macro (#6244) 2024-01-05 07:16:44 +07:00
desktop.h [WIN32K:NTUSER] Implement security infrastructure for NTUSER component 2022-05-06 10:09:48 +02:00
display.c [WIN32SS:USER] Do not write error message at end of enumeration in UserEnumDisplayDevices() 2022-06-08 07:58:12 +02:00
display.h [WIN32SS:NTUSER] Extract InitVideo() prototype and gbBaseVideo variable to header 2022-11-15 23:15:26 +01:00
draw.c [NTUSER][USER32] Classic Theme: disabled "checked" checkboxes should be grey (#4874) 2022-11-14 00:01:29 +01:00
event.c [NTUSER] Add UserHMSetHandle macro (#6164) 2023-12-24 23:42:15 +07:00
focus.c [NTUSER] Release modifier keys when deactivating message queue (#6754) 2024-04-26 07:12:02 +07:00
focus.h [NTUSER] Implement HSHELL_RUDEAPPACTIVATE notification (#4147) 2021-12-08 18:26:22 +09:00
ghost.c [WIN32SS:USER] Some minimal work and fixes concerning message queues timeouts. 2019-12-29 16:14:15 +01:00
ghost.h [NTUSER] Implement creating the system threads 2018-12-19 16:13:18 +02:00
guicheck.c [FORMATTING] Remove trailing whitespace. Addendum to 34593d93. 2021-09-13 03:52:22 +02:00
guicheck.h Git conversion: Make reactos the root directory, move rosapps, rostests, wallpapers into modules, and delete rossubsys. 2017-10-03 07:45:34 +00:00
hook.c [NTUSER] Use UserHMGetHandle macro (#6244) 2024-01-05 07:16:44 +07:00
hook.h [WIN32K] Fix 64 bit issues (#420) 2018-03-18 15:53:52 +01:00
hotkey.c [REACTOS] Fix typos in comments (#5591) 2023-08-22 16:20:29 +03:00
hotkey.h [WIN32SS:NTUSER] Implement "Window Snap" feature (#1226) 2019-01-15 14:36:41 +01:00
ime.c [IMM32][NTUSER] Reduce a little IMM spams (#7077) 2024-07-05 05:07:49 +09:00
input.c [REACTOS] Fix typos in comments (#5591) 2023-08-22 16:20:29 +03:00
input.h [SETUPLIB][NTUSER] Toggle input language/layout on Alt+Shift / Ctrl+Shift (#5839) 2023-10-31 22:37:49 +09:00
kbdlayout.c [REACTOS] Standardize <imm.h> and <immdev.h> (#6493) 2024-02-13 20:33:14 +09:00
keyboard.c [SETUPLIB][NTUSER] Toggle input language/layout on Alt+Shift / Ctrl+Shift (#5839) 2023-10-31 22:37:49 +09:00
layered.c Git conversion: Make reactos the root directory, move rosapps, rostests, wallpapers into modules, and delete rossubsys. 2017-10-03 07:45:34 +00:00
main.c [NTUSER][USER32] Populate dwExpWinVer (#7095) 2024-07-09 04:22:14 +09:00
menu.c [NTUSER] Fix popup menu positioning for Miranda IM (#6981) 2024-06-19 18:55:12 -05:00
menu.h Git conversion: Make reactos the root directory, move rosapps, rostests, wallpapers into modules, and delete rossubsys. 2017-10-03 07:45:34 +00:00
message.c [NTUSER] Use UserHMGetHandle macro (#6244) 2024-01-05 07:16:44 +07:00
metric.c [BOOTDATA][IMM32][NTUSER] Follow-up to #6961 (#6962) 2024-05-29 01:14:52 +09:00
misc.c [IMM32][NTUSER] Fix NtUserGetThreadState call of Imm32InquireIme 2024-05-28 23:17:22 +09:00
mmcopy.h Git conversion: Make reactos the root directory, move rosapps, rostests, wallpapers into modules, and delete rossubsys. 2017-10-03 07:45:34 +00:00
monitor.c Git conversion: Make reactos the root directory, move rosapps, rostests, wallpapers into modules, and delete rossubsys. 2017-10-03 07:45:34 +00:00
monitor.h Git conversion: Make reactos the root directory, move rosapps, rostests, wallpapers into modules, and delete rossubsys. 2017-10-03 07:45:34 +00:00
mouse.c [NTUSER] Support MK_SHIFT/MK_CONTROL of mouse messages (#2038) 2019-11-16 09:49:49 +09:00
msgqueue.c [NTUSER] Fix Skype and other programs installer windows not able to be moved with mouse by clicking on title bar (#6819) 2024-05-07 09:10:11 -05:00
msgqueue.h [NTUSER] Release modifier keys when deactivating message queue (#6754) 2024-04-26 07:12:02 +07:00
nonclient.c [NTUSER] Check class style for CS_NOCLOSE instead of window style (#7123) 2024-07-10 13:30:53 +03:00
ntstubs.c [WIN32K] Fix alignment checks in NtUserSetInformationThread 2023-11-10 19:42:13 +02:00
ntuser.c [NTGDI][NTUSER] Load DirectX graphics driver at system startup (#4551) 2023-06-11 13:44:56 +02:00
ntuser.h [NTUSER] Remove RETURN() macro (#6194) 2023-12-21 11:10:46 +07:00
object.c [NTUSER] Remove RETURN() macro (#6194) 2023-12-21 11:10:46 +07:00
object.h [NTUSER] Do assignment lock pti->spDefaultImc (#4456) 2022-04-18 08:23:18 +09:00
painting.c [NTUSER] Remove some extra repaints/redraws (#6827) 2024-05-04 07:35:53 -05:00
painting.h [NtGDI] Update Region code 2019-04-17 14:43:24 -05:00
power.c [NTUSER] Stubplement the Win32 power manager 2024-07-13 11:30:19 +02:00
power.h [NTUSER] Stubplement the Win32 power manager 2024-07-13 11:30:19 +02:00
prop.c [NTUSER] Fix stack memory disclosure in NtUserBuildPropList (#3023) 2020-08-08 14:05:22 +09:00
prop.h Git conversion: Make reactos the root directory, move rosapps, rostests, wallpapers into modules, and delete rossubsys. 2017-10-03 07:45:34 +00:00
scroll.h Git conversion: Make reactos the root directory, move rosapps, rostests, wallpapers into modules, and delete rossubsys. 2017-10-03 07:45:34 +00:00
scrollbar.c [NTUSER] Use UserHMGetHandle macro (#6244) 2024-01-05 07:16:44 +07:00
scrollex.c [NTUSER] Remove RETURN() macro (#6194) 2023-12-21 11:10:46 +07:00
security.c [WIN32K:NTUSER] Fix an unintialized user's token variable case 2023-06-11 18:14:02 +02:00
security.h [WIN32K:NTUSER] Assign a security descriptor when parsing the desktop object 2022-05-08 20:16:15 +02:00
session.c Git conversion: Make reactos the root directory, move rosapps, rostests, wallpapers into modules, and delete rossubsys. 2017-10-03 07:45:34 +00:00
shutdown.c [NTUSER] Use UserHMGetHandle macro (#6244) 2024-01-05 07:16:44 +07:00
shutdown.h Git conversion: Make reactos the root directory, move rosapps, rostests, wallpapers into modules, and delete rossubsys. 2017-10-03 07:45:34 +00:00
simplecall.c [NTUSER] Use UserHMGetHandle macro (#6244) 2024-01-05 07:16:44 +07:00
sysparams.c [SETUPLIB][NTUSER] Toggle input language/layout on Alt+Shift / Ctrl+Shift (#5839) 2023-10-31 22:37:49 +09:00
sysparams.h [WIN32K][DESK.CPL]: Add fit and fill background placement options (#28) 2017-10-13 21:44:02 +02:00
tags.h [WIN32SS] Introduce the MDEVOBJ structure 2022-04-15 23:09:16 +02:00
timer.c [NTUSER] Use UserHMGetHandle macro (#6244) 2024-01-05 07:16:44 +07:00
timer.h [REACTOS] Addendum to 5c7ce4475e - Fix MSVC 2015 build 2021-05-12 11:04:29 +02:00
useratom.c Git conversion: Make reactos the root directory, move rosapps, rostests, wallpapers into modules, and delete rossubsys. 2017-10-03 07:45:34 +00:00
useratom.h Git conversion: Make reactos the root directory, move rosapps, rostests, wallpapers into modules, and delete rossubsys. 2017-10-03 07:45:34 +00:00
userfuncs.h [BOOTDATA][NTUSER] Add UserIsIMMEnabled and use it (#4882) 2022-11-15 17:10:06 +09:00
usrheap.c [WIN32K:NTUSER] In debug builds, enable free & tail checking when creating heaps 2021-08-03 23:13:19 +02:00
usrheap.h [WIN32K:NTUSER] Assert global user lock is held exclusively when using global & desktop heaps 2021-08-03 23:13:19 +02:00
vis.c Git conversion: Make reactos the root directory, move rosapps, rostests, wallpapers into modules, and delete rossubsys. 2017-10-03 07:45:34 +00:00
vis.h Git conversion: Make reactos the root directory, move rosapps, rostests, wallpapers into modules, and delete rossubsys. 2017-10-03 07:45:34 +00:00
win32.h [NTGDI][NTUSER][INCLUDE] Add 'See also:' comments for structures (#4872) 2022-11-12 20:27:50 +09:00
win32kdebug.h [WIN32K] Add debug switch for the Win32 power manager 2024-07-13 11:30:07 +02:00
windc.c [NTUSER] Use UserHMGetHandle macro (#6244) 2024-01-05 07:16:44 +07:00
window.c [NTUSER] Fix co_IntSetParent when calling on itself (#6365) 2024-05-02 03:43:41 -05:00
window.h [NTUSER] Always reference a window when using it as parent/child etc. 2023-07-24 23:29:38 +02:00
winpos.c [NTUSER] Improve NtUserSetWindowPlacement (#7096) 2024-07-09 07:42:56 +09:00
winpos.h Git conversion: Make reactos the root directory, move rosapps, rostests, wallpapers into modules, and delete rossubsys. 2017-10-03 07:45:34 +00:00
winsta.c [NTUSER] KLF_UNLOAD flag of NtUserGetKeyboardLayoutList (#4592) 2022-08-03 12:45:10 +09:00
winsta.h [NTUSER] KLF_UNLOAD flag of NtUserGetKeyboardLayoutList (#4592) 2022-08-03 12:45:10 +09:00