Author: jimtabor
Date: Wed Aug 8 22:58:06 2007
New Revision: 28248
URL:
http://svn.reactos.org/svn/reactos?rev=28248&view=rev
Log:
- Removed NtGdiGet/SetArcDirection and NtGdiGetSetTextCharExtra, update ntgdibad.h.
- Updated NtGdiGet/AndSet/DCDword.
- Changes to other files to reflect the updates and removals.
Modified:
trunk/reactos/dll/win32/gdi32/gdi32.def
trunk/reactos/dll/win32/gdi32/misc/stubs.c
trunk/reactos/dll/win32/gdi32/objects/dc.c
trunk/reactos/dll/win32/gdi32/objects/text.c
trunk/reactos/include/reactos/win32k/ntgdibad.h
trunk/reactos/subsystems/win32/win32k/objects/dc.c
trunk/reactos/subsystems/win32/win32k/objects/line.c
trunk/reactos/subsystems/win32/win32k/objects/path.c
trunk/reactos/subsystems/win32/win32k/objects/text.c
trunk/reactos/subsystems/win32/win32k/w32ksvc.db
Modified: trunk/reactos/dll/win32/gdi32/gdi32.def
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/gdi32/gdi32.def?…
==============================================================================
--- trunk/reactos/dll/win32/gdi32/gdi32.def (original)
+++ trunk/reactos/dll/win32/gdi32/gdi32.def Wed Aug 8 22:58:06 2007
@@ -334,7 +334,7 @@
GdiSwapBuffers@4
GdiTransparentBlt@44=NtGdiTransparentBlt@44
GdiValidateHandle@4
-GetArcDirection@4=NtGdiGetArcDirection@4
+GetArcDirection@4
GetAspectRatioFilterEx@8
GetBitmapAttributes@4
GetBitmapBits@12=NtGdiGetBitmapBits@12
@@ -529,7 +529,7 @@
SelectObject@8=NtGdiSelectObject@8
SelectPalette@12=NtGdiSelectPalette@12
SetAbortProc@8
-SetArcDirection@8=NtGdiSetArcDirection@8
+SetArcDirection@8
SetBitmapAttributes@8
SetBitmapBits@12=NtGdiSetBitmapBits@12
SetBitmapDimensionEx@16=NtGdiSetBitmapDimensionEx@16
Modified: trunk/reactos/dll/win32/gdi32/misc/stubs.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/gdi32/misc/stubs…
==============================================================================
--- trunk/reactos/dll/win32/gdi32/misc/stubs.c (original)
+++ trunk/reactos/dll/win32/gdi32/misc/stubs.c Wed Aug 8 22:58:06 2007
@@ -176,19 +176,6 @@
/*
* @unimplemented
*/
-int
-STDCALL
-GetTextCharacterExtra(
- HDC hDc
- )
-{
- return NtGdiGetSetTextCharExtra( hDc, 0, FALSE);
-}
-
-
-/*
- * @unimplemented
- */
DWORD
STDCALL
GetFontLanguageInfo(
@@ -310,20 +297,6 @@
UNIMPLEMENTED;
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return 0;
-}
-
-
-/*
- * @unimplemented
- */
-int
-STDCALL
-SetTextCharacterExtra(
- HDC hDC,
- int CharExtra
- )
-{
- return NtGdiGetSetTextCharExtra( hDC, CharExtra, TRUE);
}
@@ -1267,22 +1240,6 @@
STDCALL
SetFontEnumeration(
DWORD a0
- )
-{
- UNIMPLEMENTED;
- SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
- return 0;
-}
-
-
-/*
- * @unimplemented
- */
-DWORD
-STDCALL
-SetRelAbs(
- DWORD a0,
- DWORD a1
)
{
UNIMPLEMENTED;
Modified: trunk/reactos/dll/win32/gdi32/objects/dc.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/gdi32/objects/dc…
==============================================================================
--- trunk/reactos/dll/win32/gdi32/objects/dc.c (original)
+++ trunk/reactos/dll/win32/gdi32/objects/dc.c Wed Aug 8 22:58:06 2007
@@ -290,6 +290,22 @@
}
+INT
+STDCALL
+GetArcDirection( HDC hdc )
+{
+ return GetDCDWord( hdc, GdiGetArcDirection, 0);
+}
+
+
+INT
+STDCALL
+SetArcDirection( HDC hdc, INT nDirection )
+{
+ return GetAndSetDCDWord( hdc, GdiGetSetArcDirection, nDirection, 0, 0, 0 );
+}
+
+
/*
* @implemented
*/
@@ -301,6 +317,20 @@
)
{
return GetDCDWord( hdc, GdiGetRelAbs, 0);
+}
+
+
+/*
+ * @implemented
+ */
+DWORD
+STDCALL
+SetRelAbs(
+ HDC hdc,
+ INT Mode
+ )
+{
+ return GetAndSetDCDWord( hdc, GdiGetSetRelAbs, Mode, 0, 0, 0 );
}
Modified: trunk/reactos/dll/win32/gdi32/objects/text.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/gdi32/objects/te…
==============================================================================
--- trunk/reactos/dll/win32/gdi32/objects/text.c (original)
+++ trunk/reactos/dll/win32/gdi32/objects/text.c Wed Aug 8 22:58:06 2007
@@ -44,6 +44,26 @@
int cbString)
{
return NtGdiExtTextOut(hdc, nXStart, nYStart, 0, NULL, lpString, cbString, NULL);
+}
+
+
+/*
+ * @unimplemented
+ */
+int
+STDCALL
+GetTextCharacterExtra(
+ HDC hDc
+ )
+{
+#if 0
+ PDC_ATTR Dc_Attr;
+
+ if (!GdiGetHandleUserData((HGDIOBJ) hDc, (PVOID) &Dc_Attr)) return 0;
+ return Dc_Attr->lTextExtra;
+#endif
+ // Do it this way for now.
+ return GetDCDWord( hDc, GdiGetTextCharExtra, 0);
}
@@ -393,3 +413,47 @@
return TRUE;
}
+
+
+/*
+ * @unimplemented
+ */
+int
+STDCALL
+SetTextCharacterExtra(
+ HDC hDC,
+ int CharExtra
+ )
+{
+ INT cExtra = 0x80000000;
+// PDC_ATTR Dc_Attr;
+
+ if (CharExtra == cExtra)
+ {
+ SetLastError(ERROR_INVALID_PARAMETER);
+ return cExtra;
+ }
+#if 0
+ if (GDI_HANDLE_GET_TYPE(hDC) == GDI_OBJECT_TYPE_METADC)
+ {
+ return 0; //call MFDRV META_SETTEXTCHAREXTRA
+ }
+ if (!GdiGetHandleUserData((HGDIOBJ) hDC, (PVOID) &Dc_Attr)) return cExtra;
+
+ if (NtCurrentTeb()->GdiTebBatch.HDC == hDC)
+ {
+ if (Dc_Attr->ulDirty_ & DC_FONTTEXT_DIRTY)
+ {
+ NtGdiFlush(); // Sync up Dc_Attr from Kernel space.
+ Dc_Attr->ulDirty_ &= ~(DC_MODE_DIRTY|DC_FONTTEXT_DIRTY);
+ }
+ }
+ cExtra = Dc_Attr->lTextExtra;
+ Dc_Attr->lTextExtra = CharExtra;
+ return cExrta;
+#endif
+// Do this for now.
+ return GetAndSetDCDWord( hDC, GdiGetSetTextCharExtra, CharExtra, 0, 0, 0 );
+}
+
+
Modified: trunk/reactos/include/reactos/win32k/ntgdibad.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/reactos/win32k/ntg…
==============================================================================
--- trunk/reactos/include/reactos/win32k/ntgdibad.h (original)
+++ trunk/reactos/include/reactos/win32k/ntgdibad.h Wed Aug 8 22:58:06 2007
@@ -259,11 +259,6 @@
CONST LPBYTE Data
);
-/* Use NtGdiGetDCDword with GdiGetArcDirection. */
-INT
-STDCALL
-NtGdiGetArcDirection ( HDC hDC );
-
/* Should be done in user-mode. */
BOOL
STDCALL
@@ -464,11 +459,6 @@
/* Should be done in user-mode using shared GDI Objects. */
INT STDCALL NtGdiGetROP2(HDC hDC);
-
-/* Should be done in user-mode using shared GDI Objects. */
-INT
-STDCALL
-NtGdiGetSetTextCharExtra( HDC hDC, INT CharExtra, BOOL Set);
/* Should be done in user-mode using shared GDI Objects. */
INT STDCALL NtGdiGetStretchBltMode(HDC hDC);
@@ -676,12 +666,6 @@
STDCALL
NtGdiSetAbortProc(HDC hDC,
ABORTPROC AbortProc);
-
-/* Use NtGdiGetAndSetDCDword with GdiGetSetArcDirection. */
-int
-STDCALL
-NtGdiSetArcDirection(HDC hDC,
- int ArcDirection);
/* Use NtGdiSetBitmapDimension. */
BOOL
Modified: trunk/reactos/subsystems/win32/win32k/objects/dc.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ob…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/objects/dc.c (original)
+++ trunk/reactos/subsystems/win32/win32k/objects/dc.c Wed Aug 8 22:58:06 2007
@@ -2161,20 +2161,31 @@
SafeResult = dc->Dc_Attr.lRelAbs;
break;
case GdiGetBreakExtra:
+ SafeResult = dc->Dc_Attr.lBreakExtra;
break;
case GdiGerCharBreak:
+ SafeResult = dc->Dc_Attr.cBreak;
break;
case GdiGetArcDirection:
+ SafeResult = dc->w.ArcDirection;
break;
case GdiGetEMFRestorDc:
break;
case GdiGetFontLanguageInfo:
break;
case GdiGetIsMemDc:
+ {
+ if (dc->w.flags & DC_MEMORY)
+ SafeResult = DC_TYPE_MEMORY; // = dc->DC_Type;
+ else
+ SafeResult = DC_TYPE_DIRECT;
+ }
break;
case GdiGetMapMode:
+ SafeResult = dc->Dc_Attr.iMapMode;
break;
case GdiGetTextCharExtra:
+ SafeResult = dc->Dc_Attr.lTextExtra;
break;
default:
SetLastWin32Error(ERROR_INVALID_PARAMETER);
@@ -2241,18 +2252,34 @@
case GdtGetSetCopyCount:
break;
case GdiGetSetTextAlign:
+ SafeResult = dc->Dc_Attr.lTextAlign;
+ dc->Dc_Attr.lTextAlign = dwIn;
+ dc->Dc_Attr.flTextAlign = dwIn;
break;
case GdiGetSetRelAbs:
+ SafeResult = dc->Dc_Attr.lRelAbs;
+ dc->Dc_Attr.lRelAbs = dwIn;
break;
case GdiGetSetTextCharExtra:
+ SafeResult = dc->Dc_Attr.lTextExtra;
+ dc->Dc_Attr.lTextExtra = dwIn;
break;
case GdiGetSetSelectFont:
break;
case GdiGetSetMapperFlagsInternal:
break;
case GdiGetSetMapMode:
+ SafeResult = dc->Dc_Attr.iMapMode;
+ dc->Dc_Attr.iMapMode = dwIn;
break;
case GdiGetSetArcDirection:
+ if (dwIn != AD_COUNTERCLOCKWISE && dwIn != AD_CLOCKWISE)
+ {
+ SetLastWin32Error(ERROR_INVALID_PARAMETER);
+ Ret = FALSE;
+ }
+ SafeResult = dc->w.ArcDirection;
+ dc->w.ArcDirection = dwIn;
break;
default:
SetLastWin32Error(ERROR_INVALID_PARAMETER);
@@ -2290,7 +2317,6 @@
DC_SET_MODE( NtGdiSetBkMode, Dc_Attr.jBkMode, TRANSPARENT, OPAQUE )
DC_SET_MODE( NtGdiSetPolyFillMode, Dc_Attr.jFillMode, ALTERNATE, WINDING )
-// DC_SET_MODE( NtGdiSetRelAbs, Dc_Attr.lRelAbs, ABSOLUTE, RELATIVE )
DC_SET_MODE( NtGdiSetROP2, Dc_Attr.jROP2, R2_BLACK, R2_WHITE )
DC_SET_MODE( NtGdiSetStretchBltMode, Dc_Attr.jStretchBltMode, BLACKONWHITE, HALFTONE )
Modified: trunk/reactos/subsystems/win32/win32k/objects/line.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ob…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/objects/line.c (original)
+++ trunk/reactos/subsystems/win32/win32k/objects/line.c Wed Aug 8 22:58:06 2007
@@ -278,12 +278,6 @@
return ret;
}
-INT FASTCALL
-IntGdiGetArcDirection(DC *dc)
-{
- return dc->w.ArcDirection;
-}
-
BOOL FASTCALL
IntGdiPolyPolyline(DC *dc,
@@ -327,25 +321,6 @@
return FALSE;
}
-INT
-STDCALL
-NtGdiGetArcDirection(HDC hDC)
-{
- PDC dc = DC_LockDc (hDC);
- int ret = 0; // default to failure
-
- if ( dc )
- {
- ret = IntGdiGetArcDirection ( dc );
- DC_UnlockDc(dc);
- }
- else
- {
- SetLastWin32Error(ERROR_INVALID_HANDLE);
- }
-
- return ret;
-}
BOOL
STDCALL
@@ -956,24 +931,4 @@
return Ret;
}
-int
-STDCALL
-NtGdiSetArcDirection(HDC hDC,
- int ArcDirection)
-{
- PDC dc;
- INT nOldDirection = 0; // default to FAILURE
-
- dc = DC_LockDc (hDC);
- if ( !dc ) return 0;
-
- if ( ArcDirection == AD_COUNTERCLOCKWISE || ArcDirection == AD_CLOCKWISE )
- {
- nOldDirection = dc->w.ArcDirection;
- dc->w.ArcDirection = ArcDirection;
- }
-
- DC_UnlockDc( dc );
- return nOldDirection;
-}
/* EOF */
Modified: trunk/reactos/subsystems/win32/win32k/objects/path.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ob…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/objects/path.c (original)
+++ trunk/reactos/subsystems/win32/win32k/objects/path.c Wed Aug 8 22:58:06 2007
@@ -39,9 +39,6 @@
VOID FASTCALL PATH_ScaleNormalizedPoint (FLOAT_POINT corners[], double x, double y, POINT
*pPoint);
BOOL FASTCALL PATH_StrokePath(DC *dc, GdiPath *pPath);
BOOL PATH_CheckCorners(DC *dc, POINT corners[], INT x1, INT y1, INT x2, INT y2);
-
-INT FASTCALL
-IntGdiGetArcDirection(DC *dc);
VOID FASTCALL
IntGetCurrentPositionEx(PDC dc, LPPOINT pt);
@@ -750,7 +747,7 @@
ASSERT ( dc );
- clockwise = ( IntGdiGetArcDirection(dc) == AD_CLOCKWISE );
+ clockwise = ( dc->w.ArcDirection == AD_CLOCKWISE );
/* Check that path is open */
if ( dc->w.path.state != PATH_Open )
Modified: trunk/reactos/subsystems/win32/win32k/objects/text.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ob…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/objects/text.c (original)
+++ trunk/reactos/subsystems/win32/win32k/objects/text.c Wed Aug 8 22:58:06 2007
@@ -4180,28 +4180,6 @@
}
-/* Remove this HAX! after the below function is done in GDI32.DLL! */
-INT
-STDCALL
-NtGdiGetSetTextCharExtra( HDC hDC, INT CharExtra, BOOL Set)
-{
- /* Ulta-Ugly Hax! */
- INT Ret = 0x80000000;
-
- PDC dc = DC_LockDc ( hDC );
- if (!dc)
- {
- DPRINT("TextCharacterExtra %d", CharExtra);
- SetLastWin32Error(ERROR_INVALID_HANDLE);
- return Ret;
- }
- DPRINT("TextCharacterExtra %d", CharExtra);
- Ret = dc->Dc_Attr.lTextExtra;
- if( Set ) dc->Dc_Attr.lTextExtra = CharExtra;
- DC_UnlockDc(dc);
- return (Ret);
-}
-
static BOOL FASTCALL
IntGetFullFileName(
POBJECT_NAME_INFORMATION NameInfo,
Modified: trunk/reactos/subsystems/win32/win32k/w32ksvc.db
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/w3…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/w32ksvc.db (original)
+++ trunk/reactos/subsystems/win32/win32k/w32ksvc.db Wed Aug 8 22:58:06 2007
@@ -697,7 +697,6 @@
NtGdiSelectObject 2
NtGdiSelectPalette 3
NtGdiSetAbortProc 2
-NtGdiSetArcDirection 2
NtGdiSetBitmapDimensionEx 4
NtGdiSetBkColor 2
NtGdiSetBkMode 2
@@ -783,7 +782,6 @@
NtGdiEscape 5
NtGdiExtTextOut 8
NtGdiGdiComment 3
-NtGdiGetArcDirection 1
NtGdiGetAspectRatioFilterEx 2
NtGdiGetBitmapDimensionEx 2
NtGdiGetBkColor 1
@@ -816,7 +814,6 @@
NtGdiGetPixelFormat 1
NtGdiGetPolyFillMode 1
NtGdiGetROP2 1
-NtGdiGetSetTextCharExtra 3
NtGdiGetStretchBltMode 1
NtGdiGetSystemPaletteEntries 4
NtGdiGetTextAlign 1