comparison lwlib/xlwgcs.c @ 5936:574f0cded429 cygwin

try to replace all nnnL or nnnUL constants with EMACS_[U]INT
author Henry Thompson <ht@markup.co.uk>
date Sun, 13 Dec 2015 13:22:58 +0000
parents 308d34e9f07d
children
comparison
equal deleted inserted replaced
5935:d5eb0914ca1f 5936:574f0cded429
191 vmask = GCForeground ; 191 vmask = GCForeground ;
192 dcmask = GCFont|GCSubwindowMode|GCDashOffset| 192 dcmask = GCFont|GCSubwindowMode|GCDashOffset|
193 GCDashList|GCArcMode|GCBackground|GCGraphicsExposures ; 193 GCDashList|GCArcMode|GCBackground|GCGraphicsExposures ;
194 } 194 }
195 195
196 return XtAllocateGC(w, w->core.depth, vmask, &values, 0L, dcmask) ; 196 return XtAllocateGC(w, w->core.depth, vmask, &values, E0, dcmask) ;
197 } 197 }
198 198
199 199
200 /* return gc with widget background color as the foreground */ 200 /* return gc with widget background color as the foreground */
201 201
250 vmask |= GCBackground|GCStipple|GCFillStyle ; 250 vmask |= GCBackground|GCStipple|GCFillStyle ;
251 values.fill_style = FillOpaqueStippled ; 251 values.fill_style = FillOpaqueStippled ;
252 values.stipple = getDitherPixmap(w, contrast) ; 252 values.stipple = getDitherPixmap(w, contrast) ;
253 } 253 }
254 254
255 return XtAllocateGC(w, w->core.depth, vmask, &values, 0L, dcmask) ; 255 return XtAllocateGC(w, w->core.depth, vmask, &values, E0, dcmask) ;
256 } else { 256 } else {
257 dcmask |= GCBackground ; 257 dcmask |= GCBackground ;
258 values.foreground = AllocGreyPixel(w, fg, bg, contrast) ; 258 values.foreground = AllocGreyPixel(w, fg, bg, contrast) ;
259 return XtAllocateGC(w, w->core.depth, vmask, &values, 0L, dcmask) ; 259 return XtAllocateGC(w, w->core.depth, vmask, &values, E0, dcmask) ;
260 } 260 }
261 } 261 }
262 262
263 /* return top-shadow gc. */ 263 /* return top-shadow gc. */
264 264
275 else 275 else
276 values.foreground = AllocShadowPixel(w, 100+contrast) ; 276 values.foreground = AllocShadowPixel(w, 100+contrast) ;
277 277
278 return XtAllocateGC(w, w->core.depth, 278 return XtAllocateGC(w, w->core.depth,
279 GCForeground, &values, 279 GCForeground, &values,
280 0L, 280 E0,
281 GCBackground|GCFont|GCSubwindowMode|GCGraphicsExposures| 281 GCBackground|GCFont|GCSubwindowMode|GCGraphicsExposures|
282 GCDashOffset|GCDashList|GCArcMode) ; 282 GCDashOffset|GCDashList|GCArcMode) ;
283 } 283 }
284 284
285 /* return bottom-shadow gc. */ 285 /* return bottom-shadow gc. */
295 else 295 else
296 values.foreground = AllocShadowPixel(w, 100-contrast) ; 296 values.foreground = AllocShadowPixel(w, 100-contrast) ;
297 297
298 return XtAllocateGC(w, w->core.depth, 298 return XtAllocateGC(w, w->core.depth,
299 GCForeground, &values, 299 GCForeground, &values,
300 0L, 300 E0,
301 GCBackground|GCFont|GCSubwindowMode|GCGraphicsExposures| 301 GCBackground|GCFont|GCSubwindowMode|GCGraphicsExposures|
302 GCDashOffset|GCDashList|GCArcMode) ; 302 GCDashOffset|GCDashList|GCArcMode) ;
303 } 303 }
304 304
305 /* return arm-shadow gc. */ 305 /* return arm-shadow gc. */
319 if( values.background == BlackPixelOfScreen(scr) ) 319 if( values.background == BlackPixelOfScreen(scr) )
320 values.foreground = WhitePixelOfScreen(scr) ; 320 values.foreground = WhitePixelOfScreen(scr) ;
321 else 321 else
322 values.foreground = BlackPixelOfScreen(scr) ; 322 values.foreground = BlackPixelOfScreen(scr) ;
323 values.fill_style = FillStippled ; 323 values.fill_style = FillStippled ;
324 values.stipple = XmuCreateStippledPixmap(XtScreen(w), 1L, 0L, 1) ; 324 values.stipple = XmuCreateStippledPixmap(XtScreen(w), E1, E0, 1) ;
325 325
326 return XtAllocateGC(w, w->core.depth, 326 return XtAllocateGC(w, w->core.depth,
327 GCForeground|GCBackground|GCStipple|GCFillStyle, 327 GCForeground|GCBackground|GCStipple|GCFillStyle,
328 &values, 0L, 328 &values, E0,
329 GCFont|GCSubwindowMode|GCGraphicsExposures| 329 GCFont|GCSubwindowMode|GCGraphicsExposures|
330 GCDashOffset|GCDashList|GCArcMode) ; 330 GCDashOffset|GCDashList|GCArcMode) ;
331 } else { 331 } else {
332 values.foreground = AllocShadowPixel(w, 100-contrast) ; 332 values.foreground = AllocShadowPixel(w, 100-contrast) ;
333 return XtAllocateGC(w, w->core.depth, 333 return XtAllocateGC(w, w->core.depth,
334 GCForeground, &values, 334 GCForeground, &values,
335 0L, 335 E0,
336 GCBackground|GCFont|GCSubwindowMode|GCGraphicsExposures| 336 GCBackground|GCFont|GCSubwindowMode|GCGraphicsExposures|
337 GCDashOffset|GCDashList|GCArcMode) ; 337 GCDashOffset|GCDashList|GCArcMode) ;
338 } 338 }
339 } 339 }
340 340
508 if( contrast <= 5 ) 508 if( contrast <= 5 )
509 return XCreateBitmapFromData(dpy,win, (char *)screen0, 2,2) ; 509 return XCreateBitmapFromData(dpy,win, (char *)screen0, 2,2) ;
510 else if( contrast <= 37 ) 510 else if( contrast <= 37 )
511 return XCreateBitmapFromData(dpy,win, (char *)screen25, 2,2) ; 511 return XCreateBitmapFromData(dpy,win, (char *)screen25, 2,2) ;
512 else if( contrast <= 62 ) 512 else if( contrast <= 62 )
513 return XmuCreateStippledPixmap(XtScreen(w), 1L, 0L, 1) ; 513 return XmuCreateStippledPixmap(XtScreen(w), E1, E0, 1) ;
514 else if( contrast <= 95 ) 514 else if( contrast <= 95 )
515 return XCreateBitmapFromData(dpy,win, (char *)screen75, 2,2) ; 515 return XCreateBitmapFromData(dpy,win, (char *)screen75, 2,2) ;
516 else 516 else
517 return XCreateBitmapFromData(dpy,win, (char *)screen100, 2,2) ; 517 return XCreateBitmapFromData(dpy,win, (char *)screen100, 2,2) ;
518 } 518 }