Wrote the README_GIT file to be a proper tutorial on git, repo.or.cz and gtkD.
[gtkD.git] / gtkD / src / atk / Image.d
blob4e982ab0ce14ccd3d9d0269cd1ed449f8239ecc1
1 /*
2 * This file is part of gtkD.
4 * gtkD is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU Lesser General Public License as published by
6 * the Free Software Foundation; either version 2.1 of the License, or
7 * (at your option) any later version.
9 * gtkD is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public License
15 * along with gtkD; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 // generated automatically - do not change
20 // find conversion definition on APILookup.txt
21 // implement new conversion functionalities on the wrap.utils pakage
24 * Conversion parameters:
25 * inFile = AtkImage.html
26 * outPack = atk
27 * outFile = Image
28 * strct = AtkImage
29 * realStrct=
30 * ctorStrct=
31 * clss = Image
32 * interf =
33 * class Code: No
34 * interface Code: No
35 * template for:
36 * extend =
37 * implements:
38 * prefixes:
39 * - atk_image_
40 * omit structs:
41 * omit prefixes:
42 * omit code:
43 * imports:
44 * - glib.Str
45 * structWrap:
46 * module aliases:
47 * local aliases:
50 module atk.Image;
52 version(noAssert)
54 version(Tango)
56 import tango.io.Stdout; // use the tango loging?
60 private import gtkc.atktypes;
62 private import gtkc.atk;
65 private import glib.Str;
70 /**
71 * Description
72 * AtkImage should be implemented by AtkObject subtypes on behalf of
73 * components which display image/pixmap information onscreen, and which
74 * provide information (other than just widget borders, etc.) via that
75 * image content. For instance, icons, buttons with icons, toolbar
76 * elements, and image viewing panes typically should implement AtkImage.
77 * AtkImage primarily provides two types of information: coordinate
78 * information (useful for screen review mode of screenreaders, and for use
79 * by onscreen magnifiers), and descriptive information. The descriptive
80 * information is provided for alternative, text-only presentation of the
81 * most significant information present in the image.
83 public class Image
86 /** the main Gtk struct */
87 protected AtkImage* atkImage;
90 public AtkImage* getImageStruct()
92 return atkImage;
96 /** the main Gtk struct as a void* */
97 protected void* getStruct()
99 return cast(void*)atkImage;
103 * Sets our main struct and passes it to the parent class
105 public this (AtkImage* atkImage)
107 version(noAssert)
109 if ( atkImage is null )
111 int zero = 0;
112 version(Tango)
114 Stdout("struct atkImage is null on constructor").newline;
116 else
118 printf("struct atkImage is null on constructor");
120 zero = zero / zero;
123 else
125 assert(atkImage !is null, "struct atkImage is null on constructor");
127 this.atkImage = atkImage;
135 * Gets the position of the image in the form of a point specifying the
136 * images top-left corner.
137 * image:
138 * a GObject instance that implements AtkImageIface
139 * x:
140 * address of gint to put x coordinate position; otherwise, -1 if value cannot be obtained.
141 * y:
142 * address of gint to put y coordinate position; otherwise, -1 if value cannot be obtained.
143 * coord_type:
144 * specifies whether the coordinates are relative to the screen
145 * or to the components top level window
147 public void getImagePosition(int* x, int* y, AtkCoordType coordType)
149 // void atk_image_get_image_position (AtkImage *image, gint *x, gint *y, AtkCoordType coord_type);
150 atk_image_get_image_position(atkImage, x, y, coordType);
154 * Get a textual description of this image.
155 * image:
156 * a GObject instance that implements AtkImageIface
157 * Returns:
158 * a string representing the image description
160 public char[] getImageDescription()
162 // const gchar* atk_image_get_image_description (AtkImage *image);
163 return Str.toString(atk_image_get_image_description(atkImage) );
167 * Sets the textual description for this image.
168 * image:
169 * a GObject instance that implements AtkImageIface
170 * description:
171 * a string description to set for image
172 * Returns:
173 * boolean TRUE, or FALSE if operation could
174 * not be completed.
176 public int setImageDescription(char[] description)
178 // gboolean atk_image_set_image_description (AtkImage *image, const gchar *description);
179 return atk_image_set_image_description(atkImage, Str.toStringz(description));
183 * Get the width and height in pixels for the specified image.
184 * The values of width and height are returned as -1 if the
185 * values cannot be obtained (for instance, if the object is not onscreen).
186 * image:
187 * a GObject instance that implements AtkImageIface
188 * width:
189 * filled with the image width, or -1 if the value cannot be obtained.
190 * height:
191 * filled with the image height, or -1 if the value cannot be obtained.
193 public void getImageSize(int* width, int* height)
195 // void atk_image_get_image_size (AtkImage *image, gint *width, gint *height);
196 atk_image_get_image_size(atkImage, width, height);
200 * Since ATK 1.12
201 * image:
202 * An AtkImage
203 * Returns:
204 * a string corresponding to the POSIX LC_MESSAGES locale used by the image description, or NULL if the image does not specify a locale.
206 public char[] getImageLocale()
208 // const gchar* atk_image_get_image_locale (AtkImage *image);
209 return Str.toString(atk_image_get_image_locale(atkImage) );