ui/motif/label.c

branch
newapi
changeset 430
ea949c0109d8
parent 429
0921f8a5d535
child 433
605bb5dc34f1
equal deleted inserted replaced
429:0921f8a5d535 430:ea949c0109d8
82 } 82 }
83 83
84 static void ui_progressbar_expose(Widget widget, UiProgressBar *pb, XtPointer c) { 84 static void ui_progressbar_expose(Widget widget, UiProgressBar *pb, XtPointer c) {
85 Display *dp = XtDisplay(widget); 85 Display *dp = XtDisplay(widget);
86 Window w = XtWindow(widget); 86 Window w = XtWindow(widget);
87 if(w == 0) {
88 return;
89 }
87 if(!pb->gc) { 90 if(!pb->gc) {
88 XGCValues gcvals; 91 XGCValues gcvals;
89 gcvals.foreground = pb->color; 92 gcvals.foreground = pb->color;
90 pb->gc = XCreateGC(dp, w, (GCForeground), &gcvals); 93 pb->gc = XCreateGC(dp, w, (GCForeground), &gcvals);
91 } 94 }
156 XtAddCallback( 159 XtAddCallback(
157 drawingArea, 160 drawingArea,
158 XmNexposeCallback, 161 XmNexposeCallback,
159 (XtCallbackProc)ui_progressbar_expose, 162 (XtCallbackProc)ui_progressbar_expose,
160 progressbarData); 163 progressbarData);
164 XtAddCallback(
165 drawingArea,
166 XmNresizeCallback,
167 (XtCallbackProc)ui_progressbar_expose,
168 progressbarData);
161 169
162 170
163 XtManageChild(frame); 171 XtManageChild(frame);
164 return frame; 172 return frame;
165 } 173 }

mercurial