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