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

OpenWindow

Open an Intuition window.

Declaration

Source position: intuition.pas line 3221

function OpenWindow(

  NewWindow: PNewWindow

):PWindow;

Arguments

NewWindow

  

A pointer to an instance of a NewWindow structure.

Function result

A pointer to the new window or nil if it couldn't be opened. Reasons for this might be lack of memory or illegal attributes.

Description

Opens an Intuition window of the given dimensions and position, with the properties specified in the NewWindow structure. Allocates everything you need to get going.

You can provide extensions to the NewWindow parameters using and array of TagItem structures.

Before you call OpenWindow(), you must initialize an instance of a NewWindow structure. NewWindow is a structure that contains all of the arguments needed to open a window. The NewWindow structure may be discarded immediately after it is used to open the window.

If Type = CUSTOMSCREEN_f, you must have opened your own screen already via a call to OpenScreen(). Then Intuition uses your screen argument for the pertinent information needed to get your window going. On the other hand, if Type = one of the Intuition's standard screens, your screen argument is ignored. Instead, Intuition will check to see whether or not that screen already exists: if it doesn't, it will be opened first before Intuition opens your window in the standard screen.

If you specify Type = WBENCHSCREEN_f, then your window will appear on the Workbench screen, unless the global public screen mode SHANGHAI is set, in which case your window will be "hijacked" to the default public screen. See also SetPubScreenModes().

If the WFLG_NW_EXTENDED flag is set, it means that the field TExtNewWindow.Extension points to an array of TagItems. This provides an extensible means of providing extra parameters to OpenWindow(). For compatibility reasons, we could not add the Extension field to the TNewWindow structure, so we have define a new structure TExtNewWindow, which is identical to TNewWindow with the addition of the Extension field.

We recommend that rather than using TExtNewWindow.Extension, you use the new Intuition function OpenWindowTagList() and its varargs equivalent OpenWindowTags(). We document the window attribute tag ID's (ti_Tag values) here, rather than in OpenWindowTagList(), so that you can find all the parameters for a new window defined in one place.

If the WFLG_SUPER_BITMAP flag is set, the bitmap variable must point to your own bitmap.

See also

CloseWindow

  

Close an Intuition window.

ModifyIDCMP

  

Modify the state of a window's IDCMPFlags.


Documentation generated on: 2017-01-10