Prevent a public screen from closing.
Source position: intuition.pas line 3272
function LockPubScreen( |
const Name: PChar |
):PScreen; |
Name |
|
Name string for public screen or NULL for default public screen. The string 'Workbench' indicates the Workbench screen. |
Returns pointer to a screen, if successful, else nil. The call can fail for reasons including that the named public screen doesn't exist or is in private state.
Prevents a public screen (or the Workbench) from closing while you examine it in preparation of opening a visitor window.
The sequence you use to open a visitor window that needs to examine fields in the screen it is about to open on is:
LockPubScreen(); // ... examine fields ... OpenWindow(); //on public screen UnlockPubScreen(); // ... use your window ... // CloseWindow();
You needn't hold the "pubscreen lock" for the duration that your window is opened. LockPubScreen() basically has the same effect as an open visitor window: it prevents the screen from being closed.
If you pass the string 'Workbench' or you pass nil and there is no default public screen, the Workbench screen will be automatically opened if it is not already present.
|
Open an Intuition window. |
|
|
Release lock on a public screen. |
|
|
Get copy of a screen data structure. |