2 Copyright © 1995-2007, The AROS Development Team. All rights reserved.
3 Copyright © 2001-2003, The MorphOS Development Team. All Rights Reserved.
7 #include "intuition_intern.h"
8 #include "inputhandler_actions.h"
10 struct SetDMRequestActionMsg
12 struct IntuiActionMsg msg
;
13 struct Window
*window
;
14 struct Requester
*dmrequest
;
18 static VOID
int_setdmrequest(struct SetDMRequestActionMsg
*msg
,
19 struct IntuitionBase
*IntuitionBase
);
21 /*****************************************************************************
24 #include <proto/intuition.h>
26 AROS_LH2(BOOL
, SetDMRequest
,
29 AROS_LHA(struct Window
* , window
, A0
),
30 AROS_LHA(struct Requester
*, dmrequest
, A1
),
33 struct IntuitionBase
*, IntuitionBase
, 43, Intuition
)
36 Try to set the DMRequest of a window.
37 A DMRequest is a requester that appears if the user double-clicks
39 The new DMRequest will only be set if the old DMRequest is not in use.
40 The official way to change the DMRequest is to call ClearDMRequest()
41 until it returns TRUE and then call SetDMRequest().
45 window - The window from which the DMRequest is to be set
46 dmrequest - Pointer to the requester
49 TRUE if old DMRequest was not in use and therefore changed to
50 the new one, or FALSE if the old DMRequest was in use and could
51 not be set to the new one.
54 If the DMRequest has the POINTREL flag set, the DMR will show up
55 as close to the pointer as possible. The RelLeft/Top fields are
56 used to fine-tune the positioning.
63 ClearDMRequest(), Request()
69 *****************************************************************************/
73 struct SetDMRequestActionMsg msg
;
75 SANITY_CHECKR(window
,FALSE
)
76 SANITY_CHECKR(dmrequest
,FALSE
)
79 msg
.dmrequest
= dmrequest
;
81 DoSyncAction((APTR
)int_setdmrequest
, &msg
.msg
, IntuitionBase
);
89 static VOID
int_setdmrequest(struct SetDMRequestActionMsg
*msg
,
90 struct IntuitionBase
*IntuitionBase
)
92 struct Window
*window
= msg
->window
;
93 struct Requester
*dmrequest
= msg
->dmrequest
;
96 if (window
->DMRequest
&& window
->DMRequest
->Flags
& REQACTIVE
)
102 window
->DMRequest
= dmrequest
;
106 msg
->success
= result
;