Query a visible extent
int PhWindowQueryVisible( unsigned flag, PhRid_t rid, unsigned input_group, PhRect_t *rect );
ph
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 with which input group the visible extent must intersect. To determine the current input group, call PhInputGroup(), passing to it the current event, if any.
You must set at most one of the following bits in flags:
Ph_QUERY_CONSOLE is the default value.
You can OR the following into flags:
PhWindowQueryVisible() places the visible extent in the PhRect_t structure pointed to by rect.
Determine the absolute coordinates of the current console:
PhRect_t extent; if( PhWindowQueryVisible( Ph_QUERY_CONSOLE, 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 |
Window Management chapter of the Photon Programmer's Guide