Commit graph

17 commits

Author SHA1 Message Date
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
Katayama Hirofumi MZ 6c74e69d12
[NTUSER][USER32] Populate dwExpWinVer (#7095)
This value is needed for
SetWindowPlacement and IMM.
JIRA issue: CORE-19675
JIRA issue: CORE-19268
- Add RtlGetExpWinVer function
  into win32ss/user/rtl/image.c.
- Add RtlGetExpWinVer prototype
  into win32ss/include/ntuser.h.
- Delete RtlGetExpWinVer
  definition in
  win32ss/user/user32/windows/window.c.
- Populate THREADINFO.dwExpWinVer
  and CLIENTINFO.dwExpWinVer
  by using RtlGetExpWinVer in
  InitThreadCallback function.
2024-07-09 04:22:14 +09:00
Carl J. Bialorucki ad73e17418
[USER32] Introduce user32_vista and stubplement GetDpiForWindow() (#6208)
Add user32_vista.dll to introduce new NT6+ User32 features without changing the existing User32.dll when compiled as NT5.x. Also implements a stub for GetDpiForWindow(). The GetDpiForWindow() function will be required to Wine-sync common controls to modern Wine versions.

Changes:
Expose GetDpiForWindow() function and USER_DEFAULT_SCREEN_DPI to appropriate versions in winuser.h
Introduce a basic user32_vista library that can be expanded as needed.
2024-06-04 10:19:32 -06:00
Justin Miller 2a2556c5d0
[WIN32SS] Introduce the NATIVE_REACTX define and disable some Dx calls (#6025)
The code itself isn't wrong but we're entirely missing the logic needed
to make it work. This leads to spontaneous crashes with video drivers and
various unity games.
2024-04-17 21:47:49 -07:00
Timo Kreuzer 8f9ef68ea7
[WIN32K][WIN32U] Fix system call ids (#5287)
- Delete the win32ksvc-ros.h file, which was not used
- Use a separate file for x64 (based on 2k3 x64 free)
- Delete w32ksvc.db. It's unused since ages.
2023-05-28 16:19:50 +03:00
Hervé Poussineau b6d7571ebb [CMAKE] Set KDBG define only where required (fastfat, win32k, ntoskrnl) 2022-09-10 23:16:27 +02:00
Hervé Poussineau 4e0f2fc01c [WIN32SS] Implement panning driver
This can be configured in registry with DefaultSettings.XPanning and
DefaultSettings.YPanning, which describe the real screen resolution.

DefaultSettings.XResolution and DefaultSettings.YResolution describe
the resolution of the virtual screen.
2022-05-14 21:29:12 +02:00
George Bișoc 878c2f4444
[WIN32K:NTUSER] Implement security infrastructure for NTUSER component
Implement a base security infrastructure with code that sets up a security descriptor for the service that we're going to connect through it. Such service is based upon a desktop and a window station.

=== DOCUMENTATION REMARKS ===
The authenticated user, represented by an access token that describes its security context, is the main holder and has ultimate power against the default created desktop and window station objects in USER. The authenticated user in question
is the actual logged in user, this is the case when the server is impersonating a client. Administrators on the other hand have some share of power against default desktop but their power in question is extremely limited against the default
window station as admins can only just enumerate the available and valid handle stations within a desktop.
2022-05-06 10:09:48 +02:00
Hervé Poussineau 9400063aae [WIN32SS] Enable multidisplay driver when required
For now, it is only a stub which returns an error.
2022-04-15 23:09:16 +02:00
Hervé Poussineau a0cfdcd409 [WIN32SS] Introduce the MDEVOBJ structure
This will be used (later) to store the list of all enabled display devices.

Add a global variable gpmdev (should really be stored in DISPLAYINFO structure)
Replace global variable gppdevPrimary by pmdev->ppdevGlobal.
2022-04-15 23:09:16 +02:00
Thomas Faber 49bb853b24
[GDI32_VISTA] Move D3DKMT functions out of gdi32. CORE-17433 2022-01-01 12:42:04 -05:00
Jérôme Gardou 12dfa8ce39 [WIN32K] Fix getting long value from float object
Most importantly, do not shift 32-bit integers by 32 or more.
2021-03-31 18:35:31 +02:00
Jérôme Gardou c8d07514c8 [CMAKE] Fix GCC -fstack-protector usage 2021-01-05 13:38:57 +01:00
Jérôme Gardou ed61512236 [CMAKE] Get rid of add_compile_flags_language macro
in favor of add_compile_options and the like with generator expressions
Also take this as an opportunity to remove the C++11 standard hack, GCC 8 now defaults to C++14
2020-10-20 21:44:54 +02:00
Jérôme Gardou 23373acbb9 [CMAKE] Use modules instead of shared libraries
There is no need to compile our DLLs as shared libraries since we are
managing symbols exports and imports through spec files.

On my system, this reduces the configure-time by a factor of two.
2019-04-06 17:43:38 +02:00
Katayama Hirofumi MZ b09487fb44
[WIN32SS] Add IntGoGhost function (stub) (#1081)
CORE-11944
2018-12-01 20:59:07 +09:00
Colin Finck c2c66aff7d Git conversion: Make reactos the root directory, move rosapps, rostests, wallpapers into modules, and delete rossubsys. 2017-10-03 07:45:34 +00:00
Renamed from reactos/win32ss/CMakeLists.txt (Browse further)