Mercurial > hg > xemacs-beta
comparison lwlib/xlwscrollbar.c @ 371:cc15677e0335 r21-2b1
Import from CVS: tag r21-2b1
author | cvs |
---|---|
date | Mon, 13 Aug 2007 11:03:08 +0200 |
parents | 7347b34c275b |
children | 6240c7796c7a |
comparison
equal
deleted
inserted
replaced
370:bd866891f083 | 371:cc15677e0335 |
---|---|
483 { | 483 { |
484 return w->sb.arrowPosition && w->sb.arrowPosition[0] == 's' ? True : False; | 484 return w->sb.arrowPosition && w->sb.arrowPosition[0] == 's' ? True : False; |
485 } | 485 } |
486 | 486 |
487 /*-------------------------- GC and Pixel allocation --------------------*/ | 487 /*-------------------------- GC and Pixel allocation --------------------*/ |
488 #ifndef XmUNSPECIFIED_PIXMAP | |
489 #define XmUNSPECIFIED_PIXMAP 2 | |
490 #endif | |
491 | |
492 static GC | 488 static GC |
493 get_gc (XlwScrollBarWidget w, Pixel fg, Pixel bg, Pixmap pm) | 489 get_gc (XlwScrollBarWidget w, Pixel fg, Pixel bg, Pixmap pm) |
494 { | 490 { |
495 XGCValues values; | 491 XGCValues values; |
496 XtGCMask mask; | 492 XtGCMask mask; |
508 | 504 |
509 values.foreground = fg; | 505 values.foreground = fg; |
510 values.background = bg; | 506 values.background = bg; |
511 values.fill_style = FillOpaqueStippled; | 507 values.fill_style = FillOpaqueStippled; |
512 values.stipple = pm; | 508 values.stipple = pm; |
513 /* mask = GCForeground | GCBackground | | |
514 (pm == None ? 0 : GCStipple | GCFillStyle); gtb */ | |
515 if (pm != None && pm != 0 && pm != XmUNSPECIFIED_PIXMAP) | |
516 values.stipple = pm; | |
517 else | |
518 values.stipple = None; | |
519 mask = GCForeground | GCBackground | | 509 mask = GCForeground | GCBackground | |
520 (values.stipple == None ? 0 : GCStipple | GCFillStyle); | 510 (pm == None ? 0 : GCStipple | GCFillStyle); |
521 | |
522 return XtGetGC((Widget) w, mask, &values); | 511 return XtGetGC((Widget) w, mask, &values); |
523 } | 512 } |
524 | 513 |
525 /* Replacement for XAllocColor() that tries to return the nearest | 514 /* Replacement for XAllocColor() that tries to return the nearest |
526 available color if the colormap is full. From FSF Emacs. */ | 515 available color if the colormap is full. From FSF Emacs. */ |