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