Jump to content

DEVESC BREAK EXTRA: Difference between revisions

From EDM2
Created page with "{{DISPLAYTITLE:DEVESC_BREAK_EXTRA}} GreEscape DEVESC_BREAK_EXTRA changes the width of the break character on a hardcopy device. ;Simulation support: This function is mandatory for hardcopy drivers, but may simply return a DEVESC_NOTIMPLEMENTED code. For other drivers, it is simulated by a handling routine in the graphics engine. ==Syntax== GreEscape(hdc, lEscape, cInCount, pInData, pcOutCount, pOutData, pInstance, lFunction); ==Parameters== ;''hdc'' (HDC) - input..."
 
Ak120 (talk | contribs)
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_BREAK_EXTRA escape code.
;''lEscape'' ([[LONG]]) - input: DEVESC_BREAK_EXTRA escape code.
 
;''cInCount'' (LONG) - input: Number of bytes pointed to by pInData. When cInCount=0, the handling routine resets the extra width to 0.
;''cInCount'' ([[LONG]]) - input: Number of bytes pointed to by pInData. When cInCount=0, the handling routine resets the extra width to 0.
 
;''pInData'' ([[PBYTE]]) - input: If cInCount is not equal to 0, pInData is a pointer to a fixed value. This value is the required extra width defined in world coordinates.
;''pInData'' ([[PBYTE]]) - input: If cInCount is not equal to 0, pInData is a pointer to a fixed value. This value is the required extra width defined in world coordinates.
;''pcOutCount'' ([[PLONG]]) - input: The handling routine ignores this parameter.
;''pcOutCount'' ([[PLONG]]) - input: The handling routine ignores this parameter.
 
;''pOutData'' (PLONG) - input: The handling routine ignores this parameter.
;''pOutData'' ([[PLONG]]) - input: 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
::DEV_OK - Successful
::Successful
::DEVESC_NOTIMPLEMENTED - Escape not implemented for specified code
:;DEVESC_NOTIMPLEMENTED
::DEVESC_ERROR - Error
::Escape not implemented for specified code
:;DEVESC_ERROR
::Error


==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, count, pOutData, pInstance, lFunction);
      count, pOutData, pInstance, lFunction);
</pre>
</pre>


[[Category:DEVESC]]
[[Category:DEVESC]]

Latest revision as of 13:50, 7 August 2025

GreEscape DEVESC_BREAK_EXTRA changes the width of the break character on a hardcopy device.

Simulation support
This function is mandatory for hardcopy drivers, but may simply return a DEVESC_NOTIMPLEMENTED code. For other drivers, it is simulated by a handling routine in the graphics engine.

Syntax

GreEscape(hdc, lEscape, cInCount, pInData, pcOutCount, pOutData, pInstance, lFunction)

Parameters

hdc (HDC) - input
Device context handle.
lEscape (LONG) - input
DEVESC_BREAK_EXTRA escape code.
cInCount (LONG) - input
Number of bytes pointed to by pInData. When cInCount=0, the handling routine resets the extra width to 0.
pInData (PBYTE) - input
If cInCount is not equal to 0, pInData is a pointer to a fixed value. This value is the required extra width defined in world coordinates.
pcOutCount (PLONG) - input
The handling routine ignores this parameter.
pOutData (PLONG) - input
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

Remarks

The handling routine sets or resets, as determined by the value of cInCount, an extra width value for the break character. Upon completion, the width of the break character is the default width specified by the font plus any extra widths set by DEVESC_BREAK_EXTRA and DEVESC_CHAR_EXTRA. The extra widths can be positive, zero, or negative.

This escape code is implemented by old hardcopy drivers. The function of this escape code is replaced by the character attribute fxBreakExtra. See Character Attributes.

This escape code is metafiled and recorded.

Source Code Sample

Declaration:

#define INCL_GRE_DEVICE
#include <os2.h>

HDC      hdc;         /* Device context handle. */
LONG     lEscape;     /* DEVESC_BREAK_EXTRA escape code. */
LONG     cInCount;    /* Number of bytes pointed to by pInData. */
PBYTE    pInData;     /* If cInCount is not equal to 0, pInData is a pointer to a fixed value. */
PLONG    pcOutCount;  /* The handling routine ignores this parameter. */
PLONG    pOutData;    /* The handling routine ignores this parameter. */
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, count, pOutData, pInstance, lFunction);