Jump to content

GreGetScreenChangeArea: Difference between revisions

From EDM2
Created page with "GreGetScreenChangeArea takes an SCA handle and, for the identified SCA, adds its rectangles to the region pointed to by the phrgn field. The SCA is reset to NULL as a result o..."
 
Ak120 (talk | contribs)
m uwe
 
Line 1: Line 1:
GreGetScreenChangeArea takes an SCA handle and, for the identified SCA, adds its rectangles to the region pointed to by the phrgn field. The SCA is reset to NULL as a result of this call.  
GreGetScreenChangeArea takes an SCA handle and, for the identified SCA, adds its rectangles to the region pointed to by the phrgn field. The SCA is reset to NULL as a result of this call.


;Simulation support: This function is mandatory for display drivers that want to be DCAF-enabled.  
;Simulation support: This function is mandatory for display drivers that want to be DCAF-enabled.


== Syntax ==  
== Syntax ==  
  GreGetScreenChangeArea(hdc, hsca, phrgn, pdcArg, FunN);
  GreGetScreenChangeArea(hdc, hsca, phrgn, pdcArg, FunN)


== Parameters ==
== Parameters ==
;hdc (HDC) - input  
;hdc (HDC) - input:Any valid device context.
:Any valid device context.  
;hsca (HSCA) - input:Handle of the SCA to be queried.
 
:To be valid, the handle must be obtained from a previous call to [[GreOpenScreenChangeArea]].
;hsca (HSCA) - input  
;phrgn ([[PHRGN]]) - input:Pointer to a region handle.
:Handle of the SCA to be queried.  
;pdcArg (PDC) - input:Pointer to instance data.
 
;FunN (ULONG) - input:High-order word=Flags; Low-order word=NGreGetScreenArea.
:To be valid, the handle must be obtained from a previous call to GreOpenScreenChangeArea.  
 
;phrgn (PHRGN) - input  
:Pointer to a region handle.  
 
;pdcArg (PDC) - input  
:Pointer to instance data.  
 
;FunN (ULONG) - input  
:High-order word=Flags; Low-order word=NGreGetScreenArea.  


== Returns ==
== Returns ==
;rc (LONG) - returns  
;rc (LONG) - returns:This function returns one of the following:
:This function returns one of the following:  
:*TRUE If the handle passed is recognized and no errors occurred.
 
:*FALSE All other cases.
:*TRUE If the handle passed is recognized and no errors occurred.  
: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:
:*FALSE All other cases.  
:*PMERR_INV_HDC
 
:*PMERR_NO_HANDLE
: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:  
:Refer to the "Error Explanations" section in the ''Presentation Manager Programming Reference'' for further explanation.
:*PMERR_INV_HDC  
:*PMERR_NO_HANDLE  
:Refer to the "Error Explanations" section in the Presentation Manager Programming Reference for further explanation.  
 
== Sample ==
<pre>
#define INCL_GRE_SCREEN
#include <os2.h>
#include <pmddi.h>
 
HDC      hdc;    /*  Any valid device context. */
HSCA    hsca;    /*  Handle of the SCA to be queried. */
PHRGN    phrgn;  /*  Pointer to a region handle. */
PDC      pdcArg;  /*  Pointer to instance data. */
ULONG    FunN;    /*  High-order word=Flags; Low-order word=NGreGetScreenArea. */
LONG    rc;
 
rc = GreGetScreenChangeArea(hdc, hsca, phrgn,
      pdcArg, FunN);
 
</pre>


== Remarks ==
== Remarks ==
It is permissible to implement this function by returning 0 to indicate that the bits were not saved and, therefore, must be saved by the calling routine.  
It is permissible to implement this function by returning 0 to indicate that the bits were not saved and, therefore, must be saved by the calling routine.


