[Contents] [Index] [Help] [Retrace] [Browse <] [Browse >]

A window is opened and displayed by a call to one of the OpenWindow()
functions:  OpenWindow(), OpenWindowTagList() or OpenWindowTags().

    struct Window *OpenWindowTagList( struct NewWindow *newWindow,
                                     struct TagItem *tagList );
    struct Window *OpenWindowTags( struct NewWindow *newWindow,
                                  unsigned long tag1Type, ... );
    struct Window *OpenWindow( struct NewWindow *newWindow );

The type of window and its attributes are specified in NewWindow or
TagItem structures depending on which function is used.  These functions
all return a pointer to a new Window structure if they succeed.  A NULL
return indicates failure.

OpenWindowTagList() and OpenWindowTags() are available only in Release 2
(V36) and later versions of the OS.  For these functions, window
attributes are specified in TagItem structures which are paired data items
specifying an attribute and its setting.  (See the `Utility Library'
chapter for more information on TagItems.)

OpenWindow() is available in all versions of the OS.  Window attributes
can be specified using a NewWindow structure but only a limited set of
window attributes are available this way.  To support both the new window
features of Release 2 and compatibility with older versions of the OS, use
OpenWindow() with an extended version of the NewWindow structure named
ExtNewWindow.  See the WFLG_NW_EXTENDED flag description in the "Window
Attributes" section below for more information on using OpenWindow() with
the extended NewWindow structure.

Further references to OpenWindow() in this chapter will apply to all three
functions.  These calls are the only proper method for allocating a Window
structure.  The tag based versions are recommended for V36 and later
versions of the OS.  Use the ExtNewWindow structure with OpenWindow() to
provide backward compatibility.

 OpenWindowTagList() Example    Setting Window Attributes 

[Back to Amiga Developer Docs]