2 * CDE - Common Desktop Environment
4 * Copyright (c) 1993-2012, The Open Group. All rights reserved.
6 * These libraries and programs are free software; you can
7 * redistribute them and/or modify them under the terms of the GNU
8 * Lesser General Public License as published by the Free Software
9 * Foundation; either version 2 of the License, or (at your option)
12 * These libraries and programs are distributed in the hope that
13 * they will be useful, but WITHOUT ANY WARRANTY; without even the
14 * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15 * PURPOSE. See the GNU Lesser General Public License for more
18 * You should have received a copy of the GNU Lesser General Public
19 * License along with these librararies and programs; if not, write
20 * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
21 * Floor, Boston, MA 02110-1301 USA
27 * (c) Copyright 1989, 1990, 1991, 1992, 1993 OPEN SOFTWARE FOUNDATION, INC.
33 /* $XConsortium: WmMenu.h /main/7 1996/11/20 15:20:45 rswiston $ */
35 * (c) Copyright 1987, 1988, 1989, 1990 HEWLETT-PACKARD COMPANY */
37 #if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL))
38 # define MAKE_MENU(pSD, pCD, mName, iC, aC, moreItems, sysMenu) \
39 MakeMenu(pSD, pCD, mName, iC, aC, moreItems, sysMenu)
40 # define CREATE_MENU_WIDGET(pSD, pCD, mName, parent, fTLP, tSpec, moreItems) \
41 CreateMenuWidget(pSD, pCD, mName, parent, fTLP, tSpec, moreItems)
43 # define MAKE_MENU(pSD, pCD, mName, iC, aC, moreItems, sysMenu) \
44 MakeMenu(pSD, mName, iC, aC, moreItems, sysMenu)
45 # define CREATE_MENU_WIDGET(pSD, pCD, mName, parent, fTLP, tSpec, moreItems) \
46 CreateMenuWidget(pSD, mName, parent, fTLP, tSpec, moreItems)
47 #endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */
49 extern void ActivateCallback (Widget w, caddr_t client_data,
51 extern Widget CreateMenuWidget (WmScreenData *pSD,
52 #if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL))
54 #endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */
55 String menuName, Widget parent,
56 Boolean fTopLevelPane, MenuSpec *topMenuSpec,
57 MenuItem *moreMenuItems);
58 extern void FreeCustomMenuSpec (MenuSpec *menuSpec);
59 extern void MWarning (char *format, char *message);
60 extern MenuSpec *MakeMenu (WmScreenData *pSD,
61 #if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL))
63 #endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */
65 Context initialContext, Context accelContext,
66 MenuItem *moreMenuItems, Boolean fSystemMenu);
67 extern void PostMenu (MenuSpec *menuSpec, ClientData *pCD, int x, int y,
68 unsigned int button, Context newContext, long flags,
69 XEvent *passedInEvent);
70 extern void TraversalOff (MenuSpec *menuSpec);
71 extern void TraversalOn (MenuSpec *menuSpec);
72 extern void UnpostMenu (MenuSpec *menuSpec);
74 #if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL))
75 extern void InsertTreeOnAllClients (WmScreenData *pSD, CmdTree *tree,
76 Atom selection, Context active_context,
78 extern void InsertTreeOnSingleClient (WmScreenData *pSD, ClientData *pCD,
79 CmdTree *tree, Atom selection,
80 Context active_context, Boolean in_line);
81 extern void InsertTreeOnRootMenu (WmScreenData *pSD, CmdTree *tree,
82 Atom selection, Boolean in_line);
83 extern void ModifyClientCommandTree (WmScreenData *pSD, ClientData *pCD,
84 OpRange range, CmdTree *tree,
85 CmdModifier modifier, Context context,
87 extern void DestroyMenuSpecWidgets (MenuSpec *menuspec);
88 extern void DestroyMenuSpec (WmScreenData *pSD, CARD32 commandID);
89 #endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */
91 extern MenuSpec *DuplicateMenuSpec (MenuSpec *menuSpec);
93 #endif /* _WM_MENU_H */