Warning: main(/www/www/htdocs/style/globals.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/photon/lib_ref/ph/phwindowqueryvisible.html on line 1
Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/globals.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/photon/lib_ref/ph/phwindowqueryvisible.html on line 1
Warning: main(/www/www/htdocs/style/header.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/photon/lib_ref/ph/phwindowqueryvisible.html on line 8
Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/header.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/photon/lib_ref/ph/phwindowqueryvisible.html on line 8
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_GRAPHICS
- Return a graphics driver rectangle.
- Ph_QUERY_INPUT_GROUP
- Return input_group's rectangle.
- Ph_QUERY_CONSOLE
- Return a console's rectangle.
A console is defined as either an input group or a graphics driver,
depending on the window manager's Multi-monitor placement option.
In other words, this option is equivalent to either
Ph_QUERY_GRAPHICS or Ph_QUERY_INPUT_GROUP,
depending on your configuration.
- Ph_QUERY_WORKSPACE
- Return a console's rectangle minus any reserved space around the edges.
Ph_QUERY_CONSOLE is the default value.
You can OR the following into flags:
- Ph_QUERY_EXACT
- The visible extent that the function finds must match both
input_group and
rid;
otherwise, rid is a hint.
- Ph_QUERY_IG_POINTER
- Use the current location of
input_group's pointer
(rid is ignored).
- Ph_QUERY_IG_REGION
- Use input_group's rectangle.
PhWindowQueryVisible() places the visible extent in the
PhRect_t
structure pointed to by rect.
- 0
- The rect argument is valid.
- -1
- The rect argument is invalid.
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 |
PhRect_t
Window Management
chapter of the Photon Programmer's Guide
Warning: main(/www/www/htdocs/style/footer.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/photon/lib_ref/ph/phwindowqueryvisible.html on line 203
Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/footer.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/photon/lib_ref/ph/phwindowqueryvisible.html on line 203