Use C++ linker
[oweals/cde.git] / cde / programs / dtwm / WmMenu.h
1 /*
2  * CDE - Common Desktop Environment
3  *
4  * Copyright (c) 1993-2012, The Open Group. All rights reserved.
5  *
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)
10  * any later version.
11  *
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
16  * details.
17  *
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
22  */
23 #ifndef _WM_MENU_H
24 #define _WM_MENU_H
25
26 /* 
27  * (c) Copyright 1989, 1990, 1991, 1992, 1993 OPEN SOFTWARE FOUNDATION, INC. 
28  * ALL RIGHTS RESERVED 
29 */ 
30 /* 
31  * Motif Release 1.2.2
32 */ 
33 /*   $XConsortium: WmMenu.h /main/7 1996/11/20 15:20:45 rswiston $ */
34 /*
35  * (c) Copyright 1987, 1988, 1989, 1990 HEWLETT-PACKARD COMPANY */
36
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)
42 #else
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) */
48
49 extern void ActivateCallback (Widget w, caddr_t client_data, 
50                               caddr_t call_data);
51 extern Widget CreateMenuWidget (WmScreenData *pSD,
52 #if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL))
53                                 ClientData *pCD,
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))
62                            ClientData *pCD,
63 #endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */
64                            String menuName, 
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);
73
74 #if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL))
75 extern void InsertTreeOnAllClients (WmScreenData *pSD, CmdTree *tree,
76                                     Atom selection, Context active_context,
77                                     Boolean in_line);
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,
86                                      String newname);
87 extern void DestroyMenuSpecWidgets (MenuSpec *menuspec);
88 extern void DestroyMenuSpec (WmScreenData *pSD, CARD32 commandID);
89 #endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */
90
91 extern MenuSpec *DuplicateMenuSpec (MenuSpec *menuSpec);
92
93 #endif /* _WM_MENU_H */