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
;
60 import tango
.io
.Stdout
; // use the tango loging?
64 private import gstreamerc
.gstreamertypes
;
66 private import gstreamerc
.gstreamer
;
69 private import glib
.Str
;
70 private import gobject
.Value
;
77 * GstMiniObject is a baseclass like GObject, but has been stripped down of
78 * features to be fast and small.
79 * It offers sub-classing and ref-counting in the same way as GObject does.
80 * It has no properties and no signal-support though.
81 * Last reviewed on 2005-11-23 (0.9.5)
83 public class MiniObject
86 /** the main Gtk struct */
87 protected GstMiniObject
* gstMiniObject
;
90 public GstMiniObject
* getMiniObjectStruct()
96 /** the main Gtk struct as a void* */
97 protected void* getStruct()
99 return cast(void*)gstMiniObject
;
103 * Sets our main struct and passes it to the parent class
105 public this (GstMiniObject
* gstMiniObject
)
109 if ( gstMiniObject
is null )
114 Stdout("struct gstMiniObject is null on constructor").newline
;
118 printf("struct gstMiniObject is null on constructor");
125 assert(gstMiniObject
!is null, "struct gstMiniObject is null on constructor");
127 this.gstMiniObject
= gstMiniObject
;
144 * Creates a new mini-object of the desired type.
147 * the GType of the mini-object to create
149 * the new mini-object.
151 public this (GType type
)
153 // GstMiniObject* gst_mini_object_new (GType type);
154 this(cast(GstMiniObject
*)gst_mini_object_new(type
) );
158 * Creates a copy of the mini-object.
161 * the mini-object to copy
163 * the new mini-object.
165 public MiniObject
copy()
167 // GstMiniObject* gst_mini_object_copy (const GstMiniObject *mini_object);
168 return new MiniObject( gst_mini_object_copy(gstMiniObject
) );
172 * Checks if a mini-object is writable. A mini-object is writable
173 * if the reference count is one and the GST_MINI_OBJECT_FLAG_READONLY
174 * flag is not set. Modification of a mini-object should only be
175 * done after verifying that it is writable.
178 * the mini-object to check
180 * TRUE if the object is writable.
182 public int isWritable()
184 // gboolean gst_mini_object_is_writable (const GstMiniObject *mini_object);
185 return gst_mini_object_is_writable(gstMiniObject
);
189 * Checks if a mini-object is writable. If not, a writeable copy is made and
190 * returned. This gives away the reference to the original mini object,
191 * and returns a reference to the new object.
194 * the mini-object to make writable
196 * a mini-object (possibly the same pointer) that is writable.
198 public MiniObject
makeWritable()
200 // GstMiniObject* gst_mini_object_make_writable (GstMiniObject *mini_object);
201 return new MiniObject( gst_mini_object_make_writable(gstMiniObject
) );
205 * Increase the reference count of the mini-object.
206 * Note that the refcount affects the writeability
207 * of mini-object, see gst_mini_object_is_writable(). It is
208 * important to note that keeping additional references to
209 * GstMiniObject instances can potentially increase the number
210 * of memcpy operations in a pipeline, especially if the minibject
217 public MiniObject
doref()
219 // GstMiniObject* gst_mini_object_ref (GstMiniObject *mini_object);
220 return new MiniObject( gst_mini_object_ref(gstMiniObject
) );
224 * Decreases the reference count of the mini-object, possibly freeing
231 // void gst_mini_object_unref (GstMiniObject *mini_object);
232 gst_mini_object_unref(gstMiniObject
);
236 * Modifies a pointer to point to a new mini-object. The modification
237 * is done atomically, and the reference counts are updated correctly.
238 * Either newdata and the value pointed to by olddata may be NULL.
240 * pointer to a pointer to a mini-object to be replaced
242 * pointer to new mini-object
244 public static void replace(GstMiniObject
** olddata
, MiniObject newdata
)
246 // void gst_mini_object_replace (GstMiniObject **olddata, GstMiniObject *newdata);
247 gst_mini_object_replace(olddata
, (newdata
is null) ?
null : newdata
.getMiniObjectStruct());
251 * Creates a new GParamSpec instance that hold GstMiniObject references.
253 * the canonical name of the property
255 * the nickname of the property
257 * a short description of the property
259 * the GstMiniObjectType for the property
261 * a combination of GParamFlags
263 * a newly allocated GParamSpec instance
265 public static GParamSpec
* gstParamSpecMiniObject(char[] name
, char[] nick
, char[] blurb
, GType objectType
, GParamFlags flags
)
267 // GParamSpec* gst_param_spec_mini_object (const char *name, const char *nick, const char *blurb, GType object_type, GParamFlags flags);
268 return gst_param_spec_mini_object(Str
.toStringz(name
), Str
.toStringz(nick
), Str
.toStringz(blurb
), objectType
, flags
);
272 * Set the contents of a GST_TYPE_MINI_OBJECT derived GValue to
274 * The caller retains ownership of the reference.
276 * a valid GValue of GST_TYPE_MINI_OBJECT derived type
278 * mini object value to set
280 public static void gstValueSetMiniObject(Value value
, MiniObject miniObject
)
282 // void gst_value_set_mini_object (GValue *value, GstMiniObject *mini_object);
283 gst_value_set_mini_object((value
is null) ?
null : value
.getValueStruct(), (miniObject
is null) ?
null : miniObject
.getMiniObjectStruct());
287 * Set the contents of a GST_TYPE_MINI_OBJECT derived GValue to
289 * Takes over the ownership of the caller's reference to mini_object;
290 * the caller doesn't have to unref it any more.
292 * a valid GValue of GST_TYPE_MINI_OBJECT derived type
294 * mini object value to take
296 public static void gstValueTakeMiniObject(Value value
, MiniObject miniObject
)
298 // void gst_value_take_mini_object (GValue *value, GstMiniObject *mini_object);
299 gst_value_take_mini_object((value
is null) ?
null : value
.getValueStruct(), (miniObject
is null) ?
null : miniObject
.getMiniObjectStruct());
303 * Get the contents of a GST_TYPE_MINI_OBJECT derived GValue.
304 * Does not increase the refcount of the returned object.
306 * a valid GValue of GST_TYPE_MINI_OBJECT derived type
308 * mini object contents of value
310 public static MiniObject
gstValueGetMiniObject(Value value
)
312 // GstMiniObject* gst_value_get_mini_object (const GValue *value);
313 return new MiniObject( gst_value_get_mini_object((value
is null) ?
null : value
.getValueStruct()) );