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 gtk.IconInfo;
26 
27 private import cairo.Surface;
28 private import gdk.RGBA;
29 private import gdk.Window;
30 private import gdkpixbuf.Pixbuf;
31 private import gio.AsyncResultIF;
32 private import gio.Cancellable;
33 private import glib.ConstructionException;
34 private import glib.ErrorG;
35 private import glib.GException;
36 private import glib.Str;
37 private import gobject.ObjectG;
38 private import gtk.IconTheme;
39 private import gtk.Style;
40 private import gtk.StyleContext;
41 private import gtkc.Loader;
42 private import gtkc.gtk;
43 public  import gtkc.gtktypes;
44 private import gtkc.paths;
45 
46 
47 /**
48  * Contains information found when looking up an icon in
49  * an icon theme.
50  */
51 public class IconInfo : ObjectG
52 {
53 	/** the main Gtk struct */
54 	protected GtkIconInfo* gtkIconInfo;
55 
56 	/** Get the main Gtk struct */
57 	public GtkIconInfo* getIconInfoStruct()
58 	{
59 		return gtkIconInfo;
60 	}
61 
62 	/** the main Gtk struct as a void* */
63 	protected override void* getStruct()
64 	{
65 		return cast(void*)gtkIconInfo;
66 	}
67 
68 	protected override void setStruct(GObject* obj)
69 	{
70 		gtkIconInfo = cast(GtkIconInfo*)obj;
71 		super.setStruct(obj);
72 	}
73 
74 	/**
75 	 * Sets our main struct and passes it to the parent class.
76 	 */
77 	public this (GtkIconInfo* gtkIconInfo, bool ownedRef = false)
78 	{
79 		this.gtkIconInfo = gtkIconInfo;
80 		super(cast(GObject*)gtkIconInfo, ownedRef);
81 	}
82 
83 	~this ()
84 	{
85 		if (  Linker.isLoaded(LIBRARY.GTK) && ownedRef )
86 		{
87 			gtk_icon_info_free(gtkIconInfo);
88 		}
89 	}
90 
91 	/**
92 	 */
93 
94 	/** */
95 	public static GType getType()
96 	{
97 		return gtk_icon_info_get_type();
98 	}
99 
100 	/**
101 	 * Creates a #GtkIconInfo for a #GdkPixbuf.
102 	 *
103 	 * Params:
104 	 *     iconTheme = a #GtkIconTheme
105 	 *     pixbuf = the pixbuf to wrap in a #GtkIconInfo
106 	 *
107 	 * Return: a #GtkIconInfo
108 	 *
109 	 * Since: 2.14
110 	 *
111 	 * Throws: ConstructionException GTK+ fails to create the object.
112 	 */
113 	public this(IconTheme iconTheme, Pixbuf pixbuf)
114 	{
115 		auto p = gtk_icon_info_new_for_pixbuf((iconTheme is null) ? null : iconTheme.getIconThemeStruct(), (pixbuf is null) ? null : pixbuf.getPixbufStruct());
116 		
117 		if(p is null)
118 		{
119 			throw new ConstructionException("null returned by new_for_pixbuf");
120 		}
121 		
122 		this(cast(GtkIconInfo*) p, true);
123 	}
124 
125 	/**
126 	 * Make a copy of a #GtkIconInfo.
127 	 *
128 	 * Deprecated: Use g_object_ref()
129 	 *
130 	 * Return: the new GtkIconInfo
131 	 *
132 	 * Since: 2.4
133 	 */
134 	public IconInfo copy()
135 	{
136 		auto p = gtk_icon_info_copy(gtkIconInfo);
137 		
138 		if(p is null)
139 		{
140 			return null;
141 		}
142 		
143 		return ObjectG.getDObject!(IconInfo)(cast(GtkIconInfo*) p, true);
144 	}
145 
146 	/**
147 	 * Free a #GtkIconInfo and associated information
148 	 *
149 	 * Deprecated: Use g_object_unref()
150 	 *
151 	 * Since: 2.4
152 	 */
153 	public void free()
154 	{
155 		gtk_icon_info_free(gtkIconInfo);
156 	}
157 
158 	/**
159 	 * This function is deprecated and always returns %FALSE.
160 	 *
161 	 * Deprecated: Attachment points are deprecated
162 	 *
163 	 * Params:
164 	 *     points = location to store pointer
165 	 *         to an array of points, or %NULL free the array of points with g_free().
166 	 *     nPoints = location to store the number of points in @points,
167 	 *         or %NULL
168 	 *
169 	 * Return: %FALSE
170 	 *
171 	 * Since: 2.4
172 	 */
173 	public bool getAttachPoints(out GdkPoint[] points)
174 	{
175 		GdkPoint* outpoints = null;
176 		int nPoints;
177 		
178 		auto p = gtk_icon_info_get_attach_points(gtkIconInfo, &outpoints, &nPoints) != 0;
179 		
180 		points = outpoints[0 .. nPoints];
181 		
182 		return p;
183 	}
184 
185 	/**
186 	 * Gets the base scale for the icon. The base scale is a scale
187 	 * for the icon that was specified by the icon theme creator.
188 	 * For instance an icon drawn for a high-dpi screen with window
189 	 * scale 2 for a base size of 32 will be 64 pixels tall and have
190 	 * a base scale of 2.
191 	 *
192 	 * Return: the base scale
193 	 *
194 	 * Since: 3.10
195 	 */
196 	public int getBaseScale()
197 	{
198 		return gtk_icon_info_get_base_scale(gtkIconInfo);
199 	}
200 
201 	/**
202 	 * Gets the base size for the icon. The base size
203 	 * is a size for the icon that was specified by
204 	 * the icon theme creator. This may be different
205 	 * than the actual size of image; an example of
206 	 * this is small emblem icons that can be attached
207 	 * to a larger icon. These icons will be given
208 	 * the same base size as the larger icons to which
209 	 * they are attached.
210 	 *
211 	 * Note that for scaled icons the base size does
212 	 * not include the base scale.
213 	 *
214 	 * Return: the base size, or 0, if no base
215 	 *     size is known for the icon.
216 	 *
217 	 * Since: 2.4
218 	 */
219 	public int getBaseSize()
220 	{
221 		return gtk_icon_info_get_base_size(gtkIconInfo);
222 	}
223 
224 	/**
225 	 * Gets the built-in image for this icon, if any. To allow GTK+ to use
226 	 * built in icon images, you must pass the %GTK_ICON_LOOKUP_USE_BUILTIN
227 	 * to gtk_icon_theme_lookup_icon().
228 	 *
229 	 * Deprecated: This function is deprecated, use
230 	 * gtk_icon_theme_add_resource_path() instead of builtin icons.
231 	 *
232 	 * Return: the built-in image pixbuf, or %NULL.
233 	 *     No extra reference is added to the returned pixbuf, so if
234 	 *     you want to keep it around, you must use g_object_ref().
235 	 *     The returned image must not be modified.
236 	 *
237 	 * Since: 2.4
238 	 */
239 	public Pixbuf getBuiltinPixbuf()
240 	{
241 		auto p = gtk_icon_info_get_builtin_pixbuf(gtkIconInfo);
242 		
243 		if(p is null)
244 		{
245 			return null;
246 		}
247 		
248 		return ObjectG.getDObject!(Pixbuf)(cast(GdkPixbuf*) p);
249 	}
250 
251 	/**
252 	 * This function is deprecated and always returns %NULL.
253 	 *
254 	 * Deprecated: Display names are deprecated
255 	 *
256 	 * Return: %NULL
257 	 *
258 	 * Since: 2.4
259 	 */
260 	public string getDisplayName()
261 	{
262 		return Str.toString(gtk_icon_info_get_display_name(gtkIconInfo));
263 	}
264 
265 	/**
266 	 * This function is deprecated and always returns %FALSE.
267 	 *
268 	 * Deprecated: Embedded rectangles are deprecated
269 	 *
270 	 * Params:
271 	 *     rectangle = #GdkRectangle in which to store embedded
272 	 *         rectangle coordinates; coordinates are only stored
273 	 *         when this function returns %TRUE.
274 	 *
275 	 * Return: %FALSE
276 	 *
277 	 * Since: 2.4
278 	 */
279 	public bool getEmbeddedRect(out GdkRectangle rectangle)
280 	{
281 		return gtk_icon_info_get_embedded_rect(gtkIconInfo, &rectangle) != 0;
282 	}
283 
284 	/**
285 	 * Gets the filename for the icon. If the %GTK_ICON_LOOKUP_USE_BUILTIN
286 	 * flag was passed to gtk_icon_theme_lookup_icon(), there may be no
287 	 * filename if a builtin icon is returned; in this case, you should
288 	 * use gtk_icon_info_get_builtin_pixbuf().
289 	 *
290 	 * Return: the filename for the icon, or %NULL
291 	 *     if gtk_icon_info_get_builtin_pixbuf() should be used instead.
292 	 *     The return value is owned by GTK+ and should not be modified
293 	 *     or freed.
294 	 *
295 	 * Since: 2.4
296 	 */
297 	public string getFilename()
298 	{
299 		return Str.toString(gtk_icon_info_get_filename(gtkIconInfo));
300 	}
301 
302 	/**
303 	 * Checks if the icon is symbolic or not. This currently uses only
304 	 * the file name and not the file contents for determining this.
305 	 * This behaviour may change in the future.
306 	 *
307 	 * Return: %TRUE if the icon is symbolic, %FALSE otherwise
308 	 *
309 	 * Since: 3.12
310 	 */
311 	public bool isSymbolic()
312 	{
313 		return gtk_icon_info_is_symbolic(gtkIconInfo) != 0;
314 	}
315 
316 	/**
317 	 * Renders an icon previously looked up in an icon theme using
318 	 * gtk_icon_theme_lookup_icon(); the size will be based on the size
319 	 * passed to gtk_icon_theme_lookup_icon(). Note that the resulting
320 	 * pixbuf may not be exactly this size; an icon theme may have icons
321 	 * that differ slightly from their nominal sizes, and in addition GTK+
322 	 * will avoid scaling icons that it considers sufficiently close to the
323 	 * requested size or for which the source image would have to be scaled
324 	 * up too far. (This maintains sharpness.). This behaviour can be changed
325 	 * by passing the %GTK_ICON_LOOKUP_FORCE_SIZE flag when obtaining
326 	 * the #GtkIconInfo. If this flag has been specified, the pixbuf
327 	 * returned by this function will be scaled to the exact size.
328 	 *
329 	 * Return: the rendered icon; this may be a newly
330 	 *     created icon or a new reference to an internal icon, so you must
331 	 *     not modify the icon. Use g_object_unref() to release your reference
332 	 *     to the icon.
333 	 *
334 	 * Since: 2.4
335 	 *
336 	 * Throws: GException on failure.
337 	 */
338 	public Pixbuf loadIcon()
339 	{
340 		GError* err = null;
341 		
342 		auto p = gtk_icon_info_load_icon(gtkIconInfo, &err);
343 		
344 		if (err !is null)
345 		{
346 			throw new GException( new ErrorG(err) );
347 		}
348 		
349 		if(p is null)
350 		{
351 			return null;
352 		}
353 		
354 		return ObjectG.getDObject!(Pixbuf)(cast(GdkPixbuf*) p, true);
355 	}
356 
357 	/**
358 	 * Asynchronously load, render and scale an icon previously looked up
359 	 * from the icon theme using gtk_icon_theme_lookup_icon().
360 	 *
361 	 * For more details, see gtk_icon_info_load_icon() which is the synchronous
362 	 * version of this call.
363 	 *
364 	 * Params:
365 	 *     cancellable = optional #GCancellable object, %NULL to ignore
366 	 *     callback = a #GAsyncReadyCallback to call when the
367 	 *         request is satisfied
368 	 *     userData = the data to pass to callback function
369 	 *
370 	 * Since: 3.8
371 	 */
372 	public void loadIconAsync(Cancellable cancellable, GAsyncReadyCallback callback, void* userData)
373 	{
374 		gtk_icon_info_load_icon_async(gtkIconInfo, (cancellable is null) ? null : cancellable.getCancellableStruct(), callback, userData);
375 	}
376 
377 	/**
378 	 * Finishes an async icon load, see gtk_icon_info_load_icon_async().
379 	 *
380 	 * Params:
381 	 *     res = a #GAsyncResult
382 	 *
383 	 * Return: the rendered icon; this may be a newly
384 	 *     created icon or a new reference to an internal icon, so you must
385 	 *     not modify the icon. Use g_object_unref() to release your reference
386 	 *     to the icon.
387 	 *
388 	 * Since: 3.8
389 	 *
390 	 * Throws: GException on failure.
391 	 */
392 	public Pixbuf loadIconFinish(AsyncResultIF res)
393 	{
394 		GError* err = null;
395 		
396 		auto p = gtk_icon_info_load_icon_finish(gtkIconInfo, (res is null) ? null : res.getAsyncResultStruct(), &err);
397 		
398 		if (err !is null)
399 		{
400 			throw new GException( new ErrorG(err) );
401 		}
402 		
403 		if(p is null)
404 		{
405 			return null;
406 		}
407 		
408 		return ObjectG.getDObject!(Pixbuf)(cast(GdkPixbuf*) p, true);
409 	}
410 
411 	/**
412 	 * Renders an icon previously looked up in an icon theme using
413 	 * gtk_icon_theme_lookup_icon(); the size will be based on the size
414 	 * passed to gtk_icon_theme_lookup_icon(). Note that the resulting
415 	 * surface may not be exactly this size; an icon theme may have icons
416 	 * that differ slightly from their nominal sizes, and in addition GTK+
417 	 * will avoid scaling icons that it considers sufficiently close to the
418 	 * requested size or for which the source image would have to be scaled
419 	 * up too far. (This maintains sharpness.). This behaviour can be changed
420 	 * by passing the %GTK_ICON_LOOKUP_FORCE_SIZE flag when obtaining
421 	 * the #GtkIconInfo. If this flag has been specified, the pixbuf
422 	 * returned by this function will be scaled to the exact size.
423 	 *
424 	 * Params:
425 	 *     forWindow = #GdkWindow to optimize drawing for, or %NULL
426 	 *
427 	 * Return: the rendered icon; this may be a newly
428 	 *     created icon or a new reference to an internal icon, so you must
429 	 *     not modify the icon. Use cairo_surface_destroy() to release your
430 	 *     reference to the icon.
431 	 *
432 	 * Since: 3.10
433 	 *
434 	 * Throws: GException on failure.
435 	 */
436 	public Surface loadSurface(Window forWindow)
437 	{
438 		GError* err = null;
439 		
440 		auto p = gtk_icon_info_load_surface(gtkIconInfo, (forWindow is null) ? null : forWindow.getWindowStruct(), &err);
441 		
442 		if (err !is null)
443 		{
444 			throw new GException( new ErrorG(err) );
445 		}
446 		
447 		if(p is null)
448 		{
449 			return null;
450 		}
451 		
452 		return new Surface(cast(cairo_surface_t*) p);
453 	}
454 
455 	/**
456 	 * Loads an icon, modifying it to match the system colours for the foreground,
457 	 * success, warning and error colors provided. If the icon is not a symbolic
458 	 * one, the function will return the result from gtk_icon_info_load_icon().
459 	 *
460 	 * This allows loading symbolic icons that will match the system theme.
461 	 *
462 	 * Unless you are implementing a widget, you will want to use
463 	 * g_themed_icon_new_with_default_fallbacks() to load the icon.
464 	 *
465 	 * As implementation details, the icon loaded needs to be of SVG type,
466 	 * contain the “symbolic” term as the last component of the icon name,
467 	 * and use the “fg”, “success”, “warning” and “error” CSS styles in the
468 	 * SVG file itself.
469 	 *
470 	 * See the [Symbolic Icons Specification](http://www.freedesktop.org/wiki/SymbolicIcons)
471 	 * for more information about symbolic icons.
472 	 *
473 	 * Params:
474 	 *     fg = a #GdkRGBA representing the foreground color of the icon
475 	 *     successColor = a #GdkRGBA representing the warning color
476 	 *         of the icon or %NULL to use the default color
477 	 *     warningColor = a #GdkRGBA representing the warning color
478 	 *         of the icon or %NULL to use the default color
479 	 *     errorColor = a #GdkRGBA representing the error color
480 	 *         of the icon or %NULL to use the default color (allow-none)
481 	 *     wasSymbolic = a #gboolean, returns whether the
482 	 *         loaded icon was a symbolic one and whether the @fg color was
483 	 *         applied to it.
484 	 *
485 	 * Return: a #GdkPixbuf representing the loaded icon
486 	 *
487 	 * Since: 3.0
488 	 *
489 	 * Throws: GException on failure.
490 	 */
491 	public Pixbuf loadSymbolic(RGBA fg, RGBA successColor, RGBA warningColor, RGBA errorColor, out bool wasSymbolic)
492 	{
493 		int outwasSymbolic;
494 		GError* err = null;
495 		
496 		auto p = gtk_icon_info_load_symbolic(gtkIconInfo, (fg is null) ? null : fg.getRGBAStruct(), (successColor is null) ? null : successColor.getRGBAStruct(), (warningColor is null) ? null : warningColor.getRGBAStruct(), (errorColor is null) ? null : errorColor.getRGBAStruct(), &outwasSymbolic, &err);
497 		
498 		if (err !is null)
499 		{
500 			throw new GException( new ErrorG(err) );
501 		}
502 		
503 		wasSymbolic = (outwasSymbolic == 1);
504 		
505 		if(p is null)
506 		{
507 			return null;
508 		}
509 		
510 		return ObjectG.getDObject!(Pixbuf)(cast(GdkPixbuf*) p, true);
511 	}
512 
513 	/**
514 	 * Asynchronously load, render and scale a symbolic icon previously looked up
515 	 * from the icon theme using gtk_icon_theme_lookup_icon().
516 	 *
517 	 * For more details, see gtk_icon_info_load_symbolic() which is the synchronous
518 	 * version of this call.
519 	 *
520 	 * Params:
521 	 *     fg = a #GdkRGBA representing the foreground color of the icon
522 	 *     successColor = a #GdkRGBA representing the warning color
523 	 *         of the icon or %NULL to use the default color
524 	 *     warningColor = a #GdkRGBA representing the warning color
525 	 *         of the icon or %NULL to use the default color
526 	 *     errorColor = a #GdkRGBA representing the error color
527 	 *         of the icon or %NULL to use the default color (allow-none)
528 	 *     cancellable = optional #GCancellable object,
529 	 *         %NULL to ignore
530 	 *     callback = a #GAsyncReadyCallback to call when the
531 	 *         request is satisfied
532 	 *     userData = the data to pass to callback function
533 	 *
534 	 * Since: 3.8
535 	 */
536 	public void loadSymbolicAsync(RGBA fg, RGBA successColor, RGBA warningColor, RGBA errorColor, Cancellable cancellable, GAsyncReadyCallback callback, void* userData)
537 	{
538 		gtk_icon_info_load_symbolic_async(gtkIconInfo, (fg is null) ? null : fg.getRGBAStruct(), (successColor is null) ? null : successColor.getRGBAStruct(), (warningColor is null) ? null : warningColor.getRGBAStruct(), (errorColor is null) ? null : errorColor.getRGBAStruct(), (cancellable is null) ? null : cancellable.getCancellableStruct(), callback, userData);
539 	}
540 
541 	/**
542 	 * Finishes an async icon load, see gtk_icon_info_load_symbolic_async().
543 	 *
544 	 * Params:
545 	 *     res = a #GAsyncResult
546 	 *     wasSymbolic = a #gboolean, returns whether the
547 	 *         loaded icon was a symbolic one and whether the @fg color was
548 	 *         applied to it.
549 	 *
550 	 * Return: the rendered icon; this may be a newly
551 	 *     created icon or a new reference to an internal icon, so you must
552 	 *     not modify the icon. Use g_object_unref() to release your reference
553 	 *     to the icon.
554 	 *
555 	 * Since: 3.8
556 	 *
557 	 * Throws: GException on failure.
558 	 */
559 	public Pixbuf loadSymbolicFinish(AsyncResultIF res, out bool wasSymbolic)
560 	{
561 		int outwasSymbolic;
562 		GError* err = null;
563 		
564 		auto p = gtk_icon_info_load_symbolic_finish(gtkIconInfo, (res is null) ? null : res.getAsyncResultStruct(), &outwasSymbolic, &err);
565 		
566 		if (err !is null)
567 		{
568 			throw new GException( new ErrorG(err) );
569 		}
570 		
571 		wasSymbolic = (outwasSymbolic == 1);
572 		
573 		if(p is null)
574 		{
575 			return null;
576 		}
577 		
578 		return ObjectG.getDObject!(Pixbuf)(cast(GdkPixbuf*) p, true);
579 	}
580 
581 	/**
582 	 * Loads an icon, modifying it to match the system colors for the foreground,
583 	 * success, warning and error colors provided. If the icon is not a symbolic
584 	 * one, the function will return the result from gtk_icon_info_load_icon().
585 	 * This function uses the regular foreground color and the symbolic colors
586 	 * with the names “success_color”, “warning_color” and “error_color” from
587 	 * the context.
588 	 *
589 	 * This allows loading symbolic icons that will match the system theme.
590 	 *
591 	 * See gtk_icon_info_load_symbolic() for more details.
592 	 *
593 	 * Params:
594 	 *     context = a #GtkStyleContext
595 	 *     wasSymbolic = a #gboolean, returns whether the
596 	 *         loaded icon was a symbolic one and whether the @fg color was
597 	 *         applied to it.
598 	 *
599 	 * Return: a #GdkPixbuf representing the loaded icon
600 	 *
601 	 * Since: 3.0
602 	 *
603 	 * Throws: GException on failure.
604 	 */
605 	public Pixbuf loadSymbolicForContext(StyleContext context, out bool wasSymbolic)
606 	{
607 		int outwasSymbolic;
608 		GError* err = null;
609 		
610 		auto p = gtk_icon_info_load_symbolic_for_context(gtkIconInfo, (context is null) ? null : context.getStyleContextStruct(), &outwasSymbolic, &err);
611 		
612 		if (err !is null)
613 		{
614 			throw new GException( new ErrorG(err) );
615 		}
616 		
617 		wasSymbolic = (outwasSymbolic == 1);
618 		
619 		if(p is null)
620 		{
621 			return null;
622 		}
623 		
624 		return ObjectG.getDObject!(Pixbuf)(cast(GdkPixbuf*) p, true);
625 	}
626 
627 	/**
628 	 * Asynchronously load, render and scale a symbolic icon previously
629 	 * looked up from the icon theme using gtk_icon_theme_lookup_icon().
630 	 *
631 	 * For more details, see gtk_icon_info_load_symbolic_for_context()
632 	 * which is the synchronous version of this call.
633 	 *
634 	 * Params:
635 	 *     context = a #GtkStyleContext
636 	 *     cancellable = optional #GCancellable object,
637 	 *         %NULL to ignore
638 	 *     callback = a #GAsyncReadyCallback to call when the
639 	 *         request is satisfied
640 	 *     userData = the data to pass to callback function
641 	 *
642 	 * Since: 3.8
643 	 */
644 	public void loadSymbolicForContextAsync(StyleContext context, Cancellable cancellable, GAsyncReadyCallback callback, void* userData)
645 	{
646 		gtk_icon_info_load_symbolic_for_context_async(gtkIconInfo, (context is null) ? null : context.getStyleContextStruct(), (cancellable is null) ? null : cancellable.getCancellableStruct(), callback, userData);
647 	}
648 
649 	/**
650 	 * Finishes an async icon load, see gtk_icon_info_load_symbolic_for_context_async().
651 	 *
652 	 * Params:
653 	 *     res = a #GAsyncResult
654 	 *     wasSymbolic = a #gboolean, returns whether the
655 	 *         loaded icon was a symbolic one and whether the @fg color was
656 	 *         applied to it.
657 	 *
658 	 * Return: the rendered icon; this may be a newly
659 	 *     created icon or a new reference to an internal icon, so you must
660 	 *     not modify the icon. Use g_object_unref() to release your reference
661 	 *     to the icon.
662 	 *
663 	 * Since: 3.8
664 	 *
665 	 * Throws: GException on failure.
666 	 */
667 	public Pixbuf loadSymbolicForContextFinish(AsyncResultIF res, out bool wasSymbolic)
668 	{
669 		int outwasSymbolic;
670 		GError* err = null;
671 		
672 		auto p = gtk_icon_info_load_symbolic_for_context_finish(gtkIconInfo, (res is null) ? null : res.getAsyncResultStruct(), &outwasSymbolic, &err);
673 		
674 		if (err !is null)
675 		{
676 			throw new GException( new ErrorG(err) );
677 		}
678 		
679 		wasSymbolic = (outwasSymbolic == 1);
680 		
681 		if(p is null)
682 		{
683 			return null;
684 		}
685 		
686 		return ObjectG.getDObject!(Pixbuf)(cast(GdkPixbuf*) p, true);
687 	}
688 
689 	/**
690 	 * Loads an icon, modifying it to match the system colours for the foreground,
691 	 * success, warning and error colors provided. If the icon is not a symbolic
692 	 * one, the function will return the result from gtk_icon_info_load_icon().
693 	 *
694 	 * This allows loading symbolic icons that will match the system theme.
695 	 *
696 	 * See gtk_icon_info_load_symbolic() for more details.
697 	 *
698 	 * Deprecated: Use gtk_icon_info_load_symbolic_for_context() instead
699 	 *
700 	 * Params:
701 	 *     style = a #GtkStyle to take the colors from
702 	 *     state = the widget state to use for colors
703 	 *     wasSymbolic = a #gboolean, returns whether the
704 	 *         loaded icon was a symbolic one and whether the @fg color was
705 	 *         applied to it.
706 	 *
707 	 * Return: a #GdkPixbuf representing the loaded icon
708 	 *
709 	 * Since: 3.0
710 	 *
711 	 * Throws: GException on failure.
712 	 */
713 	public Pixbuf loadSymbolicForStyle(Style style, GtkStateType state, out bool wasSymbolic)
714 	{
715 		int outwasSymbolic;
716 		GError* err = null;
717 		
718 		auto p = gtk_icon_info_load_symbolic_for_style(gtkIconInfo, (style is null) ? null : style.getStyleStruct(), state, &outwasSymbolic, &err);
719 		
720 		if (err !is null)
721 		{
722 			throw new GException( new ErrorG(err) );
723 		}
724 		
725 		wasSymbolic = (outwasSymbolic == 1);
726 		
727 		if(p is null)
728 		{
729 			return null;
730 		}
731 		
732 		return ObjectG.getDObject!(Pixbuf)(cast(GdkPixbuf*) p, true);
733 	}
734 
735 	/**
736 	 * Sets whether the coordinates returned by gtk_icon_info_get_embedded_rect()
737 	 * and gtk_icon_info_get_attach_points() should be returned in their
738 	 * original form as specified in the icon theme, instead of scaled
739 	 * appropriately for the pixbuf returned by gtk_icon_info_load_icon().
740 	 *
741 	 * Raw coordinates are somewhat strange; they are specified to be with
742 	 * respect to the unscaled pixmap for PNG and XPM icons, but for SVG
743 	 * icons, they are in a 1000x1000 coordinate space that is scaled
744 	 * to the final size of the icon.  You can determine if the icon is an SVG
745 	 * icon by using gtk_icon_info_get_filename(), and seeing if it is non-%NULL
746 	 * and ends in “.svg”.
747 	 *
748 	 * This function is provided primarily to allow compatibility wrappers
749 	 * for older API's, and is not expected to be useful for applications.
750 	 *
751 	 * Deprecated: Embedded rectangles and attachment points are deprecated
752 	 *
753 	 * Params:
754 	 *     rawCoordinates = whether the coordinates of embedded rectangles
755 	 *         and attached points should be returned in their original
756 	 *         (unscaled) form.
757 	 *
758 	 * Since: 2.4
759 	 */
760 	public void setRawCoordinates(bool rawCoordinates)
761 	{
762 		gtk_icon_info_set_raw_coordinates(gtkIconInfo, rawCoordinates);
763 	}
764 }