summaryrefslogtreecommitdiff
path: root/boilerplate
diff options
context:
space:
mode:
authorEmmanuele Bassi <ebassi@gnome.org>2021-04-17 23:41:13 +0100
committerEmmanuele Bassi <ebassi@gnome.org>2022-02-25 01:19:58 +0000
commit64ece6d545df015377a1f289829eeea20f5ae019 (patch)
treeae40e91e6d7916c10bae99508b5a6621fb7af6c9 /boilerplate
parent4fc72919e149a3fd26a863757832d67c661b6727 (diff)
downloadcairo-64ece6d545df015377a1f289829eeea20f5ae019.tar.gz
Remove Qt surface
It's disabled by default, and unsupported as it depends on Qt4, which has been EOL since 2015.
Diffstat (limited to 'boilerplate')
-rw-r--r--boilerplate/Makefile.sources1
-rw-r--r--boilerplate/Makefile.win32.features12
-rw-r--r--boilerplate/cairo-boilerplate-qt.cpp114
-rw-r--r--boilerplate/meson.build1
4 files changed, 0 insertions, 128 deletions
diff --git a/boilerplate/Makefile.sources b/boilerplate/Makefile.sources
index 101e99711..ada70ed6a 100644
--- a/boilerplate/Makefile.sources
+++ b/boilerplate/Makefile.sources
@@ -27,7 +27,6 @@ cairo_boilerplate_wgl_sources = cairo-boilerplate-wgl.c
cairo_boilerplate_egl_sources = cairo-boilerplate-egl.c
cairo_boilerplate_pdf_sources = cairo-boilerplate-pdf.c
cairo_boilerplate_ps_sources = cairo-boilerplate-ps.c
-cairo_boilerplate_qt_cxx_sources = cairo-boilerplate-qt.cpp
cairo_boilerplate_quartz_sources = cairo-boilerplate-quartz.c
cairo_boilerplate_script_sources = cairo-boilerplate-script.c
cairo_boilerplate_skia_sources = cairo-boilerplate-skia.c
diff --git a/boilerplate/Makefile.win32.features b/boilerplate/Makefile.win32.features
index 178d5b650..40f5d48cd 100644
--- a/boilerplate/Makefile.win32.features
+++ b/boilerplate/Makefile.win32.features
@@ -79,18 +79,6 @@ enabled_cairo_boilerplate_cxx_sources += $(cairo_boilerplate_xcb_shm_cxx_sources
enabled_cairo_boilerplate_sources += $(cairo_boilerplate_xcb_shm_sources)
endif
-unsupported_cairo_boilerplate_headers += $(cairo_boilerplate_qt_headers)
-all_cairo_boilerplate_headers += $(cairo_boilerplate_qt_headers)
-all_cairo_boilerplate_private += $(cairo_boilerplate_qt_private)
-all_cairo_boilerplate_cxx_sources += $(cairo_boilerplate_qt_cxx_sources)
-all_cairo_boilerplate_sources += $(cairo_boilerplate_qt_sources)
-ifeq ($(CAIRO_HAS_QT_SURFACE),1)
-enabled_cairo_boilerplate_headers += $(cairo_boilerplate_qt_headers)
-enabled_cairo_boilerplate_private += $(cairo_boilerplate_qt_private)
-enabled_cairo_boilerplate_cxx_sources += $(cairo_boilerplate_qt_cxx_sources)
-enabled_cairo_boilerplate_sources += $(cairo_boilerplate_qt_sources)
-endif
-
supported_cairo_boilerplate_headers += $(cairo_boilerplate_quartz_headers)
all_cairo_boilerplate_headers += $(cairo_boilerplate_quartz_headers)
all_cairo_boilerplate_private += $(cairo_boilerplate_quartz_private)
diff --git a/boilerplate/cairo-boilerplate-qt.cpp b/boilerplate/cairo-boilerplate-qt.cpp
deleted file mode 100644
index 31c081483..000000000
--- a/boilerplate/cairo-boilerplate-qt.cpp
+++ /dev/null
@@ -1,114 +0,0 @@
-/* Cairo - a vector graphics library with display and print output
- *
- * Copyright © 2009 Chris Wilson
- *
- * This library is free software; you can redistribute it and/or
- * modify it either under the terms of the GNU Lesser General Public
- * License version 2.1 as published by the Free Software Foundation
- * (the "LGPL") or, at your option, under the terms of the Mozilla
- * Public License Version 1.1 (the "MPL"). If you do not alter this
- * notice, a recipient may use your version of this file under either
- * the MPL or the LGPL.
- *
- * You should have received a copy of the LGPL along with this library
- * in the file COPYING-LGPL-2.1; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Suite 500, Boston, MA 02110-1335, USA
- * You should have received a copy of the MPL along with this library
- * in the file COPYING-MPL-1.1
- *
- * The contents of this file are subject to the Mozilla Public License
- * Version 1.1 (the "License"); you may not use this file except in
- * compliance with the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY
- * OF ANY KIND, either express or implied. See the LGPL or the MPL for
- * the specific language governing rights and limitations.
- *
- * The Original Code is the cairo graphics library.
- *
- * The Initial Developer of the Original Code is Chris Wilson.
- */
-
-#include "cairo-boilerplate-private.h"
-
-#include <cairo-qt.h>
-
-#include <qapplication.h>
-#include <X11/Xlib.h>
-
-typedef struct _qt_closure {
- Display *dpy;
- QApplication *app;
-} qt_closure_t;
-
-static void
-_cairo_boilerplate_qt_cleanup (void *closure)
-{
- qt_closure_t *qtc = (qt_closure_t *) closure;
-
- delete qtc->app;
- XCloseDisplay (qtc->dpy);
- free (qtc);
-}
-
-static cairo_surface_t *
-_cairo_boilerplate_qt_create_surface (const char *name,
- cairo_content_t content,
- double width,
- double height,
- double max_width,
- double max_height,
- cairo_boilerplate_mode_t mode,
- void **closure)
-{
- qt_closure_t *qtc;
-
- qtc = (qt_closure_t *) xcalloc (1, sizeof (qt_closure_t));
- qtc->dpy = XOpenDisplay (NULL);
- if (qtc->dpy == NULL) {
- free (qtc);
- return NULL;
- }
-
- if (mode == CAIRO_BOILERPLATE_MODE_TEST)
- XSynchronize (qtc->dpy, True);
-
- qtc->app = new QApplication (qtc->dpy);
- *closure = qtc;
- return cairo_qt_surface_create_with_qpixmap (content, width, height);
-}
-
-static void
-_cairo_boilerplate_qt_synchronize (void *closure)
-{
- qt_closure_t *qtc = (qt_closure_t *) closure;
-
- qtc->app->flush (); /* not sure if this is sufficient */
-}
-
-static const cairo_boilerplate_target_t targets[] = {
- {
- "qt", "qt", NULL, NULL,
- CAIRO_SURFACE_TYPE_QT, CAIRO_CONTENT_COLOR_ALPHA, 0,
- "cairo_qt_surface_create",
- _cairo_boilerplate_qt_create_surface,
- NULL, NULL, NULL,
- _cairo_boilerplate_get_image_surface,
- cairo_surface_write_to_png,
- _cairo_boilerplate_qt_cleanup
- },
- {
- "qt", "qt", NULL, NULL,
- CAIRO_SURFACE_TYPE_QT, CAIRO_CONTENT_COLOR, 0,
- "cairo_qt_surface_create",
- _cairo_boilerplate_qt_create_surface,
- NULL, NULL, NULL,
- _cairo_boilerplate_get_image_surface,
- cairo_surface_write_to_png,
- _cairo_boilerplate_qt_cleanup
- },
-};
-extern "C" {
-CAIRO_BOILERPLATE (qt, targets)
-}
diff --git a/boilerplate/meson.build b/boilerplate/meson.build
index cc6bc9519..780f9bc30 100644
--- a/boilerplate/meson.build
+++ b/boilerplate/meson.build
@@ -6,7 +6,6 @@ cairo_boilerplate_sources = [
cairo_boilerplate_feature_sources = {
'cairo-xlib': ['cairo-boilerplate-xlib.c'],
- 'cairo-qt': ['cairo-boilerplate-qt.cpp'],
'cairo-quartz': ['cairo-boilerplate-quartz.c'],
'cairo-xcb': ['cairo-boilerplate-xcb.c'],
'cairo-win32': ['cairo-boilerplate-win32.c', 'cairo-boilerplate-win32-printing.c'],