Programming Guide


Rotates the display of sibling windows

int sm_wrotate(int step);

A positive or negative integer that specifies the number of times to rotate the windows. A positive value makes the topmost sibling window the last sibling window for each instance of step. A negative value makes the last sibling window first window. A value of 0 specifies to perform no rotations.



sm_wrotate rotates the sequence of sibling windows according to the value of step. For example, given the following sequence of sibling windows A, B, and C:

this following function call:

sib_windows = sm_wrotate(1);

rotates the top sibling window C to the bottom of the sibling stack and leaves screen B on top.

Conversely, this function call supplies a value of -1:

sib_windows = sm_wrotate(-1);

This rotates the bottom sibling window C to the top:

sm_wrotate can take any value, positive or negative, as the step value. If the value of step is greater than one, Panther rotates the windows that many times. For example, given the previous window order, this call tells Panther to perform two rotations:

sib_windows = sm_wrotate(2);

This moves the top two windows to the back—first C, then B. This leaves window A as the topmost window:

See Also

sm_setsibling, sm_wselect