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
56 import tango
.io
.Stdout
; // use the tango loging?
60 private import gtkc
.atktypes
;
62 private import gtkc
.atk
;
65 private import glib
.Str
;
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.
86 /** the main Gtk struct */
87 protected AtkImage
* atkImage
;
90 public AtkImage
* getImageStruct()
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
)
109 if ( atkImage
is null )
114 Stdout("struct atkImage is null on constructor").newline
;
118 printf("struct atkImage is null on constructor");
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.
138 * a GObject instance that implements AtkImageIface
140 * address of gint to put x coordinate position; otherwise, -1 if value cannot be obtained.
142 * address of gint to put y coordinate position; otherwise, -1 if value cannot be obtained.
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.
156 * a GObject instance that implements AtkImageIface
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.
169 * a GObject instance that implements AtkImageIface
171 * a string description to set for image
173 * boolean TRUE, or FALSE if operation could
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).
187 * a GObject instance that implements AtkImageIface
189 * filled with the image width, or -1 if the value cannot be obtained.
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
);
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
) );