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 gstreamer.ValueList;
26 
27 private import gobject.ObjectG;
28 private import gobject.Value;
29 private import gstreamerc.gstreamer;
30 public  import gstreamerc.gstreamertypes;
31 
32 
33 public class ValueList
34 {
35 	/**
36 	 */
37 
38 	public static GType getType()
39 	{
40 		return gst_value_list_get_type();
41 	}
42 
43 	/**
44 	 * Appends @append_value to the GstValueList in @value.
45 	 *
46 	 * Params:
47 	 *     value = a #GValue of type #GST_TYPE_LIST
48 	 *     appendValue = the value to append
49 	 *
50 	 * Since: 1.2
51 	 */
52 	public static void appendAndTakeValue(Value value, Value appendValue)
53 	{
54 		gst_value_list_append_and_take_value((value is null) ? null : value.getValueStruct(), (appendValue is null) ? null : appendValue.getValueStruct());
55 	}
56 
57 	/**
58 	 * Appends @append_value to the GstValueList in @value.
59 	 *
60 	 * Params:
61 	 *     value = a #GValue of type #GST_TYPE_LIST
62 	 *     appendValue = the value to append
63 	 */
64 	public static void appendValue(Value value, Value appendValue)
65 	{
66 		gst_value_list_append_value((value is null) ? null : value.getValueStruct(), (appendValue is null) ? null : appendValue.getValueStruct());
67 	}
68 
69 	/**
70 	 * Concatenates copies of @value1 and @value2 into a list.  Values that are not
71 	 * of type #GST_TYPE_LIST are treated as if they were lists of length 1.
72 	 * @dest will be initialized to the type #GST_TYPE_LIST.
73 	 *
74 	 * Params:
75 	 *     dest = an uninitialized #GValue to take the result
76 	 *     value1 = a #GValue
77 	 *     value2 = a #GValue
78 	 */
79 	public static void concat(out Value dest, Value value1, Value value2)
80 	{
81 		GValue* outdest = new GValue;
82 		
83 		gst_value_list_concat(outdest, (value1 is null) ? null : value1.getValueStruct(), (value2 is null) ? null : value2.getValueStruct());
84 		
85 		dest = ObjectG.getDObject!(Value)(outdest);
86 	}
87 
88 	/**
89 	 * Gets the number of values contained in @value.
90 	 *
91 	 * Params:
92 	 *     value = a #GValue of type #GST_TYPE_LIST
93 	 *
94 	 * Return: the number of values
95 	 */
96 	public static uint getSize(Value value)
97 	{
98 		return gst_value_list_get_size((value is null) ? null : value.getValueStruct());
99 	}
100 
101 	/**
102 	 * Gets the value that is a member of the list contained in @value and
103 	 * has the index @index.
104 	 *
105 	 * Params:
106 	 *     value = a #GValue of type #GST_TYPE_LIST
107 	 *     index = index of value to get from the list
108 	 *
109 	 * Return: the value at the given index
110 	 */
111 	public static Value getValue(Value value, uint index)
112 	{
113 		auto p = gst_value_list_get_value((value is null) ? null : value.getValueStruct(), index);
114 		
115 		if(p is null)
116 		{
117 			return null;
118 		}
119 		
120 		return ObjectG.getDObject!(Value)(cast(GValue*) p);
121 	}
122 
123 	/**
124 	 * Merges copies of @value1 and @value2.  Values that are not
125 	 * of type #GST_TYPE_LIST are treated as if they were lists of length 1.
126 	 *
127 	 * The result will be put into @dest and will either be a list that will not
128 	 * contain any duplicates, or a non-list type (if @value1 and @value2
129 	 * were equal).
130 	 *
131 	 * Params:
132 	 *     dest = an uninitialized #GValue to take the result
133 	 *     value1 = a #GValue
134 	 *     value2 = a #GValue
135 	 */
136 	public static void merge(out Value dest, Value value1, Value value2)
137 	{
138 		GValue* outdest = new GValue;
139 		
140 		gst_value_list_merge(outdest, (value1 is null) ? null : value1.getValueStruct(), (value2 is null) ? null : value2.getValueStruct());
141 		
142 		dest = ObjectG.getDObject!(Value)(outdest);
143 	}
144 
145 	/**
146 	 * Prepends @prepend_value to the GstValueList in @value.
147 	 *
148 	 * Params:
149 	 *     value = a #GValue of type #GST_TYPE_LIST
150 	 *     prependValue = the value to prepend
151 	 */
152 	public static void prependValue(Value value, Value prependValue)
153 	{
154 		gst_value_list_prepend_value((value is null) ? null : value.getValueStruct(), (prependValue is null) ? null : prependValue.getValueStruct());
155 	}
156 }