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"
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.
25 This makes the menu events (eg. menu button press) take place
26 in another window's menu (ie. the other window's strip and screen).
27 This function is used to unify two windows on different attached
28 screens. (Eg. a painting program with an attached palette screen
29 can open the menu on the main screen if the menu button is
30 pressed on the palette screen.
33 fromwindow - This window's menu events will go to another window.
34 towindow - This is the window that will react on the menu actions
35 of the other window. If NULL 'lending' will be turned off.
47 SetMenuStrip(), ClearMenuStrip()
53 *****************************************************************************/
57 ASSERT_VALID_PTR(fromwindow
);
58 ASSERT_VALID_PTR_OR_NULL(towindow
);
60 DEBUG_LENDMENUS(dprintf("LendMenus(Window 0x%lx ToWindow 0x%lx)\n",fromwindow
,towindow
));
62 IntuitionBase
= IntuitionBase
; /* shut up the compiler */
64 SANITY_CHECK(fromwindow
);
66 ((struct IntWindow
*)fromwindow
)->menulendwindow
= towindow
;