4 * Copyright 1994 Bob Amstadt
16 INT16 WINAPI Escape16( HDC16 hdc, INT16 nEscape, INT16 cbInput,
17 SEGPTR lpszInData, SEGPTR lpvOutData )
19 DC * dc = DC_GetDCPtr( hdc );
20 if (!dc || !dc->funcs->pEscape) return 0;
21 return dc->funcs->pEscape( dc, nEscape, cbInput, lpszInData, lpvOutData );
24 INT32 WINAPI Escape32( HDC32 hdc, INT32 nEscape, INT32 cbInput,
25 LPVOID lpszInData, LPVOID lpvOutData )
27 DC *dc = DC_GetDCPtr( hdc );
31 if (!dc || !dc->funcs->pEscape) return 0;
32 segin = (SEGPTR)lpszInData;
33 segout = (SEGPTR)lpvOutData;
35 /* Escape(hdc,QUERYESCSUPPORT,LPINT32,NULL) */
36 case QUERYESCSUPPORT: {
37 LPINT16 x = (LPINT16)SEGPTR_NEW(INT16);
38 *x = *(INT32*)lpszInData;
39 segin = SEGPTR_GET(x);
43 /* Escape(hdc,GETSCALINGFACTOR,NULL,LPPOINT32) */
44 /* Escape(hdc,GETPHYSPAGESIZE,NULL,LPPOINT32) */
45 /* Escape(hdc,GETPRINTINGOFFSET,NULL,LPPOINT32) */
47 case GETSCALINGFACTOR:
49 case GETPRINTINGOFFSET:
50 segout = SEGPTR_GET(SEGPTR_NEW(POINT16));
53 /* Escape(hdc,GETTECHNOLOGY,NULL,LPSTR); */
56 segout = SEGPTR_GET(SEGPTR_ALLOC(200)); /* enough I hope */
61 /* Escape(hdc,ENABLEPAIRKERNING,LPINT16,LPINT16); */
63 case ENABLEPAIRKERNING: {
64 LPINT16 enab = SEGPTR_NEW(INT16);
65 segout = SEGPTR_GET(SEGPTR_NEW(INT16));
66 segin = SEGPTR_GET(enab);
67 *enab = *(INT32*)lpszInData;
71 /* Escape(hdc,GETFACENAME,NULL,LPSTR); */
74 segout = SEGPTR_GET(SEGPTR_ALLOC(200));
78 ret = dc->funcs->pEscape( dc, nEscape, cbInput, segin, segout );
82 TRACE(driver,"target DC implements Escape %d\n",nEscape);
83 SEGPTR_FREE(PTR_SEG_TO_LIN(segin));
85 case GETSCALINGFACTOR:
86 case GETPRINTINGOFFSET:
87 case GETPHYSPAGESIZE: {
88 LPPOINT16 x = (LPPOINT16)PTR_SEG_TO_LIN(segout);
89 CONV_POINT16TO32(x,(LPPOINT32)lpvOutData);
94 LPSTR x=PTR_SEG_TO_LIN(segout);
95 lstrcpy32A(lpvOutData,x);
99 case ENABLEPAIRKERNING: {
100 LPINT16 enab = (LPINT16)PTR_SEG_TO_LIN(segout);
102 *(LPINT32)lpvOutData = *enab;
104 SEGPTR_FREE(PTR_SEG_TO_LIN(segin));
108 LPSTR x = (LPSTR)PTR_SEG_TO_LIN(segout);
109 lstrcpy32A(lpvOutData,x);
119 /******************************************************************************
120 * ExtEscape32 [GDI32.95]
123 * hdc [I] Handle to device context
124 * nEscape [I] Escape function
125 * cbInput [I] Number of bytes in input structure
126 * lpszInData [I] Pointer to input structure
127 * cbOutput [I] Number of bytes in output structure
128 * lpszOutData [O] Pointer to output structure
135 INT32 WINAPI ExtEscape32( HDC32 hdc, INT32 nEscape, INT32 cbInput,
136 LPCSTR lpszInData, INT32 cbOutput, LPSTR lpszOutData )
138 FIXME(driver,"(0x%04x,0x%x,%d,%s,%d,%p):stub\n",
139 hdc,nEscape,cbInput,debugstr_a(lpszInData),cbOutput,lpszOutData);