[Overview][Constants][Types][Procedures and functions][Variables][Index] Reference for unit 'Intuition' (#aros)


Prevent a public screen from closing.


Source position: intuition.pas line 3272

function LockPubScreen(

  const Name: STRPTR





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.


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:

  // ... examine fields ...
  OpenWindow(); //on public screen
  // ... 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



Open an Intuition window.



Release lock on a public screen.



Get copy of a screen data structure.

Documentation generated on: 2017-01-10