2003-08-19 15:26:49 -04:00
|
|
|
#include <stdarg.h>
|
2003-08-19 15:19:38 -04:00
|
|
|
|
|
|
|
#include "xt.h"
|
|
|
|
|
|
|
|
Match_Xt_Obj (x, v) Object x; va_list v; {
|
|
|
|
register type = TYPE(x);
|
|
|
|
|
|
|
|
if (type == T_Context) {
|
2003-09-02 04:12:11 -04:00
|
|
|
return va_arg (v, XtAppContext) == CONTEXT(x)->context;
|
2003-08-19 15:19:38 -04:00
|
|
|
} else if (type == T_Class) {
|
2003-09-02 04:12:11 -04:00
|
|
|
return va_arg (v, WidgetClass) == CLASS(x)->wclass;
|
2003-08-19 15:19:38 -04:00
|
|
|
} else if (type == T_Widget) {
|
2003-09-02 04:12:11 -04:00
|
|
|
return va_arg (v, Widget) == WIDGET(x)->widget;
|
2003-08-19 15:19:38 -04:00
|
|
|
} else if (type == T_Identifier) {
|
2003-09-02 04:12:11 -04:00
|
|
|
return va_arg (v, int) == IDENTIFIER(x)->type
|
|
|
|
&& va_arg (v, XtPointer) == IDENTIFIER(x)->val;
|
2003-08-19 15:19:38 -04:00
|
|
|
} else Panic ("Match_Xt_Obj");
|
|
|
|
return 0;
|
|
|
|
}
|