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