FreeBSD Manual Pages
XmtAssertWidgetClass(3) Library Functions Manual XmtAssertWidgetClass(3) NAME XmtAssertWidgetClass() - verify the type of a widget. SYNOPSIS #include <Xmt/Xmt.h> void XmtAssertWidgetClass(Widget w, WidgetClass c, String procname) ARGUMENTS INPUTS w The widget to be checked. c The desired widget class. procname An identifying string to be used in the error message displayed if the widget w is not of class c or a subclass of it. This ar- gument is most useful when it is the name of the procedure that calls XmtAssertWidgetClass(). DESCRIPTION XmtAssertWidgetClass() calls XtIsSubclass() to verify that widget w is of class c or is a subclass of c. If so, it returns and takes no action. If w is not of class c or a subclass, then XmtAssertWidgetClass() prints an er- ror message and calls the function abort() which will cause the application to dump core and exit. USAGE XmtAssertWidgetClass() is an analog to assert(). It is used mainly by wid- get writers, but also occasionally by application programmers who are writ- ing a function that expects a widget argument of a specific type. Many of the functions in the Xmt library call this function internally. XmtAssertWidgetClass() is useful during the process of application develop- ment and debugging because it gives a very clear signal (a message and a core dump with its associated stack trace) of when application code is calling a function with a bad widget argument. Once an application is de- bugged, you can compile your code (and the Xmt library) with the -DNDEBUG flag, which will cause any calls to XmtAssertWidgetClass() to be removed by the C preprocessor. SEE ALSO Chapter 8, Utility Functions, abort(), assert(), XtIsSubclass(). Xmt Motif Tools XmtAssertWidgetClass(3)
NAME | SYNOPSIS | ARGUMENTS | DESCRIPTION | USAGE | SEE ALSO
Want to link to this manual page? Use this URL:
<https://man.freebsd.org/cgi/man.cgi?query=XmtAssertWidgetClass&sektion=3&manpath=FreeBSD+Ports+15.1.quarterly>
