[vte/vte-next: 42/114] Add vte_terminal_set_background_tint_color_rgba



commit fd964b7032c479b0a55a6d5eba557800ab829f5c
Author: Christian Persch <chpe gnome org>
Date:   Mon May 2 23:21:01 2011 +0200

    Add vte_terminal_set_background_tint_color_rgba

 doc/reference/vte-sections.txt |    1 +
 src/vte.c                      |   28 ++++++++++++++++++++++++++++
 src/vte.h                      |    2 ++
 3 files changed, 31 insertions(+), 0 deletions(-)
---
diff --git a/doc/reference/vte-sections.txt b/doc/reference/vte-sections.txt
index d6c5123..a7e6972 100644
--- a/doc/reference/vte-sections.txt
+++ b/doc/reference/vte-sections.txt
@@ -49,6 +49,7 @@ vte_terminal_set_background_image_file
 vte_terminal_set_background_saturation
 vte_terminal_set_background_transparent
 vte_terminal_set_background_tint_color
+vte_terminal_set_background_tint_color_rgba
 vte_terminal_set_scroll_background
 vte_terminal_set_cursor_shape
 vte_terminal_get_cursor_shape
diff --git a/src/vte.c b/src/vte.c
index 946677d..bd1a98a 100644
--- a/src/vte.c
+++ b/src/vte.c
@@ -12528,6 +12528,34 @@ vte_terminal_set_background_tint_color(VteTerminal *terminal,
 }
 
 /**
+ * vte_terminal_set_background_tint_color_rgba:
+ * @terminal: a #VteTerminal
+ * @color: (allow-none): a color which the terminal background should be tinted to if its
+ *   saturation is not 1.0.
+ *
+ * If a background image has been set using
+ * vte_terminal_set_background_image(),
+ * vte_terminal_set_background_image_file(), or
+ * vte_terminal_set_background_transparent(), and the value set by
+ * vte_terminal_set_background_saturation() is less than one, the terminal
+ * will adjust the color of the image before drawing the image.  To do so,
+ * the terminal will create a copy of the background image (or snapshot of
+ * the root window) and modify its pixel values.  The initial tint color
+ * is black.
+ *
+ * Since: 0.30
+ */
+void
+vte_terminal_set_background_tint_color_rgba(VteTerminal *terminal,
+                                            const GdkRGBA *rgba)
+{
+        GdkColor color;
+
+        gdk_color_from_rgba(&color, rgba);
+        vte_terminal_set_background_tint_color(terminal, &color);
+}
+
+/**
  * vte_terminal_set_background_transparent:
  * @terminal: a #VteTerminal
  * @transparent: whether the terminal should fake transparency
diff --git a/src/vte.h b/src/vte.h
index 49b9b2d..6ad2b2e 100644
--- a/src/vte.h
+++ b/src/vte.h
@@ -272,6 +272,8 @@ void vte_terminal_set_background_image_file(VteTerminal *terminal,
 					    const char *path);
 void vte_terminal_set_background_tint_color(VteTerminal *terminal,
 					    const GdkColor *color);
+void vte_terminal_set_background_tint_color_rgba(VteTerminal *terminal,
+                                                 const GdkRGBA *rgba);
 void vte_terminal_set_background_saturation(VteTerminal *terminal,
 					    double saturation);
 void vte_terminal_set_background_transparent(VteTerminal *terminal,



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]