Fanuc C-Executer Operating Manual
B-62443EN-3/03E
- 738 -
For example, three windows are opened now as below. This function
returns the following result.
+[1]-------------+
|Selected |
+[2]---| |
| | |
| | +[3]-------------+
| | |Active |
| +------| |
| | |
| | |
+-------------| |
+----------------+
stat.selected = 1
stat.active = 3
stat.numwin = 3
stat.winstack[0] = 3
stat.winstack[1] = 1
stat.winstack[2] = 2
(stat.winstack[3] and later are undefined.)
When "stat.numwin" = 0, that is, no window is opend, the contents of
"selected", "active" and "winstack" are undefined.
[Example]
The following program tests if the currently active window is selected
or not, then, if not, selects it.
#include <crt.h>
void example( void )
{
struct winstat stat ;
win_getstat( &stat ) ;
if ( ( numwin != 0 ) && ( stat.selected != stat.active ) )
win_select( stat.active ) ;
}