Mercurial > emacs
comparison src/xterm.c @ 31340:6b2ed557e09c
(x_alloc_lighter_color_for_widget): New function.
author | Miles Bader <miles@gnu.org> |
---|---|
date | Sun, 03 Sep 2000 11:33:29 +0000 |
parents | bc4608ec8691 |
children | 8bfcf0b562f2 |
comparison
equal
deleted
inserted
replaced
31339:0edf56745df4 | 31340:6b2ed557e09c |
---|---|
3247 Colormap cmap; | 3247 Colormap cmap; |
3248 XColor *color; | 3248 XColor *color; |
3249 { | 3249 { |
3250 struct frame *f = x_frame_of_widget (widget); | 3250 struct frame *f = x_frame_of_widget (widget); |
3251 return x_alloc_nearest_color (f, cmap, color); | 3251 return x_alloc_nearest_color (f, cmap, color); |
3252 } | |
3253 | |
3254 | |
3255 /* Allocate a color which is lighter or darker than *PIXEL by FACTOR | |
3256 or DELTA. Try a color with RGB values multiplied by FACTOR first. | |
3257 If this produces the same color as PIXEL, try a color where all RGB | |
3258 values have DELTA added. Return the allocated color in *PIXEL. | |
3259 DISPLAY is the X display, CMAP is the colormap to operate on. | |
3260 Value is non-zero if successful. */ | |
3261 | |
3262 int | |
3263 x_alloc_lighter_color_for_widget (widget, display, cmap, pixel, factor, delta) | |
3264 Widget widget; | |
3265 Display *display; | |
3266 Colormap cmap; | |
3267 unsigned long *pixel; | |
3268 double factor; | |
3269 int delta; | |
3270 { | |
3271 struct frame *f = x_frame_of_widget (widget); | |
3272 return x_alloc_lighter_color (f, display, cmap, pixel, factor, delta); | |
3252 } | 3273 } |
3253 | 3274 |
3254 | 3275 |
3255 #endif /* USE_X_TOOLKIT */ | 3276 #endif /* USE_X_TOOLKIT */ |
3256 | 3277 |