From: Miles Bader Date: Sun, 3 Sep 2000 11:33:29 +0000 (+0000) Subject: (x_alloc_lighter_color_for_widget): New function. X-Git-Tag: emacs-pretest-21.0.90~1837 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=46d516e5b08d08907704f3d3cb6cd5861b2a2982;p=emacs.git (x_alloc_lighter_color_for_widget): New function. --- diff --git a/src/xterm.c b/src/xterm.c index ccd9f8bce6e..73ccf6040a6 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -3252,6 +3252,27 @@ x_alloc_nearest_color_for_widget (widget, cmap, color) } +/* 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 */