2 * Copyright (C) 2005 Stefan Kost <ensonic@users.sf.net>
4 * gstchildproxy.h: interface header for multi child elements
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Library General Public License for more details.
16 * You should have received a copy of the GNU Library General Public
17 * License along with this library; if not, write to the
18 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
19 * Boston, MA 02111-1307, USA.
22 #ifndef __GST_CHILD_PROXY_H__
23 #define __GST_CHILD_PROXY_H__
25 #include <glib-object.h>
31 #define GST_TYPE_CHILD_PROXY (gst_child_proxy_get_type ())
32 #define GST_CHILD_PROXY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_CHILD_PROXY, GstChildProxy))
33 #define GST_IS_CHILD_PROXY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_CHILD_PROXY))
34 #define GST_CHILD_PROXY_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), GST_TYPE_CHILD_PROXY, GstChildProxyInterface))
39 * Opaque #GstChildProxy data structure.
41 typedef struct _GstChildProxy GstChildProxy; /* dummy object */
42 typedef struct _GstChildProxyInterface GstChildProxyInterface;
45 * GstChildProxyInterface:
46 * @parent: parent interface type.
47 * @get_child_by_index: virtual method to fetch the child
48 * @get_children_count: virtual method to get the children count
50 * #GstChildProxyInterface interface.
52 struct _GstChildProxyInterface
54 GTypeInterface parent;
57 GstObject *(*get_child_by_index) (GstChildProxy * parent, guint index);
58 guint (*get_children_count) (GstChildProxy * parent);
61 void (*child_added) (GstChildProxy * parent, GstObject * child);
62 void (*child_removed) (GstChildProxy * parent, GstObject * child);
65 gpointer _gst_reserved[GST_PADDING];
68 GType gst_child_proxy_get_type (void);
70 GstObject *gst_child_proxy_get_child_by_name (GstChildProxy * parent, const gchar * name);
71 GstObject *gst_child_proxy_get_child_by_index (GstChildProxy * parent, guint index);
72 guint gst_child_proxy_get_children_count (GstChildProxy * parent);
74 gboolean gst_child_proxy_lookup (GstObject *object, const gchar *name,
75 GstObject **target, GParamSpec **pspec);
76 void gst_child_proxy_get_property (GstObject * object, const gchar *name, GValue *value);
77 void gst_child_proxy_get_valist (GstObject * object,
78 const gchar * first_property_name, va_list var_args);
79 void gst_child_proxy_get (GstObject * object, const gchar * first_property_name,
80 ...) G_GNUC_NULL_TERMINATED;
81 void gst_child_proxy_set_property (GstObject * object, const gchar *name, const GValue *value);
82 void gst_child_proxy_set_valist (GstObject* object,
83 const gchar * first_property_name, va_list var_args);
84 void gst_child_proxy_set (GstObject * object, const gchar * first_property_name,
85 ...) G_GNUC_NULL_TERMINATED;
86 void gst_child_proxy_child_added (GstObject * object, GstObject * child);
87 void gst_child_proxy_child_removed (GstObject * object, GstObject * child);
91 #endif /* __GST_CHILD_PROXY_H__ */