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 libraries and programs; if not, write
20 * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
21 * Floor, Boston, MA 02110-1301 USA
24 * Common Desktop Environment
26 * (c) Copyright 1993, 1994, 1995 Hewlett-Packard Company
27 * (c) Copyright 1993, 1994, 1995 International Business Machines Corp.
28 * (c) Copyright 1993, 1994, 1995 Sun Microsystems, Inc.
29 * (c) Copyright 1993, 1994, 1995 Novell, Inc.
30 * (c) Copyright 1995 Digital Equipment Corp.
31 * (c) Copyright 1995 Fujitsu Limited
32 * (c) Copyright 1995 Hitachi, Ltd.
35 * RESTRICTED RIGHTS LEGEND
37 * Use, duplication, or disclosure by the U.S. Government is subject to
38 * restrictions as set forth in subparagraph (c)(1)(ii) of the Rights in
39 * Technical Data and Computer Software clause in DFARS 252.227-7013. Rights
40 * for non-DOD U.S. Government Departments and Agencies are as set forth in
41 * FAR 52.227-19(c)(1,2).
43 * Hewlett-Packard Company, 3000 Hanover Street, Palo Alto, CA 94304 U.S.A.
44 * International Business Machines Corp., Route 100, Somers, NY 10589 U.S.A.
45 * Sun Microsystems, Inc., 2550 Garcia Avenue, Mountain View, CA 94043 U.S.A.
46 * Novell, Inc., 190 River Road, Summit, NJ 07901 U.S.A.
47 * Digital Equipment Corp., 111 Powdermill Road, Maynard, MA 01754, U.S.A.
48 * Fujitsu Limited, 1015, Kamikodanaka Nakahara-Ku, Kawasaki 211, Japan
49 * Hitachi, Ltd., 6, Kanda Surugadai 4-Chome, Chiyoda-ku, Tokyo 101, Japan
52 * (c) Copyright 1996 Hewlett-Packard Company *
53 * (c) Copyright 1996 International Business Machines Corp. *
54 * (c) Copyright 1996 Sun Microsystems, Inc. *
55 * (c) Copyright 1996 Novell, Inc. *
56 * (c) Copyright 1989, 1990, 1996 Digital Equipment Corporation. *
57 * (c) Copyright 1996 FUJITSU LIMITED. *
58 * (c) Copyright 1996 Hitachi. *
62 static char rcsid[] = "$TOG: DtMrm.c /main/4 1999/10/14 13:35:44 mgreess $"
70 * UIL Resource Manager (URM):
74 * This contains only the top-level routine DtMrmIntialize. It can be
75 * modified as needed to add or remove widgets being initialized for
76 * URM facilities. This routine is normally accessible to
77 * and used by an application at runtime to access URM facilities.
89 #include <sys/param.h>
92 #include <X11/IntrinsicP.h>
94 #include <Mrm/MrmPublic.h>
96 #include <Dt/Editor.h>
97 #include <Dt/EditorP.h>
100 #include <Dt/HelpDialog.h>
101 #include <Dt/HelpDialogP.h>
102 #include <Dt/HelpQuickD.h>
103 #include <Dt/HelpQuickDP.h>
104 #include <Dt/MenuButton.h>
105 #include <Dt/MenuButtonP.h>
107 #include <Dt/Print.h>
108 #include <Dt/PrintSetupBP.h>
109 #include <Dt/PrintSetupBP.h>
111 /* work around conflict with <Xm/TextP.h> */
115 #include <Dt/TermP.h>
117 /******** Conditionally defined macros for thread_safe DtTerm ******/
119 #define _MrmProcessLock() XtProcessLock()
120 #define _MrmProcessUnlock() XtProcessUnlock()
122 #define _MrmProcessLock()
123 #define _MrmProcessUnlock()
124 #endif /* XTHREADS */
130 * DtMrmInitialize Initialize URM internals before use
135 * The following flag is set to indicate successful URM initialization
137 static Boolean urm__initialize_complete = FALSE;
140 void DtMrmInitialize (void)
144 * PROCEDURE DESCRIPTION:
146 * DtMrmInitialize must be called in order to prepare an application to
147 * use URM widget fetching facilities for CDE Dt widgets. It is
148 * analogous to the MrmInitialize routine for Motif widgets.
150 * DtMrmInitialize initializes the internal data
151 * structures (creating the mapping from class codes to the creation
152 * routine for each builtin widget class) which URM needs in order to
153 * successfully perform type conversion on arguments, and successfully
154 * access widget creation facilities. DtMrmInitialize must be called before
155 * any widgets are created, whether by URM's fetch mechanisms or directly
156 * by the application. It may be called before or after XtInitialize, and
157 * multiple calls after the first one are benign (no-ops).
175 * Initialize only once
177 if (urm__initialize_complete)
184 * Initialize the class descriptors for all the known widgets.
188 "DtCreateEditor", DtCreateEditor,
189 (WidgetClass) &dtEditorClassRec
194 "DtCreateHelpDialog", DtCreateHelpDialog,
195 (WidgetClass) &dtHelpDialogWidgetClassRec
200 "DtCreateHelpQuickDialog", DtCreateHelpQuickDialog,
201 (WidgetClass) &dtHelpQuickDialogWidgetClassRec
206 "DtCreateMenuButton", DtCreateMenuButton,
207 (WidgetClass) &dtMenuButtonClassRec
212 "DtCreatePrintSetupBox", DtCreatePrintSetupBox,
213 (WidgetClass) &dtPrintSetupBoxClassRec
218 "DtCreatePrintSetupDialog", DtCreatePrintSetupDialog,
219 (WidgetClass) &dtPrintSetupBoxClassRec
224 "DtCreateTerm", DtCreateTerm,
225 (WidgetClass) &dtTermClassRec
229 * Initialization complete
231 urm__initialize_complete = TRUE;