blob: 70e678c0dffc550fb6cf1d5b832f2b5ffe86d46a (
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
|
<!--
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="Array" native="icalarray" is_possible_global="true" destroy_func="icalarray_free">
<method name="i_cal_array_size" corresponds="CUSTOM" kind="other" since="1.0">
<parameter type="ICalArray *" name="array" comment="The #ICalArray"/>
<returns type="gint" comment="The size of current array."/>
<comment>Gets the size of the array.</comment>
<custom> icalarray *native;
gint ret;
g_return_val_if_fail (array != NULL && I_CAL_IS_ARRAY (array), -1);
native = i_cal_object_get_native ((ICalObject *)array);
ret = native->num_elements;
native = NULL;
return ret;</custom>
</method>
<!-- <method name="i_cal_array_new" corresponds="icalarray_new" kind="constructor" since="1.0">
<parameter type="gint" name="element_size" comment="The size of the element of the array"/>
<parameter type="gint" name="increment_size" comment="The incremental size when the array is full"/>
<returns type="ICalArray *" annotation="transfer full" translator_argus="NULL, FALSE" comment="The newly created #ICalArray with the properties set by @element_size and @increment_size"/>
<comment xml:space="preserve">Creates a #ICalArray with the element size to be @element_size and increment size to be @increment_size.</comment>
</method> -->
<method name="i_cal_array_copy" corresponds="icalarray_copy" kind="clone" since="1.0">
<parameter type="ICalArray *" name="array" annotation="in" comment="The #ICalArray to be cloned"/>
<returns type="ICalArray *" annotation="transfer full" translator_argus="NULL, FALSE" comment="The newly cloned #ICalArray with the same value as the @array"/>
<comment xml:space="preserve">Creates a deep copy of #ICalArray with the same properties as the @array.</comment>
</method>
<method name="i_cal_array_free" corresponds="icalarray_free" annotation="skip" kind="destructor" since="1.0">
<parameter type="ICalArray *" name="array" comment="The #ICalArray to be freed"/>
<comment xml:space="preserve">Frees the #ICalArray.</comment>
</method>
<!-- <method name="i_cal_array_append" corresponds="icalarray_append" kind="others" since="1.0">
<parameter type="ICalArray *" name="array" comment="The #ICalArray to be appended"/>
<parameter type="GObject *" name="element" comment="The element to be appended to the #ICalArray. The reason why to use GOjbect * instead of gpointer is that the variable of type gpointer can only be assigned with none, integer or capsule type. The support for other types would be added in the future."/>
<comment xml:space="preserve">Append @element to the end of the array.</comment>
</method> -->
<method name="i_cal_array_remove_element_at" corresponds="icalarray_remove_element_at" kind="others" since="1.0">
<parameter type="ICalArray *" name="array" comment="The #ICalArray to be modified"/>
<parameter type="gint" name="position" comment="The position in which the element will be removed from the array"/>
<comment xml:space="preserve">Removes the element at the @position from the array.</comment>
</method>
<method name="i_cal_array_element_at" corresponds="icalarray_element_at" annotation="skip" kind="private" since="1.0">
<parameter type="ICalArray *" name="array" comment="The #ICalArray to be queried"/>
<parameter type="gint" name="position" comment="The position the target element is located"/>
<returns type="GObject *" annotation="transfer none, nullable" comment="The element located at the @position in the @array"/>
<comment xml:space="preserve">Gets the element located in the @position in the @array. NULL if position if out of bound.</comment>
</method>
<method name="i_cal_array_sort" corresponds="CUSTOM" annotation="skip" kind="others" since="1.0">
<parameter type="ICalArray *" name="array" comment="The #ICalArray to be sorted"/>
<parameter type="gint (*compare)" name="(const void *, const void *)" annotation="scope call" comment="FULL: @compare: (scope call): The comapre function"/>
<comment xml:space="preserve">Does not work right now. Sorts the @array using the sort function @compare.</comment>
<custom> g_return_if_fail (I_CAL_IS_ARRAY (array));
g_return_if_fail (array != NULL);
g_return_if_fail (compare != NULL);
icalarray_sort ((icalarray *)i_cal_object_get_native ((ICalObject *)array), compare);</custom>
</method>
</structure>
|