1 /* 2 * This file is part of gtkD. 3 * 4 * gtkD is free software; you can redistribute it and/or modify 5 * it under the terms of the GNU Lesser General Public License 6 * as published by the Free Software Foundation; either version 3 7 * of the License, or (at your option) any later version, with 8 * some exceptions, please read the COPYING file. 9 * 10 * gtkD is distributed in the hope that it will be useful, 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 * GNU Lesser General Public License for more details. 14 * 15 * You should have received a copy of the GNU Lesser General Public License 16 * along with gtkD; if not, write to the Free Software 17 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110, USA 18 */ 19 20 // generated automatically - do not change 21 // find conversion definition on APILookup.txt 22 // implement new conversion functionalities on the wrap.utils pakage 23 24 25 module rsvg.c.types; 26 27 public import cairo.c.types; 28 public import gdkpixbuf.c.types; 29 public import gio.c.types; 30 public import gobject.c.types; 31 32 33 /** 34 * An enumeration representing possible errors 35 */ 36 public enum RsvgError 37 { 38 /** 39 * the request failed 40 */ 41 FAILED = 0, 42 } 43 alias RsvgError Error; 44 45 public enum RsvgHandleFlags 46 { 47 /** 48 * No flags are set. 49 */ 50 FLAGS_NONE = 0, 51 /** 52 * Disable safety limits in the XML parser. 53 * Libxml2 has <ulink 54 * url="https://gitlab.gnome.org/GNOME/libxml2/blob/master/include/libxml/parserInternals.h">several 55 * limits</ulink> designed to keep malicious XML content from consuming too 56 * much memory while parsing. For security reasons, this should only be used 57 * for trusted input! 58 * Since: 2.40.3 59 */ 60 FLAG_UNLIMITED = 1, 61 /** 62 * Use this if the Cairo surface to which you 63 * are rendering is a PDF, PostScript, SVG, or Win32 Printing surface. This 64 * will make librsvg and Cairo use the original, compressed data for images in 65 * the final output, instead of passing uncompressed images. This will make a 66 * Keeps the image data when loading images, for use by cairo when painting to 67 * e.g. a PDF surface. For example, this will make the a resulting PDF file 68 * smaller and faster. Please see <ulink 69 * url="https://www.cairographics.org/manual/cairo-cairo-surface-t.html#cairo-surface-set-mime-data">the 70 * Cairo documentation</ulink> for details. 71 * Since: 2.40.3 72 */ 73 FLAG_KEEP_IMAGE_DATA = 2, 74 } 75 alias RsvgHandleFlags HandleFlags; 76 77 /** 78 * Units for the #RsvgLength struct. These have the same meaning as <ulink 79 * url="https://www.w3.org/TR/CSS21/syndata.html#length-units">CSS length 80 * units</ulink>. 81 */ 82 public enum RsvgUnit 83 { 84 /** 85 * percentage values; where <literal>1.0</literal> means 100%. 86 */ 87 PERCENT = 0, 88 /** 89 * pixels 90 */ 91 PX = 1, 92 /** 93 * em, or the current font size 94 */ 95 EM = 2, 96 /** 97 * x-height of the current font 98 */ 99 EX = 3, 100 /** 101 * inches 102 */ 103 IN = 4, 104 /** 105 * centimeters 106 */ 107 CM = 5, 108 /** 109 * millimeters 110 */ 111 MM = 6, 112 /** 113 * points, or 1/72 inch 114 */ 115 PT = 7, 116 /** 117 * picas, or 1/6 inch (12 points) 118 */ 119 PC = 8, 120 } 121 alias RsvgUnit Unit; 122 123 /** 124 * Dimensions of an SVG image from rsvg_handle_get_dimensions(), or an 125 * individual element from rsvg_handle_get_dimensions_sub(). Please see 126 * the deprecation documentation for those functions. 127 * 128 * Deprecated: FIXME: point to deprecation documentation. 129 */ 130 struct RsvgDimensionData 131 { 132 /** 133 * SVG's width, in pixels 134 */ 135 int width; 136 /** 137 * SVG's height, in pixels 138 */ 139 int height; 140 /** 141 * SVG's original width, unmodified by #RsvgSizeFunc 142 */ 143 double em; 144 /** 145 * SVG's original height, unmodified by #RsvgSizeFunc 146 */ 147 double ex; 148 } 149 150 struct RsvgHandle 151 { 152 GObject parent; 153 void*[16] AbiPadding; 154 } 155 156 /** 157 * Class structure for #RsvgHandle. 158 */ 159 struct RsvgHandleClass 160 { 161 /** 162 * parent class 163 */ 164 GObjectClass parent; 165 void*[15] AbiPadding; 166 } 167 168 /** 169 * #RsvgLength values are used in rsvg_handle_get_intrinsic_dimensions(), for 170 * example, to return the CSS length values of the <literal>width</literal> and 171 * <literal>height</literal> attributes of an <literal><svg></literal> 172 * element. 173 * 174 * This is equivalent to <ulink 175 * url="https://www.w3.org/TR/CSS21/syndata.html#length-units">CSS lengths</ulink>. 176 * 177 * It is up to the calling application to convert lengths in non-pixel units 178 * (i.e. those where the @unit field is not #RSVG_UNIT_PX) into something 179 * meaningful to the application. For example, if your application knows the 180 * dots-per-inch (DPI) it is using, it can convert lengths with @unit in 181 * #RSVG_UNIT_IN or other physical units. 182 */ 183 struct RsvgLength 184 { 185 /** 186 * numeric part of the length 187 */ 188 double length; 189 /** 190 * unit part of the length 191 */ 192 RsvgUnit unit; 193 } 194 195 /** 196 * Position of an SVG fragment from rsvg_handle_get_position_sub(). Please 197 * the deprecation documentation for that function. 198 * 199 * Deprecated: FIXME: point to deprecation documentation. 200 */ 201 struct RsvgPositionData 202 { 203 /** 204 * position on the x axis 205 */ 206 int x; 207 /** 208 * position on the y axis 209 */ 210 int y; 211 } 212 213 /** 214 * A data structure for holding a rectangle. 215 * 216 * Since: 2.46 217 */ 218 struct RsvgRectangle 219 { 220 /** 221 * X coordinate of the left side of the rectangle 222 */ 223 double x; 224 /** 225 * Y coordinate of the the top side of the rectangle 226 */ 227 double y; 228 /** 229 * width of the rectangle 230 */ 231 double width; 232 /** 233 * height of the rectangle 234 */ 235 double height; 236 } 237 238 enum MAJOR_VERSION = 2; 239 alias LIBRSVG_MAJOR_VERSION = MAJOR_VERSION; 240 241 enum MICRO_VERSION = 7; 242 alias LIBRSVG_MICRO_VERSION = MICRO_VERSION; 243 244 enum MINOR_VERSION = 50; 245 alias LIBRSVG_MINOR_VERSION = MINOR_VERSION; 246 247 enum VERSION = "2.50.7"; 248 alias LIBRSVG_VERSION = VERSION;