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