Made mask stricter by matching upper zero bytes of 4-byte DIB
[AROS.git] / rom / intuition / lendmenus.c
blob443b608c258e934d74d023a4d31a3757b3746354
1 /*
2 Copyright © 1995-2013, The AROS Development Team. All rights reserved.
3 Copyright © 2001-2003, The MorphOS Development Team. All Rights Reserved.
4 $Id$
5 */
7 #include "intuition_intern.h"
9 /*****************************************************************************
11 NAME */
12 #include <proto/intuition.h>
14 AROS_LH2(void, LendMenus,
16 /* SYNOPSIS */
17 AROS_LHA(struct Window *, fromwindow, A0),
18 AROS_LHA(struct Window *, towindow, A1),
20 /* LOCATION */
21 struct IntuitionBase *, IntuitionBase, 134, Intuition)
23 /* FUNCTION
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.)
33 INPUTS
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.
38 RESULT
39 None.
41 NOTES
43 EXAMPLE
45 BUGS
47 SEE ALSO
48 SetMenuStrip(), ClearMenuStrip()
50 INTERNALS
52 *****************************************************************************/
54 AROS_LIBFUNC_INIT
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;
67 AROS_LIBFUNC_EXIT
68 } /* LendMenus */