[vte] widget: Rename API



commit a8aa5606c0a69eed3e2e31d1077af672ffe26c61
Author: Christian Persch <chpe gnome org>
Date:   Sat Apr 26 18:12:57 2014 +0200

    widget: Rename API
    
    Now that the GdkColor APIs are gone, rename the GdkRGBA APIs to remove
    the _rgba suffix.

 doc/reference/vte-sections.txt |   16 ++++++------
 src/app.vala                   |   12 ++++----
 src/vte.c                      |   52 ++++++++++++++-------------------------
 src/vte.h                      |   38 ++++++++++++++--------------
 4 files changed, 52 insertions(+), 66 deletions(-)
---
diff --git a/doc/reference/vte-sections.txt b/doc/reference/vte-sections.txt
index 713ab60..3fc98ec 100644
--- a/doc/reference/vte-sections.txt
+++ b/doc/reference/vte-sections.txt
@@ -30,14 +30,14 @@ vte_terminal_set_scroll_on_output
 vte_terminal_set_scroll_on_keystroke
 vte_terminal_set_rewrap_on_resize
 vte_terminal_get_rewrap_on_resize
-vte_terminal_set_color_bold_rgba
-vte_terminal_set_color_foreground_rgba
-vte_terminal_set_color_background_rgba
-vte_terminal_set_color_dim_rgba
-vte_terminal_set_color_cursor_rgba
-vte_terminal_set_color_highlight_rgba
-vte_terminal_set_color_highlight_foreground_rgba
-vte_terminal_set_colors_rgba
+vte_terminal_set_color_bold
+vte_terminal_set_color_foreground
+vte_terminal_set_color_background
+vte_terminal_set_color_dim
+vte_terminal_set_color_cursor
+vte_terminal_set_color_highlight
+vte_terminal_set_color_highlight_foreground
+vte_terminal_set_colors
 vte_terminal_set_default_colors
 vte_terminal_set_cursor_shape
 vte_terminal_get_cursor_shape
diff --git a/src/app.vala b/src/app.vala
index 21cb2d4..877784b 100644
--- a/src/app.vala
+++ b/src/app.vala
@@ -124,12 +124,12 @@ class Window : Gtk.ApplicationWindow
                        terminal.set_font(desc);
                }
 
-               terminal.set_colors_rgba(App.Options.get_color_fg(),
-                                                                App.Options.get_color_bg(),
-                                                                null);
-               terminal.set_color_cursor_rgba(App.Options.get_color_cursor());
-               terminal.set_color_highlight_rgba(App.Options.get_color_hl_bg());
-               terminal.set_color_highlight_foreground_rgba(App.Options.get_color_hl_fg());
+               terminal.set_colors(App.Options.get_color_fg(),
+                                                       App.Options.get_color_bg(),
+                                                       null);
+               terminal.set_color_cursor(App.Options.get_color_cursor());
+               terminal.set_color_highlight(App.Options.get_color_hl_bg());
+               terminal.set_color_highlight_foreground(App.Options.get_color_hl_fg());
 
                /* Dingus */
                if (!App.Options.no_builtin_dingus)
diff --git a/src/vte.c b/src/vte.c
index 5d1a3d3..9dbb951 100644
--- a/src/vte.c
+++ b/src/vte.c
@@ -2684,8 +2684,8 @@ _vte_terminal_set_colors(VteTerminal *terminal,
 }
 
 static PangoColor *
