Lines Matching defs:widget
78 Widget widget;
82 Recursive(Widget widget, XtWidgetProc proc)
87 if (XtIsComposite(widget)) {
88 CompositePart *cwp = &(((CompositeWidget) widget)->composite);
96 if (XtIsWidget(widget)) {
97 for (i = 0; i < widget->core.num_popups; i++) {
98 Recursive(widget->core.popup_list[i], proc);
102 /* Finally, apply procedure to this widget */
103 (*proc) (widget);
107 Phase1Destroy(Widget widget)
109 Widget hookobj = XtHooksOfDisplay(XtDisplayOfObject(widget));
111 widget->core.being_destroyed = TRUE;
116 call_data.widget = widget;
124 Phase2Callbacks(Widget widget)
126 if (widget->core.destroy_callbacks != NULL) {
127 XtCallCallbackList(widget,
128 widget->core.destroy_callbacks, (XtPointer) NULL);
133 Phase2Destroy(register Widget widget)
140 if (XtParent(widget) != NULL && !XtIsShell(widget) &&
141 XtIsConstraint(XtParent(widget))) {
143 cwClass = (ConstraintWidgetClass) XtParent(widget)->core.widget_class;
152 (*destroy) (widget);
161 /* Call widget destroy procedures */
163 for (class = widget->core.widget_class;
170 (*destroy) (widget);
174 /* Call widget deallocate procedure */
175 ext = (ObjectClassExtension) XtGetClassExtension(widget->core.widget_class,
187 (*deallocate) (widget, NULL);
191 XtFree((char *) widget);
196 IsDescendant(Widget widget, const Widget root)
198 while (widget != NULL && (widget = XtParent(widget)) != root) {
201 return (widget != NULL) ? True : False;
205 XtPhase2Destroy(Widget widget)
210 XtAppContext app = XtWidgetToApplicationContext(widget);
216 _XtGetPerDisplay(XtDisplayOfObject(widget))->pdi.traceDepth = 0;
218 parent = widget->core.parent;
224 if (parent->core.popup_list[i] == widget) {
239 if (XtIsRectObj(widget)) {
240 XtUnmanageChild(widget);
249 XtAppWarningMsg(XtWidgetToApplicationContext(widget),
256 (*delete_child) (widget);
260 /* widget is freed in Phase2Destroy, so retrieve window now.
264 if (XtIsShell(widget) || !XtIsWidget(widget)) {
268 display = XtDisplay(widget);
270 window = widget->core.window;
273 Recursive(widget, Phase2Callbacks);
281 if (IsDescendant(dr->widget, widget)) {
282 Widget descendant = dr->widget;
295 app->in_phase2_destroy = widget;
296 Recursive(widget, Phase2Destroy);
303 if (parent->core.popup_list[i] == widget) {
339 Widget w = dr->widget;
353 XtDestroyWidget(Widget widget)
358 app = XtWidgetToApplicationContext(widget);
360 if (widget->core.being_destroyed) {
364 Recursive(widget, Phase1Destroy);
366 if (app->in_phase2_destroy && IsDescendant(widget, app->in_phase2_destroy)) {
367 XtPhase2Destroy(widget);
380 dr->widget = widget;
389 IsDescendant(dr->widget, widget)) {