DEVESC DBE FONTMANAGEMENT: Difference between revisions
Appearance
mNo edit summary |
|||
Line 5: | Line 5: | ||
==Syntax== | ==Syntax== | ||
GreEscape(hdc, lEscape, cInCount, pInData, pcOutCount, pOutData, pInstance, lFunction) | GreEscape(hdc, lEscape, cInCount, pInData, pcOutCount, pOutData, pInstance, lFunction) | ||
==Parameters== | ==Parameters== | ||
;''hdc'' ([[HDC]]) - input: Device context handle. | ;''hdc'' ([[HDC]]) - input: Device context handle. | ||
;''lEscape'' ([[LONG]]) - input: DEVESC_DBE_FONTMANAGEMENT (24450) escape code. | ;''lEscape'' ([[LONG]]) - input: DEVESC_DBE_FONTMANAGEMENT (24450) escape code. | ||
;''cInCount'' ([[LONG]]) - input: The number of bytes pointed to by pInData. | ;''cInCount'' ([[LONG]]) - input: The number of bytes pointed to by pInData. | ||
;''pInData'' ([[PBYTE]]) - input: Pointer to the [[FONTMGRPARM]] structure. | ;''pInData'' ([[PBYTE]]) - input: Pointer to the [[FONTMGRPARM]] structure. | ||
;''pcOutCount'' ([[PLONG]]) - input: The handling routine ignores this parameter. | ;''pcOutCount'' ([[PLONG]]) - input: The handling routine ignores this parameter. | ||
;''pOutData'' ([[PLONG]]) - input: When fdi.fdi_lFunctionID in pInData is QUERY_VIO_FONTATTRIBUTE, pOutData points to the [[FATTRS]] structure. FATTRS corresponds to the specified cell size, which is one of size returned by the [[GreEscape]] [[DEVESC_QUERYVIOCELLSIZES]] escape function. The handling routine must fill lMatch number in the FATTRS structure. Be sure that the lMaxBaselineExt and lAveCharWidth field are returned in device coordinates. For other fdi.fdi_lFunctionID, the handling routine ignores this parameter. | ;''pOutData'' ([[PLONG]]) - input: When fdi.fdi_lFunctionID in pInData is QUERY_VIO_FONTATTRIBUTE, pOutData points to the [[FATTRS]] structure. FATTRS corresponds to the specified cell size, which is one of size returned by the [[GreEscape]] [[DEVESC_QUERYVIOCELLSIZES]] escape function. The handling routine must fill lMatch number in the FATTRS structure. Be sure that the lMaxBaselineExt and lAveCharWidth field are returned in device coordinates. For other fdi.fdi_lFunctionID, the handling routine ignores this parameter. | ||
;''pInstance'' ([[PVOID]]) - input: Pointer to instance data. | ;''pInstance'' ([[PVOID]]) - input: Pointer to instance data. | ||
;''lFunction'' ([[ULONG]]) - input: High-order WORD=flags; low-order WORD=NGreEscape. | ;''lFunction'' ([[ULONG]]) - input: High-order WORD=flags; low-order WORD=NGreEscape. | ||
Line 27: | Line 20: | ||
;''rc'' ([[LONG]]) - returns: Return Code. | ;''rc'' ([[LONG]]) - returns: Return Code. | ||
:The handling routine returns: | :The handling routine returns: | ||
: | ::DEV_OK - Successful | ||
:: | ::DEVESC_NOTIMPLEMENTED - Escape not implemented for specified code | ||
::DEVESC_ERROR - Error | |||
: | |||
:;Possible Errors Detected: When an error is detected, the handling routine must call WinSetErrorInfo to post the condition. Error codes for conditions that the handling routine is expected to check include: | :;Possible Errors Detected: When an error is detected, the handling routine must call WinSetErrorInfo to post the condition. Error codes for conditions that the handling routine is expected to check include: | ||
::*PMERR_DEV_FUNC_NOT_INSTALLED | ::*PMERR_DEV_FUNC_NOT_INSTALLED | ||
::*PMERR_INV_LENGTH_OR_COUNT | ::*PMERR_INV_LENGTH_OR_COUNT | ||
:Refer to the "Error Explanations" section of the | :Refer to the "Error Explanations" section of the ''Presentation Manager Programming Reference'' for further explanation. | ||
==Remarks== | ==Remarks== | ||
Line 57: | Line 47: | ||
LONG rc; /* Return Code. */ | LONG rc; /* Return Code. */ | ||
rc = GreEscape(hdc, lEscape, cInCount, pInData, | rc = GreEscape(hdc, lEscape, cInCount, pInData, pcOutCount, pOutData, pInstance, lFunction); | ||
</pre> | </pre> | ||
[[Category:DEVESC]] | [[Category:DEVESC]] |
Revision as of 13:34, 7 August 2025
GreEscape DEVESC_DBE_FONTMANAGEMENT is the entry point to sub-functions to support DBCS device font.
- Simulation support
- NONE. This function is mandatory for display drivers supporting the Double-Byte Character Set (DBCS). For other drivers, DEVESC_NOTIMPLEMENTED should be returned.
Syntax
GreEscape(hdc, lEscape, cInCount, pInData, pcOutCount, pOutData, pInstance, lFunction)
Parameters
- hdc (HDC) - input
- Device context handle.
- lEscape (LONG) - input
- DEVESC_DBE_FONTMANAGEMENT (24450) escape code.
- cInCount (LONG) - input
- The number of bytes pointed to by pInData.
- pInData (PBYTE) - input
- Pointer to the FONTMGRPARM structure.
- pcOutCount (PLONG) - input
- The handling routine ignores this parameter.
- pOutData (PLONG) - input
- When fdi.fdi_lFunctionID in pInData is QUERY_VIO_FONTATTRIBUTE, pOutData points to the FATTRS structure. FATTRS corresponds to the specified cell size, which is one of size returned by the GreEscape DEVESC_QUERYVIOCELLSIZES escape function. The handling routine must fill lMatch number in the FATTRS structure. Be sure that the lMaxBaselineExt and lAveCharWidth field are returned in device coordinates. For other fdi.fdi_lFunctionID, the handling routine ignores this parameter.
- pInstance (PVOID) - input
- Pointer to instance data.
- lFunction (ULONG) - input
- High-order WORD=flags; low-order WORD=NGreEscape.
Returns
- rc (LONG) - returns
- Return Code.
- The handling routine returns:
- DEV_OK - Successful
- DEVESC_NOTIMPLEMENTED - Escape not implemented for specified code
- DEVESC_ERROR - Error
- Possible Errors Detected
- When an error is detected, the handling routine must call WinSetErrorInfo to post the condition. Error codes for conditions that the handling routine is expected to check include:
- PMERR_DEV_FUNC_NOT_INSTALLED
- PMERR_INV_LENGTH_OR_COUNT
- Refer to the "Error Explanations" section of the Presentation Manager Programming Reference for further explanation.
Remarks
For an OD_METAFILE device, DEVESC_DBE_FONTMANAGEMENT is passed to the presentation driver but is not metafiled. For an OD_QUEUED device with PM_Q_STD, the spooler records this escape, but it is not passed to the presentation driver.
Source Code Sample
Declaration:
#define INCL_GRE_DEVICE #include <os2.h> HDC hdc; /* Device context handle. */ LONG lEscape; /* DEVESC_DBE_FONTMANAGEMENT (24450) escape code. */ LONG cInCount; /* The number of bytes pointed to by pInData. */ PBYTE pInData; /* Pointer to the FONTMGRPARM structure. */ PLONG pcOutCount; /* The handling routine ignores this parameter. */ PLONG pOutData; /* When fdi.fdi_lFunctionID is QUERY_VIO_FONTATTRIBUTE, points to FATTRS structure. */ PVOID pInstance; /* Pointer to instance data. */ ULONG lFunction; /* High-order WORD=flags; low-order WORD=NGreEscape. */ LONG rc; /* Return Code. */ rc = GreEscape(hdc, lEscape, cInCount, pInData, pcOutCount, pOutData, pInstance, lFunction);