# HG changeset patch # User Miles Bader # Date 967980809 0 # Node ID 6b2ed557e09cca12aedf51965cb59d3e94588453 # Parent 0edf56745df4cd11f90050d1eced98b2f9388cce (x_alloc_lighter_color_for_widget): New function. diff -r 0edf56745df4 -r 6b2ed557e09c src/xterm.c --- a/src/xterm.c Sat Sep 02 21:56:47 2000 +0000 +++ b/src/xterm.c Sun Sep 03 11:33:29 2000 +0000 @@ -3252,6 +3252,27 @@ } +/* Allocate a color which is lighter or darker than *PIXEL by FACTOR + or DELTA. Try a color with RGB values multiplied by FACTOR first. + If this produces the same color as PIXEL, try a color where all RGB + values have DELTA added. Return the allocated color in *PIXEL. + DISPLAY is the X display, CMAP is the colormap to operate on. + Value is non-zero if successful. */ + +int +x_alloc_lighter_color_for_widget (widget, display, cmap, pixel, factor, delta) + Widget widget; + Display *display; + Colormap cmap; + unsigned long *pixel; + double factor; + int delta; +{ + struct frame *f = x_frame_of_widget (widget); + return x_alloc_lighter_color (f, display, cmap, pixel, factor, delta); +} + + #endif /* USE_X_TOOLKIT */