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