📄 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 NtGdiHfontCreate with an ENUMLOGFONT */
HFONT
NTAPI
NtGdiCreateFontIndirect(CONST LPLOGFONTW lf);
/* Should be using NtGdiHfontCreate with an ENUMLOGFONT */
HFONT
NTAPI
NtGdiCreateFont(
int Height,
int Width,
int Escapement,
int Orientation,
int Weight,
DWORD Italic,
DWORD Underline,
DWORD StrikeOut,
DWORD CharSet,
DWORD OutputPrecision,
DWORD ClipPrecision,
DWORD Quality,
DWORD PitchAndFamily,
LPCWSTR Face
);
/* 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 NtGdiGetRandomRgn and nothing else */
HRGN
NTAPI
NtGdiGetClipRgn(HDC hDC);
/* 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 NtGdiOpenDCW */
HDC
NTAPI
NtGdiCreateDC(
PUNICODE_STRING Driver,
PUNICODE_STRING Device,
PUNICODE_STRING Output,
CONST PDEVMODEW InitData
);
HDC
NTAPI
NtGdiCreateIC(
PUNICODE_STRING Driver,
PUNICODE_STRING Device,
PUNICODE_STRING Output,
CONST PDEVMODEW DevMode
);
/* 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
);
/* Use NtGdiArcInternal with GdiTypeArc */
BOOL
STDCALL
NtGdiArc(HDC hDC,
int LeftRect,
int TopRect,
int RightRect,
int BottomRect,
int XStartArc,
int YStartArc,
int XEndArc,
int YEndArc);
/* Use NtGdiArcInternal with GdiTypeArcTo */
BOOL
STDCALL
NtGdiArcTo(HDC hDC,
int LeftRect,
int TopRect,
int RightRect,
int BottomRect,
int XRadial1,
int YRadial1,
int XRadial2,
int YRadial2);
/* Use NtGdiArcInternal with GdiTypeChord */
BOOL
STDCALL
NtGdiChord(HDC hDC,
int LeftRect,
int TopRect,
int RightRect,
int BottomRect,
int XRadial1,
int YRadial1,
int XRadial2,
int YRadial2);
/* Metafiles are user mode */
HENHMETAFILE
STDCALL
NtGdiCloseEnhMetaFile (
HDC hDC
);
/* Metafiles are user mode */
HMETAFILE
STDCALL
NtGdiCloseMetaFile (
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
);
/* Metafiles are user mode */
HMETAFILE
STDCALL
NtGdiCopyMetaFile (
HMETAFILE Src,
LPCWSTR File
);
/* Use NtGdiCreateBitmap and expand the pbm-> */
HBITMAP
STDCALL
NtGdiCreateBitmapIndirect (
CONST BITMAP * BM
);
/* Use NtGdiCreateDIBitmapInternal */
HBITMAP
STDCALL
NtGdiCreateDIBitmap (
HDC hDC,
CONST BITMAPINFOHEADER * bmih,
DWORD Init,
CONST VOID * bInit,
CONST BITMAPINFO * bmi,
UINT Usage
);
/* Use NtGdiCreateCompatibleBitmap */
HBITMAP
STDCALL
NtGdiCreateDiscardableBitmap (
HDC hDC,
INT Width,
INT Height
);
/* Use NtGdiCreateEllipticRgn and expand the lprect-> */
HRGN
STDCALL
NtGdiCreateEllipticRgnIndirect(CONST PRECT rc);
/* Metafiles are user mode */
HDC
STDCALL
NtGdiCreateEnhMetaFile (
HDC hDCRef,
LPCWSTR File,
CONST LPRECT Rect,
LPCWSTR Description
);
/* Metafiles are user mode */
HDC
STDCALL
NtGdiCreateMetaFile (
LPCWSTR File
);
/* Use NtGdiCreatePaletteInternal with palNumEntries at the end. */
HPALETTE
STDCALL
NtGdiCreatePalette (
CONST PLOGPALETTE lgpl
);
/* Use NtGdiCreatePen with -> as parameters. */
HPEN STDCALL
NtGdiCreatePenIndirect(
CONST PLOGPEN LogBrush);
/* 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);
/* Use NtGdiCreateRectRgn with expanded paraemters. */
HRGN
STDCALL
NtGdiCreateRectRgnIndirect(CONST PRECT rc);
/* Use NtGdiTransformPoints with GdiDpToLp. */
BOOL
STDCALL
NtGdiDPtoLP (
HDC hDC,
LPPOINT Points,
int Count
);
/* Meta are user-mode. */
BOOL
STDCALL
NtGdiDeleteEnhMetaFile (
HENHMETAFILE emf
);
/* Meta are user-mode. */
BOOL
STDCALL
NtGdiDeleteMetaFile (
HMETAFILE mf
);
/* 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 );
/* Meta are user-mode. */
BOOL
STDCALL
NtGdiEnumMetaFile (
HDC hDC,
HMETAFILE mf,
MFENUMPROC MetaFunc,
LPARAM lParam
);
/* Should be done in user-mode. */
INT
STDCALL
NtGdiEscape(HDC hDC,
INT Escape,
INT InSize,
LPCSTR InData,
LPVOID OutData);
/* 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);
/* Use NtGdiExtFloodFill with FLOODFILLBORDER. */
BOOL
STDCALL
NtGdiFloodFill (
HDC hDC,
INT XStart,
INT YStart,
COLORREF Fill
);
/* Should be done in user-mode. */
BOOL
STDCALL
NtGdiGdiComment (
HDC hDC,
UINT Size,
CONST LPBYTE Data
);
/* Should be NtGdiFlush. */
BOOL STDCALL NtGdiGdiFlush (VOID);
/* Should be done in user-mode. */
DWORD STDCALL NtGdiGdiGetBatchLimit (VOID);
/* Should be done in user-mode. */
DWORD STDCALL NtGdiGdiSetBatchLimit (DWORD Limit);
/* Use NtGdiGetDCDword with GdiGetArcDirection. */
INT
STDCALL
NtGdiGetArcDirection ( HDC hDC );
/* Should be done in user-mode. */
BOOL
STDCALL
NtGdiGetAspectRatioFilterEx(HDC hDC,
LPSIZE AspectRatio);
/* Should be done in user-mode using shared GDI Objects. */
BOOL
STDCALL
NtGdiGetBitmapDimensionEx (
HBITMAP hBitmap,
LPSIZE Dimension
);
/* 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);
/* Should be done in user-mode. */
BOOL
STDCALL
NtGdiGetLogColorSpace(HCOLORSPACE hColorSpace,
LPLOGCOLORSPACEW Buffer,
DWORD Size);
/* Should be done in user-mode using shared GDI Objects. */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -