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


    NAME
        CloseScreen -- close an intuition screen.

    SYNOPSIS
        Success = CloseScreen( screen )
        D0 (V36)               A0

        bool closescreen( struct screen * );
        /* returns bool in v36 and greater */

    FUNCTION
        Unlinks the screen, unlinks the viewport, deallocates everything that
        Intuition allocated when the screen was opened (using openscreen()).
        Doesn't care whether or not there are still any windows attached to the
        screen.  Doesn't try to close any attached windows; in fact, ignores
        them altogether (but see below for changes in V36).

        If this is the last screen to go, attempts to reopen Workbench.

        New for V36: this function will refuse to close the screen
        if there are windows open on the screen or if there are any
        outstanding screen locks (see lockpubscreen()) when
        CloseScreen() is called.  This avoids the almost certain crash
        when a screen is closed out from under a window.

    INPUTS
        screen = pointer to the screen to be closed.

    RESULT
        New for V36: returns TRUE (1) if screen is closed,
        returns FALSE (0) if screen had open windows when
        called.

    BUGS

    SEE ALSO
        openscreen()