📄 ntgdibad.h
字号:
#ifndef WIN32K_NTGDI_BAD_INCLUDED
#define WIN32K_NTGDI_BAD_INCLUDED
/*
*
* If you want to help, please read this:
*
* This file contains NtGdi APIs which are specific to ROS, including
* a short comment describing the solution on how to use the actual NtGdi
* call documented in ntgdi.h. Here are the main cases and information on
* how to remove them from this header.
*
* - Simple rename. This deals with an API simply having a different name,
* with absolutely no other changes needed.
* - Rename and new parameters. This deals with a case similar to the one
* above, except that new parameters have now
* been added. This is also usually extremly
* simple to fix. Either pass the right params
* or pass null/0 values that you ignore.
* - Rename and new structure. This is similar to the above, except that the
* information is now passed in a differently
* named and organized structure. Ask Alex for
* the structure you need and he will add it to
* ntgdityp.h
* - Rename and different semantics. Similar to the previous examples, except
* that parameters have usually been removed
* or need to be converted in user-mode in
* one form of another.
* - Does not exist: user-mode. This means that the API can be fully done in
* user mode. In 80% of cases, our API was already
* returning NOT_IMPLEMENTED in kernel-mode, so
* the work to be done is minimal. A good example
* are the ICM and Metafile APIs, which can simply
* be removed and added into gdi32.
* - Does not exist: GDI Shared Objects. This is by far the hardest case. This
* class cannot be fixed until ReactOS
* has a working Shared GDI Object table
* and a DC_ATTR structure in which the
* attributes, selection and deletion of
* objects can be quickly done from user-
* mode without requiring a kernel mode
* call.
*/
/* Should be using ENUMFONTDATAW */
typedef struct tagFONTFAMILYINFO
{
ENUMLOGFONTEXW EnumLogFontEx;
NEWTEXTMETRICEXW NewTextMetricEx;
DWORD FontType;
} FONTFAMILYINFO, *PFONTFAMILYINFO;
/* Should be using NtGdiEnumFontChunk */
INT
NTAPI
NtGdiGetFontFamilyInfo(
HDC Dc,
LPLOGFONTW LogFont,
PFONTFAMILYINFO Info,
DWORD Size
);
/* Should be using NtGdiEnumFontChunk */
BOOL
NTAPI
NtGdiTranslateCharsetInfo(
PDWORD Src,
LPCHARSETINFO CSI,
DWORD Flags
);
/* The gdi32 call does all the work in user-mode, save for NtGdiMakeFontDir */
BOOL
NTAPI
NtGdiCreateScalableFontResource(
DWORD Hidden,
LPCWSTR FontRes,
LPCWSTR FontFile,
LPCWSTR CurrentPath
);
/* The gdi32 call Should Use NtGdiGetTextExtent */
BOOL
NTAPI
NtGdiGetTextExtentPoint32(
HDC hDC,
LPCWSTR String,
int Count,
LPSIZE
);
BOOL
STDCALL
NtGdiGetCharWidth32(
HDC hDC,
UINT FirstChar,
UINT LastChar,
LPINT Buffer
);
/* Use NtGdiAddFontResourceW */
int
STDCALL
NtGdiAddFontResource(PUNICODE_STRING Filename,
DWORD fl);
/* Use NtGdiDoPalette with GdiPalAnimate */
BOOL
STDCALL
NtGdiAnimatePalette (
HPALETTE hpal,
UINT StartIndex,
UINT Entries,
CONST PPALETTEENTRY ppe
);
/* Metafiles are user mode */
HENHMETAFILE
STDCALL
NtGdiCloseEnhMetaFile (
HDC hDC
);
/* Does not exist */
BOOL
STDCALL
NtGdiColorMatchToTarget(HDC hDC,
HDC hDCTarget,
DWORD Action);
/* Metafiles are user mode */
HENHMETAFILE
STDCALL
NtGdiCopyEnhMetaFile (
HENHMETAFILE Src,
LPCWSTR File
);
/* Use NtGdiCreateDIBitmapInternal */
HBITMAP
STDCALL
NtGdiCreateDIBitmap (
HDC hDC,
CONST BITMAPINFOHEADER * bmih,
DWORD Init,
CONST VOID * bInit,
CONST BITMAPINFO * bmi,
UINT Usage
);
/* Metafiles are user mode */
HDC
STDCALL
NtGdiCreateEnhMetaFile (
HDC hDCRef,
LPCWSTR File,
CONST LPRECT Rect,
LPCWSTR Description
);
/* Use NtGdiCreatePaletteInternal with palNumEntries at the end. */
HPALETTE
STDCALL
NtGdiCreatePalette (
CONST PLOGPALETTE lgpl
);
/* Use NtGdiPolyPolyDraw with PolyPolyRgn. */
HRGN
STDCALL
NtGdiCreatePolygonRgn(CONST PPOINT pt,
INT Count,
INT PolyFillMode);
/* Use NtGdiPolyPolyDraw with PolyPolyRgn. */
HRGN
STDCALL
NtGdiCreatePolyPolygonRgn(CONST PPOINT pt,
CONST PINT PolyCounts,
INT Count,
INT PolyFillMode);
/* Meta are user-mode. */
BOOL
STDCALL
NtGdiDeleteEnhMetaFile (
HENHMETAFILE emf
);
/* Should be done in user-mode. */
BOOL STDCALL NtGdiDeleteObject(HGDIOBJ hObject);
/* Meta are user-mode. */
BOOL
STDCALL
NtGdiEnumEnhMetaFile (
HDC hDC,
HENHMETAFILE emf,
ENHMFENUMPROC EnhMetaFunc,
LPVOID Data,
CONST LPRECT Rect
);
/* Should be done in user-mode. */
int
STDCALL
NtGdiEnumFonts(HDC hDC,
LPCWSTR FaceName,
FONTENUMPROCW FontFunc,
LPARAM lParam);
/* Should be done in user-mode. */
INT
STDCALL
NtGdiEnumICMProfiles(HDC hDC,
LPWSTR lpstrBuffer,
UINT cch );
/* Use NtGdiExtTextOutW with 0, 0 at the end. */
BOOL
STDCALL
NtGdiExtTextOut(HDC hdc,
int X,
int Y,
UINT fuOptions,
CONST RECT *lprc,
LPCWSTR lpString,
UINT cbCount,
CONST INT *lpDx);
/* Should be done in user-mode. */
BOOL
STDCALL
NtGdiGdiComment (
HDC hDC,
UINT Size,
CONST LPBYTE Data
);
/* Should be done in user-mode. */
BOOL
STDCALL
NtGdiGetAspectRatioFilterEx(HDC hDC,
LPSIZE AspectRatio);
/* Should be done in user-mode using shared GDI Objects. */
COLORREF STDCALL NtGdiGetBkColor(HDC hDC);
/* Should be done in user-mode using shared GDI Objects. */
INT STDCALL NtGdiGetBkMode(HDC hDC);
/* Should be done in user-mode using shared GDI Objects. */
BOOL STDCALL NtGdiGetBrushOrgEx(HDC hDC, LPPOINT brushOrg);
/* Use NtGdiGetCharABCWidthsW */
BOOL
STDCALL
NtGdiGetCharABCWidths(HDC hDC,
UINT FirstChar,
UINT LastChar,
LPABC abc);
/* Should be done in user mode. */
BOOL
STDCALL
NtGdiGetCharABCWidthsFloat(HDC hDC,
UINT FirstChar,
UINT LastChar,
LPABCFLOAT abcF);
/* Should be done in user mode. */
DWORD
STDCALL
NtGdiGetCharacterPlacement(HDC hDC,
LPCWSTR String,
int Count,
int MaxExtent,
LPGCP_RESULTSW Results,
DWORD Flags);
/* Should be done in user mode. */
BOOL
STDCALL
NtGdiGetCharWidthFloat(HDC hDC,
UINT FirstChar,
UINT LastChar,
PFLOAT Buffer);
/* Use NtGdiGetAppClipBox. */
int
STDCALL
NtGdiGetClipBox (
HDC hDC,
LPRECT rc
);
/* Use NtGdiGetColorSpaceforBitmap. */
HCOLORSPACE
STDCALL
NtGdiGetColorSpace(HDC hDC);
/* Should be done in user-mode and/or NtGdiGetDCObject. */
HGDIOBJ STDCALL NtGdiGetCurrentObject(HDC hDC, UINT ObjectType);
/* Should be done in user mode. */
BOOL STDCALL NtGdiGetCurrentPositionEx(HDC hDC, LPPOINT currentPosition);
/* Use NtGdiGetDCPoint with GdiGetDCOrg. */
BOOL STDCALL NtGdiGetDCOrgEx(HDC hDC, LPPOINT Point);
/* Use NtGdiDoPalette with GdiPalGetColorTable. */
UINT
STDCALL
NtGdiGetDIBColorTable (
HDC hDC,
UINT StartIndex,
UINT Entries,
RGBQUAD * Colors
);
/* Use NtGdiGetDIBitsInternal. */
INT
STDCALL
NtGdiGetDIBits (
HDC hDC,
HBITMAP hBitmap,
UINT StartScan,
UINT ScanLines,
LPVOID Bits,
LPBITMAPINFO bi,
UINT Usage
);
/* Meta are user-mode. */
HENHMETAFILE
STDCALL
NtGdiGetEnhMetaFile (
LPCWSTR MetaFile
);
/* Meta are user-mode. */
UINT
STDCALL
NtGdiGetEnhMetaFileBits (
HENHMETAFILE hemf,
UINT BufSize,
LPBYTE Buffer
);
/* Meta are user-mode. */
UINT
STDCALL
NtGdiGetEnhMetaFileDescription (
HENHMETAFILE hemf,
UINT BufSize,
LPWSTR Description
);
/* Meta are user-mode. */
UINT
STDCALL
NtGdiGetEnhMetaFileHeader (
HENHMETAFILE hemf,
UINT BufSize,
LPENHMETAHEADER emh
);
/* Meta are user-mode. */
UINT
STDCALL
NtGdiGetEnhMetaFilePaletteEntries (
HENHMETAFILE hemf,
UINT Entries,
LPPALETTEENTRY pe
);
/* Meta are user-mode. */
UINT
STDCALL
NtGdiGetEnhMetaFilePixelFormat(HENHMETAFILE hEMF,
DWORD BufSize,
CONST PPIXELFORMATDESCRIPTOR pfd);
/* Should be done in user-mode. */
DWORD
STDCALL
NtGdiGetFontLanguageInfo(HDC hDC);
/* Should be done in user-mode. */
int
STDCALL
NtGdiGetGraphicsMode ( HDC hDC );
/* Should be done in user-mode. */
BOOL
STDCALL
NtGdiGetICMProfile(HDC hDC,
LPDWORD NameSize,
LPWSTR Filename);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -