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  * Conversion parameters:
26  * inFile  = AtkImage.html
27  * outPack = atk
28  * outFile = Image
29  * strct   = AtkImage
30  * realStrct=
31  * ctorStrct=
32  * clss    = Image
33  * interf  = 
34  * class Code: No
35  * interface Code: No
36  * template for:
37  * extend  = 
38  * implements:
39  * prefixes:
40  * 	- atk_image_
41  * omit structs:
42  * omit prefixes:
43  * omit code:
44  * omit signals:
45  * imports:
46  * 	- glib.Str
47  * structWrap:
48  * module aliases:
49  * local aliases:
50  * overrides:
51  */
52 
53 module atk.Image;
54 
55 public  import gtkc.atktypes;
56 
57 private import gtkc.atk;
58 private import glib.ConstructionException;
59 private import gobject.ObjectG;
60 
61 private import glib.Str;
62 
63 
64 
65 /**
66  * AtkImage should be implemented by AtkObject subtypes on behalf of
67  * components which display image/pixmap information onscreen, and
68  * which provide information (other than just widget borders, etc.)
69  * via that image content. For instance, icons, buttons with icons,
70  * toolbar elements, and image viewing panes typically should
71  * implement AtkImage.
72  *
73  * AtkImage primarily provides two types of information: coordinate
74  * information (useful for screen review mode of screenreaders, and
75  * for use by onscreen magnifiers), and descriptive information. The
76  * descriptive information is provided for alternative, text-only
77  * presentation of the most significant information present in the
78  * image.
79  */
80 public class Image
81 {
82 	
83 	/** the main Gtk struct */
84 	protected AtkImage* atkImage;
85 	
86 	
87 	/** Get the main Gtk struct */
88 	public AtkImage* getImageStruct()
89 	{
90 		return atkImage;
91 	}
92 	
93 	
94 	/** the main Gtk struct as a void* */
95 	protected void* getStruct()
96 	{
97 		return cast(void*)atkImage;
98 	}
99 	
100 	/**
101 	 * Sets our main struct and passes it to the parent class
102 	 */
103 	public this (AtkImage* atkImage)
104 	{
105 		this.atkImage = atkImage;
106 	}
107 	
108 	/**
109 	 */
110 	
111 	/**
112 	 * Gets the position of the image in the form of a point specifying the
113 	 * images top-left corner.
114 	 * Params:
115 	 * x = address of gint to put x coordinate position; otherwise, -1 if value cannot be obtained.
116 	 * y = address of gint to put y coordinate position; otherwise, -1 if value cannot be obtained.
117 	 * coordType = specifies whether the coordinates are relative to the screen
118 	 * or to the components top level window
119 	 */
120 	public void getImagePosition(out int x, out int y, AtkCoordType coordType)
121 	{
122 		// void atk_image_get_image_position (AtkImage *image,  gint *x,  gint *y,  AtkCoordType coord_type);
123 		atk_image_get_image_position(atkImage, &x, &y, coordType);
124 	}
125 	
126 	/**
127 	 * Get a textual description of this image.
128 	 * Returns: a string representing the image description
129 	 */
130 	public string getImageDescription()
131 	{
132 		// const gchar * atk_image_get_image_description (AtkImage *image);
133 		return Str.toString(atk_image_get_image_description(atkImage));
134 	}
135 	
136 	/**
137 	 * Sets the textual description for this image.
138 	 * Params:
139 	 * description = a string description to set for image
140 	 * Returns: boolean TRUE, or FALSE if operation could not be completed.
141 	 */
142 	public int setImageDescription(string description)
143 	{
144 		// gboolean atk_image_set_image_description (AtkImage *image,  const gchar *description);
145 		return atk_image_set_image_description(atkImage, Str.toStringz(description));
146 	}
147 	
148 	/**
149 	 * Get the width and height in pixels for the specified image.
150 	 * The values of width and height are returned as -1 if the
151 	 * values cannot be obtained (for instance, if the object is not onscreen).
152 	 * Params:
153 	 * width = filled with the image width, or -1 if the value cannot be obtained.
154 	 * height = filled with the image height, or -1 if the value cannot be obtained.
155 	 */
156 	public void getImageSize(out int width, out int height)
157 	{
158 		// void atk_image_get_image_size (AtkImage *image,  gint *width,  gint *height);
159 		atk_image_get_image_size(atkImage, &width, &height);
160 	}
161 	
162 	/**
163 	 * Since ATK 1.12
164 	 * Returns: a string corresponding to the POSIX LC_MESSAGES locale used by the image description, or NULL if the image does not specify a locale.
165 	 */
166 	public string getImageLocale()
167 	{
168 		// const gchar * atk_image_get_image_locale (AtkImage *image);
169 		return Str.toString(atk_image_get_image_locale(atkImage));
170 	}
171 }