[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r102717: Restore x_alloc_lighter_colo
From: |
Andreas Schwab |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r102717: Restore x_alloc_lighter_color_for_widget, needed for lwlib |
Date: |
Tue, 28 Dec 2010 17:34:04 +0100 |
User-agent: |
Bazaar (2.0.3) |
------------------------------------------------------------
revno: 102717
committer: Andreas Schwab <address@hidden>
branch nick: emacs
timestamp: Tue 2010-12-28 17:34:04 +0100
message:
Restore x_alloc_lighter_color_for_widget, needed for lwlib
* src/xterm.h (x_alloc_lighter_color_for_widget): Restore declaration.
* src/xterm.c (x_alloc_lighter_color_for_widget): Restore.
modified:
src/ChangeLog
src/xterm.c
src/xterm.h
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog 2010-12-27 17:29:38 +0000
+++ b/src/ChangeLog 2010-12-28 16:34:04 +0000
@@ -1,3 +1,8 @@
+2010-12-28 Andreas Schwab <address@hidden>
+
+ * xterm.h (x_alloc_lighter_color_for_widget): Restore declaration.
+ * xterm.c (x_alloc_lighter_color_for_widget): Restore.
+
2010-12-27 Andreas Schwab <address@hidden>
* buffer.c: Remove unused declarations.
=== modified file 'src/xterm.c'
--- a/src/xterm.c 2010-12-27 17:29:38 +0000
+++ b/src/xterm.c 2010-12-28 16:34:04 +0000
@@ -1483,6 +1483,22 @@
}
+/* 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 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);
+}
+
+
/* Structure specifying which arguments should be passed by Xt to
cvt_string_to_pixel. We want the widget's screen and colormap. */
=== modified file 'src/xterm.h'
--- a/src/xterm.h 2010-12-27 17:29:38 +0000
+++ b/src/xterm.h 2010-12-28 16:34:04 +0000
@@ -974,6 +974,9 @@
extern unsigned long x_copy_color (struct frame *, unsigned long);
#ifdef USE_X_TOOLKIT
extern XtAppContext Xt_app_con;
+extern int x_alloc_lighter_color_for_widget (Widget, Display *, Colormap,
+ unsigned long *,
+ double, int);
extern void x_activate_timeout_atimer (void);
#endif
extern int x_alloc_nearest_color (struct frame *, Colormap, XColor *);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r102717: Restore x_alloc_lighter_color_for_widget, needed for lwlib,
Andreas Schwab <=