summaryrefslogtreecommitdiff
path: root/src/libical-glib/api/i-cal-geo.xml
blob: cf647976d3ce9f8da999779da475fd9f93719346 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
<!--
  Copyright (C) 2015 William Yu <williamyu@gnome.org>

  This library is free software: you can redistribute it and/or modify it
  under the terms of version 2.1. of the GNU Lesser General Public License
  as published by the Free Software Foundation.

  This library is distributed in the hope that it will be useful, but
  WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
  or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
  for more details.

  You should have received a copy of the GNU Lesser General Public License
  along with this library. If not, see <https://www.gnu.org/licenses/>.
-->
<structure namespace="ICal" name="Geo" native="struct icalgeotype" is_bare="true" default_native="i_cal_geo_new_default ()">
    <method name="i_cal_geo_new_default" corresponds="CUSTOM" annotation="skip" kind="private" since="1.0">
        <returns type="struct icalgeotype" annotation="transfer full" comment="The newly created #ICalGeo" />
        <comment xml:space="preserve">Creates a new default #ICalGeo.</comment>
        <custom>	struct icalgeotype geotype;
	geotype.lat = 0;
	geotype.lon = 0;
	return geotype;</custom>
    </method>
    <method name="i_cal_geo_new" corresponds="CUSTOM" kind="constructor" since="1.0">
        <parameter type="gdouble" name="lat" comment="Latitude"/>
        <parameter type="gdouble" name="lon" comment="Longitude"/>
        <returns type="ICalGeo *" annotation="transfer full" comment="The newly created #ICalGeo." />
        <comment xml:space="preserve">Creates a new #ICalGeo.</comment>
        <custom>    struct icalgeotype geo;

    geo = i_cal_geo_new_default();
    geo.lat = lat;
    geo.lon = lon;

    return i_cal_geo_new_full(geo);</custom>
    </method>
    <method name="i_cal_geo_clone" corresponds="CUSTOM" kind="clone" since="1.0">
        <parameter type="const ICalGeo *" name="geo" comment="The #ICalGeo to clone"/>
        <returns type="ICalGeo *" annotation="transfer full" comment="The newly created #ICalGeo, copy of @geo." />
        <comment xml:space="preserve">Creates a new #ICalGeo, copy of @geo.</comment>
        <custom>    struct icalgeotype *src;

    g_return_val_if_fail(I_CAL_IS_GEO(geo), NULL);

    src = (struct icalgeotype *)i_cal_object_get_native((ICalObject *)geo);
    g_return_val_if_fail(src != NULL, NULL);

    return i_cal_geo_new_full(*src);</custom>
    </method>
    <method name="i_cal_geo_get_lat" corresponds="CUSTOM" kind="get" since="1.0">
	<parameter type="ICalGeo *" name="geo" comment="The #ICalGeo to be queried"/>
        <returns type="gdouble" comment="The latitude." />
        <comment xml:space="preserve">Gets the latitude of #ICalGeo.</comment>
        <custom>	g_return_val_if_fail (geo != NULL, 0);
	return ((struct icalgeotype *)i_cal_object_get_native ((ICalObject *)geo))->lat;</custom>
    </method>
    <method name="i_cal_geo_set_lat" corresponds="CUSTOM" kind="set" since="1.0">
        <parameter type="ICalGeo *" name="geo" comment="The #ICalGeo to be set"/>
        <parameter type="gdouble" name="lat" comment="The latitude"/>
        <comment>Sets the latitude of #ICalGeo.</comment>
        <custom>	g_return_if_fail (geo != NULL &amp;&amp; I_CAL_IS_GEO (geo));
	((struct icalgeotype *)i_cal_object_get_native ((ICalObject *)geo))->lat = lat;</custom>
    </method>
    <method name="i_cal_geo_get_lon" corresponds="CUSTOM" kind="get" since="1.0">
	<parameter type="ICalGeo *" name="geo" comment="The #ICalGeo to be queried"/>
        <returns type="gdouble" comment="The longitude." />
        <comment xml:space="preserve">Gets the longitude of #ICalGeo.</comment>
        <custom>	g_return_val_if_fail (geo != NULL, 0);
	return ((struct icalgeotype *)i_cal_object_get_native ((ICalObject *)geo))->lon;</custom>
    </method>
    <method name="i_cal_geo_set_lon" corresponds="CUSTOM" kind="set" since="1.0">
        <parameter type="ICalGeo *" name="geo" comment="The #ICalGeo to be set"/>
        <parameter type="gdouble" name="lon" comment="The longitude"/>
        <comment>Sets the longitude of #ICalGeo.</comment>
        <custom>	g_return_if_fail (geo != NULL &amp;&amp; I_CAL_IS_GEO (geo));
	((struct icalgeotype *)i_cal_object_get_native ((ICalObject *)geo))->lon = lon;</custom>
    </method>
</structure>