2 Copyright © 1995-2013, The AROS Development Team. All rights reserved.
3 Copyright © 2001-2003, The MorphOS Development Team. All Rights Reserved.
7 #include "intuition_intern.h"
9 /*****************************************************************************
12 #include <proto/intuition.h>
14 AROS_LH2(void, LendMenus
,
17 AROS_LHA(struct Window
*, fromwindow
, A0
),
18 AROS_LHA(struct Window
*, towindow
, A1
),
21 struct IntuitionBase
*, IntuitionBase
, 134, Intuition
)
24 This function "lends" the menus of one window to another. This makes
25 the menu events (e.g. menu button presses) take place in another
26 window's menu (i.e. the other window's strip and screen).
28 This function is used to unify two windows on different attached
29 screens. (E.g. a painting program with an attached palette screen
30 can open the menu on the main screen if the menu button is
31 pressed on the palette screen.)
34 fromwindow - This window's menu events will go to another window.
35 towindow - This is the window that will react on the menu actions
36 of the other window. If NULL 'lending' will be turned off.
48 SetMenuStrip(), ClearMenuStrip()
52 *****************************************************************************/
56 ASSERT_VALID_PTR(fromwindow
);
57 ASSERT_VALID_PTR_OR_NULL(towindow
);
59 DEBUG_LENDMENUS(dprintf("LendMenus(Window 0x%lx ToWindow 0x%lx)\n",fromwindow
,towindow
));
61 IntuitionBase
= IntuitionBase
; /* shut up the compiler */
63 SANITY_CHECK(fromwindow
);
65 ((struct IntWindow
*)fromwindow
)->menulendwindow
= towindow
;