rewrite comments into one, unified style

This commit is contained in:
maksw committed 2026-06-15 10:17:48 +02:00
1 parent 6260de0085
commit 467a58c9c6
163 files changed
+3560 -2556

No files matched your search

+17 -5
View File
@@ -1,4 +1,5 @@
// user32.c - Win32 User Interface
// Win32 user32 compatibility stubs. This file provides windowing and message APIs that applications may probe.
#include <stdint.h>
#include <stddef.h>
#include <ntlite/syscall.h>
@@ -14,13 +15,14 @@ typedef struct tagPAINTSTRUCT {
} PAINTSTRUCT;
// Implements the user32 Debug Print A operation.
static void User32DebugPrintA(const char* s) {
if (!s) return;
SYS_PRINT_DEBUG_REQUEST req = { SysSvFromCstr(s) };
SysPrintDebug(&req);
}
// --- Painting Functions ---
// --- Painting Functions ---.
__declspec(dllexport) HDC BeginPaint(HWND hwnd, PAINTSTRUCT* lpPaint) {
(void)hwnd;
if (lpPaint) {
@@ -30,20 +32,24 @@ __declspec(dllexport) HDC BeginPaint(HWND hwnd, PAINTSTRUCT* lpPaint) {
return (HDC)1;
}
// Implements the end Paint operation.
__declspec(dllexport) BOOL EndPaint(HWND hwnd, const PAINTSTRUCT* lp) { (void)hwnd; (void)lp; return 1; }
// --- Message Loop Stubs ---
// --- Message Loop Stubs ---.
__declspec(dllexport) int GetMessage(void* m, HWND h, uint32_t f, uint32_t l) {
(void)m; (void)h; (void)f; (void)l; SysYield(); return 0;
}
// Returns message.
__declspec(dllexport) int PeekMessage(void* m, HWND h, uint32_t f, uint32_t l, uint32_t r) {
(void)m; (void)h; (void)f; (void)l; (void)r;
return 0;
}
// Dispatches message.
__declspec(dllexport) int DispatchMessage(const void* m) { (void)m; return 0; }
// Translates message.
__declspec(dllexport) int TranslateMessage(const void* m) { (void)m; return 0; }
// --- Dialogs & UI ---
// --- Dialogs & UI ---.
__declspec(dllexport) int MessageBoxA(HWND h, const char* txt, const char* cap, uint32_t type) {
(void)h; (void)cap; (void)type;
User32DebugPrintA("USER32: MessageBoxA: ");
@@ -52,23 +58,29 @@ __declspec(dllexport) int MessageBoxA(HWND h, const char* txt, const char* cap,
return 1; // IDOK
}
// --- Window Queries ---
// --- Window Queries ---.
__declspec(dllexport) HWND GetDesktopWindow(void) { return (HWND)0; }
// Returns active Window.
__declspec(dllexport) HWND GetActiveWindow(void) { return (HWND)0; }
// Returns top Window.
__declspec(dllexport) HWND GetTopWindow(HWND hwnd){ (void)hwnd; return (HWND)0; }
// Returns window.
__declspec(dllexport) HWND GetWindow(HWND hwnd, unsigned int cmd) {
(void)hwnd; (void)cmd; return (HWND)0;
}
// Returns window Long A.
__declspec(dllexport) long GetWindowLongA(HWND hwnd, int index) {
(void)hwnd; (void)index; return 0;
}
// Returns window Long Ptr A.
__declspec(dllexport) intptr_t GetWindowLongPtrA(HWND hwnd, int index) {
(void)hwnd; (void)index; return 0;
}
// Returns window Thread Process Id.
__declspec(dllexport) unsigned long GetWindowThreadProcessId(HWND hwnd, unsigned long* pid) {
(void)hwnd;
if (pid) *pid = 1;