[gimp] app: rename gimpdisplayshell-style to gimpcanvas-style



commit 52b92e740fea58154f8f93ad520c272b81573be6
Author: Michael Natterer <mitch gimp org>
Date:   Thu Apr 18 14:21:20 2013 +0200

    app: rename gimpdisplayshell-style to gimpcanvas-style
    
    because it doesn't and shouldn't depend on GimpDisplayShell at all.
    In the future, it will take its defaults from the canvas' theme.

 app/display/Makefile.am                            |   4 +-
 ...gimpdisplayshell-style.c => gimpcanvas-style.c} | 107 ++++++++++-----------
 app/display/gimpcanvas-style.h                     |  66 +++++++++++++
 app/display/gimpcanvasgrid.c                       |   5 +-
 app/display/gimpcanvasguide.c                      |   6 +-
 app/display/gimpcanvasitem.c                       |  12 ++-
 app/display/gimpcanvaslayerboundary.c              |   6 +-
 app/display/gimpcanvaspassepartout.c               |   5 +-
 app/display/gimpcanvaspath.c                       |  11 ++-
 app/display/gimpcanvaspen.c                        |   5 +-
 app/display/gimpcanvasprogress.c                   |   4 +-
 app/display/gimpcanvasproxygroup.c                 |   1 -
 app/display/gimpcanvassamplepoint.c                |  10 +-
 app/display/gimpdisplayshell-draw.c                |   6 +-
 app/display/gimpdisplayshell-style.h               |  66 -------------
 app/tools/gimptool-progress.c                      |   1 -
 16 files changed, 158 insertions(+), 157 deletions(-)
---
diff --git a/app/display/Makefile.am b/app/display/Makefile.am
index 24540dc..de9fc49 100644
--- a/app/display/Makefile.am
+++ b/app/display/Makefile.am
@@ -19,6 +19,8 @@ libappdisplay_a_sources = \
        display-types.h                         \
        gimpcanvas.c                            \
        gimpcanvas.h                            \
+       gimpcanvas-style.c                      \
+       gimpcanvas-style.h                      \
        gimpcanvasarc.c                         \
        gimpcanvasarc.h                         \
        gimpcanvasboundary.c                    \
@@ -119,8 +121,6 @@ libappdisplay_a_sources = \
        gimpdisplayshell-scroll.h               \
        gimpdisplayshell-selection.c            \
        gimpdisplayshell-selection.h            \
-       gimpdisplayshell-style.c                \
-       gimpdisplayshell-style.h                \
        gimpdisplayshell-title.c                \
        gimpdisplayshell-title.h                \
        gimpdisplayshell-tool-events.c          \
diff --git a/app/display/gimpdisplayshell-style.c b/app/display/gimpcanvas-style.c
similarity index 71%
rename from app/display/gimpdisplayshell-style.c
rename to app/display/gimpcanvas-style.c
index 91b87ce..9868417 100644
--- a/app/display/gimpdisplayshell-style.c
+++ b/app/display/gimpcanvas-style.c
@@ -1,7 +1,7 @@
 /* GIMP - The GNU Image Manipulation Program
  * Copyright (C) 1995 Spencer Kimball and Peter Mattis
  *
- * gimpdisplayshell-style.c
+ * gimpcanvas-style.c
  * Copyright (C) 2010  Michael Natterer <mitch gimp org>
  *
  * This program is free software: you can redistribute it and/or modify
@@ -32,8 +32,7 @@
 #include "core/gimpgrid.h"
 #include "core/gimplayer.h"
 
-#include "gimpdisplayshell.h"
-#include "gimpdisplayshell-style.h"
+#include "gimpcanvas-style.h"
 
 
 static const GimpRGB guide_normal_fg     = { 0.0, 0.0, 0.0, 1.0 };
@@ -78,13 +77,13 @@ static const GimpRGB tool_fg_highlight   = { 1.0, 0.8, 0.2, 0.8 };
 /*  public functions  */
 
 void
-gimp_display_shell_set_guide_style (GimpDisplayShell *shell,
-                                    cairo_t          *cr,
-                                    gboolean          active)
+gimp_canvas_set_guide_style (GtkWidget *canvas,
+                             cairo_t   *cr,
+                             gboolean   active)
 {
   cairo_pattern_t *pattern;
 
-  g_return_if_fail (GIMP_IS_DISPLAY_SHELL (shell));
+  g_return_if_fail (GTK_IS_WIDGET (canvas));
   g_return_if_fail (cr != NULL);
 
   cairo_set_line_width (cr, 1.0);
@@ -103,11 +102,11 @@ gimp_display_shell_set_guide_style (GimpDisplayShell *shell,
 }
 
 void
-gimp_display_shell_set_sample_point_style (GimpDisplayShell *shell,
-                                           cairo_t          *cr,
-                                           gboolean          active)
+gimp_canvas_set_sample_point_style (GtkWidget *canvas,
+                                    cairo_t   *cr,
+                                    gboolean   active)
 {
-  g_return_if_fail (GIMP_IS_DISPLAY_SHELL (shell));
+  g_return_if_fail (GTK_IS_WIDGET (canvas));
   g_return_if_fail (cr != NULL);
 
   cairo_set_line_width (cr, 1.0);
@@ -119,11 +118,11 @@ gimp_display_shell_set_sample_point_style (GimpDisplayShell *shell,
 }
 
 void
-gimp_display_shell_set_grid_style (GimpDisplayShell *shell,
-                                   cairo_t          *cr,
-                                   GimpGrid         *grid)
+gimp_canvas_set_grid_style (GtkWidget *canvas,
+                            cairo_t   *cr,
+                            GimpGrid  *grid)
 {
-  g_return_if_fail (GIMP_IS_DISPLAY_SHELL (shell));
+  g_return_if_fail (GTK_IS_WIDGET (canvas));
   g_return_if_fail (cr != NULL);
   g_return_if_fail (GIMP_IS_GRID (grid));
 
@@ -163,12 +162,12 @@ gimp_display_shell_set_grid_style (GimpDisplayShell *shell,
 }
 
 void
-gimp_display_shell_set_pen_style (GimpDisplayShell *shell,
-                                  cairo_t          *cr,
-                                  const GimpRGB    *color,
-                                  gint              width)
+gimp_canvas_set_pen_style (GtkWidget     *canvas,
+                           cairo_t       *cr,
+                           const GimpRGB *color,
+                           gint           width)
 {
-  g_return_if_fail (GIMP_IS_DISPLAY_SHELL (shell));
+  g_return_if_fail (GTK_IS_WIDGET (canvas));
   g_return_if_fail (cr != NULL);
   g_return_if_fail (color != NULL);
 
@@ -181,13 +180,13 @@ gimp_display_shell_set_pen_style (GimpDisplayShell *shell,
 }
 
 void
-gimp_display_shell_set_layer_style (GimpDisplayShell *shell,
-                                    cairo_t          *cr,
-                                    GimpLayer        *layer)
+gimp_canvas_set_layer_style (GtkWidget *canvas,
+                             cairo_t   *cr,
+                             GimpLayer *layer)
 {
   cairo_pattern_t *pattern;
 
-  g_return_if_fail (GIMP_IS_DISPLAY_SHELL (shell));
+  g_return_if_fail (GTK_IS_WIDGET (canvas));
   g_return_if_fail (cr != NULL);
   g_return_if_fail (GIMP_IS_LAYER (layer));
 
@@ -219,12 +218,12 @@ gimp_display_shell_set_layer_style (GimpDisplayShell *shell,
 }
 
 void
-gimp_display_shell_set_selection_out_style (GimpDisplayShell *shell,
-                                            cairo_t          *cr)
+gimp_canvas_set_selection_out_style (GtkWidget *canvas,
+                                     cairo_t   *cr)
 {
   cairo_pattern_t *pattern;
 
-  g_return_if_fail (GIMP_IS_DISPLAY_SHELL (shell));
+  g_return_if_fail (GTK_IS_WIDGET (canvas));
   g_return_if_fail (cr != NULL);
 
   cairo_set_line_width (cr, 1.0);
@@ -238,13 +237,13 @@ gimp_display_shell_set_selection_out_style (GimpDisplayShell *shell,
 }
 
 void
-gimp_display_shell_set_selection_in_style (GimpDisplayShell *shell,
-                                           cairo_t          *cr,
-                                           gint              index)
+gimp_canvas_set_selection_in_style (GtkWidget *canvas,
+                                    cairo_t   *cr,
+                                    gint       index)
 {
   cairo_pattern_t *pattern;
 
-  g_return_if_fail (GIMP_IS_DISPLAY_SHELL (shell));
+  g_return_if_fail (GTK_IS_WIDGET (canvas));
   g_return_if_fail (cr != NULL);
 
   cairo_set_line_width (cr, 1.0);
@@ -258,11 +257,11 @@ gimp_display_shell_set_selection_in_style (GimpDisplayShell *shell,
 }
 
 void
-gimp_display_shell_set_vectors_bg_style (GimpDisplayShell *shell,
-                                         cairo_t          *cr,
-                                         gboolean          active)
+gimp_canvas_set_vectors_bg_style (GtkWidget *canvas,
+                                  cairo_t   *cr,
+                                  gboolean   active)
 {
-  g_return_if_fail (GIMP_IS_DISPLAY_SHELL (shell));
+  g_return_if_fail (GTK_IS_WIDGET (canvas));
   g_return_if_fail (cr != NULL);
 
   cairo_set_line_width (cr, 3.0);
@@ -274,11 +273,11 @@ gimp_display_shell_set_vectors_bg_style (GimpDisplayShell *shell,
 }
 
 void
-gimp_display_shell_set_vectors_fg_style (GimpDisplayShell *shell,
-                                         cairo_t          *cr,
-                                         gboolean          active)
+gimp_canvas_set_vectors_fg_style (GtkWidget *canvas,
+                                  cairo_t   *cr,
+                                  gboolean   active)
 {
-  g_return_if_fail (GIMP_IS_DISPLAY_SHELL (shell));
+  g_return_if_fail (GTK_IS_WIDGET (canvas));
   g_return_if_fail (cr != NULL);
 
   cairo_set_line_width (cr, 1.0);
@@ -290,10 +289,10 @@ gimp_display_shell_set_vectors_fg_style (GimpDisplayShell *shell,
 }
 
 void
-gimp_display_shell_set_outline_bg_style (GimpDisplayShell *shell,
-                                         cairo_t          *cr)
+gimp_canvas_set_outline_bg_style (GtkWidget *canvas,
+                                  cairo_t   *cr)
 {
-  g_return_if_fail (GIMP_IS_DISPLAY_SHELL (shell));
+  g_return_if_fail (GTK_IS_WIDGET (canvas));
   g_return_if_fail (cr != NULL);
 
   cairo_set_line_width (cr, 1.0);
@@ -301,12 +300,12 @@ gimp_display_shell_set_outline_bg_style (GimpDisplayShell *shell,
 }
 
 void
-gimp_display_shell_set_outline_fg_style (GimpDisplayShell *shell,
-                                         cairo_t          *cr)
+gimp_canvas_set_outline_fg_style (GtkWidget *canvas,
+                                  cairo_t   *cr)
 {
   static const double dashes[] = { 4.0, 4.0 };
 
-  g_return_if_fail (GIMP_IS_DISPLAY_SHELL (shell));
+  g_return_if_fail (GTK_IS_WIDGET (canvas));
   g_return_if_fail (cr != NULL);
 
   cairo_set_line_width (cr, 1.0);
@@ -315,20 +314,20 @@ gimp_display_shell_set_outline_fg_style (GimpDisplayShell *shell,
 }
 
 void
-gimp_display_shell_set_passe_partout_style (GimpDisplayShell *shell,
-                                            cairo_t          *cr)
+gimp_canvas_set_passe_partout_style (GtkWidget *canvas,
+                                     cairo_t   *cr)
 {
-  g_return_if_fail (GIMP_IS_DISPLAY_SHELL (shell));
+  g_return_if_fail (GTK_IS_WIDGET (canvas));
   g_return_if_fail (cr != NULL);
 
   gimp_cairo_set_source_rgba (cr, &passe_partout);
 }
 
 void
-gimp_display_shell_set_tool_bg_style (GimpDisplayShell *shell,
-                                      cairo_t          *cr)
+gimp_canvas_set_tool_bg_style (GtkWidget *canvas,
+                               cairo_t   *cr)
 {
-  g_return_if_fail (GIMP_IS_DISPLAY_SHELL (shell));
+  g_return_if_fail (GTK_IS_WIDGET (canvas));
   g_return_if_fail (cr != NULL);
 
   cairo_set_line_width (cr, 3.0);
@@ -338,9 +337,9 @@ gimp_display_shell_set_tool_bg_style (GimpDisplayShell *shell,
 }
 
 void
-gimp_display_shell_set_tool_fg_style (GimpDisplayShell *shell,
-                                      cairo_t          *cr,
-                                      gboolean          highlight)
+gimp_canvas_set_tool_fg_style (GtkWidget *canvas,
+                               cairo_t   *cr,
+                               gboolean   highlight)
 {
   g_return_if_fail (cr != NULL);
 
diff --git a/app/display/gimpcanvas-style.h b/app/display/gimpcanvas-style.h
new file mode 100644
index 0000000..9715a76
--- /dev/null
+++ b/app/display/gimpcanvas-style.h
@@ -0,0 +1,66 @@
+/* GIMP - The GNU Image Manipulation Program
+ * Copyright (C) 1995 Spencer Kimball and Peter Mattis
+ *
+ * gimpdisplayshell-style.h
+ * Copyright (C) 2010  Michael Natterer <mitch gimp org>
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef __GIMP_CANVAS_STYLE_H__
+#define __GIMP_CANVAS_STYLE_H__
+
+
+void   gimp_canvas_set_guide_style         (GtkWidget     *canvas,
+                                            cairo_t       *cr,
+                                            gboolean       active);
+void   gimp_canvas_set_sample_point_style  (GtkWidget     *canvas,
+                                            cairo_t       *cr,
+                                            gboolean       active);
+void   gimp_canvas_set_grid_style          (GtkWidget     *canvas,
+                                            cairo_t       *cr,
+                                            GimpGrid      *grid);
+void   gimp_canvas_set_pen_style           (GtkWidget     *canvas,
+                                            cairo_t       *cr,
+                                            const GimpRGB *color,
+                                            gint           width);
+void   gimp_canvas_set_layer_style         (GtkWidget     *canvas,
+                                            cairo_t       *cr,
+                                            GimpLayer     *layer);
+void   gimp_canvas_set_selection_out_style (GtkWidget     *canvas,
+                                            cairo_t       *cr);
+void   gimp_canvas_set_selection_in_style  (GtkWidget     *canvas,
+                                            cairo_t       *cr,
+                                            gint           index);
+void   gimp_canvas_set_vectors_bg_style    (GtkWidget     *canvas,
+                                            cairo_t       *cr,
+                                            gboolean       active);
+void   gimp_canvas_set_vectors_fg_style    (GtkWidget     *canvas,
+                                            cairo_t       *cr,
+                                            gboolean       active);
+void   gimp_canvas_set_outline_bg_style    (GtkWidget     *canvas,
+                                            cairo_t       *cr);
+void   gimp_canvas_set_outline_fg_style    (GtkWidget     *canvas,
+                                            cairo_t       *cr);
+void   gimp_canvas_set_passe_partout_style (GtkWidget     *canvas,
+                                            cairo_t       *cr);
+
+void   gimp_canvas_set_tool_bg_style       (GtkWidget     *canvas,
+                                            cairo_t       *cr);
+void   gimp_canvas_set_tool_fg_style       (GtkWidget     *canvas,
+                                            cairo_t       *cr,
+                                            gboolean       highlight);
+
+
+#endif /* __GIMP_CANVAS_STYLE_H__ */
diff --git a/app/display/gimpcanvasgrid.c b/app/display/gimpcanvasgrid.c
index f71c917..8b033ae 100644
--- a/app/display/gimpcanvasgrid.c
+++ b/app/display/gimpcanvasgrid.c
@@ -32,9 +32,9 @@
 #include "core/gimpgrid.h"
 #include "core/gimpimage.h"
 
+#include "gimpcanvas-style.h"
 #include "gimpcanvasgrid.h"
 #include "gimpdisplayshell.h"
-#include "gimpdisplayshell-style.h"
 
 
 enum
@@ -382,7 +382,8 @@ gimp_canvas_grid_stroke (GimpCanvasItem   *item,
   if (private->grid_style)
     {
       cairo_translate (cr, -shell->offset_x, -shell->offset_y);
-      gimp_display_shell_set_grid_style (shell, cr, private->grid);
+      gimp_canvas_set_grid_style (gimp_canvas_item_get_canvas (item), cr,
+                                  private->grid);
       cairo_stroke (cr);
     }
   else
diff --git a/app/display/gimpcanvasguide.c b/app/display/gimpcanvasguide.c
index 1cbac34..7ba9977 100644
--- a/app/display/gimpcanvasguide.c
+++ b/app/display/gimpcanvasguide.c
@@ -28,9 +28,9 @@
 
 #include "display-types.h"
 
+#include "gimpcanvas-style.h"
 #include "gimpcanvasguide.h"
 #include "gimpdisplayshell.h"
-#include "gimpdisplayshell-style.h"
 
 
 enum
@@ -253,8 +253,8 @@ gimp_canvas_guide_stroke (GimpCanvasItem   *item,
   if (private->guide_style)
     {
       cairo_translate (cr, -shell->offset_x, -shell->offset_y);
-      gimp_display_shell_set_guide_style (shell, cr,
-                                          gimp_canvas_item_get_highlight (item));
+      gimp_canvas_set_guide_style (gimp_canvas_item_get_canvas (item), cr,
+                                   gimp_canvas_item_get_highlight (item));
       cairo_stroke (cr);
     }
   else
diff --git a/app/display/gimpcanvasitem.c b/app/display/gimpcanvasitem.c
index 1ddc3ba..ed17753 100644
--- a/app/display/gimpcanvasitem.c
+++ b/app/display/gimpcanvasitem.c
@@ -29,10 +29,10 @@
 
 #include "core/gimpmarshal.h"
 
+#include "gimpcanvas-style.h"
 #include "gimpcanvasitem.h"
 #include "gimpdisplay.h"
 #include "gimpdisplayshell.h"
-#include "gimpdisplayshell-style.h"
 #include "gimpdisplayshell-transform.h"
 
 
@@ -302,10 +302,11 @@ gimp_canvas_item_real_stroke (GimpCanvasItem   *item,
 
   cairo_set_line_cap (cr, private->line_cap);
 
-  gimp_display_shell_set_tool_bg_style (shell, cr);
+  gimp_canvas_set_tool_bg_style (gimp_canvas_item_get_canvas (item), cr);
   cairo_stroke_preserve (cr);
 
-  gimp_display_shell_set_tool_fg_style (shell, cr, private->highlight);
+  gimp_canvas_set_tool_fg_style (gimp_canvas_item_get_canvas (item), cr,
+                                 private->highlight);
   cairo_stroke (cr);
 }
 
@@ -316,11 +317,12 @@ gimp_canvas_item_real_fill (GimpCanvasItem   *item,
 {
   GimpCanvasItemPrivate *private = GET_PRIVATE (item);
 
-  gimp_display_shell_set_tool_bg_style (shell, cr);
+  gimp_canvas_set_tool_bg_style (gimp_canvas_item_get_canvas (item), cr);
   cairo_set_line_width (cr, 2.0);
   cairo_stroke_preserve (cr);
 
-  gimp_display_shell_set_tool_fg_style (shell, cr, private->highlight);
+  gimp_canvas_set_tool_fg_style (gimp_canvas_item_get_canvas (item), cr,
+                                 private->highlight);
   cairo_fill (cr);
 }
 
diff --git a/app/display/gimpcanvaslayerboundary.c b/app/display/gimpcanvaslayerboundary.c
index ac218bf..3e29058 100644
--- a/app/display/gimpcanvaslayerboundary.c
+++ b/app/display/gimpcanvaslayerboundary.c
@@ -32,10 +32,9 @@
 #include "core/gimplayer.h"
 #include "core/gimplayer-floating-sel.h"
 
-#include "gimpcanvas.h"
+#include "gimpcanvas-style.h"
 #include "gimpcanvaslayerboundary.h"
 #include "gimpdisplayshell.h"
-#include "gimpdisplayshell-style.h"
 
 
 enum
@@ -194,7 +193,8 @@ gimp_canvas_layer_boundary_stroke (GimpCanvasItem   *item,
   GimpCanvasLayerBoundaryPrivate *private = GET_PRIVATE (item);
 
   cairo_translate (cr, -shell->offset_x, -shell->offset_y);
-  gimp_display_shell_set_layer_style (shell, cr, private->layer);
+  gimp_canvas_set_layer_style (gimp_canvas_item_get_canvas (item), cr,
+                               private->layer);
   cairo_stroke (cr);
 }
 
diff --git a/app/display/gimpcanvaspassepartout.c b/app/display/gimpcanvaspassepartout.c
index 7bb653d..5c83b24 100644
--- a/app/display/gimpcanvaspassepartout.c
+++ b/app/display/gimpcanvaspassepartout.c
@@ -25,11 +25,10 @@
 
 #include "display-types.h"
 
-#include "gimpcanvas.h"
+#include "gimpcanvas-style.h"
 #include "gimpcanvaspassepartout.h"
 #include "gimpdisplayshell.h"
 #include "gimpdisplayshell-draw.h"
-#include "gimpdisplayshell-style.h"
 
 
 /*  local function prototypes  */
@@ -112,7 +111,7 @@ gimp_canvas_passe_partout_fill (GimpCanvasItem   *item,
   cairo_set_fill_rule (cr, CAIRO_FILL_RULE_EVEN_ODD);
   cairo_clip (cr);
 
-  gimp_display_shell_set_passe_partout_style (shell, cr);
+  gimp_canvas_set_passe_partout_style (gimp_canvas_item_get_canvas (item), cr);
   cairo_paint (cr);
 }
 
diff --git a/app/display/gimpcanvaspath.c b/app/display/gimpcanvaspath.c
index 33e09bc..f4b17b1 100644
--- a/app/display/gimpcanvaspath.c
+++ b/app/display/gimpcanvaspath.c
@@ -31,9 +31,9 @@
 #include "core/gimpbezierdesc.h"
 #include "core/gimpparamspecs.h"
 
+#include "gimpcanvas-style.h"
 #include "gimpcanvaspath.h"
 #include "gimpdisplayshell.h"
-#include "gimpdisplayshell-style.h"
 
 
 enum
@@ -298,6 +298,7 @@ gimp_canvas_path_stroke (GimpCanvasItem   *item,
                          cairo_t          *cr)
 {
   GimpCanvasPathPrivate *private = GET_PRIVATE (item);
+  GtkWidget             *canvas  = gimp_canvas_item_get_canvas (item);
   gboolean               active;
 
   switch (private->path_style)
@@ -305,18 +306,18 @@ gimp_canvas_path_stroke (GimpCanvasItem   *item,
     case GIMP_PATH_STYLE_VECTORS:
       active = gimp_canvas_item_get_highlight (item);
 
-      gimp_display_shell_set_vectors_bg_style (shell, cr, active);
+      gimp_canvas_set_vectors_bg_style (canvas, cr, active);
       cairo_stroke_preserve (cr);
 
-      gimp_display_shell_set_vectors_fg_style (shell, cr, active);
+      gimp_canvas_set_vectors_fg_style (canvas, cr, active);
       cairo_stroke (cr);
       break;
 
     case GIMP_PATH_STYLE_OUTLINE:
-      gimp_display_shell_set_outline_bg_style (shell, cr);
+      gimp_canvas_set_outline_bg_style (canvas, cr);
       cairo_stroke_preserve (cr);
 
-      gimp_display_shell_set_outline_fg_style (shell, cr);
+      gimp_canvas_set_outline_fg_style (canvas, cr);
       cairo_stroke (cr);
       break;
 
diff --git a/app/display/gimpcanvaspen.c b/app/display/gimpcanvaspen.c
index 5fd93b9..f619fed 100644
--- a/app/display/gimpcanvaspen.c
+++ b/app/display/gimpcanvaspen.c
@@ -32,9 +32,9 @@
 #include "core/gimpcontext.h"
 #include "core/gimpparamspecs.h"
 
+#include "gimpcanvas-style.h"
 #include "gimpcanvaspen.h"
 #include "gimpdisplayshell.h"
-#include "gimpdisplayshell-style.h"
 
 
 enum
@@ -191,7 +191,8 @@ gimp_canvas_pen_stroke (GimpCanvasItem   *item,
 {
   GimpCanvasPenPrivate *private = GET_PRIVATE (item);
 
-  gimp_display_shell_set_pen_style (shell, cr, &private->color, private->width);
+  gimp_canvas_set_pen_style (gimp_canvas_item_get_canvas (item), cr,
+                             &private->color, private->width);
   cairo_stroke (cr);
 }
 
diff --git a/app/display/gimpcanvasprogress.c b/app/display/gimpcanvasprogress.c
index 272a174..6798055 100644
--- a/app/display/gimpcanvasprogress.c
+++ b/app/display/gimpcanvasprogress.c
@@ -31,10 +31,10 @@
 #include "core/gimpprogress.h"
 
 #include "gimpcanvas.h"
+#include "gimpcanvas-style.h"
 #include "gimpcanvasitem-utils.h"
 #include "gimpcanvasprogress.h"
 #include "gimpdisplayshell.h"
-#include "gimpdisplayshell-style.h"
 
 
 #define BORDER   5
@@ -294,7 +294,7 @@ gimp_canvas_progress_draw (GimpCanvasItem   *item,
                            gimp_canvas_get_layout (GIMP_CANVAS (canvas),
                                                    "%s", private->text));
 
-  gimp_display_shell_set_tool_bg_style (shell, cr);
+  gimp_canvas_set_tool_bg_style (gimp_canvas_item_get_canvas (item), cr);
   cairo_arc (cr, x + BORDER + RADIUS, y + height - BORDER - RADIUS,
              RADIUS, - G_PI / 2.0, 2 * G_PI - G_PI / 2.0);
   cairo_fill (cr);
diff --git a/app/display/gimpcanvasproxygroup.c b/app/display/gimpcanvasproxygroup.c
index 78f4026..60e7335 100644
--- a/app/display/gimpcanvasproxygroup.c
+++ b/app/display/gimpcanvasproxygroup.c
@@ -31,7 +31,6 @@
 #include "gimpcanvas.h"
 #include "gimpcanvasproxygroup.h"
 #include "gimpdisplayshell.h"
-#include "gimpdisplayshell-style.h"
 
 
 enum
diff --git a/app/display/gimpcanvassamplepoint.c b/app/display/gimpcanvassamplepoint.c
index 8cd421c..c639613 100644
--- a/app/display/gimpcanvassamplepoint.c
+++ b/app/display/gimpcanvassamplepoint.c
@@ -29,9 +29,9 @@
 #include "display-types.h"
 
 #include "gimpcanvas.h"
+#include "gimpcanvas-style.h"
 #include "gimpcanvassamplepoint.h"
 #include "gimpdisplayshell.h"
-#include "gimpdisplayshell-style.h"
 
 
 #define GIMP_SAMPLE_POINT_DRAW_SIZE 10
@@ -291,8 +291,8 @@ gimp_canvas_sample_point_stroke (GimpCanvasItem   *item,
 
   if (private->sample_point_style)
     {
-      gimp_display_shell_set_sample_point_style (shell, cr,
-                                                 gimp_canvas_item_get_highlight (item));
+      gimp_canvas_set_sample_point_style (gimp_canvas_item_get_canvas (item), cr,
+                                          gimp_canvas_item_get_highlight (item));
       cairo_stroke (cr);
     }
   else
@@ -310,8 +310,8 @@ gimp_canvas_sample_point_fill (GimpCanvasItem   *item,
 
   if (private->sample_point_style)
     {
-      gimp_display_shell_set_sample_point_style (shell, cr,
-                                                 gimp_canvas_item_get_highlight (item));
+      gimp_canvas_set_sample_point_style (gimp_canvas_item_get_canvas (item), cr,
+                                          gimp_canvas_item_get_highlight (item));
       cairo_fill (cr);
     }
   else
diff --git a/app/display/gimpdisplayshell-draw.c b/app/display/gimpdisplayshell-draw.c
index 0109026..2a26a19 100644
--- a/app/display/gimpdisplayshell-draw.c
+++ b/app/display/gimpdisplayshell-draw.c
@@ -32,6 +32,7 @@
 #include "core/gimpimage.h"
 
 #include "gimpcanvas.h"
+#include "gimpcanvas-style.h"
 #include "gimpcanvaspath.h"
 #include "gimpdisplay.h"
 #include "gimpdisplayshell.h"
@@ -39,7 +40,6 @@
 #include "gimpdisplayshell-render.h"
 #include "gimpdisplayshell-scale.h"
 #include "gimpdisplayshell-scroll.h"
-#include "gimpdisplayshell-style.h"
 #include "gimpdisplayshell-transform.h"
 #include "gimpdisplayxfer.h"
 
@@ -108,7 +108,7 @@ gimp_display_shell_draw_selection_out (GimpDisplayShell *shell,
   g_return_if_fail (cr != NULL);
   g_return_if_fail (segs != NULL && n_segs > 0);
 
-  gimp_display_shell_set_selection_out_style (shell, cr);
+  gimp_canvas_set_selection_out_style (shell->canvas, cr);
 
   gimp_cairo_add_segments (cr, segs, n_segs);
   cairo_stroke (cr);
@@ -124,7 +124,7 @@ gimp_display_shell_draw_selection_in (GimpDisplayShell   *shell,
   g_return_if_fail (cr != NULL);
   g_return_if_fail (mask != NULL);
 
-  gimp_display_shell_set_selection_in_style (shell, cr, index);
+  gimp_canvas_set_selection_in_style (shell->canvas, cr, index);
 
   cairo_mask (cr, mask);
 }
diff --git a/app/tools/gimptool-progress.c b/app/tools/gimptool-progress.c
index e69009d..c9af158 100644
--- a/app/tools/gimptool-progress.c
+++ b/app/tools/gimptool-progress.c
@@ -34,7 +34,6 @@
 #include "display/gimpdisplayshell.h"
 #include "display/gimpdisplayshell-items.h"
 #include "display/gimpdisplayshell-transform.h"
-#include "display/gimpdisplayshell-style.h"
 
 #include "gimptool.h"
 #include "gimptool-progress.h"


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