summaryrefslogtreecommitdiff
path: root/vcl/inc/unx
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2021-05-24 10:59:52 +0100
committerCaolán McNamara <caolanm@redhat.com>2021-05-24 12:56:18 +0200
commit8719c42ebab0b135b50d559830bfe2c2e0e8debb (patch)
tree0dd889a6f78d0c7d29af4c33f2f7b9c018ff6e07 /vcl/inc/unx
parentd4bae3c10e8f9ccafcc911a677093101eaed3ad1 (diff)
gtk[3|4] wrap surface_create_similar_surface variants
Change-Id: Iaa101b1d691fa84693b350460a4c69a1f5aad245 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116045 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'vcl/inc/unx')
-rw-r--r--vcl/inc/unx/gtk/gtkdata.hxx12
1 files changed, 12 insertions, 0 deletions
diff --git a/vcl/inc/unx/gtk/gtkdata.hxx b/vcl/inc/unx/gtk/gtkdata.hxx
index 6203d10d4530..cf1454b6f589 100644
--- a/vcl/inc/unx/gtk/gtkdata.hxx
+++ b/vcl/inc/unx/gtk/gtkdata.hxx
@@ -133,6 +133,18 @@ inline void widget_set_cursor(GtkWidget *pWidget, GdkCursor *pCursor)
#endif
}
+inline cairo_surface_t * surface_create_similar_surface(GdkSurface *pSurface,
+ cairo_content_t eContent,
+ int nWidth,
+ int nHeight)
+{
+#if GTK_CHECK_VERSION(4, 0, 0)
+ return gdk_surface_create_similar_surface(pSurface, eContent, nWidth, nHeight);
+#else
+ return gdk_window_create_similar_surface(pSurface, eContent, nWidth, nHeight);
+#endif
+}
+
#if GTK_CHECK_VERSION(4, 0, 0)
typedef double gtk_coord;
#else