1 .\" $Xorg: appC,v 1.3 2000/08/17 19:42:48 cpqbld Exp $
2 .\" Copyright \(co 1985, 1986, 1987, 1988, 1991, 1994
5 .\" Permission is hereby granted, free of charge, to any person obtaining
6 .\" a copy of this software and associated documentation files (the
7 .\" "Software"), to deal in the Software without restriction, including
8 .\" without limitation the rights to use, copy, modify, merge, publish,
9 .\" distribute, sublicense, and/or sell copies of the Software, and to
10 .\" permit persons to whom the Software is furnished to do so, subject to
11 .\" the following conditions:
13 .\" The above copyright notice and this permission notice shall be included
14 .\" in all copies or substantial portions of the Software.
16 .\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
17 .\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18 .\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
19 .\" IN NO EVENT SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR
20 .\" OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
21 .\" ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
22 .\" OTHER DEALINGS IN THE SOFTWARE.
24 .\" Except as contained in this notice, the name of the X Consortium shall
25 .\" not be used in advertising or otherwise to promote the sale, use or
26 .\" other dealings in this Software without prior written authorization
27 .\" from the X Consortium.
29 .\" Copyright \(co 1985, 1986, 1987, 1988, 1991, 1994
30 .\" Digital Equipment Corporation, Maynard, Massachusetts.
32 .\" Permission to use, copy, modify and distribute this documentation for any
33 .\" purpose and without fee is hereby granted, provided that the above copyright
34 .\" notice appears in all copies and that both that copyright notice and this
35 .\" permission notice appear in supporting documentation, and that the name of
36 .\" Digital not be used in in advertising or publicity pertaining
37 .\" to distribution of the software without specific, written prior permission.
38 .\" Digital makes no representations about the suitability of the
39 .\" software described herein for any purpose.
40 .\" It is provided ``as is'' without express or implied warranty.
46 \s+1\fBAppendix C\fP\s-1
48 \s+1\fBCompatibility Functions\fP\s-1
52 \fBAppendix C \(em Compatibility Functions\fP
55 This appendix is part of the formal Intrinsics Specification.
58 In prototype versions of the \*(tk
60 implemented an Xt<\^\fIWidget\fP\^>Create (for example,
62 function, in which most of the code was identical from widget to widget.
63 In the \*(xI, a single generic
65 performs most of the common work and then calls the initialize procedure
66 implemented for the particular widget class.
68 Each Composite class also implemented the procedures
69 Xt<\^\fIWidget\fP\^>Add and an Xt<\^\fIWidget\fP\^>Delete (for example,
70 .PN XtButtonBoxAddButton
72 .PN XtButtonBoxDeleteButton ).
73 In the \*(xI, the Composite generic procedures
76 .PN XtUnmanageChildren
77 perform error checking and screening out of certain children.
78 Then they call the change_managed procedure
79 implemented for the widget's Composite class.
80 If the widget's parent has not yet been realized,
81 the call to the change_managed procedure is delayed until realization time.
83 Old-style calls can be implemented in the \*(tk by defining
84 one-line procedures or macros that invoke a generic routine. For example,
85 you could define the macro
92 #define XtLabelCreate(\fIname\fP, \fIparent\fP, \fIargs\fP, \fInum_args\fP) \\
93 ((LabelWidget) XtCreateWidget(\fIname\fP, \fIlabelWidgetClass\fP, \
94 \fIparent\fP, \fIargs\fP, \fInum_args\fP))
98 Pop-up shells in some of the prototypes automatically performed an
100 on their child within their insert_child procedure.
101 .IN "insert_child procedure"
102 Creators of pop-up children need to call
109 .PN XtVaAppInitialize
110 have been replaced by
111 .PN XtOpenApplication
113 .PN XtVaOpenApplication .
115 To initialize the \*(xI internals, create an application context,
116 open and initialize a display, and create the initial application shell
117 instance, an application may use
120 .PN XtVaAppInitialize .
122 .IN "XtAppInitialize" "" "@DEF@"
125 Widget XtAppInitialize(\fIapp_context_return\fP, \fIapplication_class\fP, \
126 \fIoptions\fP, \fInum_options\fP,
128 \fIargc_in_out\fP, \fIargv_in_out\fP, \
129 \fIfallback_resources\fP, \fIargs\fP, \fInum_args\fP)
131 XtAppContext *\fIapp_context_return\fP;
133 String \fIapplication_class\fP;
135 XrmOptionDescList \fIoptions\fP;
137 Cardinal \fInum_options\fP;
139 int *\fIargc_in_out\fP;
141 String *\fIargv_in_out\fP;
143 String *\fIfallback_resources\fP;
147 Cardinal \fInum_args\fP;
149 .IP \fIapp_context_return\fP 1.5i
150 Returns the application context, if non-NULL.
151 .IP \fIapplication_class\fP 1.5i
152 Specifies the class name of the application.
153 .IP \fIoptions\fP 1.5i
154 Specifies the command line options table.
155 .IP \fInum_options\fP 1.5i
156 Specifies the number of entries in \fIoptions\fP.
157 .IP \fIargc_in_out\fP 1.5i
158 Specifies a pointer to the number of command line arguments.
159 .IP \fIargv_in_out\fP 1.5i
160 Specifies a pointer to the command line arguments.
161 .IP \fIfallback_resources\fP 1.5i
162 Specifies resource values to be used if the application class resource
163 file cannot be opened or read, or NULL.
165 Specifies the argument list to override any
166 other resource specifications for the created shell widget.
167 .IP \fInum_args\fP 1.5i
168 Specifies the number of entries in the argument list.
174 .PN XtToolkitInitialize
176 .PN XtCreateApplicationContext ,
179 with \fIdisplay_string\fP NULL and
180 \fIapplication_name\fP NULL, and finally calls
182 with \fIapplication_name\fP NULL, \fIwidget_class\fP
183 .PN application\%Shell\%Widget\%Class ,
184 and the specified \fIargs\fP and \fInum_args\fP
185 and returns the created shell. The modified \fIargc\fP and \fIargv\fP returned by
186 .PN XtDisplayInitialize
187 are returned in \fIargc_in_out\fP and \fIargv_in_out\fP. If
188 \fIapp_context_return\fP is not NULL, the created application context is
189 also returned. If the display specified by the command line cannot be
190 opened, an error message is issued and
192 terminates the application. If \fIfallback_resources\fP is non-NULL,
193 .PN XtAppSetFallbackResources
194 is called with the value prior to calling
198 .IN "XtVaAppInitialize" "" "@DEF@"
201 Widget XtVaAppInitialize(\fIapp_context_return\fP, \fIapplication_class\fP, \
202 \fIoptions\fP, \fInum_options\fP,
204 \fIargc_in_out\fP, \fIargv_in_out\fP, \
205 \fIfallback_resources\fP, ...)
207 XtAppContext *\fIapp_context_return\fP;
209 String \fIapplication_class\fP;
211 XrmOptionDescList \fIoptions\fP;
213 Cardinal \fInum_options\fP;
215 int *\fIargc_in_out\fP;
217 String *\fIargv_in_out\fP;
219 String *\fIfallback_resources\fP;
221 .IP \fIapp_context_return\fP 1.5i
222 Returns the application context, if non-NULL.
223 .IP \fIapplication_class\fP 1.5i
224 Specifies the class name of the application.
225 .IP \fIoptions\fP 1.5i
226 Specifies the command line options table.
227 .IP \fInum_options\fP 1.5i
228 Specifies the number of entries in \fIoptions\fP.
229 .IP \fIargc_in_out\fP 1.5i
230 Specifies a pointer to the number of command line arguments.
231 .IP \fIargv_in_out\fP 1.5i
232 Specifies the command line arguments array.
233 .IP \fIfallback_resources\fP 1.5i
234 Specifies resource values to be used if the application class
235 resource file cannot be opened, or NULL.
237 Specifies the variable argument list to override any other
238 resource specifications for the created shell.
242 .PN XtVaAppInitialize
243 procedure is identical in function to
245 with the \fIargs\fP and \fInum_args\fP parameters replaced by a varargs list,
250 As a convenience to people converting from earlier versions of the toolkit
251 without application contexts, the following routines exist:
261 .PN XtCreateApplicationShell ,
263 .PN XtSetSelectionTimeout ,
265 .PN XtGetSelectionTimeout .
267 .IN "XtInitialize" "" "@DEF@"
270 Widget XtInitialize(\fIshell_name\fP, \fIapplication_class\fP, \fIoptions\fP, \
271 \fInum_options\fP, \fIargc\fP, \fIargv\fP)
273 String \fIshell_name\fP;
275 String \fIapplication_class\fP;
277 XrmOptionDescRec \fIoptions\fP[];
279 Cardinal \fInum_options\fP;
285 .IP \fIshell_name\fP 1i
286 This parameter is ignored; therefore, you can specify NULL.
287 .IP \fIapplication_class\fP 1i
288 Specifies the class name of this application.
290 Specifies how to parse the command line for any application-specific resources.
291 The \fIoptions\fP argument is passed as a parameter to
292 .PN XrmParseCommand .
293 .IP \fInum_options\fP 1i
294 Specifies the number of entries in the options list.
296 Specifies a pointer to the number of command line parameters.
298 Specifies the command line parameters.
303 .PN XtToolkitInitialize
304 to initialize the toolkit internals,
305 creates a default application context for use by the other convenience
308 with \fIdisplay_string\fP NULL and \fIapplication_name\fP NULL, and
311 with \fIapplication_name\fP NULL and
312 returns the created shell.
313 The semantics of calling
315 more than once are undefined.
316 This routine has been replaced by
317 .PN XtOpenApplication .
319 .IN "XtMainLoop" "" "@DEF@"
322 void XtMainLoop(void)
327 first reads the next alternate input, timer, or X event by calling
329 Then it dispatches this to the appropriate registered procedure by calling
330 .PN XtDispatchEvent .
331 This routine has been replaced by
334 .IN "XtNextEvent" "" "@DEF@"
337 void XtNextEvent(\fIevent_return\fP)
339 XEvent *\fIevent_return\fP;
341 .IP \fIevent_return\fP 1i
342 Returns the event information to the specified event structure.
345 If no input is on the X input queue for the default application context,
347 flushes the X output buffer
348 and waits for an event while looking at the alternate input sources
349 and timeout values and calling any callback procedures triggered by them.
350 This routine has been replaced by
353 must be called before using this routine.
355 .IN "XtProcessEvent" "" "@DEF@"
358 void XtProcessEvent(\fImask\fP)
360 XtInputMask \fImask\fP;
363 Specifies the type of input to process.
367 processes one X event, timeout, or alternate input source
368 (depending on the value of \fImask\fP), blocking if necessary.
369 It has been replaced by
370 .PN XtAppProcessEvent .
372 must be called before using this function.
374 .IN "XtPeekEvent" "" "@DEF@"
377 Boolean XtPeekEvent(\fIevent_return\fP)
379 XEvent *\fIevent_return\fP;
381 .IP \fIevent_return\fP 1i
382 Returns the event information to the specified event structure.
385 If there is an event in the queue for the default application context,
387 fills in the event and returns a nonzero value.
388 If no X input is on the queue,
390 flushes the output buffer and blocks until input is available, possibly
391 calling some timeout callbacks in the process.
392 If the input is an event,
394 fills in the event and returns a nonzero value.
395 Otherwise, the input is for an alternate input source, and
398 This routine has been replaced by
401 must be called before using this routine.
403 .IN "XtPending" "" "@DEF@"
411 returns a nonzero value if there are
412 events pending from the X server or alternate input sources in the default
414 If there are no events pending,
415 it flushes the output buffer and returns a zero value.
416 It has been replaced by
419 must be called before using this routine.
421 .IN "XtAddInput" "" "@DEF@"
424 XtInputId XtAddInput(\fIsource\fP, \fIcondition\fP, \fIproc\fP, \
429 XtPointer \fIcondition\fP;
431 XtInputCallbackProc \fIproc\fP;
433 XtPointer \fIclient_data\fP;
436 Specifies the source file descriptor on a POSIX-based system
437 or other operating-system-dependent device specification.
438 .IP \fIcondition\fP 1i
439 Specifies the mask that indicates either a read, write, or exception condition
440 or some operating-system-dependent condition.
442 Specifies the procedure called when input is available.
443 .IP \fIclient_data\fP 1i
444 Specifies the parameter to be passed to \fIproc\fP when input is available.
449 function registers in the default application context a new
451 which is usually file input but can also be file output.
452 (The word \fIfile\fP should be loosely interpreted to mean any sink
455 also specifies the conditions under which the source can generate events.
456 When input is pending on this source in the default application context,
457 the callback procedure is called.
458 This routine has been replaced by
461 must be called before using this routine.
463 .IN "XtAddTimeOut" "" "@DEF@"
466 XtIntervalId XtAddTimeOut(\fIinterval\fP, \fIproc\fP, \fIclient_data\fP)
468 unsigned long \fIinterval\fP;
470 XtTimerCallbackProc \fIproc\fP;
472 XtPointer \fIclient_data\fP;
474 .IP \fIinterval\fP 1i
475 Specifies the time interval in milliseconds.
477 Specifies the procedure to be called when time expires.
478 .IP \fIclient_data\fP 1i
479 Specifies the parameter to be passed to \fIproc\fP when it is called.
484 function creates a timeout in the default application context
485 and returns an identifier for it.
486 The timeout value is set to \fIinterval\fP.
487 The callback procedure will be called after
488 the time interval elapses, after which the timeout is removed.
489 This routine has been replaced by
490 .PN XtAppAddTimeOut .
492 must be called before using this routine.
494 .IN "XtAddWorkProc" "" "@DEF@"
497 XtWorkProcId XtAddWorkProc(\fIproc\fP, \fIclient_data\fP)
499 XtWorkProc \fIproc\fP;
501 XtPointer \fIclient_data\fP;
504 Procedure to call to do the work.
505 .IP \fIclient_data\fP 1i
506 Client data to pass to \fIproc\fP when it is called.
509 This routine registers a work procedure in the default application context. It has
511 .PN XtAppAddWorkProc .
513 must be called before using this routine.
515 .IN "XtCreateApplicationShell" "" "@DEF@"
518 Widget XtCreateApplicationShell(\fIname\fP, \fIwidget_class\fP, \fIargs\fP, \
523 WidgetClass \fIwidget_class\fP;
527 Cardinal \fInum_args\fP;
530 This parameter is ignored; therefore, you can specify NULL.
531 .IP \fIwidget_class\fP 1i
532 Specifies the widget class pointer for the created application shell widget.
534 .PN topLevelShellWidgetClass
535 or a subclass thereof.
537 Specifies the argument list to override any other resource specifications.
538 .IP \fInum_args\fP 1i
539 Specifies the number of entries in \fIargs\fP.
543 .PN XtCreateApplicationShell
546 with \fIapplication_name\fP NULL, the application class passed to
548 and the default application context created by
550 This routine has been replaced by
551 .PN XtAppCreateShell .
554 An old-format resource type converter procedure pointer is of type
557 .IN "XtConverter" "" "@DEF@"
560 typedef void (*XtConverter)(XrmValue*, Cardinal*, XrmValue*, XrmValue*);
562 XrmValue *\fIargs\fP;
564 Cardinal *\fInum_args\fP;
566 XrmValue *\fIfrom\fP;
571 Specifies a list of additional
573 arguments to the converter if additional context is needed
574 to perform the conversion, or NULL.
575 .IP \fInum_args\fP 1i
576 Specifies the number of entries in \fIargs\fP.
578 Specifies the value to convert.
580 Specifies the descriptor to use to return the converted value.
583 Type converters should perform the following actions:
585 Check to see that the number of arguments passed is correct.
587 Attempt the type conversion.
589 If successful, return the size and pointer to the data in the \fIto\fP argument;
592 and return without modifying the \fIto\fP argument.
594 Most type converters just take the data described by the specified \fIfrom\fP
595 argument and return data by writing into the specified \fIto\fP argument.
596 A few need other information, which is available in the specified
598 A type converter can invoke another type converter,
599 which allows differing sources that may convert into a common intermediate
600 result to make maximum use of the type converter cache.
602 Note that the address returned in \fIto->addr\fP cannot be that of a local variable of
603 the converter because this is not valid after the converter returns.
604 It should be a pointer to a static variable.
609 .PN XtTypeConverter .
613 .PN XtStringConversionWarning
614 .IN "XtStringConversionWarning" "" "@DEF@"
615 function is a convenience routine for old-format resource converters
616 that convert from strings.
620 void XtStringConversionWarning(\fIsrc\fP, \fIdst_type\fP)
622 String \fIsrc\fP, \fIdst_type\fP;
625 Specifies the string that could not be converted.
626 .IP \fIdst_type\fP 1i
627 Specifies the name of the type to which the string could not be converted.
631 .PN XtStringConversionWarning
632 function issues a warning message with name ``conversionError'',
633 type ``string'', class ``XtToolkitError, and the default message string
634 ``Cannot convert "\fIsrc\fP" to type \fIdst_type\fP''. This routine
635 has been superseded by
636 .PN XtDisplayStringConversionWarning .
639 To register an old-format converter, use
641 .IN "XtAddConverter" "" "@DEF@"
643 .PN XtAppAddConverter .
644 .IN "XtAppAddConverter" "" "@DEF@"
648 void XtAddConverter(\fIfrom_type\fP, \fIto_type\fP, \fIconverter\fP, \
649 \fIconvert_args\fP, \fInum_args\fP)
651 String \fIfrom_type\fP;
653 String \fIto_type\fP;
655 XtConverter \fIconverter\fP;
657 XtConvertArgList \fIconvert_args\fP;
659 Cardinal \fInum_args\fP;
661 .IP \fIfrom_type\fP 1i
662 Specifies the source type.
664 Specifies the destination type.
665 .IP \fIconverter\fP 1i
666 Specifies the type converter procedure.
667 .IP \fIconvert_args\fP 1i
668 Specifies how to compute the additional arguments to the converter, or NULL.
669 .IP \fInum_args\fP 1i
670 Specifies the number of entries in \fIconvert_args\fP.
675 is equivalent in function to
676 .PN XtSetTypeConverter
677 with \fIcache_type\fP equal to
679 for old-format type converters. It has been superseded by
680 .PN XtSetTypeConverter .
684 void XtAppAddConverter(\fIapp_context\fP, \fIfrom_type\fP, \fIto_type\fP, \
685 \fIconverter\fP, \fIconvert_args\fP, \fInum_args\fP)
687 XtAppContext \fIapp_context\fP;
689 String \fIfrom_type\fP;
691 String \fIto_type\fP;
693 XtConverter \fIconverter\fP;
695 XtConvertArgList \fIconvert_args\fP;
697 Cardinal \fInum_args\fP;
699 .IP \fIapp_context\fP 1i
700 Specifies the application context.
701 .IP \fIfrom_type\fP 1i
702 Specifies the source type.
704 Specifies the destination type.
705 .IP \fIconverter\fP 1i
706 Specifies the type converter procedure.
707 .IP \fIconvert_args\fP 1i
708 Specifies how to compute the additional arguments to the converter, or NULL.
709 .IP \fInum_args\fP 1i
710 Specifies the number of entries in \fIconvert_args\fP.
713 .PN XtAppAddConverter
714 is equivalent in function to
715 .PN XtAppSetTypeConverter
716 with \fIcache_type\fP equal to
718 for old-format type converters. It has been superseded by
719 .PN XtAppSetTypeConverter .
722 To invoke resource conversions, a client may use
724 or, for old-format converters only,
725 .PN XtDirectConvert .
727 .IN "XtConvert" "" "@DEF@"
730 void XtConvert(\fIw\fP, \fIfrom_type\fP, \fIfrom\fP, \fIto_type\fP, \
735 String \fIfrom_type\fP;
737 XrmValuePtr \fIfrom\fP;
739 String \fIto_type\fP;
741 XrmValuePtr \fIto_return\fP;
744 Specifies the widget to use for additional arguments, if any are
746 .IP \fIfrom_type\fP 1i
747 Specifies the source type.
749 Specifies the value to be converted.
751 Specifies the destination type.
752 .IP \fIto_return\fP 1i
753 Returns the converted value.
755 .IN "XtDirectConvert" "" "@DEF@"
757 void XtDirectConvert(\fIconverter\fP, \fIargs\fP, \fInum_args\fP, \fIfrom\fP, \
760 XtConverter \fIconverter\fP;
762 XrmValuePtr \fIargs\fP;
764 Cardinal \fInum_args\fP;
766 XrmValuePtr \fIfrom\fP;
768 XrmValuePtr \fIto_return\fP;
770 .IP \fIconverter\fP 1i
771 Specifies the conversion procedure to be called.
773 Specifies the argument list that contains the additional arguments
774 needed to perform the conversion (often NULL).
775 .IP \fInum_args\fP 1i
776 Specifies the number of entries in \fIargs\fP.
778 Specifies the value to be converted.
779 .IP \fIto_return\fP 1i
780 Returns the converted value.
785 function looks up the type converter registered to convert \fIfrom_type\fP
786 to \fIto_type\fP, computes any additional arguments needed, and then calls
789 .PN XtCallConverter .
792 function looks in the converter cache to see if this conversion procedure
793 has been called with the specified arguments.
794 If so, it returns a descriptor for information stored in the cache;
795 otherwise, it calls the converter and enters the result in the cache.
797 Before calling the specified converter,
799 sets the return value size to zero and the return value address to NULL.
800 To determine if the conversion was successful,
801 the client should check \fIto_return.addr\fP for non-NULL.
804 must be copied immediately by the caller,
805 as it may point to static data in the type converter.
809 .PN XtConvertAndStore ,
812 has been superseded by
813 .PN XtCallConverter .
816 To deallocate a shared GC when it is no longer needed, use
819 .IN "XtDestroyGC" "" "@DEF@"
822 void XtDestroyGC(\fIw\fP, \fIgc\fP)
829 Specifies any object on the display for which the shared GC was
832 Specifies the shared GC to be deallocated.
835 References to sharable GCs are counted and a free request is generated to the
836 server when the last user of a given GC destroys it.
837 Note that some earlier versions of
839 had only a \fIgc\fP argument.
840 Therefore, this function is not very portable,
841 and you are encouraged to use
846 To declare an action table in the default application context
847 and register it with the translation manager, use
850 .IN "XtAddActions" "" "@DEF@"
853 void XtAddActions(\fIactions\fP, \fInum_actions\fP)
855 XtActionList \fIactions\fP;
857 Cardinal \fInum_actions\fP;
860 Specifies the action table to register.
861 .IP \fInum_actions\fP 1i
862 Specifies the number of entries in \fIactions\fP.
865 If more than one action is registered with the same name,
866 the most recently registered action is used.
867 If duplicate actions exist in an action table,
869 The \*(xI register an action table for
873 as part of \*(tk initialization.
874 This routine has been replaced by
875 .PN XtAppAddActions .
877 must be called before using this routine.
880 To set the \*(xI selection timeout in the default application context, use
881 .PN XtSetSelectionTimeout .
883 .IN "XtSetSelectionTimeout" "" "@DEF@"
886 void XtSetSelectionTimeout(\fItimeout\fP)
888 unsigned long \fItimeout\fP;
891 Specifies the selection timeout in milliseconds.
892 This routine has been replaced by
893 .PN XtAppSetSelectionTimeout .
895 must be called before using this routine.
900 To get the current selection timeout value in the default application
902 .PN XtGetSelectionTimeout .
904 .IN "XtGetSelectionTimeout" "" "@DEF@"
907 unsigned long XtGetSelectionTimeout()
911 The selection timeout is the time within which the two communicating
912 applications must respond to one another.
913 If one of them does not respond within this interval,
914 the \*(xI abort the selection request.
916 This routine has been replaced by
917 .PN XtAppGetSelectionTimeout .
919 must be called before using this routine.
922 To obtain the global error database (for example, to merge with
923 an application- or widget-specific database), use
924 .PN XtGetErrorDatabase .
926 .IN "XtGetErrorDatabase" "" "@DEF@"
929 XrmDatabase *XtGetErrorDatabase()
934 .PN XtGetErrorDatabase
935 function returns the address of the error database.
936 The \*(xI do a lazy binding of the error database and do not merge in the
937 database file until the first call to
938 .PN XtGetErrorDatbaseText .
939 This routine has been replaced by
940 .PN XtAppGetErrorDatabase .
943 An error message handler can obtain the error database text for an
944 error or a warning by calling
945 .PN XtGetErrorDatabaseText .
947 .IN "XtGetErrorDatabaseText" "" "@DEF@"
950 void XtGetErrorDatabaseText(\fIname\fP, \fItype\fP, \fIclass\fP, \
951 \fIdefault\fP, \fIbuffer_return\fP, \fInbytes\fP)
953 String \fIname\fP, \fItype\fP, \fIclass\fP;
955 String \fIdefault\fP;
957 String \fIbuffer_return\fP;
965 Specify the name and type that are concatenated to form the resource name
966 of the error message.
968 Specifies the resource class of the error message.
970 Specifies the default message to use if an error database entry is not found.
971 .IP \fIbuffer_return\fP 1i
972 Specifies the buffer into which the error message is to be returned.
974 Specifies the size of the buffer in bytes.
978 .PN XtGetErrorDatabaseText
979 returns the appropriate message from the error database
980 associated with the default application context
981 or returns the specified default message if one is not found in the
983 To form the full resource name and class when querying the database,
984 the \fIname\fP and \fItype\fP are concatenated with a single ``.''
985 between them and the \fIclass\fP is concatenated with itself with a
986 single ``.'' if it does not already contain a ``.''.
987 This routine has been superseded by
988 .PN XtAppGetErrorDatabaseText .
991 To register a procedure to be called on fatal error conditions, use
992 .PN XtSetErrorMsgHandler .
994 .IN "XtSetErrorMsgHandler" "" "@DEF@"
997 void XtSetErrorMsgHandler(\fImsg_handler\fP)
999 XtErrorMsgHandler \fImsg_handler\fP;
1001 .IP \fImsg_handler\fP 1i
1002 Specifies the new fatal error procedure, which should not return.
1005 The default error handler provided by the \*(xI constructs a
1006 string from the error resource database and calls
1008 Fatal error message handlers should not return.
1010 subsequent \*(xI behavior is undefined.
1011 This routine has been superseded by
1012 .PN XtAppSetErrorMsgHandler .
1015 To call the high-level error handler, use
1018 .IN "XtErrorMsg" "" "@DEF@"
1021 void XtErrorMsg(\fIname\fP, \fItype\fP, \fIclass\fP, \fIdefault\fP, \
1022 \fIparams\fP, \fInum_params\fP)
1030 String \fIdefault\fP;
1032 String *\fIparams\fP;
1034 Cardinal *\fInum_params\fP;
1037 Specifies the general kind of error.
1039 Specifies the detailed name of the error.
1041 Specifies the resource class.
1042 .IP \fIdefault\fP 1i
1043 Specifies the default message to use if an error database entry is not found.
1045 Specifies a pointer to a list of values to be stored in the message.
1046 .IP \fInum_params\fP 1i
1047 Specifies the number of entries in \fIparams\fP.
1050 This routine has been superseded by
1054 To register a procedure to be called on nonfatal error conditions, use
1055 .PN XtSetWarningMsgHandler .
1057 .IN "XtSetWarningMsgHandler" "" "@DEF@"
1060 void XtSetWarningMsgHandler(\fImsg_handler\fP)
1062 XtErrorMsgHandler \fImsg_handler\fP;
1064 .IP \fImsg_handler\fP 1i
1065 Specifies the new nonfatal error procedure, which usually returns.
1068 The default warning handler provided by the \*(xI constructs a string
1069 from the error resource database and calls
1071 This routine has been superseded by
1072 .PN XtAppSetWarningMsgHandler .
1075 To call the installed high-level warning handler, use
1078 .IN "XtWarningMsg" "" "@DEF@"
1081 void XtWarningMsg(\fIname\fP, \fItype\fP, \fIclass\fP, \fIdefault\fP, \
1082 \fIparams\fP, \fInum_params\fP)
1090 String \fIdefault\fP;
1092 String *\fIparams\fP;
1094 Cardinal *\fInum_params\fP;
1097 Specifies the general kind of error.
1099 Specifies the detailed name of the error.
1101 Specifies the resource class.
1102 .IP \fIdefault\fP 1i
1103 Specifies the default message to use if an error database entry is not found.
1105 Specifies a pointer to a list of values to be stored in the message.
1106 .IP \fInum_params\fP 1i
1107 Specifies the number of entries in \fIparams\fP.
1110 This routine has been superseded by
1111 .PN XtAppWarningMsg .
1114 To register a procedure to be called on fatal error conditions, use
1115 .PN XtSetErrorHandler .
1117 .IN "XtSetErrorHandler" "" "@DEF@"
1120 void XtSetErrorHandler(\fIhandler\fP)
1122 XtErrorHandler \fIhandler\fP;
1124 .IP \fIhandler\fP 1i
1125 Specifies the new fatal error procedure, which should not return.
1128 The default error handler provided by the \*(xI is
1130 On POSIX-based systems,
1131 it prints the message to standard error and terminates the application.
1132 Fatal error message handlers should not return.
1134 subsequent \*(tk behavior is undefined.
1135 This routine has been superseded by
1136 .PN XtAppSetErrorHandler .
1139 To call the installed fatal error procedure, use
1142 .IN "XtError" "" "@DEF@"
1145 void XtError(\fImessage\fP)
1147 String \fImessage\fP;
1149 .IP \fImessage\fP 1i
1150 Specifies the message to be reported.
1153 Most programs should use
1157 to provide for customization and internationalization of error
1158 messages. This routine has been superseded by
1162 To register a procedure to be called on nonfatal error conditions, use
1163 .PN XtSetWarningHandler .
1165 .IN "XtSetWarningHandler" "" "@DEF@"
1168 void XtSetWarningHandler(\fIhandler\fP)
1170 XtErrorHandler \fIhandler\fP;
1172 .IP \fIhandler\fP 1i
1173 Specifies the new nonfatal error procedure, which usually returns.
1176 The default warning handler provided by the \*(xI is
1178 On POSIX-based systems,
1179 it prints the message to standard error and returns to the caller.
1180 This routine has been superseded by
1181 .PN XtAppSetWarningHandler .
1184 To call the installed nonfatal error procedure, use
1187 .IN "XtWarning" "" "@DEF@"
1190 void XtWarning(\fImessage\fP)
1192 String \fImessage\fP;
1194 .IP \fImessage\fP 1i
1195 Specifies the nonfatal error message to be reported.
1198 Most programs should use
1199 .PN XtAppWarningMsg ,
1202 to provide for customization and internationalization of warning messages.
1203 This routine has been superseded by