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

The Window structure is the main Intuition data structure used to
represent a window.  For the most part, applications treat this structure
only as a handle.  Window operations are performed by calling system
functions that take Window as an argument instead of directly manipulating
fields within the structure.  However, there are some useful variables in
a Window structure which are discussed in this section.

   struct Window
       struct Window *NextWindow;
       WORD LeftEdge, TopEdge, Width, Height;
       WORD MouseY, MouseX;
       WORD MinWidth, MinHeight;
       UWORD MaxWidth, MaxHeight;
       ULONG Flags;
       struct Menu *MenuStrip;
       UBYTE *Title;
       struct Requester *FirstRequest, *DMRequest;
       WORD ReqCount;
       struct Screen *WScreen;
       struct RastPort *RPort;
       BYTE BorderLeft, BorderTop, BorderRight, BorderBottom;
       struct RastPort *BorderRPort;
       struct Gadget *FirstGadget;
       struct Window *Parent, *Descendant;
       UWORD *Pointer;
       BYTE PtrHeight, PtrWidth;
       BYTE XOffset, YOffset;
       ULONG IDCMPFlags;
       struct MsgPort *UserPort, *WindowPort;
       struct IntuiMessage *MessageKey;
       UBYTE DetailPen, BlockPen;
       struct Image *CheckMark;
       UBYTE *ScreenTitle;
       WORD GZZMouseX, GZZMouseY, GZZWidth, GZZHeight;
       UBYTE *ExtData;
       BYTE *UserData;
       struct Layer *WLayer;
       struct TextFont *IFont;
       ULONG MoreFlags;

LeftEdge, TopEdge, Width and Height
    These variables reflect current position and size of the window.  If
    the user sizes or positions the window, then these values will
    change. The position of the window is relative to the upper left
    corner of the screen.

MouseX, MouseY, GZZMouseX, GZZMouseY
    The current position of the Intuition pointer with respect to the
    window, whether or not this window is currently the active one.  For
    GimmeZeroZero windows, the GZZ variables reflect the position
    relative to the inner layer (see "Window Types" below).  For normal
    windows, the GZZ variables reflect the position relative to the
    window origin after taking the borders into account.

    Contains a count of the number of requesters currently displayed in
    the window.  Do not rely on the value in this field, instead use
    IDCMP_REQSET and IDCMP_REQCLEAR to indirectly determine the number of
    open requesters in the window.

    A pointer to the Screen structure of the screen on which this window
    was opened.

    A pointer to this window's RastPort structure.  Use this RastPort
    pointer to render into your window with Intuition or graphics library
    rendering functions.

BorderLeft, BorderTop, BorderRight, BorderBottom
    These variables describe the actual size of the window borders. The
    border size is not changed after the window is opened.

    With GimmeZeroZero windows, this variable points to the RastPort for
    the outer layer, in which the border gadgets are kept.

    This pointer is available for application use.  The program can
    attach a data block to this window by setting this variable to point
    to the data.

For a commented listing of the Window structure see
<intuition/intuition.h> in the Amiga ROM Kernel Reference Manual: Includes
and Autodocs.

[Back to Amiga Developer Docs]