2 Copyright © 1995-2003, The AROS Development Team. All rights reserved.
9 #include <exec/types.h>
10 #include <proto/exec.h>
11 #include <proto/reqtools.h>
12 #include <proto/intuition.h>
13 #include <exec/libraries.h>
14 #include <exec/memory.h>
15 #include <libraries/reqtools.h>
16 #include <aros/libcall.h>
18 #include "reqtools_intern.h"
22 /*****************************************************************************
26 AROS_LH4(void, rtSetReqPosition
,
30 AROS_LHA(ULONG
, reqpos
, D0
),
31 AROS_LHA(struct NewWindow
*, nw
, A0
),
32 AROS_LHA(struct Screen
*, scr
, A1
),
33 AROS_LHA(struct Window
*, win
, A2
),
37 struct ReqToolsBase
*, ReqToolsBase
, 21, ReqTools
)
40 Sets newwindow->LeftEdge and newwindow->TopEdge according to reqpos.
42 Except for the left- and topedge 'newwindow' must already be
43 completely initialized.
45 The newwindow->LeftEdge and newwindow->TopEdge already in the
46 NewWindow structure will be used as offsets to the requested
47 position. If you'd like a window at position (25,18) from the top
48 left of the screen you would fill newwindow->LeftEdge with 25,
49 newwindow->TopEdge with 18 and call rtSetReqPosition() with reqpos
50 equal to REQPOS_TOPLEFTSCR.
52 Don't forget to make sure newwindow->LeftEdge and newwindow->TopEdge
53 are 0 if you don't want to offset your window.
55 In case of REQPOS_POINTER you can use them to point to your window's
56 hotspot, where the pointer should point. If you call
57 rtSetReqPosition() with the left- and topedge equal to 0 you'd get
58 a window appearing with its top- and leftedge equal to the current
61 Note that the screen pointer may _NOT_ be NULL. If you have your
62 own window open you can supply yourwindow->WScreen to this function.
64 The window pointer is only required if reqpos is REQPOS_CENTERWIN or
65 REQPOS_TOPLEFTWIN. Even in this case you may call rtSetReqPosition()
66 with a NULL window pointer. The positions will simply fall back to
67 REQPOS_CENTERSCR and REQPOS_TOPLEFTSCR respectively.
70 reqpos - one of the REQPOS_... constants usable with RT_ReqPos.
71 newwindow - pointer to your (already initialized) NewWindow
73 screen - pointer to screen the requester will appear on.
74 window - pointer to parent window or NULL.
80 This function is for the advanced ReqTools user.
94 ******************************************************************************/
98 RTFuncs_rtSetReqPosition(reqpos
, nw
, scr
, win
);
102 } /* rtSetReqPosition */