|
|
MoreDesk provides some SWI calls which can be used to drive it from your programs. These calls can read the state of MoreDesk, set which desktop is currently being viewed or raise (or clear) a flashing alert for a window.
In...
| R0 | flags word (see below) | |
| R1 | number of desktop columns | |
| R2 | number of desktop rows |
Out...
| None |
This call will either move the current desktop to a specified location (bit zero of R0 is clear on entry) or it will move by the specified offset from the current desktop (bit zero of R0 is set on entry). All other flag bits are reserved and should be zero.
Note: it takes time for the desktop to be changed so you may have to wait before the change is reflected by SWI MoreDesk_ReadInfo.
Bits one to thirty one of R0 are reserved and should be zero.
In...
| R0 | flags word (reserved, should be zero) |
Out...
| R1 | total number of desktop columns | |
| R2 | total number of desktop rows | |
| R3 | current desktop column | |
| R4 | current desktop row |
This call returns the current dimensions of the total desk space, along with the co-ordinates of the current desktop. The ‘home’ desktop is considered to be 0,0 so the values of R3 and R4 may be negative on exit.
All bits in the flags word R0 are currently reserved and should be set to zero on entry.
In...
| R0 |
flags word. Bit meaning when set: 0 - R1 is a window handle (else pointer to zero-terminated title string) 1 - open the micro view 2 - open the main window (only for very important events) 3 - flash even when window is in current desktop 4 - cancel flash state after flash time Other bits are reserved, should be zero | |
| R1 | window handle or pointer to zero-terminated title string | |
| R2 | flash duration (centi-seconds) |
Out...
| None |
This SWI will start or stop a flash event for the nominated window. A window can be specified using either its title string (which is compared in a case-insensitive manner) or the window handle. Where multiple windows match a given title, the top-most window in the window stack is selected.
A flash event is used to draw the user's attention to a window, usually off-screen. It is cleared automatically by MoreDesk when the flashing window is brought onto the current desktop.
Application programmers can cause flash events to open the MoreDesk micro view, which will flash the desktop corresponding to the one containing the specified window.
The MoreDesk main window view of the entire desk space can be opened when the flast state is set. However, as the main window is usually large and can cause significant distraction to the user, this should only be done if the reason for the flash event is serious (e.g. something has gone wrong).
The flashing event can either automatically clear itself after an elapsed number of seconds or the alert window will stop flashing but remain in a highlighted state until the user switches onto the desktop which contains the flashing window or brings that window into the current desktop.
A window is defined as being in a desktop if the centre of the window's visible extent (i.e. visible area plus scroll bars, title bar, etc.) lies within the bounds of that desktop.
Note: a user can manually close the main or micro windows after a flash event has opened them. This does not affect the flash states.
To cancel a flash event for a specified window, this SWI is called with R2 set to zero. In this case, only bit zero of R0 is significant.
A flash state can be set to continue indefinitely (meaning until the user brings that window onto the current desktop, or the window is closed, or the flash state is specifically cancelled through a call to MoreDesk). To do this, pass -1 in R2.
Note: closed or iconised windows cannot be assigned a flash state. The act of closing or iconising a window will clear its flash state.
This SWI will return the error “Unknown window to flash” if the specified window is not known to MoreDesk (e.g. pane windows are normally ignored).