Mercurial > hg > xemacs-beta
comparison lwlib/xlwscrollbar.c @ 318:afd57c14dfc8 r21-0b57
Import from CVS: tag r21-0b57
author | cvs |
---|---|
date | Mon, 13 Aug 2007 10:45:36 +0200 |
parents | c5d627a313b1 |
children | 7347b34c275b |
comparison
equal
deleted
inserted
replaced
317:a2fc9afbef65 | 318:afd57c14dfc8 |
---|---|
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 #ifdef NEED_MOTIF | |
489 #ifndef XmUNSPECIFIED_PIXMAP | |
490 #define XmUNSPECIFIED_PIXMAP 2 | |
491 #endif | |
492 #endif /* NEED_MOTIF */ | |
493 | |
488 static GC | 494 static GC |
489 get_gc (XlwScrollBarWidget w, Pixel fg, Pixel bg, Pixmap pm) | 495 get_gc (XlwScrollBarWidget w, Pixel fg, Pixel bg, Pixmap pm) |
490 { | 496 { |
491 XGCValues values; | 497 XGCValues values; |
492 XtGCMask mask; | 498 XtGCMask mask; |
504 | 510 |
505 values.foreground = fg; | 511 values.foreground = fg; |
506 values.background = bg; | 512 values.background = bg; |
507 values.fill_style = FillOpaqueStippled; | 513 values.fill_style = FillOpaqueStippled; |
508 values.stipple = pm; | 514 values.stipple = pm; |
515 /* mask = GCForeground | GCBackground | | |
516 (pm == None ? 0 : GCStipple | GCFillStyle); gtb */ | |
517 #ifdef NEED_MOTIF | |
518 if (pm != None && pm != 0 && pm != XmUNSPECIFIED_PIXMAP) | |
519 values.stipple = pm; | |
520 else | |
521 values.stipple = None; | |
522 #else | |
523 values.stipple = pm; | |
524 #endif /* NEED_MOTIF */ | |
509 mask = GCForeground | GCBackground | | 525 mask = GCForeground | GCBackground | |
510 (pm == None ? 0 : GCStipple | GCFillStyle); | 526 (values.stipple == None ? 0 : GCStipple | GCFillStyle); |
527 | |
511 return XtGetGC((Widget) w, mask, &values); | 528 return XtGetGC((Widget) w, mask, &values); |
512 } | 529 } |
513 | 530 |
514 /* Replacement for XAllocColor() that tries to return the nearest | 531 /* Replacement for XAllocColor() that tries to return the nearest |
515 available color if the colormap is full. From FSF Emacs. */ | 532 available color if the colormap is full. From FSF Emacs. */ |