I've no idea here...
[gtkD.git] / src / atk / Image.d
blob1bbec878e16b8d7dc136a0c0755c07c21308b240
1 /*
2 * This file is part of duit.
4 * duit 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 * duit 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 duit; 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 * local aliases:
49 module atk.Image;
51 private import atk.atktypes;
53 private import lib.atk;
55 private import glib.Str;
57 /**
58 * Description
59 * AtkImage should be implemented by AtkObject subtypes on behalf of
60 * components which display image/pixmap information onscreen, and which
61 * provide information (other than just widget borders, etc.) via that
62 * image content. For instance, icons, buttons with icons, toolbar
63 * elements, and image viewing panes typically should implement AtkImage.
64 * AtkImage primarily provides two types of information: coordinate
65 * information (useful for screen review mode of screenreaders, and for use
66 * by onscreen magnifiers), and descriptive information. The descriptive
67 * information is provided for alternative, text-only presentation of the
68 * most significant information present in the image.
70 public class Image
73 /** the main Gtk struct */
74 protected AtkImage* atkImage;
77 public AtkImage* getImageStruct()
79 return atkImage;
83 /** the main Gtk struct as a void* */
84 protected void* getStruct()
86 return cast(void*)atkImage;
89 /**
90 * Sets our main struct and passes it to the parent class
92 public this (AtkImage* atkImage)
94 this.atkImage = atkImage;
97 /**
102 * Gets the position of the image in the form of a point specifying the
103 * images top-left corner.
104 * image:
105 * a GObject instance that implements AtkImageIface
106 * x:
107 * address of gint to put x coordinate position; otherwise, -1 if value cannot be obtained.
108 * y:
109 * address of gint to put y coordinate position; otherwise, -1 if value cannot be obtained.
110 * coord_type:
111 * specifies whether the coordinates are relative to the screen
112 * or to the components top level window
114 public void getImagePosition(int* x, int* y, AtkCoordType coordType)
116 // void atk_image_get_image_position (AtkImage *image, gint *x, gint *y, AtkCoordType coord_type);
117 atk_image_get_image_position(atkImage, x, y, coordType);
121 * Get a textual description of this image.
122 * image:
123 * a GObject instance that implements AtkImageIface
124 * Returns:
125 * a string representing the image description
127 public char[] getImageDescription()
129 // const gchar* atk_image_get_image_description (AtkImage *image);
130 return Str.toString(atk_image_get_image_description(atkImage) );
134 * Sets the textual description for this image.
135 * image:
136 * a GObject instance that implements AtkImageIface
137 * description:
138 * a string description to set for image
139 * Returns:
140 * boolean TRUE, or FALSE if operation could
141 * not be completed.
143 public int setImageDescription(char[] description)
145 // gboolean atk_image_set_image_description (AtkImage *image, const gchar *description);
146 return atk_image_set_image_description(atkImage, Str.toStringz(description));
150 * Get the width and height in pixels for the specified image.
151 * The values of width and height are returned as -1 if the
152 * values cannot be obtained (for instance, if the object is not onscreen).
153 * image:
154 * a GObject instance that implements AtkImageIface
155 * width:
156 * filled with the image width, or -1 if the value cannot be obtained.
157 * height:
158 * filled with the image height, or -1 if the value cannot be obtained.
160 public void getImageSize(int* width, int* height)
162 // void atk_image_get_image_size (AtkImage *image, gint *width, gint *height);
163 atk_image_get_image_size(atkImage, width, height);
167 * Since ATK 1.12
168 * image:
169 * An AtkImage
170 * Returns:
171 * a string corresponding to the POSIX LC_MESSAGES locale used by the image description, or NULL if the image does not specify a locale.
173 public char[] getImageLocale()
175 // const gchar* atk_image_get_image_locale (AtkImage *image);
176 return Str.toString(atk_image_get_image_locale(atkImage) );