introspection: merge fixes from Vala bindings
[platform/upstream/atk.git] / atk / atkhyperlinkimpl.c
1 /* ATK -  Accessibility Toolkit
2  * Copyright 2006 Sun Microsystems Inc.
3  *
4  * This library is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU Lesser General Public
6  * License as published by the Free Software Foundation; either
7  * version 2 of the License, or (at your option) any later version.
8  *
9  * This library 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 GNU
12  * Lesser General Public License for more details.
13  *
14  * You should have received a copy of the GNU Lesser General Public
15  * License along with this library; if not, write to the
16  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
17  * Boston, MA 02111-1307, USA.
18  */
19
20 #include <string.h>
21 #include "atkhyperlinkimpl.h"
22
23 GType
24 atk_hyperlink_impl_get_type (void)
25 {
26   static GType type = 0;
27
28   if (!type) {
29     GTypeInfo tinfo =
30     {
31       sizeof (AtkHyperlinkImplIface),
32       (GBaseInitFunc) NULL,
33       (GBaseFinalizeFunc) NULL,
34
35     };
36
37     type = g_type_register_static (G_TYPE_INTERFACE, "AtkHyperlinkImpl", &tinfo, 0);
38   }
39
40   return type;
41 }
42
43 /**
44  * atk_hyperlink_impl_get_hyperlink:
45  * @impl: a #GObject instance that implements AtkHyperlinkImplIface
46  *
47  * Gets the hyperlink associated with this object.
48  *
49  * Returns: (transfer full):  an AtkHyperlink object which points to this
50  * implementing AtkObject.
51  *
52  * Since: 1.12
53  **/
54 AtkHyperlink *
55 atk_hyperlink_impl_get_hyperlink (AtkHyperlinkImpl *impl)
56 {
57   AtkHyperlinkImplIface *iface;
58
59   g_return_val_if_fail (impl != NULL, NULL);
60   g_return_val_if_fail (ATK_IS_HYPERLINK_IMPL (impl), NULL);
61
62   iface = ATK_HYPERLINK_IMPL_GET_IFACE (impl);
63
64   if (iface->get_hyperlink)
65     {
66       return (iface->get_hyperlink) (impl);
67     }
68   return NULL;
69 }
70