GreGetScreenChangeArea calls EnterDriver and performs entry checks. Using the MergeSeamlessSCAWithGlobalSCAs routine, GreGetScreenChangeArea then checks to see if there are any rectangles in the Seamless SCA (called scaSeamless). If there are, they are merged with all of the currently active SCAs. MergeSeamlessSCAWithGlobalSCAs will call AccumulateScreenBound for every rectangle in scaSeamless. At the end, the cRects field of scaSeamless is set to zero. See Seamless Windows Support in Distributed Console Access Facility (DCAF) Architecture for more information on Seamless Windows support.  
GreGetScreenChangeArea calls EnterDriver and performs entry checks. Using the MergeSeamlessSCAWithGlobalSCAs routine, GreGetScreenChangeArea then checks to see if there are any rectangles in the Seamless SCA (called scaSeamless). If there are, they are merged with all of the currently active SCAs. MergeSeamlessSCAWithGlobalSCAs will call AccumulateScreenBound for every rectangle in scaSeamless. At the end, the cRects field of scaSeamless is set to zero. See Seamless Windows Support in Distributed Console Access Facility (DCAF) Architecture for more information on Seamless Windows support.


Next, the linked list is tracked until the SCA to be queried is found or the end of the linked list is reached. If the SCA to be queried is found, GreCombineRectRegion is called for all the rectangles in the SCA and adds the rectangles to the region passed by the user. If the call is always successful, the cRects field of the SCA is set to zero, resetting the SCA. If the end of the list is reached without finding the SCA, a PMERR_NO_ERROR is logged and the call returns FALSE.  
Next, the linked list is tracked until the SCA to be queried is found or the end of the linked list is reached. If the SCA to be queried is found, GreCombineRectRegion is called for all the rectangles in the SCA and adds the rectangles to the region passed by the user. If the call is always successful, the cRects field of the SCA is set to zero, resetting the SCA. If the end of the list is reached without finding the SCA, a PMERR_NO_ERROR is logged and the call returns FALSE.


If there were no errors, GreGetScreenChangeArea calls ExitDriver and returns TRUE.  
If there were no errors, GreGetScreenChangeArea calls ExitDriver and returns TRUE.


[[Category:Gre]]
[[Category:Gre]]

Latest revision as of 12:27, 20 January 2020

GreGetScreenChangeArea takes an SCA handle and, for the identified SCA, adds its rectangles to the region pointed to by the phrgn field. The SCA is reset to NULL as a result of this call.

Simulation support
This function is mandatory for display drivers that want to be DCAF-enabled.

Syntax

GreGetScreenChangeArea(hdc, hsca, phrgn, pdcArg, FunN)

Parameters

hdc (HDC) - input
Any valid device context.
hsca (HSCA) - input
Handle of the SCA to be queried.
To be valid, the handle must be obtained from a previous call to GreOpenScreenChangeArea.
phrgn (PHRGN) - input
Pointer to a region handle.
pdcArg (PDC) - input
Pointer to instance data.
FunN (ULONG) - input
High-order word=Flags; Low-order word=NGreGetScreenArea.

Returns

rc (LONG) - returns
This function returns one of the following:
  • TRUE If the handle passed is recognized and no errors occurred.
  • FALSE All other cases.
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_INV_HDC
  • PMERR_NO_HANDLE
Refer to the "Error Explanations" section in the Presentation Manager Programming Reference for further explanation.

Remarks

It is permissible to implement this function by returning 0 to indicate that the bits were not saved and, therefore, must be saved by the calling routine.

GreGetScreenChangeArea calls EnterDriver and performs entry checks. Using the MergeSeamlessSCAWithGlobalSCAs routine, GreGetScreenChangeArea then checks to see if there are any rectangles in the Seamless SCA (called scaSeamless). If there are, they are merged with all of the currently active SCAs. MergeSeamlessSCAWithGlobalSCAs will call AccumulateScreenBound for every rectangle in scaSeamless. At the end, the cRects field of scaSeamless is set to zero. See Seamless Windows Support in Distributed Console Access Facility (DCAF) Architecture for more information on Seamless Windows support.

Next, the linked list is tracked until the SCA to be queried is found or the end of the linked list is reached. If the SCA to be queried is found, GreCombineRectRegion is called for all the rectangles in the SCA and adds the rectangles to the region passed by the user. If the call is always successful, the cRects field of the SCA is set to zero, resetting the SCA. If the end of the list is reached without finding the SCA, a PMERR_NO_ERROR is logged and the call returns FALSE.

If there were no errors, GreGetScreenChangeArea calls ExitDriver and returns TRUE.