summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README7
-rw-r--r--boilerplate/Makefile.am26
-rw-r--r--boilerplate/Makefile.sources1
-rw-r--r--boilerplate/Makefile.win32.features98
-rw-r--r--boilerplate/cairo-boilerplate-beos.cpp273
-rw-r--r--build/Makefile.win32.features1
-rw-r--r--build/Makefile.win32.features-h3
-rw-r--r--build/configure.ac.features7
-rw-r--r--build/configure.ac.tools1
-rw-r--r--configure.ac24
-rw-r--r--doc/public/cairo-docs.xml1
-rw-r--r--doc/public/language-bindings.xml1
-rw-r--r--meson.build5
-rw-r--r--src/Makefile.am22
-rw-r--r--src/Makefile.am.analysis4
-rw-r--r--src/Makefile.sources5
-rw-r--r--src/Makefile.win32.features102
-rw-r--r--src/cairo-beos-surface.cpp984
-rw-r--r--src/cairo-beos.h60
-rw-r--r--src/cairo-mutex-impl-private.h11
20 files changed, 9 insertions, 1627 deletions
diff --git a/README b/README
index 0bcf14012..dfc60aeb0 100644
--- a/README
+++ b/README
@@ -7,7 +7,7 @@ Cairo is a 2D graphics library with support for multiple output
devices. Currently supported output targets include the X Window
System (via both Xlib and XCB), quartz, win32, and image buffers,
as well as PDF, PostScript, and SVG file output. Experimental backends
-include OpenGL, BeOS, OS/2, and DirectFB.
+include OpenGL, OS/2, and DirectFB.
Cairo is designed to produce consistent output on all output media
while taking advantage of display hardware acceleration when available
@@ -169,11 +169,6 @@ Font backends (required to have at least one)
Experimental surface backends
-----------------------------
- beos backend
- ------------
- No dependencies in itself other than an installed BeOS system, but cairo
- requires a font backend. See the freetype dependency list.
-
os2 backend
-----------
Cairo should run on any recent version of OS/2 or eComStation, but it
diff --git a/boilerplate/Makefile.am b/boilerplate/Makefile.am
index 29ad015ac..57fec733c 100644
--- a/boilerplate/Makefile.am
+++ b/boilerplate/Makefile.am
@@ -14,13 +14,7 @@ AM_CPPFLAGS = \
$(NULL)
AM_LDFLAGS = $(CAIRO_LDFLAGS)
-if BUILD_CXX
-cxx_boilerplate_lib = libcairoboilerplate_cxx.la
-else
-cxx_boilerplate_lib =
-endif
-
-EXTRA_LTLIBRARIES += libcairoboilerplate.la $(cxx_boilerplate_lib)
+EXTRA_LTLIBRARIES += libcairoboilerplate.la
libcairoboilerplate_la_SOURCES = \
@@ -29,37 +23,23 @@ libcairoboilerplate_la_SOURCES = \
$(enabled_cairo_boilerplate_sources) \
cairo-boilerplate-constructors.c \
$(NULL)
-libcairoboilerplate_cxx_la_SOURCES = \
- $(enabled_cairo_boilerplate_cxx_sources) \
- $(NULL)
libcairoboilerplate_la_LIBADD = $(top_builddir)/src/libcairo.la \
- $(cxx_boilerplate_lib) \
- $(CAIRO_LIBS) \
- $(CAIROBOILERPLATE_LIBS) \
- $(NULL)
-libcairoboilerplate_cxx_la_LIBADD = $(top_builddir)/src/libcairo.la \
$(CAIRO_LIBS) \
$(CAIROBOILERPLATE_LIBS) \
$(NULL)
libcairoboilerplate_la_DEPENDENCIES = \
- $(cxx_boilerplate_lib) \
$(NULL)
if CAIRO_HAS_DL
libcairoboilerplate_la_LIBADD += -ldl
endif
-if CAIRO_HAS_BEOS_SURFACE
-# BeOS system headers trigger this warning
-libcairoboilerplate_cxx_la_CXXFLAGS = -Wno-multichar
-endif
-
if CAIRO_HAS_WIN32_SURFACE
libcairoboilerplate_la_LIBADD += -lwinspool
endif
-cairo-boilerplate-constructors.c: Makefile $(enabled_cairo_boilerplate_sources) $(enabled_cairo_boilerplate_cxx_sources) make-cairo-boilerplate-constructors.sh
- (cd $(srcdir) && sh ./make-cairo-boilerplate-constructors.sh $(enabled_cairo_boilerplate_sources) $(enabled_cairo_boilerplate_cxx_sources)) > $@
+cairo-boilerplate-constructors.c: Makefile $(enabled_cairo_boilerplate_sources) make-cairo-boilerplate-constructors.sh
+ (cd $(srcdir) && sh ./make-cairo-boilerplate-constructors.sh $(enabled_cairo_boilerplate_sources)) > $@
BUILT_SOURCES += cairo-boilerplate-constructors.c
EXTRA_DIST += $(BUILT_SOURCES) make-cairo-boilerplate-constructors.sh
diff --git a/boilerplate/Makefile.sources b/boilerplate/Makefile.sources
index ada70ed6a..04c33bcce 100644
--- a/boilerplate/Makefile.sources
+++ b/boilerplate/Makefile.sources
@@ -19,7 +19,6 @@ cairo_boilerplate_private = \
cairo-boilerplate-private.h \
$(NULL)
-cairo_boilerplate_beos_cxx_sources = cairo-boilerplate-beos.cpp
cairo_boilerplate_directfb_sources = cairo-boilerplate-directfb.c
cairo_boilerplate_drm_sources = cairo-boilerplate-drm.c
cairo_boilerplate_glx_sources = cairo-boilerplate-glx.c
diff --git a/boilerplate/Makefile.win32.features b/boilerplate/Makefile.win32.features
index 40f5d48cd..4dff05f21 100644
--- a/boilerplate/Makefile.win32.features
+++ b/boilerplate/Makefile.win32.features
@@ -10,502 +10,404 @@ supported_cairo_boilerplate_headers = $(cairo_boilerplate_headers)
unsupported_cairo_boilerplate_headers =
all_cairo_boilerplate_headers = $(cairo_boilerplate_headers)
all_cairo_boilerplate_private = $(cairo_boilerplate_private)
-all_cairo_boilerplate_cxx_sources = $(cairo_boilerplate_cxx_sources)
all_cairo_boilerplate_sources = $(cairo_boilerplate_sources)
enabled_cairo_boilerplate_headers = $(cairo_boilerplate_headers)
enabled_cairo_boilerplate_private = $(cairo_boilerplate_private)
-enabled_cairo_boilerplate_cxx_sources = $(cairo_boilerplate_cxx_sources)
enabled_cairo_boilerplate_sources = $(cairo_boilerplate_sources)
supported_cairo_boilerplate_headers += $(cairo_boilerplate_xlib_headers)
all_cairo_boilerplate_headers += $(cairo_boilerplate_xlib_headers)
all_cairo_boilerplate_private += $(cairo_boilerplate_xlib_private)
-all_cairo_boilerplate_cxx_sources += $(cairo_boilerplate_xlib_cxx_sources)
all_cairo_boilerplate_sources += $(cairo_boilerplate_xlib_sources)
ifeq ($(CAIRO_HAS_XLIB_SURFACE),1)
enabled_cairo_boilerplate_headers += $(cairo_boilerplate_xlib_headers)
enabled_cairo_boilerplate_private += $(cairo_boilerplate_xlib_private)
-enabled_cairo_boilerplate_cxx_sources += $(cairo_boilerplate_xlib_cxx_sources)
enabled_cairo_boilerplate_sources += $(cairo_boilerplate_xlib_sources)
endif
supported_cairo_boilerplate_headers += $(cairo_boilerplate_xlib_xrender_headers)
all_cairo_boilerplate_headers += $(cairo_boilerplate_xlib_xrender_headers)
all_cairo_boilerplate_private += $(cairo_boilerplate_xlib_xrender_private)
-all_cairo_boilerplate_cxx_sources += $(cairo_boilerplate_xlib_xrender_cxx_sources)
all_cairo_boilerplate_sources += $(cairo_boilerplate_xlib_xrender_sources)
ifeq ($(CAIRO_HAS_XLIB_XRENDER_SURFACE),1)
enabled_cairo_boilerplate_headers += $(cairo_boilerplate_xlib_xrender_headers)
enabled_cairo_boilerplate_private += $(cairo_boilerplate_xlib_xrender_private)
-enabled_cairo_boilerplate_cxx_sources += $(cairo_boilerplate_xlib_xrender_cxx_sources)
enabled_cairo_boilerplate_sources += $(cairo_boilerplate_xlib_xrender_sources)
endif
supported_cairo_boilerplate_headers += $(cairo_boilerplate_xcb_headers)
all_cairo_boilerplate_headers += $(cairo_boilerplate_xcb_headers)
all_cairo_boilerplate_private += $(cairo_boilerplate_xcb_private)
-all_cairo_boilerplate_cxx_sources += $(cairo_boilerplate_xcb_cxx_sources)
all_cairo_boilerplate_sources += $(cairo_boilerplate_xcb_sources)
ifeq ($(CAIRO_HAS_XCB_SURFACE),1)
enabled_cairo_boilerplate_headers += $(cairo_boilerplate_xcb_headers)
enabled_cairo_boilerplate_private += $(cairo_boilerplate_xcb_private)
-enabled_cairo_boilerplate_cxx_sources += $(cairo_boilerplate_xcb_cxx_sources)
enabled_cairo_boilerplate_sources += $(cairo_boilerplate_xcb_sources)
endif
unsupported_cairo_boilerplate_headers += $(cairo_boilerplate_xlib_xcb_headers)
all_cairo_boilerplate_headers += $(cairo_boilerplate_xlib_xcb_headers)
all_cairo_boilerplate_private += $(cairo_boilerplate_xlib_xcb_private)
-all_cairo_boilerplate_cxx_sources += $(cairo_boilerplate_xlib_xcb_cxx_sources)
all_cairo_boilerplate_sources += $(cairo_boilerplate_xlib_xcb_sources)
ifeq ($(CAIRO_HAS_XLIB_XCB_FUNCTIONS),1)
enabled_cairo_boilerplate_headers += $(cairo_boilerplate_xlib_xcb_headers)
enabled_cairo_boilerplate_private += $(cairo_boilerplate_xlib_xcb_private)
-enabled_cairo_boilerplate_cxx_sources += $(cairo_boilerplate_xlib_xcb_cxx_sources)
enabled_cairo_boilerplate_sources += $(cairo_boilerplate_xlib_xcb_sources)
endif
supported_cairo_boilerplate_headers += $(cairo_boilerplate_xcb_shm_headers)
all_cairo_boilerplate_headers += $(cairo_boilerplate_xcb_shm_headers)
all_cairo_boilerplate_private += $(cairo_boilerplate_xcb_shm_private)
-all_cairo_boilerplate_cxx_sources += $(cairo_boilerplate_xcb_shm_cxx_sources)
all_cairo_boilerplate_sources += $(cairo_boilerplate_xcb_shm_sources)
ifeq ($(CAIRO_HAS_XCB_SHM_FUNCTIONS),1)
enabled_cairo_boilerplate_headers += $(cairo_boilerplate_xcb_shm_headers)
enabled_cairo_boilerplate_private += $(cairo_boilerplate_xcb_shm_private)
-enabled_cairo_boilerplate_cxx_sources += $(cairo_boilerplate_xcb_shm_cxx_sources)
enabled_cairo_boilerplate_sources += $(cairo_boilerplate_xcb_shm_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)
-all_cairo_boilerplate_cxx_sources += $(cairo_boilerplate_quartz_cxx_sources)
all_cairo_boilerplate_sources += $(cairo_boilerplate_quartz_sources)
ifeq ($(CAIRO_HAS_QUARTZ_SURFACE),1)
enabled_cairo_boilerplate_headers += $(cairo_boilerplate_quartz_headers)
enabled_cairo_boilerplate_private += $(cairo_boilerplate_quartz_private)
-enabled_cairo_boilerplate_cxx_sources += $(cairo_boilerplate_quartz_cxx_sources)
enabled_cairo_boilerplate_sources += $(cairo_boilerplate_quartz_sources)
endif
supported_cairo_boilerplate_headers += $(cairo_boilerplate_quartz_font_headers)
all_cairo_boilerplate_headers += $(cairo_boilerplate_quartz_font_headers)
all_cairo_boilerplate_private += $(cairo_boilerplate_quartz_font_private)
-all_cairo_boilerplate_cxx_sources += $(cairo_boilerplate_quartz_font_cxx_sources)
all_cairo_boilerplate_sources += $(cairo_boilerplate_quartz_font_sources)
ifeq ($(CAIRO_HAS_QUARTZ_FONT),1)
enabled_cairo_boilerplate_headers += $(cairo_boilerplate_quartz_font_headers)
enabled_cairo_boilerplate_private += $(cairo_boilerplate_quartz_font_private)
-enabled_cairo_boilerplate_cxx_sources += $(cairo_boilerplate_quartz_font_cxx_sources)
enabled_cairo_boilerplate_sources += $(cairo_boilerplate_quartz_font_sources)
endif
unsupported_cairo_boilerplate_headers += $(cairo_boilerplate_quartz_image_headers)
all_cairo_boilerplate_headers += $(cairo_boilerplate_quartz_image_headers)
all_cairo_boilerplate_private += $(cairo_boilerplate_quartz_image_private)
-all_cairo_boilerplate_cxx_sources += $(cairo_boilerplate_quartz_image_cxx_sources)
all_cairo_boilerplate_sources += $(cairo_boilerplate_quartz_image_sources)
ifeq ($(CAIRO_HAS_QUARTZ_IMAGE_SURFACE),1)
enabled_cairo_boilerplate_headers += $(cairo_boilerplate_quartz_image_headers)
enabled_cairo_boilerplate_private += $(cairo_boilerplate_quartz_image_private)
-enabled_cairo_boilerplate_cxx_sources += $(cairo_boilerplate_quartz_image_cxx_sources)
enabled_cairo_boilerplate_sources += $(cairo_boilerplate_quartz_image_sources)
endif
supported_cairo_boilerplate_headers += $(cairo_boilerplate_win32_headers)
all_cairo_boilerplate_headers += $(cairo_boilerplate_win32_headers)
all_cairo_boilerplate_private += $(cairo_boilerplate_win32_private)
-all_cairo_boilerplate_cxx_sources += $(cairo_boilerplate_win32_cxx_sources)
all_cairo_boilerplate_sources += $(cairo_boilerplate_win32_sources)
ifeq ($(CAIRO_HAS_WIN32_SURFACE),1)
enabled_cairo_boilerplate_headers += $(cairo_boilerplate_win32_headers)
enabled_cairo_boilerplate_private += $(cairo_boilerplate_win32_private)
-enabled_cairo_boilerplate_cxx_sources += $(cairo_boilerplate_win32_cxx_sources)
enabled_cairo_boilerplate_sources += $(cairo_boilerplate_win32_sources)
endif
supported_cairo_boilerplate_headers += $(cairo_boilerplate_win32_font_headers)
all_cairo_boilerplate_headers += $(cairo_boilerplate_win32_font_headers)
all_cairo_boilerplate_private += $(cairo_boilerplate_win32_font_private)
-all_cairo_boilerplate_cxx_sources += $(cairo_boilerplate_win32_font_cxx_sources)
all_cairo_boilerplate_sources += $(cairo_boilerplate_win32_font_sources)
ifeq ($(CAIRO_HAS_WIN32_FONT),1)
enabled_cairo_boilerplate_headers += $(cairo_boilerplate_win32_font_headers)
enabled_cairo_boilerplate_private += $(cairo_boilerplate_win32_font_private)
-enabled_cairo_boilerplate_cxx_sources += $(cairo_boilerplate_win32_font_cxx_sources)
enabled_cairo_boilerplate_sources += $(cairo_boilerplate_win32_font_sources)
endif
unsupported_cairo_boilerplate_headers += $(cairo_boilerplate_os2_headers)
all_cairo_boilerplate_headers += $(cairo_boilerplate_os2_headers)
all_cairo_boilerplate_private += $(cairo_boilerplate_os2_private)
-all_cairo_boilerplate_cxx_sources += $(cairo_boilerplate_os2_cxx_sources)
all_cairo_boilerplate_sources += $(cairo_boilerplate_os2_sources)
ifeq ($(CAIRO_HAS_OS2_SURFACE),1)
enabled_cairo_boilerplate_headers += $(cairo_boilerplate_os2_headers)
enabled_cairo_boilerplate_private += $(cairo_boilerplate_os2_private)
-enabled_cairo_boilerplate_cxx_sources += $(cairo_boilerplate_os2_cxx_sources)
enabled_cairo_boilerplate_sources += $(cairo_boilerplate_os2_sources)
endif
-unsupported_cairo_boilerplate_headers += $(cairo_boilerplate_beos_headers)
-all_cairo_boilerplate_headers += $(cairo_boilerplate_beos_headers)
-all_cairo_boilerplate_private += $(cairo_boilerplate_beos_private)
-all_cairo_boilerplate_cxx_sources += $(cairo_boilerplate_beos_cxx_sources)
-all_cairo_boilerplate_sources += $(cairo_boilerplate_beos_sources)
-ifeq ($(CAIRO_HAS_BEOS_SURFACE),1)
-enabled_cairo_boilerplate_headers += $(cairo_boilerplate_beos_headers)
-enabled_cairo_boilerplate_private += $(cairo_boilerplate_beos_private)
-enabled_cairo_boilerplate_cxx_sources += $(cairo_boilerplate_beos_cxx_sources)
-enabled_cairo_boilerplate_sources += $(cairo_boilerplate_beos_sources)
-endif
-
unsupported_cairo_boilerplate_headers += $(cairo_boilerplate_drm_headers)
all_cairo_boilerplate_headers += $(cairo_boilerplate_drm_headers)
all_cairo_boilerplate_private += $(cairo_boilerplate_drm_private)
-all_cairo_boilerplate_cxx_sources += $(cairo_boilerplate_drm_cxx_sources)
all_cairo_boilerplate_sources += $(cairo_boilerplate_drm_sources)
ifeq ($(CAIRO_HAS_DRM_SURFACE),1)
enabled_cairo_boilerplate_headers += $(cairo_boilerplate_drm_headers)
enabled_cairo_boilerplate_private += $(cairo_boilerplate_drm_private)
-enabled_cairo_boilerplate_cxx_sources += $(cairo_boilerplate_drm_cxx_sources)
enabled_cairo_boilerplate_sources += $(cairo_boilerplate_drm_sources)
endif
unsupported_cairo_boilerplate_headers += $(cairo_boilerplate_gallium_headers)
all_cairo_boilerplate_headers += $(cairo_boilerplate_gallium_headers)
all_cairo_boilerplate_private += $(cairo_boilerplate_gallium_private)
-all_cairo_boilerplate_cxx_sources += $(cairo_boilerplate_gallium_cxx_sources)
all_cairo_boilerplate_sources += $(cairo_boilerplate_gallium_sources)
ifeq ($(CAIRO_HAS_GALLIUM_SURFACE),1)
enabled_cairo_boilerplate_headers += $(cairo_boilerplate_gallium_headers)
enabled_cairo_boilerplate_private += $(cairo_boilerplate_gallium_private)
-enabled_cairo_boilerplate_cxx_sources += $(cairo_boilerplate_gallium_cxx_sources)
enabled_cairo_boilerplate_sources += $(cairo_boilerplate_gallium_sources)
endif
supported_cairo_boilerplate_headers += $(cairo_boilerplate_png_headers)
all_cairo_boilerplate_headers += $(cairo_boilerplate_png_headers)
all_cairo_boilerplate_private += $(cairo_boilerplate_png_private)
-all_cairo_boilerplate_cxx_sources += $(cairo_boilerplate_png_cxx_sources)
all_cairo_boilerplate_sources += $(cairo_boilerplate_png_sources)
ifeq ($(CAIRO_HAS_PNG_FUNCTIONS),1)
enabled_cairo_boilerplate_headers += $(cairo_boilerplate_png_headers)
enabled_cairo_boilerplate_private += $(cairo_boilerplate_png_private)
-enabled_cairo_boilerplate_cxx_sources += $(cairo_boilerplate_png_cxx_sources)
enabled_cairo_boilerplate_sources += $(cairo_boilerplate_png_sources)
endif
unsupported_cairo_boilerplate_headers += $(cairo_boilerplate_gl_headers)
all_cairo_boilerplate_headers += $(cairo_boilerplate_gl_headers)
all_cairo_boilerplate_private += $(cairo_boilerplate_gl_private)
-all_cairo_boilerplate_cxx_sources += $(cairo_boilerplate_gl_cxx_sources)
all_cairo_boilerplate_sources += $(cairo_boilerplate_gl_sources)
ifeq ($(CAIRO_HAS_GL_SURFACE),1)
enabled_cairo_boilerplate_headers += $(cairo_boilerplate_gl_headers)
enabled_cairo_boilerplate_private += $(cairo_boilerplate_gl_private)
-enabled_cairo_boilerplate_cxx_sources += $(cairo_boilerplate_gl_cxx_sources)
enabled_cairo_boilerplate_sources += $(cairo_boilerplate_gl_sources)
endif
unsupported_cairo_boilerplate_headers += $(cairo_boilerplate_glesv2_headers)
all_cairo_boilerplate_headers += $(cairo_boilerplate_glesv2_headers)
all_cairo_boilerplate_private += $(cairo_boilerplate_glesv2_private)
-all_cairo_boilerplate_cxx_sources += $(cairo_boilerplate_glesv2_cxx_sources)
all_cairo_boilerplate_sources += $(cairo_boilerplate_glesv2_sources)
ifeq ($(CAIRO_HAS_GLESV2_SURFACE),1)
enabled_cairo_boilerplate_headers += $(cairo_boilerplate_glesv2_headers)
enabled_cairo_boilerplate_private += $(cairo_boilerplate_glesv2_private)
-enabled_cairo_boilerplate_cxx_sources += $(cairo_boilerplate_glesv2_cxx_sources)
enabled_cairo_boilerplate_sources += $(cairo_boilerplate_glesv2_sources)
endif
unsupported_cairo_boilerplate_headers += $(cairo_boilerplate_glesv3_headers)
all_cairo_boilerplate_headers += $(cairo_boilerplate_glesv3_headers)
all_cairo_boilerplate_private += $(cairo_boilerplate_glesv3_private)
-all_cairo_boilerplate_cxx_sources += $(cairo_boilerplate_glesv3_cxx_sources)
all_cairo_boilerplate_sources += $(cairo_boilerplate_glesv3_sources)
ifeq ($(CAIRO_HAS_GLESV3_SURFACE),1)
enabled_cairo_boilerplate_headers += $(cairo_boilerplate_glesv3_headers)
enabled_cairo_boilerplate_private += $(cairo_boilerplate_glesv3_private)
-enabled_cairo_boilerplate_cxx_sources += $(cairo_boilerplate_glesv3_cxx_sources)
enabled_cairo_boilerplate_sources += $(cairo_boilerplate_glesv3_sources)
endif
unsupported_cairo_boilerplate_headers += $(cairo_boilerplate_cogl_headers)
all_cairo_boilerplate_headers += $(cairo_boilerplate_cogl_headers)
all_cairo_boilerplate_private += $(cairo_boilerplate_cogl_private)
-all_cairo_boilerplate_cxx_sources += $(cairo_boilerplate_cogl_cxx_sources)
all_cairo_boilerplate_sources += $(cairo_boilerplate_cogl_sources)
ifeq ($(CAIRO_HAS_COGL_SURFACE),1)
enabled_cairo_boilerplate_headers += $(cairo_boilerplate_cogl_headers)
enabled_cairo_boilerplate_private += $(cairo_boilerplate_cogl_private)
-enabled_cairo_boilerplate_cxx_sources += $(cairo_boilerplate_cogl_cxx_sources)
enabled_cairo_boilerplate_sources += $(cairo_boilerplate_cogl_sources)
endif
unsupported_cairo_boilerplate_headers += $(cairo_boilerplate_directfb_headers)
all_cairo_boilerplate_headers += $(cairo_boilerplate_directfb_headers)
all_cairo_boilerplate_private += $(cairo_boilerplate_directfb_private)
-all_cairo_boilerplate_cxx_sources += $(cairo_boilerplate_directfb_cxx_sources)
all_cairo_boilerplate_sources += $(cairo_boilerplate_directfb_sources)
ifeq ($(CAIRO_HAS_DIRECTFB_SURFACE),1)
enabled_cairo_boilerplate_headers += $(cairo_boilerplate_directfb_headers)
enabled_cairo_boilerplate_private += $(cairo_boilerplate_directfb_private)
-enabled_cairo_boilerplate_cxx_sources += $(cairo_boilerplate_directfb_cxx_sources)
enabled_cairo_boilerplate_sources += $(cairo_boilerplate_directfb_sources)
endif
unsupported_cairo_boilerplate_headers += $(cairo_boilerplate_vg_headers)
all_cairo_boilerplate_headers += $(cairo_boilerplate_vg_headers)
all_cairo_boilerplate_private += $(cairo_boilerplate_vg_private)
-all_cairo_boilerplate_cxx_sources += $(cairo_boilerplate_vg_cxx_sources)
all_cairo_boilerplate_sources += $(cairo_boilerplate_vg_sources)
ifeq ($(CAIRO_HAS_VG_SURFACE),1)
enabled_cairo_boilerplate_headers += $(cairo_boilerplate_vg_headers)
enabled_cairo_boilerplate_private += $(cairo_boilerplate_vg_private)
-enabled_cairo_boilerplate_cxx_sources += $(cairo_boilerplate_vg_cxx_sources)
enabled_cairo_boilerplate_sources += $(cairo_boilerplate_vg_sources)
endif
supported_cairo_boilerplate_headers += $(cairo_boilerplate_egl_headers)
all_cairo_boilerplate_headers += $(cairo_boilerplate_egl_headers)
all_cairo_boilerplate_private += $(cairo_boilerplate_egl_private)
-all_cairo_boilerplate_cxx_sources += $(cairo_boilerplate_egl_cxx_sources)
all_cairo_boilerplate_sources += $(cairo_boilerplate_egl_sources)
ifeq ($(CAIRO_HAS_EGL_FUNCTIONS),1)
enabled_cairo_boilerplate_headers += $(cairo_boilerplate_egl_headers)
enabled_cairo_boilerplate_private += $(cairo_boilerplate_egl_private)
-enabled_cairo_boilerplate_cxx_sources += $(cairo_boilerplate_egl_cxx_sources)
enabled_cairo_boilerplate_sources += $(cairo_boilerplate_egl_sources)
endif
supported_cairo_boilerplate_headers += $(cairo_boilerplate_glx_headers)
all_cairo_boilerplate_headers += $(cairo_boilerplate_glx_headers)
all_cairo_boilerplate_private += $(cairo_boilerplate_glx_private)
-all_cairo_boilerplate_cxx_sources += $(cairo_boilerplate_glx_cxx_sources)
all_cairo_boilerplate_sources += $(cairo_boilerplate_glx_sources)
ifeq ($(CAIRO_HAS_GLX_FUNCTIONS),1)
enabled_cairo_boilerplate_headers += $(cairo_boilerplate_glx_headers)
enabled_cairo_boilerplate_private += $(cairo_boilerplate_glx_private)
-enabled_cairo_boilerplate_cxx_sources += $(cairo_boilerplate_glx_cxx_sources)
enabled_cairo_boilerplate_sources += $(cairo_boilerplate_glx_sources)
endif
supported_cairo_boilerplate_headers += $(cairo_boilerplate_wgl_headers)
all_cairo_boilerplate_headers += $(cairo_boilerplate_wgl_headers)
all_cairo_boilerplate_private += $(cairo_boilerplate_wgl_private)
-all_cairo_boilerplate_cxx_sources += $(cairo_boilerplate_wgl_cxx_sources)
all_cairo_boilerplate_sources += $(cairo_boilerplate_wgl_sources)
ifeq ($(CAIRO_HAS_WGL_FUNCTIONS),1)
enabled_cairo_boilerplate_headers += $(cairo_boilerplate_wgl_headers)
enabled_cairo_boilerplate_private += $(cairo_boilerplate_wgl_private)
-enabled_cairo_boilerplate_cxx_sources += $(cairo_boilerplate_wgl_cxx_sources)
enabled_cairo_boilerplate_sources += $(cairo_boilerplate_wgl_sources)
endif
supported_cairo_boilerplate_headers += $(cairo_boilerplate_script_headers)
all_cairo_boilerplate_headers += $(cairo_boilerplate_script_headers)
all_cairo_boilerplate_private += $(cairo_boilerplate_script_private)
-all_cairo_boilerplate_cxx_sources += $(cairo_boilerplate_script_cxx_sources)
all_cairo_boilerplate_sources += $(cairo_boilerplate_script_sources)
ifeq ($(CAIRO_HAS_SCRIPT_SURFACE),1)
enabled_cairo_boilerplate_headers += $(cairo_boilerplate_script_headers)
enabled_cairo_boilerplate_private += $(cairo_boilerplate_script_private)
-enabled_cairo_boilerplate_cxx_sources += $(cairo_boilerplate_script_cxx_sources)
enabled_cairo_boilerplate_sources += $(cairo_boilerplate_script_sources)
endif
supported_cairo_boilerplate_headers += $(cairo_boilerplate_ft_headers)
all_cairo_boilerplate_headers += $(cairo_boilerplate_ft_headers)
all_cairo_boilerplate_private += $(cairo_boilerplate_ft_private)
-all_cairo_boilerplate_cxx_sources += $(cairo_boilerplate_ft_cxx_sources)
all_cairo_boilerplate_sources += $(cairo_boilerplate_ft_sources)
ifeq ($(CAIRO_HAS_FT_FONT),1)
enabled_cairo_boilerplate_headers += $(cairo_boilerplate_ft_headers)
enabled_cairo_boilerplate_private += $(cairo_boilerplate_ft_private)
-enabled_cairo_boilerplate_cxx_sources += $(cairo_boilerplate_ft_cxx_sources)
enabled_cairo_boilerplate_sources += $(cairo_boilerplate_ft_sources)
endif
supported_cairo_boilerplate_headers += $(cairo_boilerplate_fc_headers)
all_cairo_boilerplate_headers += $(cairo_boilerplate_fc_headers)
all_cairo_boilerplate_private += $(cairo_boilerplate_fc_private)
-all_cairo_boilerplate_cxx_sources += $(cairo_boilerplate_fc_cxx_sources)
all_cairo_boilerplate_sources += $(cairo_boilerplate_fc_sources)
ifeq ($(CAIRO_HAS_FC_FONT),1)
enabled_cairo_boilerplate_headers += $(cairo_boilerplate_fc_headers)
enabled_cairo_boilerplate_private += $(cairo_boilerplate_fc_private)
-enabled_cairo_boilerplate_cxx_sources += $(cairo_boilerplate_fc_cxx_sources)
enabled_cairo_boilerplate_sources += $(cairo_boilerplate_fc_sources)
endif
supported_cairo_boilerplate_headers += $(cairo_boilerplate_ps_headers)
all_cairo_boilerplate_headers += $(cairo_boilerplate_ps_headers)
all_cairo_boilerplate_private += $(cairo_boilerplate_ps_private)
-all_cairo_boilerplate_cxx_sources += $(cairo_boilerplate_ps_cxx_sources)
all_cairo_boilerplate_sources += $(cairo_boilerplate_ps_sources)
ifeq ($(CAIRO_HAS_PS_SURFACE),1)
enabled_cairo_boilerplate_headers += $(cairo_boilerplate_ps_headers)
enabled_cairo_boilerplate_private += $(cairo_boilerplate_ps_private)
-enabled_cairo_boilerplate_cxx_sources += $(cairo_boilerplate_ps_cxx_sources)
enabled_cairo_boilerplate_sources += $(cairo_boilerplate_ps_sources)
endif
supported_cairo_boilerplate_headers += $(cairo_boilerplate_pdf_headers)
all_cairo_boilerplate_headers += $(cairo_boilerplate_pdf_headers)
all_cairo_boilerplate_private += $(cairo_boilerplate_pdf_private)
-all_cairo_boilerplate_cxx_sources += $(cairo_boilerplate_pdf_cxx_sources)
all_cairo_boilerplate_sources += $(cairo_boilerplate_pdf_sources)
ifeq ($(CAIRO_HAS_PDF_SURFACE),1)
enabled_cairo_boilerplate_headers += $(cairo_boilerplate_pdf_headers)
enabled_cairo_boilerplate_private += $(cairo_boilerplate_pdf_private)
-enabled_cairo_boilerplate_cxx_sources += $(cairo_boilerplate_pdf_cxx_sources)
enabled_cairo_boilerplate_sources += $(cairo_boilerplate_pdf_sources)
endif
supported_cairo_boilerplate_headers += $(cairo_boilerplate_svg_headers)
all_cairo_boilerplate_headers += $(cairo_boilerplate_svg_headers)
all_cairo_boilerplate_private += $(cairo_boilerplate_svg_private)
-all_cairo_boilerplate_cxx_sources += $(cairo_boilerplate_svg_cxx_sources)
all_cairo_boilerplate_sources += $(cairo_boilerplate_svg_sources)
ifeq ($(CAIRO_HAS_SVG_SURFACE),1)
enabled_cairo_boilerplate_headers += $(cairo_boilerplate_svg_headers)
enabled_cairo_boilerplate_private += $(cairo_boilerplate_svg_private)
-enabled_cairo_boilerplate_cxx_sources += $(cairo_boilerplate_svg_cxx_sources)
enabled_cairo_boilerplate_sources += $(cairo_boilerplate_svg_sources)
endif
all_cairo_boilerplate_private += $(cairo_boilerplate_test_surfaces_private) $(cairo_boilerplate_test_surfaces_headers)
-all_cairo_boilerplate_cxx_sources += $(cairo_boilerplate_test_surfaces_cxx_sources)
all_cairo_boilerplate_sources += $(cairo_boilerplate_test_surfaces_sources)
ifeq ($(CAIRO_HAS_TEST_SURFACES),1)
enabled_cairo_boilerplate_private += $(cairo_boilerplate_test_surfaces_private) $(cairo_boilerplate_test_surfaces_headers)
-enabled_cairo_boilerplate_cxx_sources += $(cairo_boilerplate_test_surfaces_cxx_sources)
enabled_cairo_boilerplate_sources += $(cairo_boilerplate_test_surfaces_sources)
endif
supported_cairo_boilerplate_headers += $(cairo_boilerplate_image_headers)
all_cairo_boilerplate_headers += $(cairo_boilerplate_image_headers)
all_cairo_boilerplate_private += $(cairo_boilerplate_image_private)
-all_cairo_boilerplate_cxx_sources += $(cairo_boilerplate_image_cxx_sources)
all_cairo_boilerplate_sources += $(cairo_boilerplate_image_sources)
enabled_cairo_boilerplate_headers += $(cairo_boilerplate_image_headers)
enabled_cairo_boilerplate_private += $(cairo_boilerplate_image_private)
-enabled_cairo_boilerplate_cxx_sources += $(cairo_boilerplate_image_cxx_sources)
enabled_cairo_boilerplate_sources += $(cairo_boilerplate_image_sources)
supported_cairo_boilerplate_headers += $(cairo_boilerplate_mime_headers)
all_cairo_boilerplate_headers += $(cairo_boilerplate_mime_headers)
all_cairo_boilerplate_private += $(cairo_boilerplate_mime_private)
-all_cairo_boilerplate_cxx_sources += $(cairo_boilerplate_mime_cxx_sources)
all_cairo_boilerplate_sources += $(cairo_boilerplate_mime_sources)
enabled_cairo_boilerplate_headers += $(cairo_boilerplate_mime_headers)
enabled_cairo_boilerplate_private += $(cairo_boilerplate_mime_private)
-enabled_cairo_boilerplate_cxx_sources += $(cairo_boilerplate_mime_cxx_sources)
enabled_cairo_boilerplate_sources += $(cairo_boilerplate_mime_sources)
supported_cairo_boilerplate_headers += $(cairo_boilerplate_recording_headers)
all_cairo_boilerplate_headers += $(cairo_boilerplate_recording_headers)
all_cairo_boilerplate_private += $(cairo_boilerplate_recording_private)
-all_cairo_boilerplate_cxx_sources += $(cairo_boilerplate_recording_cxx_sources)
all_cairo_boilerplate_sources += $(cairo_boilerplate_recording_sources)
enabled_cairo_boilerplate_headers += $(cairo_boilerplate_recording_headers)
enabled_cairo_boilerplate_private += $(cairo_boilerplate_recording_private)
-enabled_cairo_boilerplate_cxx_sources += $(cairo_boilerplate_recording_cxx_sources)
enabled_cairo_boilerplate_sources += $(cairo_boilerplate_recording_sources)
supported_cairo_boilerplate_headers += $(cairo_boilerplate_observer_headers)
all_cairo_boilerplate_headers += $(cairo_boilerplate_observer_headers)
all_cairo_boilerplate_private += $(cairo_boilerplate_observer_private)
-all_cairo_boilerplate_cxx_sources += $(cairo_boilerplate_observer_cxx_sources)
all_cairo_boilerplate_sources += $(cairo_boilerplate_observer_sources)
enabled_cairo_boilerplate_headers += $(cairo_boilerplate_observer_headers)
enabled_cairo_boilerplate_private += $(cairo_boilerplate_observer_private)
-enabled_cairo_boilerplate_cxx_sources += $(cairo_boilerplate_observer_cxx_sources)
enabled_cairo_boilerplate_sources += $(cairo_boilerplate_observer_sources)
unsupported_cairo_boilerplate_headers += $(cairo_boilerplate_tee_headers)
all_cairo_boilerplate_headers += $(cairo_boilerplate_tee_headers)
all_cairo_boilerplate_private += $(cairo_boilerplate_tee_private)
-all_cairo_boilerplate_cxx_sources += $(cairo_boilerplate_tee_cxx_sources)
all_cairo_boilerplate_sources += $(cairo_boilerplate_tee_sources)
ifeq ($(CAIRO_HAS_TEE_SURFACE),1)
enabled_cairo_boilerplate_headers += $(cairo_boilerplate_tee_headers)
enabled_cairo_boilerplate_private += $(cairo_boilerplate_tee_private)
-enabled_cairo_boilerplate_cxx_sources += $(cairo_boilerplate_tee_cxx_sources)
enabled_cairo_boilerplate_sources += $(cairo_boilerplate_tee_sources)
endif
unsupported_cairo_boilerplate_headers += $(cairo_boilerplate_xml_headers)
all_cairo_boilerplate_headers += $(cairo_boilerplate_xml_headers)
all_cairo_boilerplate_private += $(cairo_boilerplate_xml_private)
-all_cairo_boilerplate_cxx_sources += $(cairo_boilerplate_xml_cxx_sources)
all_cairo_boilerplate_sources += $(cairo_boilerplate_xml_sources)
ifeq ($(CAIRO_HAS_XML_SURFACE),1)
enabled_cairo_boilerplate_headers += $(cairo_boilerplate_xml_headers)
enabled_cairo_boilerplate_private += $(cairo_boilerplate_xml_private)
-enabled_cairo_boilerplate_cxx_sources += $(cairo_boilerplate_xml_cxx_sources)
enabled_cairo_boilerplate_sources += $(cairo_boilerplate_xml_sources)
endif
supported_cairo_boilerplate_headers += $(cairo_boilerplate_user_headers)
all_cairo_boilerplate_headers += $(cairo_boilerplate_user_headers)
all_cairo_boilerplate_private += $(cairo_boilerplate_user_private)
-all_cairo_boilerplate_cxx_sources += $(cairo_boilerplate_user_cxx_sources)
all_cairo_boilerplate_sources += $(cairo_boilerplate_user_sources)
enabled_cairo_boilerplate_headers += $(cairo_boilerplate_user_headers)
enabled_cairo_boilerplate_private += $(cairo_boilerplate_user_private)
-enabled_cairo_boilerplate_cxx_sources += $(cairo_boilerplate_user_cxx_sources)
enabled_cairo_boilerplate_sources += $(cairo_boilerplate_user_sources)
all_cairo_boilerplate_private += $(cairo_boilerplate_pthread_private) $(cairo_boilerplate_pthread_headers)
-all_cairo_boilerplate_cxx_sources += $(cairo_boilerplate_pthread_cxx_sources)
all_cairo_boilerplate_sources += $(cairo_boilerplate_pthread_sources)
ifeq ($(CAIRO_HAS_PTHREAD),1)
enabled_cairo_boilerplate_private += $(cairo_boilerplate_pthread_private) $(cairo_boilerplate_pthread_headers)
-enabled_cairo_boilerplate_cxx_sources += $(cairo_boilerplate_pthread_cxx_sources)
enabled_cairo_boilerplate_sources += $(cairo_boilerplate_pthread_sources)
endif
supported_cairo_boilerplate_headers += $(cairo_boilerplate_gobject_headers)
all_cairo_boilerplate_headers += $(cairo_boilerplate_gobject_headers)
all_cairo_boilerplate_private += $(cairo_boilerplate_gobject_private)
-all_cairo_boilerplate_cxx_sources += $(cairo_boilerplate_gobject_cxx_sources)
all_cairo_boilerplate_sources += $(cairo_boilerplate_gobject_sources)
ifeq ($(CAIRO_HAS_GOBJECT_FUNCTIONS),1)
enabled_cairo_boilerplate_headers += $(cairo_boilerplate_gobject_headers)
enabled_cairo_boilerplate_private += $(cairo_boilerplate_gobject_private)
-enabled_cairo_boilerplate_cxx_sources += $(cairo_boilerplate_gobject_cxx_sources)
enabled_cairo_boilerplate_sources += $(cairo_boilerplate_gobject_sources)
endif
all_cairo_boilerplate_private += $(cairo_boilerplate_trace_private) $(cairo_boilerplate_trace_headers)
-all_cairo_boilerplate_cxx_sources += $(cairo_boilerplate_trace_cxx_sources)
all_cairo_boilerplate_sources += $(cairo_boilerplate_trace_sources)
ifeq ($(CAIRO_HAS_TRACE),1)
enabled_cairo_boilerplate_private += $(cairo_boilerplate_trace_private) $(cairo_boilerplate_trace_headers)
-enabled_cairo_boilerplate_cxx_sources += $(cairo_boilerplate_trace_cxx_sources)
enabled_cairo_boilerplate_sources += $(cairo_boilerplate_trace_sources)
endif
all_cairo_boilerplate_private += $(cairo_boilerplate_interpreter_private) $(cairo_boilerplate_interpreter_headers)
-all_cairo_boilerplate_cxx_sources += $(cairo_boilerplate_interpreter_cxx_sources)
all_cairo_boilerplate_sources += $(cairo_boilerplate_interpreter_sources)
ifeq ($(CAIRO_HAS_INTERPRETER),1)
enabled_cairo_boilerplate_private += $(cairo_boilerplate_interpreter_private) $(cairo_boilerplate_interpreter_headers)
-enabled_cairo_boilerplate_cxx_sources += $(cairo_boilerplate_interpreter_cxx_sources)
enabled_cairo_boilerplate_sources += $(cairo_boilerplate_interpreter_sources)
endif
all_cairo_boilerplate_private += $(cairo_boilerplate_symbol_lookup_private) $(cairo_boilerplate_symbol_lookup_headers)
-all_cairo_boilerplate_cxx_sources += $(cairo_boilerplate_symbol_lookup_cxx_sources)
all_cairo_boilerplate_sources += $(cairo_boilerplate_symbol_lookup_sources)
ifeq ($(CAIRO_HAS_SYMBOL_LOOKUP),1)
enabled_cairo_boilerplate_private += $(cairo_boilerplate_symbol_lookup_private) $(cairo_boilerplate_symbol_lookup_headers)
-enabled_cairo_boilerplate_cxx_sources += $(cairo_boilerplate_symbol_lookup_cxx_sources)
enabled_cairo_boilerplate_sources += $(cairo_boilerplate_symbol_lookup_sources)
endif
diff --git a/boilerplate/cairo-boilerplate-beos.cpp b/boilerplate/cairo-boilerplate-beos.cpp
deleted file mode 100644
index 8a1b1afb5..000000000
--- a/boilerplate/cairo-boilerplate-beos.cpp
+++ /dev/null
@@ -1,273 +0,0 @@
-/* vim:set ts=8 sw=4 noet cin: */
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.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/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Mozilla Communicator client code.
- *
- * The Initial Developer of the Original Code is
- * Netscape Communications Corporation.
- * Portions created by the Initial Developer are Copyright (C) 1998
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Takashi Toyoshima <toyoshim@be-in.org>
- * Fredrik Holmqvist <thesuckiestemail@yahoo.se>
- * Christian Biesinger <cbiesinger@web.de>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either of the GNU General Public License Version 2 or later (the "GPL"),
- * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-#include "cairo-boilerplate.h"
-#include <cairo-beos.h>
-
-// Part of this code was originally part of
-// xpfe/bootstrap/nsNativeAppSupportBeOS.cpp in the Mozilla source code.
-
-#include <Application.h>
-#include <Window.h>
-#include <View.h>
-#include <Bitmap.h>
-
-class CairoTestWindow : public BWindow
-{
-public:
- CairoTestWindow(BRect frame, const char* title);
- virtual ~CairoTestWindow();
- BView* View() const { return mView; }
-private:
- BView* mView;
-};
-
-CairoTestWindow::CairoTestWindow(BRect frame, const char* title)
- : BWindow(frame, title, B_TITLED_WINDOW,
- B_NOT_RESIZABLE|B_NOT_ZOOMABLE)
-{
- mView = new BView(frame, "CairoWindowTestView", B_FOLLOW_ALL_SIDES, 0);
- AddChild(mView);
- Show();
-
- // Make sure the window is actually on screen
- Lock();
- Sync();
- mView->SetViewColor(B_TRANSPARENT_COLOR);
- mView->Sync();
- Unlock();
-}
-
-CairoTestWindow::~CairoTestWindow()
-{
- RemoveChild(mView);
- delete mView;
-}
-
-
-class nsBeOSApp : public BApplication
-{
-public:
- nsBeOSApp(sem_id sem) : BApplication(GetAppSig()), init(sem)
- {}
-
- void ReadyToRun()
- {
- release_sem(init);
- }
-
- static int32 Main(void *args)
- {
- nsBeOSApp *app = new nsBeOSApp( (sem_id)args );
- if(app == NULL)
- return B_ERROR;
- return app->Run();
- }
-
-private:
-
- const char *GetAppSig()
- {
- return "application/x-vnd.cairo-test-app";
- }
-
- sem_id init;
-}; //class nsBeOSApp
-
-class AppRunner
-{
- public:
- AppRunner();
- ~AppRunner();
-};
-
-AppRunner::AppRunner()
-{
- if (be_app)
- return;
-
- sem_id initsem = create_sem(0, "Cairo BApplication init");
- if (initsem < B_OK) {
- fprintf (stderr, "Error creating BeOS initialization semaphore\n");
- return;
- }
-
- thread_id tid = spawn_thread(nsBeOSApp::Main, "Cairo/BeOS test", B_NORMAL_PRIORITY, (void *)initsem);
- if (tid < B_OK || B_OK != resume_thread(tid)) {
- fprintf (stderr, "Error spawning thread\n");
- return;
- }
-
- if (B_OK != acquire_sem(initsem)) {
- fprintf (stderr, "Error acquiring semaphore\n");
- return;
- }
-
- delete_sem(initsem);
- return;
-}
-
-AppRunner::~AppRunner()
-{
- if (be_app) {
- if (be_app->Lock())
- be_app->Quit();
- delete be_app;
- be_app = NULL;
- }
-}
-
-// Make sure that the BApplication is initialized
-static AppRunner sAppRunner;
-
-struct beos_boilerplate_closure {
- BView* view;
- BBitmap* bitmap;
- BWindow* window;
-};
-
-// Test a real window
-static cairo_surface_t *
-_cairo_boilerplate_beos_create_surface (const char *name,
- cairo_content_t content,
- double width,
- double height,
- cairo_boilerplate_mode_t mode,
- void **closure)
-{
- float right = width ? width - 1 : 0;
- float bottom = height ? height - 1 : 0;
- BRect rect(0.0, 0.0, right, bottom);
- CairoTestWindow* wnd = new CairoTestWindow(rect, name);
-
- beos_boilerplate_closure* bclosure = new beos_boilerplate_closure;
- bclosure->view = wnd->View();
- bclosure->bitmap = NULL;
- bclosure->window = wnd;
-
- *closure = bclosure;
-
- return cairo_beos_surface_create(wnd->View());
-}
-
-static void
-_cairo_boilerplate_beos_cleanup (void *closure)
-{
- beos_boilerplate_closure* bclosure = reinterpret_cast<beos_boilerplate_closure*>(closure);
-
- bclosure->window->Lock();
- bclosure->window->Quit();
-
- delete bclosure;
-}
-
-// Test a bitmap
-static cairo_surface_t *
-_cairo_boilerplate_beos_create_surface_for_bitmap (const char *name,
- cairo_content_t content,
- double width,
- double height,
- cairo_boilerplate_mode_t mode,
- void **closure)
-{
- BRect rect(0.0, 0.0, width - 1, height - 1);
- color_space beosformat = (content == CAIRO_CONTENT_COLOR_ALPHA) ? B_RGBA32
- : B_RGB32;
- BBitmap* bmp = new BBitmap(rect, beosformat, true);
- BView* view = new BView(rect, "Cairo test view", B_FOLLOW_ALL_SIDES, 0);
- bmp->AddChild(view);
-
- beos_boilerplate_closure* bclosure = new beos_boilerplate_closure;
- bclosure->view = view;
- bclosure->bitmap = bmp;
- bclosure->window = NULL;
- *closure = bclosure;
-
- return cairo_beos_surface_create_for_bitmap(view, bmp);
-}
-
-static void
-_cairo_boilerplate_beos_cleanup_bitmap (void *closure)
-{
- beos_boilerplate_closure* bclosure = reinterpret_cast<beos_boilerplate_closure*>(closure);
-
- bclosure->bitmap->RemoveChild(bclosure->view);
-
-
- delete bclosure->view;
- delete bclosure->bitmap;
-
- delete bclosure;
-}
-
-static const cairo_boilerplate_target_t targets[] = {
- /* BeOS sometimes produces a slightly different image. Perhaps this
- * is related to the fact that it doesn't use premultiplied alpha...
- * Just ignore the small difference. */
- {
- "beos", "beos", NULL, NULL,
- CAIRO_SURFACE_TYPE_BEOS, CAIRO_CONTENT_COLOR, 1,
- _cairo_boilerplate_beos_create_surface,
- NULL, NULL,
- _cairo_boilerplate_get_image_surface,
- cairo_surface_write_to_png,
- _cairo_boilerplate_beos_cleanup
- },
- {
- "beos-bitmap", "beos", NULL, NULL,
- CAIRO_SURFACE_TYPE_BEOS, CAIRO_CONTENT_COLOR, 1,
- _cairo_boilerplate_beos_create_surface_for_bitmap,
- NULL, NULL,
- _cairo_boilerplate_get_image_surface,
- cairo_surface_write_to_png,
- _cairo_boilerplate_beos_cleanup_bitmap
- },
- {
- "beos-bitmap", "beos", NULL, NULL,
- CAIRO_SURFACE_TYPE_BEOS, CAIRO_CONTENT_COLOR_ALPHA, 1,
- _cairo_boilerplate_beos_create_surface_for_bitmap,
- NULL, NULL,
- _cairo_boilerplate_get_image_surface,
- cairo_surface_write_to_png,
- _cairo_boilerplate_beos_cleanup_bitmap
- },
-};
-CAIRO_BOILERPLATE (beos, targets)
-
diff --git a/build/Makefile.win32.features b/build/Makefile.win32.features
index 289dd5e5e..39efb7e6e 100644
--- a/build/Makefile.win32.features
+++ b/build/Makefile.win32.features
@@ -11,7 +11,6 @@ CAIRO_HAS_QUARTZ_IMAGE_SURFACE=0
CAIRO_HAS_WIN32_SURFACE=1
CAIRO_HAS_WIN32_FONT=1
CAIRO_HAS_OS2_SURFACE=0
-CAIRO_HAS_BEOS_SURFACE=0
CAIRO_HAS_DRM_SURFACE=0
CAIRO_HAS_GALLIUM_SURFACE=0
CAIRO_HAS_PNG_FUNCTIONS=1
diff --git a/build/Makefile.win32.features-h b/build/Makefile.win32.features-h
index 0105764ca..5fa7f0f16 100644
--- a/build/Makefile.win32.features-h
+++ b/build/Makefile.win32.features-h
@@ -38,9 +38,6 @@ endif
ifeq ($(CAIRO_HAS_OS2_SURFACE),1)
@echo "#define CAIRO_HAS_OS2_SURFACE 1" >> $(top_srcdir)/src/cairo-features.h
endif
-ifeq ($(CAIRO_HAS_BEOS_SURFACE),1)
- @echo "#define CAIRO_HAS_BEOS_SURFACE 1" >> $(top_srcdir)/src/cairo-features.h
-endif
ifeq ($(CAIRO_HAS_DRM_SURFACE),1)
@echo "#define CAIRO_HAS_DRM_SURFACE 1" >> $(top_srcdir)/src/cairo-features.h
endif
diff --git a/build/configure.ac.features b/build/configure.ac.features
index 2ce356ea5..338e22baa 100644
--- a/build/configure.ac.features
+++ b/build/configure.ac.features
@@ -85,14 +85,12 @@ CAIRO_MAKEFILE_ACCUMULATE(*,
[dnl
all_$1_headers = $($1_headers)
all_$1_private = $($1_private)
-all_$1_cxx_sources = $($1_cxx_sources)
all_$1_sources = $($1_sources)
])dnl
CAIRO_MAKEFILE_ACCUMULATE_FEATURE(*,*,*,!,
[dnl
all_$1_headers += $($1_$2_headers)
all_$1_private += $($1_$2_private)
-all_$1_cxx_sources += $($1_$2_cxx_sources)
all_$1_sources += $($1_$2_sources)]dnl
)dnl
@@ -101,14 +99,12 @@ CAIRO_MAKEFILE_ACCUMULATE(*,
[dnl
enabled_$1_headers = $($1_headers)
enabled_$1_private = $($1_private)
-enabled_$1_cxx_sources = $($1_cxx_sources)
enabled_$1_sources = $($1_sources)
])dnl
CAIRO_MAKEFILE_ACCUMULATE_FEATURE(*,yes,*,!,
[dnl
enabled_$1_headers += $($1_$2_headers)
enabled_$1_private += $($1_$2_private)
-enabled_$1_cxx_sources += $($1_$2_cxx_sources)
enabled_$1_sources += $($1_$2_sources)]dnl
)dnl
@@ -118,7 +114,6 @@ dnl Collect list of source files for all private features
CAIRO_MAKEFILE_ACCUMULATE_FEATURE(*,*,*,,
[dnl
all_$1_private += $($1_$2_private) $($1_$2_headers)
-all_$1_cxx_sources += $($1_$2_cxx_sources)
all_$1_sources += $($1_$2_sources)]dnl
)dnl
@@ -126,7 +121,6 @@ dnl Collect list of source files for enabled private features
CAIRO_MAKEFILE_ACCUMULATE_FEATURE(*,yes,*,,
[dnl
enabled_$1_private += $($1_$2_private) $($1_$2_headers)
-enabled_$1_cxx_sources += $($1_$2_cxx_sources)
enabled_$1_sources += $($1_$2_sources)]dnl
)dnl
@@ -386,7 +380,6 @@ AC_DEFUN([CAIRO_REPORT],
echo " OpenGL: $use_gl"
echo " OpenGL ES 2.0: $use_glesv2"
echo " OpenGL ES 3.0: $use_glesv3"
- echo " BeOS: $use_beos"
echo " DirectFB: $use_directfb"
echo " OpenVG: $use_vg"
echo " DRM: $use_drm"
diff --git a/build/configure.ac.tools b/build/configure.ac.tools
index 1fd2d3df8..7c11f0c9b 100644
--- a/build/configure.ac.tools
+++ b/build/configure.ac.tools
@@ -4,7 +4,6 @@ AC_PATH_PROG(XARGS, xargs)
AC_PROG_CC
AC_PROG_CPP
-AC_PROG_CXX dnl required for BeOS (and cannot be a conditional dependency)
AM_PROG_CC_C_O
AC_C_INLINE
diff --git a/configure.ac b/configure.ac
index ec04ea96c..8d5fb9637 100644
--- a/configure.ac
+++ b/configure.ac
@@ -252,22 +252,6 @@ CAIRO_ENABLE_SURFACE_BACKEND(os2, OS/2, no, [
dnl ===========================================================================
-CAIRO_ENABLE_SURFACE_BACKEND(beos, BeOS/Zeta, no, [
- case "$host" in
- *-*-beos)
- beos_LIBS=""
- dnl Add libbe and libzeta if available
- AC_CHECK_LIB(be,main,beos_LIBS="$beos_LIBS -lbe")
- AC_CHECK_LIB(zeta,main,beos_LIBS="$beos_LIBS -lzeta")
- ;;
- *)
- use_beos="no (requires a BeOS platform)"
- ;;
- esac
-])
-
-dnl ===========================================================================
-
CAIRO_ENABLE_SURFACE_BACKEND(drm, DRM, no, [
dnl Keep in sync with meson.build!
drm_REQUIRES="libudev >= 136, libdrm >= 2.4"
@@ -868,14 +852,6 @@ fi
dnl ===========================================================================
-dnl Extra stuff we need to do when building C++ code
-need_cxx="no"
-AS_IF([test "x$use_beos" = "xyes"], [need_cxx="yes"])
-
-AM_CONDITIONAL(BUILD_CXX, test "x$need_cxx" = "xyes")
-
-dnl ===========================================================================
-
# We use GTK+ for some utility/debugging tools
PKG_CHECK_MODULES(gtk, "gtk+-2.0",have_gtk=yes, have_gtk=no)
AM_CONDITIONAL(HAVE_GTK, test "x$have_gtk" = "xyes")
diff --git a/doc/public/cairo-docs.xml b/doc/public/cairo-docs.xml
index d6d152dcf..96dabab4f 100644
--- a/doc/public/cairo-docs.xml
+++ b/doc/public/cairo-docs.xml
@@ -40,7 +40,6 @@
<xi:include href="xml/cairo-ps.xml"/>
<xi:include href="xml/cairo-recording.xml"/>
<xi:include href="xml/cairo-win32.xml"/>
- <!--xi:include href="xml/cairo-beos.xml"/-->
<xi:include href="xml/cairo-svg.xml"/>
<xi:include href="xml/cairo-quartz.xml" />
<!--xi:include href="xml/cairo-quartz-image.xml"/-->
diff --git a/doc/public/language-bindings.xml b/doc/public/language-bindings.xml
index ce437ef53..a00a00448 100644
--- a/doc/public/language-bindings.xml
+++ b/doc/public/language-bindings.xml
@@ -561,7 +561,6 @@ cairo_surface_t
cairo_atsui_surface_t
cairo_win32_surface_t
cairo_xlib_surface_t
- cairo_beos_surface_t
</programlisting>
<para>
Unlike patterns, the constructors and methods on these types are
diff --git a/meson.build b/meson.build
index 74492dcfa..9d5b82b37 100644
--- a/meson.build
+++ b/meson.build
@@ -1,4 +1,4 @@
-project('cairo', 'c', 'cpp',
+project('cairo', 'c',
meson_version: '>= 0.56.0',
version: run_command(find_program('version.py'), check: true).stdout().strip(),
default_options: ['warning_level=2'],
@@ -522,8 +522,6 @@ endif
# Not even trying to port gallium as it depends on drm
-# Not porting BEOS or OS/2 backends either, meson doesn't support those
-
# GL / GLESV2 / GLESV3 are mutually exclusive
gl_backend = get_option('gl-backend')
need_egl_functions = false
@@ -1000,7 +998,6 @@ summary({
'OpenGL': feature_conf.get('CAIRO_HAS_GL_SURFACE', 0) == 1,
'OpenGL ES 2.0': feature_conf.get('CAIRO_HAS_GLESV2_SURFACE', 0) == 1,
'OpenGL ES 3.0': feature_conf.get('CAIRO_HAS_GLESV3_SURFACE', 0) == 1,
- 'BeOS': false,
'DirectFB': feature_conf.get('CAIRO_HAS_DIRECTFB_SURFACE', 0) == 1,
'OpenVG': feature_conf.get('CAIRO_HAS_VG_SURFACE', 0) == 1,
'DRM': feature_conf.get('CAIRO_HAS_DRM_SURFACE', 0) == 1,
diff --git a/src/Makefile.am b/src/Makefile.am
index 23ba1861d..c03ef71a8 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -22,32 +22,14 @@ cairoinclude_HEADERS = $(enabled_cairo_headers)
lib_LTLIBRARIES = libcairo.la
-if BUILD_CXX
-cairo_cxx_lib = libcairo_cxx.la
-else
-cairo_cxx_lib =
-endif
-
-noinst_LTLIBRARIES = $(cairo_cxx_lib)
-libcairo_cxx_la_SOURCES = \
- $(enabled_cairo_headers) \
- $(enabled_cairo_private) \
- $(enabled_cairo_cxx_sources) \
- $(NULL)
-libcairo_cxx_la_LDFLAGS = $(AM_LDFLAGS) $(export_symbols)
-libcairo_cxx_la_LIBADD = $(CAIRO_LIBS)
-libcairo_cxx_la_DEPENDENCIES = $(cairo_def_dependency)
-
-
libcairo_la_SOURCES = \
$(enabled_cairo_headers) \
$(enabled_cairo_private) \
$(enabled_cairo_sources) \
$(NULL)
libcairo_la_LDFLAGS = $(AM_LDFLAGS) -version-info $(CAIRO_LIBTOOL_VERSION_INFO) -no-undefined $(export_symbols)
-libcairo_la_LIBADD = $(CAIRO_LIBS) \
- $(cairo_cxx_lib)
-libcairo_la_DEPENDENCIES = $(cairo_def_dependency) $(cairo_cxx_lib)
+libcairo_la_LIBADD = $(CAIRO_LIBS)
+libcairo_la_DEPENDENCIES = $(cairo_def_dependency)
# Special headers
nodist_cairoinclude_HEADERS = cairo-features.h
diff --git a/src/Makefile.am.analysis b/src/Makefile.am.analysis
index fab4cf7a5..63bb844df 100644
--- a/src/Makefile.am.analysis
+++ b/src/Makefile.am.analysis
@@ -2,7 +2,7 @@
SPARSE = sparse
sparse:
@echo Checking enabled sources with sparse checker
- @status=true; for f in $(enabled_cairo_sources) $(enabled_cairo_cxx_sources); do \
+ @status=true; for f in $(enabled_cairo_sources); do \
echo $(SPARSE) $(PREPROCESS_ARGS) $(srcdir)/$$f; \
$(SPARSE) $(PREPROCESS_ARGS) $(srcdir)/$$f || status=false; \
done; $$status
@@ -10,7 +10,7 @@ sparse:
SPLINT = splint -badflag
splint:
@echo Checking enabled sources with splint checker
- @status=true; for f in $(enabled_cairo_sources) $(enabled_cairo_cxx_sources); do \
+ @status=true; for f in $(enabled_cairo_sources); do \
echo $(SPLINT) $(PREPROCESS_ARGS) $(srcdir)/$$f; \
$(SPLINT) $(PREPROCESS_ARGS) $(srcdir)/$$f || status=false; \
done; $$status
diff --git a/src/Makefile.sources b/src/Makefile.sources
index 127afba52..bf3bb87df 100644
--- a/src/Makefile.sources
+++ b/src/Makefile.sources
@@ -365,11 +365,6 @@ cairo_os2_headers = cairo-os2.h
cairo_os2_private = cairo-os2-private.h
cairo_os2_sources = cairo-os2-surface.c
-# automake is stupid enough to always use c++ linker if we enable the
-# following lines, even if beos surface is not enabled. Disable it for now.
-cairo_beos_headers = cairo-beos.h
-cairo_beos_cxx_sources = cairo-beos-surface.cpp
-
cairo_gl_headers = cairo-gl.h
cairo_gl_private = cairo-gl-private.h \
cairo-gl-dispatch-private.h \
diff --git a/src/Makefile.win32.features b/src/Makefile.win32.features
index 7b630a06c..83d60ef0f 100644
--- a/src/Makefile.win32.features
+++ b/src/Makefile.win32.features
@@ -10,12 +10,10 @@ supported_cairo_headers = $(cairo_headers)
unsupported_cairo_headers =
all_cairo_headers = $(cairo_headers)
all_cairo_private = $(cairo_private)
-all_cairo_cxx_sources = $(cairo_cxx_sources)
all_cairo_sources = $(cairo_sources)
enabled_cairo_headers = $(cairo_headers)
enabled_cairo_private = $(cairo_private)
-enabled_cairo_cxx_sources = $(cairo_cxx_sources)
enabled_cairo_sources = $(cairo_sources)
all_cairo_pkgconf = cairo.pc
@@ -24,12 +22,10 @@ enabled_cairo_pkgconf = cairo.pc
supported_cairo_headers += $(cairo_xlib_headers)
all_cairo_headers += $(cairo_xlib_headers)
all_cairo_private += $(cairo_xlib_private)
-all_cairo_cxx_sources += $(cairo_xlib_cxx_sources)
all_cairo_sources += $(cairo_xlib_sources)
ifeq ($(CAIRO_HAS_XLIB_SURFACE),1)
enabled_cairo_headers += $(cairo_xlib_headers)
enabled_cairo_private += $(cairo_xlib_private)
-enabled_cairo_cxx_sources += $(cairo_xlib_cxx_sources)
enabled_cairo_sources += $(cairo_xlib_sources)
endif
all_cairo_pkgconf += cairo-xlib.pc
@@ -40,12 +36,10 @@ endif
supported_cairo_headers += $(cairo_xlib_xrender_headers)
all_cairo_headers += $(cairo_xlib_xrender_headers)
all_cairo_private += $(cairo_xlib_xrender_private)
-all_cairo_cxx_sources += $(cairo_xlib_xrender_cxx_sources)
all_cairo_sources += $(cairo_xlib_xrender_sources)
ifeq ($(CAIRO_HAS_XLIB_XRENDER_SURFACE),1)
enabled_cairo_headers += $(cairo_xlib_xrender_headers)
enabled_cairo_private += $(cairo_xlib_xrender_private)
-enabled_cairo_cxx_sources += $(cairo_xlib_xrender_cxx_sources)
enabled_cairo_sources += $(cairo_xlib_xrender_sources)
endif
all_cairo_pkgconf += cairo-xlib-xrender.pc
@@ -56,12 +50,10 @@ endif
supported_cairo_headers += $(cairo_xcb_headers)
all_cairo_headers += $(cairo_xcb_headers)
all_cairo_private += $(cairo_xcb_private)
-all_cairo_cxx_sources += $(cairo_xcb_cxx_sources)
all_cairo_sources += $(cairo_xcb_sources)
ifeq ($(CAIRO_HAS_XCB_SURFACE),1)
enabled_cairo_headers += $(cairo_xcb_headers)
enabled_cairo_private += $(cairo_xcb_private)
-enabled_cairo_cxx_sources += $(cairo_xcb_cxx_sources)
enabled_cairo_sources += $(cairo_xcb_sources)
endif
all_cairo_pkgconf += cairo-xcb.pc
@@ -72,12 +64,10 @@ endif
unsupported_cairo_headers += $(cairo_xlib_xcb_headers)
all_cairo_headers += $(cairo_xlib_xcb_headers)
all_cairo_private += $(cairo_xlib_xcb_private)
-all_cairo_cxx_sources += $(cairo_xlib_xcb_cxx_sources)
all_cairo_sources += $(cairo_xlib_xcb_sources)
ifeq ($(CAIRO_HAS_XLIB_XCB_FUNCTIONS),1)
enabled_cairo_headers += $(cairo_xlib_xcb_headers)
enabled_cairo_private += $(cairo_xlib_xcb_private)
-enabled_cairo_cxx_sources += $(cairo_xlib_xcb_cxx_sources)
enabled_cairo_sources += $(cairo_xlib_xcb_sources)
endif
all_cairo_pkgconf += cairo-xlib-xcb.pc
@@ -88,12 +78,10 @@ endif
supported_cairo_headers += $(cairo_xcb_shm_headers)
all_cairo_headers += $(cairo_xcb_shm_headers)
all_cairo_private += $(cairo_xcb_shm_private)
-all_cairo_cxx_sources += $(cairo_xcb_shm_cxx_sources)
all_cairo_sources += $(cairo_xcb_shm_sources)
ifeq ($(CAIRO_HAS_XCB_SHM_FUNCTIONS),1)
enabled_cairo_headers += $(cairo_xcb_shm_headers)
enabled_cairo_private += $(cairo_xcb_shm_private)
-enabled_cairo_cxx_sources += $(cairo_xcb_shm_cxx_sources)
enabled_cairo_sources += $(cairo_xcb_shm_sources)
endif
all_cairo_pkgconf += cairo-xcb-shm.pc
@@ -104,12 +92,10 @@ endif
supported_cairo_headers += $(cairo_quartz_headers)
all_cairo_headers += $(cairo_quartz_headers)
all_cairo_private += $(cairo_quartz_private)
-all_cairo_cxx_sources += $(cairo_quartz_cxx_sources)
all_cairo_sources += $(cairo_quartz_sources)
ifeq ($(CAIRO_HAS_QUARTZ_SURFACE),1)
enabled_cairo_headers += $(cairo_quartz_headers)
enabled_cairo_private += $(cairo_quartz_private)
-enabled_cairo_cxx_sources += $(cairo_quartz_cxx_sources)
enabled_cairo_sources += $(cairo_quartz_sources)
endif
all_cairo_pkgconf += cairo-quartz.pc
@@ -120,12 +106,10 @@ endif
supported_cairo_headers += $(cairo_quartz_font_headers)
all_cairo_headers += $(cairo_quartz_font_headers)
all_cairo_private += $(cairo_quartz_font_private)
-all_cairo_cxx_sources += $(cairo_quartz_font_cxx_sources)
all_cairo_sources += $(cairo_quartz_font_sources)
ifeq ($(CAIRO_HAS_QUARTZ_FONT),1)
enabled_cairo_headers += $(cairo_quartz_font_headers)
enabled_cairo_private += $(cairo_quartz_font_private)
-enabled_cairo_cxx_sources += $(cairo_quartz_font_cxx_sources)
enabled_cairo_sources += $(cairo_quartz_font_sources)
endif
all_cairo_pkgconf += cairo-quartz-font.pc
@@ -136,12 +120,10 @@ endif
unsupported_cairo_headers += $(cairo_quartz_image_headers)
all_cairo_headers += $(cairo_quartz_image_headers)
all_cairo_private += $(cairo_quartz_image_private)
-all_cairo_cxx_sources += $(cairo_quartz_image_cxx_sources)
all_cairo_sources += $(cairo_quartz_image_sources)
ifeq ($(CAIRO_HAS_QUARTZ_IMAGE_SURFACE),1)
enabled_cairo_headers += $(cairo_quartz_image_headers)
enabled_cairo_private += $(cairo_quartz_image_private)
-enabled_cairo_cxx_sources += $(cairo_quartz_image_cxx_sources)
enabled_cairo_sources += $(cairo_quartz_image_sources)
endif
all_cairo_pkgconf += cairo-quartz-image.pc
@@ -152,12 +134,10 @@ endif
supported_cairo_headers += $(cairo_win32_headers)
all_cairo_headers += $(cairo_win32_headers)
all_cairo_private += $(cairo_win32_private)
-all_cairo_cxx_sources += $(cairo_win32_cxx_sources)
all_cairo_sources += $(cairo_win32_sources)
ifeq ($(CAIRO_HAS_WIN32_SURFACE),1)
enabled_cairo_headers += $(cairo_win32_headers)
enabled_cairo_private += $(cairo_win32_private)
-enabled_cairo_cxx_sources += $(cairo_win32_cxx_sources)
enabled_cairo_sources += $(cairo_win32_sources)
endif
all_cairo_pkgconf += cairo-win32.pc
@@ -168,12 +148,10 @@ endif
supported_cairo_headers += $(cairo_win32_font_headers)
all_cairo_headers += $(cairo_win32_font_headers)
all_cairo_private += $(cairo_win32_font_private)
-all_cairo_cxx_sources += $(cairo_win32_font_cxx_sources)
all_cairo_sources += $(cairo_win32_font_sources)
ifeq ($(CAIRO_HAS_WIN32_FONT),1)
enabled_cairo_headers += $(cairo_win32_font_headers)
enabled_cairo_private += $(cairo_win32_font_private)
-enabled_cairo_cxx_sources += $(cairo_win32_font_cxx_sources)
enabled_cairo_sources += $(cairo_win32_font_sources)
endif
all_cairo_pkgconf += cairo-win32-font.pc
@@ -184,12 +162,10 @@ endif
unsupported_cairo_headers += $(cairo_os2_headers)
all_cairo_headers += $(cairo_os2_headers)
all_cairo_private += $(cairo_os2_private)
-all_cairo_cxx_sources += $(cairo_os2_cxx_sources)
all_cairo_sources += $(cairo_os2_sources)
ifeq ($(CAIRO_HAS_OS2_SURFACE),1)
enabled_cairo_headers += $(cairo_os2_headers)
enabled_cairo_private += $(cairo_os2_private)
-enabled_cairo_cxx_sources += $(cairo_os2_cxx_sources)
enabled_cairo_sources += $(cairo_os2_sources)
endif
all_cairo_pkgconf += cairo-os2.pc
@@ -197,31 +173,13 @@ ifeq ($(CAIRO_HAS_OS2_SURFACE),1)
enabled_cairo_pkgconf += cairo-os2.pc
endif
-unsupported_cairo_headers += $(cairo_beos_headers)
-all_cairo_headers += $(cairo_beos_headers)
-all_cairo_private += $(cairo_beos_private)
-all_cairo_cxx_sources += $(cairo_beos_cxx_sources)
-all_cairo_sources += $(cairo_beos_sources)
-ifeq ($(CAIRO_HAS_BEOS_SURFACE),1)
-enabled_cairo_headers += $(cairo_beos_headers)
-enabled_cairo_private += $(cairo_beos_private)
-enabled_cairo_cxx_sources += $(cairo_beos_cxx_sources)
-enabled_cairo_sources += $(cairo_beos_sources)
-endif
-all_cairo_pkgconf += cairo-beos.pc
-ifeq ($(CAIRO_HAS_BEOS_SURFACE),1)
-enabled_cairo_pkgconf += cairo-beos.pc
-endif
-
unsupported_cairo_headers += $(cairo_drm_headers)
all_cairo_headers += $(cairo_drm_headers)
all_cairo_private += $(cairo_drm_private)
-all_cairo_cxx_sources += $(cairo_drm_cxx_sources)
all_cairo_sources += $(cairo_drm_sources)
ifeq ($(CAIRO_HAS_DRM_SURFACE),1)
enabled_cairo_headers += $(cairo_drm_headers)
enabled_cairo_private += $(cairo_drm_private)
-enabled_cairo_cxx_sources += $(cairo_drm_cxx_sources)
enabled_cairo_sources += $(cairo_drm_sources)
endif
all_cairo_pkgconf += cairo-drm.pc
@@ -232,12 +190,10 @@ endif
unsupported_cairo_headers += $(cairo_gallium_headers)
all_cairo_headers += $(cairo_gallium_headers)
all_cairo_private += $(cairo_gallium_private)
-all_cairo_cxx_sources += $(cairo_gallium_cxx_sources)
all_cairo_sources += $(cairo_gallium_sources)
ifeq ($(CAIRO_HAS_GALLIUM_SURFACE),1)
enabled_cairo_headers += $(cairo_gallium_headers)
enabled_cairo_private += $(cairo_gallium_private)
-enabled_cairo_cxx_sources += $(cairo_gallium_cxx_sources)
enabled_cairo_sources += $(cairo_gallium_sources)
endif
all_cairo_pkgconf += cairo-gallium.pc
@@ -248,12 +204,10 @@ endif
supported_cairo_headers += $(cairo_png_headers)
all_cairo_headers += $(cairo_png_headers)
all_cairo_private += $(cairo_png_private)
-all_cairo_cxx_sources += $(cairo_png_cxx_sources)
all_cairo_sources += $(cairo_png_sources)
ifeq ($(CAIRO_HAS_PNG_FUNCTIONS),1)
enabled_cairo_headers += $(cairo_png_headers)
enabled_cairo_private += $(cairo_png_private)
-enabled_cairo_cxx_sources += $(cairo_png_cxx_sources)
enabled_cairo_sources += $(cairo_png_sources)
endif
all_cairo_pkgconf += cairo-png.pc
@@ -264,12 +218,10 @@ endif
unsupported_cairo_headers += $(cairo_gl_headers)
all_cairo_headers += $(cairo_gl_headers)
all_cairo_private += $(cairo_gl_private)
-all_cairo_cxx_sources += $(cairo_gl_cxx_sources)
all_cairo_sources += $(cairo_gl_sources)
ifeq ($(CAIRO_HAS_GL_SURFACE),1)
enabled_cairo_headers += $(cairo_gl_headers)
enabled_cairo_private += $(cairo_gl_private)
-enabled_cairo_cxx_sources += $(cairo_gl_cxx_sources)
enabled_cairo_sources += $(cairo_gl_sources)
endif
all_cairo_pkgconf += cairo-gl.pc
@@ -280,12 +232,10 @@ endif
unsupported_cairo_headers += $(cairo_glesv2_headers)
all_cairo_headers += $(cairo_glesv2_headers)
all_cairo_private += $(cairo_glesv2_private)
-all_cairo_cxx_sources += $(cairo_glesv2_cxx_sources)
all_cairo_sources += $(cairo_glesv2_sources)
ifeq ($(CAIRO_HAS_GLESV2_SURFACE),1)
enabled_cairo_headers += $(cairo_glesv2_headers)
enabled_cairo_private += $(cairo_glesv2_private)
-enabled_cairo_cxx_sources += $(cairo_glesv2_cxx_sources)
enabled_cairo_sources += $(cairo_glesv2_sources)
endif
all_cairo_pkgconf += cairo-glesv2.pc
@@ -296,12 +246,10 @@ endif
unsupported_cairo_headers += $(cairo_glesv3_headers)
all_cairo_headers += $(cairo_glesv3_headers)
all_cairo_private += $(cairo_glesv3_private)
-all_cairo_cxx_sources += $(cairo_glesv3_cxx_sources)
all_cairo_sources += $(cairo_glesv3_sources)
ifeq ($(CAIRO_HAS_GLESV3_SURFACE),1)
enabled_cairo_headers += $(cairo_glesv3_headers)
enabled_cairo_private += $(cairo_glesv3_private)
-enabled_cairo_cxx_sources += $(cairo_glesv3_cxx_sources)
enabled_cairo_sources += $(cairo_glesv3_sources)
endif
all_cairo_pkgconf += cairo-glesv3.pc
@@ -312,12 +260,10 @@ endif
unsupported_cairo_headers += $(cairo_cogl_headers)
all_cairo_headers += $(cairo_cogl_headers)
all_cairo_private += $(cairo_cogl_private)
-all_cairo_cxx_sources += $(cairo_cogl_cxx_sources)
all_cairo_sources += $(cairo_cogl_sources)
ifeq ($(CAIRO_HAS_COGL_SURFACE),1)
enabled_cairo_headers += $(cairo_cogl_headers)
enabled_cairo_private += $(cairo_cogl_private)
-enabled_cairo_cxx_sources += $(cairo_cogl_cxx_sources)
enabled_cairo_sources += $(cairo_cogl_sources)
endif
all_cairo_pkgconf += cairo-cogl.pc
@@ -328,12 +274,10 @@ endif
unsupported_cairo_headers += $(cairo_directfb_headers)
all_cairo_headers += $(cairo_directfb_headers)
all_cairo_private += $(cairo_directfb_private)
-all_cairo_cxx_sources += $(cairo_directfb_cxx_sources)
all_cairo_sources += $(cairo_directfb_sources)
ifeq ($(CAIRO_HAS_DIRECTFB_SURFACE),1)
enabled_cairo_headers += $(cairo_directfb_headers)
enabled_cairo_private += $(cairo_directfb_private)
-enabled_cairo_cxx_sources += $(cairo_directfb_cxx_sources)
enabled_cairo_sources += $(cairo_directfb_sources)
endif
all_cairo_pkgconf += cairo-directfb.pc
@@ -344,12 +288,10 @@ endif
unsupported_cairo_headers += $(cairo_vg_headers)
all_cairo_headers += $(cairo_vg_headers)
all_cairo_private += $(cairo_vg_private)
-all_cairo_cxx_sources += $(cairo_vg_cxx_sources)
all_cairo_sources += $(cairo_vg_sources)
ifeq ($(CAIRO_HAS_VG_SURFACE),1)
enabled_cairo_headers += $(cairo_vg_headers)
enabled_cairo_private += $(cairo_vg_private)
-enabled_cairo_cxx_sources += $(cairo_vg_cxx_sources)
enabled_cairo_sources += $(cairo_vg_sources)
endif
all_cairo_pkgconf += cairo-vg.pc
@@ -360,12 +302,10 @@ endif
supported_cairo_headers += $(cairo_egl_headers)
all_cairo_headers += $(cairo_egl_headers)
all_cairo_private += $(cairo_egl_private)
-all_cairo_cxx_sources += $(cairo_egl_cxx_sources)
all_cairo_sources += $(cairo_egl_sources)
ifeq ($(CAIRO_HAS_EGL_FUNCTIONS),1)
enabled_cairo_headers += $(cairo_egl_headers)
enabled_cairo_private += $(cairo_egl_private)
-enabled_cairo_cxx_sources += $(cairo_egl_cxx_sources)
enabled_cairo_sources += $(cairo_egl_sources)
endif
all_cairo_pkgconf += cairo-egl.pc
@@ -376,12 +316,10 @@ endif
supported_cairo_headers += $(cairo_glx_headers)
all_cairo_headers += $(cairo_glx_headers)
all_cairo_private += $(cairo_glx_private)
-all_cairo_cxx_sources += $(cairo_glx_cxx_sources)
all_cairo_sources += $(cairo_glx_sources)
ifeq ($(CAIRO_HAS_GLX_FUNCTIONS),1)
enabled_cairo_headers += $(cairo_glx_headers)
enabled_cairo_private += $(cairo_glx_private)
-enabled_cairo_cxx_sources += $(cairo_glx_cxx_sources)
enabled_cairo_sources += $(cairo_glx_sources)
endif
all_cairo_pkgconf += cairo-glx.pc
@@ -392,12 +330,10 @@ endif
supported_cairo_headers += $(cairo_wgl_headers)
all_cairo_headers += $(cairo_wgl_headers)
all_cairo_private += $(cairo_wgl_private)
-all_cairo_cxx_sources += $(cairo_wgl_cxx_sources)
all_cairo_sources += $(cairo_wgl_sources)
ifeq ($(CAIRO_HAS_WGL_FUNCTIONS),1)
enabled_cairo_headers += $(cairo_wgl_headers)
enabled_cairo_private += $(cairo_wgl_private)
-enabled_cairo_cxx_sources += $(cairo_wgl_cxx_sources)
enabled_cairo_sources += $(cairo_wgl_sources)
endif
all_cairo_pkgconf += cairo-wgl.pc
@@ -408,12 +344,10 @@ endif
supported_cairo_headers += $(cairo_script_headers)
all_cairo_headers += $(cairo_script_headers)
all_cairo_private += $(cairo_script_private)
-all_cairo_cxx_sources += $(cairo_script_cxx_sources)
all_cairo_sources += $(cairo_script_sources)
ifeq ($(CAIRO_HAS_SCRIPT_SURFACE),1)
enabled_cairo_headers += $(cairo_script_headers)
enabled_cairo_private += $(cairo_script_private)
-enabled_cairo_cxx_sources += $(cairo_script_cxx_sources)
enabled_cairo_sources += $(cairo_script_sources)
endif
all_cairo_pkgconf += cairo-script.pc
@@ -424,12 +358,10 @@ endif
supported_cairo_headers += $(cairo_ft_headers)
all_cairo_headers += $(cairo_ft_headers)
all_cairo_private += $(cairo_ft_private)
-all_cairo_cxx_sources += $(cairo_ft_cxx_sources)
all_cairo_sources += $(cairo_ft_sources)
ifeq ($(CAIRO_HAS_FT_FONT),1)
enabled_cairo_headers += $(cairo_ft_headers)
enabled_cairo_private += $(cairo_ft_private)
-enabled_cairo_cxx_sources += $(cairo_ft_cxx_sources)
enabled_cairo_sources += $(cairo_ft_sources)
endif
all_cairo_pkgconf += cairo-ft.pc
@@ -440,12 +372,10 @@ endif
supported_cairo_headers += $(cairo_fc_headers)
all_cairo_headers += $(cairo_fc_headers)
all_cairo_private += $(cairo_fc_private)
-all_cairo_cxx_sources += $(cairo_fc_cxx_sources)
all_cairo_sources += $(cairo_fc_sources)
ifeq ($(CAIRO_HAS_FC_FONT),1)
enabled_cairo_headers += $(cairo_fc_headers)
enabled_cairo_private += $(cairo_fc_private)
-enabled_cairo_cxx_sources += $(cairo_fc_cxx_sources)
enabled_cairo_sources += $(cairo_fc_sources)
endif
all_cairo_pkgconf += cairo-fc.pc
@@ -456,12 +386,10 @@ endif
supported_cairo_headers += $(cairo_ps_headers)
all_cairo_headers += $(cairo_ps_headers)
all_cairo_private += $(cairo_ps_private)
-all_cairo_cxx_sources += $(cairo_ps_cxx_sources)
all_cairo_sources += $(cairo_ps_sources)
ifeq ($(CAIRO_HAS_PS_SURFACE),1)
enabled_cairo_headers += $(cairo_ps_headers)
enabled_cairo_private += $(cairo_ps_private)
-enabled_cairo_cxx_sources += $(cairo_ps_cxx_sources)
enabled_cairo_sources += $(cairo_ps_sources)
endif
all_cairo_pkgconf += cairo-ps.pc
@@ -472,12 +400,10 @@ endif
supported_cairo_headers += $(cairo_pdf_headers)
all_cairo_headers += $(cairo_pdf_headers)
all_cairo_private += $(cairo_pdf_private)
-all_cairo_cxx_sources += $(cairo_pdf_cxx_sources)
all_cairo_sources += $(cairo_pdf_sources)
ifeq ($(CAIRO_HAS_PDF_SURFACE),1)
enabled_cairo_headers += $(cairo_pdf_headers)
enabled_cairo_private += $(cairo_pdf_private)
-enabled_cairo_cxx_sources += $(cairo_pdf_cxx_sources)
enabled_cairo_sources += $(cairo_pdf_sources)
endif
all_cairo_pkgconf += cairo-pdf.pc
@@ -488,12 +414,10 @@ endif
supported_cairo_headers += $(cairo_svg_headers)
all_cairo_headers += $(cairo_svg_headers)
all_cairo_private += $(cairo_svg_private)
-all_cairo_cxx_sources += $(cairo_svg_cxx_sources)
all_cairo_sources += $(cairo_svg_sources)
ifeq ($(CAIRO_HAS_SVG_SURFACE),1)
enabled_cairo_headers += $(cairo_svg_headers)
enabled_cairo_private += $(cairo_svg_private)
-enabled_cairo_cxx_sources += $(cairo_svg_cxx_sources)
enabled_cairo_sources += $(cairo_svg_sources)
endif
all_cairo_pkgconf += cairo-svg.pc
@@ -502,63 +426,51 @@ enabled_cairo_pkgconf += cairo-svg.pc
endif
all_cairo_private += $(cairo_test_surfaces_private) $(cairo_test_surfaces_headers)
-all_cairo_cxx_sources += $(cairo_test_surfaces_cxx_sources)
all_cairo_sources += $(cairo_test_surfaces_sources)
ifeq ($(CAIRO_HAS_TEST_SURFACES),1)
enabled_cairo_private += $(cairo_test_surfaces_private) $(cairo_test_surfaces_headers)
-enabled_cairo_cxx_sources += $(cairo_test_surfaces_cxx_sources)
enabled_cairo_sources += $(cairo_test_surfaces_sources)
endif
supported_cairo_headers += $(cairo_image_headers)
all_cairo_headers += $(cairo_image_headers)
all_cairo_private += $(cairo_image_private)
-all_cairo_cxx_sources += $(cairo_image_cxx_sources)
all_cairo_sources += $(cairo_image_sources)
enabled_cairo_headers += $(cairo_image_headers)
enabled_cairo_private += $(cairo_image_private)
-enabled_cairo_cxx_sources += $(cairo_image_cxx_sources)
enabled_cairo_sources += $(cairo_image_sources)
supported_cairo_headers += $(cairo_mime_headers)
all_cairo_headers += $(cairo_mime_headers)
all_cairo_private += $(cairo_mime_private)
-all_cairo_cxx_sources += $(cairo_mime_cxx_sources)
all_cairo_sources += $(cairo_mime_sources)
enabled_cairo_headers += $(cairo_mime_headers)
enabled_cairo_private += $(cairo_mime_private)
-enabled_cairo_cxx_sources += $(cairo_mime_cxx_sources)
enabled_cairo_sources += $(cairo_mime_sources)
supported_cairo_headers += $(cairo_recording_headers)
all_cairo_headers += $(cairo_recording_headers)
all_cairo_private += $(cairo_recording_private)
-all_cairo_cxx_sources += $(cairo_recording_cxx_sources)
all_cairo_sources += $(cairo_recording_sources)
enabled_cairo_headers += $(cairo_recording_headers)
enabled_cairo_private += $(cairo_recording_private)
-enabled_cairo_cxx_sources += $(cairo_recording_cxx_sources)
enabled_cairo_sources += $(cairo_recording_sources)
supported_cairo_headers += $(cairo_observer_headers)
all_cairo_headers += $(cairo_observer_headers)
all_cairo_private += $(cairo_observer_private)
-all_cairo_cxx_sources += $(cairo_observer_cxx_sources)
all_cairo_sources += $(cairo_observer_sources)
enabled_cairo_headers += $(cairo_observer_headers)
enabled_cairo_private += $(cairo_observer_private)
-enabled_cairo_cxx_sources += $(cairo_observer_cxx_sources)
enabled_cairo_sources += $(cairo_observer_sources)
unsupported_cairo_headers += $(cairo_tee_headers)
all_cairo_headers += $(cairo_tee_headers)
all_cairo_private += $(cairo_tee_private)
-all_cairo_cxx_sources += $(cairo_tee_cxx_sources)
all_cairo_sources += $(cairo_tee_sources)
ifeq ($(CAIRO_HAS_TEE_SURFACE),1)
enabled_cairo_headers += $(cairo_tee_headers)
enabled_cairo_private += $(cairo_tee_private)
-enabled_cairo_cxx_sources += $(cairo_tee_cxx_sources)
enabled_cairo_sources += $(cairo_tee_sources)
endif
all_cairo_pkgconf += cairo-tee.pc
@@ -569,12 +481,10 @@ endif
unsupported_cairo_headers += $(cairo_xml_headers)
all_cairo_headers += $(cairo_xml_headers)
all_cairo_private += $(cairo_xml_private)
-all_cairo_cxx_sources += $(cairo_xml_cxx_sources)
all_cairo_sources += $(cairo_xml_sources)
ifeq ($(CAIRO_HAS_XML_SURFACE),1)
enabled_cairo_headers += $(cairo_xml_headers)
enabled_cairo_private += $(cairo_xml_private)
-enabled_cairo_cxx_sources += $(cairo_xml_cxx_sources)
enabled_cairo_sources += $(cairo_xml_sources)
endif
all_cairo_pkgconf += cairo-xml.pc
@@ -585,31 +495,25 @@ endif
supported_cairo_headers += $(cairo_user_headers)
all_cairo_headers += $(cairo_user_headers)
all_cairo_private += $(cairo_user_private)
-all_cairo_cxx_sources += $(cairo_user_cxx_sources)
all_cairo_sources += $(cairo_user_sources)
enabled_cairo_headers += $(cairo_user_headers)
enabled_cairo_private += $(cairo_user_private)
-enabled_cairo_cxx_sources += $(cairo_user_cxx_sources)
enabled_cairo_sources += $(cairo_user_sources)
all_cairo_private += $(cairo_pthread_private) $(cairo_pthread_headers)
-all_cairo_cxx_sources += $(cairo_pthread_cxx_sources)
all_cairo_sources += $(cairo_pthread_sources)
ifeq ($(CAIRO_HAS_PTHREAD),1)
enabled_cairo_private += $(cairo_pthread_private) $(cairo_pthread_headers)
-enabled_cairo_cxx_sources += $(cairo_pthread_cxx_sources)
enabled_cairo_sources += $(cairo_pthread_sources)
endif
supported_cairo_headers += $(cairo_gobject_headers)
all_cairo_headers += $(cairo_gobject_headers)
all_cairo_private += $(cairo_gobject_private)
-all_cairo_cxx_sources += $(cairo_gobject_cxx_sources)
all_cairo_sources += $(cairo_gobject_sources)
ifeq ($(CAIRO_HAS_GOBJECT_FUNCTIONS),1)
enabled_cairo_headers += $(cairo_gobject_headers)
enabled_cairo_private += $(cairo_gobject_private)
-enabled_cairo_cxx_sources += $(cairo_gobject_cxx_sources)
enabled_cairo_sources += $(cairo_gobject_sources)
endif
all_cairo_pkgconf += cairo-gobject.pc
@@ -618,28 +522,22 @@ enabled_cairo_pkgconf += cairo-gobject.pc
endif
all_cairo_private += $(cairo_trace_private) $(cairo_trace_headers)
-all_cairo_cxx_sources += $(cairo_trace_cxx_sources)
all_cairo_sources += $(cairo_trace_sources)
ifeq ($(CAIRO_HAS_TRACE),1)
enabled_cairo_private += $(cairo_trace_private) $(cairo_trace_headers)
-enabled_cairo_cxx_sources += $(cairo_trace_cxx_sources)
enabled_cairo_sources += $(cairo_trace_sources)
endif
all_cairo_private += $(cairo_interpreter_private) $(cairo_interpreter_headers)
-all_cairo_cxx_sources += $(cairo_interpreter_cxx_sources)
all_cairo_sources += $(cairo_interpreter_sources)
ifeq ($(CAIRO_HAS_INTERPRETER),1)
enabled_cairo_private += $(cairo_interpreter_private) $(cairo_interpreter_headers)
-enabled_cairo_cxx_sources += $(cairo_interpreter_cxx_sources)
enabled_cairo_sources += $(cairo_interpreter_sources)
endif
all_cairo_private += $(cairo_symbol_lookup_private) $(cairo_symbol_lookup_headers)
-all_cairo_cxx_sources += $(cairo_symbol_lookup_cxx_sources)
all_cairo_sources += $(cairo_symbol_lookup_sources)
ifeq ($(CAIRO_HAS_SYMBOL_LOOKUP),1)
enabled_cairo_private += $(cairo_symbol_lookup_private) $(cairo_symbol_lookup_headers)
-enabled_cairo_cxx_sources += $(cairo_symbol_lookup_cxx_sources)
enabled_cairo_sources += $(cairo_symbol_lookup_sources)
endif
diff --git a/src/cairo-beos-surface.cpp b/src/cairo-beos-surface.cpp
deleted file mode 100644
index 65db0b97a..000000000
--- a/src/cairo-beos-surface.cpp
+++ /dev/null
@@ -1,984 +0,0 @@
-/* vim:set ts=8 sw=4 noet cin: */
-/* cairo - a vector graphics library with display and print output
- *
- * Copyright © 2005 Christian Biesinger <cbiesinger@web.de>
- *
- * 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 Christian Biesinger
- * <cbiesinger@web.de>
- *
- * Contributor(s):
- */
-
-// This is a C++ file in order to use the C++ BeOS API
-
-#include "cairoint.h"
-
-#include "cairo-beos.h"
-
-#include "cairo-error-private.h"
-#include "cairo-image-surface-inline.h"
-
-#include <new>
-
-#include <Bitmap.h>
-#include <Region.h>
-#if 0
-#include <DirectWindow.h>
-#endif
-#include <Screen.h>
-#include <Window.h>
-#include <Locker.h>
-
-/**
- * SECTION:beos-surface
- * @Title: BeOS Surfaces
- * @Short_Description: BeOS surface support
- * @See_Also: #cairo_surface_t
- *
- * The BeOS surface is used to render cairo graphics to BeOS views
- * and bitmaps.
- **/
-
-#define CAIRO_INT_STATUS_SUCCESS (cairo_int_status_t)(CAIRO_STATUS_SUCCESS)
-
-struct cairo_beos_surface_t {
- cairo_surface_t base;
-
- cairo_region_t *clip_region;
-
- BView* view;
-
- /*
- * A view is either attached to a bitmap, a window, or unattached.
- * If it is attached to a window, we can copy data out of it using BScreen.
- * If it is attached to a bitmap, we can read the bitmap data.
- * If it is not attached, it doesn't draw anything, we need not bother.
- *
- * Since there doesn't seem to be a way to get the bitmap from a view if it
- * is attached to one, we have to use a special surface creation function.
- */
-
- BBitmap* bitmap;
-
- // If true, surface and view should be deleted when this surface is
- // destroyed
- bool owns_bitmap_view;
-};
-
-class AutoLockView {
- public:
- AutoLockView(BView* view) : mView(view) {
- mOK = mView->LockLooper();
- }
-
- ~AutoLockView() {
- if (mOK)
- mView->UnlockLooper();
- }
-
- operator bool() {
- return mOK;
- }
-
- private:
- BView* mView;
- bool mOK;
-};
-
-static cairo_surface_t *
-_cairo_beos_surface_create_internal (BView* view,
- BBitmap* bmp,
- bool owns_bitmap_view = false);
-
-static inline BRect
-_cairo_rectangle_to_brect (const cairo_rectangle_int_t* rect)
-{
- // A BRect is one pixel wider than you'd think
- return BRect (rect->x, rect->y,
- rect->x + rect->width - 1,
- rect->y + rect->height - 1);
-}
-
-static inline cairo_rectangle_int_t
-_brect_to_cairo_rectangle (const BRect &rect)
-{
- cairo_rectangle_int_t retval;
- retval.x = floor (rect.left);
- retval.y = floor (rect.top);
- retval.width = ceil (rect.right) - retval.x + 1;
- retval.height = ceil (rect.bottom) - rectval.y + 1;
- return retval;
-}
-
-static inline rgb_color
-_cairo_color_to_be_color (const cairo_color_t *color)
-{
- // This factor ensures a uniform distribution of numbers
- const float factor = 256 - 1e-5;
- // Using doubles to have non-premultiplied colors
- rgb_color be_color = { uint8(color->red * factor),
- uint8(color->green * factor),
- uint8(color->blue * factor),
- uint8(color->alpha * factor) };
-
- return be_color;
-}
-
-enum ViewCopyStatus {
- OK,
- NOT_VISIBLE, // The view or the interest rect is not visible on screen
- ERROR // The view was visible, but the rect could not be copied. Probably OOM
-};
-
-/**
- * _cairo_beos_view_to_bitmap:
- * @bitmap: [out] The resulting bitmap.
- * @rect: [out] The rectangle that was copied, in the view's coordinate system
- * @interestRect: If non-null, only this part of the view will be copied (view's coord system).
- *
- * Gets the contents of the view as a BBitmap*. Caller must delete the bitmap.
- **/
-static ViewCopyStatus
-_cairo_beos_view_to_bitmap (BView* view,
- BBitmap** bitmap,
- BRect* rect = NULL,
- const BRect* interestRect = NULL)
-{
- *bitmap = NULL;
-
- BWindow* wnd = view->Window();
- // If we have no window, can't do anything
- if (!wnd)
- return NOT_VISIBLE;
-
- view->Sync();
- wnd->Sync();
-
-#if 0
- // Is it a direct window?
- BDirectWindow* directWnd = dynamic_cast<BDirectWindow*>(wnd);
- if (directWnd) {
- // WRITEME
- }
-#endif
-
- // Is it visible? If so, we can copy the content off the screen
- if (wnd->IsHidden())
- return NOT_VISIBLE;
-
- BRect rectToCopy(view->Bounds());
- if (interestRect)
- rectToCopy = rectToCopy & *interestRect;
-
- if (!rectToCopy.IsValid())
- return NOT_VISIBLE;
-
- BScreen screen(wnd);
- BRect screenRect(view->ConvertToScreen(rectToCopy));
- screenRect = screenRect & screen.Frame();
-
- if (!screen.IsValid())
- return NOT_VISIBLE;
-
- if (rect)
- *rect = view->ConvertFromScreen(screenRect);
-
- if (screen.GetBitmap(bitmap, false, &screenRect) == B_OK)
- return OK;
-
- return ERROR;
-}
-
-static void
-unpremultiply_bgra (unsigned char* data,
- int width,
- int height,
- int stride,
- unsigned char* retdata)
-{
- unsigned char* end = data + stride * height;
- for (unsigned char* in = data, *out = retdata;
- in < end;
- in += stride, out += stride)
- {
- for (int i = 0; i < width; i ++) {
- uint8_t *b = &out[4*i];
- uint32_t pixel;
- uint8_t alpha;
-
- memcpy (&pixel, &data[4*i], sizeof (uint32_t));
- alpha = pixel & 0xff;
- if (alpha == 0) {
- b[0] = b[1] = b[2] = b[3] = 0;
- } else {
- b[0] = (((pixel >> 24) & 0xff) * 255 + alpha / 2) / alpha;
- b[1] = (((pixel >> 16) & 0xff) * 255 + alpha / 2) / alpha;
- b[2] = (((pixel >> 8) & 0xff) * 255 + alpha / 2) / alpha;
- b[3] = alpha;
- }
- }
- }
-}
-
-static inline int
-multiply_alpha (int alpha, int color)
-{
- int temp = (alpha * color) + 0x80;
- return ((temp + (temp >> 8)) >> 8);
-}
-
-static unsigned char*
-premultiply_bgra (unsigned char* data,
- int width,
- int height,
- int stride)
-{
- uint8_t * retdata = reinterpret_cast<unsigned char*>(_cairo_malloc_ab(height, stride));
- if (!retdata)
- return NULL;
-
- uint8_t * end = data + stride * height;
- for (uint8_t * in = data, *out = retdata;
- in < end;
- in += stride, out += stride)
- {
- for (int i = 0; i < width; i ++) {
- uint8_t *base = &in[4*i];
- uint8_t alpha = base[3];
- uint32_t p;
-
- if (alpha == 0) {
- p = 0;
- } else {
- uint8_t blue = base[0];
- uint8_t green = base[1];
- uint8_t red = base[2];
-
- if (alpha != 0xff) {
- blue = multiply_alpha (alpha, blue);
- green = multiply_alpha (alpha, green);
- red = multiply_alpha (alpha, red);
- }
- p = (alpha << 0) | (red << 8) | (green << 16) | ((uint32_t)blue << 24);
- }
- memcpy (&out[4*i], &p, sizeof (uint32_t));
- }
- }
- return retdata;
-}
-
-static cairo_int_status_t
-_cairo_beos_surface_set_clip_region (cairo_beos_surface_t *surface,
- cairo_region_t *region)
-{
- cairo_beos_surface_t *surface = reinterpret_cast<cairo_beos_surface_t*>(
- abstract_surface);
- AutoLockView locker(surface->view);
- assert (locker);
-
- if (region == surface->clip_region)
- return CAIRO_INT_STATUS_SUCCESS;
-
- cairo_region_destroy (surface->clip_region);
- surface->clip_region = cairo_region_reference (region);
-
- if (region == NULL) {
- // No clipping
- surface->view->ConstrainClippingRegion(NULL);
- return CAIRO_INT_STATUS_SUCCESS;
- }
-
- int count = cairo_region_num_rectangles (region);
- BRegion bregion;
- for (int i = 0; i < count; ++i) {
- cairo_rectangle_int_t rect;
-
- cairo_region_get_rectangle (region, i, &rect);
- // Have to subtract one, because for pixman, the second coordinate
- // lies outside the rectangle.
- bregion.Include (_cairo_rectangle_to_brect (&rect));
- }
- surface->view->ConstrainClippingRegion(&bregion);
- return CAIRO_INT_STATUS_SUCCESS;
-}
-
-
-/**
- * _cairo_beos_bitmap_to_surface:
- *
- * Returns an addrefed image surface for a BBitmap. The bitmap need not outlive
- * the surface.
- **/
-static cairo_image_surface_t*
-_cairo_beos_bitmap_to_surface (BBitmap* bitmap)
-{
- color_space format = bitmap->ColorSpace();
- if (format != B_RGB32 && format != B_RGBA32) {
- BBitmap bmp(bitmap->Bounds(), B_RGB32, true);
- BView view(bitmap->Bounds(), "Cairo bitmap drawing view",
- B_FOLLOW_ALL_SIDES, 0);
- bmp.AddChild(&view);
-
- view.LockLooper();
-
- view.DrawBitmap(bitmap, BPoint(0.0, 0.0));
- view.Sync();
-
- cairo_image_surface_t* imgsurf = _cairo_beos_bitmap_to_surface(&bmp);
-
- view.UnlockLooper();
- bmp.RemoveChild(&view);
- return imgsurf;
- }
-
- cairo_format_t cformat = format == B_RGB32 ?
- CAIRO_FORMAT_RGB24 : CAIRO_FORMAT_ARGB32;
-
- BRect bounds(bitmap->Bounds());
- unsigned char* bits = reinterpret_cast<unsigned char*>(bitmap->Bits());
- int width = bounds.IntegerWidth() + 1;
- int height = bounds.IntegerHeight() + 1;
- unsigned char* premultiplied;
- if (cformat == CAIRO_FORMAT_ARGB32) {
- premultiplied = premultiply_bgra (bits, width, height,
- bitmap->BytesPerRow());
- } else {
- premultiplied = reinterpret_cast<unsigned char*>(
- _cairo_malloc_ab(bitmap->BytesPerRow(), height));
- if (premultiplied)
- memcpy(premultiplied, bits, bitmap->BytesPerRow() * height);
- }
- if (!premultiplied)
- return _cairo_surface_create_in_error (_cairo_error (CAIRO_STATUS_NO_MEMORY));
-
- cairo_image_surface_t* surf = reinterpret_cast<cairo_image_surface_t*>
- (cairo_image_surface_create_for_data(premultiplied,
- cformat,
- width,
- height,
- bitmap->BytesPerRow()));
- if (surf->base.status)
- free(premultiplied);
- else
- _cairo_image_surface_assume_ownership_of_data(surf);
- return surf;
-}
-
-/**
- * _cairo_image_surface_to_bitmap:
- *
- * Converts an image surface to a BBitmap. The return value must be freed with
- * delete.
- **/
-static BBitmap*
-_cairo_image_surface_to_bitmap (cairo_image_surface_t* surface)
-{
- BRect size(0.0, 0.0, surface->width - 1, surface->height - 1);
- switch (surface->format) {
- case CAIRO_FORMAT_ARGB32: {
- BBitmap* data = new BBitmap(size, B_RGBA32);
- unpremultiply_bgra (surface->data,
- surface->width,
- surface->height,
- surface->stride,
- reinterpret_cast<unsigned char*>(data->Bits()));
- return data;
- }
- case CAIRO_FORMAT_RGB24: {
- BBitmap* data = new BBitmap(size, B_RGB32);
- memcpy(data->Bits(), surface->data, surface->height * surface->stride);
- return data;
- }
- default:
- assert(0);
- return NULL;
- }
-}
-
-/**
- * _cairo_op_to_be_op:
- *
- * Converts a cairo drawing operator to a beos drawing_mode. Returns true if
- * the operator could be converted, false otherwise.
- **/
-static bool
-_cairo_op_to_be_op (cairo_operator_t cairo_op,
- drawing_mode* beos_op)
-{
- switch (cairo_op) {
- case CAIRO_OPERATOR_SOURCE:
- *beos_op = B_OP_COPY;
- return true;
- case CAIRO_OPERATOR_OVER:
- *beos_op = B_OP_ALPHA;
- return true;
-
- case CAIRO_OPERATOR_ADD:
- // Does not actually work
- // XXX This is a fundamental compositing operator, it has to work!
-#if 1
- return false;
-#else
- *beos_op = B_OP_ADD;
- return true;
-#endif
-
- case CAIRO_OPERATOR_CLEAR:
- // Does not map to B_OP_ERASE - it replaces the dest with the low
- // color, instead of transparency; could be done by setting low
- // color appropriately.
-
- case CAIRO_OPERATOR_IN:
- case CAIRO_OPERATOR_OUT:
- case CAIRO_OPERATOR_ATOP:
-
- case CAIRO_OPERATOR_DEST:
- case CAIRO_OPERATOR_DEST_OVER:
- case CAIRO_OPERATOR_DEST_IN:
- case CAIRO_OPERATOR_DEST_OUT:
- case CAIRO_OPERATOR_DEST_ATOP:
-
- case CAIRO_OPERATOR_XOR:
- case CAIRO_OPERATOR_SATURATE:
-
- default:
- return false;
- }
-}
-
-static cairo_surface_t *
-_cairo_beos_surface_create_similar (void *abstract_surface,
- cairo_content_t content,
- int width,
- int height)
-{
- cairo_beos_surface_t *surface = reinterpret_cast<cairo_beos_surface_t*>(
- abstract_surface);
-
- if (width <= 0)
- width = 1;
- if (height <= 0)
- height = 1;
-
- BRect rect(0.0, 0.0, width - 1, height - 1);
- BBitmap* bmp;
- switch (content) {
- case CAIRO_CONTENT_ALPHA:
- return NULL;
- case CAIRO_CONTENT_COLOR_ALPHA:
- bmp = new BBitmap(rect, B_RGBA32, true);
- break;
- case CAIRO_CONTENT_COLOR:
- // Match the color depth
- if (surface->bitmap) {
- color_space space = surface->bitmap->ColorSpace();
- // No alpha was requested -> make sure not to return
- // a surface with alpha
- if (space == B_RGBA32)
- space = B_RGB32;
- if (space == B_RGBA15)
- space = B_RGB15;
- bmp = new BBitmap(rect, space, true);
- } else {
- BScreen scr(surface->view->Window());
- color_space space = B_RGB32;
- if (scr.IsValid())
- space = scr.ColorSpace();
- bmp = new BBitmap(rect, space, true);
- }
- break;
- default:
- ASSERT_NOT_REACHED;
- return NULL;
- }
- BView* view = new BView(rect, "Cairo bitmap view", B_FOLLOW_ALL_SIDES, 0);
- bmp->AddChild(view);
- return _cairo_beos_surface_create_internal(view, bmp, true);
-}
-
-static cairo_status_t
-_cairo_beos_surface_finish (void *abstract_surface)
-{
- cairo_beos_surface_t *surface = reinterpret_cast<cairo_beos_surface_t*>(
- abstract_surface);
- if (surface->owns_bitmap_view) {
- if (surface->bitmap)
- surface->bitmap->RemoveChild(surface->view);
-
- delete surface->view;
- delete surface->bitmap;
-
- surface->view = NULL;
- surface->bitmap = NULL;
- }
-
- cairo_region_destroy (surface->clip_region);
-
- return CAIRO_STATUS_SUCCESS;
-}
-
-static cairo_status_t
-_cairo_beos_surface_acquire_source_image (void *abstract_surface,
- cairo_image_surface_t **image_out,
- void **image_extra)
-{
- cairo_beos_surface_t *surface = reinterpret_cast<cairo_beos_surface_t*>(
- abstract_surface);
- AutoLockView locker(surface->view);
- if (!locker)
- return CAIRO_STATUS_NO_MEMORY; /// XXX not exactly right, but what can we do?
-
-
- surface->view->Sync();
-
- if (surface->bitmap) {
- *image_out = _cairo_beos_bitmap_to_surface (surface->bitmap);
- if (unlikely ((*image_out)->base.status))
- return (*image_out)->base.status;
-
- *image_extra = NULL;
- return CAIRO_STATUS_SUCCESS;
- }
-
- BBitmap* bmp;
- if (_cairo_beos_view_to_bitmap(surface->view, &bmp) != OK)
- return CAIRO_STATUS_NO_MEMORY; /// XXX incorrect if the error was NOT_VISIBLE
-
- *image_out = _cairo_beos_bitmap_to_surface (bmp);
- if (unlikely ((*image_out)->base.status)) {
- delete bmp;
- return (*image_out)->base.status;
- }
- *image_extra = bmp;
-
- return CAIRO_STATUS_SUCCESS;
-}
-
-static void
-_cairo_beos_surface_release_source_image (void *abstract_surface,
- cairo_image_surface_t *image,
- void *image_extra)
-{
- cairo_surface_destroy (&image->base);
-
- if (image_extra != NULL) {
- BBitmap* bmp = static_cast<BBitmap*>(image_extra);
- delete bmp;
- }
-}
-
-static cairo_status_t
-_cairo_beos_surface_acquire_dest_image (void *abstract_surface,
- cairo_rectangle_int_t *interest_rect,
- cairo_image_surface_t **image_out,
- cairo_rectangle_int_t *image_rect,
- void **image_extra)
-{
- cairo_beos_surface_t *surface = reinterpret_cast<cairo_beos_surface_t*>(
- abstract_surface);
-
- AutoLockView locker(surface->view);
- if (!locker) {
- *image_out = NULL;
- *image_extra = NULL;
- return (cairo_status_t) CAIRO_INT_STATUS_NOTHING_TO_DO;
- }
-
- if (surface->bitmap) {
- surface->view->Sync();
- *image_out = _cairo_beos_bitmap_to_surface(surface->bitmap);
- if (unlikely ((*image_out)->base.status))
- return (*image_out)->base.status;
-
- image_rect->x = 0;
- image_rect->y = 0;
- image_rect->width = (*image_out)->width;
- image_rect->height = (*image_out)->height;
-
- *image_extra = NULL;
- return CAIRO_STATUS_SUCCESS;
- }
-
- BRect b_interest_rect (_cairo_rectangle_to_brect (interest_rect));
-
- BRect rect;
- BBitmap* bitmap;
- ViewCopyStatus status = _cairo_beos_view_to_bitmap(surface->view, &bitmap,
- &rect, &b_interest_rect);
- if (status == NOT_VISIBLE) {
- *image_out = NULL;
- *image_extra = NULL;
- return CAIRO_STATUS_SUCCESS;
- }
- if (status == ERROR)
- return CAIRO_STATUS_NO_MEMORY;
-
- *image_rect = _brect_to_cairo_rectangle(rect);
- *image_out = _cairo_beos_bitmap_to_surface(bitmap);
- delete bitmap;
- if (unlikely ((*image_out)->base.status))
- return (*image_out)->base.status;
-
- *image_extra = NULL;
-
- return CAIRO_STATUS_SUCCESS;
-}
-
-
-static void
-_cairo_beos_surface_release_dest_image (void *abstract_surface,
- cairo_rectangle_int_t *intersect_rect,
- cairo_image_surface_t *image,
- cairo_rectangle_int_t *image_rect,
- void *image_extra)
-{
- cairo_beos_surface_t *surface = reinterpret_cast<cairo_beos_surface_t*>(
- abstract_surface);
-
- AutoLockView locker(surface->view);
- if (!locker)
- return;
-
- BBitmap* bitmap_to_draw = _cairo_image_surface_to_bitmap(image);
- surface->view->PushState();
-
- surface->view->SetDrawingMode(B_OP_COPY);
-
- surface->view->DrawBitmap (bitmap_to_draw,
- _cairo_rectangle_to_brect (image_rect));
-
- surface->view->PopState();
-
- delete bitmap_to_draw;
- cairo_surface_destroy(&image->base);
-}
-
-static cairo_int_status_t
-_cairo_beos_surface_composite (cairo_operator_t op,
- cairo_pattern_t *src,
- cairo_pattern_t *mask,
- void *dst,
- int src_x,
- int src_y,
- int mask_x,
- int mask_y,
- int dst_x,
- int dst_y,
- unsigned int width,
- unsigned int height,
- cairo_region_t *clip_region)
-{
- cairo_beos_surface_t *surface = reinterpret_cast<cairo_beos_surface_t*>(
- dst);
- cairo_int_status_t status;
- AutoLockView locker(surface->view);
- if (!locker)
- return CAIRO_INT_STATUS_SUCCESS;
-
- drawing_mode mode;
- if (!_cairo_op_to_be_op(op, &mode))
- return CAIRO_INT_STATUS_UNSUPPORTED;
-
- // XXX Masks are not yet supported
- if (mask)
- return CAIRO_INT_STATUS_UNSUPPORTED;
-
- // XXX should eventually support the others
- if (src->type != CAIRO_PATTERN_TYPE_SURFACE ||
- src->extend != CAIRO_EXTEND_NONE)
- {
- return CAIRO_INT_STATUS_UNSUPPORTED;
- }
-
- // Can we maybe support other matrices as well? (scale? if the filter is right)
- int itx, ity;
- if (!_cairo_matrix_is_integer_translation(&src->matrix, &itx, &ity))
- return CAIRO_INT_STATUS_UNSUPPORTED;
-
- status = _cairo_beos_surface_set_clip_region (surface, clip_region);
- if (unlikely (status))
- return status;
-
- BRect srcRect(src_x + itx,
- src_y + ity,
- src_x + itx + width - 1,
- src_y + ity + height - 1);
- BRect dstRect(dst_x, dst_y, dst_x + width - 1, dst_y + height - 1);
-
- cairo_surface_t* src_surface = reinterpret_cast<cairo_surface_pattern_t*>(src)->
- surface;
-
- // Get a bitmap
- BBitmap* bmp = NULL;
- bool free_bmp = false;
- if (_cairo_surface_is_image(src_surface)) {
- cairo_image_surface_t* img_surface =
- reinterpret_cast<cairo_image_surface_t*>(src_surface);
-
- bmp = _cairo_image_surface_to_bitmap(img_surface);
- free_bmp = true;
- } else if (src_surface->backend == surface->base.backend) {
- cairo_beos_surface_t *beos_surface =
- reinterpret_cast<cairo_beos_surface_t*>(src_surface);
- if (beos_surface->bitmap) {
- AutoLockView locker(beos_surface->view);
- if (locker)
- beos_surface->view->Sync();
- bmp = beos_surface->bitmap;
- } else {
- _cairo_beos_view_to_bitmap(surface->view, &bmp);
- free_bmp = true;
- }
- }
-
- if (!bmp)
- return CAIRO_INT_STATUS_UNSUPPORTED;
-
- // So, BeOS seems to screw up painting an opaque bitmap onto a
- // translucent one (it makes them partly transparent). Just return
- // unsupported.
- if (bmp->ColorSpace() == B_RGB32 && surface->bitmap &&
- surface->bitmap->ColorSpace() == B_RGBA32 &&
- (mode == B_OP_COPY || mode == B_OP_ALPHA))
- {
- if (free_bmp)
- delete bmp;
- return CAIRO_INT_STATUS_UNSUPPORTED;
- }
-
- // Draw it on screen.
- surface->view->PushState();
-
- // If our image rect is only a subrect of the desired size, and we
- // aren't using B_OP_ALPHA, then we need to fill the rect first.
- if (mode == B_OP_COPY && !bmp->Bounds().Contains(srcRect)) {
- rgb_color black = { 0, 0, 0, 0 };
-
- surface->view->SetDrawingMode(mode);
- surface->view->SetHighColor(black);
- surface->view->FillRect(dstRect);
- }
-
- if (mode == B_OP_ALPHA && bmp->ColorSpace() == B_RGB32) {
- mode = B_OP_COPY;
- }
- surface->view->SetDrawingMode(mode);
-
- if (surface->bitmap && surface->bitmap->ColorSpace() == B_RGBA32)
- surface->view->SetBlendingMode(B_PIXEL_ALPHA, B_ALPHA_COMPOSITE);
- else
- surface->view->SetBlendingMode(B_PIXEL_ALPHA, B_ALPHA_OVERLAY);
-
- surface->view->DrawBitmap(bmp, srcRect, dstRect);
-
- surface->view->PopState();
-
- if (free_bmp)
- delete bmp;
-
- return CAIRO_INT_STATUS_SUCCESS;
-}
-
-
-static cairo_int_status_t
-_cairo_beos_surface_fill_rectangles (void *abstract_surface,
- cairo_operator_t op,
- const cairo_color_t *color,
- cairo_rectangle_int_t *rects,
- int num_rects,
- cairo_region_t *clip_region)
-{
- cairo_beos_surface_t *surface = reinterpret_cast<cairo_beos_surface_t*>(
- abstract_surface);
- cairo_int_status_t status;
-
- if (num_rects <= 0)
- return CAIRO_INT_STATUS_SUCCESS;
-
- AutoLockView locker(surface->view);
- if (!locker)
- return CAIRO_INT_STATUS_SUCCESS;
-
- drawing_mode mode;
- if (!_cairo_op_to_be_op(op, &mode))
- return CAIRO_INT_STATUS_UNSUPPORTED;
-
- status = _cairo_beos_surface_set_clip_region (surface, clip_region);
- if (unlikely (status))
- return status;
-
- rgb_color be_color = _cairo_color_to_be_color(color);
-
- if (mode == B_OP_ALPHA && be_color.alpha == 0xFF)
- mode = B_OP_COPY;
-
- // For CAIRO_OPERATOR_SOURCE, cairo expects us to use the premultiplied
- // color info. This is only relevant when drawing into an rgb24 buffer
- // (as for others, we can convert when asked for the image)
- if (mode == B_OP_COPY && be_color.alpha != 0xFF &&
- (!surface->bitmap || surface->bitmap->ColorSpace() != B_RGBA32))
- {
- be_color.red = color->red_short >> 8;
- be_color.green = color->green_short >> 8;
- be_color.blue = color->blue_short >> 8;
- }
-
- surface->view->PushState();
-
- surface->view->SetDrawingMode(mode);
- surface->view->SetHighColor(be_color);
- if (surface->bitmap && surface->bitmap->ColorSpace() == B_RGBA32)
- surface->view->SetBlendingMode(B_CONSTANT_ALPHA, B_ALPHA_COMPOSITE);
- else
- surface->view->SetBlendingMode(B_CONSTANT_ALPHA, B_ALPHA_OVERLAY);
-
- for (int i = 0; i < num_rects; ++i)
- surface->view->FillRect (_cairo_rectangle_to_brect (&rects[i]));
-
- surface->view->PopState();
-
- return CAIRO_INT_STATUS_SUCCESS;
-}
-
-static cairo_bool_t
-_cairo_beos_surface_get_extents (void *abstract_surface,
- cairo_rectangle_int_t *rectangle)
-{
- cairo_beos_surface_t *surface = reinterpret_cast<cairo_beos_surface_t*>(
- abstract_surface);
- AutoLockView locker(surface->view);
- if (!locker)
- return FALSE;
-
- *rectangle = _brect_to_cairo_rectangle (surface->view->Bounds());
- return TRUE;
-}
-
-static const struct _cairo_surface_backend cairo_beos_surface_backend = {
- CAIRO_SURFACE_TYPE_BEOS,
- _cairo_beos_surface_create_similar,
- _cairo_beos_surface_finish,
- _cairo_beos_surface_acquire_source_image,
- _cairo_beos_surface_release_source_image,
- _cairo_beos_surface_acquire_dest_image,
- _cairo_beos_surface_release_dest_image,
- NULL, /* clone_similar */
- _cairo_beos_surface_composite, /* composite */
- _cairo_beos_surface_fill_rectangles,
- NULL, /* composite_trapezoids */
- NULL, /* create_span_renderer */
- NULL, /* check_span_renderer */
- NULL, /* copy_page */
- NULL, /* show_page */
- _cairo_beos_surface_get_extents,
- NULL, /* old_show_glyphs */
- NULL, /* get_font_options */
- NULL, /* flush */
- NULL, /* mark_dirty_rectangle */
- NULL, /* scaled_font_fini */
- NULL, /* scaled_glyph_fini */
-
- NULL, /* paint */
- NULL, /* mask */
- NULL, /* stroke */
- NULL, /* fill */
- NULL /* show_glyphs */
-};
-
-static cairo_surface_t *
-_cairo_beos_surface_create_internal (BView* view,
- BBitmap* bmp,
- bool owns_bitmap_view)
-{
- // Must use malloc, because cairo code will use free() on the surface
- cairo_beos_surface_t *surface = static_cast<cairo_beos_surface_t*>(
- malloc(sizeof(cairo_beos_surface_t)));
- if (surface == NULL) {
- _cairo_error (CAIRO_STATUS_NO_MEMORY);
- return const_cast<cairo_surface_t*>(&_cairo_surface_nil);
- }
-
- cairo_content_t content = CAIRO_CONTENT_COLOR;
- if (bmp && (bmp->ColorSpace() == B_RGBA32 || bmp->ColorSpace() == B_RGBA15))
- content = CAIRO_CONTENT_COLOR_ALPHA;
- _cairo_surface_init (&surface->base,
- &cairo_beos_surface_backend,
- NULL, /* device */
- content);
-
- surface->view = view;
- surface->bitmap = bmp;
- surface->owns_bitmap_view = owns_bitmap_view;
-
- surface->clip_region = NULL;
-
- return &surface->base;
-}
-
-/**
- * cairo_beos_surface_create:
- * @view: The view to draw on
- *
- * Creates a Cairo surface that draws onto a BeOS BView.
- * The caller must ensure that the view does not get deleted before the surface.
- * If the view is attached to a bitmap rather than an on-screen window, use
- * cairo_beos_surface_create_for_bitmap() instead of this function.
- *
- * Since: TBD
- **/
-cairo_surface_t *
-cairo_beos_surface_create (BView* view)
-{
- return cairo_beos_surface_create_for_bitmap(view, NULL);
-}
-
-/**
- * cairo_beos_surface_create_for_bitmap:
- * @view: The view to draw on
- * @bmp: The bitmap to which the view is attached
- *
- * Creates a Cairo surface that draws onto a BeOS BView which is attached to a
- * BBitmap.
- * The caller must ensure that the view and the bitmap do not get deleted
- * before the surface.
- *
- * For views that draw to a bitmap (as opposed to a screen), use this function
- * rather than cairo_beos_surface_create(). Not using this function WILL lead to
- * incorrect behaviour.
- *
- * For now, only views that draw to the entire area of bmp are supported.
- * The view must already be attached to the bitmap.
- *
- * Since: TBD
- **/
-cairo_surface_t *
-cairo_beos_surface_create_for_bitmap (BView* view,
- BBitmap* bmp)
-{
- return _cairo_beos_surface_create_internal(view, bmp);
-}
diff --git a/src/cairo-beos.h b/src/cairo-beos.h
deleted file mode 100644
index fdb89a6c4..000000000
--- a/src/cairo-beos.h
+++ /dev/null
@@ -1,60 +0,0 @@
-/* cairo - a vector graphics library with display and print output
- *
- * Copyright © 2005 Christian Biesinger <cbiesinger@web.de>
- *
- * 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 Christian Biesinger
- * <cbiesinger@web.de>
- *
- * Contributor(s):
- */
-
-#ifndef CAIRO_BEOS_H
-#define CAIRO_BEOS_H
-
-#include "cairo.h"
-
-#if CAIRO_HAS_BEOS_SURFACE
-
-#include <View.h>
-
-CAIRO_BEGIN_DECLS
-
-cairo_public cairo_surface_t *
-cairo_beos_surface_create (BView* view);
-
-cairo_public cairo_surface_t *
-cairo_beos_surface_create_for_bitmap (BView* view,
- BBitmap* bmp);
-
-CAIRO_END_DECLS
-
-#else /* CAIRO_HAS_BEOS_SURFACE */
-# error Cairo was not compiled with support for the beos backend
-#endif /* CAIRO_HAS_BEOS_SURFACE */
-
-#endif /* CAIRO_BEOS_H */
diff --git a/src/cairo-mutex-impl-private.h b/src/cairo-mutex-impl-private.h
index a31e1e0d9..f4049d236 100644
--- a/src/cairo-mutex-impl-private.h
+++ b/src/cairo-mutex-impl-private.h
@@ -210,17 +210,6 @@
# define CAIRO_MUTEX_IMPL_FINI(mutex) DosCloseMutexSem (mutex)
# define CAIRO_MUTEX_IMPL_NIL_INITIALIZER 0
-#elif CAIRO_HAS_BEOS_SURFACE /***********************************************/
-
- typedef BLocker* cairo_mutex_impl_t;
-
-# define CAIRO_MUTEX_IMPL_BEOS 1
-# define CAIRO_MUTEX_IMPL_LOCK(mutex) (mutex)->Lock()
-# define CAIRO_MUTEX_IMPL_UNLOCK(mutex) (mutex)->Unlock()
-# define CAIRO_MUTEX_IMPL_INIT(mutex) (mutex) = new BLocker()
-# define CAIRO_MUTEX_IMPL_FINI(mutex) delete (mutex)
-# define CAIRO_MUTEX_IMPL_NIL_INITIALIZER NULL
-
#elif CAIRO_HAS_PTHREAD /* and finally if there are no native mutexes ********/
# include <pthread.h>