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.ValueArray;
26 
27 private import gobject.ObjectG;
28 private import gobject.Value;
29 private import gstreamerc.gstreamer;
30 public  import gstreamerc.gstreamertypes;
31 
32 
33 /** */
34 public class ValueArray
35 {
36 	/** the main Gtk struct */
37 	protected GstValueArray* gstValueArray;
38 
39 	/** Get the main Gtk struct */
40 	public GstValueArray* getValueArrayStruct()
41 	{
42 		return gstValueArray;
43 	}
44 
45 	/** the main Gtk struct as a void* */
46 	protected void* getStruct()
47 	{
48 		return cast(void*)gstValueArray;
49 	}
50 
51 	/**
52 	 * Sets our main struct and passes it to the parent class.
53 	 */
54 	public this (GstValueArray* gstValueArray)
55 	{
56 		this.gstValueArray = gstValueArray;
57 	}
58 
59 
60 	/** */
61 	public static GType getType()
62 	{
63 		return gst_value_array_get_type();
64 	}
65 
66 	/**
67 	 * Appends @append_value to the GstValueArray in @value.
68 	 *
69 	 * Params:
70 	 *     value = a #GValue of type #GST_TYPE_ARRAY
71 	 *     appendValue = the value to append
72 	 *
73 	 * Since: 1.2
74 	 */
75 	public static void appendAndTakeValue(Value value, Value appendValue)
76 	{
77 		gst_value_array_append_and_take_value((value is null) ? null : value.getValueStruct(), (appendValue is null) ? null : appendValue.getValueStruct());
78 	}
79 
80 	/**
81 	 * Appends @append_value to the GstValueArray in @value.
82 	 *
83 	 * Params:
84 	 *     value = a #GValue of type #GST_TYPE_ARRAY
85 	 *     appendValue = the value to append
86 	 */
87 	public static void appendValue(Value value, Value appendValue)
88 	{
89 		gst_value_array_append_value((value is null) ? null : value.getValueStruct(), (appendValue is null) ? null : appendValue.getValueStruct());
90 	}
91 
92 	/**
93 	 * Gets the number of values contained in @value.
94 	 *
95 	 * Params:
96 	 *     value = a #GValue of type #GST_TYPE_ARRAY
97 	 *
98 	 * Return: the number of values
99 	 */
100 	public static uint getSize(Value value)
101 	{
102 		return gst_value_array_get_size((value is null) ? null : value.getValueStruct());
103 	}
104 
105 	/**
106 	 * Gets the value that is a member of the array contained in @value and
107 	 * has the index @index.
108 	 *
109 	 * Params:
110 	 *     value = a #GValue of type #GST_TYPE_ARRAY
111 	 *     index = index of value to get from the array
112 	 *
113 	 * Return: the value at the given index
114 	 */
115 	public static Value getValue(Value value, uint index)
116 	{
117 		auto p = gst_value_array_get_value((value is null) ? null : value.getValueStruct(), index);
118 		
119 		if(p is null)
120 		{
121 			return null;
122 		}
123 		
124 		return ObjectG.getDObject!(Value)(cast(GValue*) p);
125 	}
126 
127 	/**
128 	 * Prepends @prepend_value to the GstValueArray in @value.
129 	 *
130 	 * Params:
131 	 *     value = a #GValue of type #GST_TYPE_ARRAY
132 	 *     prependValue = the value to prepend
133 	 */
134 	public static void prependValue(Value value, Value prependValue)
135 	{
136 		gst_value_array_prepend_value((value is null) ? null : value.getValueStruct(), (prependValue is null) ? null : prependValue.getValueStruct());
137 	}
138 }