Implemented ExtEscape.

This commit is contained in:
Huw D M Davies 1999-07-24 12:13:46 +00:00 committed by Alexandre Julliard
parent a4d0319550
commit b0dd717da2
1 changed files with 23 additions and 9 deletions

View File

@ -14,7 +14,9 @@
DEFAULT_DEBUG_CHANNEL(driver) DEFAULT_DEBUG_CHANNEL(driver)
/***********************************************************************
* Escape16 [GDI.38]
*/
INT16 WINAPI Escape16( HDC16 hdc, INT16 nEscape, INT16 cbInput, INT16 WINAPI Escape16( HDC16 hdc, INT16 nEscape, INT16 cbInput,
SEGPTR lpszInData, SEGPTR lpvOutData ) SEGPTR lpszInData, SEGPTR lpvOutData )
{ {
@ -23,14 +25,15 @@ INT16 WINAPI Escape16( HDC16 hdc, INT16 nEscape, INT16 cbInput,
return dc->funcs->pEscape( dc, nEscape, cbInput, lpszInData, lpvOutData ); return dc->funcs->pEscape( dc, nEscape, cbInput, lpszInData, lpvOutData );
} }
/************************************************************************
* Escape [GDI32.200]
*/
INT WINAPI Escape( HDC hdc, INT nEscape, INT cbInput, INT WINAPI Escape( HDC hdc, INT nEscape, INT cbInput,
LPCSTR lpszInData, LPVOID lpvOutData ) LPCSTR lpszInData, LPVOID lpvOutData )
{ {
DC *dc = DC_GetDCPtr( hdc );
SEGPTR segin,segout; SEGPTR segin,segout;
INT ret; INT ret;
if (!dc || !dc->funcs->pEscape) return 0;
segin = (SEGPTR)lpszInData; segin = (SEGPTR)lpszInData;
segout = (SEGPTR)lpvOutData; segout = (SEGPTR)lpvOutData;
switch (nEscape) { switch (nEscape) {
@ -102,7 +105,7 @@ INT WINAPI Escape( HDC hdc, INT nEscape, INT cbInput,
} }
ret = dc->funcs->pEscape( dc, nEscape, cbInput, segin, segout ); ret = Escape16( hdc, nEscape, cbInput, segin, segout );
switch(nEscape) { switch(nEscape) {
case QUERYESCSUPPORT: case QUERYESCSUPPORT:
@ -170,11 +173,22 @@ INT WINAPI Escape( HDC hdc, INT nEscape, INT cbInput,
* Failure: <0 * Failure: <0
*/ */
INT WINAPI ExtEscape( HDC hdc, INT nEscape, INT cbInput, INT WINAPI ExtEscape( HDC hdc, INT nEscape, INT cbInput,
LPCSTR lpszInData, INT cbOutput, LPSTR lpszOutData ) LPCSTR lpszInData, INT cbOutput, LPSTR lpszOutData )
{ {
FIXME("(0x%04x,0x%x,%d,%s,%d,%p):stub\n", char *inBuf, *outBuf;
hdc,nEscape,cbInput,debugstr_a(lpszInData),cbOutput,lpszOutData); INT ret;
return 0;
inBuf = SEGPTR_ALLOC(cbInput);
memcpy(inBuf, lpszInData, cbInput);
outBuf = cbOutput ? SEGPTR_ALLOC(cbOutput) : NULL;
ret = Escape16( hdc, nEscape, cbInput, SEGPTR_GET(inBuf),
SEGPTR_GET(outBuf) );
SEGPTR_FREE(inBuf);
if(outBuf) {
memcpy(lpszOutData, outBuf, cbOutput);
SEGPTR_FREE(outBuf);
}
return ret;
} }
/******************************************************************* /*******************************************************************