2 Copyright © 1995-2013, 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. Other open requesters
41 of this window stay alive.
44 requester - The requester to be deleted
45 window - The window to which the requester belongs
57 InitRequester(), Request()
61 *****************************************************************************/
65 struct EndRequestActionMsg msg
;
67 DEBUG_REQUEST(dprintf("EndRequest: req 0x%lx window 0x%lx\n", requester
, window
));
70 SANITY_CHECK(requester
)
72 msg
.requester
= requester
;
75 DoSyncAction((APTR
)int_endrequest
, &msg
.msg
, IntuitionBase
);
77 DEBUG_REQUEST(dprintf("EndRequest: removed succesfuly\n"));
83 static VOID
int_endrequest(struct EndRequestActionMsg
*msg
,
84 struct IntuitionBase
*IntuitionBase
)
86 struct LayersBase
*LayersBase
= GetPrivIBase(IntuitionBase
)->LayersBase
;
87 struct Window
*window
= msg
->window
;
88 struct Requester
*requester
= msg
->requester
;
89 struct Requester
*p
= window
->FirstRequest
;
90 // struct IIHData *iihdata = (struct IIHData *)GetPrivIBase(IntuitionBase)->InputHandler->is_Data;
93 //jDc: intuition68k doesn't care (tested)
94 //if (requester->Flags & REQACTIVE)
96 LOCKWINDOWLAYERS(window
);
100 window
->FirstRequest
= requester
->OlderRequest
;//unliked
102 while (p
&& (p
->OlderRequest
!= requester
))
107 p
->OlderRequest
= requester
->OlderRequest
;//unlinked
113 struct Screen
*screen
= window
->WScreen
;
116 requester
->Flags
&= ~REQACTIVE
;
118 LOCK_REFRESH(screen
);
119 if (requester
->ReqLayer
) DeleteLayer(0, requester
->ReqLayer
);
120 requester
->OlderRequest
= 0;
121 requester
->ReqLayer
= 0; //sanity
122 CheckLayers(screen
, IntuitionBase
);
123 UNLOCK_REFRESH(screen
);
125 ih_fire_intuimessage(window
,
134 UNLOCKWINDOWLAYERS(window
);