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