gdk: Drop some unused private api
authorMatthias Clasen <mclasen@redhat.com>
Tue, 16 May 2023 00:27:16 +0000 (20:27 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Tue, 16 May 2023 00:30:38 +0000 (20:30 -0400)
gdk/gdkcairo.c
gdk/gdkcairoprivate.h [deleted file]

index fec75fb8b570290798a129c5902de9733e42584b..a1236667dcc2981e5009eb66b7f0c402f3e754db 100644 (file)
@@ -17,7 +17,7 @@
 
 #include "config.h"
 
-#include "gdkcairoprivate.h"
+#include "gdkcairo.h"
 
 #include "gdkrgba.h"
 #include "gdktexture.h"
@@ -90,7 +90,7 @@ gdk_cairo_region (cairo_t              *cr,
     }
 }
 
-void
+static void
 gdk_cairo_surface_paint_pixbuf (cairo_surface_t *surface,
                                 const GdkPixbuf *pixbuf)
 {
@@ -171,7 +171,7 @@ gdk_cairo_set_source_pixbuf (cairo_t         *cr,
  *
  * Returns: %TRUE if the extents fit in a `GdkRectangle`, %FALSE if not
  */
-gboolean
+static gboolean
 _gdk_cairo_surface_extents (cairo_surface_t *surface,
                             GdkRectangle    *extents)
 {
@@ -303,38 +303,3 @@ gdk_cairo_region_create_from_surface (cairo_surface_t *surface)
 
   return region;
 }
-
-cairo_region_t *
-gdk_cairo_region_from_clip (cairo_t *cr)
-{
-  cairo_rectangle_list_t *rectangles;
-  cairo_region_t *region;
-  int i;
-
-  rectangles = cairo_copy_clip_rectangle_list (cr);
-
-  if (rectangles->status != CAIRO_STATUS_SUCCESS)
-    return NULL;
-
-  region = cairo_region_create ();
-  for (i = 0; i < rectangles->num_rectangles; i++)
-    {
-      cairo_rectangle_int_t clip_rect;
-      cairo_rectangle_t *rect;
-
-      rect = &rectangles->rectangles[i];
-
-      /* Here we assume clip rects are ints for direct targets, which
-         is true for cairo */
-      clip_rect.x = (int)rect->x;
-      clip_rect.y = (int)rect->y;
-      clip_rect.width = (int)rect->width;
-      clip_rect.height = (int)rect->height;
-
-      cairo_region_union_rectangle (region, &clip_rect);
-    }
-
-  cairo_rectangle_list_destroy (rectangles);
-
-  return region;
-}
diff --git a/gdk/gdkcairoprivate.h b/gdk/gdkcairoprivate.h
deleted file mode 100644 (file)
index 06a9eef..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-/* GDK - The GIMP Drawing Kit
- * Copyright (C) 2020 Red Hat, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library 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
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#pragma once
-
-#include "gdkcairo.h"
-
-#include <gdk-pixbuf/gdk-pixbuf.h>
-#include <cairo.h>
-
-G_BEGIN_DECLS
-
-gboolean        _gdk_cairo_surface_extents       (cairo_surface_t *surface,
-                                                  GdkRectangle    *extents);
-
-void            gdk_cairo_surface_paint_pixbuf   (cairo_surface_t *surface,
-                                                  const GdkPixbuf *pixbuf);
-
-cairo_region_t *gdk_cairo_region_from_clip       (cairo_t         *cr);
-
-
-G_END_DECLS
-