Listtree.mcc: implement proxying of DisplayHook
[AROS.git] / workbench / libs / muimaster / mui_requestidcmp.c
blob6ca02317eae8ccfa724c8fc6c979b33e045173d7
1 /*
2 Copyright © 2002-2007, The AROS Development Team. All rights reserved.
3 $Id$
4 */
6 #include <clib/alib_protos.h>
7 #include <proto/muimaster.h>
9 #include <proto/intuition.h>
10 #include <intuition/classusr.h>
12 #include "muimaster_intern.h"
13 #include "mui.h"
15 /*****************************************************************************
17 NAME */
18 AROS_LH2(VOID, MUI_RequestIDCMP,
20 /* SYNOPSIS */
21 AROS_LHA(Object *, obj , A0),
22 AROS_LHA(ULONG , flags, D0),
24 /* LOCATION */
25 struct Library *, MUIMasterBase, 15, MUIMaster)
27 /* FUNCTION
28 For custom class implementors. Valid between MUIM_Setup/MUIM_Cleanup.
29 Indicates that this object wants to receive some events. MUIM_HandleInput
30 will then be called on this object whenever there's a matching event.
32 INPUTS
33 obj - an object whose class is derived from Area
34 flags - IDCMP flags
36 RESULT
37 None.
39 NOTES
40 Deprecated in favor of MUIM_Window_AddEventHandler and MUIM_HandleEvent
41 event handling model (introduced in MUI V16).
43 EXAMPLE
45 BUGS
47 SEE ALSO
49 INTERNALS
50 This is a wrapper around MUIM_Window_RemEventHandler and
51 MUIM_Window_AddEventHandler.
53 *****************************************************************************/
55 AROS_LIBFUNC_INIT
57 /* Use the Eventhandler to simulate a MUIM_HandleInput */
58 if (muiRenderInfo(obj) && (_flags(obj) & MADF_SETUP) && _win(obj))
60 if (muiAreaData(obj)->mad_hiehn.ehn_Events)
62 DoMethod(_win(obj), MUIM_Window_RemEventHandler,
63 (IPTR)&muiAreaData(obj)->mad_hiehn);
65 muiAreaData(obj)->mad_hiehn.ehn_Events |= flags;
66 if (muiAreaData(obj)->mad_hiehn.ehn_Events)
68 DoMethod(_win(obj), MUIM_Window_AddEventHandler,
69 (IPTR)&muiAreaData(obj)->mad_hiehn);
72 else
74 muiAreaData(obj)->mad_hiehn.ehn_Events |= flags;
77 AROS_LIBFUNC_EXIT
79 } /* MUIA_RequestIDCMP */