GreUpdateCursor: Difference between revisions
No edit summary |
mNo edit summary |
||
Line 1: | Line 1: | ||
GreUpdateCursor updates the drawn alphanumeric cursor to match the cursor state information contained in the presentation space. | GreUpdateCursor updates the drawn alphanumeric cursor to match the cursor state information contained in the presentation space. | ||
; Simulation support: This function is mandatory for display drivers. For other drivers, it is simulated by a handling routine in the graphics engine. | ;Simulation support: This function is mandatory for display drivers. For other drivers, it is simulated by a handling routine in the graphics engine. | ||
==Syntax== | ==Syntax== | ||
GreUpdateCursor(hdc, pVioPS, pInstance, lFunction) | GreUpdateCursor(hdc, pVioPS, pInstance, lFunction) | ||
==Parameters== | ==Parameters== | ||
;hdc (HDC) - input | ;hdc (HDC) - input:The device context handle. | ||
:The device context handle. | ;pVioPS (VioPresentationSpace *) - input:A pointer to the Vio presentation space. | ||
;pInstance (PVOID) - input:A pointer to instance data. | |||
;pVioPS (VioPresentationSpace *) - input | ;lFunction (ULONG) - input:High-order WORD=flags; low-order WORD=NGreUpdateCursor. | ||
:A pointer to the Vio presentation space. | |||
;pInstance (PVOID) - input | |||
:A pointer to instance data. | |||
;lFunction (ULONG) - input | |||
:High-order WORD=flags; low-order WORD=NGreUpdateCursor. | |||
==Return Code== | ==Return Code== | ||
;rc (LONG) - returns | ;rc (LONG) - returns:Return codes. | ||
:Return codes. | :This function returns a LONG value as an error indicator: | ||
* NO_ERROR Successful | |||
* CE_INVALID_PRESENTATION_SPACE Error. For example, this message might be returned as a result of an invalid CellByteSize. | |||
This function | ==Remarks== | ||
This function usually involves removing the previous cursor from the window and drawing the new cursor, if visible, according to the presentation space information. The new cursor (if visible) is positioned and clipped according to this information and the window's cell-buffer origin and size. | |||
The cursor is drawn as an Exclusive-OR bar. Its new position, size, and shape are saved by the handling routine in the VioPresentationSpace. Only one cursor can be visible on the screen at any time and it must be in the window with the input focus. This requirement is enforced by the operating system for VIO functions but not for AVIO. The AVIO application must alter the visibility of the cursor when changing input focus. When the text cursor collides with an AVIO and VIO drawing, the presentation driver must remove and redraw the cursor around the alphanumeric updates. | |||
This | |||
;Note: GreBitblt copies everything including the cursor. | |||
The presentation driver can assume that the values in the RowOrgLatch and CursorWidth fields of the VioPresentationSpace structure parallel the WindowOriginRow and TextCursorWidth, respectively. | |||
==Declaration== | ==Declaration== | ||
<PRE> | <PRE> | ||
Line 41: | Line 32: | ||
#include <os2.h> | #include <os2.h> | ||
HDC | HDC hdc; /* The device context handle. */ | ||
VioPresentationSpace | VioPresentationSpace *pVioPS; /* A pointer to the Vio presentation space. */ | ||
PVOID | PVOID pInstance; /* A pointer to instance data. */ | ||
ULONG | ULONG lFunction; /* High-order WORD=flags; low-order WORD=NGreUpdateCursor. */ | ||
LONG | LONG rc; /* Return codes. */ | ||
rc = GreUpdateCursor(hdc, pVioPS, pInstance, lFunction); | rc = GreUpdateCursor(hdc, pVioPS, pInstance, lFunction); |
Latest revision as of 18:34, 28 February 2020
GreUpdateCursor updates the drawn alphanumeric cursor to match the cursor state information contained in the presentation space.
- Simulation support
- This function is mandatory for display drivers. For other drivers, it is simulated by a handling routine in the graphics engine.
Syntax
GreUpdateCursor(hdc, pVioPS, pInstance, lFunction)
Parameters
- hdc (HDC) - input
- The device context handle.
- pVioPS (VioPresentationSpace *) - input
- A pointer to the Vio presentation space.
- pInstance (PVOID) - input
- A pointer to instance data.
- lFunction (ULONG) - input
- High-order WORD=flags; low-order WORD=NGreUpdateCursor.
Return Code
- rc (LONG) - returns
- Return codes.
- This function returns a LONG value as an error indicator:
- NO_ERROR Successful
- CE_INVALID_PRESENTATION_SPACE Error. For example, this message might be returned as a result of an invalid CellByteSize.
Remarks
This function usually involves removing the previous cursor from the window and drawing the new cursor, if visible, according to the presentation space information. The new cursor (if visible) is positioned and clipped according to this information and the window's cell-buffer origin and size.
The cursor is drawn as an Exclusive-OR bar. Its new position, size, and shape are saved by the handling routine in the VioPresentationSpace. Only one cursor can be visible on the screen at any time and it must be in the window with the input focus. This requirement is enforced by the operating system for VIO functions but not for AVIO. The AVIO application must alter the visibility of the cursor when changing input focus. When the text cursor collides with an AVIO and VIO drawing, the presentation driver must remove and redraw the cursor around the alphanumeric updates.
- Note
- GreBitblt copies everything including the cursor.
The presentation driver can assume that the values in the RowOrgLatch and CursorWidth fields of the VioPresentationSpace structure parallel the WindowOriginRow and TextCursorWidth, respectively.
Declaration
#define INCL_AVIOP #include <os2.h> HDC hdc; /* The device context handle. */ VioPresentationSpace *pVioPS; /* A pointer to the Vio presentation space. */ PVOID pInstance; /* A pointer to instance data. */ ULONG lFunction; /* High-order WORD=flags; low-order WORD=NGreUpdateCursor. */ LONG rc; /* Return codes. */ rc = GreUpdateCursor(hdc, pVioPS, pInstance, lFunction);