2 * This file is part of gtkD.
4 * gtkD is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU Lesser General Public License as published by
6 * the Free Software Foundation; either version 2.1 of the License, or
7 * (at your option) any later version.
9 * gtkD is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public License
15 * along with gtkD; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 // generated automatically - do not change
20 // find conversion definition on APILookup.txt
21 // implement new conversion functionalities on the wrap.utils pakage
24 * Conversion parameters:
25 * inFile = gstreamer-GstMiniObject.html
27 * outFile = MiniObject
28 * strct = GstMiniObject
48 * - GstMiniObject -> MiniObject
49 * - GstMiniObject* -> MiniObject
54 module gstreamer
.MiniObject
;
56 private import gstreamerc
.gstreamertypes
;
58 private import gstreamerc
.gstreamer
;
60 private import glib
.Str
;
61 private import gobject
.Value
;
67 * GstMiniObject is a baseclass like GObject, but has been stripped down of
68 * features to be fast and small.
69 * It offers sub-classing and ref-counting in the same way as GObject does.
70 * It has no properties and no signal-support though.
71 * Last reviewed on 2005-11-23 (0.9.5)
73 public class MiniObject
76 /** the main Gtk struct */
77 protected GstMiniObject
* gstMiniObject
;
80 public GstMiniObject
* getMiniObjectStruct()
86 /** the main Gtk struct as a void* */
87 protected void* getStruct()
89 return cast(void*)gstMiniObject
;
93 * Sets our main struct and passes it to the parent class
95 public this (GstMiniObject
* gstMiniObject
)
97 this.gstMiniObject
= gstMiniObject
;
114 * Creates a new mini-object of the desired type.
117 * the GType of the mini-object to create
119 * the new mini-object.
121 public this (GType type
)
123 // GstMiniObject* gst_mini_object_new (GType type);
124 this(cast(GstMiniObject
*)gst_mini_object_new(type
) );
128 * Creates a copy of the mini-object.
131 * the mini-object to copy
133 * the new mini-object.
135 public MiniObject
copy()
137 // GstMiniObject* gst_mini_object_copy (const GstMiniObject *mini_object);
138 return new MiniObject( gst_mini_object_copy(gstMiniObject
) );
142 * Checks if a mini-object is writable. A mini-object is writable
143 * if the reference count is one and the GST_MINI_OBJECT_FLAG_READONLY
144 * flag is not set. Modification of a mini-object should only be
145 * done after verifying that it is writable.
148 * the mini-object to check
150 * TRUE if the object is writable.
152 public int isWritable()
154 // gboolean gst_mini_object_is_writable (const GstMiniObject *mini_object);
155 return gst_mini_object_is_writable(gstMiniObject
);
159 * Checks if a mini-object is writable. If not, a writeable copy is made and
160 * returned. This gives away the reference to the original mini object,
161 * and returns a reference to the new object.
164 * the mini-object to make writable
166 * a mini-object (possibly the same pointer) that is writable.
168 public MiniObject
makeWritable()
170 // GstMiniObject* gst_mini_object_make_writable (GstMiniObject *mini_object);
171 return new MiniObject( gst_mini_object_make_writable(gstMiniObject
) );
175 * Increase the reference count of the mini-object.
176 * Note that the refcount affects the writeability
177 * of mini-object, see gst_mini_object_is_writable(). It is
178 * important to note that keeping additional references to
179 * GstMiniObject instances can potentially increase the number
180 * of memcpy operations in a pipeline, especially if the minibject
187 public MiniObject
doref()
189 // GstMiniObject* gst_mini_object_ref (GstMiniObject *mini_object);
190 return new MiniObject( gst_mini_object_ref(gstMiniObject
) );
194 * Decreases the reference count of the mini-object, possibly freeing
201 // void gst_mini_object_unref (GstMiniObject *mini_object);
202 gst_mini_object_unref(gstMiniObject
);
206 * Modifies a pointer to point to a new mini-object. The modification
207 * is done atomically, and the reference counts are updated correctly.
208 * Either newdata and the value pointed to by olddata may be NULL.
210 * pointer to a pointer to a mini-object to be replaced
212 * pointer to new mini-object
214 public static void replace(GstMiniObject
** olddata
, MiniObject newdata
)
216 // void gst_mini_object_replace (GstMiniObject **olddata, GstMiniObject *newdata);
217 gst_mini_object_replace(olddata
, (newdata
is null) ?
null : newdata
.getMiniObjectStruct());
221 * Creates a new GParamSpec instance that hold GstMiniObject references.
223 * the canonical name of the property
225 * the nickname of the property
227 * a short description of the property
229 * the GstMiniObjectType for the property
231 * a combination of GParamFlags
233 * a newly allocated GParamSpec instance
235 public static GParamSpec
* gstParamSpecMiniObject(char[] name
, char[] nick
, char[] blurb
, GType objectType
, GParamFlags flags
)
237 // GParamSpec* gst_param_spec_mini_object (const char *name, const char *nick, const char *blurb, GType object_type, GParamFlags flags);
238 return gst_param_spec_mini_object(Str
.toStringz(name
), Str
.toStringz(nick
), Str
.toStringz(blurb
), objectType
, flags
);
242 * Set the contents of a GST_TYPE_MINI_OBJECT derived GValue to
244 * The caller retains ownership of the reference.
246 * a valid GValue of GST_TYPE_MINI_OBJECT derived type
248 * mini object value to set
250 public static void gstValueSetMiniObject(Value value
, MiniObject miniObject
)
252 // void gst_value_set_mini_object (GValue *value, GstMiniObject *mini_object);
253 gst_value_set_mini_object((value
is null) ?
null : value
.getValueStruct(), (miniObject
is null) ?
null : miniObject
.getMiniObjectStruct());
257 * Set the contents of a GST_TYPE_MINI_OBJECT derived GValue to
259 * Takes over the ownership of the caller's reference to mini_object;
260 * the caller doesn't have to unref it any more.
262 * a valid GValue of GST_TYPE_MINI_OBJECT derived type
264 * mini object value to take
266 public static void gstValueTakeMiniObject(Value value
, MiniObject miniObject
)
268 // void gst_value_take_mini_object (GValue *value, GstMiniObject *mini_object);
269 gst_value_take_mini_object((value
is null) ?
null : value
.getValueStruct(), (miniObject
is null) ?
null : miniObject
.getMiniObjectStruct());
273 * Get the contents of a GST_TYPE_MINI_OBJECT derived GValue.
274 * Does not increase the refcount of the returned object.
276 * a valid GValue of GST_TYPE_MINI_OBJECT derived type
278 * mini object contents of value
280 public static MiniObject
gstValueGetMiniObject(Value value
)
282 // GstMiniObject* gst_value_get_mini_object (const GValue *value);
283 return new MiniObject( gst_value_get_mini_object((value
is null) ?
null : value
.getValueStruct()) );