2 Copyright © 1995-2011, The AROS Development Team. All rights reserved.
3 Copyright © 2001-2003, The MorphOS Development Team. All Rights Reserved.
7 #include <proto/layers.h>
8 #include "intuition_intern.h"
9 #include "inputhandler_actions.h"
15 struct EndRequestActionMsg
17 struct IntuiActionMsg msg
;
18 struct Requester
*requester
;
19 struct Window
*window
;
22 static VOID
int_endrequest(struct EndRequestActionMsg
*msg
,
23 struct IntuitionBase
*IntuitionBase
);
25 /*****************************************************************************
28 #include <proto/intuition.h>
30 AROS_LH2(void, EndRequest
,
33 AROS_LHA(struct Requester
*, requester
, A0
),
34 AROS_LHA(struct Window
* , window
, A1
),
37 struct IntuitionBase
*, IntuitionBase
, 20, Intuition
)
40 Remove a requester from the specified window.
41 Other open requesters of this window stay alive.
44 requester - The requester to be deleted
45 window - The window to which the requester belongs
57 InitRequester(), Request()
63 *****************************************************************************/
67 struct EndRequestActionMsg msg
;
69 DEBUG_REQUEST(dprintf("EndRequest: req 0x%lx window 0x%lx\n", requester
, window
));
72 SANITY_CHECK(requester
)
74 msg
.requester
= requester
;
77 DoSyncAction((APTR
)int_endrequest
, &msg
.msg
, IntuitionBase
);
79 DEBUG_REQUEST(dprintf("EndRequest: removed succesfuly\n"));
85 static VOID
int_endrequest(struct EndRequestActionMsg
*msg
,
86 struct IntuitionBase
*IntuitionBase
)
88 struct LayersBase
*LayersBase
= GetPrivIBase(IntuitionBase
)->LayersBase
;
89 struct Window
*window
= msg
->window
;
90 struct Requester
*requester
= msg
->requester
;
91 struct Requester
*p
= window
->FirstRequest
;
92 // struct IIHData *iihdata = (struct IIHData *)GetPrivIBase(IntuitionBase)->InputHandler->is_Data;
95 //jDc: intuition68k doesn't care (tested)
96 //if (requester->Flags & REQACTIVE)
98 LOCKWINDOWLAYERS(window
);
102 window
->FirstRequest
= requester
->OlderRequest
;//unliked
104 while (p
&& (p
->OlderRequest
!= requester
))
109 p
->OlderRequest
= requester
->OlderRequest
;//unlinked
115 struct Screen
*screen
= window
->WScreen
;
118 requester
->Flags
&= ~REQACTIVE
;
120 LOCK_REFRESH(screen
);
121 if (requester
->ReqLayer
) DeleteLayer(0, requester
->ReqLayer
);
122 requester
->OlderRequest
= 0;
123 requester
->ReqLayer
= 0; //sanity
124 CheckLayers(screen
, IntuitionBase
);
125 UNLOCK_REFRESH(screen
);
127 ih_fire_intuimessage(window
,
136 UNLOCKWINDOWLAYERS(window
);