Lines Matching defs:lw

138 GetPixmaps(LEDWidget lw)
147 dpy = XtDisplay((Widget) lw);
148 root = RootWindowOfScreen(XtScreen((Widget) lw));
149 if (lw->led.on_pixmap != None) {
150 XFreePixmap(dpy, lw->led.on_pixmap);
151 lw->led.on_pixmap = None;
153 if (lw->led.off_pixmap != None) {
154 XFreePixmap(dpy, lw->led.off_pixmap);
155 lw->led.off_pixmap = None;
157 lw->led.on_pixmap = on_pixmap =
158 XCreatePixmap(dpy, root, lw->core.width, lw->core.height,
159 lw->core.depth);
160 lw->led.off_pixmap = off_pixmap =
161 XCreatePixmap(dpy, root, lw->core.width, lw->core.height,
162 lw->core.depth);
164 values.foreground = lw->led.top_color;
165 gc = XCreateGC(dpy, lw->led.on_pixmap, (unsigned) GCForeground, &values);
166 bevel = lw->led.bevel;
167 width = lw->core.width;
168 height = lw->core.height;
171 XSetForeground(dpy, gc, lw->led.bottom_color);
176 XSetForeground(dpy, gc, lw->led.on_color);
179 XSetForeground(dpy, gc, lw->led.off_color);
183 if (lw->led.on)
187 if (XtWindow((Widget) lw) != None)
188 XSetWindowBackgroundPixmap(dpy, XtWindow((Widget) lw), pix);
196 LEDWidget lw = (LEDWidget) new;
198 if (lw->core.height == 0)
199 lw->core.height = lw->led.led_height;
200 if (lw->core.width == 0)
201 lw->core.width = lw->led.led_width;
202 lw->core.border_width = 0;
203 if (lw->led.bevel == 0)
204 lw->led.bevel = 1;
205 lw->led.on_pixmap = lw->led.off_pixmap = None;
206 (*XtClass(new)->core_class.resize) ((Widget) lw);
207 GetPixmaps(lw);
213 LEDWidget lw = (LEDWidget) w;
218 if (lw->led.on)
219 pix = lw->led.on_pixmap;
221 pix = lw->led.off_pixmap;
273 LEDWidget lw = (LEDWidget) w;
275 if (lw->led.on_pixmap != None) {
276 XFreePixmap(XtDisplay(w), lw->led.on_pixmap);
277 lw->led.on_pixmap = None;
279 if (lw->led.off_pixmap != None) {
280 XFreePixmap(XtDisplay(w), lw->led.off_pixmap);
281 lw->led.off_pixmap = None;
290 LEDWidget lw = (LEDWidget) w;
293 preferred->width = lw->led.led_height;
294 preferred->height = lw->led.led_width;