[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.

ReqCount
    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.

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

RPort
    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.

BorderRPort
    With gimmezerozero windows, this variable points to the rastport for
    the outer layer, in which the border gadgets are kept.

UserData
    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.