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 atk.ImageT;
26 
27 public  import glib.Str;
28 public  import gtkc.atk;
29 public  import gtkc.atktypes;
30 
31 
32 /**
33  * #AtkImage should be implemented by #AtkObject subtypes on behalf of
34  * components which display image/pixmap information onscreen, and
35  * which provide information (other than just widget borders, etc.)
36  * via that image content.  For instance, icons, buttons with icons,
37  * toolbar elements, and image viewing panes typically should
38  * implement #AtkImage.
39  * 
40  * #AtkImage primarily provides two types of information: coordinate
41  * information (useful for screen review mode of screenreaders, and
42  * for use by onscreen magnifiers), and descriptive information.  The
43  * descriptive information is provided for alternative, text-only
44  * presentation of the most significant information present in the
45  * image.
46  */
47 public template ImageT(TStruct)
48 {
49 	/** Get the main Gtk struct */
50 	public AtkImage* getImageStruct()
51 	{
52 		return cast(AtkImage*)getStruct();
53 	}
54 
55 
56 	/**
57 	 * Get a textual description of this image.
58 	 *
59 	 * Returns: a string representing the image description
60 	 */
61 	public string getImageDescription()
62 	{
63 		return Str.toString(atk_image_get_image_description(getImageStruct()));
64 	}
65 
66 	/**
67 	 * Returns: a string corresponding to the POSIX
68 	 *     LC_MESSAGES locale used by the image description, or %NULL if the
69 	 *     image does not specify a locale.
70 	 *
71 	 * Since: 1.12
72 	 */
73 	public string getImageLocale()
74 	{
75 		return Str.toString(atk_image_get_image_locale(getImageStruct()));
76 	}
77 
78 	/**
79 	 * Gets the position of the image in the form of a point specifying the
80 	 * images top-left corner.
81 	 *
82 	 * Params:
83 	 *     x = address of #gint to put x coordinate position; otherwise, -1 if value cannot be obtained.
84 	 *     y = address of #gint to put y coordinate position; otherwise, -1 if value cannot be obtained.
85 	 *     coordType = specifies whether the coordinates are relative to the screen
86 	 *         or to the components top level window
87 	 */
88 	public void getImagePosition(out int x, out int y, AtkCoordType coordType)
89 	{
90 		atk_image_get_image_position(getImageStruct(), &x, &y, coordType);
91 	}
92 
93 	/**
94 	 * Get the width and height in pixels for the specified image.
95 	 * The values of @width and @height are returned as -1 if the
96 	 * values cannot be obtained (for instance, if the object is not onscreen).
97 	 *
98 	 * Params:
99 	 *     width = filled with the image width, or -1 if the value cannot be obtained.
100 	 *     height = filled with the image height, or -1 if the value cannot be obtained.
101 	 */
102 	public void getImageSize(out int width, out int height)
103 	{
104 		atk_image_get_image_size(getImageStruct(), &width, &height);
105 	}
106 
107 	/**
108 	 * Sets the textual description for this image.
109 	 *
110 	 * Params:
111 	 *     description = a string description to set for @image
112 	 *
113 	 * Returns: boolean TRUE, or FALSE if operation could
114 	 *     not be completed.
115 	 */
116 	public bool setImageDescription(string description)
117 	{
118 		return atk_image_set_image_description(getImageStruct(), Str.toStringz(description)) != 0;
119 	}
120 }