Mercurial > hg > xemacs-beta
comparison lwlib/xlwscrollbar.c @ 373:6240c7796c7a r21-2b2
Import from CVS: tag r21-2b2
author | cvs |
---|---|
date | Mon, 13 Aug 2007 11:04:06 +0200 |
parents | cc15677e0335 |
children | 74fd4e045ea6 |
comparison
equal
deleted
inserted
replaced
372:49e1ed2d7ed8 | 373:6240c7796c7a |
---|---|
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. */ |