X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/1d156af3247c862e51a7c62f569a3fd302052a42..0d53638f7147c18153f63fdfc096b17be6e22a27:/src/common/cairo.cpp diff --git a/src/common/cairo.cpp b/src/common/cairo.cpp index b27bdd92c3..a10ca6499f 100644 --- a/src/common/cairo.cpp +++ b/src/common/cairo.cpp @@ -3,7 +3,6 @@ // Purpose: Cairo library // Author: Anthony Betaudeau // Created: 2007-08-25 -// RCS-ID: $Id$ // Copyright: (c) Anthony Bretaudeau // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -16,14 +15,18 @@ #pragma hdrstop #endif +#if wxUSE_CAIRO + // keep cairo.h from defining dllimport as we're defining the symbols inside // the wx dll in order to load them dynamically. #define cairo_public -#include "wx/cairo.h" +#include #include "wx/dynlib.h" -#if wxUSE_CAIRO +#ifdef __WXMSW__ +#include "wx/msw/wrapwin.h" +#endif #ifdef __WXMAC__ #include "wx/osx/private.h" @@ -207,8 +210,21 @@ (cairo_t *cr), (cr), NULL ) \ m( cairo_surface_t*, cairo_surface_create_similar, \ (cairo_surface_t *other, cairo_content_t content, int width, int height), (other, content, width, height), NULL) \ + m( int, cairo_format_stride_for_width, \ + (cairo_format_t format, int width), (format, width), 0) \ + m( int, cairo_version, \ + (), (), 0) \ + m( int, cairo_image_surface_get_stride, \ + (cairo_surface_t *surface), (surface), 0) \ + m( unsigned char *, cairo_image_surface_get_data, \ + (cairo_surface_t *surface), (surface), NULL) \ + m( cairo_format_t, cairo_image_surface_get_format, \ + (cairo_surface_t *surface), (surface), CAIRO_FORMAT_INVALID) \ + m( cairo_surface_type_t, cairo_surface_get_type, \ + (cairo_surface_t *surface), (surface), -1) \ wxCAIRO_PLATFORM_METHODS(m) + #if wxUSE_PANGO #define wxFOR_ALL_PANGO_CAIRO_VOIDMETHODS(m) \ m( pango_cairo_update_layout, \ @@ -227,6 +243,7 @@ wxFOR_ALL_CAIRO_VOIDMETHODS(wxCAIRO_DECLARE_VOIDTYPE) wxFOR_ALL_CAIRO_METHODS(wxCAIRO_DECLARE_TYPE) + class wxCairo { public: @@ -361,18 +378,13 @@ bool wxCairo::IsOk() // implementation of the functions themselves // ============================================================================ -extern "C" -{ - bool wxCairoInit() { return wxCairo::Initialize(); } -void wxCairoCleanUp() +extern "C" { - wxCairo::CleanUp(); -} #define wxIMPL_CAIRO_FUNC(rettype, name, params, args, defret) \ rettype name params \