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