Commit b0dd717d authored by Huw D M Davies's avatar Huw D M Davies Committed by Alexandre Julliard

Implemented ExtEscape.

parent a4d03195
...@@ -14,7 +14,9 @@ ...@@ -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, ...@@ -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, ...@@ -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, ...@@ -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;
} }
/******************************************************************* /*******************************************************************
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment