[gimp] app make gimp_display_shell_get_screen_resolution() private



commit d64ca7222e33dceb9086a6b1dae8137c7ff80c6f
Author: Michael Natterer <mitch gimp org>
Date:   Tue Jan 5 18:29:30 2016 +0100

    app make gimp_display_shell_get_screen_resolution() private

 app/display/gimpdisplayshell-scale.c |   60 ++++++++++++++++++---------------
 app/display/gimpdisplayshell-scale.h |    3 --
 2 files changed, 33 insertions(+), 30 deletions(-)
---
diff --git a/app/display/gimpdisplayshell-scale.c b/app/display/gimpdisplayshell-scale.c
index 351dac6..9479c2d 100644
--- a/app/display/gimpdisplayshell-scale.c
+++ b/app/display/gimpdisplayshell-scale.c
@@ -49,6 +49,10 @@
 
 /*  local function prototypes  */
 
+static void      gimp_display_shell_scale_get_screen_resolution
+                                                         (GimpDisplayShell *shell,
+                                                          gdouble          *xres,
+                                                          gdouble          *yres);
 static void      gimp_display_shell_scale_to             (GimpDisplayShell *shell,
                                                           gdouble           scale,
                                                           gdouble           viewport_x,
@@ -159,30 +163,6 @@ gimp_display_shell_scale_set_dot_for_dot (GimpDisplayShell *shell,
     }
 }
 
-void
-gimp_display_shell_get_screen_resolution (GimpDisplayShell *shell,
-                                          gdouble          *xres,
-                                          gdouble          *yres)
-{
-  gdouble x, y;
-
-  g_return_if_fail (GIMP_IS_DISPLAY_SHELL (shell));
-
-  if (shell->dot_for_dot)
-    {
-      gimp_image_get_resolution (gimp_display_get_image (shell->display),
-                                 &x, &y);
-    }
-  else
-    {
-      x = shell->monitor_xres;
-      y = shell->monitor_yres;
-    }
-
-  if (xres) *xres = x;
-  if (yres) *yres = y;
-}
-
 /**
  * gimp_display_shell_scale_get_image_size:
  * @shell:
@@ -400,8 +380,8 @@ gimp_display_shell_scale_to_rectangle (GimpDisplayShell *shell,
   new_scale = current_scale * factor;
 
   gimp_image_get_resolution (image, &xres, &yres);
-  gimp_display_shell_get_screen_resolution (shell,
-                                            &screen_xres, &screen_yres);
+  gimp_display_shell_scale_get_screen_resolution (shell,
+                                                  &screen_xres, &screen_yres);
 
   switch (zoom_type)
     {
@@ -736,7 +716,8 @@ gimp_display_shell_calculate_scale_x_and_y (GimpDisplayShell *shell,
   g_return_if_fail (GIMP_IS_IMAGE (image));
 
   gimp_image_get_resolution (image, &xres, &yres);
-  gimp_display_shell_get_screen_resolution (shell, &screen_xres, &screen_yres);
+  gimp_display_shell_scale_get_screen_resolution (shell,
+                                                  &screen_xres, &screen_yres);
 
   if (scale_x) *scale_x = scale * screen_xres / xres;
   if (scale_y) *scale_y = scale * screen_yres / yres;
@@ -844,6 +825,31 @@ gimp_display_shell_push_zoom_focus_pointer_pos (GimpDisplayShell *shell,
                      point);
 }
 
+
+/*  private functions   */
+
+static void
+gimp_display_shell_scale_get_screen_resolution (GimpDisplayShell *shell,
+                                                gdouble          *xres,
+                                                gdouble          *yres)
+{
+  gdouble x, y;
+
+  if (shell->dot_for_dot)
+    {
+      gimp_image_get_resolution (gimp_display_get_image (shell->display),
+                                 &x, &y);
+    }
+  else
+    {
+      x = shell->monitor_xres;
+      y = shell->monitor_yres;
+    }
+
+  if (xres) *xres = x;
+  if (yres) *yres = y;
+}
+
 /**
  * gimp_display_shell_scale_to:
  * @shell:
diff --git a/app/display/gimpdisplayshell-scale.h b/app/display/gimpdisplayshell-scale.h
index e1653f2..3594a2d 100644
--- a/app/display/gimpdisplayshell-scale.h
+++ b/app/display/gimpdisplayshell-scale.h
@@ -25,9 +25,6 @@ gboolean gimp_display_shell_scale_can_revert               (GimpDisplayShell *sh
 void     gimp_display_shell_scale_set_dot_for_dot          (GimpDisplayShell *shell,
                                                             gboolean          dot_for_dot);
 
-void     gimp_display_shell_get_screen_resolution          (GimpDisplayShell *shell,
-                                                            gdouble          *xres,
-                                                            gdouble          *yres);
 void     gimp_display_shell_scale_get_image_size           (GimpDisplayShell *shell,
                                                             gint             *w,
                                                             gint             *h);


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