Unit 'intuition' Package
[Overview][Constants][Types][Procedures and functions][Variables][Index] [#os4units]

LockPubScreen

Prevent a public screen from closing.

Declaration

Source position: intuition.pas line 3887

function LockPubScreen(

  const Name: PChar

):PScreen;

Arguments

Name

  

Name string for public screen or NULL for default public screen. The string 'Workbench' indicates the Workbench screen.

Function result

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.

Description

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.

See also

OpenWindow

  

Open an Intuition window.

UnlockPubScreen

  

Release lock on a public screen.

GetScreenData

  

Get copy of a screen data structure.


Documentation generated on: 2021-07-30