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 = AtkHyperlink.html
28 * strct = AtkHyperlink
51 private import atk
.atktypes
;
53 private import lib
.atk
;
55 private import glib
.Str
;
59 * An ATK object which encapsulates a link or set of links
60 * (for instance in the case of client-side image maps) in a hypertext document.
61 * It may implement the AtkAction interface. AtkHyperlink may also be used
62 * to refer to inline embedded content, since it allows specification of a start
63 * and end offset within the host AtkHypertext object.
65 private import gobject
.ObjectG
;
66 public class Hyperlink
: ObjectG
69 /** the main Gtk struct */
70 protected AtkHyperlink
* atkHyperlink
;
73 public AtkHyperlink
* getHyperlinkStruct()
79 /** the main Gtk struct as a void* */
80 protected void* getStruct()
82 return cast(void*)atkHyperlink
;
86 * Sets our main struct and passes it to the parent class
88 public this (AtkHyperlink
* atkHyperlink
)
90 super(cast(GObject
*)atkHyperlink
);
91 this.atkHyperlink
= atkHyperlink
;
97 // imports for the signal processing
98 private import gobject
.Signals
;
99 private import gdk
.gdktypes
;
100 int[char[]] connectedSignals
;
102 void delegate(Hyperlink
)[] onLinkActivatedListeners
;
103 void addOnLinkActivated(void delegate(Hyperlink
) dlg
)
105 if ( !("link-activated" in connectedSignals
) )
110 cast(GCallback
)&callBackLinkActivated
,
113 cast(ConnectFlags
)0);
114 connectedSignals
["link-activated"] = 1;
116 onLinkActivatedListeners
~= dlg
;
118 extern(C
) static void callBackLinkActivated(AtkHyperlink
* atkhyperlinkStruct
, Hyperlink hyperlink
)
120 bit consumed
= false;
122 foreach ( void delegate(Hyperlink
) dlg
; hyperlink
.onLinkActivatedListeners
)
134 * Get a the URI associated with the anchor specified
136 * Multiple anchors are primarily used by client-side image maps.
140 * a (zero-index) integer specifying the desired anchor
142 * a string specifying the URI
144 public char[] _GetUri(int i
)
146 // gchar* atk_hyperlink_get_uri (AtkHyperlink *link_, gint i);
147 return Str
.toString(atk_hyperlink_get_uri(atkHyperlink
, i
) );
151 * Returns the item associated with this hyperlinks nth anchor.
152 * For instance, the returned AtkObject will implement AtkText
153 * if link_ is a text hyperlink, AtkImage if link_ is an image
155 * Multiple anchors are primarily used by client-side image maps.
159 * a (zero-index) integer specifying the desired anchor
161 * an AtkObject associated with this hyperlinks i-th anchor
163 public AtkObject
* _GetObject(int i
)
165 // AtkObject* atk_hyperlink_get_object (AtkHyperlink *link_, gint i);
166 return atk_hyperlink_get_object(atkHyperlink
, i
);
170 * Gets the index with the hypertext document at which this link ends.
174 * the index with the hypertext document at which this link ends
176 public int _GetEndIndex()
178 // gint atk_hyperlink_get_end_index (AtkHyperlink *link_);
179 return atk_hyperlink_get_end_index(atkHyperlink
);
183 * Gets the index with the hypertext document at which this link begins.
187 * the index with the hypertext document at which this link begins
189 public int _GetStartIndex()
191 // gint atk_hyperlink_get_start_index (AtkHyperlink *link_);
192 return atk_hyperlink_get_start_index(atkHyperlink
);
196 * Since the document that a link is associated with may have changed
197 * this method returns TRUE if the link is still valid (with
198 * respect to the document it references) and FALSE otherwise.
202 * whether or not this link is still valid
204 public int _IsValid()
206 // gboolean atk_hyperlink_is_valid (AtkHyperlink *link_);
207 return atk_hyperlink_is_valid(atkHyperlink
);
211 * Indicates whether the link currently displays some or all of its
212 * content inline. Ordinary HTML links will usually return
213 * FALSE, but an inline lt;srcgt; HTML element will return
219 * whether or not this link displays its content inline.
221 public int _IsInline()
223 // gboolean atk_hyperlink_is_inline (AtkHyperlink *link_);
224 return atk_hyperlink_is_inline(atkHyperlink
);
228 * Gets the number of anchors associated with this hyperlink.
232 * the number of anchors associated with this hyperlink
234 public int _GetNAnchors()
236 // gint atk_hyperlink_get_n_anchors (AtkHyperlink *link_);
237 return atk_hyperlink_get_n_anchors(atkHyperlink
);
241 * Determines whether this AtkHyperlink is selected
246 * True is the AtkHyperlink is selected, False otherwise
248 * @Deprecated: This method is deprecated since ATK version 1.8.
249 * Please use ATK_STATE_SELECTED to indicate when a hyperlink within a
250 * Hypertext container is selected.
252 * The "end-index" property
253 * "end-index" gint : Read
254 * The end index of the AtkHyperlink object.
255 * Allowed values: >= 0
258 public int _IsSelectedLink()
260 // gboolean atk_hyperlink_is_selected_link (AtkHyperlink *link_);
261 return atk_hyperlink_is_selected_link(atkHyperlink
);