1 /** 2 * This module contains information on what optional features are 3 * available with the used cairo library. 4 */ 5 module cairo.c.config; 6 7 version (D_Ddoc) 8 { 9 ///PNG functions are available 10 enum bool CAIRO_HAS_PNG_FUNCTIONS = true; 11 ///Postscript surface support 12 enum bool CAIRO_HAS_PS_SURFACE = true; 13 ///PDF surface support 14 enum bool CAIRO_HAS_PDF_SURFACE = true; 15 ///SVG surface support 16 enum bool CAIRO_HAS_SVG_SURFACE = true; 17 18 //These require external libraries / bindings 19 20 ///Win32 surface support 21 enum bool CAIRO_HAS_WIN32_SURFACE = false; 22 ///Win32 font support 23 enum bool CAIRO_HAS_WIN32_FONT = false; 24 ///Freetype font support 25 enum bool CAIRO_HAS_FT_FONT = false; 26 ///XCB surface support 27 enum bool CAIRO_HAS_XCB_SURFACE = false; 28 ///DirectFB surface support 29 enum bool CAIRO_HAS_DIRECTFB_SURFACE = false; 30 ///XLIB surface support 31 enum bool CAIRO_HAS_XLIB_SURFACE = false; 32 } 33 else 34 { 35 static if (__traits(compiles, CAIROD_IS_CONFIGURED) && CAIROD_IS_CONFIGURED) 36 { 37 // Use variables from configure.d 38 } 39 else 40 { 41 // Configured using -version compiler arguments 42 version (CairoPNG) 43 enum bool CAIRO_HAS_PNG_FUNCTIONS = true; 44 else 45 enum bool CAIRO_HAS_PNG_FUNCTIONS = false; 46 47 version (CairoPSSurface) 48 enum bool CAIRO_HAS_PS_SURFACE = true; 49 else 50 enum bool CAIRO_HAS_PS_SURFACE = false; 51 52 version (CairoPDFSurface) 53 enum bool CAIRO_HAS_PDF_SURFACE = true; 54 else 55 enum bool CAIRO_HAS_PDF_SURFACE = false; 56 57 version (CairoSVGSurface) 58 enum bool CAIRO_HAS_SVG_SURFACE = true; 59 else 60 enum bool CAIRO_HAS_SVG_SURFACE = false; 61 62 version (CairoWin32Surface) 63 enum bool CAIRO_HAS_WIN32_SURFACE = true; 64 else 65 enum bool CAIRO_HAS_WIN32_SURFACE = false; 66 67 version (CairoWin32Font) 68 enum bool CAIRO_HAS_WIN32_FONT = true; 69 else 70 enum bool CAIRO_HAS_WIN32_FONT = false; 71 72 version (CairoFTFont) 73 enum bool CAIRO_HAS_FT_FONT = true; 74 else 75 enum bool CAIRO_HAS_FT_FONT = false; 76 77 version (CairoXCBSurface) 78 enum bool CAIRO_HAS_XCB_SURFACE = true; 79 else 80 enum bool CAIRO_HAS_XCB_SURFACE = false; 81 82 version (CairoDirectFBSurface) 83 enum bool CAIRO_HAS_DIRECTFB_SURFACE = true; 84 else 85 enum bool CAIRO_HAS_DIRECTFB_SURFACE = false; 86 87 version (CairoXlibSurface) 88 enum bool CAIRO_HAS_XLIB_SURFACE = true; 89 else 90 enum bool CAIRO_HAS_XLIB_SURFACE = false; 91 92 version (CarioGLSurface) 93 enum bool CAIRO_HAS_GL_SURFACE = true; 94 else 95 enum bool CAIRO_HAS_GL_SURFACE = false; 96 97 version (CarioGLESV2Surface) 98 enum bool CAIRO_HAS_GLESV2_SURFACE = true; 99 else 100 enum bool CAIRO_HAS_GLESV2_SURFACE = false; 101 102 version (CairoGLX) 103 enum bool CAIRO_HAS_GLX_FUNCTIONS = true; 104 else 105 enum bool CAIRO_HAS_GLX_FUNCTIONS = false; 106 107 version (CairoWGL) 108 enum bool CAIRO_HAS_WGL_FUNCTIONS = true; 109 else 110 enum bool CAIRO_HAS_WGL_FUNCTIONS = false; 111 112 version (CairoEGL) 113 enum bool CAIRO_HAS_EGL_FUNCTIONS = true; 114 else 115 enum bool CAIRO_HAS_EGL_FUNCTIONS = false; 116 } 117 } 118 119 /* 120 * configure.d appends the actual enums at the end of this file 121 */