diff options
| author | Miles Bader | 2000-09-03 11:33:29 +0000 |
|---|---|---|
| committer | Miles Bader | 2000-09-03 11:33:29 +0000 |
| commit | 46d516e5b08d08907704f3d3cb6cd5861b2a2982 (patch) | |
| tree | 456a182b547f67e2afdbadc73240668e4efadf1f /src | |
| parent | 715e84c950d3dadaa9049af529833f507999d2fe (diff) | |
| download | emacs-46d516e5b08d08907704f3d3cb6cd5861b2a2982.tar.gz emacs-46d516e5b08d08907704f3d3cb6cd5861b2a2982.zip | |
(x_alloc_lighter_color_for_widget): New function.
Diffstat (limited to 'src')
| -rw-r--r-- | src/xterm.c | 21 |
1 files changed, 21 insertions, 0 deletions
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) | |||
| 3252 | } | 3252 | } |
| 3253 | 3253 | ||
| 3254 | 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); | ||
| 3273 | } | ||
| 3274 | |||
| 3275 | |||
| 3255 | #endif /* USE_X_TOOLKIT */ | 3276 | #endif /* USE_X_TOOLKIT */ |
| 3256 | 3277 | ||
| 3257 | 3278 | ||