Query a visible extent
int PhWindowQueryVisible( unsigned flag, PhRid_t rid, unsigned input_group, PhRect_t *rect );
If rid is zero, this function calculates the visible extent based on the region type specified in flag.
If rid is nonzero, PhWindowQueryVisible() calculates the visible extent by finding every region intersecting with rid that matches the region type specified in flag.
The input_group argument indicates which input group the visible extent must intersect with:
You must set flags to one of the following:
If flags is 0, Ph_QUERY_GRAPHICS is assumed.
PhWindowQueryVisible() places the visible extent in rect.
Determine the absolute coordinates of the current console:
PhRect_t extent; if( PhWindowQueryVisible( Ph_QUERY_GRAPHICS, 0, input_group, &extent ) == 0 ) { printf( "Upper left: (%d,%d) Lower right: (%d,%d)\n", extent.ul.x, extent.ul.y, extent.lr.x, extent.lr.y ); }
Photon
Safety: | |
---|---|
Interrupt handler | No |
Signal handler | No |
Thread | No |