1 /**
2  * License:
3  * $(TABLE
4  *   $(TR $(TD cairoD wrapper/bindings)
5  *     $(TD $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0)))
6  *   $(TR $(TD $(LINK2 http://cgit.freedesktop.org/cairo/tree/COPYING, _cairo))
7  *     $(TD $(LINK2 http://cgit.freedesktop.org/cairo/tree/COPYING-LGPL-2.1, LGPL 2.1) /
8  *     $(LINK2 http://cgit.freedesktop.org/cairo/plain/COPYING-MPL-1.1, MPL 1.1)))
9  * )
10  * Authors:
11  * $(TABLE
12  *   $(TR $(TD Johannes Pfau) $(TD cairoD))
13  *   $(TR $(TD $(LINK2 http://cairographics.org, _cairo team)) $(TD _cairo))
14  * )
15  */
16 /*
17  * Distributed under the Boost Software License, Version 1.0.
18  *    (See accompanying file LICENSE_1_0.txt or copy at
19  *          http://www.boost.org/LICENSE_1_0.txt)
20  */
21 module cairo.directfb;
22 
23 import std.string;
24 import std.conv;
25 
26 import cairo.cairo;
27 import cairo.c.cairo;
28 
29 static if(CAIRO_HAS_DIRECTFB_SURFACE)
30 {
31     import cairo.c.directfb;
32     ///
33     public class DirectFBSurface : Surface
34     {
35         public:
36             /**
37              * Create a $(D DirectFBSurface) from a existing $(D cairo_surface_t*).
38              * DirectFBSurface is a garbage collected class. It will call $(D cairo_surface_destroy)
39              * when it gets collected by the GC or when $(D dispose()) is called.
40              *
41              * Warning:
42              * $(D ptr)'s reference count is not increased by this function!
43              * Adjust reference count before calling it if necessary
44              *
45              * $(RED Only use this if you know what your doing!
46              * This function should not be needed for standard cairoD usage.)
47              */
48             this(cairo_surface_t* ptr)
49             {
50                 super(ptr);
51             }
52 
53             ///
54             this(IDirectFB *dfb, IDirectFBSurface *surface)
55             {
56                   super(cairo_directfb_surface_create(dfb, surface));
57             }
58     }
59 }