-_pango_color_from_rgba (PangoColor *color,
-                        const GdkRGBA *rgba)
+_pango_color_from_rgba(PangoColor *color,
+                       const GdkRGBA *rgba)
 {
         if (rgba == NULL)
                 return NULL;
@@ -2698,7 +2698,7 @@ _pango_color_from_rgba (PangoColor *color,
 }
 
 /**
- * vte_terminal_set_color_bold_rgba:
+ * vte_terminal_set_color_bold:
  * @terminal: a #VteTerminal
  * @bold: (allow-none): the new bold color or %NULL
  *
@@ -2706,7 +2706,7 @@ _pango_color_from_rgba (PangoColor *color,
  * If @bold is %NULL then the default color is used.
  */
 void
-vte_terminal_set_color_bold_rgba(VteTerminal *terminal,
+vte_terminal_set_color_bold(VteTerminal *terminal,
                                  const GdkRGBA *bold)
 {
        PangoColor color;
@@ -2729,17 +2729,15 @@ vte_terminal_set_color_bold_rgba(VteTerminal *terminal,
 }
 
 /**
- * vte_terminal_set_color_dim_rgba:
+ * vte_terminal_set_color_dim:
  * @terminal: a #VteTerminal
  * @dim: (allow-none): the new dim color or %NULL
  *
  * Sets the color used to draw dim text in the default foreground color.
  * If @dim is %NULL then the default color is used.
- *
- * Since: 0.28
  */
 void
-vte_terminal_set_color_dim_rgba(VteTerminal *terminal,
+vte_terminal_set_color_dim(VteTerminal *terminal,
                                 const GdkRGBA *dim)
 {
        PangoColor color;
@@ -2762,16 +2760,14 @@ vte_terminal_set_color_dim_rgba(VteTerminal *terminal,
 }
 
 /**
- * vte_terminal_set_color_foreground_rgba:
+ * vte_terminal_set_color_foreground:
  * @terminal: a #VteTerminal
  * @foreground: the new foreground color
  *
  * Sets the foreground color used to draw normal text.
- *
- * Since: 0.28
  */
 void
-vte_terminal_set_color_foreground_rgba(VteTerminal *terminal,
+vte_terminal_set_color_foreground(VteTerminal *terminal,
                                       const GdkRGBA *foreground)
 {
        PangoColor color;
@@ -2784,18 +2780,16 @@ vte_terminal_set_color_foreground_rgba(VteTerminal *terminal,
 }
 
 /**
- * vte_terminal_set_color_background_rgba:
+ * vte_terminal_set_color_background:
  * @terminal: a #VteTerminal
  * @background: the new background color
  *
  * Sets the background color for text which does not have a specific background
  * color assigned.  Only has effect when no background image is set and when
  * the terminal is not transparent.
- *
- * Since: 0.28
  */
 void
-vte_terminal_set_color_background_rgba(VteTerminal *terminal,
+vte_terminal_set_color_background(VteTerminal *terminal,
                                       const GdkRGBA *background)
 {
        PangoColor color;
@@ -2804,23 +2798,21 @@ vte_terminal_set_color_background_rgba(VteTerminal *terminal,
         g_return_if_fail(background != NULL);
 
        _vte_terminal_set_color_background(terminal,
-                                           _pango_color_from_rgba (&color, background));
+                                           _pango_color_from_rgba(&color, background));
         _vte_terminal_set_background_alpha(terminal, background->alpha);
 }
 
 /**
- * vte_terminal_set_color_cursor_rgba:
+ * vte_terminal_set_color_cursor:
  * @terminal: a #VteTerminal
  * @cursor_background: (allow-none): the new color to use for the text cursor, or %NULL
  *
  * Sets the background color for text which is under the cursor.  If %NULL, text
  * under the cursor will be drawn with foreground and background colors
  * reversed.
- *
- * Since: 0.28
  */
 void
-vte_terminal_set_color_cursor_rgba(VteTerminal *terminal,
+vte_terminal_set_color_cursor(VteTerminal *terminal,
                                   const GdkRGBA *cursor_background)
 {
         PangoColor color;
@@ -2832,7 +2824,7 @@ vte_terminal_set_color_cursor_rgba(VteTerminal *terminal,
 }
 
 /**
- * vte_terminal_set_color_highlight_rgba:
+ * vte_terminal_set_color_highlight:
  * @terminal: a #VteTerminal
  * @highlight_background: (allow-none): the new color to use for highlighted text, or %NULL
  *
@@ -2840,11 +2832,9 @@ vte_terminal_set_color_cursor_rgba(VteTerminal *terminal,
  * it is unset.  If neither highlight background nor highlight foreground are set,
  * highlighted text (which is usually highlighted because it is selected) will
  * be drawn with foreground and background colors reversed.
- *
- * Since: 0.28
  */
 void
-vte_terminal_set_color_highlight_rgba(VteTerminal *terminal,
+vte_terminal_set_color_highlight(VteTerminal *terminal,
                                      const GdkRGBA *highlight_background)
 {
        PangoColor color;
@@ -2856,7 +2846,7 @@ vte_terminal_set_color_highlight_rgba(VteTerminal *terminal,
 }
 
 /**
- * vte_terminal_set_color_highlight_foreground_rgba:
+ * vte_terminal_set_color_highlight_foreground:
  * @terminal: a #VteTerminal
  * @highlight_foreground: (allow-none): the new color to use for highlighted text, or %NULL
  *
@@ -2864,11 +2854,9 @@ vte_terminal_set_color_highlight_rgba(VteTerminal *terminal,
  * it is unset.  If neither highlight background nor highlight foreground are set,
  * highlighted text (which is usually highlighted because it is selected) will
  * be drawn with foreground and background colors reversed.
- *
- * Since: 0.36
  */
 void
-vte_terminal_set_color_highlight_foreground_rgba(VteTerminal *terminal,
+vte_terminal_set_color_highlight_foreground(VteTerminal *terminal,
                                                 const GdkRGBA *highlight_foreground)
 {
        PangoColor color;
@@ -2880,7 +2868,7 @@ vte_terminal_set_color_highlight_foreground_rgba(VteTerminal *terminal,
 }
 
 /**
- * vte_terminal_set_colors_rgba:
+ * vte_terminal_set_colors:
  * @terminal: a #VteTerminal
  * @foreground: (allow-none): the new foreground color, or %NULL
  * @background: (allow-none): the new background color, or %NULL
@@ -2900,11 +2888,9 @@ vte_terminal_set_color_highlight_foreground_rgba(VteTerminal *terminal,
  * @palette_size is 8 or 16, the third (dim) and possibly the second (bold)
  * 8-color palettes are extrapolated from the new background color and the items
  * in @palette.
- *
- * Since: 0.28
  */
 void
-vte_terminal_set_colors_rgba(VteTerminal *terminal,
+vte_terminal_set_colors(VteTerminal *terminal,
                             const GdkRGBA *foreground,
                             const GdkRGBA *background,
                             const GdkRGBA *palette,
diff --git a/src/vte.h b/src/vte.h
index 656d519..121aa5e 100644
--- a/src/vte.h
+++ b/src/vte.h
@@ -238,25 +238,25 @@ void vte_terminal_set_rewrap_on_resize(VteTerminal *terminal, gboolean rewrap);
 gboolean vte_terminal_get_rewrap_on_resize(VteTerminal *terminal);
 
 /* Set the color scheme. */
-void vte_terminal_set_color_bold_rgba(VteTerminal *terminal,
-                                      const GdkRGBA *bold);
-void vte_terminal_set_color_dim_rgba(VteTerminal *terminal,
-                                    const GdkRGBA *dim);
-void vte_terminal_set_color_foreground_rgba(VteTerminal *terminal,
-                                           const GdkRGBA *foreground);
-void vte_terminal_set_color_background_rgba(VteTerminal *terminal,
-                                           const GdkRGBA *background);
-void vte_terminal_set_color_cursor_rgba(VteTerminal *terminal,
-                                       const GdkRGBA *cursor_background);
-void vte_terminal_set_color_highlight_rgba(VteTerminal *terminal,
-                                          const GdkRGBA *highlight_background);
-void vte_terminal_set_color_highlight_foreground_rgba(VteTerminal *terminal,
-                                                     const GdkRGBA *highlight_foreground);
-void vte_terminal_set_colors_rgba(VteTerminal *terminal,
-                                 const GdkRGBA *foreground,
-                                 const GdkRGBA *background,
-                                 const GdkRGBA *palette,
-                                 gsize palette_size);
+void vte_terminal_set_color_bold(VteTerminal *terminal,
+                                 const GdkRGBA *bold);
+void vte_terminal_set_color_dim(VteTerminal *terminal,
+                                const GdkRGBA *dim);
+void vte_terminal_set_color_foreground(VteTerminal *terminal,
+                                       const GdkRGBA *foreground);
+void vte_terminal_set_color_background(VteTerminal *terminal,
+                                       const GdkRGBA *background);
+void vte_terminal_set_color_cursor(VteTerminal *terminal,
+                                   const GdkRGBA *cursor_background);
+void vte_terminal_set_color_highlight(VteTerminal *terminal,
+                                      const GdkRGBA *highlight_background);
+void vte_terminal_set_color_highlight_foreground(VteTerminal *terminal,
+                                                 const GdkRGBA *highlight_foreground);
+void vte_terminal_set_colors(VteTerminal *terminal,
+                             const GdkRGBA *foreground,
+                             const GdkRGBA *background,
+                             const GdkRGBA *palette,
+                             gsize palette_size);
 
 void vte_terminal_set_default_colors(VteTerminal *terminal);
 


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