4 * Copyright 1994 Bob Amstadt
14 INT16 WINAPI
Escape16( HDC16 hdc
, INT16 nEscape
, INT16 cbInput
,
15 SEGPTR lpszInData
, SEGPTR lpvOutData
)
17 DC
* dc
= DC_GetDCPtr( hdc
);
18 if (!dc
|| !dc
->funcs
->pEscape
) return 0;
19 return dc
->funcs
->pEscape( dc
, nEscape
, cbInput
, lpszInData
, lpvOutData
);
22 INT32 WINAPI
Escape32( HDC32 hdc
, INT32 nEscape
, INT32 cbInput
,
23 LPVOID lpszInData
, LPVOID lpvOutData
)
25 DC
*dc
= DC_GetDCPtr( hdc
);
29 if (!dc
|| !dc
->funcs
->pEscape
) return 0;
30 segin
= (SEGPTR
)lpszInData
;
31 segout
= (SEGPTR
)lpvOutData
;
33 /* Escape(hdc,QUERYESCSUPPORT,LPINT32,NULL) */
34 case QUERYESCSUPPORT
: {
35 LPINT16 x
= (LPINT16
)SEGPTR_NEW(INT16
);
36 *x
= *(INT32
*)lpszInData
;
37 segin
= SEGPTR_GET(x
);
41 /* Escape(hdc,GETSCALINGFACTOR,NULL,LPPOINT32) */
42 /* Escape(hdc,GETPHYSPAGESIZE,NULL,LPPOINT32) */
43 /* Escape(hdc,GETPRINTINGOFFSET,NULL,LPPOINT32) */
45 case GETSCALINGFACTOR
:
47 case GETPRINTINGOFFSET
:
48 segout
= SEGPTR_GET(SEGPTR_NEW(POINT16
));
51 /* Escape(hdc,GETTECHNOLOGY,NULL,LPSTR); */
54 segout
= SEGPTR_GET(SEGPTR_ALLOC(200)); /* enough I hope */
59 /* Escape(hdc,ENABLEPAIRKERNING,LPINT16,LPINT16); */
61 case ENABLEPAIRKERNING
: {
62 LPINT16 enab
= SEGPTR_NEW(INT16
);
63 segout
= SEGPTR_GET(SEGPTR_NEW(INT16
));
64 segin
= SEGPTR_GET(enab
);
65 *enab
= *(INT32
*)lpszInData
;
69 /* Escape(hdc,GETFACENAME,NULL,LPSTR); */
72 segout
= SEGPTR_GET(SEGPTR_ALLOC(200));
76 ret
= dc
->funcs
->pEscape( dc
, nEscape
, cbInput
, segin
, segout
);
80 fprintf(stderr
,"target DC implements Escape %d\n",nEscape
);
81 SEGPTR_FREE(PTR_SEG_TO_LIN(segin
));
83 case GETSCALINGFACTOR
:
84 case GETPRINTINGOFFSET
:
85 case GETPHYSPAGESIZE
: {
86 LPPOINT16 x
= (LPPOINT16
)PTR_SEG_TO_LIN(segout
);
87 CONV_POINT16TO32(x
,(LPPOINT32
)lpvOutData
);
92 LPSTR x
=PTR_SEG_TO_LIN(segout
);
93 lstrcpy32A(lpvOutData
,x
);
97 case ENABLEPAIRKERNING
: {
98 LPINT16 enab
= (LPINT16
)PTR_SEG_TO_LIN(segout
);
100 *(LPINT32
)lpvOutData
= *enab
;
102 SEGPTR_FREE(PTR_SEG_TO_LIN(segin
));
106 LPSTR x
= (LPSTR
)PTR_SEG_TO_LIN(segout
);
107 lstrcpy32A(lpvOutData
,x
);
117 INT32 WINAPI
ExtEscape32(HDC32 hdc
,INT32 nEscape
,INT32 cbInput
,LPCSTR x
,INT32 cbOutput
,LPSTR out
) {
118 fprintf(stderr
,"ExtEscape32(0x%04x,0x%x,%d,%s,%d,%p),stub!\n",
119 hdc
,nEscape
,cbInput
,x
,cbOutput
,out