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


NAME
    AddAppWindow - add a window to workbench's list of appwindows.  (V36)

SYNOPSIS
    appwindow = addappwindowa(id, userdata, window, msgport, taglist)
    D0                        D0     D1       A0      A1       A2

    struct appwindow *addappwindowa(ulong, ulong, struct window *,
                                    struct msgport *, struct tagitem *);

    Alternate, varargs version:
    struct appwindow *addappwindow(ulong, ulong, struct window *,
                                    struct msgport *
                                    tag1, data1,
                                    tag2, data2,
                                    ...
                                    TAG_END );

FUNCTION
    Attempt to add the window to workbench's list of appwindows.
    Normally non-workbench windows (those not opened by workbench)
    cannot have icons dropped in them.  This call is provided to
    allow applications to be notified when an icon or icons get
    dropped inside a window that they have registered with workbench.
    The notification consists of an appmessage (found in workbench.h/i)
    of type 'MTYPE_APPWINDOW' arriving at the message port you specified.
    What you do with the list of icons (pointed to by am_ArgList) is
    up to you, but generally you would want to call getdiskobjectnew on
    them.

INPUTS
    id       - this variable is strictly for your own use and is ignored
               by workbench.  Typical uses in C are in switch and case
               statements, and in assembly language table lookup.
    userdata - this variable is strictly for your own use and is ignored
               by workbench.
    window   - pointer to window to add.
    msgport  - pointer to message port workbench will use to send you an
               appmessage message of type 'mtype_appwindow' when your
               window gets an icon or icons dropped in it.
    taglist  - ptr to a list of tag items.  Must be NULL for V2.0.

RESULTS
    appwindow - a pointer to an appwindow structure which you pass to
                removeappwindow when you want to remove the window
                from workbench's list of appwindows.  NULL
                if workbench was unable to add your window; typically
                happens when workbench is not running or under low
                memory conditions.

SEE ALSO
    removeappwindow()

NOTES
   The V2.0 icon editor is an example of an app window.  Note that app
   window applications generally want to call getdiskobjectnew
   (as opposed to GetDiskObject) to get the disk object for the icon
   dropped in the window.

BUGS
    None