add /IGNORE:4216 to HAL link step, add writing and directory listing to the FAT32 driver, add the concept of current working directory to the VFS, add writing to the VFS, more operations in the shell, rename KeCurrentThread to KeGetCurrentThread and add KeGetCurrentProcess, add STATUS_NO_MORE_FILES, change KeFault* to KePanic, add syscalls for writing to files, add a proper syscall to writing to the console, move Screen.Clear to after memory status debug print, add ObjectTypeDir to OBJECT_TYPE, extend kernel32 by file operations and upgrade user32 (and add gdi32) to match windows a bit more closely, change CreateProcessA to accept the first argument as NULL.
This commit is contained in:
1 parent
a5f0acfac8
commit
8c7564d5e1
33 files changed
+2343
-429
No files matched your search
@@ -0,0 +1,83 @@
|
||||
// gdi32.c - Win32 Graphics Device Interface stubs
|
||||
#include <stdint.h>
|
||||
#include <stddef.h>
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// Syscall stubs (from syscall.dll)
|
||||
// ---------------------------------------------------------------------------
|
||||
extern void SysScreenBlit(int x, int y, int w, int h, const uint32_t* pixels);
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// Win32 Base Types
|
||||
// ---------------------------------------------------------------------------
|
||||
typedef void* HDC;
|
||||
typedef unsigned long DWORD;
|
||||
typedef unsigned short WORD;
|
||||
typedef unsigned int UINT;
|
||||
typedef long LONG;
|
||||
typedef int BOOL;
|
||||
|
||||
#define TRUE 1
|
||||
#define FALSE 0
|
||||
|
||||
// StretchDIBits Constants
|
||||
#define BI_RGB 0L
|
||||
#define DIB_RGB_COLORS 0
|
||||
#define SRCCOPY (DWORD)0x00CC0020
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// GDI Structs
|
||||
// ---------------------------------------------------------------------------
|
||||
typedef struct tagBITMAPINFOHEADER {
|
||||
DWORD biSize;
|
||||
LONG biWidth;
|
||||
LONG biHeight;
|
||||
WORD biPlanes;
|
||||
WORD biBitCount;
|
||||
DWORD biCompression;
|
||||
DWORD biSizeImage;
|
||||
LONG biXPelsPerMeter;
|
||||
LONG biYPelsPerMeter;
|
||||
DWORD biClrUsed;
|
||||
DWORD biClrImportant;
|
||||
} BITMAPINFOHEADER;
|
||||
|
||||
typedef struct tagRGBQUAD {
|
||||
unsigned char rgbBlue;
|
||||
unsigned char rgbGreen;
|
||||
unsigned char rgbRed;
|
||||
unsigned char rgbReserved;
|
||||
} RGBQUAD;
|
||||
|
||||
typedef struct tagBITMAPINFO {
|
||||
BITMAPINFOHEADER bmiHeader;
|
||||
RGBQUAD bmiColors[1];
|
||||
} BITMAPINFO;
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// GDI Exports
|
||||
// ---------------------------------------------------------------------------
|
||||
__declspec(dllexport) int StretchDIBits(
|
||||
HDC hdc,
|
||||
int xDest, int yDest, int DestWidth, int DestHeight,
|
||||
int xSrc, int ySrc, int SrcWidth, int SrcHeight,
|
||||
const void *lpBits, const BITMAPINFO *lpbmi,
|
||||
UINT iUsage, DWORD rop)
|
||||
{
|
||||
(void)hdc; (void)xSrc; (void)ySrc; (void)SrcWidth; (void)SrcHeight;
|
||||
(void)lpbmi; (void)iUsage; (void)rop;
|
||||
|
||||
// Direct mapping to kernel screen blit
|
||||
SysScreenBlit(xDest, yDest, DestWidth, DestHeight, (const uint32_t*)lpBits);
|
||||
|
||||
// Return the number of scanlines copied
|
||||
return DestHeight;
|
||||
}
|
||||
|
||||
__declspec(dllexport) BOOL BitBlt(HDC hdcDest, int xDest, int yDest, int w, int h,
|
||||
HDC hdcSrc, int xSrc, int ySrc, DWORD rop) {
|
||||
(void)hdcDest; (void)xDest; (void)yDest; (void)w; (void)h;
|
||||
(void)hdcSrc; (void)xSrc; (void)ySrc; (void)rop;
|
||||
// Stubbed. Applications manipulating pixels directly will use StretchDIBits.
|
||||
return TRUE;
|
||||
}
|
||||
Reference in new issue
Block a user