#define UNIMPLEMENTED DbgPrint("GDI32: %s is unimplemented, please try again later.\n", __FUNCTION__);
-/*
- * @unimplemented
- */
-int
-STDCALL
-StretchDIBits(HDC hdc,
- int XDest,
- int YDest,
- int nDestWidth,
- int nDestHeight,
- int XSrc,
- int YSrc,
- int nSrcWidth,
- int nSrcHeight,
- CONST VOID *lpBits,
- CONST BITMAPINFO *lpBitsInfo,
- UINT iUsage,
- DWORD dwRop)
-
-{
- /* FIXME share memory */
- return NtGdiStretchDIBits(hdc, XDest, YDest, nDestWidth, nDestHeight, XSrc, YSrc,
- nSrcWidth, nSrcHeight, lpBits, lpBitsInfo, iUsage, dwRop);
-}
-
-/*
- * @unimplemented
- */
-int
-STDCALL
-SetDIBits(HDC hdc,
- HBITMAP hbmp,
- UINT uStartScan,
- UINT cScanLines,
- CONST VOID *lpvBits,
- CONST BITMAPINFO *lpbmi,
- UINT fuColorUse)
-{
- /* FIXME share memory */
- return NtGdiSetDIBits(hdc, hbmp, uStartScan, cScanLines, lpvBits, lpbmi, fuColorUse);
-}
-
-/*
- * @unimplemented
- */
-int
-STDCALL
-SetGraphicsMode(HDC hdc,
- int iMode)
-{
- /* FIXME share memory */
- return NtGdiSetGraphicsMode(hdc, iMode);
-}
-
-/*
- * @unimplemented
- */
-int
-STDCALL
-SetPolyFillMode(HDC hdc,
- int iPolyFillMode)
-{
- /* FIXME share memory */
- return NtGdiSetPolyFillMode(hdc, iPolyFillMode);
-}
-
-/*
- * @unimplemented
- */
-int
-STDCALL
-SetStretchBltMode(HDC hdc, int iStretchMode)
-{
- /* FIXME share memory */
- return NtGdiSetStretchBltMode(hdc, iStretchMode);
-}
-
-/*
- * @unimplemented
- */
-BOOL
-STDCALL
-SetRectRgn(HRGN hrgn,
- int nLeftRect,
- int nTopRect,
- int nRightRect,
- int nBottomRect)
-{
- /* FIXME metadc stuff */
- return NtGdiSetRectRgn(hrgn, nLeftRect, nTopRect, nRightRect, nBottomRect);
-}
-
-/*
- * @unimplemented
- */
-UINT
-STDCALL
-SetTextAlign(HDC hdc,
- UINT fMode)
-{
- /* FIXME share memory */
- return NtGdiSetTextAlign(hdc, fMode);
-}
-
-/*
- * @unimplemented
- */
-BOOL
-STDCALL
-SetViewportExtEx(HDC hdc,
- int nXExtent,
- int nYExtent,
- LPSIZE lpSize)
-{
- /* FIXME share memory */
- return NtGdiSetViewportExtEx(hdc, nXExtent, nYExtent, lpSize);
-}
-
-/*
- * @unimplemented
- */
-BOOL
-STDCALL
-SetWindowOrgEx(HDC hdc,
- int X,
- int Y,
- LPPOINT lpPoint)
-{
- /* FIXME share memory */
- return NtGdiSetWindowOrgEx(hdc,X,Y,lpPoint);
-}
-
/*
* @unimplemented
*/
BOOL
-STDCALL
-SetWindowExtEx(HDC hdc,
- int nXExtent,
- int nYExtent,
- LPSIZE lpSize)
-{
- /* FIXME share memory */
- return NtGdiSetWindowExtEx(hdc, nXExtent, nYExtent, lpSize);
-}
-
-/*
- * @unimplemented
- */
-BOOL
-STDCALL
-SetViewportOrgEx(HDC hdc,
- int X,
- int Y,
- LPPOINT lpPoint)
-{
- /* FIXME share memory */
- return NtGdiSetViewportOrgEx(hdc,X,Y,lpPoint);
-}
-
-/*
- * @unimplemented
- */
-BOOL
-STDCALL
+WINAPI
PtInRegion(IN HRGN hrgn,
int x,
int y)
* @unimplemented
*/
BOOL
-STDCALL
+WINAPI
RectInRegion(HRGN hrgn,
LPCRECT prcl)
{
* @unimplemented
*/
BOOL
-STDCALL
+WINAPI
RestoreDC(IN HDC hdc,
IN INT iLevel)
{
* @unimplemented
*/
INT
-STDCALL
+WINAPI
SaveDC(IN HDC hdc)
{
/* FIXME Sharememory */
* @unimplemented
*/
BOOL
-STDCALL
+WINAPI
CancelDC(HDC hdc)
{
UNIMPLEMENTED;
* @unimplemented
*/
int
-STDCALL
+WINAPI
DrawEscape(HDC hdc,
int a1,
int a2,
* @unimplemented
*/
int
-STDCALL
+WINAPI
EnumObjects(HDC hdc,
int a1,
GOBJENUMPROC a2,
return 0;
}
-/*
- * @unimplemented
- */
-int
-STDCALL
-Escape(HDC hdc, INT escape, INT in_count, LPCSTR in_data, LPVOID out_data)
-{
- UNIMPLEMENTED;
- SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
- return 0;
-}
-
-/*
- * @unimplemented
- */
-HRGN
-STDCALL
-ExtCreateRegion(
- CONST XFORM * a0,
- DWORD a1,
- CONST RGNDATA * a2
- )
-{
- UNIMPLEMENTED;
- SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
- return 0;
-}
/*
* @implemented
*/
UINT
-STDCALL
+WINAPI
GetBoundsRect(
HDC hdc,
LPRECT lprcBounds,
}
-/*
- * @implemented
- */
-int
-STDCALL
-GetMetaRgn(HDC hdc,
- HRGN hrgn)
-{
- return NtGdiGetRandomRgn(hdc,hrgn,2);
-}
-
-
/*
* @unimplemented
*/
UINT
-STDCALL
+WINAPI
GetMetaFileBitsEx(
HMETAFILE a0,
UINT a1,
return 0;
}
-
-
-/*
- * @unimplemented
- */
-DWORD
-STDCALL
-GetFontLanguageInfo(
- HDC hDc
- )
-{
- UNIMPLEMENTED;
- SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
- return 0;
-}
-
/*
* @unimplemented
*/
BOOL
-STDCALL
+WINAPI
PlayMetaFile(
HDC a0,
HMETAFILE a1
return FALSE;
}
-/*
- * @unimplemented
- */
-BOOL
-STDCALL
-ResizePalette(
- HPALETTE a0,
- UINT a1
- )
-{
- UNIMPLEMENTED;
- SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
- return FALSE;
-}
-
-/*
- * @unimplemented
- */
-int
-STDCALL
-SetMetaRgn(
- HDC hdc
- )
-{
- UNIMPLEMENTED;
- SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
- return 0;
-}
-
/*
* @implemented
*/
UINT
-STDCALL
+WINAPI
SetBoundsRect(HDC hdc,
CONST RECT *prc,
UINT flags)
{
- /* FIXME add check for vaildate the flags */
+ /* FIXME add check for validate the flags */
return NtGdiSetBoundsRect(hdc, (LPRECT)prc, flags);
}
-
-/*
- * @unimplemented
- */
-DWORD
-STDCALL
-SetMapperFlags(
- HDC a0,
- DWORD a1
- )
-{
- UNIMPLEMENTED;
- SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
- return 0;
-}
-
/*
* @unimplemented
*/
HMETAFILE
-STDCALL
+WINAPI
SetMetaFileBitsEx(
UINT a0,
CONST BYTE *a1
* @unimplemented
*/
BOOL
-STDCALL
-SetTextJustification(
- HDC a0,
- int a1,
- int a2
- )
-{
- UNIMPLEMENTED;
- SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
- return FALSE;
-}
-
-/*
- * @unimplemented
- */
-BOOL
-STDCALL
-UpdateColors(
- HDC hdc
- )
-{
- UNIMPLEMENTED;
- SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
- return FALSE;
-}
-
-
-/*
- * @unimplemented
- */
-BOOL
-STDCALL
+WINAPI
PlayMetaFileRecord(
HDC a0,
LPHANDLETABLE a1,
* @unimplemented
*/
BOOL
-STDCALL
+WINAPI
EnumMetaFile(
HDC a0,
HMETAFILE a1,
* @unimplemented
*/
BOOL
-STDCALL
+WINAPI
DeleteEnhMetaFile(
HENHMETAFILE a0
)
* @unimplemented
*/
BOOL
-STDCALL
+WINAPI
EnumEnhMetaFile(
HDC a0,
HENHMETAFILE a1,
* @unimplemented
*/
UINT
-STDCALL
+WINAPI
GetEnhMetaFileBits(
HENHMETAFILE a0,
UINT a1,
* @unimplemented
*/
UINT
-STDCALL
+WINAPI
GetEnhMetaFileHeader(
HENHMETAFILE a0,
UINT a1,
* @unimplemented
*/
UINT
-STDCALL
+WINAPI
GetEnhMetaFilePaletteEntries(
HENHMETAFILE a0,
UINT a1,
* @unimplemented
*/
UINT
-STDCALL
+WINAPI
GetWinMetaFileBits(
HENHMETAFILE a0,
UINT a1,
* @unimplemented
*/
BOOL
-STDCALL
+WINAPI
PlayEnhMetaFile(
HDC a0,
HENHMETAFILE a1,
* @unimplemented
*/
BOOL
-STDCALL
+WINAPI
PlayEnhMetaFileRecord(
HDC a0,
LPHANDLETABLE a1,
* @unimplemented
*/
HENHMETAFILE
-STDCALL
+WINAPI
SetEnhMetaFileBits(
UINT a0,
CONST BYTE *a1
* @unimplemented
*/
HENHMETAFILE
-STDCALL
+WINAPI
SetWinMetaFileBits(
UINT a0,
CONST BYTE *a1,
* @unimplemented
*/
BOOL
-STDCALL
+WINAPI
GdiComment(
HDC hDC,
UINT bytes,
* @unimplemented
*/
BOOL
-STDCALL
-AngleArc(
- HDC hdc,
- int a1,
- int a2,
- DWORD a3,
- FLOAT a4,
- FLOAT a5
- )
-{
- UNIMPLEMENTED;
- SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
- return FALSE;
-}
-
-
-/*
- * @unimplemented
- */
-BOOL
-STDCALL
+WINAPI
SetColorAdjustment(
HDC hdc,
CONST COLORADJUSTMENT *a1
* @unimplemented
*/
int
-STDCALL
+WINAPI
EndDoc(
HDC hdc
)
* @unimplemented
*/
int
-STDCALL
+WINAPI
StartPage(
HDC hdc
)
* @unimplemented
*/
int
-STDCALL
+WINAPI
EndPage(
HDC hdc
)
* @unimplemented
*/
int
-STDCALL
+WINAPI
AbortDoc(
HDC hdc
)
* @unimplemented
*/
int
-STDCALL
+WINAPI
SetAbortProc(
- HDC hdc,
- ABORTPROC a1
- )
+ HDC hdc,
+ ABORTPROC lpAbortProc)
{
UNIMPLEMENTED;
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return 0;
}
-
-/*
- * @unimplemented
- */
-BOOL
-STDCALL
-ScaleViewportExtEx(
- HDC a0,
- int a1,
- int a2,
- int a3,
- int a4,
- LPSIZE a5
- )
-{
- UNIMPLEMENTED;
- SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
- return FALSE;
-}
-
-
-/*
- * @unimplemented
- */
-BOOL
-STDCALL
-ScaleWindowExtEx(
- HDC a0,
- int a1,
- int a2,
- int a3,
- int a4,
- LPSIZE a5
- )
-{
- UNIMPLEMENTED;
- SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
- return FALSE;
-}
-
-
/*
* @implemented
*/
BOOL
-STDCALL
+WINAPI
UnrealizeObject(HGDIOBJ hgdiobj)
{
BOOL retValue = TRUE;
+/*
+ Win 2k Graphics API, Black Book. by coriolis.com
+ Page 62, Note that Steps 3, 5, and 6 are not required for Windows NT(tm)
+ and Windows 2000(tm).
+ Step 5. UnrealizeObject(hTrackBrush);
+ */
+/*
+ msdn.microsoft.com,
+ "Windows 2000/XP: If hgdiobj is a brush, UnrealizeObject does nothing,
+ and the function returns TRUE. Use SetBrushOrgEx to set the origin of
+ a brush."
+ */
if (GDI_HANDLE_GET_TYPE(hgdiobj) != GDI_OBJECT_TYPE_BRUSH)
{
retValue = NtGdiUnrealizeObject(hgdiobj);
* @implemented
*/
BOOL
-STDCALL
+WINAPI
GdiFlush()
{
NtGdiFlush();
* @unimplemented
*/
int
-STDCALL
+WINAPI
SetICMMode(
HDC a0,
int a1
* @unimplemented
*/
BOOL
-STDCALL
+WINAPI
CheckColorsInGamut(
HDC a0,
LPVOID a1,
}
-/*
- * @unimplemented
- */
-HCOLORSPACE
-STDCALL
-GetColorSpace(HDC hDc)
-{
- UNIMPLEMENTED;
- SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
- return 0;
-}
-
-
-/*
- * @unimplemented
- */
-HCOLORSPACE
-STDCALL
-SetColorSpace(
- HDC a0,
- HCOLORSPACE a1
- )
-{
- UNIMPLEMENTED;
- SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
- return FALSE;
-}
-
/*
* @implemented
*/
BOOL
-STDCALL
+WINAPI
GetDeviceGammaRamp( HDC hdc,
LPVOID lpGammaRamp)
{
* @implemented
*/
BOOL
-STDCALL
+WINAPI
SetDeviceGammaRamp(HDC hdc,
LPVOID lpGammaRamp)
{
* @unimplemented
*/
BOOL
-STDCALL
+WINAPI
ColorMatchToTarget(
HDC a0,
HDC a1,
* @unimplemented
*/
BOOL
-STDCALL
+WINAPI
wglCopyContext(
HGLRC a0,
HGLRC a1,
* @unimplemented
*/
HGLRC
-STDCALL
+WINAPI
wglCreateContext(
HDC hDc
)
* @unimplemented
*/
HGLRC
-STDCALL
+WINAPI
wglCreateLayerContext(
HDC hDc,
int a1
* @unimplemented
*/
BOOL
-STDCALL
+WINAPI
wglDeleteContext(
HGLRC a
)
* @unimplemented
*/
HGLRC
-STDCALL
+WINAPI
wglGetCurrentContext(VOID)
{
UNIMPLEMENTED;
* @unimplemented
*/
HDC
-STDCALL
+WINAPI
wglGetCurrentDC(VOID)
{
UNIMPLEMENTED;
* @unimplemented
*/
PROC
-STDCALL
+WINAPI
wglGetProcAddress(
LPCSTR a0
)
* @unimplemented
*/
BOOL
-STDCALL
+WINAPI
wglMakeCurrent(
HDC a0,
HGLRC a1
* @unimplemented
*/
BOOL
-STDCALL
+WINAPI
wglShareLists(
HGLRC a0,
HGLRC a1
* @unimplemented
*/
BOOL
-STDCALL
+WINAPI
wglDescribeLayerPlane(
HDC a0,
int a1,
* @unimplemented
*/
int
-STDCALL
+WINAPI
wglSetLayerPaletteEntries(
HDC a0,
int a1,
* @unimplemented
*/
int
-STDCALL
+WINAPI
wglGetLayerPaletteEntries(
HDC a0,
int a1,
* @unimplemented
*/
BOOL
-STDCALL
+WINAPI
wglRealizeLayerPalette(
HDC a0,
int a1,
* @unimplemented
*/
BOOL
-STDCALL
+WINAPI
wglSwapLayerBuffers(
HDC a0,
UINT a1
* @unimplemented
*/
DWORD
-STDCALL
+WINAPI
IsValidEnhMetaRecord(
DWORD a0,
DWORD a1
* @unimplemented
*/
DWORD
-STDCALL
+WINAPI
IsValidEnhMetaRecordOffExt(
DWORD a0,
DWORD a1,
* @unimplemented
*/
DWORD
-STDCALL
+WINAPI
GetGlyphOutlineWow(
DWORD a0,
DWORD a1,
* @unimplemented
*/
DWORD
-STDCALL
+WINAPI
gdiPlaySpoolStream(
DWORD a0,
DWORD a1,
}
/*
- * @unimplemented
+ * @implemented
*/
HANDLE
-STDCALL
+WINAPI
AddFontMemResourceEx(
PVOID pbFont,
DWORD cbFont,
DWORD *pcFonts
)
{
- UNIMPLEMENTED;
- SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
- return 0;
+ if ( pbFont && cbFont && pcFonts)
+ {
+ return NtGdiAddFontMemResourceEx(pbFont, cbFont, NULL, 0, pcFonts);
+ }
+ SetLastError(ERROR_INVALID_PARAMETER);
+ return NULL;
}
/*
* @unimplemented
*/
int
-STDCALL
+WINAPI
AddFontResourceTracking(
LPCSTR lpString,
int unknown
* @unimplemented
*/
HBITMAP
-STDCALL
+WINAPI
ClearBitmapAttributes(HBITMAP hbm, DWORD dwFlags)
{
UNIMPLEMENTED;
* @unimplemented
*/
HBRUSH
-STDCALL
+WINAPI
ClearBrushAttributes(HBRUSH hbm, DWORD dwFlags)
{
UNIMPLEMENTED;
* @unimplemented
*/
BOOL
-STDCALL
+WINAPI
ColorCorrectPalette(HDC hDC,HPALETTE hPalette,DWORD dwFirstEntry,DWORD dwNumOfEntries)
{
UNIMPLEMENTED;
* @unimplemented
*/
int
-STDCALL
+WINAPI
EndFormPage(HDC hdc)
{
UNIMPLEMENTED;
return 0;
}
-
-
-/*
- * @unimplemented
- */
-DWORD
-STDCALL
-GdiAddGlsBounds(HDC hdc,LPRECT prc)
-{
- UNIMPLEMENTED;
- SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
- return 0;
-}
-
/*
* @unimplemented
*/
BOOL
-STDCALL
+WINAPI
GdiArtificialDecrementDriver(LPWSTR pDriverName,BOOL unknown)
{
UNIMPLEMENTED;
* @unimplemented
*/
BOOL
-STDCALL
+WINAPI
GdiCleanCacheDC(HDC hdc)
{
UNIMPLEMENTED;
* @unimplemented
*/
HDC
-STDCALL
+WINAPI
GdiConvertAndCheckDC(HDC hdc)
{
UNIMPLEMENTED;
* @unimplemented
*/
HENHMETAFILE
-STDCALL
+WINAPI
GdiConvertEnhMetaFile(HENHMETAFILE hmf)
{
UNIMPLEMENTED;
* @unimplemented
*/
BOOL
-STDCALL
+WINAPI
GdiDrawStream(HDC dc, ULONG l, VOID *v)
{
UNIMPLEMENTED;
}
/*
- * @unimplemented
+ * @implemented
*/
BOOL
-STDCALL
-GdiIsMetaFileDC(HDC hdc)
+WINAPI
+GdiIsMetaFileDC(HDC hDC)
{
- UNIMPLEMENTED;
- SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
- return 0;
+ if (GDI_HANDLE_GET_TYPE(hDC) != GDI_OBJECT_TYPE_DC)
+ {
+ if (GDI_HANDLE_GET_TYPE(hDC) == GDI_OBJECT_TYPE_METADC)
+ return TRUE;
+ else
+ {
+ PLDC pLDC = GdiGetLDC(hDC);
+ if ( !pLDC )
+ {
+ SetLastError(ERROR_INVALID_HANDLE);
+ return FALSE;
+ }
+ if ( pLDC->iType == LDC_EMFLDC) return TRUE;
+ }
+ }
+ return FALSE;
}
/*
- * @unimplemented
+ * @implemented
*/
BOOL
-STDCALL
-GdiIsMetaPrintDC(HDC hdc)
+WINAPI
+GdiIsMetaPrintDC(HDC hDC)
{
- UNIMPLEMENTED;
- SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
- return 0;
+
+ if (GDI_HANDLE_GET_TYPE(hDC) != GDI_OBJECT_TYPE_DC)
+ {
+ if (GDI_HANDLE_GET_TYPE(hDC) == GDI_OBJECT_TYPE_METADC)
+ return FALSE;
+ else
+ {
+ PLDC pLDC = GdiGetLDC(hDC);
+ if ( !pLDC )
+ {
+ SetLastError(ERROR_INVALID_HANDLE);
+ return FALSE;
+ }
+ if ( pLDC->Flags & LDC_META_PRINT) return TRUE;
+ }
+ }
+ return FALSE;
}
/*
- * @unimplemented
+ * @implemented
*/
BOOL
-STDCALL
-GdiIsPlayMetafileDC(HDC hdc)
+WINAPI
+GdiIsPlayMetafileDC(HDC hDC)
{
- UNIMPLEMENTED;
- SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
- return 0;
+ PLDC pLDC = GdiGetLDC(hDC);
+ if ( pLDC )
+ {
+ if ( pLDC->Flags & LDC_PLAY_MFDC ) return TRUE;
+ }
+ return FALSE;
}
/*
* @unimplemented
*/
BOOL
-STDCALL
+WINAPI
GdiValidateHandle(HGDIOBJ hobj)
{
UNIMPLEMENTED;
* @unimplemented
*/
DWORD
-STDCALL
+WINAPI
GetBitmapAttributes(HBITMAP hbm)
{
UNIMPLEMENTED;
* @unimplemented
*/
DWORD
-STDCALL
+WINAPI
GetBrushAttributes(HBRUSH hbr)
{
UNIMPLEMENTED;
return 0;
}
-/*
- * @unimplemented
- */
-BOOL
-STDCALL
-GetCharABCWidthsI(HDC hdc,
- UINT giFirst,
- UINT cgi,
- LPWORD pgi,
- LPABC lpabc
-)
-{
- UNIMPLEMENTED;
- SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
- return 0;
-}
-
-/*
- * @unimplemented
- */
-BOOL
-STDCALL
-GetCharWidthI(HDC hdc,
- UINT giFirst,
- UINT cgi,
- LPWORD pgi,
- LPINT lpBuffer
-)
-{
- UNIMPLEMENTED;
- SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
- return 0;
-}
-
-
-
/*
* @implemented
*/
ULONG
-STDCALL
+WINAPI
GetEUDCTimeStamp(VOID)
{
return NtGdiGetEudcTimeStampEx(NULL,0,TRUE);
* @implemented
*/
ULONG
-STDCALL
+WINAPI
GetFontAssocStatus(HDC hdc)
{
ULONG retValue = 0;
return retValue;
}
-/*
- * @unimplemented
- */
-HFONT
-STDCALL
-GetHFONT(HDC dc)
-{
- UNIMPLEMENTED;
- SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
- return 0;
-}
-
-/*
- * @unimplemented
- */
-DWORD
-STDCALL
-GetLayout(HDC hdc
-)
-{
- UNIMPLEMENTED;
- SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
- return 0;
-}
-
/*
* @implemented
*/
BOOL
-STDCALL
+WINAPI
GetTextExtentExPointWPri(HDC hdc,
LPWSTR lpwsz,
ULONG cwc,
return NtGdiGetTextExtentExW(hdc,lpwsz,cwc,dxMax,pcCh,pdxOut,psize,0);
}
-/*
- * @implemented
- */
-INT
-STDCALL
-GetTextFaceAliasW(HDC hdc,
- int cChar,
- LPWSTR pszOut)
-{
- INT retValue = 0;
- if ((!pszOut) || (cChar))
- {
- retValue = NtGdiGetTextFaceW(hdc,cChar,pszOut,TRUE);
- }
- else
- {
- SetLastError(ERROR_INVALID_PARAMETER);
- }
- return retValue;
-}
-
-
-
-/*
- * @unimplemented
- */
-BOOL
-STDCALL
-MirrorRgn(HWND hwnd,HRGN hrgn)
-{
- UNIMPLEMENTED;
- SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
- return 0;
-}
-
-
-
/*
* @unimplemented
*/
DWORD
-STDCALL
+WINAPI
QueryFontAssocStatus(VOID)
{
UNIMPLEMENTED;
* @implemented
*/
BOOL
-STDCALL
+WINAPI
RemoveFontMemResourceEx(HANDLE fh)
{
- BOOL retValue=0;
-
- if (fh)
- {
- retValue = NtGdiRemoveFontMemResourceEx(fh);
- }
- else
- {
- SetLastError(ERROR_INVALID_PARAMETER);
- }
- return retValue;
+ if (fh)
+ {
+ return NtGdiRemoveFontMemResourceEx(fh);
+ }
+ SetLastError(ERROR_INVALID_PARAMETER);
+ return FALSE;
}
/*
* @unimplemented
*/
int
-STDCALL
+WINAPI
RemoveFontResourceTracking(LPCSTR lpString,int unknown)
{
UNIMPLEMENTED;
* @unimplemented
*/
HBITMAP
-STDCALL
+WINAPI
SetBitmapAttributes(HBITMAP hbm, DWORD dwFlags)
{
UNIMPLEMENTED;
* @unimplemented
*/
HBRUSH
-STDCALL
+WINAPI
SetBrushAttributes(HBRUSH hbm, DWORD dwFlags)
{
UNIMPLEMENTED;
return 0;
}
-/*
- * @unimplemented
- */
-DWORD
-STDCALL
-SetLayout(HDC hdc,
- DWORD dwLayout)
-{
- UNIMPLEMENTED;
- SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
- return 0;
-}
-
-/*
- * @unimplemented
- */
-DWORD
-STDCALL
-SetLayoutWidth(HDC hdc,LONG wox,DWORD dwLayout)
-{
- UNIMPLEMENTED;
- SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
- return 0;
-}
-
-
-
/*
* @implemented
*/
int
-STDCALL
+WINAPI
StartFormPage(HDC hdc)
{
return StartPage(hdc);
* @unimplemented
*/
VOID
-STDCALL
+WINAPI
UnloadNetworkFonts(DWORD unknown)
{
UNIMPLEMENTED;
}
/*
- * @implemented
+ * @unimplemented
*/
BOOL
-STDCALL
-GetTextExtentExPointI(HDC hdc,
- LPWORD pgiIn,
- int cgi,
- int nMaxExtent,
- LPINT lpnFit,
- LPINT alpDx,
- LPSIZE lpSize)
+WINAPI
+GdiRealizationInfo(HDC hdc,
+ PREALIZATION_INFO pri)
{
- return NtGdiGetTextExtentExW(hdc,pgiIn,cgi,nMaxExtent,(ULONG *)lpnFit, (PULONG) alpDx,lpSize,1);
+ // ATM we do not support local font data and Language Pack.
+ return NtGdiGetRealizationInfo(hdc, pri, (HFONT) NULL);
}
/*
* @implemented
*/
BOOL
-STDCALL
-GetTextExtentPointI(HDC hdc,
- LPWORD pgiIn,
- int cgi,
- LPSIZE lpSize)
+WINAPI
+GetETM(HDC hdc,
+ EXTTEXTMETRIC *petm)
{
- return NtGdiGetTextExtent(hdc,pgiIn,cgi,lpSize,2);
-}
-
-
+ BOOL Ret = NtGdiGetETM(hdc, petm);
+ if (Ret && petm)
+ petm->emKernPairs = GetKerningPairsA(hdc, 0, 0);
+ return Ret;
+}
/*
* @unimplemented
*/
-BOOL
-STDCALL
-GdiRealizationInfo(HDC hdc,
- PREALIZATION_INFO pri)
+int
+WINAPI
+Escape(HDC hdc, INT nEscape, INT cbInput, LPCSTR lpvInData, LPVOID lpvOutData)
{
- UNIMPLEMENTED;
- SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
- return 0;
-}
+ int retValue = SP_ERROR;
+ HGDIOBJ hObject = hdc;
+ UINT Type = 0;
+ LPVOID pUserData = NULL;
+ Type = GDI_HANDLE_GET_TYPE(hObject);
-
-/*
- * @unimplemented
- */
-BOOL
-STDCALL
-GetETM(HDC hdc,
- EXTTEXTMETRIC *petm)
-{
- UNIMPLEMENTED;
- SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
- return 0;
+ if (Type == GDI_OBJECT_TYPE_METADC)
+ {
+ /* FIXME we do not support metafile */
+ UNIMPLEMENTED;
+ SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+ }
+ else
+ {
+ switch (nEscape)
+ {
+ case ABORTDOC:
+ /* Note Winodws check see if the handle have any user data for ABORTDOC command
+ * ReactOS copy this behavior to be compatible with windows 2003
+ */
+ if ( (!GdiGetHandleUserData(hObject, (DWORD)Type, (PVOID) &pUserData)) ||
+ (pUserData == NULL) )
+ {
+ GdiSetLastError(ERROR_INVALID_HANDLE);
+ retValue = FALSE;
+ }
+ else
+ {
+ retValue = AbortDoc(hdc);
+ }
+ break;
+
+ case DRAFTMODE:
+ case FLUSHOUTPUT:
+ case SETCOLORTABLE:
+ /* Note 1: DRAFTMODE, FLUSHOUTPUT, SETCOLORTABLE is outdated and been replace with other api */
+ /* Note 2: Winodws check see if the handle have any user data for DRAFTMODE, FLUSHOUTPUT, SETCOLORTABLE command
+ * ReactOS copy this behavior to be compatible with windows 2003
+ */
+ if ( (!GdiGetHandleUserData(hObject, (DWORD)Type, (PVOID) &pUserData)) ||
+ (pUserData == NULL) )
+ {
+ GdiSetLastError(ERROR_INVALID_HANDLE);
+ }
+ retValue = FALSE;
+ break;
+
+ case SETABORTPROC:
+ /* Note : Winodws check see if the handle have any user data for DRAFTMODE, FLUSHOUTPUT, SETCOLORTABLE command
+ * ReactOS copy this behavior to be compatible with windows 2003
+ */
+ if ( (!GdiGetHandleUserData(hObject, (DWORD)Type, (PVOID) &pUserData)) ||
+ (pUserData == NULL) )
+ {
+ GdiSetLastError(ERROR_INVALID_HANDLE);
+ retValue = FALSE;
+ }
+ retValue = SetAbortProc(hdc, (ABORTPROC)lpvInData);
+ break;
+
+ case GETCOLORTABLE:
+ retValue = GetSystemPaletteEntries(hdc, (UINT)*lpvInData, 1, (LPPALETTEENTRY)lpvOutData);
+ if ( !retValue )
+ {
+ retValue = SP_ERROR;
+ }
+ break;
+
+ case ENDDOC:
+ /* Note : Winodws check see if the handle have any user data for DRAFTMODE, FLUSHOUTPUT, SETCOLORTABLE command
+ * ReactOS copy this behavior to be compatible with windows 2003
+ */
+ if ( (!GdiGetHandleUserData(hObject, (DWORD)Type, (PVOID) &pUserData)) ||
+ (pUserData == NULL) )
+ {
+ GdiSetLastError(ERROR_INVALID_HANDLE);
+ retValue = FALSE;
+ }
+ retValue = EndDoc(hdc);
+ break;
+
+
+ case GETSCALINGFACTOR:
+ /* Note GETSCALINGFACTOR is outdated have been replace by GetDeviceCaps */
+ if ( Type == GDI_OBJECT_TYPE_DC )
+ {
+ if ( lpvOutData )
+ {
+ PPOINT ptr = (PPOINT) lpvOutData;
+ ptr->x = 0;
+ ptr->y = 0;
+ }
+ }
+ retValue = FALSE;
+ break;
+
+ case GETEXTENDEDTEXTMETRICS:
+ retValue = (int) GetETM( hdc, (EXTTEXTMETRIC *) lpvOutData) != 0;
+ break;
+
+ case STARTDOC:
+ {
+ DOCINFOA *pUserDatalpdi;
+ DOCINFOA lpdi;
+
+ /* Note : Winodws check see if the handle have any user data for STARTDOC command
+ * ReactOS copy this behavior to be compatible with windows 2003
+ */
+ if ( (!GdiGetHandleUserData(hObject, (DWORD)Type, (PVOID) &pUserDatalpdi)) ||
+ (pUserData == NULL) )
+ {
+ GdiSetLastError(ERROR_INVALID_HANDLE);
+ retValue = FALSE;
+ }
+
+ lpdi.cbSize = sizeof(DOCINFOA);
+
+ /* NOTE lpszOutput will be store in handle userdata */
+ lpdi.lpszOutput = 0;
+
+ lpdi.lpszDatatype = 0;
+ lpdi.fwType = 0;
+ lpdi.lpszDocName = lpvInData;
+
+ /* NOTE : doc for StartDocA/W at msdn http://msdn2.microsoft.com/en-us/library/ms535793(VS.85).aspx */
+ retValue = StartDocA(hdc, &lpdi);
+
+ /* StartDocA fail */
+ if (retValue < 0)
+ {
+ /* check see if outbuffer contain any data, if it does abort */
+ if ( (pUserDatalpdi->lpszOutput != 0) &&
+ ( (*(WCHAR *)pUserDatalpdi->lpszOutput) != UNICODE_NULL) )
+ {
+ retValue = SP_APPABORT;
+ }
+ else
+ {
+ retValue = GetLastError();
+
+ /* Translate StartDocA error code to STARTDOC error code
+ * see msdn http://msdn2.microsoft.com/en-us/library/ms535472.aspx
+ */
+ switch(retValue)
+ {
+ case ERROR_NOT_ENOUGH_MEMORY:
+ retValue = SP_OUTOFMEMORY;
+ break;
+
+ case ERROR_PRINT_CANCELLED:
+ retValue = SP_USERABORT;
+ break;
+
+ case ERROR_DISK_FULL:
+ retValue = SP_OUTOFDISK;
+ break;
+
+ default:
+ retValue = SP_ERROR;
+ break;
+ }
+ }
+ }
+ }
+ break;
+
+
+
+
+ default:
+ UNIMPLEMENTED;
+ SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+ }
+ }
+
+ return retValue;
}
/*
* @unimplemented
*/
BOOL
-STDCALL
+WINAPI
GdiAddGlsRecord(HDC hdc,
DWORD unknown1,
LPCSTR unknown2,
* @unimplemented
*/
HANDLE
-STDCALL
+WINAPI
GdiConvertMetaFilePict(HGLOBAL hMem)
{
UNIMPLEMENTED;
* @implemented
*/
DEVMODEW *
-STDCALL
-GdiConvertToDevmodeW(DEVMODEA *dm)
-{
- LPDEVMODEW dmw;
-
- dmw = HEAP_alloc(sizeof(DEVMODEW));
- #define COPYS(f,len) MultiByteToWideChar ( CP_THREAD_ACP, 0, (LPSTR)dm->f, len, dmw->f, len )
- #define COPYN(f) dmw->f = dm->f
- COPYS(dmDeviceName, CCHDEVICENAME );
- COPYN(dmSpecVersion);
- COPYN(dmDriverVersion);
- switch ( dm->dmSize )
- {
- case SIZEOF_DEVMODEA_300:
- dmw->dmSize = SIZEOF_DEVMODEW_300;
- break;
- case SIZEOF_DEVMODEA_400:
- dmw->dmSize = SIZEOF_DEVMODEW_400;
- break;
- case SIZEOF_DEVMODEA_500:
- default: /* FIXME what to do??? */
- dmw->dmSize = SIZEOF_DEVMODEW_500;
- break;
- }
- COPYN(dmDriverExtra);
- COPYN(dmFields);
- COPYN(dmPosition.x);
- COPYN(dmPosition.y);
- COPYN(dmScale);
- COPYN(dmCopies);
- COPYN(dmDefaultSource);
- COPYN(dmPrintQuality);
- COPYN(dmColor);
- COPYN(dmDuplex);
- COPYN(dmYResolution);
- COPYN(dmTTOption);
- COPYN(dmCollate);
- COPYS(dmFormName,CCHFORMNAME);
- COPYN(dmLogPixels);
- COPYN(dmBitsPerPel);
- COPYN(dmPelsWidth);
- COPYN(dmPelsHeight);
- COPYN(dmDisplayFlags); // aka dmNup
- COPYN(dmDisplayFrequency);
-
- if ( dm->dmSize <= SIZEOF_DEVMODEA_300 )
- {
- return dmw; // we're done with 0x300 fields
- }
+WINAPI
+GdiConvertToDevmodeW(DEVMODEA *dmA)
+{
+ DEVMODEW *dmW;
+ WORD dmW_size, dmA_size;
+
+ dmA_size = dmA->dmSize;
+
+ /* this is the minimal dmSize that XP accepts */
+ if (dmA_size < FIELD_OFFSET(DEVMODEA, dmFields))
+ return NULL;
+
+ if (dmA_size > sizeof(DEVMODEA))
+ dmA_size = sizeof(DEVMODEA);
- COPYN(dmICMMethod);
- COPYN(dmICMIntent);
- COPYN(dmMediaType);
- COPYN(dmDitherType);
- COPYN(dmReserved1);
- COPYN(dmReserved2);
+ dmW_size = dmA_size + CCHDEVICENAME;
+ if (dmA_size >= FIELD_OFFSET(DEVMODEA, dmFormName) + CCHFORMNAME)
+ dmW_size += CCHFORMNAME;
- if ( dm->dmSize <= SIZEOF_DEVMODEA_400 )
+ dmW = HeapAlloc(GetProcessHeap(), 0, dmW_size + dmA->dmDriverExtra);
+ if (!dmW) return NULL;
+
+ MultiByteToWideChar(CP_ACP, 0, (const char*) dmA->dmDeviceName, CCHDEVICENAME,
+ dmW->dmDeviceName, CCHDEVICENAME);
+ /* copy slightly more, to avoid long computations */
+ memcpy(&dmW->dmSpecVersion, &dmA->dmSpecVersion, dmA_size - CCHDEVICENAME);
+
+ if (dmA_size >= FIELD_OFFSET(DEVMODEA, dmFormName) + CCHFORMNAME)
{
- return dmw; // we're done with 0x400 fields
+ MultiByteToWideChar(CP_ACP, 0, (const char*) dmA->dmFormName, CCHFORMNAME,
+ dmW->dmFormName, CCHFORMNAME);
+ if (dmA_size > FIELD_OFFSET(DEVMODEA, dmLogPixels))
+ memcpy(&dmW->dmLogPixels, &dmA->dmLogPixels, dmA_size - FIELD_OFFSET(DEVMODEA, dmLogPixels));
}
- COPYN(dmPanningWidth);
- COPYN(dmPanningHeight);
+ if (dmA->dmDriverExtra)
+ memcpy((char *)dmW + dmW_size, (const char *)dmA + dmA_size, dmA->dmDriverExtra);
- return dmw;
+ dmW->dmSize = dmW_size;
- #undef COPYN
- #undef COPYS
+ return dmW;
}
/*
* @unimplemented
*/
HENHMETAFILE
-STDCALL
+WINAPI
GdiCreateLocalEnhMetaFile(HENHMETAFILE hmo)
{
UNIMPLEMENTED;
* @unimplemented
*/
METAFILEPICT *
-STDCALL
+WINAPI
GdiCreateLocalMetaFilePict(HENHMETAFILE hmo)
{
UNIMPLEMENTED;
* @unimplemented
*/
HANDLE
-STDCALL
+WINAPI
GdiGetSpoolFileHandle(LPWSTR pwszPrinterName,
LPDEVMODEW pDevmode,
LPWSTR pwszDocName)
* @unimplemented
*/
BOOL
-STDCALL
+WINAPI
GdiDeleteSpoolFileHandle(HANDLE SpoolFileHandle)
{
UNIMPLEMENTED;
* @unimplemented
*/
DWORD
-STDCALL
+WINAPI
GdiGetPageCount(HANDLE SpoolFileHandle)
{
UNIMPLEMENTED;
* @unimplemented
*/
HDC
-STDCALL
+WINAPI
GdiGetDC(HANDLE SpoolFileHandle)
{
UNIMPLEMENTED;
* @unimplemented
*/
HANDLE
-STDCALL
+WINAPI
GdiGetPageHandle(HANDLE SpoolFileHandle,
DWORD Page,
LPDWORD pdwPageType)
* @unimplemented
*/
BOOL
-STDCALL
+WINAPI
GdiStartDocEMF(HANDLE SpoolFileHandle,
DOCINFOW *pDocInfo)
{
* @unimplemented
*/
BOOL
-STDCALL
+WINAPI
GdiStartPageEMF(HANDLE SpoolFileHandle)
{
UNIMPLEMENTED;
* @unimplemented
*/
BOOL
-STDCALL
+WINAPI
GdiPlayPageEMF(HANDLE SpoolFileHandle,
HANDLE hemf,
RECT *prectDocument,
* @unimplemented
*/
BOOL
-STDCALL
+WINAPI
GdiEndPageEMF(HANDLE SpoolFileHandle,
DWORD dwOptimization)
{
* @unimplemented
*/
BOOL
-STDCALL
+WINAPI
GdiEndDocEMF(HANDLE SpoolFileHandle)
{
UNIMPLEMENTED;
* @unimplemented
*/
BOOL
-STDCALL
+WINAPI
GdiGetDevmodeForPage(HANDLE SpoolFileHandle,
DWORD dwPageNumber,
PDEVMODEW *pCurrDM,
* @unimplemented
*/
BOOL
-STDCALL
+WINAPI
GdiResetDCEMF(HANDLE SpoolFileHandle,
PDEVMODEW pCurrDM)
{
}
-HBITMAP
-STDCALL
-CreateDIBitmap(HDC hDc,
- const BITMAPINFOHEADER *Header,
- DWORD Init, LPCVOID Bits, const BITMAPINFO *Data,
- UINT ColorUse)
-{
- /* FIMXE we need do more thing in user mode */
- return NtGdiCreateDIBitmap(hDc, Header, Init, Bits, Data, ColorUse);
-}
-
/*
* @unimplemented
*/
INT
-STDCALL
+WINAPI
CombineRgn(HRGN hDest,
HRGN hSrc1,
HRGN hSrc2,
/*
* @unimplemented
*/
-HBITMAP STDCALL
-CreateBitmap(INT Width,
- INT Height,
- UINT Planes,
- UINT BitsPixel,
- PCVOID pUnsafeBits)
-{
- /* FIXME some part should be done in user mode */
- return NtGdiCreateBitmap(Width, Height, Planes, BitsPixel, (LPBYTE) pUnsafeBits);
-}
-
-/*
- * @unimplemented
- */
-LPWSTR STDCALL
-EngGetDriverName(HDEV hdev)
-{
- UNIMPLEMENTED;
- SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
- return 0;
-}
-
-/*
- * @unimplemented
- */
-ULONG STDCALL
+ULONG WINAPI
XLATEOBJ_iXlate(XLATEOBJ *XlateObj,
ULONG Color)
{
* @unimplemented
*/
ULONG *
-STDCALL
+WINAPI
XLATEOBJ_piVector(XLATEOBJ *XlateObj)
{
return XlateObj->pulXlate;
* @unimplemented
*/
BOOL
-STDCALL
+WINAPI
GdiPlayEMF(LPWSTR pwszPrinterName,
LPDEVMODEW pDevmode,
LPWSTR pwszDocName,
* @unimplemented
*/
BOOL
-STDCALL
+WINAPI
GdiPlayPrivatePageEMF(HANDLE SpoolFileHandle,
DWORD unknown,
RECT *prectDocument)
/*
* @unimplemented
*/
-VOID STDCALL GdiInitializeLanguagePack(DWORD InitParam)
+VOID WINAPI GdiInitializeLanguagePack(DWORD InitParam)
{
UNIMPLEMENTED;
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
* @implemented
*/
INT
-STDCALL
+WINAPI
ExcludeClipRect(IN HDC hdc, IN INT xLeft, IN INT yTop, IN INT xRight, IN INT yBottom)
{
/* FIXME some part need be done on user mode size */
* @implemented
*/
INT
-STDCALL
+WINAPI
ExtSelectClipRgn( IN HDC hdc, IN HRGN hrgn, IN INT iMode)
{
/* FIXME some part need be done on user mode size */
* @implemented
*/
BOOL
-STDCALL
+WINAPI
GdiGradientFill(
IN HDC hdc,
IN PTRIVERTEX pVertex,
* @implemented
*/
BOOL
-STDCALL
+WINAPI
GdiTransparentBlt(IN HDC hdcDst,
IN INT xDst,
IN INT yDst,
* @unimplemented
*/
BOOL
-STDCALL
+WINAPI
GdiPrinterThunk(
IN HUMPD humpd,
DWORD *status,
*
*/
HBITMAP
-STDCALL
+WINAPI
GdiConvertBitmapV5(
HBITMAP in_format_BitMap,
HBITMAP src_BitMap,
return FALSE;
}
-
-/*
- * @implemented
- *
- */
-COLORREF
-STDCALL
-GetBkColor(HDC hdc)
-{
- /* FIXME some part are done in user mode */
- return NtGdiGetBkColor(hdc);
-}
-
/*
* @implemented
*
*/
int
-STDCALL
-GetBkMode(HDC hdc)
-{
- /* FIXME some part are done in user mode */
- return NtGdiGetBkMode(hdc);
-}
-
-/*
- * @implemented
- *
- */
-BOOL
-STDCALL
-GetBrushOrgEx(HDC hdc,LPPOINT pt)
-{
- /* FIXME some part are done in user mode */
- return NtGdiGetBrushOrgEx(hdc,pt);
-}
-
-/*
- * @implemented
- *
- */
-BOOL
-STDCALL
-GetCharABCWidthsFloatW(HDC hdc,UINT FirstChar,UINT LastChar,LPABCFLOAT abcF)
-{
- /* FIXME some part are done in user mode */
- return NtGdiGetCharABCWidthsFloat(hdc, FirstChar, LastChar, abcF);
-}
-
-/*
- * @implemented
- *
- */
-int
-STDCALL
-GetDeviceCaps(HDC hdc,
- int i)
-{
- /* FIXME some part need be done in user mode */
- return NtGdiGetDeviceCaps(hdc,i);
-}
-
-
-/*
- * @implemented
- *
- */
-BOOL
-STDCALL
-GetCurrentPositionEx(HDC hdc,
- LPPOINT lpPoint)
-{
- /* FIXME some part need be done in user mode */
- return NtGdiGetCurrentPositionEx(hdc, lpPoint);
-}
-
-/*
- * @implemented
- *
- */
-int
-STDCALL
+WINAPI
GetClipBox(HDC hdc,
LPRECT lprc)
{
- /* FIXME some part need be done in user mode */
- return NtGdiGetClipBox(hdc, lprc);
-}
-
-/*
- * @implemented
- *
- */
-BOOL
-STDCALL
-GetCharWidthFloatW(HDC hdc,
- UINT iFirstChar,
- UINT iLastChar,
- PFLOAT pxBuffer)
-{
- /* FIXME some part need be done in user mode */
- return NtGdiGetCharWidthFloat(hdc, iFirstChar, iLastChar, pxBuffer);
+ return NtGdiGetAppClipBox(hdc, lprc);
}
-/*
- * @implemented
- *
- */
-BOOL
-STDCALL
-GetCharWidth32W(HDC hdc,
- UINT iFirstChar,
- UINT iLastChar,
- LPINT lpBuffer)
-{
- /* FIXME some part need be done in user mode */
- return NtGdiGetCharWidth32(hdc, iFirstChar, iLastChar, lpBuffer);
-}
-
-/*
- * @implemented
- *
- */
-BOOL
-STDCALL
-GetCharABCWidths(HDC hdc,
- UINT uFirstChar,
- UINT uLastChar,
- LPABC lpabc)
-{
- /* FIXME some part need be done in user mode */
- return NtGdiGetCharABCWidths(hdc, uFirstChar, uLastChar, lpabc);
-}
-
-
/*
* @implemented
*
*/
DWORD
-STDCALL
+WINAPI
GetFontData(HDC hdc,
DWORD dwTable,
DWORD dwOffset,
*
*/
DWORD
-STDCALL
+WINAPI
GetRegionData(HRGN hrgn,
DWORD nCount,
LPRGNDATA lpRgnData)
*
*/
INT
-STDCALL
+WINAPI
GetRgnBox(HRGN hrgn,
LPRECT prcOut)
{
- /* FIXME some stuff need be done in user mode */
- return NtGdiGetRgnBox(hrgn, prcOut);
+#if 0
+ PRGN_ATTR Rgn_Attr;
+ if (!GdiGetHandleUserData((HGDIOBJ) hRgn, GDI_OBJECT_TYPE_REGION, (PVOID) &Rgn_Attr))
+ return NtGdiGetRgnBox(hrgn, prcOut);
+ if (Rgn_Attr->Flags == NULLREGION)
+ {
+ prcOut->left = 0;
+ prcOut->top = 0;
+ prcOut->right = 0;
+ prcOut->bottom = 0;
+ }
+ else
+ {
+ if (Rgn_Attr->Flags != SIMPLEREGION) return NtGdiGetRgnBox(hrgn, prcOut);
+ *prcOut = Rgn_Attr->Rect;
+ }
+ return Rgn_Attr->Flags;
+#endif
+ return NtGdiGetRgnBox(hrgn, prcOut);
}
*
*/
INT
-STDCALL
+WINAPI
OffsetRgn( HRGN hrgn,
int nXOffset,
int nYOffset)
return NtGdiOffsetRgn(hrgn,nXOffset,nYOffset);
}
-
-INT
-STDCALL
-GetTextCharsetInfo(HDC hdc,
- LPFONTSIGNATURE lpSig,
- DWORD dwFlags)
-{
- /* FIXME some part are done in user mode */
- return NtGdiGetTextCharsetInfo(hdc, lpSig, dwFlags);
-}
-
-
-
+/*
+ * @implemented
+ */
INT
-STDCALL
+WINAPI
IntersectClipRect(HDC hdc,
int nLeftRect,
int nTopRect,
int nRightRect,
int nBottomRect)
{
- /* FIXME some part are done in user mode */
+#if 0
+// Handle something other than a normal dc object.
+ if (GDI_HANDLE_GET_TYPE(hdc) != GDI_OBJECT_TYPE_DC)
+ {
+ if (GDI_HANDLE_GET_TYPE(hdc) == GDI_OBJECT_TYPE_METADC)
+ return MFDRV_IntersectClipRect( hdc, nLeftRect, nTopRect, nRightRect, nBottomRect);
+ else
+ {
+ PLDC pLDC = GdiGetLDC(hdc);
+ if ( pLDC )
+ {
+ if (pLDC->iType != LDC_EMFLDC || EMFDRV_IntersectClipRect( hdc, nLeftRect, nTopRect, nRightRect, nBottomRect))
+ return NtGdiIntersectClipRect(hdc, nLeftRect, nTopRect, nRightRect, nBottomRect);
+ }
+ else
+ SetLastError(ERROR_INVALID_HANDLE);
+ return 0;
+ }
+ }
+#endif
return NtGdiIntersectClipRect(hdc, nLeftRect, nTopRect, nRightRect, nBottomRect);
}
+/*
+ * @implemented
+ */
INT
-STDCALL
+WINAPI
OffsetClipRgn(HDC hdc,
int nXOffset,
int nYOffset)
{
- /* FIXME some part are done in user mode */
- return NtGdiOffsetClipRgn( hdc, nXOffset, nYOffset);
+#if 0
+// Handle something other than a normal dc object.
+ if (GDI_HANDLE_GET_TYPE(hdc) != GDI_OBJECT_TYPE_DC)
+ {
+ if (GDI_HANDLE_GET_TYPE(hdc) == GDI_OBJECT_TYPE_METADC)
+ return MFDRV_OffsetClipRgn( hdc, nXOffset, nYOffset );
+ else
+ {
+ PLDC pLDC = GdiGetLDC(hdc);
+ if ( !pLDC )
+ {
+ SetLastError(ERROR_INVALID_HANDLE);
+ return 0;
+ }
+ if (pLDC->iType == LDC_EMFLDC && !EMFDRV_OffsetClipRgn( hdc, nXOffset, nYOffset ))
+ return 0;
+ return NtGdiOffsetClipRgn( hdc, nXOffset, nYOffset);
+ }
+ }
+#endif
+ return NtGdiOffsetClipRgn( hdc, nXOffset, nYOffset);
}
INT
-STDCALL
+WINAPI
NamedEscape(HDC hdc,
PWCHAR pDriver,
INT iEsc,
+/*
+ * @unimplemented
+ */
-
-
-
-
+/* FIXME wrong protypes, it is a fastcall api */
+DWORD
+WINAPI
+cGetTTFFromFOT(DWORD x1 ,DWORD x2 ,DWORD x3, DWORD x4, DWORD x5, DWORD x6, DWORD x7)
+{
+ UNIMPLEMENTED;
+ SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+ return 0;
+}