#ifndef CAIRO_HH #define CAIRO_HH #include #include namespace cairo { namespace priv { struct CairoSurfaceDelete { void operator()(cairo_surface_t* surface) const { cairo_surface_destroy(surface); } }; struct CairoDelete { void operator()(cairo_t* cairo) const { cairo_destroy(cairo); } }; struct CairoPatternDelete { void operator()(cairo_pattern_t* pattern) const { cairo_pattern_destroy(pattern); } }; struct CairoPathDelete { void operator()(cairo_path_t* path) const { cairo_path_destroy(path); } }; } // namespace priv typedef std::unique_ptr unique_surface; typedef std::unique_ptr unique_path; typedef std::unique_ptr unique_pattern; typedef std::unique_ptr unique; } // namespace cairo #endif // CAIRO_HH