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.ChildProxyIF; 26 27 private import glib.Str; 28 private import gobject.ObjectG; 29 private import gobject.ParamSpec; 30 private import gobject.Signals; 31 private import gobject.Value; 32 private import gstreamerc.gstreamer; 33 public import gstreamerc.gstreamertypes; 34 public import gtkc.gdktypes; 35 36 37 /** 38 * This interface abstracts handling of property sets for elements with 39 * children. Imagine elements such as mixers or polyphonic generators. They all 40 * have multiple #GstPad or some kind of voice objects. Another use case are 41 * container elements like #GstBin. 42 * The element implementing the interface acts as a parent for those child 43 * objects. 44 * 45 * By implementing this interface the child properties can be accessed from the 46 * parent element by using gst_child_proxy_get() and gst_child_proxy_set(). 47 * 48 * Property names are written as "child-name::property-name". The whole naming 49 * scheme is recursive. Thus "child1::child2::property" is valid too, if 50 * "child1" and "child2" implement the #GstChildProxy interface. 51 */ 52 public interface ChildProxyIF{ 53 /** Get the main Gtk struct */ 54 public GstChildProxy* getChildProxyStruct(); 55 56 /** the main Gtk struct as a void* */ 57 protected void* getStruct(); 58 59 60 /** 61 * Emits the "child-added" signal. 62 * 63 * Params: 64 * child = the newly added child 65 * name = the name of the new child 66 */ 67 public void childAdded(ObjectG child, string name); 68 69 /** 70 * Emits the "child-removed" signal. 71 * 72 * Params: 73 * child = the removed child 74 * name = the name of the old child 75 */ 76 public void childRemoved(ObjectG child, string name); 77 78 /** 79 * Fetches a child by its number. 80 * 81 * Params: 82 * index = the child's position in the child list 83 * 84 * Return: the child object or %NULL if 85 * not found (index too high). Unref after usage. 86 * 87 * MT safe. 88 */ 89 public ObjectG getChildByIndex(uint index); 90 91 /** 92 * Looks up a child element by the given name. 93 * 94 * This virtual method has a default implementation that uses #GstObject 95 * together with gst_object_get_name(). If the interface is to be used with 96 * #GObjects, this methods needs to be overridden. 97 * 98 * Params: 99 * name = the child's name 100 * 101 * Return: the child object or %NULL if 102 * not found. Unref after usage. 103 * 104 * MT safe. 105 */ 106 public ObjectG getChildByName(string name); 107 108 /** 109 * Gets the number of child objects this parent contains. 110 * 111 * Return: the number of child objects 112 * 113 * MT safe. 114 */ 115 public uint getChildrenCount(); 116 117 /** 118 * Gets a single property using the GstChildProxy mechanism. 119 * You are responsible for freeing it by calling g_value_unset() 120 * 121 * Params: 122 * name = name of the property 123 * value = a #GValue that should take the result. 124 */ 125 public void childGetProperty(string name, out Value value); 126 127 /** 128 * Gets properties of the parent object and its children. 129 * 130 * Params: 131 * firstPropertyName = name of the first property to get 132 * varArgs = return location for the first property, followed optionally by more name/return location pairs, followed by %NULL 133 */ 134 public void childGetValist(string firstPropertyName, void* varArgs); 135 136 /** 137 * Looks up which object and #GParamSpec would be effected by the given @name. 138 * 139 * MT safe. 140 * 141 * Params: 142 * name = name of the property to look up 143 * target = pointer to a #GObject that 144 * takes the real object to set property on 145 * pspec = pointer to take the #GParamSpec 146 * describing the property 147 * 148 * Return: %TRUE if @target and @pspec could be found. %FALSE otherwise. In that 149 * case the values for @pspec and @target are not modified. Unref @target after 150 * usage. For plain GObjects @target is the same as @object. 151 */ 152 public bool lookup(string name, out ObjectG target, out ParamSpec pspec); 153 154 /** 155 * Sets a single property using the GstChildProxy mechanism. 156 * 157 * Params: 158 * name = name of the property to set 159 * value = new #GValue for the property 160 */ 161 public void childSetProperty(string name, Value value); 162 163 /** 164 * Sets properties of the parent object and its children. 165 * 166 * Params: 167 * firstPropertyName = name of the first property to set 168 * varArgs = value for the first property, followed optionally by more name/value pairs, followed by %NULL 169 */ 170 public void childSetValist(string firstPropertyName, void* varArgs); 171 @property void delegate(ObjectG, string, ChildProxyIF)[] onChildAddedListeners(); 172 /** 173 * Will be emitted after the @object was added to the @child_proxy. 174 * 175 * Params: 176 * object = the #GObject that was added 177 * name = the name of the new child 178 */ 179 void addOnChildAdded(void delegate(ObjectG, string, ChildProxyIF) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0); 180 181 @property void delegate(ObjectG, string, ChildProxyIF)[] onChildRemovedListeners(); 182 /** 183 * Will be emitted after the @object was removed from the @child_proxy. 184 * 185 * Params: 186 * object = the #GObject that was removed 187 * name = the name of the old child 188 */ 189 void addOnChildRemoved(void delegate(ObjectG, string, ChildProxyIF) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0); 190 191 }