grub2: bring back build of aros-side grub2 tools
[AROS.git] / rom / intuition / resetmenustrip.c
blob924c6bc0de037ce3ff6d274e05d3dc79f74ea6ed
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(BOOL, ResetMenuStrip,
16 /* SYNOPSIS */
17 AROS_LHA(struct Window *, window, A0),
18 AROS_LHA(struct Menu *, menu, A1),
20 /* LOCATION */
21 struct IntuitionBase *, IntuitionBase, 117, Intuition)
23 /* FUNCTION
24 Works like a "fast" SetMenuStrip() as it doesn't check Menu or
25 calculate internal values before attaching the Menu to the Window.
26 Use this function only if the Menu has been added before by
27 SetMenuStrip() and you changed nothing in the struct except
28 CHECKED and ITEMENABLED flags.
30 INPUTS
31 window - The window to add the MenuStrip to
32 menu - The menu to be added to the window above.
34 RESULT
35 Always TRUE.
37 NOTES
38 Yes, I do repeat it again:
39 Use this function only if the Menu has been added before by
40 SetMenuStrip() and you changed nothing in the struct except
41 CHECKED and ITEMENABLED flags.
43 EXAMPLE
45 BUGS
47 SEE ALSO
48 SetMenuStrip(), ClearMenuStrip()
50 INTERNALS
52 *****************************************************************************/
54 AROS_LIBFUNC_INIT
56 SANITY_CHECKR(window,TRUE)
58 ObtainSemaphore(&GetPrivIBase(IntuitionBase)->MenuLock);
59 window->MenuStrip = menu;
60 ReleaseSemaphore(&GetPrivIBase(IntuitionBase)->MenuLock);
62 return TRUE;
64 AROS_LIBFUNC_EXIT
65 } /* ResetMenuStrip */