summaryrefslogtreecommitdiff
path: root/src/libical-glib/api/i-cal-geo.xml
blob: 644f5edfd639af41e80638469558223c359c54d0 (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
<!--
  SPDX-FileCopyrightText: 2015 William Yu <williamyu@gnome.org>

  SPDX-License-Identifier: LGPL-2.1-only OR MPL-2.0


-->
<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;
  memset(geotype.lat, 0, ICAL_GEO_LEN);
  memset(geotype.lon, 0, ICAL_GEO_LEN);
	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();
    g_ascii_dtostr(geo.lat, ICAL_GEO_LEN, lat);
    g_ascii_dtostr(geo.lon, ICAL_GEO_LEN, 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((ICalGeo *)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>    struct icalgeotype *native;
    g_return_val_if_fail (geo != NULL, 0);
    native = (struct icalgeotype *)i_cal_object_get_native ((ICalObject *)geo);
    return g_ascii_strtod(native->lat, NULL);</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>    struct icalgeotype *native;
    g_return_if_fail (geo != NULL &amp;&amp; I_CAL_IS_GEO (geo));
    native = (struct icalgeotype *)i_cal_object_get_native ((ICalObject *)geo);
    g_ascii_dtostr(native->lat, ICAL_GEO_LEN, 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>    struct icalgeotype *native;
    g_return_val_if_fail (geo != NULL, 0);
    native = (struct icalgeotype *)i_cal_object_get_native ((ICalObject *)geo);
    return g_ascii_strtod(native->lon, NULL);</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>    struct icalgeotype *native;
    g_return_if_fail (geo != NULL &amp;&amp; I_CAL_IS_GEO (geo));
    native = (struct icalgeotype *)i_cal_object_get_native ((ICalObject *)geo);
    g_ascii_dtostr(native->lon, ICAL_GEO_LEN, lon);</custom>
    </method>
</structure>