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 module atk.HyperlinkImplT;
26 
27 public  import atk.Hyperlink;
28 public  import atk.c.functions;
29 public  import atk.c.types;
30 public  import gobject.ObjectG;
31 public  import gtkc.atktypes;
32 
33 
34 /**
35  * AtkHyperlinkImpl allows AtkObjects to refer to their associated
36  * AtkHyperlink instance, if one exists.  AtkHyperlinkImpl differs
37  * from AtkHyperlink in that AtkHyperlinkImpl is an interface, whereas
38  * AtkHyperlink is a object type.  The AtkHyperlinkImpl interface
39  * allows a client to query an AtkObject for the availability of an
40  * associated AtkHyperlink instance, and obtain that instance.  It is
41  * thus particularly useful in cases where embedded content or inline
42  * content within a text object is present, since the embedding text
43  * object implements AtkHypertext and the inline/embedded objects are
44  * exposed as children which implement AtkHyperlinkImpl, in addition
45  * to their being obtainable via AtkHypertext:getLink followed by
46  * AtkHyperlink:getObject.
47  * 
48  * The AtkHyperlinkImpl interface should be supported by objects
49  * exposed within the hierarchy as children of an AtkHypertext
50  * container which correspond to "links" or embedded content within
51  * the text.  HTML anchors are not, for instance, normally exposed
52  * this way, but embedded images and components which appear inline in
53  * the content of a text object are. The AtkHyperlinkIface interface
54  * allows a means of determining which children are hyperlinks in this
55  * sense of the word, and for obtaining their corresponding
56  * AtkHyperlink object, from which the embedding range, URI, etc. can
57  * be obtained.
58  * 
59  * To some extent this interface exists because, for historical
60  * reasons, AtkHyperlink was defined as an object type, not an
61  * interface.  Thus, in order to interact with AtkObjects via
62  * AtkHyperlink semantics, a new interface was required.
63  */
64 public template HyperlinkImplT(TStruct)
65 {
66 	/** Get the main Gtk struct */
67 	public AtkHyperlinkImpl* getHyperlinkImplStruct(bool transferOwnership = false)
68 	{
69 		if (transferOwnership)
70 			ownedRef = false;
71 		return cast(AtkHyperlinkImpl*)getStruct();
72 	}
73 
74 
75 	/**
76 	 * Gets the hyperlink associated with this object.
77 	 *
78 	 * Returns: an AtkHyperlink object which points to this
79 	 *     implementing AtkObject.
80 	 *
81 	 * Since: 1.12
82 	 */
83 	public Hyperlink getHyperlink()
84 	{
85 		auto __p = atk_hyperlink_impl_get_hyperlink(getHyperlinkImplStruct());
86 
87 		if(__p is null)
88 		{
89 			return null;
90 		}
91 
92 		return ObjectG.getDObject!(Hyperlink)(cast(AtkHyperlink*) __p, true);
93 	}
94 }