2 * Common Desktop Environment
4 * (c) Copyright 1993, 1994, 1995 Hewlett-Packard Company
5 * (c) Copyright 1993, 1994, 1995 International Business Machines Corp.
6 * (c) Copyright 1993, 1994, 1995 Sun Microsystems, Inc.
7 * (c) Copyright 1993, 1994, 1995 Novell, Inc.
8 * (c) Copyright 1995 Digital Equipment Corp.
9 * (c) Copyright 1995 Fujitsu Limited
10 * (c) Copyright 1995 Hitachi, Ltd.
13 * RESTRICTED RIGHTS LEGEND
15 * Use, duplication, or disclosure by the U.S. Government is subject to
16 * restrictions as set forth in subparagraph (c)(1)(ii) of the Rights in
17 * Technical Data and Computer Software clause in DFARS 252.227-7013. Rights
18 * for non-DOD U.S. Government Departments and Agencies are as set forth in
19 * FAR 52.227-19(c)(1,2).
21 * Hewlett-Packard Company, 3000 Hanover Street, Palo Alto, CA 94304 U.S.A.
22 * International Business Machines Corp., Route 100, Somers, NY 10589 U.S.A.
23 * Sun Microsystems, Inc., 2550 Garcia Avenue, Mountain View, CA 94043 U.S.A.
24 * Novell, Inc., 190 River Road, Summit, NJ 07901 U.S.A.
25 * Digital Equipment Corp., 111 Powdermill Road, Maynard, MA 01754, U.S.A.
26 * Fujitsu Limited, 1015, Kamikodanaka Nakahara-Ku, Kawasaki 211, Japan
27 * Hitachi, Ltd., 6, Kanda Surugadai 4-Chome, Chiyoda-ku, Tokyo 101, Japan
30 * (c) Copyright 1996 Hewlett-Packard Company *
31 * (c) Copyright 1996 International Business Machines Corp. *
32 * (c) Copyright 1996 Sun Microsystems, Inc. *
33 * (c) Copyright 1996 Novell, Inc. *
34 * (c) Copyright 1989, 1990, 1996 Digital Equipment Corporation. *
35 * (c) Copyright 1996 FUJITSU LIMITED. *
36 * (c) Copyright 1996 Hitachi. *
40 static char rcsid[] = "$TOG: DtMrm.c /main/4 1999/10/14 13:35:44 mgreess $"
48 * UIL Resource Manager (URM):
52 * This contains only the top-level routine DtMrmIntialize. It can be
53 * modified as needed to add or remove widgets being initialized for
54 * URM facilities. This routine is normally accessible to
55 * and used by an application at runtime to access URM facilities.
67 #include <sys/param.h>
70 #include <X11/IntrinsicP.h>
72 #include <Mrm/MrmPublic.h>
74 #include <Dt/Editor.h>
75 #include <Dt/EditorP.h>
78 #include <Dt/HelpDialog.h>
79 #include <Dt/HelpDialogP.h>
80 #include <Dt/HelpQuickD.h>
81 #include <Dt/HelpQuickDP.h>
82 #include <Dt/MenuButton.h>
83 #include <Dt/MenuButtonP.h>
86 #include <Dt/PrintSetupBP.h>
87 #include <Dt/PrintSetupBP.h>
89 /* work around conflict with <Xm/TextP.h> */
95 /******** Conditionally defined macros for thread_safe DtTerm ******/
97 #define _MrmProcessLock() XtProcessLock()
98 #define _MrmProcessUnlock() XtProcessUnlock()
100 #define _MrmProcessLock()
101 #define _MrmProcessUnlock()
102 #endif /* XTHREADS */
108 * DtMrmInitialize Initialize URM internals before use
113 * The following flag is set to indicate successful URM initialization
115 static Boolean urm__initialize_complete = FALSE;
118 void DtMrmInitialize ()
122 * PROCEDURE DESCRIPTION:
124 * DtMrmInitialize must be called in order to prepare an application to
125 * use URM widget fetching facilities for CDE Dt widgets. It is
126 * analogous to the MrmInitialize routine for Motif widgets.
128 * DtMrmInitialize initializes the internal data
129 * structures (creating the mapping from class codes to the creation
130 * routine for each builtin widget class) which URM needs in order to
131 * successfully perform type conversion on arguments, and successfully
132 * access widget creation facilities. DtMrmInitialize must be called before
133 * any widgets are created, whether by URM's fetch mechanisms or directly
134 * by the application. It may be called before or after XtInitialize, and
135 * multiple calls after the first one are benign (no-ops).
153 * Initialize only once
155 if (urm__initialize_complete)
162 * Initialize the class descriptors for all the known widgets.
166 "DtCreateEditor", DtCreateEditor,
167 (WidgetClass) &dtEditorClassRec
172 "DtCreateHelpDialog", DtCreateHelpDialog,
173 (WidgetClass) &dtHelpDialogWidgetClassRec
178 "DtCreateHelpQuickDialog", DtCreateHelpQuickDialog,
179 (WidgetClass) &dtHelpQuickDialogWidgetClassRec
184 "DtCreateMenuButton", DtCreateMenuButton,
185 (WidgetClass) &dtMenuButtonClassRec
190 "DtCreatePrintSetupBox", DtCreatePrintSetupBox,
191 (WidgetClass) &dtPrintSetupBoxClassRec
196 "DtCreatePrintSetupDialog", DtCreatePrintSetupDialog,
197 (WidgetClass) &dtPrintSetupBoxClassRec
202 "DtCreateTerm", DtCreateTerm,
203 (WidgetClass) &dtTermClassRec
207 * Initialization complete
209 urm__initialize_complete = TRUE;