diff --git a/README.md b/README.md index a7342fc22..970ec73f2 100644 --- a/README.md +++ b/README.md @@ -97,14 +97,14 @@ Library | Version --- | --- Gtk+ | 3.24 Gdk | 3.24 -Glib | 2.64 -GObject | 2.64 -Gio | 2.64 -Pango | 1.43 -Atk | 2.34 -Gdk-pixbuf | 2.38 +Glib | 2.72 +GObject | 2.72 +Gio | 2.72 +Pango | 1.50 +Atk | 2.38 +Gdk-pixbuf | 2.42 Cairo | 1.12.2 -LibRsvg | 2.44 -GtksourceView | 4.2 -GStreamer | 1.16 -Vte3 | 0.56 +LibRsvg | 2.54 +GtksourceView | 4.8 +GStreamer | 1.20 +Vte3 | 0.68 diff --git a/generated/gstreamer/gst/app/AppSink.d b/generated/gstreamer/gst/app/AppSink.d index 45820b729..f2f5ca1f5 100644 --- a/generated/gstreamer/gst/app/AppSink.d +++ b/generated/gstreamer/gst/app/AppSink.d @@ -30,6 +30,7 @@ private import gst.app.c.functions; public import gst.app.c.types; private import gst.base.BaseSink; private import gstreamer.Caps; +private import gstreamer.MiniObject; private import gstreamer.Sample; private import gstreamer.URIHandlerIF; private import gstreamer.URIHandlerT; @@ -131,14 +132,14 @@ public class AppSink : BaseSink, URIHandlerIF */ public Caps getCaps() { - auto p = gst_app_sink_get_caps(gstAppSink); + auto __p = gst_app_sink_get_caps(gstAppSink); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Caps)(cast(GstCaps*) p, true); + return ObjectG.getDObject!(Caps)(cast(GstCaps*) __p, true); } /** @@ -156,7 +157,7 @@ public class AppSink : BaseSink, URIHandlerIF /** * Check if appsink will emit the "new-preroll" and "new-sample" signals. * - * Returns: %TRUE if @appsink is emiting the "new-preroll" and "new-sample" + * Returns: %TRUE if @appsink is emitting the "new-preroll" and "new-sample" * signals. */ public bool getEmitSignals() @@ -200,6 +201,44 @@ public class AppSink : BaseSink, URIHandlerIF return gst_app_sink_is_eos(gstAppSink) != 0; } + /** + * This function blocks until a sample or an event becomes available or the appsink + * element is set to the READY/NULL state. + * + * This function will only return samples when the appsink is in the PLAYING + * state. All rendered buffers and events will be put in a queue so that the application + * can pull them at its own rate. Note that when the application does not + * pull samples fast enough, the queued buffers could consume a lot of memory, + * especially when dealing with raw video frames. + * Events can be pulled when the appsink is in the READY, PAUSED or PLAYING state. + * + * This function will only pull serialized events, excluding + * the EOS event for which this functions returns + * %NULL. Use gst_app_sink_is_eos() to check for the EOS condition. + * + * This method is a variant of gst_app_sink_pull_sample() that can be used + * to handle incoming events events as well as samples. + * + * Note that future releases may extend this API to return other object types + * so make sure that your code is checking for the actual type it is handling. + * + * Returns: a #GstSample, or a #GstEvent or NULL when the appsink is stopped or EOS. + * Call gst_mini_object_unref() after usage. + * + * Since: 1.20 + */ + public MiniObject pullObject() + { + auto __p = gst_app_sink_pull_object(gstAppSink); + + if(__p is null) + { + return null; + } + + return ObjectG.getDObject!(MiniObject)(cast(GstMiniObject*) __p, true); + } + /** * Get the last preroll sample in @appsink. This was the sample that caused the * appsink to preroll in the PAUSED state. @@ -225,14 +264,14 @@ public class AppSink : BaseSink, URIHandlerIF */ public Sample pullPreroll() { - auto p = gst_app_sink_pull_preroll(gstAppSink); + auto __p = gst_app_sink_pull_preroll(gstAppSink); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Sample)(cast(GstSample*) p, true); + return ObjectG.getDObject!(Sample)(cast(GstSample*) __p, true); } /** @@ -253,14 +292,14 @@ public class AppSink : BaseSink, URIHandlerIF */ public Sample pullSample() { - auto p = gst_app_sink_pull_sample(gstAppSink); + auto __p = gst_app_sink_pull_sample(gstAppSink); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Sample)(cast(GstSample*) p, true); + return ObjectG.getDObject!(Sample)(cast(GstSample*) __p, true); } /** @@ -287,6 +326,9 @@ public class AppSink : BaseSink, URIHandlerIF * If callbacks are installed, no signals will be emitted for performance * reasons. * + * Before 1.16.3 it was not possible to change the callbacks in a thread-safe + * way. + * * Params: * callbacks = the callbacks * userData = a user_data argument for the callbacks @@ -360,6 +402,47 @@ public class AppSink : BaseSink, URIHandlerIF gst_app_sink_set_wait_on_eos(gstAppSink, wait); } + /** + * This function blocks until a sample or an event or EOS becomes available or the appsink + * element is set to the READY/NULL state or the timeout expires. + * + * This function will only return samples when the appsink is in the PLAYING + * state. All rendered buffers and events will be put in a queue so that the application + * can pull them at its own rate. Note that when the application does not + * pull samples fast enough, the queued buffers could consume a lot of memory, + * especially when dealing with raw video frames. + * Events can be pulled when the appsink is in the READY, PAUSED or PLAYING state. + * + * This function will only pull serialized events, excluding + * the EOS event for which this functions returns + * %NULL. Use gst_app_sink_is_eos() to check for the EOS condition. + * + * This method is a variant of gst_app_sink_try_pull_sample() that can be used + * to handle incoming events events as well as samples. + * + * Note that future releases may extend this API to return other object types + * so make sure that your code is checking for the actual type it is handling. + * + * Params: + * timeout = the maximum amount of time to wait for a sample + * + * Returns: a #GstSample, or #GstEvent or NULL when the appsink is stopped or EOS or the timeout expires. + * Call gst_mini_object_unref() after usage. + * + * Since: 1.20 + */ + public MiniObject tryPullObject(GstClockTime timeout) + { + auto __p = gst_app_sink_try_pull_object(gstAppSink, timeout); + + if(__p is null) + { + return null; + } + + return ObjectG.getDObject!(MiniObject)(cast(GstMiniObject*) __p, true); + } + /** * Get the last preroll sample in @appsink. This was the sample that caused the * appsink to preroll in the PAUSED state. @@ -391,14 +474,14 @@ public class AppSink : BaseSink, URIHandlerIF */ public Sample tryPullPreroll(GstClockTime timeout) { - auto p = gst_app_sink_try_pull_preroll(gstAppSink, timeout); + auto __p = gst_app_sink_try_pull_preroll(gstAppSink, timeout); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Sample)(cast(GstSample*) p, true); + return ObjectG.getDObject!(Sample)(cast(GstSample*) __p, true); } /** @@ -425,14 +508,14 @@ public class AppSink : BaseSink, URIHandlerIF */ public Sample tryPullSample(GstClockTime timeout) { - auto p = gst_app_sink_try_pull_sample(gstAppSink, timeout); + auto __p = gst_app_sink_try_pull_sample(gstAppSink, timeout); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Sample)(cast(GstSample*) p, true); + return ObjectG.getDObject!(Sample)(cast(GstSample*) __p, true); } /** @@ -480,6 +563,32 @@ public class AppSink : BaseSink, URIHandlerIF return Signals.connect(this, "new-sample", dlg, connectFlags ^ ConnectFlags.SWAPPED); } + /** + * Signal that a new downstream serialized event is available. + * + * This signal is emitted from the streaming thread and only when the + * "emit-signals" property is %TRUE. + * + * The new event can be retrieved with the "try-pull-object" action + * signal or gst_app_sink_pull_object() either from this signal callback + * or from any other thread. + * + * EOS will not be notified using this signal, use #GstAppSink::eos instead. + * EOS cannot be pulled either, use gst_app_sink_is_eos() to check for it. + * + * Note that this signal is only emitted when the "emit-signals" property is + * set to %TRUE, which it is not by default for performance reasons. + * + * The callback should return %TRUE if the event has been handled, which will + * skip basesink handling of the event, %FALSE otherwise. + * + * Since: 1.20 + */ + gulong addOnNewSerialized(bool delegate(AppSink) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) + { + return Signals.connect(this, "new-serialized-event", dlg, connectFlags ^ ConnectFlags.SWAPPED); + } + /** * Get the last preroll sample in @appsink. This was the sample that caused the * appsink to preroll in the PAUSED state. @@ -530,6 +639,42 @@ public class AppSink : BaseSink, URIHandlerIF return Signals.connect(this, "pull-sample", dlg, connectFlags ^ ConnectFlags.SWAPPED); } + /** + * This function blocks until a sample or an event becomes available or the appsink + * element is set to the READY/NULL state or the timeout expires. + * + * This function will only return samples when the appsink is in the PLAYING + * state. All rendered samples and events will be put in a queue so that the application + * can pull them at its own rate. + * Events can be pulled when the appsink is in the READY, PAUSED or PLAYING state. + * + * Note that when the application does not pull samples fast enough, the + * queued samples could consume a lot of memory, especially when dealing with + * raw video frames. It's possible to control the behaviour of the queue with + * the "drop" and "max-buffers" properties. + * + * This function will only pull serialized events, excluding + * the EOS event for which this functions returns + * %NULL. Use gst_app_sink_is_eos() to check for the EOS condition. + * + * This signal is a variant of #GstAppSink::try-pull-sample: that can be used + * to handle incoming events as well as samples. + * + * Note that future releases may extend this API to return other object types + * so make sure that your code is checking for the actual type it is handling. + * + * Params: + * timeout = the maximum amount of time to wait for a sample + * + * Returns: a #GstSample or a #GstEvent or NULL when the appsink is stopped or EOS or the timeout expires. + * + * Since: 1.20 + */ + gulong addOnTryPullObject(MiniObject delegate(ulong, AppSink) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) + { + return Signals.connect(this, "try-pull-object", dlg, connectFlags ^ ConnectFlags.SWAPPED); + } + /** * Get the last preroll sample in @appsink. This was the sample that caused the * appsink to preroll in the PAUSED state. diff --git a/generated/gstreamer/gst/app/AppSrc.d b/generated/gstreamer/gst/app/AppSrc.d index a14932b2d..479cbf8cd 100644 --- a/generated/gstreamer/gst/app/AppSrc.d +++ b/generated/gstreamer/gst/app/AppSrc.d @@ -61,11 +61,12 @@ private import std.algorithm; * streaming thread. It is important to note that data transport will not happen * from the thread that performed the push-buffer call. * - * The "max-bytes" property controls how much data can be queued in appsrc - * before appsrc considers the queue full. A filled internal queue will always - * signal the "enough-data" signal, which signals the application that it should - * stop pushing data into appsrc. The "block" property will cause appsrc to - * block the push-buffer method until free data becomes available again. + * The "max-bytes", "max-buffers" and "max-time" properties control how much + * data can be queued in appsrc before appsrc considers the queue full. A + * filled internal queue will always signal the "enough-data" signal, which + * signals the application that it should stop pushing data into appsrc. The + * "block" property will cause appsrc to block the push-buffer method until + * free data becomes available again. * * When the internal queue is running out of data, the "need-data" signal is * emitted, which signals the application that it should start pushing more data @@ -90,7 +91,7 @@ private import std.algorithm; * * The pull mode, in which the need-data signal triggers the next push-buffer call. * This mode is typically used in the "random-access" stream-type. Use this - * mode for file access or other randomly accessable sources. In this mode, a + * mode for file access or other randomly accessible sources. In this mode, a * buffer of exactly the amount of bytes given by the need-data signal should be * pushed into appsrc. * @@ -146,7 +147,7 @@ public class AppSrc : BaseSrc, URIHandlerIF * Indicates to the appsrc element that the last buffer queued in the * element is the last buffer of the stream. * - * Returns: #GST_FLOW_OK when the EOS was successfuly queued. + * Returns: #GST_FLOW_OK when the EOS was successfully queued. * #GST_FLOW_FLUSHING when @appsrc is not PAUSED or PLAYING. */ public GstFlowReturn endOfStream() @@ -161,14 +162,26 @@ public class AppSrc : BaseSrc, URIHandlerIF */ public Caps getCaps() { - auto p = gst_app_src_get_caps(gstAppSrc); + auto __p = gst_app_src_get_caps(gstAppSrc); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Caps)(cast(GstCaps*) p, true); + return ObjectG.getDObject!(Caps)(cast(GstCaps*) __p, true); + } + + /** + * Get the number of currently queued buffers inside @appsrc. + * + * Returns: The number of currently queued buffers. + * + * Since: 1.20 + */ + public ulong getCurrentLevelBuffers() + { + return gst_app_src_get_current_level_buffers(gstAppSrc); } /** @@ -183,6 +196,18 @@ public class AppSrc : BaseSrc, URIHandlerIF return gst_app_src_get_current_level_bytes(gstAppSrc); } + /** + * Get the amount of currently queued time inside @appsrc. + * + * Returns: The amount of currently queued time. + * + * Since: 1.20 + */ + public GstClockTime getCurrentLevelTime() + { + return gst_app_src_get_current_level_time(gstAppSrc); + } + /** * Get the duration of the stream in nanoseconds. A value of GST_CLOCK_TIME_NONE means that the duration is * not known. @@ -219,6 +244,31 @@ public class AppSrc : BaseSrc, URIHandlerIF gst_app_src_get_latency(gstAppSrc, &min, &max); } + /** + * Returns the currently set #GstAppLeakyType. See gst_app_src_set_leaky_type() + * for more details. + * + * Returns: The currently set #GstAppLeakyType. + * + * Since: 1.20 + */ + public GstAppLeakyType getLeakyType() + { + return gst_app_src_get_leaky_type(gstAppSrc); + } + + /** + * Get the maximum amount of buffers that can be queued in @appsrc. + * + * Returns: The maximum amount of buffers that can be queued. + * + * Since: 1.20 + */ + public ulong getMaxBuffers() + { + return gst_app_src_get_max_buffers(gstAppSrc); + } + /** * Get the maximum amount of bytes that can be queued in @appsrc. * @@ -229,6 +279,18 @@ public class AppSrc : BaseSrc, URIHandlerIF return gst_app_src_get_max_bytes(gstAppSrc); } + /** + * Get the maximum amount of time that can be queued in @appsrc. + * + * Returns: The maximum amount of time that can be queued. + * + * Since: 1.20 + */ + public GstClockTime getMaxTime() + { + return gst_app_src_get_max_time(gstAppSrc); + } + /** * Get the size of the stream in bytes. A value of -1 means that the size is * not known. @@ -261,13 +323,13 @@ public class AppSrc : BaseSrc, URIHandlerIF * Params: * buffer = a #GstBuffer to push * - * Returns: #GST_FLOW_OK when the buffer was successfuly queued. + * Returns: #GST_FLOW_OK when the buffer was successfully queued. * #GST_FLOW_FLUSHING when @appsrc is not PAUSED or PLAYING. - * #GST_FLOW_EOS when EOS occured. + * #GST_FLOW_EOS when EOS occurred. */ public GstFlowReturn pushBuffer(Buffer buffer) { - return gst_app_src_push_buffer(gstAppSrc, (buffer is null) ? null : buffer.getBufferStruct()); + return gst_app_src_push_buffer(gstAppSrc, (buffer is null) ? null : buffer.getBufferStruct(true)); } /** @@ -281,15 +343,15 @@ public class AppSrc : BaseSrc, URIHandlerIF * Params: * bufferList = a #GstBufferList to push * - * Returns: #GST_FLOW_OK when the buffer list was successfuly queued. + * Returns: #GST_FLOW_OK when the buffer list was successfully queued. * #GST_FLOW_FLUSHING when @appsrc is not PAUSED or PLAYING. - * #GST_FLOW_EOS when EOS occured. + * #GST_FLOW_EOS when EOS occurred. * * Since: 1.14 */ public GstFlowReturn pushBufferList(BufferList bufferList) { - return gst_app_src_push_buffer_list(gstAppSrc, (bufferList is null) ? null : bufferList.getBufferListStruct()); + return gst_app_src_push_buffer_list(gstAppSrc, (bufferList is null) ? null : bufferList.getBufferListStruct(true)); } /** @@ -308,9 +370,9 @@ public class AppSrc : BaseSrc, URIHandlerIF * sample = a #GstSample from which buffer and caps may be * extracted * - * Returns: #GST_FLOW_OK when the buffer was successfuly queued. + * Returns: #GST_FLOW_OK when the buffer was successfully queued. * #GST_FLOW_FLUSHING when @appsrc is not PAUSED or PLAYING. - * #GST_FLOW_EOS when EOS occured. + * #GST_FLOW_EOS when EOS occurred. * * Since: 1.6 */ @@ -328,6 +390,9 @@ public class AppSrc : BaseSrc, URIHandlerIF * If callbacks are installed, no signals will be emitted for performance * reasons. * + * Before 1.16.3 it was not possible to change the callbacks in a thread-safe + * way. + * * Params: * callbacks = the callbacks * userData = a user_data argument for the callbacks @@ -378,6 +443,37 @@ public class AppSrc : BaseSrc, URIHandlerIF gst_app_src_set_latency(gstAppSrc, min, max); } + /** + * When set to any other value than GST_APP_LEAKY_TYPE_NONE then the appsrc + * will drop any buffers that are pushed into it once its internal queue is + * full. The selected type defines whether to drop the oldest or new + * buffers. + * + * Params: + * leaky = the #GstAppLeakyType + * + * Since: 1.20 + */ + public void setLeakyType(GstAppLeakyType leaky) + { + gst_app_src_set_leaky_type(gstAppSrc, leaky); + } + + /** + * Set the maximum amount of buffers that can be queued in @appsrc. + * After the maximum amount of buffers are queued, @appsrc will emit the + * "enough-data" signal. + * + * Params: + * max = the maximum number of buffers to queue + * + * Since: 1.20 + */ + public void setMaxBuffers(ulong max) + { + gst_app_src_set_max_buffers(gstAppSrc, max); + } + /** * Set the maximum amount of bytes that can be queued in @appsrc. * After the maximum amount of bytes are queued, @appsrc will emit the @@ -391,6 +487,21 @@ public class AppSrc : BaseSrc, URIHandlerIF gst_app_src_set_max_bytes(gstAppSrc, max); } + /** + * Set the maximum amount of time that can be queued in @appsrc. + * After the maximum amount of time are queued, @appsrc will emit the + * "enough-data" signal. + * + * Params: + * max = the maximum amonut of time to queue + * + * Since: 1.20 + */ + public void setMaxTime(GstClockTime max) + { + gst_app_src_set_max_time(gstAppSrc, max); + } + /** * Set the size of the stream in bytes. A value of -1 means that the size is * not known. diff --git a/generated/gstreamer/gst/app/c/functions.d b/generated/gstreamer/gst/app/c/functions.d index 8c4f21497..1c67390d7 100644 --- a/generated/gstreamer/gst/app/c/functions.d +++ b/generated/gstreamer/gst/app/c/functions.d @@ -47,6 +47,7 @@ shared static this() Linker.link(gst_app_sink_get_max_buffers, "gst_app_sink_get_max_buffers", LIBRARY_GSTAPP); Linker.link(gst_app_sink_get_wait_on_eos, "gst_app_sink_get_wait_on_eos", LIBRARY_GSTAPP); Linker.link(gst_app_sink_is_eos, "gst_app_sink_is_eos", LIBRARY_GSTAPP); + Linker.link(gst_app_sink_pull_object, "gst_app_sink_pull_object", LIBRARY_GSTAPP); Linker.link(gst_app_sink_pull_preroll, "gst_app_sink_pull_preroll", LIBRARY_GSTAPP); Linker.link(gst_app_sink_pull_sample, "gst_app_sink_pull_sample", LIBRARY_GSTAPP); Linker.link(gst_app_sink_set_buffer_list_support, "gst_app_sink_set_buffer_list_support", LIBRARY_GSTAPP); @@ -56,6 +57,7 @@ shared static this() Linker.link(gst_app_sink_set_emit_signals, "gst_app_sink_set_emit_signals", LIBRARY_GSTAPP); Linker.link(gst_app_sink_set_max_buffers, "gst_app_sink_set_max_buffers", LIBRARY_GSTAPP); Linker.link(gst_app_sink_set_wait_on_eos, "gst_app_sink_set_wait_on_eos", LIBRARY_GSTAPP); + Linker.link(gst_app_sink_try_pull_object, "gst_app_sink_try_pull_object", LIBRARY_GSTAPP); Linker.link(gst_app_sink_try_pull_preroll, "gst_app_sink_try_pull_preroll", LIBRARY_GSTAPP); Linker.link(gst_app_sink_try_pull_sample, "gst_app_sink_try_pull_sample", LIBRARY_GSTAPP); @@ -64,11 +66,16 @@ shared static this() Linker.link(gst_app_src_get_type, "gst_app_src_get_type", LIBRARY_GSTAPP); Linker.link(gst_app_src_end_of_stream, "gst_app_src_end_of_stream", LIBRARY_GSTAPP); Linker.link(gst_app_src_get_caps, "gst_app_src_get_caps", LIBRARY_GSTAPP); + Linker.link(gst_app_src_get_current_level_buffers, "gst_app_src_get_current_level_buffers", LIBRARY_GSTAPP); Linker.link(gst_app_src_get_current_level_bytes, "gst_app_src_get_current_level_bytes", LIBRARY_GSTAPP); + Linker.link(gst_app_src_get_current_level_time, "gst_app_src_get_current_level_time", LIBRARY_GSTAPP); Linker.link(gst_app_src_get_duration, "gst_app_src_get_duration", LIBRARY_GSTAPP); Linker.link(gst_app_src_get_emit_signals, "gst_app_src_get_emit_signals", LIBRARY_GSTAPP); Linker.link(gst_app_src_get_latency, "gst_app_src_get_latency", LIBRARY_GSTAPP); + Linker.link(gst_app_src_get_leaky_type, "gst_app_src_get_leaky_type", LIBRARY_GSTAPP); + Linker.link(gst_app_src_get_max_buffers, "gst_app_src_get_max_buffers", LIBRARY_GSTAPP); Linker.link(gst_app_src_get_max_bytes, "gst_app_src_get_max_bytes", LIBRARY_GSTAPP); + Linker.link(gst_app_src_get_max_time, "gst_app_src_get_max_time", LIBRARY_GSTAPP); Linker.link(gst_app_src_get_size, "gst_app_src_get_size", LIBRARY_GSTAPP); Linker.link(gst_app_src_get_stream_type, "gst_app_src_get_stream_type", LIBRARY_GSTAPP); Linker.link(gst_app_src_push_buffer, "gst_app_src_push_buffer", LIBRARY_GSTAPP); @@ -78,7 +85,10 @@ shared static this() Linker.link(gst_app_src_set_duration, "gst_app_src_set_duration", LIBRARY_GSTAPP); Linker.link(gst_app_src_set_emit_signals, "gst_app_src_set_emit_signals", LIBRARY_GSTAPP); Linker.link(gst_app_src_set_latency, "gst_app_src_set_latency", LIBRARY_GSTAPP); + Linker.link(gst_app_src_set_leaky_type, "gst_app_src_set_leaky_type", LIBRARY_GSTAPP); + Linker.link(gst_app_src_set_max_buffers, "gst_app_src_set_max_buffers", LIBRARY_GSTAPP); Linker.link(gst_app_src_set_max_bytes, "gst_app_src_set_max_bytes", LIBRARY_GSTAPP); + Linker.link(gst_app_src_set_max_time, "gst_app_src_set_max_time", LIBRARY_GSTAPP); Linker.link(gst_app_src_set_size, "gst_app_src_set_size", LIBRARY_GSTAPP); Linker.link(gst_app_src_set_stream_type, "gst_app_src_set_stream_type", LIBRARY_GSTAPP); Linker.link(gst_app_src_set_caps, "gst_app_src_set_caps", LIBRARY_GSTAPP); @@ -97,6 +107,7 @@ __gshared extern(C) uint function(GstAppSink* appsink) c_gst_app_sink_get_max_buffers; int function(GstAppSink* appsink) c_gst_app_sink_get_wait_on_eos; int function(GstAppSink* appsink) c_gst_app_sink_is_eos; + GstMiniObject* function(GstAppSink* appsink) c_gst_app_sink_pull_object; GstSample* function(GstAppSink* appsink) c_gst_app_sink_pull_preroll; GstSample* function(GstAppSink* appsink) c_gst_app_sink_pull_sample; void function(GstAppSink* appsink, int enableLists) c_gst_app_sink_set_buffer_list_support; @@ -106,6 +117,7 @@ __gshared extern(C) void function(GstAppSink* appsink, int emit) c_gst_app_sink_set_emit_signals; void function(GstAppSink* appsink, uint max) c_gst_app_sink_set_max_buffers; void function(GstAppSink* appsink, int wait) c_gst_app_sink_set_wait_on_eos; + GstMiniObject* function(GstAppSink* appsink, GstClockTime timeout) c_gst_app_sink_try_pull_object; GstSample* function(GstAppSink* appsink, GstClockTime timeout) c_gst_app_sink_try_pull_preroll; GstSample* function(GstAppSink* appsink, GstClockTime timeout) c_gst_app_sink_try_pull_sample; @@ -114,11 +126,16 @@ __gshared extern(C) GType function() c_gst_app_src_get_type; GstFlowReturn function(GstAppSrc* appsrc) c_gst_app_src_end_of_stream; GstCaps* function(GstAppSrc* appsrc) c_gst_app_src_get_caps; + ulong function(GstAppSrc* appsrc) c_gst_app_src_get_current_level_buffers; ulong function(GstAppSrc* appsrc) c_gst_app_src_get_current_level_bytes; + GstClockTime function(GstAppSrc* appsrc) c_gst_app_src_get_current_level_time; GstClockTime function(GstAppSrc* appsrc) c_gst_app_src_get_duration; int function(GstAppSrc* appsrc) c_gst_app_src_get_emit_signals; void function(GstAppSrc* appsrc, ulong* min, ulong* max) c_gst_app_src_get_latency; + GstAppLeakyType function(GstAppSrc* appsrc) c_gst_app_src_get_leaky_type; + ulong function(GstAppSrc* appsrc) c_gst_app_src_get_max_buffers; ulong function(GstAppSrc* appsrc) c_gst_app_src_get_max_bytes; + GstClockTime function(GstAppSrc* appsrc) c_gst_app_src_get_max_time; long function(GstAppSrc* appsrc) c_gst_app_src_get_size; GstAppStreamType function(GstAppSrc* appsrc) c_gst_app_src_get_stream_type; GstFlowReturn function(GstAppSrc* appsrc, GstBuffer* buffer) c_gst_app_src_push_buffer; @@ -128,7 +145,10 @@ __gshared extern(C) void function(GstAppSrc* appsrc, GstClockTime duration) c_gst_app_src_set_duration; void function(GstAppSrc* appsrc, int emit) c_gst_app_src_set_emit_signals; void function(GstAppSrc* appsrc, ulong min, ulong max) c_gst_app_src_set_latency; + void function(GstAppSrc* appsrc, GstAppLeakyType leaky) c_gst_app_src_set_leaky_type; + void function(GstAppSrc* appsrc, ulong max) c_gst_app_src_set_max_buffers; void function(GstAppSrc* appsrc, ulong max) c_gst_app_src_set_max_bytes; + void function(GstAppSrc* appsrc, GstClockTime max) c_gst_app_src_set_max_time; void function(GstAppSrc* appsrc, long size) c_gst_app_src_set_size; void function(GstAppSrc* appsrc, GstAppStreamType type) c_gst_app_src_set_stream_type; void function(GstAppSrc* appsrc, GstCaps* caps) c_gst_app_src_set_caps; @@ -145,6 +165,7 @@ alias c_gst_app_sink_get_emit_signals gst_app_sink_get_emit_signals; alias c_gst_app_sink_get_max_buffers gst_app_sink_get_max_buffers; alias c_gst_app_sink_get_wait_on_eos gst_app_sink_get_wait_on_eos; alias c_gst_app_sink_is_eos gst_app_sink_is_eos; +alias c_gst_app_sink_pull_object gst_app_sink_pull_object; alias c_gst_app_sink_pull_preroll gst_app_sink_pull_preroll; alias c_gst_app_sink_pull_sample gst_app_sink_pull_sample; alias c_gst_app_sink_set_buffer_list_support gst_app_sink_set_buffer_list_support; @@ -154,6 +175,7 @@ alias c_gst_app_sink_set_drop gst_app_sink_set_drop; alias c_gst_app_sink_set_emit_signals gst_app_sink_set_emit_signals; alias c_gst_app_sink_set_max_buffers gst_app_sink_set_max_buffers; alias c_gst_app_sink_set_wait_on_eos gst_app_sink_set_wait_on_eos; +alias c_gst_app_sink_try_pull_object gst_app_sink_try_pull_object; alias c_gst_app_sink_try_pull_preroll gst_app_sink_try_pull_preroll; alias c_gst_app_sink_try_pull_sample gst_app_sink_try_pull_sample; @@ -162,11 +184,16 @@ alias c_gst_app_sink_try_pull_sample gst_app_sink_try_pull_sample; alias c_gst_app_src_get_type gst_app_src_get_type; alias c_gst_app_src_end_of_stream gst_app_src_end_of_stream; alias c_gst_app_src_get_caps gst_app_src_get_caps; +alias c_gst_app_src_get_current_level_buffers gst_app_src_get_current_level_buffers; alias c_gst_app_src_get_current_level_bytes gst_app_src_get_current_level_bytes; +alias c_gst_app_src_get_current_level_time gst_app_src_get_current_level_time; alias c_gst_app_src_get_duration gst_app_src_get_duration; alias c_gst_app_src_get_emit_signals gst_app_src_get_emit_signals; alias c_gst_app_src_get_latency gst_app_src_get_latency; +alias c_gst_app_src_get_leaky_type gst_app_src_get_leaky_type; +alias c_gst_app_src_get_max_buffers gst_app_src_get_max_buffers; alias c_gst_app_src_get_max_bytes gst_app_src_get_max_bytes; +alias c_gst_app_src_get_max_time gst_app_src_get_max_time; alias c_gst_app_src_get_size gst_app_src_get_size; alias c_gst_app_src_get_stream_type gst_app_src_get_stream_type; alias c_gst_app_src_push_buffer gst_app_src_push_buffer; @@ -176,7 +203,10 @@ alias c_gst_app_src_set_callbacks gst_app_src_set_callbacks; alias c_gst_app_src_set_duration gst_app_src_set_duration; alias c_gst_app_src_set_emit_signals gst_app_src_set_emit_signals; alias c_gst_app_src_set_latency gst_app_src_set_latency; +alias c_gst_app_src_set_leaky_type gst_app_src_set_leaky_type; +alias c_gst_app_src_set_max_buffers gst_app_src_set_max_buffers; alias c_gst_app_src_set_max_bytes gst_app_src_set_max_bytes; +alias c_gst_app_src_set_max_time gst_app_src_set_max_time; alias c_gst_app_src_set_size gst_app_src_set_size; alias c_gst_app_src_set_stream_type gst_app_src_set_stream_type; alias c_gst_app_src_set_caps gst_app_src_set_caps; diff --git a/generated/gstreamer/gst/app/c/types.d b/generated/gstreamer/gst/app/c/types.d index a5854492b..b908011be 100644 --- a/generated/gstreamer/gst/app/c/types.d +++ b/generated/gstreamer/gst/app/c/types.d @@ -30,6 +30,29 @@ public import gst.base.c.types; public import gstreamer.c.types; +/** + * Buffer dropping scheme to avoid the element's internal queue to block when + * full. + * + * Since: 1.20 + */ +public enum GstAppLeakyType +{ + /** + * Not Leaky + */ + NONE = 0, + /** + * Leaky on upstream (new buffers) + */ + UPSTREAM = 1, + /** + * Leaky on downstream (old buffers) + */ + DOWNSTREAM = 2, +} +alias GstAppLeakyType AppLeakyType; + /** * The stream type. */ @@ -72,7 +95,9 @@ struct GstAppSinkCallbacks extern(C) GstFlowReturn function(GstAppSink* appsink, void* userData) newPreroll; /** */ extern(C) GstFlowReturn function(GstAppSink* appsink, void* userData) newSample; - void*[4] GstReserved; + /** */ + extern(C) int function(GstAppSink* appsink, void* userData) newEvent; + void*[3] GstReserved; } struct GstAppSinkClass @@ -118,7 +143,16 @@ struct GstAppSinkClass * Call gst_sample_unref() after usage. */ extern(C) GstSample* function(GstAppSink* appsink, GstClockTime timeout) tryPullSample; - void*[2] GstReserved; + /** + * + * Params: + * appsink = a #GstAppSink + * timeout = the maximum amount of time to wait for a sample + * Returns: a #GstSample, or #GstEvent or NULL when the appsink is stopped or EOS or the timeout expires. + * Call gst_mini_object_unref() after usage. + */ + extern(C) GstMiniObject* function(GstAppSink* appsink, GstClockTime timeout) tryPullObject; + void*[1] GstReserved; } struct GstAppSinkPrivate; @@ -159,16 +193,16 @@ struct GstAppSrcClass * Params: * appsrc = a #GstAppSrc * buffer = a #GstBuffer to push - * Returns: #GST_FLOW_OK when the buffer was successfuly queued. + * Returns: #GST_FLOW_OK when the buffer was successfully queued. * #GST_FLOW_FLUSHING when @appsrc is not PAUSED or PLAYING. - * #GST_FLOW_EOS when EOS occured. + * #GST_FLOW_EOS when EOS occurred. */ extern(C) GstFlowReturn function(GstAppSrc* appsrc, GstBuffer* buffer) pushBuffer; /** * * Params: * appsrc = a #GstAppSrc - * Returns: #GST_FLOW_OK when the EOS was successfuly queued. + * Returns: #GST_FLOW_OK when the EOS was successfully queued. * #GST_FLOW_FLUSHING when @appsrc is not PAUSED or PLAYING. */ extern(C) GstFlowReturn function(GstAppSrc* appsrc) endOfStream; @@ -178,9 +212,9 @@ struct GstAppSrcClass * appsrc = a #GstAppSrc * sample = a #GstSample from which buffer and caps may be * extracted - * Returns: #GST_FLOW_OK when the buffer was successfuly queued. + * Returns: #GST_FLOW_OK when the buffer was successfully queued. * #GST_FLOW_FLUSHING when @appsrc is not PAUSED or PLAYING. - * #GST_FLOW_EOS when EOS occured. + * #GST_FLOW_EOS when EOS occurred. */ extern(C) GstFlowReturn function(GstAppSrc* appsrc, GstSample* sample) pushSample; /** @@ -188,9 +222,9 @@ struct GstAppSrcClass * Params: * appsrc = a #GstAppSrc * bufferList = a #GstBufferList to push - * Returns: #GST_FLOW_OK when the buffer list was successfuly queued. + * Returns: #GST_FLOW_OK when the buffer list was successfully queued. * #GST_FLOW_FLUSHING when @appsrc is not PAUSED or PLAYING. - * #GST_FLOW_EOS when EOS occured. + * #GST_FLOW_EOS when EOS occurred. */ extern(C) GstFlowReturn function(GstAppSrc* appsrc, GstBufferList* bufferList) pushBufferList; void*[2] GstReserved; diff --git a/generated/gstreamer/gst/base/Adapter.d b/generated/gstreamer/gst/base/Adapter.d index eb1f11cac..e489809ac 100644 --- a/generated/gstreamer/gst/base/Adapter.d +++ b/generated/gstreamer/gst/base/Adapter.d @@ -118,8 +118,8 @@ private import gstreamer.BufferList; * since then can be queried with gst_adapter_distance_from_discont(). * * A last thing to note is that while #GstAdapter is pretty optimized, - * merging buffers still might be an operation that requires a malloc() and - * memcpy() operation, and these operations are not the fastest. Because of + * merging buffers still might be an operation that requires a `malloc()` and + * `memcpy()` operation, and these operations are not the fastest. Because of * this, some functions like gst_adapter_available_fast() are provided to help * speed up such cases should you want to. To avoid repeated memory allocations, * gst_adapter_copy() can be used to copy data into a (statically allocated) @@ -179,14 +179,14 @@ public class Adapter : ObjectG */ public this() { - auto p = gst_adapter_new(); + auto __p = gst_adapter_new(); - if(p is null) + if(__p is null) { throw new ConstructionException("null returned by new"); } - this(cast(GstAdapter*) p, true); + this(cast(GstAdapter*) __p, true); } /** @@ -255,17 +255,28 @@ public class Adapter : ObjectG */ public Bytes copyBytes(size_t offset, size_t size) { - auto p = gst_adapter_copy_bytes(gstAdapter, offset, size); + auto __p = gst_adapter_copy_bytes(gstAdapter, offset, size); - if(p is null) + if(__p is null) { return null; } - return new Bytes(cast(GBytes*) p, true); + return new Bytes(cast(GBytes*) __p, true); } - /** */ + /** + * Get the distance in bytes since the last buffer with the + * %GST_BUFFER_FLAG_DISCONT flag. + * + * The distance will be reset to 0 for all buffers with + * %GST_BUFFER_FLAG_DISCONT on them, and then calculated for all other + * following buffers based on their size. + * + * Returns: The offset. Can be %GST_BUFFER_OFFSET_NONE. + * + * Since: 1.10 + */ public ulong distanceFromDiscont() { return gst_adapter_distance_from_discont(gstAdapter); @@ -319,14 +330,14 @@ public class Adapter : ObjectG */ public Buffer getBuffer(size_t nbytes) { - auto p = gst_adapter_get_buffer(gstAdapter, nbytes); + auto __p = gst_adapter_get_buffer(gstAdapter, nbytes); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Buffer)(cast(GstBuffer*) p, true); + return ObjectG.getDObject!(Buffer)(cast(GstBuffer*) __p, true); } /** @@ -350,14 +361,14 @@ public class Adapter : ObjectG */ public Buffer getBufferFast(size_t nbytes) { - auto p = gst_adapter_get_buffer_fast(gstAdapter, nbytes); + auto __p = gst_adapter_get_buffer_fast(gstAdapter, nbytes); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Buffer)(cast(GstBuffer*) p, true); + return ObjectG.getDObject!(Buffer)(cast(GstBuffer*) __p, true); } /** @@ -379,14 +390,14 @@ public class Adapter : ObjectG */ public BufferList getBufferList(size_t nbytes) { - auto p = gst_adapter_get_buffer_list(gstAdapter, nbytes); + auto __p = gst_adapter_get_buffer_list(gstAdapter, nbytes); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(BufferList)(cast(GstBufferList*) p, true); + return ObjectG.getDObject!(BufferList)(cast(GstBufferList*) __p, true); } /** @@ -408,14 +419,14 @@ public class Adapter : ObjectG */ public ListG getList(size_t nbytes) { - auto p = gst_adapter_get_list(gstAdapter, nbytes); + auto __p = gst_adapter_get_list(gstAdapter, nbytes); - if(p is null) + if(__p is null) { return null; } - return new ListG(cast(GList*) p, true); + return new ListG(cast(GList*) __p, true); } /** @@ -440,9 +451,9 @@ public class Adapter : ObjectG */ public ubyte[] map(size_t size) { - auto p = gst_adapter_map(gstAdapter, size); + auto __p = gst_adapter_map(gstAdapter, size); - return cast(ubyte[])p[0 .. size]; + return cast(ubyte[])__p[0 .. size]; } /** @@ -663,7 +674,7 @@ public class Adapter : ObjectG */ public void push(Buffer buf) { - gst_adapter_push(gstAdapter, (buf is null) ? null : buf.getBufferStruct()); + gst_adapter_push(gstAdapter, (buf is null) ? null : buf.getBufferStruct(true)); } /** @@ -681,9 +692,9 @@ public class Adapter : ObjectG */ public ubyte[] take(size_t nbytes) { - auto p = gst_adapter_take(gstAdapter, nbytes); + auto __p = gst_adapter_take(gstAdapter, nbytes); - return cast(ubyte[])p[0 .. nbytes]; + return cast(ubyte[])__p[0 .. nbytes]; } /** @@ -716,14 +727,14 @@ public class Adapter : ObjectG */ public Buffer takeBuffer(size_t nbytes) { - auto p = gst_adapter_take_buffer(gstAdapter, nbytes); + auto __p = gst_adapter_take_buffer(gstAdapter, nbytes); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Buffer)(cast(GstBuffer*) p, true); + return ObjectG.getDObject!(Buffer)(cast(GstBuffer*) __p, true); } /** @@ -762,14 +773,14 @@ public class Adapter : ObjectG */ public Buffer takeBufferFast(size_t nbytes) { - auto p = gst_adapter_take_buffer_fast(gstAdapter, nbytes); + auto __p = gst_adapter_take_buffer_fast(gstAdapter, nbytes); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Buffer)(cast(GstBuffer*) p, true); + return ObjectG.getDObject!(Buffer)(cast(GstBuffer*) __p, true); } /** @@ -792,14 +803,14 @@ public class Adapter : ObjectG */ public BufferList takeBufferList(size_t nbytes) { - auto p = gst_adapter_take_buffer_list(gstAdapter, nbytes); + auto __p = gst_adapter_take_buffer_list(gstAdapter, nbytes); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(BufferList)(cast(GstBufferList*) p, true); + return ObjectG.getDObject!(BufferList)(cast(GstBufferList*) __p, true); } /** @@ -820,14 +831,14 @@ public class Adapter : ObjectG */ public ListG takeList(size_t nbytes) { - auto p = gst_adapter_take_list(gstAdapter, nbytes); + auto __p = gst_adapter_take_list(gstAdapter, nbytes); - if(p is null) + if(__p is null) { return null; } - return new ListG(cast(GList*) p, true); + return new ListG(cast(GList*) __p, true); } /** diff --git a/generated/gstreamer/gst/base/Aggregator.d b/generated/gstreamer/gst/base/Aggregator.d index 12b3ea7a5..058928f69 100644 --- a/generated/gstreamer/gst/base/Aggregator.d +++ b/generated/gstreamer/gst/base/Aggregator.d @@ -26,14 +26,21 @@ module gst.base.Aggregator; private import glib.MemorySlice; private import gobject.ObjectG; +private import gobject.Signals; +private import gst.base.AggregatorPad; private import gst.base.c.functions; public import gst.base.c.types; private import gstreamer.AllocationParams; private import gstreamer.Allocator; private import gstreamer.Buffer; +private import gstreamer.BufferList; private import gstreamer.BufferPool; private import gstreamer.Caps; private import gstreamer.Element; +private import gstreamer.Sample; +private import gstreamer.Segment; +private import gstreamer.Structure; +private import std.algorithm; /** @@ -41,27 +48,46 @@ private import gstreamer.Element; * Control is given to the subclass when all pads have data. * * * Base class for mixers and muxers. Subclasses should at least implement - * the #GstAggregatorClass.aggregate() virtual method. + * the #GstAggregatorClass::aggregate virtual method. * * * Installs a #GstPadChainFunction, a #GstPadEventFullFunction and a * #GstPadQueryFunction to queue all serialized data packets per sink pad. * Subclasses should not overwrite those, but instead implement - * #GstAggregatorClass.sink_event() and #GstAggregatorClass.sink_query() as + * #GstAggregatorClass::sink_event and #GstAggregatorClass::sink_query as * needed. * * * When data is queued on all pads, the aggregate vmethod is called. * * * One can peek at the data on any given GstAggregatorPad with the - * gst_aggregator_pad_peek_buffer () method, and remove it from the pad + * gst_aggregator_pad_peek_buffer() method, and remove it from the pad * with the gst_aggregator_pad_pop_buffer () method. When a buffer * has been taken with pop_buffer (), a new buffer can be queued * on that pad. * + * * When gst_aggregator_pad_peek_buffer() or gst_aggregator_pad_has_buffer() + * are called, a reference is taken to the returned buffer, which stays + * valid until either: + * + * - gst_aggregator_pad_pop_buffer() is called, in which case the caller + * is guaranteed that the buffer they receive is the same as the peeked + * buffer. + * - gst_aggregator_pad_drop_buffer() is called, in which case the caller + * is guaranteed that the dropped buffer is the one that was peeked. + * - the subclass implementation of #GstAggregatorClass.aggregate returns. + * + * Subsequent calls to gst_aggregator_pad_peek_buffer() or + * gst_aggregator_pad_has_buffer() return / check the same buffer that was + * returned / checked, until one of the conditions listed above is met. + * + * Subclasses are only allowed to call these methods from the aggregate + * thread. + * * * If the subclass wishes to push a buffer downstream in its aggregate * implementation, it should do so through the - * gst_aggregator_finish_buffer () method. This method will take care + * gst_aggregator_finish_buffer() method. This method will take care * of sending and ordering mandatory events such as stream start, caps - * and segment. + * and segment. Buffer lists can also be pushed out with + * gst_aggregator_finish_buffer_list(). * * * Same goes for EOS events, which should not be pushed directly by the * subclass, it should instead return GST_FLOW_EOS in its aggregate @@ -125,7 +151,22 @@ public class Aggregator : Element */ public GstFlowReturn finishBuffer(Buffer buffer) { - return gst_aggregator_finish_buffer(gstAggregator, (buffer is null) ? null : buffer.getBufferStruct()); + return gst_aggregator_finish_buffer(gstAggregator, (buffer is null) ? null : buffer.getBufferStruct(true)); + } + + /** + * This method will push the provided output buffer list downstream. If needed, + * mandatory events such as stream-start, caps, and segment events will be + * sent before pushing the buffer. + * + * Params: + * bufferlist = the #GstBufferList to push. + * + * Since: 1.18 + */ + public GstFlowReturn finishBufferList(BufferList bufferlist) + { + return gst_aggregator_finish_buffer_list(gstAggregator, (bufferlist is null) ? null : bufferlist.getBufferListStruct(true)); } /** @@ -157,14 +198,24 @@ public class Aggregator : Element */ public BufferPool getBufferPool() { - auto p = gst_aggregator_get_buffer_pool(gstAggregator); + auto __p = gst_aggregator_get_buffer_pool(gstAggregator); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(BufferPool)(cast(GstBufferPool*) p, true); + return ObjectG.getDObject!(BufferPool)(cast(GstBufferPool*) __p, true); + } + + /** + * Returns: whether inactive pads will not be waited on + * + * Since: 1.20 + */ + public bool getIgnoreInactivePads() + { + return gst_aggregator_get_ignore_inactive_pads(gstAggregator) != 0; } /** @@ -181,6 +232,89 @@ public class Aggregator : Element return gst_aggregator_get_latency(gstAggregator); } + /** + * Negotiates src pad caps with downstream elements. + * Unmarks GST_PAD_FLAG_NEED_RECONFIGURE in any case. But marks it again + * if #GstAggregatorClass::negotiate fails. + * + * Returns: %TRUE if the negotiation succeeded, else %FALSE. + * + * Since: 1.18 + */ + public bool negotiate() + { + return gst_aggregator_negotiate(gstAggregator) != 0; + } + + /** + * Use this function to determine what input buffers will be aggregated + * to produce the next output buffer. This should only be called from + * a #GstAggregator::samples-selected handler, and can be used to precisely + * control aggregating parameters for a given set of input samples. + * + * Returns: The sample that is about to be aggregated. It may hold a #GstBuffer + * or a #GstBufferList. The contents of its info structure is subclass-dependent, + * and documented on a subclass basis. The buffers held by the sample are + * not writable. + * + * Since: 1.18 + */ + public Sample peekNextSample(AggregatorPad pad) + { + auto __p = gst_aggregator_peek_next_sample(gstAggregator, (pad is null) ? null : pad.getAggregatorPadStruct()); + + if(__p is null) + { + return null; + } + + return ObjectG.getDObject!(Sample)(cast(GstSample*) __p, true); + } + + /** + * Subclasses should call this when they have prepared the + * buffers they will aggregate for each of their sink pads, but + * before using any of the properties of the pads that govern + * *how* aggregation should be performed, for example z-index + * for video aggregators. + * + * If gst_aggregator_update_segment() is used by the subclass, + * it MUST be called before gst_aggregator_selected_samples(). + * + * This function MUST only be called from the #GstAggregatorClass::aggregate() + * function. + * + * Params: + * pts = The presentation timestamp of the next output buffer + * dts = The decoding timestamp of the next output buffer + * duration = The duration of the next output buffer + * info = a #GstStructure containing additional information + * + * Since: 1.18 + */ + public void selectedSamples(GstClockTime pts, GstClockTime dts, GstClockTime duration, Structure info) + { + gst_aggregator_selected_samples(gstAggregator, pts, dts, duration, (info is null) ? null : info.getStructureStruct()); + } + + /** + * Subclasses should call this when they don't want to time out + * waiting for a pad that hasn't yet received any buffers in live + * mode. + * + * #GstAggregator will still wait once on each newly-added pad, making + * sure upstream has had a fair chance to start up. + * + * Params: + * ignore = whether inactive pads should not be waited on + * + * Since: 1.20 + */ + public void setIgnoreInactivePads(bool ignore) + { + gst_aggregator_set_ignore_inactive_pads(gstAggregator, ignore); + } + /** * Lets #GstAggregator sub-classes tell the baseclass what their internal * latency is. Will also post a LATENCY message on the bus so the pipeline @@ -207,7 +341,7 @@ public class Aggregator : Element } /** - * This is a simple #GstAggregator::get_next_time implementation that + * This is a simple #GstAggregatorClass::get_next_time implementation that * just looks at the #GstSegment on the srcpad of the aggregator and bases * the next time on the running time there. * @@ -222,4 +356,38 @@ public class Aggregator : Element { return gst_aggregator_simple_get_next_time(gstAggregator); } + + /** + * Subclasses should use this to update the segment on their + * source pad, instead of directly pushing new segment events + * downstream. + * + * Subclasses MUST call this before gst_aggregator_selected_samples(), + * if it is used at all. + * + * Since: 1.18 + */ + public void updateSegment(Segment segment) + { + gst_aggregator_update_segment(gstAggregator, (segment is null) ? null : segment.getSegmentStruct()); + } + + /** + * Signals that the #GstAggregator subclass has selected the next set + * of input samples it will aggregate. Handlers may call + * gst_aggregator_peek_next_sample() at that point. + * + * Params: + * segment = The #GstSegment the next output buffer is part of + * pts = The presentation timestamp of the next output buffer + * dts = The decoding timestamp of the next output buffer + * duration = The duration of the next output buffer + * info = a #GstStructure containing additional information + * + * Since: 1.18 + */ + gulong addOnSamplesSelected(void delegate(Segment, ulong, ulong, ulong, Structure, Aggregator) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) + { + return Signals.connect(this, "samples-selected", dlg, connectFlags ^ ConnectFlags.SWAPPED); + } } diff --git a/generated/gstreamer/gst/base/AggregatorPad.d b/generated/gstreamer/gst/base/AggregatorPad.d index 1ba2162de..01e64a963 100644 --- a/generated/gstreamer/gst/base/AggregatorPad.d +++ b/generated/gstreamer/gst/base/AggregatorPad.d @@ -34,7 +34,7 @@ private import std.algorithm; /** - * Pads managed by a #GstAggregor subclass. + * Pads managed by a #GstAggregator subclass. * * This class used to live in gst-plugins-bad and was moved to core. * @@ -107,6 +107,19 @@ public class AggregatorPad : Pad return gst_aggregator_pad_is_eos(gstAggregatorPad) != 0; } + /** + * It is only valid to call this method from #GstAggregatorClass::aggregate() + * + * Returns: %TRUE if the pad is inactive, %FALSE otherwise. + * See gst_aggregator_ignore_inactive_pads() for more info. + * + * Since: 1.20 + */ + public bool isInactive() + { + return gst_aggregator_pad_is_inactive(gstAggregatorPad) != 0; + } + /** * Returns: A reference to the buffer in @pad or * NULL if no buffer was queued. You should unref the buffer after @@ -114,14 +127,14 @@ public class AggregatorPad : Pad */ public Buffer peekBuffer() { - auto p = gst_aggregator_pad_peek_buffer(gstAggregatorPad); + auto __p = gst_aggregator_pad_peek_buffer(gstAggregatorPad); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Buffer)(cast(GstBuffer*) p, true); + return ObjectG.getDObject!(Buffer)(cast(GstBuffer*) __p, true); } /** @@ -132,14 +145,14 @@ public class AggregatorPad : Pad */ public Buffer popBuffer() { - auto p = gst_aggregator_pad_pop_buffer(gstAggregatorPad); + auto __p = gst_aggregator_pad_pop_buffer(gstAggregatorPad); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Buffer)(cast(GstBuffer*) p, true); + return ObjectG.getDObject!(Buffer)(cast(GstBuffer*) __p, true); } /** */ diff --git a/generated/gstreamer/gst/base/Base.d b/generated/gstreamer/gst/base/Base.d index bfa49eaac..26e4c9ea5 100644 --- a/generated/gstreamer/gst/base/Base.d +++ b/generated/gstreamer/gst/base/Base.d @@ -52,14 +52,14 @@ public struct Base */ public static Caps typeFindHelper(Pad src, ulong size) { - auto p = gst_type_find_helper((src is null) ? null : src.getPadStruct(), size); + auto __p = gst_type_find_helper((src is null) ? null : src.getPadStruct(), size); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Caps)(cast(GstCaps*) p, true); + return ObjectG.getDObject!(Caps)(cast(GstCaps*) __p, true); } /** @@ -88,14 +88,14 @@ public struct Base */ public static Caps typeFindHelperForBuffer(ObjectGst obj, Buffer buf, out GstTypeFindProbability prob) { - auto p = gst_type_find_helper_for_buffer((obj is null) ? null : obj.getObjectGstStruct(), (buf is null) ? null : buf.getBufferStruct(), &prob); + auto __p = gst_type_find_helper_for_buffer((obj is null) ? null : obj.getObjectGstStruct(), (buf is null) ? null : buf.getBufferStruct(), &prob); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Caps)(cast(GstCaps*) p, true); + return ObjectG.getDObject!(Caps)(cast(GstCaps*) __p, true); } /** @@ -124,14 +124,14 @@ public struct Base */ public static Caps typeFindHelperForData(ObjectGst obj, ubyte[] data, out GstTypeFindProbability prob) { - auto p = gst_type_find_helper_for_data((obj is null) ? null : obj.getObjectGstStruct(), data.ptr, cast(size_t)data.length, &prob); + auto __p = gst_type_find_helper_for_data((obj is null) ? null : obj.getObjectGstStruct(), data.ptr, cast(size_t)data.length, &prob); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Caps)(cast(GstCaps*) p, true); + return ObjectG.getDObject!(Caps)(cast(GstCaps*) __p, true); } /** @@ -153,14 +153,14 @@ public struct Base */ public static Caps typeFindHelperForExtension(ObjectGst obj, string extension) { - auto p = gst_type_find_helper_for_extension((obj is null) ? null : obj.getObjectGstStruct(), Str.toStringz(extension)); + auto __p = gst_type_find_helper_for_extension((obj is null) ? null : obj.getObjectGstStruct(), Str.toStringz(extension)); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Caps)(cast(GstCaps*) p, true); + return ObjectG.getDObject!(Caps)(cast(GstCaps*) __p, true); } /** @@ -194,14 +194,14 @@ public struct Base */ public static Caps typeFindHelperGetRange(ObjectGst obj, ObjectGst parent, GstTypeFindHelperGetRangeFunction func, ulong size, string extension, out GstTypeFindProbability prob) { - auto p = gst_type_find_helper_get_range((obj is null) ? null : obj.getObjectGstStruct(), (parent is null) ? null : parent.getObjectGstStruct(), func, size, Str.toStringz(extension), &prob); + auto __p = gst_type_find_helper_get_range((obj is null) ? null : obj.getObjectGstStruct(), (parent is null) ? null : parent.getObjectGstStruct(), func, size, Str.toStringz(extension), &prob); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Caps)(cast(GstCaps*) p, true); + return ObjectG.getDObject!(Caps)(cast(GstCaps*) __p, true); } /** @@ -237,14 +237,14 @@ public struct Base */ public static Caps typeFindHelperForBufferWithExtension(ObjectGst obj, Buffer buf, string extension, out GstTypeFindProbability prob) { - auto p = gst_type_find_helper_for_buffer_with_extension((obj is null) ? null : obj.getObjectGstStruct(), (buf is null) ? null : buf.getBufferStruct(), Str.toStringz(extension), &prob); + auto __p = gst_type_find_helper_for_buffer_with_extension((obj is null) ? null : obj.getObjectGstStruct(), (buf is null) ? null : buf.getBufferStruct(), Str.toStringz(extension), &prob); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Caps)(cast(GstCaps*) p, true); + return ObjectG.getDObject!(Caps)(cast(GstCaps*) __p, true); } /** @@ -280,14 +280,14 @@ public struct Base */ public static Caps typeFindHelperForDataWithExtension(ObjectGst obj, ubyte[] data, string extension, out GstTypeFindProbability prob) { - auto p = gst_type_find_helper_for_data_with_extension((obj is null) ? null : obj.getObjectGstStruct(), data.ptr, cast(size_t)data.length, Str.toStringz(extension), &prob); + auto __p = gst_type_find_helper_for_data_with_extension((obj is null) ? null : obj.getObjectGstStruct(), data.ptr, cast(size_t)data.length, Str.toStringz(extension), &prob); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Caps)(cast(GstCaps*) p, true); + return ObjectG.getDObject!(Caps)(cast(GstCaps*) __p, true); } /** @@ -324,10 +324,10 @@ public struct Base { GstCaps* outcaps = null; - auto p = gst_type_find_helper_get_range_full((obj is null) ? null : obj.getObjectGstStruct(), (parent is null) ? null : parent.getObjectGstStruct(), func, size, Str.toStringz(extension), &outcaps, &prob); + auto __p = gst_type_find_helper_get_range_full((obj is null) ? null : obj.getObjectGstStruct(), (parent is null) ? null : parent.getObjectGstStruct(), func, size, Str.toStringz(extension), &outcaps, &prob); caps = ObjectG.getDObject!(Caps)(outcaps); - return p; + return __p; } } diff --git a/generated/gstreamer/gst/base/BaseParse.d b/generated/gstreamer/gst/base/BaseParse.d index 249b726ae..4f043f76e 100644 --- a/generated/gstreamer/gst/base/BaseParse.d +++ b/generated/gstreamer/gst/base/BaseParse.d @@ -52,10 +52,10 @@ private import gstreamer.TagList; * * ## Set-up phase * - * * #GstBaseParse calls #GstBaseParseClass.start() to inform subclass + * * #GstBaseParse calls #GstBaseParseClass::start to inform subclass * that data processing is about to start now. * - * * #GstBaseParse class calls #GstBaseParseClass.set_sink_caps() to + * * #GstBaseParse class calls #GstBaseParseClass::set_sink_caps to * inform the subclass about incoming sinkpad caps. Subclass could * already set the srcpad caps accordingly, but this might be delayed * until calling gst_base_parse_finish_frame() with a non-queued frame. @@ -74,11 +74,11 @@ private import gstreamer.TagList; * #GstAdapter. * * * A buffer of (at least) min_frame_size bytes is passed to subclass - * with #GstBaseParseClass.handle_frame(). Subclass checks the contents + * with #GstBaseParseClass::handle_frame. Subclass checks the contents * and can optionally return #GST_FLOW_OK along with an amount of data * to be skipped to find a valid frame (which will result in a * subsequent DISCONT). If, otherwise, the buffer does not hold a - * complete frame, #GstBaseParseClass.handle_frame() can merely return + * complete frame, #GstBaseParseClass::handle_frame can merely return * and will be called again when additional data is available. In push * mode this amounts to an additional input buffer (thus minimal * additional latency), in pull mode this amounts to some arbitrary @@ -93,7 +93,7 @@ private import gstreamer.TagList; * data while simultaneously providing custom output data. Note that * baseclass performs some processing (such as tracking overall consumed * data rate versus duration) for each finished frame, but other state - * is only updated upon each call to #GstBaseParseClass.handle_frame() + * is only updated upon each call to #GstBaseParseClass::handle_frame * (such as tracking upstream input timestamp). * * Subclass is also responsible for setting the buffer metadata @@ -104,30 +104,30 @@ private import gstreamer.TagList; * duration obtained from configuration (see below), and offset * if meaningful (in pull mode). * - * Note that #GstBaseParseClass.handle_frame() might receive any small + * Note that #GstBaseParseClass::handle_frame might receive any small * amount of input data when leftover data is being drained (e.g. at * EOS). * * * As part of finish frame processing, just prior to actually pushing * the buffer in question, it is passed to - * #GstBaseParseClass.pre_push_frame() which gives subclass yet one last + * #GstBaseParseClass::pre_push_frame which gives subclass yet one last * chance to examine buffer metadata, or to send some custom (tag) * events, or to perform custom (segment) filtering. * * * During the parsing process #GstBaseParseClass will handle both srcpad * and sinkpad events. They will be passed to subclass if - * #GstBaseParseClass.event() or #GstBaseParseClass.src_event() + * #GstBaseParseClass::sink_event or #GstBaseParseClass::src_event * implementations have been provided. * * ## Shutdown phase * - * * #GstBaseParse class calls #GstBaseParseClass.stop() to inform the + * * #GstBaseParse class calls #GstBaseParseClass::stop to inform the * subclass that data parsing will be stopped. * * Subclass is responsible for providing pad template caps for source and * sink pads. The pads need to be named "sink" and "src". It also needs to * set the fixed caps on srcpad, when the format is ensured (e.g. when - * base class calls subclass' #GstBaseParseClass.set_sink_caps() function). + * base class calls subclass' #GstBaseParseClass::set_sink_caps function). * * This base class uses %GST_FORMAT_DEFAULT as a meaning of frames. So, * subclass conversion routine needs to know that conversion from @@ -147,7 +147,7 @@ private import gstreamer.TagList; * * Inform base class how big data chunks should be retrieved. This is * done with gst_base_parse_set_min_frame_size() function. * * Examine data chunks passed to subclass with - * #GstBaseParseClass.handle_frame() and pass proper frame(s) to + * #GstBaseParseClass::handle_frame and pass proper frame(s) to * gst_base_parse_finish_frame(), and setting src pad caps and timestamps * on frame. * * Provide conversion functions @@ -163,7 +163,7 @@ private import gstreamer.TagList; * metadata (which will be taken from upstream as much as * possible). Internally keeping track of frame durations and respective * sizes that have been pushed provides #GstBaseParse with an estimated - * bitrate. A default #GstBaseParseClass.convert() (used if not + * bitrate. A default #GstBaseParseClass::convert (used if not * overridden) will then use these rates to perform obvious conversions. * These rates are also used to update (estimated) duration at regular * frame intervals. @@ -223,7 +223,7 @@ public class BaseParse : Element } /** - * Default implementation of #GstBaseParseClass.convert(). + * Default implementation of #GstBaseParseClass::convert. * * Params: * srcFormat = #GstFormat describing the source format. @@ -421,10 +421,10 @@ public class BaseParse : Element * Set if the nature of the format or configuration does not allow (much) * parsing, and the parser should operate in passthrough mode (which only * applies when operating in push mode). That is, incoming buffers are - * pushed through unmodified, i.e. no #GstBaseParseClass.handle_frame() - * will be invoked, but #GstBaseParseClass.pre_push_frame() will still be + * pushed through unmodified, i.e. no #GstBaseParseClass::handle_frame + * will be invoked, but #GstBaseParseClass::pre_push_frame will still be * invoked, so subclass can perform as much or as little is appropriate for - * passthrough semantics in #GstBaseParseClass.pre_push_frame(). + * passthrough semantics in #GstBaseParseClass::pre_push_frame. * * Params: * passthrough = %TRUE if parser should run in passthrough mode diff --git a/generated/gstreamer/gst/base/BaseParseFrame.d b/generated/gstreamer/gst/base/BaseParseFrame.d index 7f12e2d8b..baab6c241 100644 --- a/generated/gstreamer/gst/base/BaseParseFrame.d +++ b/generated/gstreamer/gst/base/BaseParseFrame.d @@ -102,31 +102,33 @@ public class BaseParseFrame */ public this(Buffer buffer, GstBaseParseFrameFlags flags, int overhead) { - auto p = gst_base_parse_frame_new((buffer is null) ? null : buffer.getBufferStruct(), flags, overhead); + auto __p = gst_base_parse_frame_new((buffer is null) ? null : buffer.getBufferStruct(), flags, overhead); - if(p is null) + if(__p is null) { throw new ConstructionException("null returned by new"); } - this(cast(GstBaseParseFrame*) p); + this(cast(GstBaseParseFrame*) __p); } /** * Copies a #GstBaseParseFrame. * * Returns: A copy of @frame + * + * Since: 1.12.1 */ public BaseParseFrame copy() { - auto p = gst_base_parse_frame_copy(gstBaseParseFrame); + auto __p = gst_base_parse_frame_copy(gstBaseParseFrame); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(BaseParseFrame)(cast(GstBaseParseFrame*) p, true); + return ObjectG.getDObject!(BaseParseFrame)(cast(GstBaseParseFrame*) __p, true); } /** diff --git a/generated/gstreamer/gst/base/BaseSink.d b/generated/gstreamer/gst/base/BaseSink.d index def954dd9..c36da481b 100644 --- a/generated/gstreamer/gst/base/BaseSink.d +++ b/generated/gstreamer/gst/base/BaseSink.d @@ -30,6 +30,7 @@ public import gst.base.c.types; private import gstreamer.Element; private import gstreamer.MiniObject; private import gstreamer.Sample; +private import gstreamer.Structure; /** @@ -54,7 +55,7 @@ private import gstreamer.Sample; * * // sinktemplate should be a #GstStaticPadTemplate with direction * // %GST_PAD_SINK and name "sink" - * gst_element_class_add_static_pad_template (gstelement_class, &sinktemplate); + * gst_element_class_add_static_pad_template (gstelement_class, &sinktemplate); * * gst_element_class_set_static_metadata (gstelement_class, * "Sink name", @@ -67,19 +68,19 @@ private import gstreamer.Sample; * #GstBaseSink will handle the prerolling correctly. This means that it will * return %GST_STATE_CHANGE_ASYNC from a state change to PAUSED until the first * buffer arrives in this element. The base class will call the - * #GstBaseSinkClass.preroll() vmethod with this preroll buffer and will then + * #GstBaseSinkClass::preroll vmethod with this preroll buffer and will then * commit the state change to the next asynchronously pending state. * * When the element is set to PLAYING, #GstBaseSink will synchronise on the - * clock using the times returned from #GstBaseSinkClass.get_times(). If this + * clock using the times returned from #GstBaseSinkClass::get_times. If this * function returns %GST_CLOCK_TIME_NONE for the start time, no synchronisation * will be done. Synchronisation can be disabled entirely by setting the object * #GstBaseSink:sync property to %FALSE. * - * After synchronisation the virtual method #GstBaseSinkClass.render() will be + * After synchronisation the virtual method #GstBaseSinkClass::render will be * called. Subclasses should minimally implement this method. * - * Subclasses that synchronise on the clock in the #GstBaseSinkClass.render() + * Subclasses that synchronise on the clock in the #GstBaseSinkClass::render * method are supported as well. These classes typically receive a buffer in * the render method and can then potentially block on the clock while * rendering. A typical example is an audiosink. @@ -88,7 +89,7 @@ private import gstreamer.Sample; * * Upon receiving the EOS event in the PLAYING state, #GstBaseSink will wait * for the clock to reach the time indicated by the stop time of the last - * #GstBaseSinkClass.get_times() call before posting an EOS message. When the + * #GstBaseSinkClass::get_times call before posting an EOS message. When the * element receives EOS in PAUSED, preroll completes, the event is queued and an * EOS message is posted when going to PLAYING. * @@ -103,24 +104,24 @@ private import gstreamer.Sample; * If no clock has been set on the element, the query will be forwarded * upstream. * - * The #GstBaseSinkClass.set_caps() function will be called when the subclass + * The #GstBaseSinkClass::set_caps function will be called when the subclass * should configure itself to process a specific media type. * - * The #GstBaseSinkClass.start() and #GstBaseSinkClass.stop() virtual methods + * The #GstBaseSinkClass::start and #GstBaseSinkClass::stop virtual methods * will be called when resources should be allocated. Any - * #GstBaseSinkClass.preroll(), #GstBaseSinkClass.render() and - * #GstBaseSinkClass.set_caps() function will be called between the - * #GstBaseSinkClass.start() and #GstBaseSinkClass.stop() calls. + * #GstBaseSinkClass::preroll, #GstBaseSinkClass::render and + * #GstBaseSinkClass::set_caps function will be called between the + * #GstBaseSinkClass::start and #GstBaseSinkClass::stop calls. * - * The #GstBaseSinkClass.event() virtual method will be called when an event is + * The #GstBaseSinkClass::event virtual method will be called when an event is * received by #GstBaseSink. Normally this method should only be overridden by * very specific elements (such as file sinks) which need to handle the * newsegment event specially. * - * The #GstBaseSinkClass.unlock() method is called when the elements should + * The #GstBaseSinkClass::unlock method is called when the elements should * unblock any blocking operations they perform in the - * #GstBaseSinkClass.render() method. This is mostly useful when the - * #GstBaseSinkClass.render() method performs a blocking write on a file + * #GstBaseSinkClass::render method. This is mostly useful when the + * #GstBaseSinkClass::render method performs a blocking write on a file * descriptor, for example. * * The #GstBaseSink:max-lateness property affects how the sink deals with @@ -131,7 +132,7 @@ private import gstreamer.Sample; * If the frame is later than max-lateness, the sink will drop the buffer * without calling the render method. * This feature is disabled if sync is disabled, the - * #GstBaseSinkClass.get_times() method does not return a valid start time or + * #GstBaseSinkClass::get_times method does not return a valid start time or * max-lateness is set to -1 (the default). * Subclasses can use gst_base_sink_set_max_lateness() to configure the * max-lateness value. @@ -240,14 +241,14 @@ public class BaseSink : Element */ public Sample getLastSample() { - auto p = gst_base_sink_get_last_sample(gstBaseSink); + auto __p = gst_base_sink_get_last_sample(gstBaseSink); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Sample)(cast(GstSample*) p, true); + return ObjectG.getDObject!(Sample)(cast(GstSample*) __p, true); } /** @@ -310,6 +311,30 @@ public class BaseSink : Element return gst_base_sink_get_render_delay(gstBaseSink); } + /** + * Return various #GstBaseSink statistics. This function returns a #GstStructure + * with name `application/x-gst-base-sink-stats` with the following fields: + * + * - "average-rate" G_TYPE_DOUBLE average frame rate + * - "dropped" G_TYPE_UINT64 Number of dropped frames + * - "rendered" G_TYPE_UINT64 Number of rendered frames + * + * Returns: pointer to #GstStructure + * + * Since: 1.18 + */ + public Structure getStats() + { + auto __p = gst_base_sink_get_stats(gstBaseSink); + + if(__p is null) + { + return null; + } + + return ObjectG.getDObject!(Structure)(cast(GstStructure*) __p, true); + } + /** * Checks if @sink is currently configured to synchronize against the * clock. @@ -401,12 +426,12 @@ public class BaseSink : Element int outlive; int outupstreamLive; - auto p = gst_base_sink_query_latency(gstBaseSink, &outlive, &outupstreamLive, &minLatency, &maxLatency) != 0; + auto __p = gst_base_sink_query_latency(gstBaseSink, &outlive, &outupstreamLive, &minLatency, &maxLatency) != 0; live = (outlive == 1); upstreamLive = (outupstreamLive == 1); - return p; + return __p; } /** @@ -609,9 +634,9 @@ public class BaseSink : Element * is no clock, no synchronisation is done and %GST_CLOCK_BADTIME is returned. * * This function should only be called with the PREROLL_LOCK held, like when - * receiving an EOS event in the #GstBaseSinkClass.event() vmethod or when + * receiving an EOS event in the #GstBaseSinkClass::event vmethod or when * receiving a buffer in - * the #GstBaseSinkClass.render() vmethod. + * the #GstBaseSinkClass::render vmethod. * * The @time argument should be the running_time of when this method should * return and is not adjusted with any latency or offset configured in the @@ -629,14 +654,14 @@ public class BaseSink : Element } /** - * If the #GstBaseSinkClass.render() method performs its own synchronisation + * If the #GstBaseSinkClass::render method performs its own synchronisation * against the clock it must unblock when going from PLAYING to the PAUSED state * and call this method before continuing to render the remaining data. * - * If the #GstBaseSinkClass.render() method can block on something else than + * If the #GstBaseSinkClass::render method can block on something else than * the clock, it must also be ready to unblock immediately on - * the #GstBaseSinkClass.unlock() method and cause the - * #GstBaseSinkClass.render() method to immediately call this function. + * the #GstBaseSinkClass::unlock method and cause the + * #GstBaseSinkClass::render method to immediately call this function. * In this case, the subclass must be prepared to continue rendering where it * left off if this function returns %GST_FLOW_OK. * diff --git a/generated/gstreamer/gst/base/BaseSrc.d b/generated/gstreamer/gst/base/BaseSrc.d index 5219490bb..0305e0749 100644 --- a/generated/gstreamer/gst/base/BaseSrc.d +++ b/generated/gstreamer/gst/base/BaseSrc.d @@ -34,6 +34,7 @@ private import gstreamer.BufferList; private import gstreamer.BufferPool; private import gstreamer.Caps; private import gstreamer.Element; +private import gstreamer.Segment; /** @@ -53,25 +54,25 @@ private import gstreamer.Element; * conditions are met, it also supports pull mode scheduling: * * * The format is set to %GST_FORMAT_BYTES (default). - * * #GstBaseSrcClass.is_seekable() returns %TRUE. + * * #GstBaseSrcClass::is_seekable returns %TRUE. * * If all the conditions are met for operating in pull mode, #GstBaseSrc is * automatically seekable in push mode as well. The following conditions must * be met to make the element seekable in push mode when the format is not * %GST_FORMAT_BYTES: * - * * #GstBaseSrcClass.is_seekable() returns %TRUE. - * * #GstBaseSrcClass.query() can convert all supported seek formats to the + * * #GstBaseSrcClass::is_seekable returns %TRUE. + * * #GstBaseSrcClass::query can convert all supported seek formats to the * internal format as set with gst_base_src_set_format(). - * * #GstBaseSrcClass.do_seek() is implemented, performs the seek and returns + * * #GstBaseSrcClass::do_seek is implemented, performs the seek and returns * %TRUE. * * When the element does not meet the requirements to operate in pull mode, the - * offset and length in the #GstBaseSrcClass.create() method should be ignored. + * offset and length in the #GstBaseSrcClass::create method should be ignored. * It is recommended to subclass #GstPushSrc instead, in this situation. If the * element can operate in pull mode but only with specific offsets and * lengths, it is allowed to generate an error when the wrong values are passed - * to the #GstBaseSrcClass.create() function. + * to the #GstBaseSrcClass::create function. * * #GstBaseSrc has support for live sources. Live sources are sources that when * paused discard data, such as audio or video capture devices. A typical live @@ -80,7 +81,7 @@ private import gstreamer.Element; * Use gst_base_src_set_live() to activate the live source mode. * * A live source does not produce data in the PAUSED state. This means that the - * #GstBaseSrcClass.create() method will not be called in PAUSED but only in + * #GstBaseSrcClass::create method will not be called in PAUSED but only in * PLAYING. To signal the pipeline that the element will not produce data, the * return value from the READY to PAUSED state will be * %GST_STATE_CHANGE_NO_PREROLL. @@ -92,12 +93,12 @@ private import gstreamer.Element; * * Live sources that synchronize and block on the clock (an audio source, for * example) can use gst_base_src_wait_playing() when the - * #GstBaseSrcClass.create() function was interrupted by a state change to + * #GstBaseSrcClass::create function was interrupted by a state change to * PAUSED. * - * The #GstBaseSrcClass.get_times() method can be used to implement pseudo-live - * sources. It only makes sense to implement the #GstBaseSrcClass.get_times() - * function if the source is a live source. The #GstBaseSrcClass.get_times() + * The #GstBaseSrcClass::get_times method can be used to implement pseudo-live + * sources. It only makes sense to implement the #GstBaseSrcClass::get_times + * function if the source is a live source. The #GstBaseSrcClass::get_times * function should return timestamps starting from 0, as if it were a non-live * source. The base class will make sure that the timestamps are transformed * into the current running_time. The base source will then wait for the @@ -120,7 +121,7 @@ private import gstreamer.Element; * GstElementClass *gstelement_class = GST_ELEMENT_CLASS (klass); * // srctemplate should be a #GstStaticPadTemplate with direction * // %GST_PAD_SRC and name "src" - * gst_element_class_add_static_pad_template (gstelement_class, &srctemplate); + * gst_element_class_add_static_pad_template (gstelement_class, &srctemplate); * * gst_element_class_set_static_metadata (gstelement_class, * "Source name", @@ -194,8 +195,7 @@ public class BaseSrc : Element * Params: * allocator = the #GstAllocator * used - * params = the - * #GstAllocationParams of @allocator + * params = the #GstAllocationParams of @allocator */ public void getAllocator(out Allocator allocator, out AllocationParams params) { @@ -224,14 +224,14 @@ public class BaseSrc : Element */ public BufferPool getBufferPool() { - auto p = gst_base_src_get_buffer_pool(gstBaseSrc); + auto __p = gst_base_src_get_buffer_pool(gstBaseSrc); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(BufferPool)(cast(GstBufferPool*) p, true); + return ObjectG.getDObject!(BufferPool)(cast(GstBufferPool*) __p, true); } /** @@ -264,14 +264,34 @@ public class BaseSrc : Element return gst_base_src_is_live(gstBaseSrc) != 0; } + /** + * Negotiates src pad caps with downstream elements. + * Unmarks GST_PAD_FLAG_NEED_RECONFIGURE in any case. But marks it again + * if #GstBaseSrcClass::negotiate fails. + * + * Do not call this in the #GstBaseSrcClass::fill vmethod. Call this in + * #GstBaseSrcClass::create or in #GstBaseSrcClass::alloc, _before_ any + * buffer is allocated. + * + * Returns: %TRUE if the negotiation succeeded, else %FALSE. + * + * Since: 1.18 + */ + public bool negotiate() + { + return gst_base_src_negotiate(gstBaseSrc) != 0; + } + /** * Prepare a new seamless segment for emission downstream. This function must - * only be called by derived sub-classes, and only from the create() function, + * only be called by derived sub-classes, and only from the #GstBaseSrcClass::create function, * as the stream-lock needs to be held. * * The format for the new segment will be the current format of the source, as * configured with gst_base_src_set_format() * + * Deprecated: Use gst_base_src_new_segment() + * * Params: * start = The new start value for the segment * stop = Stop value for the new segment @@ -284,6 +304,29 @@ public class BaseSrc : Element return gst_base_src_new_seamless_segment(gstBaseSrc, start, stop, time) != 0; } + /** + * Prepare a new segment for emission downstream. This function must + * only be called by derived sub-classes, and only from the #GstBaseSrcClass::create function, + * as the stream-lock needs to be held. + * + * The format for the @segment must be identical with the current format + * of the source, as configured with gst_base_src_set_format(). + * + * The format of @src must not be %GST_FORMAT_UNDEFINED and the format + * should be configured via gst_base_src_set_format() before calling this method. + * + * Params: + * segment = a pointer to a #GstSegment + * + * Returns: %TRUE if preparation of new segment succeeded. + * + * Since: 1.18 + */ + public bool newSegment(Segment segment) + { + return gst_base_src_new_segment(gstBaseSrc, (segment is null) ? null : segment.getSegmentStruct()) != 0; + } + /** * Query the source for the latency parameters. @live will be %TRUE when @src is * configured as a live source. @min_latency and @max_latency will be set @@ -303,11 +346,11 @@ public class BaseSrc : Element { int outlive; - auto p = gst_base_src_query_latency(gstBaseSrc, &outlive, &minLatency, &maxLatency) != 0; + auto __p = gst_base_src_query_latency(gstBaseSrc, &outlive, &minLatency, &maxLatency) != 0; live = (outlive == 1); - return p; + return __p; } /** @@ -333,7 +376,7 @@ public class BaseSrc : Element * When @src operates in %GST_FORMAT_TIME, #GstBaseSrc will send an EOS * when a buffer outside of the currently configured segment is pushed if * @automatic_eos is %TRUE. Since 1.16, if @automatic_eos is %FALSE an - * EOS will be pushed only when the #GstBaseSrc.create implementation + * EOS will be pushed only when the #GstBaseSrcClass::create implementation * returns %GST_FLOW_EOS. * * Params: @@ -402,7 +445,7 @@ public class BaseSrc : Element * for sending SEGMENT events and for performing seeks. * * If a format of GST_FORMAT_BYTES is set, the element will be able to - * operate in pull mode if the #GstBaseSrcClass.is_seekable() returns %TRUE. + * operate in pull mode if the #GstBaseSrcClass::is_seekable returns %TRUE. * * This function must only be called in states < %GST_STATE_PAUSED. * @@ -481,11 +524,11 @@ public class BaseSrc : Element */ public void submitBufferList(BufferList bufferList) { - gst_base_src_submit_buffer_list(gstBaseSrc, (bufferList is null) ? null : bufferList.getBufferListStruct()); + gst_base_src_submit_buffer_list(gstBaseSrc, (bufferList is null) ? null : bufferList.getBufferListStruct(true)); } /** - * If the #GstBaseSrcClass.create() method performs its own synchronisation + * If the #GstBaseSrcClass::create method performs its own synchronisation * against the clock it must unblock when going from PLAYING to the PAUSED state * and call this method before continuing to produce the remaining data. * diff --git a/generated/gstreamer/gst/base/BaseTransform.d b/generated/gstreamer/gst/base/BaseTransform.d index 90619596d..151ac28fe 100644 --- a/generated/gstreamer/gst/base/BaseTransform.d +++ b/generated/gstreamer/gst/base/BaseTransform.d @@ -177,16 +177,15 @@ public class BaseTransform : Element } /** - * Lets #GstBaseTransform sub-classes to know the memory @allocator + * Lets #GstBaseTransform sub-classes know the memory @allocator * used by the base class and its @params. * - * Unref the @allocator after use it. + * Unref the @allocator after use. * * Params: * allocator = the #GstAllocator * used - * params = the - * #GstAllocationParams of @allocator + * params = the #GstAllocationParams of @allocator */ public void getAllocator(out Allocator allocator, out AllocationParams params) { @@ -201,24 +200,24 @@ public class BaseTransform : Element /** * Returns: the instance of the #GstBufferPool used - * by @trans; free it after use it + * by @trans; free it after use */ public BufferPool getBufferPool() { - auto p = gst_base_transform_get_buffer_pool(gstBaseTransform); + auto __p = gst_base_transform_get_buffer_pool(gstBaseTransform); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(BufferPool)(cast(GstBufferPool*) p, true); + return ObjectG.getDObject!(BufferPool)(cast(GstBufferPool*) __p, true); } /** * See if @trans is configured as a in_place transform. * - * Returns: %TRUE is the transform is configured in in_place mode. + * Returns: %TRUE if the transform is configured in in_place mode. * * MT safe. */ @@ -230,7 +229,7 @@ public class BaseTransform : Element /** * See if @trans is configured as a passthrough transform. * - * Returns: %TRUE is the transform is configured in passthrough mode. + * Returns: %TRUE if the transform is configured in passthrough mode. * * MT safe. */ @@ -251,6 +250,31 @@ public class BaseTransform : Element return gst_base_transform_is_qos_enabled(gstBaseTransform) != 0; } + /** + * Negotiates src pad caps with downstream elements if the source pad is + * marked as needing reconfiguring. Unmarks GST_PAD_FLAG_NEED_RECONFIGURE in + * any case. But marks it again if negotiation fails. + * + * Do not call this in the #GstBaseTransformClass::transform or + * #GstBaseTransformClass::transform_ip vmethod. Call this in + * #GstBaseTransformClass::submit_input_buffer, + * #GstBaseTransformClass::prepare_output_buffer or in + * #GstBaseTransformClass::generate_output _before_ any output buffer is + * allocated. + * + * It will be default be called when handling an ALLOCATION query or at the + * very beginning of the default #GstBaseTransformClass::submit_input_buffer + * implementation. + * + * Returns: %TRUE if the negotiation succeeded, else %FALSE. + * + * Since: 1.18 + */ + public bool reconfigure() + { + return gst_base_transform_reconfigure(gstBaseTransform) != 0; + } + /** * Instructs @trans to request renegotiation upstream. This function is * typically called after properties on the transform were set that @@ -312,7 +336,7 @@ public class BaseTransform : Element * useful for filters that do not care about negotiation. * * Always %TRUE for filters which don't implement either a transform - * or transform_ip method. + * or transform_ip or generate_output method. * * MT safe. * @@ -379,7 +403,7 @@ public class BaseTransform : Element } /** - * Updates the srcpad caps and send the caps downstream. This function + * Updates the srcpad caps and sends the caps downstream. This function * can be used by subclasses when they have already negotiated their caps * but found a change in them (or computed new information). This way, * they can notify downstream about that change without losing any @@ -389,7 +413,7 @@ public class BaseTransform : Element * updatedCaps = An updated version of the srcpad caps to be pushed * downstream * - * Returns: %TRUE if the caps could be send downstream %FALSE otherwise + * Returns: %TRUE if the caps could be sent downstream %FALSE otherwise * * Since: 1.6 */ diff --git a/generated/gstreamer/gst/base/BitReader.d b/generated/gstreamer/gst/base/BitReader.d index 587479d91..659790b1e 100644 --- a/generated/gstreamer/gst/base/BitReader.d +++ b/generated/gstreamer/gst/base/BitReader.d @@ -288,13 +288,13 @@ public class BitReader */ public this(ubyte[] data) { - auto p = gst_bit_reader_new(data.ptr, cast(uint)data.length); + auto __p = gst_bit_reader_new(data.ptr, cast(uint)data.length); - if(p is null) + if(__p is null) { throw new ConstructionException("null returned by new"); } - this(cast(GstBitReader*) p); + this(cast(GstBitReader*) __p); } } diff --git a/generated/gstreamer/gst/base/BitWriter.d b/generated/gstreamer/gst/base/BitWriter.d index eacebf52b..44df8cdd2 100644 --- a/generated/gstreamer/gst/base/BitWriter.d +++ b/generated/gstreamer/gst/base/BitWriter.d @@ -36,6 +36,8 @@ private import gtkd.Loader; * #GstBitWriter provides a bit writer that can write any number of * bits into a memory buffer. It provides functions for writing any * number of bits into 8, 16, 32 and 64 bit variables. + * + * Since: 1.16 */ public class BitWriter { @@ -107,14 +109,14 @@ public class BitWriter */ public Buffer freeAndGetBuffer() { - auto p = gst_bit_writer_free_and_get_buffer(gstBitWriter); + auto __p = gst_bit_writer_free_and_get_buffer(gstBitWriter); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Buffer)(cast(GstBuffer*) p, true); + return ObjectG.getDObject!(Buffer)(cast(GstBuffer*) __p, true); } /** @@ -128,9 +130,9 @@ public class BitWriter */ public ubyte[] freeAndGetData() { - auto p = gst_bit_writer_free_and_get_data(gstBitWriter); + auto __p = gst_bit_writer_free_and_get_data(gstBitWriter); - return p[0 .. getArrayLength(p)]; + return __p[0 .. getArrayLength(__p)]; } /** @@ -138,9 +140,11 @@ public class BitWriter * * Returns: data pointer */ - public ubyte* getData() + public ubyte[] getData() { - return gst_bit_writer_get_data(gstBitWriter); + auto __p = gst_bit_writer_get_data(gstBitWriter); + + return __p[0 .. getArrayLength(__p)]; } /** */ @@ -259,9 +263,9 @@ public class BitWriter * * Returns: %TRUE if successful, %FALSE otherwise. */ - public bool putBytes(ubyte* data, uint nbytes) + public bool putBytes(ubyte[] data, uint nbytes) { - return gst_bit_writer_put_bytes(gstBitWriter, data, nbytes) != 0; + return gst_bit_writer_put_bytes(gstBitWriter, data.ptr, nbytes) != 0; } /** @@ -282,14 +286,14 @@ public class BitWriter */ public Buffer resetAndGetBuffer() { - auto p = gst_bit_writer_reset_and_get_buffer(gstBitWriter); + auto __p = gst_bit_writer_reset_and_get_buffer(gstBitWriter); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Buffer)(cast(GstBuffer*) p, true); + return ObjectG.getDObject!(Buffer)(cast(GstBuffer*) __p, true); } /** @@ -302,9 +306,9 @@ public class BitWriter */ public ubyte[] resetAndGetData() { - auto p = gst_bit_writer_reset_and_get_data(gstBitWriter); + auto __p = gst_bit_writer_reset_and_get_data(gstBitWriter); - return p[0 .. getArrayLength(p)]; + return __p[0 .. getArrayLength(__p)]; } /** */ @@ -324,42 +328,41 @@ public class BitWriter */ public this() { - auto p = gst_bit_writer_new(); + auto __p = gst_bit_writer_new(); - if(p is null) + if(__p is null) { throw new ConstructionException("null returned by new"); } - this(cast(GstBitWriter*) p); + this(cast(GstBitWriter*) __p); } /** * Creates a new #GstBitWriter instance with the given memory area. If * @initialized is %TRUE it is possible to read @size bits from the - * #GstBitWriter from the beginnig. + * #GstBitWriter from the beginning. * * Free-function: gst_bit_writer_free * * Params: * data = Memory area for writing - * size = Size of @data in bytes * initialized = if %TRUE the complete data can be read from the beginning * * Returns: a new #GstBitWriter instance * * Throws: ConstructionException GTK+ fails to create the object. */ - public this(ubyte* data, uint size, bool initialized) + public this(ubyte[] data, bool initialized) { - auto p = gst_bit_writer_new_with_data(data, size, initialized); + auto __p = gst_bit_writer_new_with_data(data.ptr, cast(uint)data.length, initialized); - if(p is null) + if(__p is null) { throw new ConstructionException("null returned by new_with_data"); } - this(cast(GstBitWriter*) p); + this(cast(GstBitWriter*) __p); } /** @@ -377,13 +380,13 @@ public class BitWriter */ public this(uint size, bool fixed) { - auto p = gst_bit_writer_new_with_size(size, fixed); + auto __p = gst_bit_writer_new_with_size(size, fixed); - if(p is null) + if(__p is null) { throw new ConstructionException("null returned by new_with_size"); } - this(cast(GstBitWriter*) p); + this(cast(GstBitWriter*) __p); } } diff --git a/generated/gstreamer/gst/base/ByteReader.d b/generated/gstreamer/gst/base/ByteReader.d index dddc0f177..ab9b9e970 100644 --- a/generated/gstreamer/gst/base/ByteReader.d +++ b/generated/gstreamer/gst/base/ByteReader.d @@ -91,13 +91,13 @@ public class ByteReader */ public bool dupData(out ubyte[] val) { - ubyte* outval = null; + ubyte* outval; - auto p = gst_byte_reader_dup_data(gstByteReader, cast(uint)val.length, &outval) != 0; + auto __p = gst_byte_reader_dup_data(gstByteReader, cast(uint)val.length, &outval) != 0; val = outval[0 .. cast(uint)val.length]; - return p; + return __p; } /** @@ -125,13 +125,13 @@ public class ByteReader */ public bool dupStringUtf16(out ushort[] str) { - ushort* outstr = null; + ushort* outstr; - auto p = gst_byte_reader_dup_string_utf16(gstByteReader, &outstr) != 0; + auto __p = gst_byte_reader_dup_string_utf16(gstByteReader, &outstr) != 0; str = outstr[0 .. getArrayLength(outstr)]; - return p; + return __p; } /** @@ -159,13 +159,13 @@ public class ByteReader */ public bool dupStringUtf32(out uint[] str) { - uint* outstr = null; + uint* outstr; - auto p = gst_byte_reader_dup_string_utf32(gstByteReader, &outstr) != 0; + auto __p = gst_byte_reader_dup_string_utf32(gstByteReader, &outstr) != 0; str = outstr[0 .. getArrayLength(outstr)]; - return p; + return __p; } /** @@ -189,11 +189,11 @@ public class ByteReader { char* outstr = null; - auto p = gst_byte_reader_dup_string_utf8(gstByteReader, &outstr) != 0; + auto __p = gst_byte_reader_dup_string_utf8(gstByteReader, &outstr) != 0; str = Str.toString(outstr); - return p; + return __p; } /** @@ -219,13 +219,13 @@ public class ByteReader */ public bool getData(out ubyte[] val) { - ubyte* outval = null; + ubyte* outval; - auto p = gst_byte_reader_get_data(gstByteReader, cast(uint)val.length, &outval) != 0; + auto __p = gst_byte_reader_get_data(gstByteReader, cast(uint)val.length, &outval) != 0; val = outval[0 .. cast(uint)val.length]; - return p; + return __p; } /** @@ -460,11 +460,11 @@ public class ByteReader { char* outstr = null; - auto p = gst_byte_reader_get_string_utf8(gstByteReader, &outstr) != 0; + auto __p = gst_byte_reader_get_string_utf8(gstByteReader, &outstr) != 0; str = Str.toString(outstr); - return p; + return __p; } /** @@ -715,13 +715,13 @@ public class ByteReader */ public bool peekData(out ubyte[] val) { - ubyte* outval = null; + ubyte* outval; - auto p = gst_byte_reader_peek_data(gstByteReader, cast(uint)val.length, &outval) != 0; + auto __p = gst_byte_reader_peek_data(gstByteReader, cast(uint)val.length, &outval) != 0; val = outval[0 .. cast(uint)val.length]; - return p; + return __p; } /** @@ -926,11 +926,11 @@ public class ByteReader { char* outstr = null; - auto p = gst_byte_reader_peek_string_utf8(gstByteReader, &outstr) != 0; + auto __p = gst_byte_reader_peek_string_utf8(gstByteReader, &outstr) != 0; str = Str.toString(outstr); - return p; + return __p; } /** @@ -1167,13 +1167,13 @@ public class ByteReader */ public this(ubyte[] data) { - auto p = gst_byte_reader_new(data.ptr, cast(uint)data.length); + auto __p = gst_byte_reader_new(data.ptr, cast(uint)data.length); - if(p is null) + if(__p is null) { throw new ConstructionException("null returned by new"); } - this(cast(GstByteReader*) p); + this(cast(GstByteReader*) __p); } } diff --git a/generated/gstreamer/gst/base/ByteWriter.d b/generated/gstreamer/gst/base/ByteWriter.d index f2f589653..e53782312 100644 --- a/generated/gstreamer/gst/base/ByteWriter.d +++ b/generated/gstreamer/gst/base/ByteWriter.d @@ -157,14 +157,14 @@ public class ByteWriter */ public Buffer freeAndGetBuffer() { - auto p = gst_byte_writer_free_and_get_buffer(gstByteWriter); + auto __p = gst_byte_writer_free_and_get_buffer(gstByteWriter); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Buffer)(cast(GstBuffer*) p, true); + return ObjectG.getDObject!(Buffer)(cast(GstBuffer*) __p, true); } /** @@ -584,14 +584,14 @@ public class ByteWriter */ public Buffer resetAndGetBuffer() { - auto p = gst_byte_writer_reset_and_get_buffer(gstByteWriter); + auto __p = gst_byte_writer_reset_and_get_buffer(gstByteWriter); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Buffer)(cast(GstBuffer*) p, true); + return ObjectG.getDObject!(Buffer)(cast(GstBuffer*) __p, true); } /** @@ -605,14 +605,14 @@ public class ByteWriter */ public this() { - auto p = gst_byte_writer_new(); + auto __p = gst_byte_writer_new(); - if(p is null) + if(__p is null) { throw new ConstructionException("null returned by new"); } - this(cast(GstByteWriter*) p); + this(cast(GstByteWriter*) __p); } /** @@ -632,14 +632,14 @@ public class ByteWriter */ public this(ubyte[] data, bool initialized) { - auto p = gst_byte_writer_new_with_data(data.ptr, cast(uint)data.length, initialized); + auto __p = gst_byte_writer_new_with_data(data.ptr, cast(uint)data.length, initialized); - if(p is null) + if(__p is null) { throw new ConstructionException("null returned by new_with_data"); } - this(cast(GstByteWriter*) p); + this(cast(GstByteWriter*) __p); } /** @@ -658,13 +658,13 @@ public class ByteWriter */ public this(uint size, bool fixed) { - auto p = gst_byte_writer_new_with_size(size, fixed); + auto __p = gst_byte_writer_new_with_size(size, fixed); - if(p is null) + if(__p is null) { throw new ConstructionException("null returned by new_with_size"); } - this(cast(GstByteWriter*) p); + this(cast(GstByteWriter*) __p); } } diff --git a/generated/gstreamer/gst/base/CollectPads.d b/generated/gstreamer/gst/base/CollectPads.d index a14c09ea3..4855212b3 100644 --- a/generated/gstreamer/gst/base/CollectPads.d +++ b/generated/gstreamer/gst/base/CollectPads.d @@ -119,14 +119,14 @@ public class CollectPads : ObjectGst */ public this() { - auto p = gst_collect_pads_new(); + auto __p = gst_collect_pads_new(); - if(p is null) + if(__p is null) { throw new ConstructionException("null returned by new"); } - this(cast(GstCollectPads*) p, true); + this(cast(GstCollectPads*) __p, true); } /** @@ -207,11 +207,11 @@ public class CollectPads : ObjectGst { GstBuffer* outoutbuf = null; - auto p = gst_collect_pads_clip_running_time(gstCollectPads, cdata, (buf is null) ? null : buf.getBufferStruct(), &outoutbuf, userData); + auto __p = gst_collect_pads_clip_running_time(gstCollectPads, cdata, (buf is null) ? null : buf.getBufferStruct(), &outoutbuf, userData); outbuf = ObjectG.getDObject!(Buffer)(outoutbuf); - return p; + return __p; } /** @@ -264,14 +264,14 @@ public class CollectPads : ObjectGst */ public Buffer peek(GstCollectData* data) { - auto p = gst_collect_pads_peek(gstCollectPads, data); + auto __p = gst_collect_pads_peek(gstCollectPads, data); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Buffer)(cast(GstBuffer*) p, true); + return ObjectG.getDObject!(Buffer)(cast(GstBuffer*) __p, true); } /** @@ -289,14 +289,14 @@ public class CollectPads : ObjectGst */ public Buffer pop(GstCollectData* data) { - auto p = gst_collect_pads_pop(gstCollectPads, data); + auto __p = gst_collect_pads_pop(gstCollectPads, data); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Buffer)(cast(GstBuffer*) p, true); + return ObjectG.getDObject!(Buffer)(cast(GstBuffer*) __p, true); } /** @@ -332,14 +332,14 @@ public class CollectPads : ObjectGst */ public Buffer readBuffer(GstCollectData* data, uint size) { - auto p = gst_collect_pads_read_buffer(gstCollectPads, data, size); + auto __p = gst_collect_pads_read_buffer(gstCollectPads, data, size); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Buffer)(cast(GstBuffer*) p, true); + return ObjectG.getDObject!(Buffer)(cast(GstBuffer*) __p, true); } /** @@ -574,13 +574,13 @@ public class CollectPads : ObjectGst */ public Buffer takeBuffer(GstCollectData* data, uint size) { - auto p = gst_collect_pads_take_buffer(gstCollectPads, data, size); + auto __p = gst_collect_pads_take_buffer(gstCollectPads, data, size); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Buffer)(cast(GstBuffer*) p, true); + return ObjectG.getDObject!(Buffer)(cast(GstBuffer*) __p, true); } } diff --git a/generated/gstreamer/gst/base/DataQueue.d b/generated/gstreamer/gst/base/DataQueue.d index bff27fc2e..8730bd02a 100644 --- a/generated/gstreamer/gst/base/DataQueue.d +++ b/generated/gstreamer/gst/base/DataQueue.d @@ -94,14 +94,14 @@ public class DataQueue : ObjectG */ public this(GstDataQueueCheckFullFunction checkfull, GstDataQueueFullCallback fullcallback, GstDataQueueEmptyCallback emptycallback, void* checkdata) { - auto p = gst_data_queue_new(checkfull, fullcallback, emptycallback, checkdata); + auto __p = gst_data_queue_new(checkfull, fullcallback, emptycallback, checkdata); - if(p is null) + if(__p is null) { throw new ConstructionException("null returned by new"); } - this(cast(GstDataQueue*) p, true); + this(cast(GstDataQueue*) __p, true); } /** diff --git a/generated/gstreamer/gst/base/FlowCombiner.d b/generated/gstreamer/gst/base/FlowCombiner.d index 347d2b3ad..181b05d15 100644 --- a/generated/gstreamer/gst/base/FlowCombiner.d +++ b/generated/gstreamer/gst/base/FlowCombiner.d @@ -120,14 +120,14 @@ public class FlowCombiner */ public this() { - auto p = gst_flow_combiner_new(); + auto __p = gst_flow_combiner_new(); - if(p is null) + if(__p is null) { throw new ConstructionException("null returned by new"); } - this(cast(GstFlowCombiner*) p); + this(cast(GstFlowCombiner*) __p); } /** @@ -174,14 +174,14 @@ public class FlowCombiner */ public FlowCombiner ref_() { - auto p = gst_flow_combiner_ref(gstFlowCombiner); + auto __p = gst_flow_combiner_ref(gstFlowCombiner); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(FlowCombiner)(cast(GstFlowCombiner*) p, true); + return ObjectG.getDObject!(FlowCombiner)(cast(GstFlowCombiner*) __p, true); } /** diff --git a/generated/gstreamer/gst/base/QueueArray.d b/generated/gstreamer/gst/base/QueueArray.d index 0815bfded..d781a3132 100644 --- a/generated/gstreamer/gst/base/QueueArray.d +++ b/generated/gstreamer/gst/base/QueueArray.d @@ -352,14 +352,14 @@ public class QueueArray */ public this(uint initialSize) { - auto p = gst_queue_array_new(initialSize); + auto __p = gst_queue_array_new(initialSize); - if(p is null) + if(__p is null) { throw new ConstructionException("null returned by new"); } - this(cast(GstQueueArray*) p); + this(cast(GstQueueArray*) __p); } /** @@ -378,13 +378,13 @@ public class QueueArray */ public this(size_t structSize, uint initialSize) { - auto p = gst_queue_array_new_for_struct(structSize, initialSize); + auto __p = gst_queue_array_new_for_struct(structSize, initialSize); - if(p is null) + if(__p is null) { throw new ConstructionException("null returned by new_for_struct"); } - this(cast(GstQueueArray*) p); + this(cast(GstQueueArray*) __p); } } diff --git a/generated/gstreamer/gst/base/c/functions.d b/generated/gstreamer/gst/base/c/functions.d index 5fc6a8dbe..721369c02 100644 --- a/generated/gstreamer/gst/base/c/functions.d +++ b/generated/gstreamer/gst/base/c/functions.d @@ -75,12 +75,19 @@ shared static this() Linker.link(gst_aggregator_get_type, "gst_aggregator_get_type", LIBRARY_GSTBASE); Linker.link(gst_aggregator_finish_buffer, "gst_aggregator_finish_buffer", LIBRARY_GSTBASE); + Linker.link(gst_aggregator_finish_buffer_list, "gst_aggregator_finish_buffer_list", LIBRARY_GSTBASE); Linker.link(gst_aggregator_get_allocator, "gst_aggregator_get_allocator", LIBRARY_GSTBASE); Linker.link(gst_aggregator_get_buffer_pool, "gst_aggregator_get_buffer_pool", LIBRARY_GSTBASE); + Linker.link(gst_aggregator_get_ignore_inactive_pads, "gst_aggregator_get_ignore_inactive_pads", LIBRARY_GSTBASE); Linker.link(gst_aggregator_get_latency, "gst_aggregator_get_latency", LIBRARY_GSTBASE); + Linker.link(gst_aggregator_negotiate, "gst_aggregator_negotiate", LIBRARY_GSTBASE); + Linker.link(gst_aggregator_peek_next_sample, "gst_aggregator_peek_next_sample", LIBRARY_GSTBASE); + Linker.link(gst_aggregator_selected_samples, "gst_aggregator_selected_samples", LIBRARY_GSTBASE); + Linker.link(gst_aggregator_set_ignore_inactive_pads, "gst_aggregator_set_ignore_inactive_pads", LIBRARY_GSTBASE); Linker.link(gst_aggregator_set_latency, "gst_aggregator_set_latency", LIBRARY_GSTBASE); Linker.link(gst_aggregator_set_src_caps, "gst_aggregator_set_src_caps", LIBRARY_GSTBASE); Linker.link(gst_aggregator_simple_get_next_time, "gst_aggregator_simple_get_next_time", LIBRARY_GSTBASE); + Linker.link(gst_aggregator_update_segment, "gst_aggregator_update_segment", LIBRARY_GSTBASE); // gst.base.AggregatorPad @@ -88,6 +95,7 @@ shared static this() Linker.link(gst_aggregator_pad_drop_buffer, "gst_aggregator_pad_drop_buffer", LIBRARY_GSTBASE); Linker.link(gst_aggregator_pad_has_buffer, "gst_aggregator_pad_has_buffer", LIBRARY_GSTBASE); Linker.link(gst_aggregator_pad_is_eos, "gst_aggregator_pad_is_eos", LIBRARY_GSTBASE); + Linker.link(gst_aggregator_pad_is_inactive, "gst_aggregator_pad_is_inactive", LIBRARY_GSTBASE); Linker.link(gst_aggregator_pad_peek_buffer, "gst_aggregator_pad_peek_buffer", LIBRARY_GSTBASE); Linker.link(gst_aggregator_pad_pop_buffer, "gst_aggregator_pad_pop_buffer", LIBRARY_GSTBASE); @@ -132,6 +140,7 @@ shared static this() Linker.link(gst_base_sink_get_max_lateness, "gst_base_sink_get_max_lateness", LIBRARY_GSTBASE); Linker.link(gst_base_sink_get_processing_deadline, "gst_base_sink_get_processing_deadline", LIBRARY_GSTBASE); Linker.link(gst_base_sink_get_render_delay, "gst_base_sink_get_render_delay", LIBRARY_GSTBASE); + Linker.link(gst_base_sink_get_stats, "gst_base_sink_get_stats", LIBRARY_GSTBASE); Linker.link(gst_base_sink_get_sync, "gst_base_sink_get_sync", LIBRARY_GSTBASE); Linker.link(gst_base_sink_get_throttle_time, "gst_base_sink_get_throttle_time", LIBRARY_GSTBASE); Linker.link(gst_base_sink_get_ts_offset, "gst_base_sink_get_ts_offset", LIBRARY_GSTBASE); @@ -164,7 +173,9 @@ shared static this() Linker.link(gst_base_src_get_do_timestamp, "gst_base_src_get_do_timestamp", LIBRARY_GSTBASE); Linker.link(gst_base_src_is_async, "gst_base_src_is_async", LIBRARY_GSTBASE); Linker.link(gst_base_src_is_live, "gst_base_src_is_live", LIBRARY_GSTBASE); + Linker.link(gst_base_src_negotiate, "gst_base_src_negotiate", LIBRARY_GSTBASE); Linker.link(gst_base_src_new_seamless_segment, "gst_base_src_new_seamless_segment", LIBRARY_GSTBASE); + Linker.link(gst_base_src_new_segment, "gst_base_src_new_segment", LIBRARY_GSTBASE); Linker.link(gst_base_src_query_latency, "gst_base_src_query_latency", LIBRARY_GSTBASE); Linker.link(gst_base_src_set_async, "gst_base_src_set_async", LIBRARY_GSTBASE); Linker.link(gst_base_src_set_automatic_eos, "gst_base_src_set_automatic_eos", LIBRARY_GSTBASE); @@ -187,6 +198,7 @@ shared static this() Linker.link(gst_base_transform_is_in_place, "gst_base_transform_is_in_place", LIBRARY_GSTBASE); Linker.link(gst_base_transform_is_passthrough, "gst_base_transform_is_passthrough", LIBRARY_GSTBASE); Linker.link(gst_base_transform_is_qos_enabled, "gst_base_transform_is_qos_enabled", LIBRARY_GSTBASE); + Linker.link(gst_base_transform_reconfigure, "gst_base_transform_reconfigure", LIBRARY_GSTBASE); Linker.link(gst_base_transform_reconfigure_sink, "gst_base_transform_reconfigure_sink", LIBRARY_GSTBASE); Linker.link(gst_base_transform_reconfigure_src, "gst_base_transform_reconfigure_src", LIBRARY_GSTBASE); Linker.link(gst_base_transform_set_gap_aware, "gst_base_transform_set_gap_aware", LIBRARY_GSTBASE); @@ -497,12 +509,19 @@ __gshared extern(C) GType function() c_gst_aggregator_get_type; GstFlowReturn function(GstAggregator* aggregator, GstBuffer* buffer) c_gst_aggregator_finish_buffer; + GstFlowReturn function(GstAggregator* aggregator, GstBufferList* bufferlist) c_gst_aggregator_finish_buffer_list; void function(GstAggregator* self, GstAllocator** allocator, GstAllocationParams* params) c_gst_aggregator_get_allocator; GstBufferPool* function(GstAggregator* self) c_gst_aggregator_get_buffer_pool; + int function(GstAggregator* self) c_gst_aggregator_get_ignore_inactive_pads; GstClockTime function(GstAggregator* self) c_gst_aggregator_get_latency; + int function(GstAggregator* self) c_gst_aggregator_negotiate; + GstSample* function(GstAggregator* self, GstAggregatorPad* pad) c_gst_aggregator_peek_next_sample; + void function(GstAggregator* self, GstClockTime pts, GstClockTime dts, GstClockTime duration, GstStructure* info) c_gst_aggregator_selected_samples; + void function(GstAggregator* self, int ignore) c_gst_aggregator_set_ignore_inactive_pads; void function(GstAggregator* self, GstClockTime minLatency, GstClockTime maxLatency) c_gst_aggregator_set_latency; void function(GstAggregator* self, GstCaps* caps) c_gst_aggregator_set_src_caps; GstClockTime function(GstAggregator* self) c_gst_aggregator_simple_get_next_time; + void function(GstAggregator* self, GstSegment* segment) c_gst_aggregator_update_segment; // gst.base.AggregatorPad @@ -510,6 +529,7 @@ __gshared extern(C) int function(GstAggregatorPad* pad) c_gst_aggregator_pad_drop_buffer; int function(GstAggregatorPad* pad) c_gst_aggregator_pad_has_buffer; int function(GstAggregatorPad* pad) c_gst_aggregator_pad_is_eos; + int function(GstAggregatorPad* pad) c_gst_aggregator_pad_is_inactive; GstBuffer* function(GstAggregatorPad* pad) c_gst_aggregator_pad_peek_buffer; GstBuffer* function(GstAggregatorPad* pad) c_gst_aggregator_pad_pop_buffer; @@ -554,6 +574,7 @@ __gshared extern(C) long function(GstBaseSink* sink) c_gst_base_sink_get_max_lateness; GstClockTime function(GstBaseSink* sink) c_gst_base_sink_get_processing_deadline; GstClockTime function(GstBaseSink* sink) c_gst_base_sink_get_render_delay; + GstStructure* function(GstBaseSink* sink) c_gst_base_sink_get_stats; int function(GstBaseSink* sink) c_gst_base_sink_get_sync; ulong function(GstBaseSink* sink) c_gst_base_sink_get_throttle_time; GstClockTimeDiff function(GstBaseSink* sink) c_gst_base_sink_get_ts_offset; @@ -586,7 +607,9 @@ __gshared extern(C) int function(GstBaseSrc* src) c_gst_base_src_get_do_timestamp; int function(GstBaseSrc* src) c_gst_base_src_is_async; int function(GstBaseSrc* src) c_gst_base_src_is_live; + int function(GstBaseSrc* src) c_gst_base_src_negotiate; int function(GstBaseSrc* src, long start, long stop, long time) c_gst_base_src_new_seamless_segment; + int function(GstBaseSrc* src, GstSegment* segment) c_gst_base_src_new_segment; int function(GstBaseSrc* src, int* live, GstClockTime* minLatency, GstClockTime* maxLatency) c_gst_base_src_query_latency; void function(GstBaseSrc* src, int async) c_gst_base_src_set_async; void function(GstBaseSrc* src, int automaticEos) c_gst_base_src_set_automatic_eos; @@ -609,6 +632,7 @@ __gshared extern(C) int function(GstBaseTransform* trans) c_gst_base_transform_is_in_place; int function(GstBaseTransform* trans) c_gst_base_transform_is_passthrough; int function(GstBaseTransform* trans) c_gst_base_transform_is_qos_enabled; + int function(GstBaseTransform* trans) c_gst_base_transform_reconfigure; void function(GstBaseTransform* trans) c_gst_base_transform_reconfigure_sink; void function(GstBaseTransform* trans) c_gst_base_transform_reconfigure_src; void function(GstBaseTransform* trans, int gapAware) c_gst_base_transform_set_gap_aware; @@ -917,12 +941,19 @@ alias c_gst_adapter_unmap gst_adapter_unmap; alias c_gst_aggregator_get_type gst_aggregator_get_type; alias c_gst_aggregator_finish_buffer gst_aggregator_finish_buffer; +alias c_gst_aggregator_finish_buffer_list gst_aggregator_finish_buffer_list; alias c_gst_aggregator_get_allocator gst_aggregator_get_allocator; alias c_gst_aggregator_get_buffer_pool gst_aggregator_get_buffer_pool; +alias c_gst_aggregator_get_ignore_inactive_pads gst_aggregator_get_ignore_inactive_pads; alias c_gst_aggregator_get_latency gst_aggregator_get_latency; +alias c_gst_aggregator_negotiate gst_aggregator_negotiate; +alias c_gst_aggregator_peek_next_sample gst_aggregator_peek_next_sample; +alias c_gst_aggregator_selected_samples gst_aggregator_selected_samples; +alias c_gst_aggregator_set_ignore_inactive_pads gst_aggregator_set_ignore_inactive_pads; alias c_gst_aggregator_set_latency gst_aggregator_set_latency; alias c_gst_aggregator_set_src_caps gst_aggregator_set_src_caps; alias c_gst_aggregator_simple_get_next_time gst_aggregator_simple_get_next_time; +alias c_gst_aggregator_update_segment gst_aggregator_update_segment; // gst.base.AggregatorPad @@ -930,6 +961,7 @@ alias c_gst_aggregator_pad_get_type gst_aggregator_pad_get_type; alias c_gst_aggregator_pad_drop_buffer gst_aggregator_pad_drop_buffer; alias c_gst_aggregator_pad_has_buffer gst_aggregator_pad_has_buffer; alias c_gst_aggregator_pad_is_eos gst_aggregator_pad_is_eos; +alias c_gst_aggregator_pad_is_inactive gst_aggregator_pad_is_inactive; alias c_gst_aggregator_pad_peek_buffer gst_aggregator_pad_peek_buffer; alias c_gst_aggregator_pad_pop_buffer gst_aggregator_pad_pop_buffer; @@ -974,6 +1006,7 @@ alias c_gst_base_sink_get_max_bitrate gst_base_sink_get_max_bitrate; alias c_gst_base_sink_get_max_lateness gst_base_sink_get_max_lateness; alias c_gst_base_sink_get_processing_deadline gst_base_sink_get_processing_deadline; alias c_gst_base_sink_get_render_delay gst_base_sink_get_render_delay; +alias c_gst_base_sink_get_stats gst_base_sink_get_stats; alias c_gst_base_sink_get_sync gst_base_sink_get_sync; alias c_gst_base_sink_get_throttle_time gst_base_sink_get_throttle_time; alias c_gst_base_sink_get_ts_offset gst_base_sink_get_ts_offset; @@ -1006,7 +1039,9 @@ alias c_gst_base_src_get_buffer_pool gst_base_src_get_buffer_pool; alias c_gst_base_src_get_do_timestamp gst_base_src_get_do_timestamp; alias c_gst_base_src_is_async gst_base_src_is_async; alias c_gst_base_src_is_live gst_base_src_is_live; +alias c_gst_base_src_negotiate gst_base_src_negotiate; alias c_gst_base_src_new_seamless_segment gst_base_src_new_seamless_segment; +alias c_gst_base_src_new_segment gst_base_src_new_segment; alias c_gst_base_src_query_latency gst_base_src_query_latency; alias c_gst_base_src_set_async gst_base_src_set_async; alias c_gst_base_src_set_automatic_eos gst_base_src_set_automatic_eos; @@ -1029,6 +1064,7 @@ alias c_gst_base_transform_get_buffer_pool gst_base_transform_get_buffer_pool; alias c_gst_base_transform_is_in_place gst_base_transform_is_in_place; alias c_gst_base_transform_is_passthrough gst_base_transform_is_passthrough; alias c_gst_base_transform_is_qos_enabled gst_base_transform_is_qos_enabled; +alias c_gst_base_transform_reconfigure gst_base_transform_reconfigure; alias c_gst_base_transform_reconfigure_sink gst_base_transform_reconfigure_sink; alias c_gst_base_transform_reconfigure_src gst_base_transform_reconfigure_src; alias c_gst_base_transform_set_gap_aware gst_base_transform_set_gap_aware; diff --git a/generated/gstreamer/gst/base/c/types.d b/generated/gstreamer/gst/base/c/types.d index c09ceacfd..74afaacc1 100644 --- a/generated/gstreamer/gst/base/c/types.d +++ b/generated/gstreamer/gst/base/c/types.d @@ -29,6 +29,25 @@ public import gobject.c.types; public import gstreamer.c.types; +public enum GstAggregatorStartTimeSelection +{ + /** + * Start at running time 0. + */ + ZERO = 0, + /** + * Start at the running time of + * the first buffer that is received. + */ + FIRST = 1, + /** + * Start at the running time + * selected by the `start-time` property. + */ + SET = 2, +} +alias GstAggregatorStartTimeSelection AggregatorStartTimeSelection; + /** * Flags to be used in a #GstBaseParseFrame. */ @@ -145,6 +164,8 @@ struct GstAggregator * * Basically, a simple implementation will override @aggregate, and call * _finish_buffer from inside that function. + * + * Since: 1.14 */ struct GstAggregatorClass { @@ -185,7 +206,27 @@ struct GstAggregatorClass extern(C) int function(GstAggregator* self, GstQuery* query) decideAllocation; /** */ extern(C) int function(GstAggregator* self, GstAggregatorPad* pad, GstQuery* decideQuery, GstQuery* query) proposeAllocation; - void*[20] GstReserved; + /** + * + * Params: + * self = a #GstAggregator + * Returns: %TRUE if the negotiation succeeded, else %FALSE. + */ + extern(C) int function(GstAggregator* self) negotiate; + /** */ + extern(C) GstFlowReturn function(GstAggregator* aggregator, GstAggregatorPad* aggregatorPad, GstEvent* event) sinkEventPreQueue; + /** */ + extern(C) int function(GstAggregator* aggregator, GstAggregatorPad* aggregatorPad, GstQuery* query) sinkQueryPreQueue; + /** */ + extern(C) GstFlowReturn function(GstAggregator* aggregator, GstBufferList* bufferlist) finishBufferList; + /** + * Returns: The sample that is about to be aggregated. It may hold a #GstBuffer + * or a #GstBufferList. The contents of its info structure is subclass-dependent, + * and documented on a subclass basis. The buffers held by the sample are + * not writable. + */ + extern(C) GstSample* function(GstAggregator* aggregator, GstAggregatorPad* aggregatorPad) peekNextSample; + void*[15] GstReserved; } struct GstAggregatorPad @@ -413,7 +454,12 @@ struct GstBaseSrcClass GstElementClass parentClass; /** */ extern(C) GstCaps* function(GstBaseSrc* src, GstCaps* filter) getCaps; - /** */ + /** + * + * Params: + * src = base source instance + * Returns: %TRUE if the negotiation succeeded, else %FALSE. + */ extern(C) int function(GstBaseSrc* src) negotiate; /** */ extern(C) GstCaps* function(GstBaseSrc* src, GstCaps* caps) fixate; @@ -433,7 +479,9 @@ struct GstBaseSrcClass extern(C) int function(GstBaseSrc* src) stop; /** */ extern(C) void function(GstBaseSrc* src, GstBuffer* buffer, GstClockTime* start, GstClockTime* end) getTimes; - /** */ + /** + * Returns: %TRUE if the size is available and has been set. + */ extern(C) int function(GstBaseSrc* src, ulong* size) getSize; /** */ extern(C) int function(GstBaseSrc* src) isSeekable; diff --git a/generated/gstreamer/gst/mpegts/AtscMGT.d b/generated/gstreamer/gst/mpegts/AtscMGT.d index 5ef6c9561..f9bdb3ae0 100644 --- a/generated/gstreamer/gst/mpegts/AtscMGT.d +++ b/generated/gstreamer/gst/mpegts/AtscMGT.d @@ -24,8 +24,10 @@ module gst.mpegts.AtscMGT; +private import glib.ConstructionException; private import glib.MemorySlice; private import glib.PtrArray; +private import gobject.ObjectG; private import gst.mpegts.c.functions; public import gst.mpegts.c.types; private import gtkd.Loader; @@ -131,4 +133,17 @@ public final class AtscMGT { return gst_mpegts_atsc_mgt_get_type(); } + + /** */ + public this() + { + auto __p = gst_mpegts_atsc_mgt_new(); + + if(__p is null) + { + throw new ConstructionException("null returned by new"); + } + + this(cast(GstMpegtsAtscMGT*) __p); + } } diff --git a/generated/gstreamer/gst/mpegts/AtscMultString.d b/generated/gstreamer/gst/mpegts/AtscMultString.d index 984dc51fc..b10dcf9fe 100644 --- a/generated/gstreamer/gst/mpegts/AtscMultString.d +++ b/generated/gstreamer/gst/mpegts/AtscMultString.d @@ -27,6 +27,7 @@ module gst.mpegts.AtscMultString; private import glib.MemorySlice; private import glib.PtrArray; private import glib.Str; +private import glib.c.functions; private import gst.mpegts.c.functions; public import gst.mpegts.c.types; private import gtkd.Loader; diff --git a/generated/gstreamer/gst/mpegts/AtscRRT.d b/generated/gstreamer/gst/mpegts/AtscRRT.d new file mode 100644 index 000000000..239f926e7 --- /dev/null +++ b/generated/gstreamer/gst/mpegts/AtscRRT.d @@ -0,0 +1,165 @@ +/* + * This file is part of gtkD. + * + * gtkD is free software; you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 + * of the License, or (at your option) any later version, with + * some exceptions, please read the COPYING file. + * + * gtkD is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with gtkD; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110, USA + */ + +// generated automatically - do not change +// find conversion definition on APILookup.txt +// implement new conversion functionalities on the wrap.utils pakage + + +module gst.mpegts.AtscRRT; + +private import glib.ConstructionException; +private import glib.MemorySlice; +private import glib.PtrArray; +private import gobject.ObjectG; +private import gst.mpegts.c.functions; +public import gst.mpegts.c.types; +private import gtkd.Loader; + + +/** + * Region Rating Table (A65) + * + * Since: 1.18 + */ +public final class AtscRRT +{ + /** the main Gtk struct */ + protected GstMpegtsAtscRRT* gstMpegtsAtscRRT; + protected bool ownedRef; + + /** Get the main Gtk struct */ + public GstMpegtsAtscRRT* getAtscRRTStruct(bool transferOwnership = false) + { + if (transferOwnership) + ownedRef = false; + return gstMpegtsAtscRRT; + } + + /** the main Gtk struct as a void* */ + protected void* getStruct() + { + return cast(void*)gstMpegtsAtscRRT; + } + + /** + * Sets our main struct and passes it to the parent class. + */ + public this (GstMpegtsAtscRRT* gstMpegtsAtscRRT, bool ownedRef = false) + { + this.gstMpegtsAtscRRT = gstMpegtsAtscRRT; + this.ownedRef = ownedRef; + } + + ~this () + { + if ( Linker.isLoaded(LIBRARY_GSTMPEGTS) && ownedRef ) + sliceFree(gstMpegtsAtscRRT); + } + + + /** + * The protocol version + */ + public @property ubyte protocolVersion() + { + return gstMpegtsAtscRRT.protocolVersion; + } + + /** Ditto */ + public @property void protocolVersion(ubyte value) + { + gstMpegtsAtscRRT.protocolVersion = value; + } + + /** + * the names + */ + public @property PtrArray names() + { + return new PtrArray(gstMpegtsAtscRRT.names, false); + } + + /** Ditto */ + public @property void names(PtrArray value) + { + gstMpegtsAtscRRT.names = value.getPtrArrayStruct(); + } + + /** + * the number of dimensions defined for this rating table + */ + public @property ubyte dimensionsDefined() + { + return gstMpegtsAtscRRT.dimensionsDefined; + } + + /** Ditto */ + public @property void dimensionsDefined(ubyte value) + { + gstMpegtsAtscRRT.dimensionsDefined = value; + } + + /** + * A set of dimensions + */ + public @property PtrArray dimensions() + { + return new PtrArray(gstMpegtsAtscRRT.dimensions, false); + } + + /** Ditto */ + public @property void dimensions(PtrArray value) + { + gstMpegtsAtscRRT.dimensions = value.getPtrArrayStruct(); + } + + /** + * descriptors + */ + public @property PtrArray descriptors() + { + return new PtrArray(gstMpegtsAtscRRT.descriptors, false); + } + + /** Ditto */ + public @property void descriptors(PtrArray value) + { + gstMpegtsAtscRRT.descriptors = value.getPtrArrayStruct(); + } + + /** */ + public static GType getType() + { + return gst_mpegts_atsc_rrt_get_type(); + } + + /** */ + public this() + { + auto __p = gst_mpegts_atsc_rrt_new(); + + if(__p is null) + { + throw new ConstructionException("null returned by new"); + } + + this(cast(GstMpegtsAtscRRT*) __p); + } +} diff --git a/generated/gstreamer/gst/mpegts/AtscRRTDimension.d b/generated/gstreamer/gst/mpegts/AtscRRTDimension.d new file mode 100644 index 000000000..1d70310c0 --- /dev/null +++ b/generated/gstreamer/gst/mpegts/AtscRRTDimension.d @@ -0,0 +1,147 @@ +/* + * This file is part of gtkD. + * + * gtkD is free software; you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 + * of the License, or (at your option) any later version, with + * some exceptions, please read the COPYING file. + * + * gtkD is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with gtkD; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110, USA + */ + +// generated automatically - do not change +// find conversion definition on APILookup.txt +// implement new conversion functionalities on the wrap.utils pakage + + +module gst.mpegts.AtscRRTDimension; + +private import glib.ConstructionException; +private import glib.MemorySlice; +private import glib.PtrArray; +private import gobject.ObjectG; +private import gst.mpegts.c.functions; +public import gst.mpegts.c.types; +private import gtkd.Loader; + + +/** */ +public final class AtscRRTDimension +{ + /** the main Gtk struct */ + protected GstMpegtsAtscRRTDimension* gstMpegtsAtscRRTDimension; + protected bool ownedRef; + + /** Get the main Gtk struct */ + public GstMpegtsAtscRRTDimension* getAtscRRTDimensionStruct(bool transferOwnership = false) + { + if (transferOwnership) + ownedRef = false; + return gstMpegtsAtscRRTDimension; + } + + /** the main Gtk struct as a void* */ + protected void* getStruct() + { + return cast(void*)gstMpegtsAtscRRTDimension; + } + + /** + * Sets our main struct and passes it to the parent class. + */ + public this (GstMpegtsAtscRRTDimension* gstMpegtsAtscRRTDimension, bool ownedRef = false) + { + this.gstMpegtsAtscRRTDimension = gstMpegtsAtscRRTDimension; + this.ownedRef = ownedRef; + } + + ~this () + { + if ( Linker.isLoaded(LIBRARY_GSTMPEGTS) && ownedRef ) + sliceFree(gstMpegtsAtscRRTDimension); + } + + + /** + * the names + */ + public @property PtrArray names() + { + return new PtrArray(gstMpegtsAtscRRTDimension.names, false); + } + + /** Ditto */ + public @property void names(PtrArray value) + { + gstMpegtsAtscRRTDimension.names = value.getPtrArrayStruct(); + } + + /** + * whether the ratings represent a graduated scale + */ + public @property bool graduatedScale() + { + return gstMpegtsAtscRRTDimension.graduatedScale != 0; + } + + /** Ditto */ + public @property void graduatedScale(bool value) + { + gstMpegtsAtscRRTDimension.graduatedScale = value; + } + + /** + * the number of values defined for this dimension + */ + public @property ubyte valuesDefined() + { + return gstMpegtsAtscRRTDimension.valuesDefined; + } + + /** Ditto */ + public @property void valuesDefined(ubyte value) + { + gstMpegtsAtscRRTDimension.valuesDefined = value; + } + + /** + * set of values + */ + public @property PtrArray values() + { + return new PtrArray(gstMpegtsAtscRRTDimension.values, false); + } + + /** Ditto */ + public @property void values(PtrArray value) + { + gstMpegtsAtscRRTDimension.values = value.getPtrArrayStruct(); + } + + /** */ + public static GType getType() + { + return gst_mpegts_atsc_rrt_dimension_get_type(); + } + + /** */ + public this() + { + auto __p = gst_mpegts_atsc_rrt_dimension_new(); + + if(__p is null) + { + throw new ConstructionException("null returned by new"); + } + + this(cast(GstMpegtsAtscRRTDimension*) __p); + } +} diff --git a/generated/gstreamer/gst/mpegts/AtscRRTDimensionValue.d b/generated/gstreamer/gst/mpegts/AtscRRTDimensionValue.d new file mode 100644 index 000000000..de108a8a7 --- /dev/null +++ b/generated/gstreamer/gst/mpegts/AtscRRTDimensionValue.d @@ -0,0 +1,119 @@ +/* + * This file is part of gtkD. + * + * gtkD is free software; you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 + * of the License, or (at your option) any later version, with + * some exceptions, please read the COPYING file. + * + * gtkD is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with gtkD; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110, USA + */ + +// generated automatically - do not change +// find conversion definition on APILookup.txt +// implement new conversion functionalities on the wrap.utils pakage + + +module gst.mpegts.AtscRRTDimensionValue; + +private import glib.ConstructionException; +private import glib.MemorySlice; +private import glib.PtrArray; +private import gobject.ObjectG; +private import gst.mpegts.c.functions; +public import gst.mpegts.c.types; +private import gtkd.Loader; + + +/** */ +public final class AtscRRTDimensionValue +{ + /** the main Gtk struct */ + protected GstMpegtsAtscRRTDimensionValue* gstMpegtsAtscRRTDimensionValue; + protected bool ownedRef; + + /** Get the main Gtk struct */ + public GstMpegtsAtscRRTDimensionValue* getAtscRRTDimensionValueStruct(bool transferOwnership = false) + { + if (transferOwnership) + ownedRef = false; + return gstMpegtsAtscRRTDimensionValue; + } + + /** the main Gtk struct as a void* */ + protected void* getStruct() + { + return cast(void*)gstMpegtsAtscRRTDimensionValue; + } + + /** + * Sets our main struct and passes it to the parent class. + */ + public this (GstMpegtsAtscRRTDimensionValue* gstMpegtsAtscRRTDimensionValue, bool ownedRef = false) + { + this.gstMpegtsAtscRRTDimensionValue = gstMpegtsAtscRRTDimensionValue; + this.ownedRef = ownedRef; + } + + ~this () + { + if ( Linker.isLoaded(LIBRARY_GSTMPEGTS) && ownedRef ) + sliceFree(gstMpegtsAtscRRTDimensionValue); + } + + + /** + * the abbreviated ratings + */ + public @property PtrArray abbrevRatings() + { + return new PtrArray(gstMpegtsAtscRRTDimensionValue.abbrevRatings, false); + } + + /** Ditto */ + public @property void abbrevRatings(PtrArray value) + { + gstMpegtsAtscRRTDimensionValue.abbrevRatings = value.getPtrArrayStruct(); + } + + /** + * the ratings + */ + public @property PtrArray ratings() + { + return new PtrArray(gstMpegtsAtscRRTDimensionValue.ratings, false); + } + + /** Ditto */ + public @property void ratings(PtrArray value) + { + gstMpegtsAtscRRTDimensionValue.ratings = value.getPtrArrayStruct(); + } + + /** */ + public static GType getType() + { + return gst_mpegts_atsc_rrt_dimension_value_get_type(); + } + + /** */ + public this() + { + auto __p = gst_mpegts_atsc_rrt_dimension_value_new(); + + if(__p is null) + { + throw new ConstructionException("null returned by new"); + } + + this(cast(GstMpegtsAtscRRTDimensionValue*) __p); + } +} diff --git a/generated/gstreamer/gst/mpegts/AtscSTT.d b/generated/gstreamer/gst/mpegts/AtscSTT.d index bb8d0e018..748e00bdb 100644 --- a/generated/gstreamer/gst/mpegts/AtscSTT.d +++ b/generated/gstreamer/gst/mpegts/AtscSTT.d @@ -24,6 +24,7 @@ module gst.mpegts.AtscSTT; +private import glib.ConstructionException; private import glib.MemorySlice; private import glib.PtrArray; private import gobject.ObjectG; @@ -188,16 +189,29 @@ public final class AtscSTT return gst_mpegts_atsc_stt_get_type(); } + /** */ + public this() + { + auto __p = gst_mpegts_atsc_stt_new(); + + if(__p is null) + { + throw new ConstructionException("null returned by new"); + } + + this(cast(GstMpegtsAtscSTT*) __p); + } + /** */ public DateTime getDatetimeUtc() { - auto p = gst_mpegts_atsc_stt_get_datetime_utc(gstMpegtsAtscSTT); + auto __p = gst_mpegts_atsc_stt_get_datetime_utc(gstMpegtsAtscSTT); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(DateTime)(cast(GstDateTime*) p, true); + return ObjectG.getDObject!(DateTime)(cast(GstDateTime*) __p, true); } } diff --git a/generated/gstreamer/gst/mpegts/AtscStringSegment.d b/generated/gstreamer/gst/mpegts/AtscStringSegment.d index 62fd66244..f045f4101 100644 --- a/generated/gstreamer/gst/mpegts/AtscStringSegment.d +++ b/generated/gstreamer/gst/mpegts/AtscStringSegment.d @@ -26,6 +26,7 @@ module gst.mpegts.AtscStringSegment; private import glib.MemorySlice; private import glib.Str; +private import glib.c.functions; private import gst.mpegts.c.functions; public import gst.mpegts.c.types; private import gtkd.Loader; @@ -137,4 +138,10 @@ public final class AtscStringSegment { return Str.toString(gst_mpegts_atsc_string_segment_get_string(gstMpegtsAtscStringSegment)); } + + /** */ + public bool setString(string string_, ubyte compressionType, ubyte mode) + { + return gst_mpegts_atsc_string_segment_set_string(gstMpegtsAtscStringSegment, Str.toStringz(string_), compressionType, mode) != 0; + } } diff --git a/generated/gstreamer/gst/mpegts/AtscVCTSource.d b/generated/gstreamer/gst/mpegts/AtscVCTSource.d index b935619f7..6d6a425ff 100644 --- a/generated/gstreamer/gst/mpegts/AtscVCTSource.d +++ b/generated/gstreamer/gst/mpegts/AtscVCTSource.d @@ -27,13 +27,14 @@ module gst.mpegts.AtscVCTSource; private import glib.MemorySlice; private import glib.PtrArray; private import glib.Str; +private import glib.c.functions; private import gst.mpegts.c.functions; public import gst.mpegts.c.types; private import gtkd.Loader; /** - * Source from a @GstMpegtsAtscVCT, can be used both for TVCT and CVCT tables + * Source from a %GstMpegtsAtscVCT, can be used both for TVCT and CVCT tables */ public final class AtscVCTSource { diff --git a/generated/gstreamer/gst/mpegts/ComponentDescriptor.d b/generated/gstreamer/gst/mpegts/ComponentDescriptor.d index 2d15c3cf7..b64b9621e 100644 --- a/generated/gstreamer/gst/mpegts/ComponentDescriptor.d +++ b/generated/gstreamer/gst/mpegts/ComponentDescriptor.d @@ -26,6 +26,7 @@ module gst.mpegts.ComponentDescriptor; private import glib.MemorySlice; private import glib.Str; +private import glib.c.functions; private import gst.mpegts.c.functions; public import gst.mpegts.c.types; private import gtkd.Loader; diff --git a/generated/gstreamer/gst/mpegts/DVBLinkageDescriptor.d b/generated/gstreamer/gst/mpegts/DVBLinkageDescriptor.d index 12f9336c0..70ef750f4 100644 --- a/generated/gstreamer/gst/mpegts/DVBLinkageDescriptor.d +++ b/generated/gstreamer/gst/mpegts/DVBLinkageDescriptor.d @@ -88,14 +88,14 @@ public class DVBLinkageDescriptor */ public DVBLinkageEvent getEvent() { - auto p = gst_mpegts_dvb_linkage_descriptor_get_event(gstMpegtsDVBLinkageDescriptor); + auto __p = gst_mpegts_dvb_linkage_descriptor_get_event(gstMpegtsDVBLinkageDescriptor); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(DVBLinkageEvent)(cast(GstMpegtsDVBLinkageEvent*) p); + return ObjectG.getDObject!(DVBLinkageEvent)(cast(GstMpegtsDVBLinkageEvent*) __p); } /** @@ -103,14 +103,14 @@ public class DVBLinkageDescriptor */ public PtrArray getExtendedEvent() { - auto p = gst_mpegts_dvb_linkage_descriptor_get_extended_event(gstMpegtsDVBLinkageDescriptor); + auto __p = gst_mpegts_dvb_linkage_descriptor_get_extended_event(gstMpegtsDVBLinkageDescriptor); - if(p is null) + if(__p is null) { return null; } - return new PtrArray(cast(GPtrArray*) p); + return new PtrArray(cast(GPtrArray*) __p); } /** @@ -118,13 +118,13 @@ public class DVBLinkageDescriptor */ public DVBLinkageMobileHandOver getMobileHandOver() { - auto p = gst_mpegts_dvb_linkage_descriptor_get_mobile_hand_over(gstMpegtsDVBLinkageDescriptor); + auto __p = gst_mpegts_dvb_linkage_descriptor_get_mobile_hand_over(gstMpegtsDVBLinkageDescriptor); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(DVBLinkageMobileHandOver)(cast(GstMpegtsDVBLinkageMobileHandOver*) p); + return ObjectG.getDObject!(DVBLinkageMobileHandOver)(cast(GstMpegtsDVBLinkageMobileHandOver*) __p); } } diff --git a/generated/gstreamer/gst/mpegts/DVBParentalRatingItem.d b/generated/gstreamer/gst/mpegts/DVBParentalRatingItem.d index f9f59959d..61207184f 100644 --- a/generated/gstreamer/gst/mpegts/DVBParentalRatingItem.d +++ b/generated/gstreamer/gst/mpegts/DVBParentalRatingItem.d @@ -26,6 +26,7 @@ module gst.mpegts.DVBParentalRatingItem; private import glib.MemorySlice; private import glib.Str; +private import glib.c.functions; private import gst.mpegts.c.functions; public import gst.mpegts.c.types; private import gtkd.Loader; diff --git a/generated/gstreamer/gst/mpegts/DataBroadcastDescriptor.d b/generated/gstreamer/gst/mpegts/DataBroadcastDescriptor.d index a9aca2621..0d4422302 100644 --- a/generated/gstreamer/gst/mpegts/DataBroadcastDescriptor.d +++ b/generated/gstreamer/gst/mpegts/DataBroadcastDescriptor.d @@ -26,6 +26,7 @@ module gst.mpegts.DataBroadcastDescriptor; private import glib.MemorySlice; private import glib.Str; +private import glib.c.functions; private import gst.mpegts.c.functions; public import gst.mpegts.c.types; private import gtkd.Loader; diff --git a/generated/gstreamer/gst/mpegts/Descriptor.d b/generated/gstreamer/gst/mpegts/Descriptor.d index 233f241cb..3a1721b58 100644 --- a/generated/gstreamer/gst/mpegts/Descriptor.d +++ b/generated/gstreamer/gst/mpegts/Descriptor.d @@ -28,6 +28,7 @@ private import glib.ArrayG; private import glib.MemorySlice; private import glib.PtrArray; private import glib.Str; +private import glib.c.functions; private import gobject.ObjectG; private import gst.mpegts.CableDeliverySystemDescriptor; private import gst.mpegts.ComponentDescriptor; @@ -55,7 +56,7 @@ private import gtkd.Loader; * These are the base descriptor types and methods. * * For more details, refer to the ITU H.222.0 or ISO/IEC 13818-1 specifications - * and other specifications mentionned in the documentation. + * and other specifications mentioned in the documentation. */ public class Descriptor { @@ -129,6 +130,27 @@ public class Descriptor ownedRef = false; } + /** + * Parses out a list of audio preselection from the @descriptor. + * + * Params: + * list = the list of audio preselection + * + * Returns: %TRUE if the parsing happened correctly, else %FALSE. + * + * Since: 1.20 + */ + public bool parseAudioPreselectionList(out PtrArray list) + { + GPtrArray* outlist = null; + + auto __p = gst_mpegts_descriptor_parse_audio_preselection_list(gstMpegtsDescriptor, &outlist) != 0; + + list = new PtrArray(outlist); + + return __p; + } + /** * Extracts the Conditional Access information from @descriptor. * @@ -141,14 +163,14 @@ public class Descriptor */ public bool parseCa(out ushort caSystemId, out ushort caPid, out ubyte[] privateData) { - ubyte* outprivateData = null; + ubyte* outprivateData; size_t privateDataSize; - auto p = gst_mpegts_descriptor_parse_ca(gstMpegtsDescriptor, &caSystemId, &caPid, &outprivateData, &privateDataSize) != 0; + auto __p = gst_mpegts_descriptor_parse_ca(gstMpegtsDescriptor, &caSystemId, &caPid, &outprivateData, &privateDataSize) != 0; privateData = outprivateData[0 .. privateDataSize]; - return p; + return __p; } /** @@ -163,11 +185,11 @@ public class Descriptor { GstMpegtsCableDeliverySystemDescriptor* outres = sliceNew!GstMpegtsCableDeliverySystemDescriptor(); - auto p = gst_mpegts_descriptor_parse_cable_delivery_system(gstMpegtsDescriptor, outres) != 0; + auto __p = gst_mpegts_descriptor_parse_cable_delivery_system(gstMpegtsDescriptor, outres) != 0; res = ObjectG.getDObject!(CableDeliverySystemDescriptor)(outres, true); - return p; + return __p; } /** @@ -182,11 +204,11 @@ public class Descriptor { char* outbouquetName = null; - auto p = gst_mpegts_descriptor_parse_dvb_bouquet_name(gstMpegtsDescriptor, &outbouquetName) != 0; + auto __p = gst_mpegts_descriptor_parse_dvb_bouquet_name(gstMpegtsDescriptor, &outbouquetName) != 0; bouquetName = Str.toString(outbouquetName); - return p; + return __p; } /** @@ -203,11 +225,11 @@ public class Descriptor { GArray* outlist = null; - auto p = gst_mpegts_descriptor_parse_dvb_ca_identifier(gstMpegtsDescriptor, &outlist) != 0; + auto __p = gst_mpegts_descriptor_parse_dvb_ca_identifier(gstMpegtsDescriptor, &outlist) != 0; list = new ArrayG(outlist); - return p; + return __p; } /** @@ -222,11 +244,11 @@ public class Descriptor { GstMpegtsComponentDescriptor* outres = null; - auto p = gst_mpegts_descriptor_parse_dvb_component(gstMpegtsDescriptor, &outres) != 0; + auto __p = gst_mpegts_descriptor_parse_dvb_component(gstMpegtsDescriptor, &outres) != 0; res = ObjectG.getDObject!(ComponentDescriptor)(outres); - return p; + return __p; } /** @@ -241,11 +263,11 @@ public class Descriptor { GPtrArray* outcontent = null; - auto p = gst_mpegts_descriptor_parse_dvb_content(gstMpegtsDescriptor, &outcontent) != 0; + auto __p = gst_mpegts_descriptor_parse_dvb_content(gstMpegtsDescriptor, &outcontent) != 0; content = new PtrArray(outcontent); - return p; + return __p; } /** @@ -260,11 +282,11 @@ public class Descriptor { GstMpegtsDataBroadcastDescriptor* outres = null; - auto p = gst_mpegts_descriptor_parse_dvb_data_broadcast(gstMpegtsDescriptor, &outres) != 0; + auto __p = gst_mpegts_descriptor_parse_dvb_data_broadcast(gstMpegtsDescriptor, &outres) != 0; res = ObjectG.getDObject!(DataBroadcastDescriptor)(outres); - return p; + return __p; } /** @@ -278,14 +300,14 @@ public class Descriptor */ public bool parseDvbDataBroadcastId(out ushort dataBroadcastId, out ubyte[] idSelectorBytes) { - ubyte* outidSelectorBytes = null; + ubyte* outidSelectorBytes; ubyte len; - auto p = gst_mpegts_descriptor_parse_dvb_data_broadcast_id(gstMpegtsDescriptor, &dataBroadcastId, &outidSelectorBytes, &len) != 0; + auto __p = gst_mpegts_descriptor_parse_dvb_data_broadcast_id(gstMpegtsDescriptor, &dataBroadcastId, &outidSelectorBytes, &len) != 0; idSelectorBytes = outidSelectorBytes[0 .. len]; - return p; + return __p; } /** @@ -300,11 +322,11 @@ public class Descriptor { GstMpegtsExtendedEventDescriptor* outres = null; - auto p = gst_mpegts_descriptor_parse_dvb_extended_event(gstMpegtsDescriptor, &outres) != 0; + auto __p = gst_mpegts_descriptor_parse_dvb_extended_event(gstMpegtsDescriptor, &outres) != 0; res = ObjectG.getDObject!(ExtendedEventDescriptor)(outres); - return p; + return __p; } /** @@ -313,7 +335,7 @@ public class Descriptor * Params: * offset = %FALSE in Hz, %TRUE in kHz * list = a list of all frequencies in Hz/kHz - * depending on %offset + * depending on @offset * * Returns: %TRUE if the parsing happened correctly, else %FALSE. */ @@ -322,12 +344,12 @@ public class Descriptor int outoffset; GArray* outlist = null; - auto p = gst_mpegts_descriptor_parse_dvb_frequency_list(gstMpegtsDescriptor, &outoffset, &outlist) != 0; + auto __p = gst_mpegts_descriptor_parse_dvb_frequency_list(gstMpegtsDescriptor, &outoffset, &outlist) != 0; offset = (outoffset == 1); list = new ArrayG(outlist); - return p; + return __p; } /** @@ -342,11 +364,11 @@ public class Descriptor { GstMpegtsDVBLinkageDescriptor* outres = null; - auto p = gst_mpegts_descriptor_parse_dvb_linkage(gstMpegtsDescriptor, &outres) != 0; + auto __p = gst_mpegts_descriptor_parse_dvb_linkage(gstMpegtsDescriptor, &outres) != 0; res = ObjectG.getDObject!(DVBLinkageDescriptor)(outres); - return p; + return __p; } /** @@ -361,11 +383,11 @@ public class Descriptor { GPtrArray* outbouquetNameItems = null; - auto p = gst_mpegts_descriptor_parse_dvb_multilingual_bouquet_name(gstMpegtsDescriptor, &outbouquetNameItems) != 0; + auto __p = gst_mpegts_descriptor_parse_dvb_multilingual_bouquet_name(gstMpegtsDescriptor, &outbouquetNameItems) != 0; bouquetNameItems = new PtrArray(outbouquetNameItems); - return p; + return __p; } /** @@ -381,11 +403,11 @@ public class Descriptor { GPtrArray* outcomponentDescriptionItems = null; - auto p = gst_mpegts_descriptor_parse_dvb_multilingual_component(gstMpegtsDescriptor, &componentTag, &outcomponentDescriptionItems) != 0; + auto __p = gst_mpegts_descriptor_parse_dvb_multilingual_component(gstMpegtsDescriptor, &componentTag, &outcomponentDescriptionItems) != 0; componentDescriptionItems = new PtrArray(outcomponentDescriptionItems); - return p; + return __p; } /** @@ -400,11 +422,11 @@ public class Descriptor { GPtrArray* outnetworkNameItems = null; - auto p = gst_mpegts_descriptor_parse_dvb_multilingual_network_name(gstMpegtsDescriptor, &outnetworkNameItems) != 0; + auto __p = gst_mpegts_descriptor_parse_dvb_multilingual_network_name(gstMpegtsDescriptor, &outnetworkNameItems) != 0; networkNameItems = new PtrArray(outnetworkNameItems); - return p; + return __p; } /** @@ -419,11 +441,11 @@ public class Descriptor { GPtrArray* outserviceNameItems = null; - auto p = gst_mpegts_descriptor_parse_dvb_multilingual_service_name(gstMpegtsDescriptor, &outserviceNameItems) != 0; + auto __p = gst_mpegts_descriptor_parse_dvb_multilingual_service_name(gstMpegtsDescriptor, &outserviceNameItems) != 0; serviceNameItems = new PtrArray(outserviceNameItems); - return p; + return __p; } /** @@ -438,11 +460,11 @@ public class Descriptor { char* outname = null; - auto p = gst_mpegts_descriptor_parse_dvb_network_name(gstMpegtsDescriptor, &outname) != 0; + auto __p = gst_mpegts_descriptor_parse_dvb_network_name(gstMpegtsDescriptor, &outname) != 0; name = Str.toString(outname); - return p; + return __p; } /** @@ -457,11 +479,11 @@ public class Descriptor { GPtrArray* outrating = null; - auto p = gst_mpegts_descriptor_parse_dvb_parental_rating(gstMpegtsDescriptor, &outrating) != 0; + auto __p = gst_mpegts_descriptor_parse_dvb_parental_rating(gstMpegtsDescriptor, &outrating) != 0; rating = new PtrArray(outrating); - return p; + return __p; } /** @@ -476,14 +498,14 @@ public class Descriptor */ public bool parseDvbPrivateDataSpecifier(out uint privateDataSpecifier, out ubyte[] privateData) { - ubyte* outprivateData = null; + ubyte* outprivateData; ubyte length; - auto p = gst_mpegts_descriptor_parse_dvb_private_data_specifier(gstMpegtsDescriptor, &privateDataSpecifier, &outprivateData, &length) != 0; + auto __p = gst_mpegts_descriptor_parse_dvb_private_data_specifier(gstMpegtsDescriptor, &privateDataSpecifier, &outprivateData, &length) != 0; privateData = outprivateData[0 .. length]; - return p; + return __p; } /** @@ -518,12 +540,12 @@ public class Descriptor char* outserviceName = null; char* outproviderName = null; - auto p = gst_mpegts_descriptor_parse_dvb_service(gstMpegtsDescriptor, &serviceType, &outserviceName, &outproviderName) != 0; + auto __p = gst_mpegts_descriptor_parse_dvb_service(gstMpegtsDescriptor, &serviceType, &outserviceName, &outproviderName) != 0; serviceName = Str.toString(outserviceName); providerName = Str.toString(outproviderName); - return p; + return __p; } /** @@ -538,11 +560,11 @@ public class Descriptor { GPtrArray* outlist = null; - auto p = gst_mpegts_descriptor_parse_dvb_service_list(gstMpegtsDescriptor, &outlist) != 0; + auto __p = gst_mpegts_descriptor_parse_dvb_service_list(gstMpegtsDescriptor, &outlist) != 0; list = new PtrArray(outlist); - return p; + return __p; } /** @@ -561,13 +583,13 @@ public class Descriptor char* outeventName = null; char* outtext = null; - auto p = gst_mpegts_descriptor_parse_dvb_short_event(gstMpegtsDescriptor, &outlanguageCode, &outeventName, &outtext) != 0; + auto __p = gst_mpegts_descriptor_parse_dvb_short_event(gstMpegtsDescriptor, &outlanguageCode, &outeventName, &outtext) != 0; languageCode = Str.toString(outlanguageCode); eventName = Str.toString(outeventName); text = Str.toString(outtext); - return p; + return __p; } /** @@ -576,7 +598,7 @@ public class Descriptor * Params: * componentTag = the component tag * - * Returns: %TRUE if the parsing happended correctly, else %FALSE. + * Returns: %TRUE if the parsing happened correctly, else %FALSE. */ public bool parseDvbStreamIdentifier(out ubyte componentTag) { @@ -602,11 +624,11 @@ public class Descriptor { char* outlang = null; - auto p = gst_mpegts_descriptor_parse_dvb_subtitling_idx(gstMpegtsDescriptor, idx, &outlang, &type, &compositionPageId, &ancillaryPageId) != 0; + auto __p = gst_mpegts_descriptor_parse_dvb_subtitling_idx(gstMpegtsDescriptor, idx, &outlang, &type, &compositionPageId, &ancillaryPageId) != 0; lang = Str.toString(outlang); - return p; + return __p; } /** @@ -629,11 +651,11 @@ public class Descriptor { GstMpegtsT2DeliverySystemDescriptor* outres = null; - auto p = gst_mpegts_descriptor_parse_dvb_t2_delivery_system(gstMpegtsDescriptor, &outres) != 0; + auto __p = gst_mpegts_descriptor_parse_dvb_t2_delivery_system(gstMpegtsDescriptor, &outres) != 0; res = ObjectG.getDObject!(T2DeliverySystemDescriptor)(outres); - return p; + return __p; } /** @@ -650,11 +672,11 @@ public class Descriptor { char* outlanguageCode = null; - auto p = gst_mpegts_descriptor_parse_dvb_teletext_idx(gstMpegtsDescriptor, idx, &outlanguageCode, &teletextType, &magazineNumber, &pageNumber) != 0; + auto __p = gst_mpegts_descriptor_parse_dvb_teletext_idx(gstMpegtsDescriptor, idx, &outlanguageCode, &teletextType, &magazineNumber, &pageNumber) != 0; languageCode = Str.toString(outlanguageCode); - return p; + return __p; } /** @@ -682,11 +704,11 @@ public class Descriptor { GstMpegtsISO639LanguageDescriptor* outres = null; - auto p = gst_mpegts_descriptor_parse_iso_639_language(gstMpegtsDescriptor, &outres) != 0; + auto __p = gst_mpegts_descriptor_parse_iso_639_language(gstMpegtsDescriptor, &outres) != 0; res = ObjectG.getDObject!(ISO639LanguageDescriptor)(outres); - return p; + return __p; } /** @@ -706,11 +728,11 @@ public class Descriptor { char* outlang = null; - auto p = gst_mpegts_descriptor_parse_iso_639_language_idx(gstMpegtsDescriptor, idx, &outlang, &audioType) != 0; + auto __p = gst_mpegts_descriptor_parse_iso_639_language_idx(gstMpegtsDescriptor, idx, &outlang, &audioType) != 0; lang = Str.toString(outlang); - return p; + return __p; } /** @@ -733,11 +755,34 @@ public class Descriptor { GstMpegtsLogicalChannelDescriptor* outres = sliceNew!GstMpegtsLogicalChannelDescriptor(); - auto p = gst_mpegts_descriptor_parse_logical_channel(gstMpegtsDescriptor, outres) != 0; + auto __p = gst_mpegts_descriptor_parse_logical_channel(gstMpegtsDescriptor, outres) != 0; res = ObjectG.getDObject!(LogicalChannelDescriptor)(outres, true); - return p; + return __p; + } + + /** + * Extracts the Registration information from @descriptor. + * + * Params: + * registrationId = The registration ID (in host endiannes) + * additionalInfo = The additional information + * + * Returns: %TRUE if parsing succeeded, else %FALSE. + * + * Since: 1.20 + */ + public bool parseRegistration(out uint registrationId, out ubyte[] additionalInfo) + { + ubyte* outadditionalInfo; + size_t additionalInfoLength; + + auto __p = gst_mpegts_descriptor_parse_registration(gstMpegtsDescriptor, ®istrationId, &outadditionalInfo, &additionalInfoLength) != 0; + + additionalInfo = outadditionalInfo[0 .. additionalInfoLength]; + + return __p; } /** @@ -752,11 +797,11 @@ public class Descriptor { GstMpegtsSatelliteDeliverySystemDescriptor* outres = sliceNew!GstMpegtsSatelliteDeliverySystemDescriptor(); - auto p = gst_mpegts_descriptor_parse_satellite_delivery_system(gstMpegtsDescriptor, outres) != 0; + auto __p = gst_mpegts_descriptor_parse_satellite_delivery_system(gstMpegtsDescriptor, outres) != 0; res = ObjectG.getDObject!(SatelliteDeliverySystemDescriptor)(outres, true); - return p; + return __p; } /** @@ -771,11 +816,11 @@ public class Descriptor { GstMpegtsTerrestrialDeliverySystemDescriptor* outres = sliceNew!GstMpegtsTerrestrialDeliverySystemDescriptor(); - auto p = gst_mpegts_descriptor_parse_terrestrial_delivery_system(gstMpegtsDescriptor, outres) != 0; + auto __p = gst_mpegts_descriptor_parse_terrestrial_delivery_system(gstMpegtsDescriptor, outres) != 0; res = ObjectG.getDObject!(TerrestrialDeliverySystemDescriptor)(outres, true); - return p; + return __p; } /** @@ -789,14 +834,14 @@ public class Descriptor */ public static Descriptor fromCustom(ubyte tag, ubyte[] data) { - auto p = gst_mpegts_descriptor_from_custom(tag, data.ptr, cast(size_t)data.length); + auto __p = gst_mpegts_descriptor_from_custom(tag, data.ptr, cast(size_t)data.length); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Descriptor)(cast(GstMpegtsDescriptor*) p, true); + return ObjectG.getDObject!(Descriptor)(cast(GstMpegtsDescriptor*) __p, true); } /** @@ -808,17 +853,19 @@ public class Descriptor * data = descriptor data (after tag and length field) * * Returns: #GstMpegtsDescriptor + * + * Since: 1.20 */ public static Descriptor fromCustomWithExtension(ubyte tag, ubyte tagExtension, ubyte[] data) { - auto p = gst_mpegts_descriptor_from_custom_with_extension(tag, tagExtension, data.ptr, cast(size_t)data.length); + auto __p = gst_mpegts_descriptor_from_custom_with_extension(tag, tagExtension, data.ptr, cast(size_t)data.length); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Descriptor)(cast(GstMpegtsDescriptor*) p, true); + return ObjectG.getDObject!(Descriptor)(cast(GstMpegtsDescriptor*) __p, true); } /** @@ -833,14 +880,14 @@ public class Descriptor */ public static Descriptor fromDvbNetworkName(string name) { - auto p = gst_mpegts_descriptor_from_dvb_network_name(Str.toStringz(name)); + auto __p = gst_mpegts_descriptor_from_dvb_network_name(Str.toStringz(name)); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Descriptor)(cast(GstMpegtsDescriptor*) p, true); + return ObjectG.getDObject!(Descriptor)(cast(GstMpegtsDescriptor*) __p, true); } /** @@ -857,27 +904,27 @@ public class Descriptor */ public static Descriptor fromDvbService(GstMpegtsDVBServiceType serviceType, string serviceName, string serviceProvider) { - auto p = gst_mpegts_descriptor_from_dvb_service(serviceType, Str.toStringz(serviceName), Str.toStringz(serviceProvider)); + auto __p = gst_mpegts_descriptor_from_dvb_service(serviceType, Str.toStringz(serviceName), Str.toStringz(serviceProvider)); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Descriptor)(cast(GstMpegtsDescriptor*) p, true); + return ObjectG.getDObject!(Descriptor)(cast(GstMpegtsDescriptor*) __p, true); } /** */ public static Descriptor fromDvbSubtitling(string lang, ubyte type, ushort composition, ushort ancillary) { - auto p = gst_mpegts_descriptor_from_dvb_subtitling(Str.toStringz(lang), type, composition, ancillary); + auto __p = gst_mpegts_descriptor_from_dvb_subtitling(Str.toStringz(lang), type, composition, ancillary); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Descriptor)(cast(GstMpegtsDescriptor*) p, true); + return ObjectG.getDObject!(Descriptor)(cast(GstMpegtsDescriptor*) __p, true); } /** @@ -891,14 +938,14 @@ public class Descriptor */ public static Descriptor fromIso639Language(string language) { - auto p = gst_mpegts_descriptor_from_iso_639_language(Str.toStringz(language)); + auto __p = gst_mpegts_descriptor_from_iso_639_language(Str.toStringz(language)); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Descriptor)(cast(GstMpegtsDescriptor*) p, true); + return ObjectG.getDObject!(Descriptor)(cast(GstMpegtsDescriptor*) __p, true); } /** @@ -912,14 +959,26 @@ public class Descriptor */ public static Descriptor fromRegistration(string formatIdentifier, ubyte[] additionalInfo) { - auto p = gst_mpegts_descriptor_from_registration(Str.toStringz(formatIdentifier), additionalInfo.ptr, cast(size_t)additionalInfo.length); + auto __p = gst_mpegts_descriptor_from_registration(Str.toStringz(formatIdentifier), additionalInfo.ptr, cast(size_t)additionalInfo.length); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Descriptor)(cast(GstMpegtsDescriptor*) p, true); + return ObjectG.getDObject!(Descriptor)(cast(GstMpegtsDescriptor*) __p, true); + } + + /** */ + public static void parseAudioPreselectionDump(GstMpegtsAudioPreselectionDescriptor* source) + { + gst_mpegts_descriptor_parse_audio_preselection_dump(source); + } + + /** */ + public static void parseAudioPreselectionFree(GstMpegtsAudioPreselectionDescriptor* source) + { + gst_mpegts_descriptor_parse_audio_preselection_free(source); } /** @@ -933,18 +992,18 @@ public class Descriptor * of #GstMpegtsDescriptor * tag = the tag to look for * - * Returns: the first descriptor matchin @tag, else %NULL. + * Returns: the first descriptor matching @tag, else %NULL. */ public static Descriptor findDescriptor(PtrArray descriptors, ubyte tag) { - auto p = gst_mpegts_find_descriptor((descriptors is null) ? null : descriptors.getPtrArrayStruct(), tag); + auto __p = gst_mpegts_find_descriptor((descriptors is null) ? null : descriptors.getPtrArrayStruct(), tag); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Descriptor)(cast(GstMpegtsDescriptor*) p); + return ObjectG.getDObject!(Descriptor)(cast(GstMpegtsDescriptor*) __p); } /** @@ -963,13 +1022,13 @@ public class Descriptor */ public static PtrArray parseDescriptors(ubyte* buffer, size_t bufLen) { - auto p = gst_mpegts_parse_descriptors(buffer, bufLen); + auto __p = gst_mpegts_parse_descriptors(buffer, bufLen); - if(p is null) + if(__p is null) { return null; } - return new PtrArray(cast(GPtrArray*) p, true); + return new PtrArray(cast(GPtrArray*) __p, true); } } diff --git a/generated/gstreamer/gst/mpegts/DvbMultilingualBouquetNameItem.d b/generated/gstreamer/gst/mpegts/DvbMultilingualBouquetNameItem.d index 1b48fe698..93d75fbdf 100644 --- a/generated/gstreamer/gst/mpegts/DvbMultilingualBouquetNameItem.d +++ b/generated/gstreamer/gst/mpegts/DvbMultilingualBouquetNameItem.d @@ -26,6 +26,7 @@ module gst.mpegts.DvbMultilingualBouquetNameItem; private import glib.MemorySlice; private import glib.Str; +private import glib.c.functions; private import gst.mpegts.c.functions; public import gst.mpegts.c.types; private import gtkd.Loader; diff --git a/generated/gstreamer/gst/mpegts/DvbMultilingualComponentItem.d b/generated/gstreamer/gst/mpegts/DvbMultilingualComponentItem.d index f40c8ed72..802c29872 100644 --- a/generated/gstreamer/gst/mpegts/DvbMultilingualComponentItem.d +++ b/generated/gstreamer/gst/mpegts/DvbMultilingualComponentItem.d @@ -26,6 +26,7 @@ module gst.mpegts.DvbMultilingualComponentItem; private import glib.MemorySlice; private import glib.Str; +private import glib.c.functions; private import gst.mpegts.c.functions; public import gst.mpegts.c.types; private import gtkd.Loader; diff --git a/generated/gstreamer/gst/mpegts/DvbMultilingualNetworkNameItem.d b/generated/gstreamer/gst/mpegts/DvbMultilingualNetworkNameItem.d index 95c88f43f..51823ef7a 100644 --- a/generated/gstreamer/gst/mpegts/DvbMultilingualNetworkNameItem.d +++ b/generated/gstreamer/gst/mpegts/DvbMultilingualNetworkNameItem.d @@ -26,6 +26,7 @@ module gst.mpegts.DvbMultilingualNetworkNameItem; private import glib.MemorySlice; private import glib.Str; +private import glib.c.functions; private import gst.mpegts.c.functions; public import gst.mpegts.c.types; private import gtkd.Loader; diff --git a/generated/gstreamer/gst/mpegts/DvbMultilingualServiceNameItem.d b/generated/gstreamer/gst/mpegts/DvbMultilingualServiceNameItem.d index d6fa63f1e..9631e2704 100644 --- a/generated/gstreamer/gst/mpegts/DvbMultilingualServiceNameItem.d +++ b/generated/gstreamer/gst/mpegts/DvbMultilingualServiceNameItem.d @@ -26,6 +26,7 @@ module gst.mpegts.DvbMultilingualServiceNameItem; private import glib.MemorySlice; private import glib.Str; +private import glib.c.functions; private import gst.mpegts.c.functions; public import gst.mpegts.c.types; private import gtkd.Loader; diff --git a/generated/gstreamer/gst/mpegts/ExtendedEventDescriptor.d b/generated/gstreamer/gst/mpegts/ExtendedEventDescriptor.d index 55a936543..a972839a2 100644 --- a/generated/gstreamer/gst/mpegts/ExtendedEventDescriptor.d +++ b/generated/gstreamer/gst/mpegts/ExtendedEventDescriptor.d @@ -27,6 +27,7 @@ module gst.mpegts.ExtendedEventDescriptor; private import glib.MemorySlice; private import glib.PtrArray; private import glib.Str; +private import glib.c.functions; private import gst.mpegts.c.functions; public import gst.mpegts.c.types; private import gtkd.Loader; diff --git a/generated/gstreamer/gst/mpegts/ExtendedEventItem.d b/generated/gstreamer/gst/mpegts/ExtendedEventItem.d index c410d667e..1b03d8bea 100644 --- a/generated/gstreamer/gst/mpegts/ExtendedEventItem.d +++ b/generated/gstreamer/gst/mpegts/ExtendedEventItem.d @@ -26,6 +26,7 @@ module gst.mpegts.ExtendedEventItem; private import glib.MemorySlice; private import glib.Str; +private import glib.c.functions; private import gst.mpegts.c.functions; public import gst.mpegts.c.types; private import gtkd.Loader; diff --git a/generated/gstreamer/gst/mpegts/ISO639LanguageDescriptor.d b/generated/gstreamer/gst/mpegts/ISO639LanguageDescriptor.d index 6ca057adf..5f893ffbb 100644 --- a/generated/gstreamer/gst/mpegts/ISO639LanguageDescriptor.d +++ b/generated/gstreamer/gst/mpegts/ISO639LanguageDescriptor.d @@ -26,6 +26,7 @@ module gst.mpegts.ISO639LanguageDescriptor; private import glib.MemorySlice; private import glib.Str; +private import glib.c.functions; private import gst.mpegts.c.functions; public import gst.mpegts.c.types; private import gtkd.Loader; diff --git a/generated/gstreamer/gst/mpegts/NIT.d b/generated/gstreamer/gst/mpegts/NIT.d index c0cb3a80b..4c8e0fe9c 100644 --- a/generated/gstreamer/gst/mpegts/NIT.d +++ b/generated/gstreamer/gst/mpegts/NIT.d @@ -143,13 +143,13 @@ public final class NIT */ public this() { - auto p = gst_mpegts_nit_new(); + auto __p = gst_mpegts_nit_new(); - if(p is null) + if(__p is null) { throw new ConstructionException("null returned by new"); } - this(cast(GstMpegtsNIT*) p); + this(cast(GstMpegtsNIT*) __p); } } diff --git a/generated/gstreamer/gst/mpegts/NITStream.d b/generated/gstreamer/gst/mpegts/NITStream.d index 0cf0d677f..a4387cdfa 100644 --- a/generated/gstreamer/gst/mpegts/NITStream.d +++ b/generated/gstreamer/gst/mpegts/NITStream.d @@ -121,13 +121,13 @@ public final class NITStream */ public this() { - auto p = gst_mpegts_nit_stream_new(); + auto __p = gst_mpegts_nit_stream_new(); - if(p is null) + if(__p is null) { throw new ConstructionException("null returned by new"); } - this(cast(GstMpegtsNITStream*) p); + this(cast(GstMpegtsNITStream*) __p); } } diff --git a/generated/gstreamer/gst/mpegts/PMT.d b/generated/gstreamer/gst/mpegts/PMT.d index ef46e9d09..8c22adea6 100644 --- a/generated/gstreamer/gst/mpegts/PMT.d +++ b/generated/gstreamer/gst/mpegts/PMT.d @@ -34,7 +34,8 @@ private import gtkd.Loader; /** - * Program Map Table (ISO/IEC 13818-1). + * Program Map Table (ISO/IEC 13818-1). Provides the mappings between program + * numbers and the program elements that comprise them. * * The program_number is contained in the subtable_extension field of the * container #GstMpegtsSection. @@ -76,7 +77,7 @@ public final class PMT /** - * PID of the stream containing PCR + * PID of the stream containing the PCR for this program. */ public @property ushort pcrPid() { @@ -89,7 +90,9 @@ public final class PMT gstMpegtsPMT.pcrPid = value; } - /** */ + /** + * The program to which this PMT is applicable. + */ public @property ushort programNumber() { return gstMpegtsPMT.programNumber; @@ -102,7 +105,7 @@ public final class PMT } /** - * array of #GstMpegtsDescriptor + * Array of #GstMpegtsDescriptor */ public @property PtrArray descriptors() { @@ -136,7 +139,9 @@ public final class PMT } /** - * Allocates and initializes a new #GstMpegtsPMT. + * Allocates and initializes a new #GstMpegtsPMT. #GstMpegtsPMTStream can be + * added to the streams array, and global PMT #GstMpegtsDescriptor to the + * descriptors array. * * Returns: #GstMpegtsPMT * @@ -144,13 +149,13 @@ public final class PMT */ public this() { - auto p = gst_mpegts_pmt_new(); + auto __p = gst_mpegts_pmt_new(); - if(p is null) + if(__p is null) { throw new ConstructionException("null returned by new"); } - this(cast(GstMpegtsPMT*) p); + this(cast(GstMpegtsPMT*) __p); } } diff --git a/generated/gstreamer/gst/mpegts/PMTStream.d b/generated/gstreamer/gst/mpegts/PMTStream.d index e567265bf..51710d294 100644 --- a/generated/gstreamer/gst/mpegts/PMTStream.d +++ b/generated/gstreamer/gst/mpegts/PMTStream.d @@ -34,7 +34,7 @@ private import gtkd.Loader; /** - * An individual stream definition. + * An individual stream definition of a #GstMpegtsPMT. */ public final class PMTStream { @@ -130,13 +130,13 @@ public final class PMTStream */ public this() { - auto p = gst_mpegts_pmt_stream_new(); + auto __p = gst_mpegts_pmt_stream_new(); - if(p is null) + if(__p is null) { throw new ConstructionException("null returned by new"); } - this(cast(GstMpegtsPMTStream*) p); + this(cast(GstMpegtsPMTStream*) __p); } } diff --git a/generated/gstreamer/gst/mpegts/PatProgram.d b/generated/gstreamer/gst/mpegts/PatProgram.d index e2bbae765..c194d5fb8 100644 --- a/generated/gstreamer/gst/mpegts/PatProgram.d +++ b/generated/gstreamer/gst/mpegts/PatProgram.d @@ -115,30 +115,31 @@ public final class PatProgram */ public this() { - auto p = gst_mpegts_pat_program_new(); + auto __p = gst_mpegts_pat_program_new(); - if(p is null) + if(__p is null) { throw new ConstructionException("null returned by new"); } - this(cast(GstMpegtsPatProgram*) p); + this(cast(GstMpegtsPatProgram*) __p); } /** - * Allocates a new #GPtrArray for #GstMpegtsPatProgram + * Allocates a new #GPtrArray for #GstMpegtsPatProgram. The array can be filled + * and then converted to a PAT section with gst_mpegts_section_from_pat(). * * Returns: A newly allocated #GPtrArray */ public static PtrArray patNew() { - auto p = gst_mpegts_pat_new(); + auto __p = gst_mpegts_pat_new(); - if(p is null) + if(__p is null) { return null; } - return new PtrArray(cast(GPtrArray*) p, true); + return new PtrArray(cast(GPtrArray*) __p, true); } } diff --git a/generated/gstreamer/gst/mpegts/SCTESIT.d b/generated/gstreamer/gst/mpegts/SCTESIT.d new file mode 100644 index 000000000..2802b659a --- /dev/null +++ b/generated/gstreamer/gst/mpegts/SCTESIT.d @@ -0,0 +1,259 @@ +/* + * This file is part of gtkD. + * + * gtkD is free software; you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 + * of the License, or (at your option) any later version, with + * some exceptions, please read the COPYING file. + * + * gtkD is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with gtkD; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110, USA + */ + +// generated automatically - do not change +// find conversion definition on APILookup.txt +// implement new conversion functionalities on the wrap.utils pakage + + +module gst.mpegts.SCTESIT; + +private import glib.ConstructionException; +private import glib.MemorySlice; +private import glib.PtrArray; +private import gobject.ObjectG; +private import gst.mpegts.c.functions; +public import gst.mpegts.c.types; +private import gtkd.Loader; + + +/** */ +public final class SCTESIT +{ + /** the main Gtk struct */ + protected GstMpegtsSCTESIT* gstMpegtsSCTESIT; + protected bool ownedRef; + + /** Get the main Gtk struct */ + public GstMpegtsSCTESIT* getSCTESITStruct(bool transferOwnership = false) + { + if (transferOwnership) + ownedRef = false; + return gstMpegtsSCTESIT; + } + + /** the main Gtk struct as a void* */ + protected void* getStruct() + { + return cast(void*)gstMpegtsSCTESIT; + } + + /** + * Sets our main struct and passes it to the parent class. + */ + public this (GstMpegtsSCTESIT* gstMpegtsSCTESIT, bool ownedRef = false) + { + this.gstMpegtsSCTESIT = gstMpegtsSCTESIT; + this.ownedRef = ownedRef; + } + + ~this () + { + if ( Linker.isLoaded(LIBRARY_GSTMPEGTS) && ownedRef ) + sliceFree(gstMpegtsSCTESIT); + } + + + /** */ + public @property bool encryptedPacket() + { + return gstMpegtsSCTESIT.encryptedPacket != 0; + } + + /** Ditto */ + public @property void encryptedPacket(bool value) + { + gstMpegtsSCTESIT.encryptedPacket = value; + } + + /** */ + public @property ubyte encryptionAlgorithm() + { + return gstMpegtsSCTESIT.encryptionAlgorithm; + } + + /** Ditto */ + public @property void encryptionAlgorithm(ubyte value) + { + gstMpegtsSCTESIT.encryptionAlgorithm = value; + } + + /** */ + public @property ulong ptsAdjustment() + { + return gstMpegtsSCTESIT.ptsAdjustment; + } + + /** Ditto */ + public @property void ptsAdjustment(ulong value) + { + gstMpegtsSCTESIT.ptsAdjustment = value; + } + + /** */ + public @property ubyte cwIndex() + { + return gstMpegtsSCTESIT.cwIndex; + } + + /** Ditto */ + public @property void cwIndex(ubyte value) + { + gstMpegtsSCTESIT.cwIndex = value; + } + + /** */ + public @property ushort tier() + { + return gstMpegtsSCTESIT.tier; + } + + /** Ditto */ + public @property void tier(ushort value) + { + gstMpegtsSCTESIT.tier = value; + } + + /** */ + public @property ushort spliceCommandLength() + { + return gstMpegtsSCTESIT.spliceCommandLength; + } + + /** Ditto */ + public @property void spliceCommandLength(ushort value) + { + gstMpegtsSCTESIT.spliceCommandLength = value; + } + + /** */ + public @property GstMpegtsSCTESpliceCommandType spliceCommandType() + { + return gstMpegtsSCTESIT.spliceCommandType; + } + + /** Ditto */ + public @property void spliceCommandType(GstMpegtsSCTESpliceCommandType value) + { + gstMpegtsSCTESIT.spliceCommandType = value; + } + + /** */ + public @property bool spliceTimeSpecified() + { + return gstMpegtsSCTESIT.spliceTimeSpecified != 0; + } + + /** Ditto */ + public @property void spliceTimeSpecified(bool value) + { + gstMpegtsSCTESIT.spliceTimeSpecified = value; + } + + /** */ + public @property ulong spliceTime() + { + return gstMpegtsSCTESIT.spliceTime; + } + + /** Ditto */ + public @property void spliceTime(ulong value) + { + gstMpegtsSCTESIT.spliceTime = value; + } + + /** */ + public @property PtrArray splices() + { + return new PtrArray(gstMpegtsSCTESIT.splices, false); + } + + /** Ditto */ + public @property void splices(PtrArray value) + { + gstMpegtsSCTESIT.splices = value.getPtrArrayStruct(); + } + + /** */ + public @property PtrArray descriptors() + { + return new PtrArray(gstMpegtsSCTESIT.descriptors, false); + } + + /** Ditto */ + public @property void descriptors(PtrArray value) + { + gstMpegtsSCTESIT.descriptors = value.getPtrArrayStruct(); + } + + /** + * When encrypted, or when encountering an unknown command type, + * we may still want to pass the sit through. + */ + public @property bool fullyParsed() + { + return gstMpegtsSCTESIT.fullyParsed != 0; + } + + /** Ditto */ + public @property void fullyParsed(bool value) + { + gstMpegtsSCTESIT.fullyParsed = value; + } + + /** + * When the SIT was constructed by the application, splice times + * are in running_time and must be translated before packetizing. + */ + public @property bool isRunningTime() + { + return gstMpegtsSCTESIT.isRunningTime != 0; + } + + /** Ditto */ + public @property void isRunningTime(bool value) + { + gstMpegtsSCTESIT.isRunningTime = value; + } + + /** */ + public static GType getType() + { + return gst_mpegts_scte_sit_get_type(); + } + + /** + * Allocates and initializes a #GstMpegtsSCTESIT. + * + * Returns: A newly allocated #GstMpegtsSCTESIT + * + * Throws: ConstructionException GTK+ fails to create the object. + */ + public this() + { + auto __p = gst_mpegts_scte_sit_new(); + + if(__p is null) + { + throw new ConstructionException("null returned by new"); + } + + this(cast(GstMpegtsSCTESIT*) __p); + } +} diff --git a/generated/gstreamer/gst/mpegts/SCTESpliceComponent.d b/generated/gstreamer/gst/mpegts/SCTESpliceComponent.d new file mode 100644 index 000000000..21cb23ef1 --- /dev/null +++ b/generated/gstreamer/gst/mpegts/SCTESpliceComponent.d @@ -0,0 +1,161 @@ +/* + * This file is part of gtkD. + * + * gtkD is free software; you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 + * of the License, or (at your option) any later version, with + * some exceptions, please read the COPYING file. + * + * gtkD is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with gtkD; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110, USA + */ + +// generated automatically - do not change +// find conversion definition on APILookup.txt +// implement new conversion functionalities on the wrap.utils pakage + + +module gst.mpegts.SCTESpliceComponent; + +private import glib.ConstructionException; +private import glib.MemorySlice; +private import gobject.ObjectG; +private import gst.mpegts.c.functions; +public import gst.mpegts.c.types; +private import gtkd.Loader; + + +/** + * Per-PID splice information. + * + * Since: 1.20 + */ +public final class SCTESpliceComponent +{ + /** the main Gtk struct */ + protected GstMpegtsSCTESpliceComponent* gstMpegtsSCTESpliceComponent; + protected bool ownedRef; + + /** Get the main Gtk struct */ + public GstMpegtsSCTESpliceComponent* getSCTESpliceComponentStruct(bool transferOwnership = false) + { + if (transferOwnership) + ownedRef = false; + return gstMpegtsSCTESpliceComponent; + } + + /** the main Gtk struct as a void* */ + protected void* getStruct() + { + return cast(void*)gstMpegtsSCTESpliceComponent; + } + + /** + * Sets our main struct and passes it to the parent class. + */ + public this (GstMpegtsSCTESpliceComponent* gstMpegtsSCTESpliceComponent, bool ownedRef = false) + { + this.gstMpegtsSCTESpliceComponent = gstMpegtsSCTESpliceComponent; + this.ownedRef = ownedRef; + } + + ~this () + { + if ( Linker.isLoaded(LIBRARY_GSTMPEGTS) && ownedRef ) + sliceFree(gstMpegtsSCTESpliceComponent); + } + + + /** + * the elementary PID stream containing the Splice Point + */ + public @property ubyte tag() + { + return gstMpegtsSCTESpliceComponent.tag; + } + + /** Ditto */ + public @property void tag(ubyte value) + { + gstMpegtsSCTESpliceComponent.tag = value; + } + + /** + * Whether @splice_time was specified + */ + public @property bool spliceTimeSpecified() + { + return gstMpegtsSCTESpliceComponent.spliceTimeSpecified != 0; + } + + /** Ditto */ + public @property void spliceTimeSpecified(bool value) + { + gstMpegtsSCTESpliceComponent.spliceTimeSpecified = value; + } + + /** + * the presentation time of the signaled splice event + */ + public @property ulong spliceTime() + { + return gstMpegtsSCTESpliceComponent.spliceTime; + } + + /** Ditto */ + public @property void spliceTime(ulong value) + { + gstMpegtsSCTESpliceComponent.spliceTime = value; + } + + /** + * The UTC time of the signaled splice event + */ + public @property uint utcSpliceTime() + { + return gstMpegtsSCTESpliceComponent.utcSpliceTime; + } + + /** Ditto */ + public @property void utcSpliceTime(uint value) + { + gstMpegtsSCTESpliceComponent.utcSpliceTime = value; + } + + /** */ + public static GType getType() + { + return gst_mpegts_scte_splice_component_get_type(); + } + + /** + * Allocates and initializes a #GstMpegtsSCTESpliceComponent. + * + * Params: + * tag = the elementary PID stream identifier + * + * Returns: A newly allocated #GstMpegtsSCTESpliceComponent + * + * Since: 1.20 + * + * Throws: ConstructionException GTK+ fails to create the object. + */ + public this(ubyte tag) + { + auto __p = gst_mpegts_scte_splice_component_new(tag); + + if(__p is null) + { + throw new ConstructionException("null returned by new"); + } + + this(cast(GstMpegtsSCTESpliceComponent*) __p); + } +} diff --git a/generated/gstreamer/gst/mpegts/SCTESpliceEvent.d b/generated/gstreamer/gst/mpegts/SCTESpliceEvent.d new file mode 100644 index 000000000..c8efbc718 --- /dev/null +++ b/generated/gstreamer/gst/mpegts/SCTESpliceEvent.d @@ -0,0 +1,293 @@ +/* + * This file is part of gtkD. + * + * gtkD is free software; you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 + * of the License, or (at your option) any later version, with + * some exceptions, please read the COPYING file. + * + * gtkD is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with gtkD; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110, USA + */ + +// generated automatically - do not change +// find conversion definition on APILookup.txt +// implement new conversion functionalities on the wrap.utils pakage + + +module gst.mpegts.SCTESpliceEvent; + +private import glib.ConstructionException; +private import glib.MemorySlice; +private import glib.PtrArray; +private import gobject.ObjectG; +private import gst.mpegts.c.functions; +public import gst.mpegts.c.types; +private import gtkd.Loader; + + +/** */ +public final class SCTESpliceEvent +{ + /** the main Gtk struct */ + protected GstMpegtsSCTESpliceEvent* gstMpegtsSCTESpliceEvent; + protected bool ownedRef; + + /** Get the main Gtk struct */ + public GstMpegtsSCTESpliceEvent* getSCTESpliceEventStruct(bool transferOwnership = false) + { + if (transferOwnership) + ownedRef = false; + return gstMpegtsSCTESpliceEvent; + } + + /** the main Gtk struct as a void* */ + protected void* getStruct() + { + return cast(void*)gstMpegtsSCTESpliceEvent; + } + + /** + * Sets our main struct and passes it to the parent class. + */ + public this (GstMpegtsSCTESpliceEvent* gstMpegtsSCTESpliceEvent, bool ownedRef = false) + { + this.gstMpegtsSCTESpliceEvent = gstMpegtsSCTESpliceEvent; + this.ownedRef = ownedRef; + } + + ~this () + { + if ( Linker.isLoaded(LIBRARY_GSTMPEGTS) && ownedRef ) + sliceFree(gstMpegtsSCTESpliceEvent); + } + + + /** */ + public @property bool insertEvent() + { + return gstMpegtsSCTESpliceEvent.insertEvent != 0; + } + + /** Ditto */ + public @property void insertEvent(bool value) + { + gstMpegtsSCTESpliceEvent.insertEvent = value; + } + + /** */ + public @property uint spliceEventId() + { + return gstMpegtsSCTESpliceEvent.spliceEventId; + } + + /** Ditto */ + public @property void spliceEventId(uint value) + { + gstMpegtsSCTESpliceEvent.spliceEventId = value; + } + + /** */ + public @property bool spliceEventCancelIndicator() + { + return gstMpegtsSCTESpliceEvent.spliceEventCancelIndicator != 0; + } + + /** Ditto */ + public @property void spliceEventCancelIndicator(bool value) + { + gstMpegtsSCTESpliceEvent.spliceEventCancelIndicator = value; + } + + /** */ + public @property bool outOfNetworkIndicator() + { + return gstMpegtsSCTESpliceEvent.outOfNetworkIndicator != 0; + } + + /** Ditto */ + public @property void outOfNetworkIndicator(bool value) + { + gstMpegtsSCTESpliceEvent.outOfNetworkIndicator = value; + } + + /** */ + public @property bool programSpliceFlag() + { + return gstMpegtsSCTESpliceEvent.programSpliceFlag != 0; + } + + /** Ditto */ + public @property void programSpliceFlag(bool value) + { + gstMpegtsSCTESpliceEvent.programSpliceFlag = value; + } + + /** */ + public @property bool durationFlag() + { + return gstMpegtsSCTESpliceEvent.durationFlag != 0; + } + + /** Ditto */ + public @property void durationFlag(bool value) + { + gstMpegtsSCTESpliceEvent.durationFlag = value; + } + + /** */ + public @property bool spliceImmediateFlag() + { + return gstMpegtsSCTESpliceEvent.spliceImmediateFlag != 0; + } + + /** Ditto */ + public @property void spliceImmediateFlag(bool value) + { + gstMpegtsSCTESpliceEvent.spliceImmediateFlag = value; + } + + /** */ + public @property bool programSpliceTimeSpecified() + { + return gstMpegtsSCTESpliceEvent.programSpliceTimeSpecified != 0; + } + + /** Ditto */ + public @property void programSpliceTimeSpecified(bool value) + { + gstMpegtsSCTESpliceEvent.programSpliceTimeSpecified = value; + } + + /** */ + public @property ulong programSpliceTime() + { + return gstMpegtsSCTESpliceEvent.programSpliceTime; + } + + /** Ditto */ + public @property void programSpliceTime(ulong value) + { + gstMpegtsSCTESpliceEvent.programSpliceTime = value; + } + + /** + * The UTC time of the signaled splice event + */ + public @property uint utcSpliceTime() + { + return gstMpegtsSCTESpliceEvent.utcSpliceTime; + } + + /** Ditto */ + public @property void utcSpliceTime(uint value) + { + gstMpegtsSCTESpliceEvent.utcSpliceTime = value; + } + + /** + * Per-PID splice time information + */ + public @property PtrArray components() + { + return new PtrArray(gstMpegtsSCTESpliceEvent.components, false); + } + + /** Ditto */ + public @property void components(PtrArray value) + { + gstMpegtsSCTESpliceEvent.components = value.getPtrArrayStruct(); + } + + /** */ + public @property bool breakDurationAutoReturn() + { + return gstMpegtsSCTESpliceEvent.breakDurationAutoReturn != 0; + } + + /** Ditto */ + public @property void breakDurationAutoReturn(bool value) + { + gstMpegtsSCTESpliceEvent.breakDurationAutoReturn = value; + } + + /** */ + public @property ulong breakDuration() + { + return gstMpegtsSCTESpliceEvent.breakDuration; + } + + /** Ditto */ + public @property void breakDuration(ulong value) + { + gstMpegtsSCTESpliceEvent.breakDuration = value; + } + + /** */ + public @property ushort uniqueProgramId() + { + return gstMpegtsSCTESpliceEvent.uniqueProgramId; + } + + /** Ditto */ + public @property void uniqueProgramId(ushort value) + { + gstMpegtsSCTESpliceEvent.uniqueProgramId = value; + } + + /** */ + public @property ubyte availNum() + { + return gstMpegtsSCTESpliceEvent.availNum; + } + + /** Ditto */ + public @property void availNum(ubyte value) + { + gstMpegtsSCTESpliceEvent.availNum = value; + } + + /** */ + public @property ubyte availsExpected() + { + return gstMpegtsSCTESpliceEvent.availsExpected; + } + + /** Ditto */ + public @property void availsExpected(ubyte value) + { + gstMpegtsSCTESpliceEvent.availsExpected = value; + } + + /** */ + public static GType getType() + { + return gst_mpegts_scte_splice_event_get_type(); + } + + /** + * Allocates and initializes a #GstMpegtsSCTESpliceEvent. + * + * Returns: A newly allocated #GstMpegtsSCTESpliceEvent + * + * Throws: ConstructionException GTK+ fails to create the object. + */ + public this() + { + auto __p = gst_mpegts_scte_splice_event_new(); + + if(__p is null) + { + throw new ConstructionException("null returned by new"); + } + + this(cast(GstMpegtsSCTESpliceEvent*) __p); + } +} diff --git a/generated/gstreamer/gst/mpegts/SDT.d b/generated/gstreamer/gst/mpegts/SDT.d index 395c7618f..72c68b238 100644 --- a/generated/gstreamer/gst/mpegts/SDT.d +++ b/generated/gstreamer/gst/mpegts/SDT.d @@ -143,13 +143,13 @@ public final class SDT */ public this() { - auto p = gst_mpegts_sdt_new(); + auto __p = gst_mpegts_sdt_new(); - if(p is null) + if(__p is null) { throw new ConstructionException("null returned by new"); } - this(cast(GstMpegtsSDT*) p); + this(cast(GstMpegtsSDT*) __p); } } diff --git a/generated/gstreamer/gst/mpegts/SDTService.d b/generated/gstreamer/gst/mpegts/SDTService.d index 71e6866fa..e8b06599c 100644 --- a/generated/gstreamer/gst/mpegts/SDTService.d +++ b/generated/gstreamer/gst/mpegts/SDTService.d @@ -169,13 +169,13 @@ public final class SDTService */ public this() { - auto p = gst_mpegts_sdt_service_new(); + auto __p = gst_mpegts_sdt_service_new(); - if(p is null) + if(__p is null) { throw new ConstructionException("null returned by new"); } - this(cast(GstMpegtsSDTService*) p); + this(cast(GstMpegtsSDTService*) __p); } } diff --git a/generated/gstreamer/gst/mpegts/SIT.d b/generated/gstreamer/gst/mpegts/SIT.d new file mode 100644 index 000000000..4f042624c --- /dev/null +++ b/generated/gstreamer/gst/mpegts/SIT.d @@ -0,0 +1,108 @@ +/* + * This file is part of gtkD. + * + * gtkD is free software; you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 + * of the License, or (at your option) any later version, with + * some exceptions, please read the COPYING file. + * + * gtkD is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with gtkD; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110, USA + */ + +// generated automatically - do not change +// find conversion definition on APILookup.txt +// implement new conversion functionalities on the wrap.utils pakage + + +module gst.mpegts.SIT; + +private import glib.MemorySlice; +private import glib.PtrArray; +private import gst.mpegts.c.functions; +public import gst.mpegts.c.types; +private import gtkd.Loader; + + +/** + * Selection Information Table (EN 300 468) + * + * Since: 1.20 + */ +public final class SIT +{ + /** the main Gtk struct */ + protected GstMpegtsSIT* gstMpegtsSIT; + protected bool ownedRef; + + /** Get the main Gtk struct */ + public GstMpegtsSIT* getSITStruct(bool transferOwnership = false) + { + if (transferOwnership) + ownedRef = false; + return gstMpegtsSIT; + } + + /** the main Gtk struct as a void* */ + protected void* getStruct() + { + return cast(void*)gstMpegtsSIT; + } + + /** + * Sets our main struct and passes it to the parent class. + */ + public this (GstMpegtsSIT* gstMpegtsSIT, bool ownedRef = false) + { + this.gstMpegtsSIT = gstMpegtsSIT; + this.ownedRef = ownedRef; + } + + ~this () + { + if ( Linker.isLoaded(LIBRARY_GSTMPEGTS) && ownedRef ) + sliceFree(gstMpegtsSIT); + } + + + /** + * List of descriptors + */ + public @property PtrArray descriptors() + { + return new PtrArray(gstMpegtsSIT.descriptors, false); + } + + /** Ditto */ + public @property void descriptors(PtrArray value) + { + gstMpegtsSIT.descriptors = value.getPtrArrayStruct(); + } + + /** + * List of services + */ + public @property PtrArray services() + { + return new PtrArray(gstMpegtsSIT.services, false); + } + + /** Ditto */ + public @property void services(PtrArray value) + { + gstMpegtsSIT.services = value.getPtrArrayStruct(); + } + + /** */ + public static GType getType() + { + return gst_mpegts_sit_get_type(); + } +} diff --git a/generated/gstreamer/gst/mpegts/SITService.d b/generated/gstreamer/gst/mpegts/SITService.d new file mode 100644 index 000000000..f3d2ec6d5 --- /dev/null +++ b/generated/gstreamer/gst/mpegts/SITService.d @@ -0,0 +1,122 @@ +/* + * This file is part of gtkD. + * + * gtkD is free software; you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 + * of the License, or (at your option) any later version, with + * some exceptions, please read the COPYING file. + * + * gtkD is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with gtkD; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110, USA + */ + +// generated automatically - do not change +// find conversion definition on APILookup.txt +// implement new conversion functionalities on the wrap.utils pakage + + +module gst.mpegts.SITService; + +private import glib.MemorySlice; +private import glib.PtrArray; +private import gst.mpegts.c.functions; +public import gst.mpegts.c.types; +private import gtkd.Loader; + + +/** + * SIT Service entry + * + * Since: 1.20 + */ +public final class SITService +{ + /** the main Gtk struct */ + protected GstMpegtsSITService* gstMpegtsSITService; + protected bool ownedRef; + + /** Get the main Gtk struct */ + public GstMpegtsSITService* getSITServiceStruct(bool transferOwnership = false) + { + if (transferOwnership) + ownedRef = false; + return gstMpegtsSITService; + } + + /** the main Gtk struct as a void* */ + protected void* getStruct() + { + return cast(void*)gstMpegtsSITService; + } + + /** + * Sets our main struct and passes it to the parent class. + */ + public this (GstMpegtsSITService* gstMpegtsSITService, bool ownedRef = false) + { + this.gstMpegtsSITService = gstMpegtsSITService; + this.ownedRef = ownedRef; + } + + ~this () + { + if ( Linker.isLoaded(LIBRARY_GSTMPEGTS) && ownedRef ) + sliceFree(gstMpegtsSITService); + } + + + /** + * The Program number this table belongs to + */ + public @property ushort serviceId() + { + return gstMpegtsSITService.serviceId; + } + + /** Ditto */ + public @property void serviceId(ushort value) + { + gstMpegtsSITService.serviceId = value; + } + + /** + * Status of this service + */ + public @property GstMpegtsRunningStatus runningStatus() + { + return gstMpegtsSITService.runningStatus; + } + + /** Ditto */ + public @property void runningStatus(GstMpegtsRunningStatus value) + { + gstMpegtsSITService.runningStatus = value; + } + + /** + * List of descriptors + */ + public @property PtrArray descriptors() + { + return new PtrArray(gstMpegtsSITService.descriptors, false); + } + + /** Ditto */ + public @property void descriptors(PtrArray value) + { + gstMpegtsSITService.descriptors = value.getPtrArrayStruct(); + } + + /** */ + public static GType getType() + { + return gst_mpegts_sit_service_get_type(); + } +} diff --git a/generated/gstreamer/gst/mpegts/Section.d b/generated/gstreamer/gst/mpegts/Section.d index d782ef9a5..84bdbba5a 100644 --- a/generated/gstreamer/gst/mpegts/Section.d +++ b/generated/gstreamer/gst/mpegts/Section.d @@ -31,6 +31,7 @@ private import gobject.ObjectG; private import gst.mpegts.AtscEIT; private import gst.mpegts.AtscETT; private import gst.mpegts.AtscMGT; +private import gst.mpegts.AtscRRT; private import gst.mpegts.AtscSTT; private import gst.mpegts.AtscVCT; private import gst.mpegts.BAT; @@ -38,7 +39,9 @@ private import gst.mpegts.EIT; private import gst.mpegts.NIT; private import gst.mpegts.PMT; private import gst.mpegts.PatProgram; +private import gst.mpegts.SCTESIT; private import gst.mpegts.SDT; +private import gst.mpegts.SIT; private import gst.mpegts.TOT; private import gst.mpegts.c.functions; public import gst.mpegts.c.types; @@ -50,8 +53,50 @@ private import gstreamer.ObjectGst; /** + * ## Generic usage of sections with %GstMpegtsSection + * + * The %GstMpegtsSection object is the representation of MPEG-TS Section (SI or + * PSI). + * + * Various elements can post those on the bus via %GstMessage of type + * %GST_MESSAGE_ELEMENT. The gst_message_parse_mpegts_section() function + * provides access to the section. + * + * Applications (or other elements) can create them either by using one of the + * `gst_mpegts_section_from_*` functions, or by providing the raw SI data via + * gst_mpegts_section_new(). + * + * Elements outputting MPEG-TS streams can also create sections using the + * various convenience functions and then get the packetized data (to be + * inserted in MPEG-TS packets) using gst_mpegts_section_packetize(). + * * For more details, refer to the ITU H.222.0 or ISO/IEC 13818-1 specifications * and other specifications mentioned in the documentation. + * + * # Supported base MPEG-TS sections + * These are the sections for which parsing and packetizing code exists. + * + * ## Program Association Table (PAT) + * See: + * * gst_mpegts_section_get_pat() + * * gst_mpegts_pat_program_new() + * * %GstMpegtsPatProgram + * + * ## Conditional Access Table (CAT) + * See: + * * gst_mpegts_section_get_cat() + * + * ## Program Map Table (PMT) + * See: + * * %GstMpegtsPMT + * * gst_mpegts_section_get_pmt() + * * gst_mpegts_pmt_new() + * * %GstMpegtsPMTStream + * + * ## Transport Stream Description Table (TSDT) + * See: + * * gst_mpegts_section_get_tsdt() + * # API */ public class Section { @@ -101,8 +146,8 @@ public class Section * * Params: * pid = the PID to which this section belongs - * data = a pointer to the beginning of the section (i.e. the first byte - * should contain the table_id field). + * data = a pointer to the beginning of + * the section (i.e. the first byte should contain the `table_id` field). * * Returns: A new #GstMpegtsSection if the data was valid, * else %NULL @@ -111,14 +156,14 @@ public class Section */ public this(ushort pid, ubyte[] data) { - auto p = gst_mpegts_section_new(pid, data.ptr, cast(size_t)data.length); + auto __p = gst_mpegts_section_new(pid, data.ptr, cast(size_t)data.length); - if(p is null) + if(__p is null) { throw new ConstructionException("null returned by new"); } - this(cast(GstMpegtsSection*) p); + this(cast(GstMpegtsSection*) __p); } /** @@ -129,14 +174,14 @@ public class Section */ public AtscVCT getAtscCvct() { - auto p = gst_mpegts_section_get_atsc_cvct(gstMpegtsSection); + auto __p = gst_mpegts_section_get_atsc_cvct(gstMpegtsSection); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(AtscVCT)(cast(GstMpegtsAtscVCT*) p); + return ObjectG.getDObject!(AtscVCT)(cast(GstMpegtsAtscVCT*) __p); } /** @@ -147,14 +192,14 @@ public class Section */ public AtscEIT getAtscEit() { - auto p = gst_mpegts_section_get_atsc_eit(gstMpegtsSection); + auto __p = gst_mpegts_section_get_atsc_eit(gstMpegtsSection); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(AtscEIT)(cast(GstMpegtsAtscEIT*) p); + return ObjectG.getDObject!(AtscEIT)(cast(GstMpegtsAtscEIT*) __p); } /** @@ -165,14 +210,14 @@ public class Section */ public AtscETT getAtscEtt() { - auto p = gst_mpegts_section_get_atsc_ett(gstMpegtsSection); + auto __p = gst_mpegts_section_get_atsc_ett(gstMpegtsSection); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(AtscETT)(cast(GstMpegtsAtscETT*) p); + return ObjectG.getDObject!(AtscETT)(cast(GstMpegtsAtscETT*) __p); } /** @@ -183,14 +228,34 @@ public class Section */ public AtscMGT getAtscMgt() { - auto p = gst_mpegts_section_get_atsc_mgt(gstMpegtsSection); + auto __p = gst_mpegts_section_get_atsc_mgt(gstMpegtsSection); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(AtscMGT)(cast(GstMpegtsAtscMGT*) p); + return ObjectG.getDObject!(AtscMGT)(cast(GstMpegtsAtscMGT*) __p); + } + + /** + * Returns the #GstMpegtsAtscRRT contained in the @section. + * + * Returns: The #GstMpegtsAtscRRT contained in the section, or %NULL if an error + * happened. + * + * Since: 1.18 + */ + public AtscRRT getAtscRrt() + { + auto __p = gst_mpegts_section_get_atsc_rrt(gstMpegtsSection); + + if(__p is null) + { + return null; + } + + return ObjectG.getDObject!(AtscRRT)(cast(GstMpegtsAtscRRT*) __p); } /** @@ -201,14 +266,14 @@ public class Section */ public AtscSTT getAtscStt() { - auto p = gst_mpegts_section_get_atsc_stt(gstMpegtsSection); + auto __p = gst_mpegts_section_get_atsc_stt(gstMpegtsSection); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(AtscSTT)(cast(GstMpegtsAtscSTT*) p); + return ObjectG.getDObject!(AtscSTT)(cast(GstMpegtsAtscSTT*) __p); } /** @@ -219,14 +284,14 @@ public class Section */ public AtscVCT getAtscTvct() { - auto p = gst_mpegts_section_get_atsc_tvct(gstMpegtsSection); + auto __p = gst_mpegts_section_get_atsc_tvct(gstMpegtsSection); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(AtscVCT)(cast(GstMpegtsAtscVCT*) p); + return ObjectG.getDObject!(AtscVCT)(cast(GstMpegtsAtscVCT*) __p); } /** @@ -237,34 +302,36 @@ public class Section */ public BAT getBat() { - auto p = gst_mpegts_section_get_bat(gstMpegtsSection); + auto __p = gst_mpegts_section_get_bat(gstMpegtsSection); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(BAT)(cast(GstMpegtsBAT*) p); + return ObjectG.getDObject!(BAT)(cast(GstMpegtsBAT*) __p); } /** + * Parses a Conditional Access Table. + * * Returns the array of #GstMpegtsDescriptor contained in the Conditional * Access Table. * - * Returns: The - * #GstMpegtsDescriptor contained in the section, or %NULL if an error + * Returns: The array + * of #GstMpegtsDescriptor contained in the section, or %NULL if an error * happened. Release with #g_array_unref when done. */ public PtrArray getCat() { - auto p = gst_mpegts_section_get_cat(gstMpegtsSection); + auto __p = gst_mpegts_section_get_cat(gstMpegtsSection); - if(p is null) + if(__p is null) { return null; } - return new PtrArray(cast(GPtrArray*) p); + return new PtrArray(cast(GPtrArray*) __p); } /** @@ -274,14 +341,14 @@ public class Section */ public Bytes getData() { - auto p = gst_mpegts_section_get_data(gstMpegtsSection); + auto __p = gst_mpegts_section_get_data(gstMpegtsSection); - if(p is null) + if(__p is null) { return null; } - return new Bytes(cast(GBytes*) p, true); + return new Bytes(cast(GBytes*) __p, true); } /** @@ -292,14 +359,14 @@ public class Section */ public EIT getEit() { - auto p = gst_mpegts_section_get_eit(gstMpegtsSection); + auto __p = gst_mpegts_section_get_eit(gstMpegtsSection); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(EIT)(cast(GstMpegtsEIT*) p); + return ObjectG.getDObject!(EIT)(cast(GstMpegtsEIT*) __p); } /** @@ -310,14 +377,14 @@ public class Section */ public NIT getNit() { - auto p = gst_mpegts_section_get_nit(gstMpegtsSection); + auto __p = gst_mpegts_section_get_nit(gstMpegtsSection); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(NIT)(cast(GstMpegtsNIT*) p); + return ObjectG.getDObject!(NIT)(cast(GstMpegtsNIT*) __p); } /** @@ -325,41 +392,60 @@ public class Section * * Returns the array of #GstMpegtsPatProgram contained in the section. * - * Note: The PAT "transport_id" field corresponds to the "subtable_extension" - * field of the provided @section. + * Note: The PAT `transport_stream_id` field corresponds to the + * "subtable_extension" field of the provided @section. * * Returns: The - * #GstMpegtsPatProgram contained in the section, or %NULL if an error - * happened. Release with #g_ptr_array_unref when done. + * #GstMpegtsPatProgram contained in the section, or %NULL if an error happened + * or the @section did not contain a valid PAT. Release with #g_ptr_array_unref + * when done. */ public PtrArray getPat() { - auto p = gst_mpegts_section_get_pat(gstMpegtsSection); + auto __p = gst_mpegts_section_get_pat(gstMpegtsSection); - if(p is null) + if(__p is null) { return null; } - return new PtrArray(cast(GPtrArray*) p); + return new PtrArray(cast(GPtrArray*) __p); } /** - * Returns the #GstMpegtsPMT contained in the @section. + * Parses the Program Map Table contained in the @section. * * Returns: The #GstMpegtsPMT contained in the section, or %NULL if an error * happened. */ public PMT getPmt() { - auto p = gst_mpegts_section_get_pmt(gstMpegtsSection); + auto __p = gst_mpegts_section_get_pmt(gstMpegtsSection); + + if(__p is null) + { + return null; + } + + return ObjectG.getDObject!(PMT)(cast(GstMpegtsPMT*) __p); + } + + /** + * Returns the #GstMpegtsSCTESIT contained in the @section. + * + * Returns: The #GstMpegtsSCTESIT contained in the section, or %NULL if an error + * happened. + */ + public SCTESIT getScteSit() + { + auto __p = gst_mpegts_section_get_scte_sit(gstMpegtsSection); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(PMT)(cast(GstMpegtsPMT*) p); + return ObjectG.getDObject!(SCTESIT)(cast(GstMpegtsSCTESIT*) __p); } /** @@ -370,14 +456,34 @@ public class Section */ public SDT getSdt() { - auto p = gst_mpegts_section_get_sdt(gstMpegtsSection); + auto __p = gst_mpegts_section_get_sdt(gstMpegtsSection); + + if(__p is null) + { + return null; + } + + return ObjectG.getDObject!(SDT)(cast(GstMpegtsSDT*) __p); + } + + /** + * Returns the #GstMpegtsSIT contained in the @section. + * + * Returns: The #GstMpegtsSIT contained in the section, or %NULL if an error + * happened. + * + * Since: 1.20 + */ + public SIT getSit() + { + auto __p = gst_mpegts_section_get_sit(gstMpegtsSection); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(SDT)(cast(GstMpegtsSDT*) p); + return ObjectG.getDObject!(SIT)(cast(GstMpegtsSIT*) __p); } /** @@ -388,14 +494,14 @@ public class Section */ public DateTime getTdt() { - auto p = gst_mpegts_section_get_tdt(gstMpegtsSection); + auto __p = gst_mpegts_section_get_tdt(gstMpegtsSection); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(DateTime)(cast(GstDateTime*) p, true); + return ObjectG.getDObject!(DateTime)(cast(GstDateTime*) __p, true); } /** @@ -406,64 +512,113 @@ public class Section */ public TOT getTot() { - auto p = gst_mpegts_section_get_tot(gstMpegtsSection); + auto __p = gst_mpegts_section_get_tot(gstMpegtsSection); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(TOT)(cast(GstMpegtsTOT*) p); + return ObjectG.getDObject!(TOT)(cast(GstMpegtsTOT*) __p); } /** + * Parses a Transport Stream Description Table. + * * Returns the array of #GstMpegtsDescriptor contained in the section * - * Returns: The - * #GstMpegtsDescriptor contained in the section, or %NULL if an error + * Returns: The array + * of #GstMpegtsDescriptor contained in the section, or %NULL if an error * happened. Release with #g_array_unref when done. */ public PtrArray getTsdt() { - auto p = gst_mpegts_section_get_tsdt(gstMpegtsSection); + auto __p = gst_mpegts_section_get_tsdt(gstMpegtsSection); - if(p is null) + if(__p is null) { return null; } - return new PtrArray(cast(GPtrArray*) p); + return new PtrArray(cast(GPtrArray*) __p); } /** - * If the data in @section has already been packetized, the data pointer is returned - * immediately. Otherwise, the data field is allocated and populated. + * Packetize (i.e. serialize) the @section. If the data in @section has already + * been packetized, the data pointer is returned immediately. Otherwise, the + * data field is allocated and populated. * - * Returns: pointer to section data, or %NULL on fail + * Returns: pointer to section data, or %NULL on failure. */ public ubyte[] packetize() { size_t outputSize; - auto p = gst_mpegts_section_packetize(gstMpegtsSection, &outputSize); + auto __p = gst_mpegts_section_packetize(gstMpegtsSection, &outputSize); - return p[0 .. outputSize]; + return __p[0 .. outputSize]; } /** - * Creates a custom #GstEvent with a @GstMpegtsSection. - * The #GstEvent is sent to the @element #GstElement. + * Creates a custom #GstEvent with a @GstMpegtsSection and send it the @element + * #GstElement. * * Params: * element = The #GstElement to send to section event to * - * Returns: %TRUE if the event is sent + * Returns: %TRUE if the event was sent to the element. */ public bool sendEvent(Element element) { return gst_mpegts_section_send_event(gstMpegtsSection, (element is null) ? null : element.getElementStruct()) != 0; } + /** + * + * Params: + * mgt = a #GstMpegtsAtscMGT to create the #GstMpegtsSection from + * Returns: the #GstMpegtsSection + * + * Since: 1.18 + */ + public static Section fromAtscMgt(AtscMGT mgt) + { + auto __p = gst_mpegts_section_from_atsc_mgt((mgt is null) ? null : mgt.getAtscMGTStruct()); + + if(__p is null) + { + return null; + } + + return ObjectG.getDObject!(Section)(cast(GstMpegtsSection*) __p, true); + } + + /** */ + public static Section fromAtscRrt(AtscRRT rrt) + { + auto __p = gst_mpegts_section_from_atsc_rrt((rrt is null) ? null : rrt.getAtscRRTStruct()); + + if(__p is null) + { + return null; + } + + return ObjectG.getDObject!(Section)(cast(GstMpegtsSection*) __p, true); + } + + /** */ + public static Section fromAtscStt(AtscSTT stt) + { + auto __p = gst_mpegts_section_from_atsc_stt((stt is null) ? null : stt.getAtscSTTStruct()); + + if(__p is null) + { + return null; + } + + return ObjectG.getDObject!(Section)(cast(GstMpegtsSection*) __p, true); + } + /** * Ownership of @nit is taken. The data in @nit is managed by the #GstMpegtsSection * @@ -474,14 +629,14 @@ public class Section */ public static Section fromNit(NIT nit) { - auto p = gst_mpegts_section_from_nit((nit is null) ? null : nit.getNITStruct()); + auto __p = gst_mpegts_section_from_nit((nit is null) ? null : nit.getNITStruct()); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Section)(cast(GstMpegtsSection*) p, true); + return ObjectG.getDObject!(Section)(cast(GstMpegtsSection*) __p, true); } /** @@ -495,14 +650,14 @@ public class Section */ public static Section fromPat(PtrArray programs, ushort tsId) { - auto p = gst_mpegts_section_from_pat((programs is null) ? null : programs.getPtrArrayStruct(), tsId); + auto __p = gst_mpegts_section_from_pat((programs is null) ? null : programs.getPtrArrayStruct(), tsId); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Section)(cast(GstMpegtsSection*) p, true); + return ObjectG.getDObject!(Section)(cast(GstMpegtsSection*) __p, true); } /** @@ -516,14 +671,34 @@ public class Section */ public static Section fromPmt(PMT pmt, ushort pid) { - auto p = gst_mpegts_section_from_pmt((pmt is null) ? null : pmt.getPMTStruct(), pid); + auto __p = gst_mpegts_section_from_pmt((pmt is null) ? null : pmt.getPMTStruct(), pid); + + if(__p is null) + { + return null; + } + + return ObjectG.getDObject!(Section)(cast(GstMpegtsSection*) __p, true); + } + + /** + * Ownership of @sit is taken. The data in @sit is managed by the #GstMpegtsSection + * + * Params: + * sit = a #GstMpegtsSCTESIT to create the #GstMpegtsSection from + * + * Returns: the #GstMpegtsSection + */ + public static Section fromScteSit(SCTESIT sit, ushort pid) + { + auto __p = gst_mpegts_section_from_scte_sit((sit is null) ? null : sit.getSCTESITStruct(), pid); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Section)(cast(GstMpegtsSection*) p, true); + return ObjectG.getDObject!(Section)(cast(GstMpegtsSection*) __p, true); } /** @@ -536,14 +711,14 @@ public class Section */ public static Section fromSdt(SDT sdt) { - auto p = gst_mpegts_section_from_sdt((sdt is null) ? null : sdt.getSDTStruct()); + auto __p = gst_mpegts_section_from_sdt((sdt is null) ? null : sdt.getSDTStruct()); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Section)(cast(GstMpegtsSection*) p, true); + return ObjectG.getDObject!(Section)(cast(GstMpegtsSection*) __p, true); } /** @@ -552,18 +727,19 @@ public class Section * Params: * event = #GstEvent containing a #GstMpegtsSection * - * Returns: The extracted #GstMpegtsSection + * Returns: The extracted #GstMpegtsSection , or %NULL if the + * event did not contain a valid #GstMpegtsSection. */ public static Section eventParseMpegtsSection(Event event) { - auto p = gst_event_parse_mpegts_section((event is null) ? null : event.getEventStruct()); + auto __p = gst_event_parse_mpegts_section((event is null) ? null : event.getEventStruct()); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Section)(cast(GstMpegtsSection*) p, true); + return ObjectG.getDObject!(Section)(cast(GstMpegtsSection*) __p, true); } /** @@ -578,14 +754,14 @@ public class Section */ public static Message messageNewMpegtsSection(ObjectGst parent, Section section) { - auto p = gst_message_new_mpegts_section((parent is null) ? null : parent.getObjectGstStruct(), (section is null) ? null : section.getSectionStruct()); + auto __p = gst_message_new_mpegts_section((parent is null) ? null : parent.getObjectGstStruct(), (section is null) ? null : section.getSectionStruct()); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Message)(cast(GstMessage*) p, true); + return ObjectG.getDObject!(Message)(cast(GstMessage*) __p, true); } /** @@ -598,13 +774,13 @@ public class Section */ public static Section messageParseMpegtsSection(Message message) { - auto p = gst_message_parse_mpegts_section((message is null) ? null : message.getMessageStruct()); + auto __p = gst_message_parse_mpegts_section((message is null) ? null : message.getMessageStruct()); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Section)(cast(GstMpegtsSection*) p, true); + return ObjectG.getDObject!(Section)(cast(GstMpegtsSection*) __p, true); } } diff --git a/generated/gstreamer/gst/mpegts/TerrestrialDeliverySystemDescriptor.d b/generated/gstreamer/gst/mpegts/TerrestrialDeliverySystemDescriptor.d index 83d546d16..dcf749d16 100644 --- a/generated/gstreamer/gst/mpegts/TerrestrialDeliverySystemDescriptor.d +++ b/generated/gstreamer/gst/mpegts/TerrestrialDeliverySystemDescriptor.d @@ -140,7 +140,7 @@ public final class TerrestrialDeliverySystemDescriptor } /** - * the constallation + * the constellation */ public @property GstMpegtsModulationType constellation() { diff --git a/generated/gstreamer/gst/mpegts/c/functions.d b/generated/gstreamer/gst/mpegts/c/functions.d index cd8abfc4c..e8c974909 100644 --- a/generated/gstreamer/gst/mpegts/c/functions.d +++ b/generated/gstreamer/gst/mpegts/c/functions.d @@ -52,6 +52,7 @@ shared static this() // gst.mpegts.AtscMGT Linker.link(gst_mpegts_atsc_mgt_get_type, "gst_mpegts_atsc_mgt_get_type", LIBRARY_GSTMPEGTS); + Linker.link(gst_mpegts_atsc_mgt_new, "gst_mpegts_atsc_mgt_new", LIBRARY_GSTMPEGTS); // gst.mpegts.AtscMGTTable @@ -61,15 +62,32 @@ shared static this() Linker.link(gst_mpegts_atsc_mult_string_get_type, "gst_mpegts_atsc_mult_string_get_type", LIBRARY_GSTMPEGTS); + // gst.mpegts.AtscRRT + + Linker.link(gst_mpegts_atsc_rrt_get_type, "gst_mpegts_atsc_rrt_get_type", LIBRARY_GSTMPEGTS); + Linker.link(gst_mpegts_atsc_rrt_new, "gst_mpegts_atsc_rrt_new", LIBRARY_GSTMPEGTS); + + // gst.mpegts.AtscRRTDimension + + Linker.link(gst_mpegts_atsc_rrt_dimension_get_type, "gst_mpegts_atsc_rrt_dimension_get_type", LIBRARY_GSTMPEGTS); + Linker.link(gst_mpegts_atsc_rrt_dimension_new, "gst_mpegts_atsc_rrt_dimension_new", LIBRARY_GSTMPEGTS); + + // gst.mpegts.AtscRRTDimensionValue + + Linker.link(gst_mpegts_atsc_rrt_dimension_value_get_type, "gst_mpegts_atsc_rrt_dimension_value_get_type", LIBRARY_GSTMPEGTS); + Linker.link(gst_mpegts_atsc_rrt_dimension_value_new, "gst_mpegts_atsc_rrt_dimension_value_new", LIBRARY_GSTMPEGTS); + // gst.mpegts.AtscSTT Linker.link(gst_mpegts_atsc_stt_get_type, "gst_mpegts_atsc_stt_get_type", LIBRARY_GSTMPEGTS); + Linker.link(gst_mpegts_atsc_stt_new, "gst_mpegts_atsc_stt_new", LIBRARY_GSTMPEGTS); Linker.link(gst_mpegts_atsc_stt_get_datetime_utc, "gst_mpegts_atsc_stt_get_datetime_utc", LIBRARY_GSTMPEGTS); // gst.mpegts.AtscStringSegment Linker.link(gst_mpegts_atsc_string_segment_get_type, "gst_mpegts_atsc_string_segment_get_type", LIBRARY_GSTMPEGTS); Linker.link(gst_mpegts_atsc_string_segment_get_string, "gst_mpegts_atsc_string_segment_get_string", LIBRARY_GSTMPEGTS); + Linker.link(gst_mpegts_atsc_string_segment_set_string, "gst_mpegts_atsc_string_segment_set_string", LIBRARY_GSTMPEGTS); // gst.mpegts.AtscVCT @@ -138,6 +156,7 @@ shared static this() Linker.link(gst_mpegts_descriptor_get_type, "gst_mpegts_descriptor_get_type", LIBRARY_GSTMPEGTS); Linker.link(gst_mpegts_descriptor_free, "gst_mpegts_descriptor_free", LIBRARY_GSTMPEGTS); + Linker.link(gst_mpegts_descriptor_parse_audio_preselection_list, "gst_mpegts_descriptor_parse_audio_preselection_list", LIBRARY_GSTMPEGTS); Linker.link(gst_mpegts_descriptor_parse_ca, "gst_mpegts_descriptor_parse_ca", LIBRARY_GSTMPEGTS); Linker.link(gst_mpegts_descriptor_parse_cable_delivery_system, "gst_mpegts_descriptor_parse_cable_delivery_system", LIBRARY_GSTMPEGTS); Linker.link(gst_mpegts_descriptor_parse_dvb_bouquet_name, "gst_mpegts_descriptor_parse_dvb_bouquet_name", LIBRARY_GSTMPEGTS); @@ -171,6 +190,7 @@ shared static this() Linker.link(gst_mpegts_descriptor_parse_iso_639_language_idx, "gst_mpegts_descriptor_parse_iso_639_language_idx", LIBRARY_GSTMPEGTS); Linker.link(gst_mpegts_descriptor_parse_iso_639_language_nb, "gst_mpegts_descriptor_parse_iso_639_language_nb", LIBRARY_GSTMPEGTS); Linker.link(gst_mpegts_descriptor_parse_logical_channel, "gst_mpegts_descriptor_parse_logical_channel", LIBRARY_GSTMPEGTS); + Linker.link(gst_mpegts_descriptor_parse_registration, "gst_mpegts_descriptor_parse_registration", LIBRARY_GSTMPEGTS); Linker.link(gst_mpegts_descriptor_parse_satellite_delivery_system, "gst_mpegts_descriptor_parse_satellite_delivery_system", LIBRARY_GSTMPEGTS); Linker.link(gst_mpegts_descriptor_parse_terrestrial_delivery_system, "gst_mpegts_descriptor_parse_terrestrial_delivery_system", LIBRARY_GSTMPEGTS); Linker.link(gst_mpegts_descriptor_from_custom, "gst_mpegts_descriptor_from_custom", LIBRARY_GSTMPEGTS); @@ -180,6 +200,8 @@ shared static this() Linker.link(gst_mpegts_descriptor_from_dvb_subtitling, "gst_mpegts_descriptor_from_dvb_subtitling", LIBRARY_GSTMPEGTS); Linker.link(gst_mpegts_descriptor_from_iso_639_language, "gst_mpegts_descriptor_from_iso_639_language", LIBRARY_GSTMPEGTS); Linker.link(gst_mpegts_descriptor_from_registration, "gst_mpegts_descriptor_from_registration", LIBRARY_GSTMPEGTS); + Linker.link(gst_mpegts_descriptor_parse_audio_preselection_dump, "gst_mpegts_descriptor_parse_audio_preselection_dump", LIBRARY_GSTMPEGTS); + Linker.link(gst_mpegts_descriptor_parse_audio_preselection_free, "gst_mpegts_descriptor_parse_audio_preselection_free", LIBRARY_GSTMPEGTS); Linker.link(gst_mpegts_find_descriptor, "gst_mpegts_find_descriptor", LIBRARY_GSTMPEGTS); Linker.link(gst_mpegts_parse_descriptors, "gst_mpegts_parse_descriptors", LIBRARY_GSTMPEGTS); @@ -255,6 +277,21 @@ shared static this() Linker.link(gst_mpegts_pat_program_new, "gst_mpegts_pat_program_new", LIBRARY_GSTMPEGTS); Linker.link(gst_mpegts_pat_new, "gst_mpegts_pat_new", LIBRARY_GSTMPEGTS); + // gst.mpegts.SCTESIT + + Linker.link(gst_mpegts_scte_sit_get_type, "gst_mpegts_scte_sit_get_type", LIBRARY_GSTMPEGTS); + Linker.link(gst_mpegts_scte_sit_new, "gst_mpegts_scte_sit_new", LIBRARY_GSTMPEGTS); + + // gst.mpegts.SCTESpliceComponent + + Linker.link(gst_mpegts_scte_splice_component_get_type, "gst_mpegts_scte_splice_component_get_type", LIBRARY_GSTMPEGTS); + Linker.link(gst_mpegts_scte_splice_component_new, "gst_mpegts_scte_splice_component_new", LIBRARY_GSTMPEGTS); + + // gst.mpegts.SCTESpliceEvent + + Linker.link(gst_mpegts_scte_splice_event_get_type, "gst_mpegts_scte_splice_event_get_type", LIBRARY_GSTMPEGTS); + Linker.link(gst_mpegts_scte_splice_event_new, "gst_mpegts_scte_splice_event_new", LIBRARY_GSTMPEGTS); + // gst.mpegts.SDT Linker.link(gst_mpegts_sdt_get_type, "gst_mpegts_sdt_get_type", LIBRARY_GSTMPEGTS); @@ -265,6 +302,14 @@ shared static this() Linker.link(gst_mpegts_sdt_service_get_type, "gst_mpegts_sdt_service_get_type", LIBRARY_GSTMPEGTS); Linker.link(gst_mpegts_sdt_service_new, "gst_mpegts_sdt_service_new", LIBRARY_GSTMPEGTS); + // gst.mpegts.SIT + + Linker.link(gst_mpegts_sit_get_type, "gst_mpegts_sit_get_type", LIBRARY_GSTMPEGTS); + + // gst.mpegts.SITService + + Linker.link(gst_mpegts_sit_service_get_type, "gst_mpegts_sit_service_get_type", LIBRARY_GSTMPEGTS); + // gst.mpegts.SatelliteDeliverySystemDescriptor Linker.link(gst_mpegts_satellite_delivery_system_descriptor_get_type, "gst_mpegts_satellite_delivery_system_descriptor_get_type", LIBRARY_GSTMPEGTS); @@ -277,6 +322,7 @@ shared static this() Linker.link(gst_mpegts_section_get_atsc_eit, "gst_mpegts_section_get_atsc_eit", LIBRARY_GSTMPEGTS); Linker.link(gst_mpegts_section_get_atsc_ett, "gst_mpegts_section_get_atsc_ett", LIBRARY_GSTMPEGTS); Linker.link(gst_mpegts_section_get_atsc_mgt, "gst_mpegts_section_get_atsc_mgt", LIBRARY_GSTMPEGTS); + Linker.link(gst_mpegts_section_get_atsc_rrt, "gst_mpegts_section_get_atsc_rrt", LIBRARY_GSTMPEGTS); Linker.link(gst_mpegts_section_get_atsc_stt, "gst_mpegts_section_get_atsc_stt", LIBRARY_GSTMPEGTS); Linker.link(gst_mpegts_section_get_atsc_tvct, "gst_mpegts_section_get_atsc_tvct", LIBRARY_GSTMPEGTS); Linker.link(gst_mpegts_section_get_bat, "gst_mpegts_section_get_bat", LIBRARY_GSTMPEGTS); @@ -286,15 +332,21 @@ shared static this() Linker.link(gst_mpegts_section_get_nit, "gst_mpegts_section_get_nit", LIBRARY_GSTMPEGTS); Linker.link(gst_mpegts_section_get_pat, "gst_mpegts_section_get_pat", LIBRARY_GSTMPEGTS); Linker.link(gst_mpegts_section_get_pmt, "gst_mpegts_section_get_pmt", LIBRARY_GSTMPEGTS); + Linker.link(gst_mpegts_section_get_scte_sit, "gst_mpegts_section_get_scte_sit", LIBRARY_GSTMPEGTS); Linker.link(gst_mpegts_section_get_sdt, "gst_mpegts_section_get_sdt", LIBRARY_GSTMPEGTS); + Linker.link(gst_mpegts_section_get_sit, "gst_mpegts_section_get_sit", LIBRARY_GSTMPEGTS); Linker.link(gst_mpegts_section_get_tdt, "gst_mpegts_section_get_tdt", LIBRARY_GSTMPEGTS); Linker.link(gst_mpegts_section_get_tot, "gst_mpegts_section_get_tot", LIBRARY_GSTMPEGTS); Linker.link(gst_mpegts_section_get_tsdt, "gst_mpegts_section_get_tsdt", LIBRARY_GSTMPEGTS); Linker.link(gst_mpegts_section_packetize, "gst_mpegts_section_packetize", LIBRARY_GSTMPEGTS); Linker.link(gst_mpegts_section_send_event, "gst_mpegts_section_send_event", LIBRARY_GSTMPEGTS); + Linker.link(gst_mpegts_section_from_atsc_mgt, "gst_mpegts_section_from_atsc_mgt", LIBRARY_GSTMPEGTS); + Linker.link(gst_mpegts_section_from_atsc_rrt, "gst_mpegts_section_from_atsc_rrt", LIBRARY_GSTMPEGTS); + Linker.link(gst_mpegts_section_from_atsc_stt, "gst_mpegts_section_from_atsc_stt", LIBRARY_GSTMPEGTS); Linker.link(gst_mpegts_section_from_nit, "gst_mpegts_section_from_nit", LIBRARY_GSTMPEGTS); Linker.link(gst_mpegts_section_from_pat, "gst_mpegts_section_from_pat", LIBRARY_GSTMPEGTS); Linker.link(gst_mpegts_section_from_pmt, "gst_mpegts_section_from_pmt", LIBRARY_GSTMPEGTS); + Linker.link(gst_mpegts_section_from_scte_sit, "gst_mpegts_section_from_scte_sit", LIBRARY_GSTMPEGTS); Linker.link(gst_mpegts_section_from_sdt, "gst_mpegts_section_from_sdt", LIBRARY_GSTMPEGTS); Linker.link(gst_event_parse_mpegts_section, "gst_event_parse_mpegts_section", LIBRARY_GSTMPEGTS); Linker.link(gst_message_new_mpegts_section, "gst_message_new_mpegts_section", LIBRARY_GSTMPEGTS); @@ -344,6 +396,7 @@ __gshared extern(C) // gst.mpegts.AtscMGT GType function() c_gst_mpegts_atsc_mgt_get_type; + GstMpegtsAtscMGT* function() c_gst_mpegts_atsc_mgt_new; // gst.mpegts.AtscMGTTable @@ -353,15 +406,32 @@ __gshared extern(C) GType function() c_gst_mpegts_atsc_mult_string_get_type; + // gst.mpegts.AtscRRT + + GType function() c_gst_mpegts_atsc_rrt_get_type; + GstMpegtsAtscRRT* function() c_gst_mpegts_atsc_rrt_new; + + // gst.mpegts.AtscRRTDimension + + GType function() c_gst_mpegts_atsc_rrt_dimension_get_type; + GstMpegtsAtscRRTDimension* function() c_gst_mpegts_atsc_rrt_dimension_new; + + // gst.mpegts.AtscRRTDimensionValue + + GType function() c_gst_mpegts_atsc_rrt_dimension_value_get_type; + GstMpegtsAtscRRTDimensionValue* function() c_gst_mpegts_atsc_rrt_dimension_value_new; + // gst.mpegts.AtscSTT GType function() c_gst_mpegts_atsc_stt_get_type; + GstMpegtsAtscSTT* function() c_gst_mpegts_atsc_stt_new; GstDateTime* function(GstMpegtsAtscSTT* stt) c_gst_mpegts_atsc_stt_get_datetime_utc; // gst.mpegts.AtscStringSegment GType function() c_gst_mpegts_atsc_string_segment_get_type; const(char)* function(GstMpegtsAtscStringSegment* seg) c_gst_mpegts_atsc_string_segment_get_string; + int function(GstMpegtsAtscStringSegment* seg, char* string_, ubyte compressionType, ubyte mode) c_gst_mpegts_atsc_string_segment_set_string; // gst.mpegts.AtscVCT @@ -430,6 +500,7 @@ __gshared extern(C) GType function() c_gst_mpegts_descriptor_get_type; void function(GstMpegtsDescriptor* desc) c_gst_mpegts_descriptor_free; + int function(GstMpegtsDescriptor* descriptor, GPtrArray** list) c_gst_mpegts_descriptor_parse_audio_preselection_list; int function(GstMpegtsDescriptor* descriptor, ushort* caSystemId, ushort* caPid, ubyte** privateData, size_t* privateDataSize) c_gst_mpegts_descriptor_parse_ca; int function(GstMpegtsDescriptor* descriptor, GstMpegtsCableDeliverySystemDescriptor* res) c_gst_mpegts_descriptor_parse_cable_delivery_system; int function(GstMpegtsDescriptor* descriptor, char** bouquetName) c_gst_mpegts_descriptor_parse_dvb_bouquet_name; @@ -463,6 +534,7 @@ __gshared extern(C) int function(GstMpegtsDescriptor* descriptor, uint idx, char** lang, GstMpegtsIso639AudioType* audioType) c_gst_mpegts_descriptor_parse_iso_639_language_idx; uint function(GstMpegtsDescriptor* descriptor) c_gst_mpegts_descriptor_parse_iso_639_language_nb; int function(GstMpegtsDescriptor* descriptor, GstMpegtsLogicalChannelDescriptor* res) c_gst_mpegts_descriptor_parse_logical_channel; + int function(GstMpegtsDescriptor* descriptor, uint* registrationId, ubyte** additionalInfo, size_t* additionalInfoLength) c_gst_mpegts_descriptor_parse_registration; int function(GstMpegtsDescriptor* descriptor, GstMpegtsSatelliteDeliverySystemDescriptor* res) c_gst_mpegts_descriptor_parse_satellite_delivery_system; int function(GstMpegtsDescriptor* descriptor, GstMpegtsTerrestrialDeliverySystemDescriptor* res) c_gst_mpegts_descriptor_parse_terrestrial_delivery_system; GstMpegtsDescriptor* function(ubyte tag, ubyte* data, size_t length) c_gst_mpegts_descriptor_from_custom; @@ -472,6 +544,8 @@ __gshared extern(C) GstMpegtsDescriptor* function(const(char)* lang, ubyte type, ushort composition, ushort ancillary) c_gst_mpegts_descriptor_from_dvb_subtitling; GstMpegtsDescriptor* function(const(char)* language) c_gst_mpegts_descriptor_from_iso_639_language; GstMpegtsDescriptor* function(const(char)* formatIdentifier, ubyte* additionalInfo, size_t additionalInfoLength) c_gst_mpegts_descriptor_from_registration; + void function(GstMpegtsAudioPreselectionDescriptor* source) c_gst_mpegts_descriptor_parse_audio_preselection_dump; + void function(GstMpegtsAudioPreselectionDescriptor* source) c_gst_mpegts_descriptor_parse_audio_preselection_free; GstMpegtsDescriptor* function(GPtrArray* descriptors, ubyte tag) c_gst_mpegts_find_descriptor; GPtrArray* function(ubyte* buffer, size_t bufLen) c_gst_mpegts_parse_descriptors; @@ -547,6 +621,21 @@ __gshared extern(C) GstMpegtsPatProgram* function() c_gst_mpegts_pat_program_new; GPtrArray* function() c_gst_mpegts_pat_new; + // gst.mpegts.SCTESIT + + GType function() c_gst_mpegts_scte_sit_get_type; + GstMpegtsSCTESIT* function() c_gst_mpegts_scte_sit_new; + + // gst.mpegts.SCTESpliceComponent + + GType function() c_gst_mpegts_scte_splice_component_get_type; + GstMpegtsSCTESpliceComponent* function(ubyte tag) c_gst_mpegts_scte_splice_component_new; + + // gst.mpegts.SCTESpliceEvent + + GType function() c_gst_mpegts_scte_splice_event_get_type; + GstMpegtsSCTESpliceEvent* function() c_gst_mpegts_scte_splice_event_new; + // gst.mpegts.SDT GType function() c_gst_mpegts_sdt_get_type; @@ -557,6 +646,14 @@ __gshared extern(C) GType function() c_gst_mpegts_sdt_service_get_type; GstMpegtsSDTService* function() c_gst_mpegts_sdt_service_new; + // gst.mpegts.SIT + + GType function() c_gst_mpegts_sit_get_type; + + // gst.mpegts.SITService + + GType function() c_gst_mpegts_sit_service_get_type; + // gst.mpegts.SatelliteDeliverySystemDescriptor GType function() c_gst_mpegts_satellite_delivery_system_descriptor_get_type; @@ -569,6 +666,7 @@ __gshared extern(C) GstMpegtsAtscEIT* function(GstMpegtsSection* section) c_gst_mpegts_section_get_atsc_eit; GstMpegtsAtscETT* function(GstMpegtsSection* section) c_gst_mpegts_section_get_atsc_ett; GstMpegtsAtscMGT* function(GstMpegtsSection* section) c_gst_mpegts_section_get_atsc_mgt; + GstMpegtsAtscRRT* function(GstMpegtsSection* section) c_gst_mpegts_section_get_atsc_rrt; GstMpegtsAtscSTT* function(GstMpegtsSection* section) c_gst_mpegts_section_get_atsc_stt; GstMpegtsAtscVCT* function(GstMpegtsSection* section) c_gst_mpegts_section_get_atsc_tvct; GstMpegtsBAT* function(GstMpegtsSection* section) c_gst_mpegts_section_get_bat; @@ -578,15 +676,21 @@ __gshared extern(C) GstMpegtsNIT* function(GstMpegtsSection* section) c_gst_mpegts_section_get_nit; GPtrArray* function(GstMpegtsSection* section) c_gst_mpegts_section_get_pat; GstMpegtsPMT* function(GstMpegtsSection* section) c_gst_mpegts_section_get_pmt; + GstMpegtsSCTESIT* function(GstMpegtsSection* section) c_gst_mpegts_section_get_scte_sit; GstMpegtsSDT* function(GstMpegtsSection* section) c_gst_mpegts_section_get_sdt; + GstMpegtsSIT* function(GstMpegtsSection* section) c_gst_mpegts_section_get_sit; GstDateTime* function(GstMpegtsSection* section) c_gst_mpegts_section_get_tdt; GstMpegtsTOT* function(GstMpegtsSection* section) c_gst_mpegts_section_get_tot; GPtrArray* function(GstMpegtsSection* section) c_gst_mpegts_section_get_tsdt; ubyte* function(GstMpegtsSection* section, size_t* outputSize) c_gst_mpegts_section_packetize; int function(GstMpegtsSection* section, GstElement* element) c_gst_mpegts_section_send_event; + GstMpegtsSection* function(GstMpegtsAtscMGT* mgt) c_gst_mpegts_section_from_atsc_mgt; + GstMpegtsSection* function(GstMpegtsAtscRRT* rrt) c_gst_mpegts_section_from_atsc_rrt; + GstMpegtsSection* function(GstMpegtsAtscSTT* stt) c_gst_mpegts_section_from_atsc_stt; GstMpegtsSection* function(GstMpegtsNIT* nit) c_gst_mpegts_section_from_nit; GstMpegtsSection* function(GPtrArray* programs, ushort tsId) c_gst_mpegts_section_from_pat; GstMpegtsSection* function(GstMpegtsPMT* pmt, ushort pid) c_gst_mpegts_section_from_pmt; + GstMpegtsSection* function(GstMpegtsSCTESIT* sit, ushort pid) c_gst_mpegts_section_from_scte_sit; GstMpegtsSection* function(GstMpegtsSDT* sdt) c_gst_mpegts_section_from_sdt; GstMpegtsSection* function(GstEvent* event) c_gst_event_parse_mpegts_section; GstMessage* function(GstObject* parent, GstMpegtsSection* section) c_gst_message_new_mpegts_section; @@ -634,6 +738,7 @@ alias c_gst_mpegts_atsc_ett_get_type gst_mpegts_atsc_ett_get_type; // gst.mpegts.AtscMGT alias c_gst_mpegts_atsc_mgt_get_type gst_mpegts_atsc_mgt_get_type; +alias c_gst_mpegts_atsc_mgt_new gst_mpegts_atsc_mgt_new; // gst.mpegts.AtscMGTTable @@ -643,15 +748,32 @@ alias c_gst_mpegts_atsc_mgt_table_get_type gst_mpegts_atsc_mgt_table_get_type; alias c_gst_mpegts_atsc_mult_string_get_type gst_mpegts_atsc_mult_string_get_type; +// gst.mpegts.AtscRRT + +alias c_gst_mpegts_atsc_rrt_get_type gst_mpegts_atsc_rrt_get_type; +alias c_gst_mpegts_atsc_rrt_new gst_mpegts_atsc_rrt_new; + +// gst.mpegts.AtscRRTDimension + +alias c_gst_mpegts_atsc_rrt_dimension_get_type gst_mpegts_atsc_rrt_dimension_get_type; +alias c_gst_mpegts_atsc_rrt_dimension_new gst_mpegts_atsc_rrt_dimension_new; + +// gst.mpegts.AtscRRTDimensionValue + +alias c_gst_mpegts_atsc_rrt_dimension_value_get_type gst_mpegts_atsc_rrt_dimension_value_get_type; +alias c_gst_mpegts_atsc_rrt_dimension_value_new gst_mpegts_atsc_rrt_dimension_value_new; + // gst.mpegts.AtscSTT alias c_gst_mpegts_atsc_stt_get_type gst_mpegts_atsc_stt_get_type; +alias c_gst_mpegts_atsc_stt_new gst_mpegts_atsc_stt_new; alias c_gst_mpegts_atsc_stt_get_datetime_utc gst_mpegts_atsc_stt_get_datetime_utc; // gst.mpegts.AtscStringSegment alias c_gst_mpegts_atsc_string_segment_get_type gst_mpegts_atsc_string_segment_get_type; alias c_gst_mpegts_atsc_string_segment_get_string gst_mpegts_atsc_string_segment_get_string; +alias c_gst_mpegts_atsc_string_segment_set_string gst_mpegts_atsc_string_segment_set_string; // gst.mpegts.AtscVCT @@ -720,6 +842,7 @@ alias c_gst_mpegts_dvb_data_broadcast_descriptor_free gst_mpegts_dvb_data_broadc alias c_gst_mpegts_descriptor_get_type gst_mpegts_descriptor_get_type; alias c_gst_mpegts_descriptor_free gst_mpegts_descriptor_free; +alias c_gst_mpegts_descriptor_parse_audio_preselection_list gst_mpegts_descriptor_parse_audio_preselection_list; alias c_gst_mpegts_descriptor_parse_ca gst_mpegts_descriptor_parse_ca; alias c_gst_mpegts_descriptor_parse_cable_delivery_system gst_mpegts_descriptor_parse_cable_delivery_system; alias c_gst_mpegts_descriptor_parse_dvb_bouquet_name gst_mpegts_descriptor_parse_dvb_bouquet_name; @@ -753,6 +876,7 @@ alias c_gst_mpegts_descriptor_parse_iso_639_language gst_mpegts_descriptor_parse alias c_gst_mpegts_descriptor_parse_iso_639_language_idx gst_mpegts_descriptor_parse_iso_639_language_idx; alias c_gst_mpegts_descriptor_parse_iso_639_language_nb gst_mpegts_descriptor_parse_iso_639_language_nb; alias c_gst_mpegts_descriptor_parse_logical_channel gst_mpegts_descriptor_parse_logical_channel; +alias c_gst_mpegts_descriptor_parse_registration gst_mpegts_descriptor_parse_registration; alias c_gst_mpegts_descriptor_parse_satellite_delivery_system gst_mpegts_descriptor_parse_satellite_delivery_system; alias c_gst_mpegts_descriptor_parse_terrestrial_delivery_system gst_mpegts_descriptor_parse_terrestrial_delivery_system; alias c_gst_mpegts_descriptor_from_custom gst_mpegts_descriptor_from_custom; @@ -762,6 +886,8 @@ alias c_gst_mpegts_descriptor_from_dvb_service gst_mpegts_descriptor_from_dvb_se alias c_gst_mpegts_descriptor_from_dvb_subtitling gst_mpegts_descriptor_from_dvb_subtitling; alias c_gst_mpegts_descriptor_from_iso_639_language gst_mpegts_descriptor_from_iso_639_language; alias c_gst_mpegts_descriptor_from_registration gst_mpegts_descriptor_from_registration; +alias c_gst_mpegts_descriptor_parse_audio_preselection_dump gst_mpegts_descriptor_parse_audio_preselection_dump; +alias c_gst_mpegts_descriptor_parse_audio_preselection_free gst_mpegts_descriptor_parse_audio_preselection_free; alias c_gst_mpegts_find_descriptor gst_mpegts_find_descriptor; alias c_gst_mpegts_parse_descriptors gst_mpegts_parse_descriptors; @@ -837,6 +963,21 @@ alias c_gst_mpegts_pat_program_get_type gst_mpegts_pat_program_get_type; alias c_gst_mpegts_pat_program_new gst_mpegts_pat_program_new; alias c_gst_mpegts_pat_new gst_mpegts_pat_new; +// gst.mpegts.SCTESIT + +alias c_gst_mpegts_scte_sit_get_type gst_mpegts_scte_sit_get_type; +alias c_gst_mpegts_scte_sit_new gst_mpegts_scte_sit_new; + +// gst.mpegts.SCTESpliceComponent + +alias c_gst_mpegts_scte_splice_component_get_type gst_mpegts_scte_splice_component_get_type; +alias c_gst_mpegts_scte_splice_component_new gst_mpegts_scte_splice_component_new; + +// gst.mpegts.SCTESpliceEvent + +alias c_gst_mpegts_scte_splice_event_get_type gst_mpegts_scte_splice_event_get_type; +alias c_gst_mpegts_scte_splice_event_new gst_mpegts_scte_splice_event_new; + // gst.mpegts.SDT alias c_gst_mpegts_sdt_get_type gst_mpegts_sdt_get_type; @@ -847,6 +988,14 @@ alias c_gst_mpegts_sdt_new gst_mpegts_sdt_new; alias c_gst_mpegts_sdt_service_get_type gst_mpegts_sdt_service_get_type; alias c_gst_mpegts_sdt_service_new gst_mpegts_sdt_service_new; +// gst.mpegts.SIT + +alias c_gst_mpegts_sit_get_type gst_mpegts_sit_get_type; + +// gst.mpegts.SITService + +alias c_gst_mpegts_sit_service_get_type gst_mpegts_sit_service_get_type; + // gst.mpegts.SatelliteDeliverySystemDescriptor alias c_gst_mpegts_satellite_delivery_system_descriptor_get_type gst_mpegts_satellite_delivery_system_descriptor_get_type; @@ -859,6 +1008,7 @@ alias c_gst_mpegts_section_get_atsc_cvct gst_mpegts_section_get_atsc_cvct; alias c_gst_mpegts_section_get_atsc_eit gst_mpegts_section_get_atsc_eit; alias c_gst_mpegts_section_get_atsc_ett gst_mpegts_section_get_atsc_ett; alias c_gst_mpegts_section_get_atsc_mgt gst_mpegts_section_get_atsc_mgt; +alias c_gst_mpegts_section_get_atsc_rrt gst_mpegts_section_get_atsc_rrt; alias c_gst_mpegts_section_get_atsc_stt gst_mpegts_section_get_atsc_stt; alias c_gst_mpegts_section_get_atsc_tvct gst_mpegts_section_get_atsc_tvct; alias c_gst_mpegts_section_get_bat gst_mpegts_section_get_bat; @@ -868,15 +1018,21 @@ alias c_gst_mpegts_section_get_eit gst_mpegts_section_get_eit; alias c_gst_mpegts_section_get_nit gst_mpegts_section_get_nit; alias c_gst_mpegts_section_get_pat gst_mpegts_section_get_pat; alias c_gst_mpegts_section_get_pmt gst_mpegts_section_get_pmt; +alias c_gst_mpegts_section_get_scte_sit gst_mpegts_section_get_scte_sit; alias c_gst_mpegts_section_get_sdt gst_mpegts_section_get_sdt; +alias c_gst_mpegts_section_get_sit gst_mpegts_section_get_sit; alias c_gst_mpegts_section_get_tdt gst_mpegts_section_get_tdt; alias c_gst_mpegts_section_get_tot gst_mpegts_section_get_tot; alias c_gst_mpegts_section_get_tsdt gst_mpegts_section_get_tsdt; alias c_gst_mpegts_section_packetize gst_mpegts_section_packetize; alias c_gst_mpegts_section_send_event gst_mpegts_section_send_event; +alias c_gst_mpegts_section_from_atsc_mgt gst_mpegts_section_from_atsc_mgt; +alias c_gst_mpegts_section_from_atsc_rrt gst_mpegts_section_from_atsc_rrt; +alias c_gst_mpegts_section_from_atsc_stt gst_mpegts_section_from_atsc_stt; alias c_gst_mpegts_section_from_nit gst_mpegts_section_from_nit; alias c_gst_mpegts_section_from_pat gst_mpegts_section_from_pat; alias c_gst_mpegts_section_from_pmt gst_mpegts_section_from_pmt; +alias c_gst_mpegts_section_from_scte_sit gst_mpegts_section_from_scte_sit; alias c_gst_mpegts_section_from_sdt gst_mpegts_section_from_sdt; alias c_gst_event_parse_mpegts_section gst_event_parse_mpegts_section; alias c_gst_message_new_mpegts_section gst_message_new_mpegts_section; diff --git a/generated/gstreamer/gst/mpegts/c/types.d b/generated/gstreamer/gst/mpegts/c/types.d index b2e357f6e..9b8f7a504 100644 --- a/generated/gstreamer/gst/mpegts/c/types.d +++ b/generated/gstreamer/gst/mpegts/c/types.d @@ -38,7 +38,7 @@ public import gstreamer.c.types; public enum GstMpegtsATSCDescriptorType { STUFFING = 128, - AC3 = 131, + AC3 = 129, CAPTION_SERVICE = 134, CONTENT_ADVISORY = 135, EXTENDED_CHANNEL_NAME = 160, @@ -62,6 +62,46 @@ public enum GstMpegtsATSCDescriptorType } alias GstMpegtsATSCDescriptorType ATSCDescriptorType; +/** + * Type of mpeg-ts streams for ATSC, as defined by the ATSC Code Points + * Registry. For convenience, some stream types from %GstMpegtsScteStreamType + * are also included. + * + * Since: 1.20 + */ +public enum GstMpegtsATSCStreamType +{ + /** + * DigiCipher II video | Identical to ITU-T Rec. H.262 | ISO/IEC 13818-2 Video + */ + DCII_VIDEO = 128, + /** + * ATSC A/53 Audio | AC-3 + */ + AUDIO_AC3 = 129, + /** + * SCTE-27 Subtitling + */ + SUBTITLING = 130, + /** + * SCTE-19 Isochronous data | Reserved + */ + ISOCH_DATA = 131, + /** + * SCTE-35 Splice Information Table + */ + SIT = 134, + /** + * E-AC-3 A/52:2018 + */ + AUDIO_EAC3 = 135, + /** + * E-AC-3 A/107 (ATSC 2.0) + */ + AUDIO_DTS_HD = 136, +} +alias GstMpegtsATSCStreamType ATSCStreamType; + public enum GstMpegtsAtscMGTTableType { EIT0 = 256, @@ -171,6 +211,11 @@ public enum GstMpegtsDVBDescriptorType SERVICE_MOVE = 96, SHORT_SMOOTHING_BUFFER = 97, FREQUENCY_LIST = 98, + /** + * Partial Transport Stream descriptor. Only present in SIT Sections. + * + * See also: %GST_MPEGTS_SECTION_SIT, %GstMpegtsSIT + */ PARTIAL_TRANSPORT_STREAM = 99, DATA_BROADCAST = 100, SCRAMBLING = 101, @@ -232,6 +277,11 @@ public enum GstMpegtsDVBExtendedDescriptorType VIDEO_DEPTH_RANGE = 16, T2MI = 17, URI_LINKAGE = 19, + AC4 = 21, + /** + * Provide all avaliable audio programme for user selection + */ + AUDIO_PRESELECTION = 25, } alias GstMpegtsDVBExtendedDescriptorType DVBExtendedDescriptorType; @@ -401,6 +451,30 @@ public enum GstMpegtsDescriptorType } alias GstMpegtsDescriptorType DescriptorType; +/** + * Type of mpeg-ts streams for Blu-ray formats. To be matched with the + * stream-type of a #GstMpegtsSection. + * + * Since: 1.20 + */ +public enum GstMpegtsHdmvStreamType +{ + AUDIO_LPCM = 128, + AUDIO_AC3 = 129, + AUDIO_DTS = 130, + AUDIO_AC3_TRUE_HD = 131, + AUDIO_AC3_PLUS = 132, + AUDIO_DTS_HD = 133, + AUDIO_DTS_HD_MASTER_AUDIO = 134, + AUDIO_EAC3 = 135, + SUBPICTURE_PGS = 144, + IGS = 145, + SUBTITLE = 146, + AUDIO_AC3_PLUS_SECONDARY = 161, + AUDIO_DTS_HD_SECONDARY = 162, +} +alias GstMpegtsHdmvStreamType HdmvStreamType; + /** * These values correspond to the registered descriptor type from * the various ISDB specifications. @@ -461,8 +535,7 @@ alias GstMpegtsIso639AudioType Iso639AudioType; */ public enum GstMpegtsMiscDescriptorType { - AC3_AUDIO_STREAM = 129, - DTG_LOGICAL_CHANNEL = 131, + MTS_DESC_DTG_LOGICAL_CHANNEL = 131, } alias GstMpegtsMiscDescriptorType MiscDescriptorType; @@ -486,6 +559,94 @@ public enum GstMpegtsModulationType } alias GstMpegtsModulationType ModulationType; +/** + * Well-known registration ids, expressed as native-endian 32bit integers. These + * are used in descriptors of type %GST_MTS_DESC_REGISTRATION. Unless specified + * otherwise (by use of the "OTHER" prefix), they are all registered by the + * [SMPTE Registration Authority](https://smpte-ra.org/) or specified in + * "official" documentation for the given format. + * + * Since: 1.20 + */ +public enum GstMpegtsRegistrationId +{ + /** + * Undefined registration id + */ + _0 = 0, + /** + * Audio AC-3, ATSC A/52 + */ + AC_3 = 1094921523, + /** + * SCTE 35, "Digital Program Insertion Cueing Message" + */ + CUEI = 1129661769, + /** + * Dirac Video codec + */ + DRAC = 1685217635, + /** + * DTS Audio + */ + DTS1 = 1146377009, + /** + * DTS Audio + */ + DTS2 = 1146377010, + /** + * DTS Audio + */ + DTS3 = 1146377011, + /** + * SMPTE 302M, Mapping of AES3 Data in mpeg-ts + */ + BSSD = 1112757060, + /** + * Enhanced AC-3 (i.e. EAC3) + */ + EAC3 = 1161904947, + /** + * Cablelabs ETV + */ + ETV1 = 1163154993, + /** + * ATSC A/53 compliant stream (i.e. ATSC) + */ + GA94 = 1195456820, + /** + * Blu-ray, "System Description Blu-ray Disc + * Read-Only Format part 3 Audio Visual Basic Specifications" + */ + HDMV = 1212435798, + /** + * SMPTE RP217 : Non-synchronized Mapping of KLV + * Packets in mpeg-ts + */ + KLVA = 1263294017, + /** + * Opus Audio + */ + OPUS = 1330664787, + /** + * HDV (Sony) + */ + TSHV = 1414744150, + /** + * Video VC-1, SMPTE RP227 "VC-1 Bitstream Transport Encodings" + */ + VC_1 = 1447243057, + /** + * Audio AC-4, ETSI 103 190-2 + */ + AC_4 = 1094921524, + /** + * HEVC / h265 + */ + OTHER_HEVC = 1212503619, +} +alias GstMpegtsRegistrationId RegistrationId; + /** * Running status of a service. * @@ -502,6 +663,45 @@ public enum GstMpegtsRunningStatus } alias GstMpegtsRunningStatus RunningStatus; +/** + * These values correspond to the ones defined by SCTE (amongst other in ANSI/SCTE 57) + * + * Since: 1.20 + */ +public enum GstMpegtsSCTEDescriptorType +{ + STUFFING = 128, + AC3 = 129, + FRAME_RATE = 130, + EXTENDED_VIDEO = 131, + COMPONENT_NAME = 132, + FREQUENCY_SPEC = 144, + MODULATION_PARAMS = 145, + TRANSPORT_STREAM_ID = 146, +} +alias GstMpegtsSCTEDescriptorType SCTEDescriptorType; + +public enum GstMpegtsSCTESpliceCommandType +{ + NULL = 0, + SCHEDULE = 4, + INSERT = 5, + TIME = 6, + BANDWIDTH = 7, + PRIVATE = 255, +} +alias GstMpegtsSCTESpliceCommandType SCTESpliceCommandType; + +public enum GstMpegtsSCTESpliceDescriptor +{ + AVAIL = 0, + DTMF = 1, + SEGMENTATION = 2, + TIME = 3, + AUDIO = 4, +} +alias GstMpegtsSCTESpliceDescriptor SCTESpliceDescriptor; + public enum GstMpegtsSatellitePolarizationType { LINEAR_HORIZONTAL = 0, @@ -522,7 +722,8 @@ public enum GstMpegtsSatelliteRolloff alias GstMpegtsSatelliteRolloff SatelliteRolloff; /** - * Type of mpeg-ts streams for SCTE + * Type of mpeg-ts streams for SCTE. Most users would want to use the + * #GstMpegtsATSCStreamType instead since it also covers these stream types */ public enum GstMpegtsScteStreamType { @@ -534,6 +735,10 @@ public enum GstMpegtsScteStreamType * SCTE-19 Isochronous data */ ISOCH_DATA = 131, + /** + * SCTE-35 Splice Information Table + */ + SIT = 134, /** * SCTE-07 Data Service or * Network Resource Table @@ -563,28 +768,75 @@ alias GstMpegtsScteStreamType ScteStreamType; /** * Values for a #GstMpegtsSection table_id. * - * These are the registered ATSC table_id variants. + * These are the registered ATSC section `table_id` variants. Unless specified + * otherwise, they are defined in the "ATSC A/65" specification. * - * see also: #GstMpegtsSectionTableID + * see also: #GstMpegtsSectionTableID and other variants. */ public enum GstMpegtsSectionATSCTableID { + /** + * Master Guide Table (MGT) + */ MASTER_GUIDE = 199, + /** + * Terrestrial Virtual Channel Table (TVCT) + */ TERRESTRIAL_VIRTUAL_CHANNEL = 200, + /** + * Cable Virtual Channel Table (CVCT) + */ CABLE_VIRTUAL_CHANNEL = 201, + /** + * Rating Region Table (RRT) + */ RATING_REGION = 202, + /** + * Event Information Table (EIT) + */ EVENT_INFORMATION = 203, + /** + * Extended Text Table (ETT) + */ CHANNEL_OR_EVENT_EXTENDED_TEXT = 204, + /** + * System Time Table (STT) + */ SYSTEM_TIME = 205, + /** + * A/90: Data Event Table (DET) + */ DATA_EVENT = 206, + /** + * A/90: Data Service Table (DST) + */ DATA_SERVICE = 207, + /** + * A/57B: Program Identifier Table. + */ + PROGRAM_IDENTIFIER = 208, + /** + * A/90: Network Resources Table (NRT) + */ NETWORK_RESOURCE = 209, + /** + * A/90: Long Term Service Table (LTST) + */ LONG_TERM_SERVICE = 210, + /** + * Directed Channel Change Table (DCCT) + */ DIRECTED_CHANNEL_CHANGE = 211, + /** + * Directed Channel Change Selection Code Table (DCCSCT) + */ DIRECTED_CHANNEL_CHANGE_SECTION_CODE = 212, AGGREGATE_EVENT_INFORMATION = 214, AGGREGATE_EXTENDED_TEXT = 215, AGGREGATE_DATA_EVENT = 217, + /** + * A/81: Satellite Virtual Channel Table + */ SATELLITE_VIRTUAL_CHANNEL = 218, } alias GstMpegtsSectionATSCTableID SectionATSCTableID; @@ -592,39 +844,136 @@ alias GstMpegtsSectionATSCTableID SectionATSCTableID; /** * Values for a #GstMpegtsSection table_id. * - * These are the registered DVB table_id variants. + * These are the registered DVB table_id variants. Unless specified otherwise, + * they come from the DVB Specification for SI (ETSI EN 300 468). * * see also: #GstMpegtsSectionTableID */ public enum GstMpegtsSectionDVBTableID { + /** + * Network Information Table (NIT), Actual Network + */ NETWORK_INFORMATION_ACTUAL_NETWORK = 64, + /** + * Network Information Table (NIT), Other Network + */ NETWORK_INFORMATION_OTHER_NETWORK = 65, + /** + * Service Description Table (SDT), Actual Transport Stream + */ SERVICE_DESCRIPTION_ACTUAL_TS = 66, + /** + * Service Description Table (SDT), Other Transport Stream + */ SERVICE_DESCRIPTION_OTHER_TS = 70, + /** + * Bouquet Association Table (BAT) + */ BOUQUET_ASSOCIATION = 74, + /** + * ETSI TS 102 006: Update Notification Table (UNT) + */ + UPDATE_NOTIFICATION = 75, + /** + * ETSI EN 303 560: Downloadable Font Info + */ + DOWNLOADABLE_FONT_INFO = 76, + /** + * Event Information Table (EIT), Actual Transport Stream, present/following + */ EVENT_INFORMATION_ACTUAL_TS_PRESENT = 78, + /** + * Event Information Table (EIT), Other Transport Stream, present/following + */ EVENT_INFORMATION_OTHER_TS_PRESENT = 79, + /** + * Event Information Table (EIT), Actual Transport Stream, Schedule (first) + */ EVENT_INFORMATION_ACTUAL_TS_SCHEDULE_1 = 80, + /** + * Event Information Table (EIT), Actual Transport Stream, Schedule (last) + */ EVENT_INFORMATION_ACTUAL_TS_SCHEDULE_N = 95, + /** + * Event Information Table (EIT), Other Transport Stream, Schedule (first) + */ EVENT_INFORMATION_OTHER_TS_SCHEDULE_1 = 96, + /** + * Event Information Table (EIT), Other Transport Stream, Schedule (last) + */ EVENT_INFORMATION_OTHER_TS_SCHEDULE_N = 111, + /** + * Time Date Table (TDT) + */ TIME_DATE = 112, + /** + * Running Status Table (RST) + */ RUNNING_STATUS = 113, + /** + * Stuffing Table (ST) + */ STUFFING = 114, + /** + * Time Offset Table (TOT) + */ TIME_OFFSET = 115, + /** + * ETSI TS 102 323: Application Information Table (AIT) + */ APPLICATION_INFORMATION_TABLE = 116, + /** + * ETSI TS 102 323: Container Section + */ CONTAINER = 117, + /** + * ETSI TS 102 323: Related Content Table (RCT) + */ RELATED_CONTENT = 118, + /** + * ETSI TS 102 323: Content Identifier Table (CIT) + */ CONTENT_IDENTIFIER = 119, + /** + * ETSI TS 301 192: MPE-FEC Section + */ MPE_FEC = 120, + /** + * ETSI 103 323: Resolution Provider Notification Table (RNT) + */ RESOLUTION_NOTIFICATION = 121, + /** + * ETSI TS 102 772: MPE-IFEC Section + */ MPE_IFEC = 122, + /** + * ETSI TS 102 809: Protection Message Section + */ + PROTECTION_MESSAGE = 123, + /** + * Discontinuity Information Table (DIT) + */ DISCONTINUITY_INFORMATION = 126, + /** + * Selection Information Table (SIT) + */ SELECTION_INFORMATION = 127, + /** + * ETSI TR 289: CA Message Table (CMT): ECM 0 + */ CA_MESSAGE_ECM_0 = 128, + /** + * ETSI TR 289: CA Message Table (CMT): ECM 1 + */ CA_MESSAGE_ECM_1 = 129, + /** + * ETSI TR 289: CA Message Table (CMT): CA System Private (First) + */ CA_MESSAGE_SYSTEM_PRIVATE_1 = 130, + /** + * ETSI TR 289: CA Message Table (CMT): CA System Private (Last) + */ CA_MESSAGE_SYSTEM_PRIVATE_N = 143, SCT = 160, FCT = 161, @@ -689,26 +1038,85 @@ alias GstMpegtsSectionSCTETableID SectionSCTETableID; */ public enum GstMpegtsSectionTableID { + /** + * Program Association Table (PAT) + */ PROGRAM_ASSOCIATION = 0, + /** + * Conditional Access Table (CAT) + */ CONDITIONAL_ACCESS = 1, + /** + * Program Map Table (PMT) + */ TS_PROGRAM_MAP = 2, + /** + * Transport Stream Description Table + */ TS_DESCRIPTION = 3, + /** + * ISO/IEC 14496 Scene Description Table + */ _14496_SCENE_DESCRIPTION = 4, + /** + * ISO/IEC 14496 Object Descriptor Table + */ _14496_OBJET_DESCRIPTOR = 5, + /** + * Metadata Section + */ METADATA = 6, + /** + * IPMP Control Information + */ IPMP_CONTROL_INFORMATION = 7, + /** + * ISO/IEC 14496 Section. + */ + _14496_SECTION = 8, + /** + * ISO/IEC 23001-11 (Green Access Unit) Section. + */ + _23001_11_SECTION = 9, + /** + * ISO/ISO 23001-10 (Quality Access Unit) Section. + */ + _23001_10_SECTION = 10, + /** + * DSM-CC Multi-Protocol Encapsulated (MPE) Data + */ DSM_CC_MULTIPROTO_ENCAPSULATED_DATA = 58, + /** + * DSM-CC U-N Messages + */ DSM_CC_U_N_MESSAGES = 59, + /** + * DSM-CC Download Data Messages + */ DSM_CC_DOWNLOAD_DATA_MESSAGES = 60, + /** + * DSM-CC Stream Descriptors + */ DSM_CC_STREAM_DESCRIPTORS = 61, + /** + * DSM-CC Private Data + */ DSM_CC_PRIVATE_DATA = 62, + /** + * DSM-CC Addressable Section + */ DSM_CC_ADDRESSABLE_SECTIONS = 63, + /** + * Unset section table_id (value is forbidden to use in actual sections) + */ UNSET = 255, } alias GstMpegtsSectionTableID SectionTableID; /** - * Types of #GstMpegtsSection that the library handles. + * Types of #GstMpegtsSection that the library handles. This covers all the + * MPEG-TS and derivate specification that the library can properly identify and + * use. */ public enum GstMpegtsSectionType { @@ -756,35 +1164,47 @@ public enum GstMpegtsSectionType * Time Offset Table (EN 300 468) */ TOT = 10, + /** + * Selection Information Table (EN 300 468) + */ + SIT = 11, /** * ATSC Terrestrial Virtual Channel Table (A65) */ - ATSC_TVCT = 11, + ATSC_TVCT = 12, /** * ATSC Cable Virtual Channel Table (A65) */ - ATSC_CVCT = 12, + ATSC_CVCT = 13, /** * ATSC Master Guide Table (A65) */ - ATSC_MGT = 13, + ATSC_MGT = 14, /** * ATSC Extended Text Table (A65) */ - ATSC_ETT = 14, + ATSC_ETT = 15, /** * ATSC Event Information Table (A65) */ - ATSC_EIT = 15, + ATSC_EIT = 16, /** * ATSC System Time Table (A65) */ - ATSC_STT = 16, + ATSC_STT = 17, + /** + * ATSC Rating Region Table (A65) + */ + ATSC_RRT = 18, + /** + * SCTE Splice Information Table (SCTE-35) + */ + SCTE_SIT = 19, } alias GstMpegtsSectionType SectionType; /** - * Type of mpeg-ts stream type. + * Type of MPEG-TS stream type. * * These values correspond to the base standard registered types. Depending * on the variant of mpeg-ts being used (Bluray, ATSC, DVB, ...), other @@ -799,12 +1219,13 @@ public enum GstMpegtsStreamType */ RESERVED_00 = 0, /** - * ISO/IEC 11172-2 Video + * ISO/IEC 11172-2 Video (i.e. MPEG-1 Video) */ VIDEO_MPEG1 = 1, /** * Rec. ITU-T H.262 | ISO/IEC 13818-2 - * Video or ISO/IEC 11172-2 constrained parameter video stream + * Video or ISO/IEC 11172-2 constrained parameter video stream (i.e. + * MPEG-2 Video) */ VIDEO_MPEG2 = 2, /** @@ -856,16 +1277,16 @@ public enum GstMpegtsStreamType */ AUXILIARY = 14, /** - * ISO/IEC 13818-7 Audio with ADTS + * ISO/IEC 13818-7 Audio (AAC) with ADTS * transport syntax */ AUDIO_AAC_ADTS = 15, /** - * ISO/IEC 14496-2 Visual + * ISO/IEC 14496-2 Visual (MPEG-4 Video) */ VIDEO_MPEG4 = 16, /** - * ISO/IEC 14496-3 Audio with the LATM + * ISO/IEC 14496-3 Audio (AAC) with the LATM * transport syntax as defined in ISO/IEC 14496-3 */ AUDIO_AAC_LATM = 17, @@ -921,7 +1342,7 @@ public enum GstMpegtsStreamType */ VIDEO_H264 = 27, /** - * ISO/IEC 14496-3 Audio, without + * ISO/IEC 14496-3 (AAC) Audio, without * using any additional transport syntax, such as DST, ALS and SLS */ AUDIO_AAC_CLEAN = 28, @@ -948,7 +1369,7 @@ public enum GstMpegtsStreamType VIDEO_H264_MVC_SUB_BITSTREAM = 32, /** * Video stream conforming to one or more - * profiles as defined in Rec. ITU-T T.800 | ISO/IEC 15444-1 + * profiles as defined in Rec. ITU-T T.800 | ISO/IEC 15444-1 (i.e. JPEG 2000) */ VIDEO_JP2K = 33, /** @@ -963,11 +1384,19 @@ public enum GstMpegtsStreamType * profiles defined in Annex A for service-compatible stereoscopic 3D services */ VIDEO_H264_STEREO_ADDITIONAL_VIEW = 35, + /** + * Rec. ITU-T H.265 | ISO/IEC 23008-2 video + * stream or an HEVC temporal video sub-bitstream + */ VIDEO_HEVC = 36, /** * IPMP stream */ IPMP_STREAM = 127, + /** + * User Private stream id (used for VC-1) as defined by SMPTE RP227. + */ + USER_PRIVATE_EA = 234, } alias GstMpegtsStreamType StreamType; @@ -1081,9 +1510,6 @@ struct GstMpegtsAtscETT GPtrArray* messages; } -/** - * Master Guide Table (A65) - */ struct GstMpegtsAtscMGT { /** @@ -1137,6 +1563,62 @@ struct GstMpegtsAtscMultString GPtrArray* segments; } +struct GstMpegtsAtscRRT +{ + /** + * The protocol version + */ + ubyte protocolVersion; + /** + * the names + */ + GPtrArray* names; + /** + * the number of dimensions defined for this rating table + */ + ubyte dimensionsDefined; + /** + * A set of dimensions + */ + GPtrArray* dimensions; + /** + * descriptors + */ + GPtrArray* descriptors; +} + +struct GstMpegtsAtscRRTDimension +{ + /** + * the names + */ + GPtrArray* names; + /** + * whether the ratings represent a graduated scale + */ + bool graduatedScale; + /** + * the number of values defined for this dimension + */ + ubyte valuesDefined; + /** + * set of values + */ + GPtrArray* values; +} + +struct GstMpegtsAtscRRTDimensionValue +{ + /** + * the abbreviated ratings + */ + GPtrArray* abbrevRatings; + /** + * the ratings + */ + GPtrArray* ratings; +} + struct GstMpegtsAtscSTT { /** @@ -1217,7 +1699,7 @@ struct GstMpegtsAtscVCT } /** - * Source from a @GstMpegtsAtscVCT, can be used both for TVCT and CVCT tables + * Source from a %GstMpegtsAtscVCT, can be used both for TVCT and CVCT tables */ struct GstMpegtsAtscVCTSource { @@ -1287,6 +1769,42 @@ struct GstMpegtsAtscVCTSource GPtrArray* descriptors; } +/** + * Table 110: Audio Preselection Descriptor (ETSI EN 300 468 v1.16.1) + * + * Since: 1.20 + */ +struct GstMpegtsAudioPreselectionDescriptor +{ + /** + * 5-bit + */ + ubyte preselectionId; + /** + * 3-bit field + */ + ubyte audioRenderingIndication; + /** + * visually impaired + */ + bool audioDescription; + bool spokenSubtitles; + bool dialogueEnhancement; + bool interactivityEnabled; + bool languageCodePresent; + bool textLabelPresent; + /** + * indicates if this PID conveys a complete audio programme + */ + bool multiStreamInfoPresent; + bool futureExtension; + /** + * NULL terminated ISO 639 language code. + */ + char* languageCode; + ubyte messageId; +} + /** * DVB Bouquet Association Table (EN 300 468) */ @@ -1358,12 +1876,12 @@ struct GstMpegtsDVBLinkageDescriptor */ ushort serviceId; /** - * the type which %linkage_data has + * the type which @linkage_data has */ GstMpegtsDVBLinkageType linkageType; void* linkageData; /** - * the length for %private_data_bytes + * the length for @private_data_bytes */ ubyte privateDataLength; /** @@ -1632,12 +2150,15 @@ struct GstMpegtsNITStream struct GstMpegtsPMT { /** - * PID of the stream containing PCR + * PID of the stream containing the PCR for this program. */ ushort pcrPid; + /** + * The program to which this PMT is applicable. + */ ushort programNumber; /** - * array of #GstMpegtsDescriptor + * Array of #GstMpegtsDescriptor */ GPtrArray* descriptors; /** @@ -1675,6 +2196,77 @@ struct GstMpegtsPatProgram ushort networkOrProgramMapPID; } +struct GstMpegtsSCTESIT +{ + bool encryptedPacket; + ubyte encryptionAlgorithm; + ulong ptsAdjustment; + ubyte cwIndex; + ushort tier; + ushort spliceCommandLength; + GstMpegtsSCTESpliceCommandType spliceCommandType; + bool spliceTimeSpecified; + ulong spliceTime; + GPtrArray* splices; + GPtrArray* descriptors; + /** + * When encrypted, or when encountering an unknown command type, + * we may still want to pass the sit through. + */ + bool fullyParsed; + /** + * When the SIT was constructed by the application, splice times + * are in running_time and must be translated before packetizing. + */ + bool isRunningTime; +} + +struct GstMpegtsSCTESpliceComponent +{ + /** + * the elementary PID stream containing the Splice Point + */ + ubyte tag; + /** + * Whether @splice_time was specified + */ + bool spliceTimeSpecified; + /** + * the presentation time of the signaled splice event + */ + ulong spliceTime; + /** + * The UTC time of the signaled splice event + */ + uint utcSpliceTime; +} + +struct GstMpegtsSCTESpliceEvent +{ + bool insertEvent; + uint spliceEventId; + bool spliceEventCancelIndicator; + bool outOfNetworkIndicator; + bool programSpliceFlag; + bool durationFlag; + bool spliceImmediateFlag; + bool programSpliceTimeSpecified; + ulong programSpliceTime; + /** + * The UTC time of the signaled splice event + */ + uint utcSpliceTime; + /** + * Per-PID splice time information + */ + GPtrArray* components; + bool breakDurationAutoReturn; + ulong breakDuration; + ushort uniqueProgramId; + ubyte availNum; + ubyte availsExpected; +} + struct GstMpegtsSDT { /** @@ -1723,6 +2315,44 @@ struct GstMpegtsSDTService GPtrArray* descriptors; } +/** + * Selection Information Table (EN 300 468) + * + * Since: 1.20 + */ +struct GstMpegtsSIT +{ + /** + * List of descriptors + */ + GPtrArray* descriptors; + /** + * List of services + */ + GPtrArray* services; +} + +/** + * SIT Service entry + * + * Since: 1.20 + */ +struct GstMpegtsSITService +{ + /** + * The Program number this table belongs to + */ + ushort serviceId; + /** + * Status of this service + */ + GstMpegtsRunningStatus runningStatus; + /** + * List of descriptors + */ + GPtrArray* descriptors; +} + /** * Satellite Delivery System Descriptor (EN 300 468 v.1.13.1) */ @@ -1771,15 +2401,16 @@ struct GstMpegtsSection { GstMiniObject parent; /** - * The type of section + * The type of section. */ GstMpegtsSectionType sectionType; /** - * The pid on which this section was found + * The PID on which this section was found or belongs to. */ ushort pid; /** - * The table id of this section + * The table id of this section. See %GstMpegtsSectionTableID and + * derivates for more information. */ ubyte tableId; /** @@ -1804,7 +2435,7 @@ struct GstMpegtsSection */ ubyte lastSectionNumber; /** - * CRC + * Checksum (if applicable) */ uint crc; ubyte* data; @@ -1893,7 +2524,7 @@ struct GstMpegtsTerrestrialDeliverySystemDescriptor */ bool mpeFec; /** - * the constallation + * the constellation */ GstMpegtsModulationType constellation; /** diff --git a/generated/gstreamer/gstinterfaces/VideoOverlay.d b/generated/gstreamer/gstinterfaces/VideoOverlay.d index 6e391ade6..d0bee6d19 100644 --- a/generated/gstreamer/gstinterfaces/VideoOverlay.d +++ b/generated/gstreamer/gstinterfaces/VideoOverlay.d @@ -95,7 +95,7 @@ public import gstreamerc.gstinterfacestypes; * ## Two basic usage scenarios * * There are two basic usage scenarios: in the simplest case, the application - * uses #playbin or #plasink or knows exactly what particular element is used + * uses #playbin or #playsink or knows exactly what particular element is used * for video output, which is usually the case when the application creates * the videosink to use (e.g. #xvimagesink, #ximagesink, etc.) itself; in this * case, the application can just create the videosink element, create and @@ -128,22 +128,22 @@ public import gstreamerc.gstinterfacestypes; * windowing systems are not thread-safe at all and a lot of care would be * required to co-ordinate the toolkit and window system calls of the * different threads (Gtk+ users please note: prior to Gtk+ 2.18 - * GDK_WINDOW_XID() was just a simple structure access, so generally fine to do + * `GDK_WINDOW_XID` was just a simple structure access, so generally fine to do * within the bus sync handler; this macro was changed to a function call in * Gtk+ 2.18 and later, which is likely to cause problems when called from a - * sync handler; see below for a better approach without GDK_WINDOW_XID() + * sync handler; see below for a better approach without `GDK_WINDOW_XID` * used in the callback). * * ## GstVideoOverlay and Gtk+ * * |[ - * #include <gst/video/videooverlay.h> - * #include <gtk/gtk.h> + * #include + * #include * #ifdef GDK_WINDOWING_X11 - * #include <gdk/gdkx.h> // for GDK_WINDOW_XID + * #include // for GDK_WINDOW_XID * #endif * #ifdef GDK_WINDOWING_WIN32 - * #include <gdk/gdkwin32.h> // for GDK_WINDOW_HWND + * #include // for GDK_WINDOW_HWND * #endif * ... * static guintptr video_window_handle = 0; @@ -238,13 +238,13 @@ public import gstreamerc.gstinterfacestypes; * ## GstVideoOverlay and Qt * * |[ - * #include <glib.h> - * #include <gst/gst.h> - * #include <gst/video/videooverlay.h> + * #include ; + * #include ; + * #include ; * - * #include <QApplication> - * #include <QTimer> - * #include <QWidget> + * #include ; + * #include ; + * #include ; * * int main(int argc, char *argv[]) * { @@ -347,11 +347,11 @@ public class VideoOverlay * properties. This helper will install "render-rectangle" property into the * class. * - * Since 1.14 - * * Params: * oclass = The class on which the properties will be installed * lastPropId = The first free property ID to use + * + * Since: 1.14 */ public static void installProperties(ObjectClass oclass, int lastPropId) { @@ -372,7 +372,7 @@ public class VideoOverlay * * Returns: %TRUE if the @property_id matches the GstVideoOverlay property * - * Since 1.14 + * Since: 1.14 */ public static bool setProperty(ObjectG object, int lastPropId, uint propertyId, Value value) { diff --git a/generated/gstreamer/gstinterfaces/c/types.d b/generated/gstreamer/gstinterfaces/c/types.d index 8b2e7b00e..76a860313 100644 --- a/generated/gstreamer/gstinterfaces/c/types.d +++ b/generated/gstreamer/gstinterfaces/c/types.d @@ -27,6 +27,156 @@ module gstinterfaces.c.types; public import gobject.c.types; +/** + * Enumeration of the different standards that may apply to AFD data: + * + * 0) ETSI/DVB: + * https://www.etsi.org/deliver/etsi_ts/101100_101199/101154/02.01.01_60/ts_101154v020101p.pdf + * + * 1) ATSC A/53: + * https://www.atsc.org/wp-content/uploads/2015/03/a_53-Part-4-2009.pdf + * + * 2) SMPTE ST2016-1: + * + * Since: 1.18 + */ +public enum GstVideoAFDSpec +{ + /** + * AFD value is from DVB/ETSI standard + */ + DVB_ETSI = 0, + /** + * AFD value is from ATSC A/53 standard + */ + ATSC_A53 = 1, + SMPTE_ST2016_1 = 2, +} +alias GstVideoAFDSpec VideoAFDSpec; + +/** + * Enumeration of the various values for Active Format Description (AFD) + * + * AFD should be included in video user data whenever the rectangular + * picture area containing useful information does not extend to the full height or width of the coded + * frame. AFD data may also be included in user data when the rectangular picture area containing + * useful information extends to the full height and width of the coded frame. + * + * For details, see Table 6.14 Active Format in: + * + * ATSC Digital Television Standard: + * Part 4 – MPEG-2 Video System Characteristics + * + * https://www.atsc.org/wp-content/uploads/2015/03/a_53-Part-4-2009.pdf + * + * and Active Format Description in Complete list of AFD codes + * + * https://en.wikipedia.org/wiki/Active_Format_Description#Complete_list_of_AFD_codes + * + * and SMPTE ST2016-1 + * + * Notes: + * + * 1) AFD 0 is undefined for ATSC and SMPTE ST2016-1, indicating that AFD data is not available: + * If Bar Data is not present, AFD '0000' indicates that exact information + * is not available and the active image should be assumed to be the same as the coded frame. AFD '0000'. + * AFD '0000' accompanied by Bar Data signals that the active image’s aspect ratio is narrower than 16:9, + * but is not 4:3 or 14:9. As the exact aspect ratio cannot be conveyed by AFD alone, wherever possible, + * AFD ‘0000’ should be accompanied by Bar Data to define the exact vertical or horizontal extent + * of the active image. + * 2) AFD 0 is reserved for DVB/ETSI + * 3) values 1, 5, 6, 7, and 12 are reserved for both ATSC and DVB/ETSI + * 4) values 2 and 3 are not recommended for ATSC, but are valid for DVB/ETSI + * + * Since: 1.18 + */ +public enum GstVideoAFDValue +{ + /** + * Unavailable (see note 0 below). + */ + UNAVAILABLE = 0, + /** + * For 4:3 coded frame, letterbox 16:9 image, + * at top of the coded frame. For 16:9 coded frame, full frame 16:9 image, + * the same as the coded frame. + */ + _16_9_TOP_ALIGNED = 2, + /** + * For 4:3 coded frame, letterbox 14:9 image, + * at top of the coded frame. For 16:9 coded frame, pillarbox 14:9 image, + * horizontally centered in the coded frame. + */ + _14_9_TOP_ALIGNED = 3, + /** + * For 4:3 coded frame, letterbox image with an aspect ratio + * greater than 16:9, vertically centered in the coded frame. For 16:9 coded frame, + * letterbox image with an aspect ratio greater than 16:9. + */ + GREATER_THAN_16_9 = 4, + /** + * For 4:3 coded frame, full frame 4:3 image, + * the same as the coded frame. For 16:9 coded frame, full frame 16:9 image, the same as + * the coded frame. + */ + _4_3_FULL_16_9_FULL = 8, + /** + * For 4:3 coded frame, full frame 4:3 image, the same as + * the coded frame. For 16:9 coded frame, pillarbox 4:3 image, horizontally centered in the + * coded frame. + */ + _4_3_FULL_4_3_PILLAR = 9, + /** + * For 4:3 coded frame, letterbox 16:9 image, vertically centered in + * the coded frame with all image areas protected. For 16:9 coded frame, full frame 16:9 image, + * with all image areas protected. + */ + _16_9_LETTER_16_9_FULL = 10, + /** + * For 4:3 coded frame, letterbox 14:9 image, vertically centered in + * the coded frame. For 16:9 coded frame, pillarbox 14:9 image, horizontally centered in the + * coded frame. + */ + _14_9_LETTER_14_9_PILLAR = 11, + /** + * For 4:3 coded frame, full frame 4:3 image, with alternative 14:9 + * center. For 16:9 coded frame, pillarbox 4:3 image, with alternative 14:9 center. + */ + _4_3_FULL_14_9_CENTER = 13, + /** + * For 4:3 coded frame, letterbox 16:9 image, with alternative 14:9 + * center. For 16:9 coded frame, full frame 16:9 image, with alternative 14:9 center. + */ + _16_9_LETTER_14_9_CENTER = 14, + /** + * For 4:3 coded frame, letterbox 16:9 image, with alternative 4:3 + * center. For 16:9 coded frame, full frame 16:9 image, with alternative 4:3 center. + */ + _16_9_LETTER_4_3_CENTER = 15, +} +alias GstVideoAFDValue VideoAFDValue; + +/** + * Flags to be used in combination with gst_video_decoder_request_sync_point(). + * See the function documentation for more details. + * + * Since: 1.20 + */ +public enum GstVideoDecoderRequestSyncPointFlags +{ + /** + * discard all following + * input until the next sync point. + */ + DISCARD_INPUT = 1, + /** + * discard all following + * output until the next sync point. + */ + CORRUPT_OUTPUT = 2, +} +alias GstVideoDecoderRequestSyncPointFlags VideoDecoderRequestSyncPointFlags; + /** * The different video orientation methods. * @@ -113,6 +263,24 @@ struct GstVideoDirectionInterface GTypeInterface iface; } +/** + * Used to represent display_primaries and white_point of + * #GstVideoMasteringDisplayInfo struct. See #GstVideoMasteringDisplayInfo + * + * Since: 1.18 + */ +struct GstVideoMasteringDisplayInfoCoordinates +{ + /** + * the x coordinate of CIE 1931 color space in unit of 0.00002. + */ + ushort x; + /** + * the y coordinate of CIE 1931 color space in unit of 0.00002. + */ + ushort y; +} + struct GstVideoOverlay; /** @@ -193,8 +361,19 @@ enum BUFFER_POOL_OPTION_VIDEO_META = "GstBufferPoolOptionVideoMeta"; alias GST_BUFFER_POOL_OPTION_VIDEO_META = BUFFER_POOL_OPTION_VIDEO_META; /** - * Name of the caps feature indicating that the stream is interlaced. Currently - * it is only used for video. + * Name of the caps feature indicating that the stream is interlaced. + * + * Currently it is only used for video with 'interlace-mode=alternate' + * to ensure backwards compatibility for this new mode. + * In this mode each buffer carries a single field of interlaced video. + * @GST_VIDEO_BUFFER_FLAG_TOP_FIELD and @GST_VIDEO_BUFFER_FLAG_BOTTOM_FIELD + * indicate whether the buffer carries a top or bottom field. The order of + * buffers/fields in the stream and the timestamps on the buffers indicate the + * temporal order of the fields. + * Top and bottom fields are expected to alternate in this mode. + * The frame rate in the caps still signals the frame rate, so the notional field + * rate will be twice the frame rate from the caps + * (see @GST_VIDEO_INFO_FIELD_RATE_N). */ enum CAPS_FEATURE_FORMAT_INTERLACED = "format:Interlaced"; alias GST_CAPS_FEATURE_FORMAT_INTERLACED = CAPS_FEATURE_FORMAT_INTERLACED; @@ -238,6 +417,15 @@ alias GST_META_TAG_VIDEO_STR = META_TAG_VIDEO_STR; enum VIDEO_COLORIMETRY_BT2020 = "bt2020"; alias GST_VIDEO_COLORIMETRY_BT2020 = VIDEO_COLORIMETRY_BT2020; +enum VIDEO_COLORIMETRY_BT2020_10 = "bt2020-10"; +alias GST_VIDEO_COLORIMETRY_BT2020_10 = VIDEO_COLORIMETRY_BT2020_10; + +enum VIDEO_COLORIMETRY_BT2100_HLG = "bt2100-hlg"; +alias GST_VIDEO_COLORIMETRY_BT2100_HLG = VIDEO_COLORIMETRY_BT2100_HLG; + +enum VIDEO_COLORIMETRY_BT2100_PQ = "bt2100-pq"; +alias GST_VIDEO_COLORIMETRY_BT2100_PQ = VIDEO_COLORIMETRY_BT2100_PQ; + enum VIDEO_COLORIMETRY_BT601 = "bt601"; alias GST_VIDEO_COLORIMETRY_BT601 = VIDEO_COLORIMETRY_BT601; @@ -278,7 +466,7 @@ enum VIDEO_COMP_Y = 0; alias GST_VIDEO_COMP_Y = VIDEO_COMP_Y; /** - * #GST_TYPE_VIDEO_ALPHA_MODE, the alpha mode to use. + * #GstVideoAlphaMode, the alpha mode to use. * Default is #GST_VIDEO_ALPHA_MODE_COPY. */ enum VIDEO_CONVERTER_OPT_ALPHA_MODE = "GstVideoConverter.alpha-mode"; @@ -291,6 +479,15 @@ alias GST_VIDEO_CONVERTER_OPT_ALPHA_MODE = VIDEO_CONVERTER_OPT_ALPHA_MODE; enum VIDEO_CONVERTER_OPT_ALPHA_VALUE = "GstVideoConverter.alpha-value"; alias GST_VIDEO_CONVERTER_OPT_ALPHA_VALUE = VIDEO_CONVERTER_OPT_ALPHA_VALUE; +/** + * #G_TYPE_BOOLEAN, whether gst_video_converter_frame() will return immediately + * without waiting for the conversion to complete. A subsequent + * gst_video_converter_frame_finish() must be performed to ensure completion of the + * conversion before subsequent use. Default %FALSE + */ +enum VIDEO_CONVERTER_OPT_ASYNC_TASKS = "GstVideoConverter.async-tasks"; +alias GST_VIDEO_CONVERTER_OPT_ASYNC_TASKS = VIDEO_CONVERTER_OPT_ASYNC_TASKS; + /** * #G_TYPE_UINT, the border color to use if #GST_VIDEO_CONVERTER_OPT_FILL_BORDER * is set to %TRUE. The color is in ARGB format. @@ -300,14 +497,14 @@ enum VIDEO_CONVERTER_OPT_BORDER_ARGB = "GstVideoConverter.border-argb"; alias GST_VIDEO_CONVERTER_OPT_BORDER_ARGB = VIDEO_CONVERTER_OPT_BORDER_ARGB; /** - * #GST_TYPE_VIDEO_CHROMA_MODE, set the chroma resample mode subsampled + * #GstVideoChromaMode, set the chroma resample mode subsampled * formats. Default is #GST_VIDEO_CHROMA_MODE_FULL. */ enum VIDEO_CONVERTER_OPT_CHROMA_MODE = "GstVideoConverter.chroma-mode"; alias GST_VIDEO_CONVERTER_OPT_CHROMA_MODE = VIDEO_CONVERTER_OPT_CHROMA_MODE; /** - * #GST_TYPE_VIDEO_RESAMPLER_METHOD, The resampler method to use for + * #GstVideoChromaMethod, The resampler method to use for * chroma resampling. Other options for the resampler can be used, see * the #GstVideoResampler. Default is #GST_VIDEO_RESAMPLER_METHOD_LINEAR */ @@ -339,7 +536,7 @@ enum VIDEO_CONVERTER_OPT_DEST_Y = "GstVideoConverter.dest-y"; alias GST_VIDEO_CONVERTER_OPT_DEST_Y = VIDEO_CONVERTER_OPT_DEST_Y; /** - * #GST_TYPE_VIDEO_DITHER_METHOD, The dither method to use when + * #GstVideoDitherMethod, The dither method to use when * changing bit depth. * Default is #GST_VIDEO_DITHER_BAYER. */ @@ -364,14 +561,14 @@ enum VIDEO_CONVERTER_OPT_FILL_BORDER = "GstVideoConverter.fill-border"; alias GST_VIDEO_CONVERTER_OPT_FILL_BORDER = VIDEO_CONVERTER_OPT_FILL_BORDER; /** - * #GST_TYPE_VIDEO_GAMMA_MODE, set the gamma mode. + * #GstVideoGammaMode, set the gamma mode. * Default is #GST_VIDEO_GAMMA_MODE_NONE. */ enum VIDEO_CONVERTER_OPT_GAMMA_MODE = "GstVideoConverter.gamma-mode"; alias GST_VIDEO_CONVERTER_OPT_GAMMA_MODE = VIDEO_CONVERTER_OPT_GAMMA_MODE; /** - * #GST_TYPE_VIDEO_MATRIX_MODE, set the color matrix conversion mode for + * #GstVideoMatrixMode, set the color matrix conversion mode for * converting between Y'PbPr and non-linear RGB (R'G'B'). * Default is #GST_VIDEO_MATRIX_MODE_FULL. */ @@ -379,14 +576,14 @@ enum VIDEO_CONVERTER_OPT_MATRIX_MODE = "GstVideoConverter.matrix-mode"; alias GST_VIDEO_CONVERTER_OPT_MATRIX_MODE = VIDEO_CONVERTER_OPT_MATRIX_MODE; /** - * #GST_TYPE_VIDEO_PRIMARIES_MODE, set the primaries conversion mode. + * #GstVideoPrimariesMode, set the primaries conversion mode. * Default is #GST_VIDEO_PRIMARIES_MODE_NONE. */ enum VIDEO_CONVERTER_OPT_PRIMARIES_MODE = "GstVideoConverter.primaries-mode"; alias GST_VIDEO_CONVERTER_OPT_PRIMARIES_MODE = VIDEO_CONVERTER_OPT_PRIMARIES_MODE; /** - * #GST_TYPE_VIDEO_RESAMPLER_METHOD, The resampler method to use for + * #GstVideoResamplerMethod, The resampler method to use for * resampling. Other options for the resampler can be used, see * the #GstVideoResampler. Default is #GST_VIDEO_RESAMPLER_METHOD_CUBIC */ @@ -461,7 +658,24 @@ alias GST_VIDEO_ENCODER_SINK_NAME = VIDEO_ENCODER_SINK_NAME; enum VIDEO_ENCODER_SRC_NAME = "src"; alias GST_VIDEO_ENCODER_SRC_NAME = VIDEO_ENCODER_SRC_NAME; -enum VIDEO_FORMATS_ALL = "{ I420, YV12, YUY2, UYVY, AYUV, VUYA, RGBx, BGRx, xRGB, xBGR, RGBA, BGRA, ARGB, ABGR, RGB, BGR, Y41B, Y42B, YVYU, Y444, v210, v216, Y210, Y410, NV12, NV21, GRAY8, GRAY16_BE, GRAY16_LE, v308, RGB16, BGR16, RGB15, BGR15, UYVP, A420, RGB8P, YUV9, YVU9, IYU1, ARGB64, AYUV64, r210, I420_10BE, I420_10LE, I422_10BE, I422_10LE, Y444_10BE, Y444_10LE, GBR, GBR_10BE, GBR_10LE, NV16, NV24, NV12_64Z32, A420_10BE, A420_10LE, A422_10BE, A422_10LE, A444_10BE, A444_10LE, NV61, P010_10BE, P010_10LE, IYU2, VYUY, GBRA, GBRA_10BE, GBRA_10LE, BGR10A2_LE, GBR_12BE, GBR_12LE, GBRA_12BE, GBRA_12LE, I420_12BE, I420_12LE, I422_12BE, I422_12LE, Y444_12BE, Y444_12LE, GRAY10_LE32, NV12_10LE32, NV16_10LE32, NV12_10LE40 }"; +/** + * List of all video formats, for use in template caps strings. + * + * Formats are sorted by decreasing "quality", using these criteria by priority: + * - number of components + * - depth + * - subsampling factor of the width + * - subsampling factor of the height + * - number of planes + * - native endianness preferred + * - pixel stride + * - poffset + * - prefer non-complex formats + * - prefer YUV formats over RGB ones + * - prefer I420 over YV12 + * - format name + */ +enum VIDEO_FORMATS_ALL = "{ ABGR64_BE, BGRA64_BE, AYUV64, ARGB64_BE, ARGB64, RGBA64_BE, ABGR64_LE, BGRA64_LE, ARGB64_LE, RGBA64_LE, GBRA_12BE, GBRA_12LE, Y412_BE, Y412_LE, A444_10BE, GBRA_10BE, A444_10LE, GBRA_10LE, A422_10BE, A422_10LE, A420_10BE, A420_10LE, Y410, RGB10A2_LE, BGR10A2_LE, GBRA, ABGR, VUYA, BGRA, AYUV, ARGB, RGBA, A420, AV12, Y444_16BE, Y444_16LE, v216, P016_BE, P016_LE, Y444_12BE, GBR_12BE, Y444_12LE, GBR_12LE, I422_12BE, I422_12LE, Y212_BE, Y212_LE, I420_12BE, I420_12LE, P012_BE, P012_LE, Y444_10BE, GBR_10BE, Y444_10LE, GBR_10LE, r210, I422_10BE, I422_10LE, NV16_10LE32, Y210, v210, UYVP, I420_10BE, I420_10LE, P010_10BE, P010_10LE, NV12_10LE32, NV12_10LE40, Y444, RGBP, GBR, BGRP, NV24, xBGR, BGRx, xRGB, RGBx, BGR, IYU2, v308, RGB, Y42B, NV61, NV16, VYUY, UYVY, YVYU, YUY2, I420, YV12, NV21, NV12, NV12_64Z32, NV12_4L4, NV12_32L32, Y41B, IYU1, YVU9, YUV9, RGB16, BGR16, RGB15, BGR15, RGB8P, GRAY16_BE, GRAY16_LE, GRAY10_LE32, GRAY8 }"; alias GST_VIDEO_FORMATS_ALL = VIDEO_FORMATS_ALL; enum VIDEO_FPS_RANGE = "(fraction) [ 0, max ]"; @@ -473,13 +687,6 @@ alias GST_VIDEO_MAX_COMPONENTS = VIDEO_MAX_COMPONENTS; enum VIDEO_MAX_PLANES = 4; alias GST_VIDEO_MAX_PLANES = VIDEO_MAX_PLANES; -/** - * Video formats supported by gst_video_overlay_composition_blend(), for - * use in overlay elements' pad template caps. - */ -enum VIDEO_OVERLAY_COMPOSITION_BLEND_FORMATS = "{ BGRx, RGBx, xRGB, xBGR, RGBA, BGRA, ARGB, ABGR, RGB, BGR, I420, YV12, AYUV, YUY2, UYVY, v308, Y41B, Y42B, Y444, NV12, NV21, A420, YUV9, YVU9, IYU1, GRAY8 }"; -alias GST_VIDEO_OVERLAY_COMPOSITION_BLEND_FORMATS = VIDEO_OVERLAY_COMPOSITION_BLEND_FORMATS; - /** * G_TYPE_DOUBLE, B parameter of the cubic filter. The B * parameter controls the bluriness. Values between 0.0 and @@ -542,7 +749,7 @@ enum VIDEO_RESAMPLER_OPT_SHARPNESS = "GstVideoResampler.sharpness"; alias GST_VIDEO_RESAMPLER_OPT_SHARPNESS = VIDEO_RESAMPLER_OPT_SHARPNESS; /** - * #GST_TYPE_VIDEO_DITHER_METHOD, The dither method to use for propagating + * #GstVideoDitherMethod, The dither method to use for propagating * quatization errors. */ enum VIDEO_SCALER_OPT_DITHER_METHOD = "GstVideoScaler.dither-method"; diff --git a/generated/gstreamer/gstreamer/AllocationParams.d b/generated/gstreamer/gstreamer/AllocationParams.d index 738ef049a..9b83dbc85 100644 --- a/generated/gstreamer/gstreamer/AllocationParams.d +++ b/generated/gstreamer/gstreamer/AllocationParams.d @@ -24,6 +24,7 @@ module gstreamer.AllocationParams; +private import glib.ConstructionException; private import gobject.ObjectG; private import gstreamer.c.functions; public import gstreamer.c.types; @@ -77,23 +78,47 @@ public class AllocationParams } /** - * Create a copy of @params. + * Create a new #GstAllocationParams on the heap. This function is for + * use in GStreamer language bindings. In your own code, you can just + * declare a #GstAllocationParams on the stack or in a struct, and + * call gst_allocation_params_init() to initialize it. + * + * You do not need to call gst_allocation_params_init() on the instance + * returned by this function. + * + * Returns: a new #GstAllocationParams + * + * Since: 1.20 * - * Free-function: gst_allocation_params_free + * Throws: ConstructionException GTK+ fails to create the object. + */ + public this() + { + auto __p = gst_allocation_params_new(); + + if(__p is null) + { + throw new ConstructionException("null returned by new"); + } + + this(cast(GstAllocationParams*) __p); + } + + /** + * Create a copy of @params. * - * Returns: a new ##GstAllocationParams, free with - * gst_allocation_params_free(). + * Returns: a new #GstAllocationParams. */ public AllocationParams copy() { - auto p = gst_allocation_params_copy(gstAllocationParams); + auto __p = gst_allocation_params_copy(gstAllocationParams); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(AllocationParams)(cast(GstAllocationParams*) p, true); + return ObjectG.getDObject!(AllocationParams)(cast(GstAllocationParams*) __p, true); } /** diff --git a/generated/gstreamer/gstreamer/Allocator.d b/generated/gstreamer/gstreamer/Allocator.d index 441d5c588..5de2ce639 100644 --- a/generated/gstreamer/gstreamer/Allocator.d +++ b/generated/gstreamer/gstreamer/Allocator.d @@ -90,24 +90,22 @@ public class Allocator : ObjectGst * name = the name of the allocator * * Returns: a #GstAllocator or %NULL when - * the allocator with @name was not registered. Use gst_object_unref() - * to release the allocator after usage. + * the allocator with @name was not registered. */ public static Allocator find(string name) { - auto p = gst_allocator_find(Str.toStringz(name)); + auto __p = gst_allocator_find(Str.toStringz(name)); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Allocator)(cast(GstAllocator*) p, true); + return ObjectG.getDObject!(Allocator)(cast(GstAllocator*) __p, true); } /** - * Registers the memory @allocator with @name. This function takes ownership of - * @allocator. + * Registers the memory @allocator with @name. * * Params: * name = the name of the allocator @@ -143,14 +141,14 @@ public class Allocator : ObjectGst */ public Memory alloc(size_t size, AllocationParams params) { - auto p = gst_allocator_alloc(gstAllocator, size, (params is null) ? null : params.getAllocationParamsStruct()); + auto __p = gst_allocator_alloc(gstAllocator, size, (params is null) ? null : params.getAllocationParamsStruct()); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Memory)(cast(GstMemory*) p, true); + return ObjectG.getDObject!(Memory)(cast(GstMemory*) __p, true); } /** @@ -161,11 +159,11 @@ public class Allocator : ObjectGst */ public void free(Memory memory) { - gst_allocator_free(gstAllocator, (memory is null) ? null : memory.getMemoryStruct()); + gst_allocator_free(gstAllocator, (memory is null) ? null : memory.getMemoryStruct(true)); } /** - * Set the default allocator. This function takes ownership of @allocator. + * Set the default allocator. */ public void setDefault() { diff --git a/generated/gstreamer/gstreamer/AtomicQueue.d b/generated/gstreamer/gstreamer/AtomicQueue.d index 99d95dc3a..453619beb 100644 --- a/generated/gstreamer/gstreamer/AtomicQueue.d +++ b/generated/gstreamer/gstreamer/AtomicQueue.d @@ -91,14 +91,14 @@ public class AtomicQueue */ public this(uint initialSize) { - auto p = gst_atomic_queue_new(initialSize); + auto __p = gst_atomic_queue_new(initialSize); - if(p is null) + if(__p is null) { throw new ConstructionException("null returned by new"); } - this(cast(GstAtomicQueue*) p); + this(cast(GstAtomicQueue*) __p); } /** diff --git a/generated/gstreamer/gstreamer/Bin.d b/generated/gstreamer/gstreamer/Bin.d index c149074f8..f3d606f56 100644 --- a/generated/gstreamer/gstreamer/Bin.d +++ b/generated/gstreamer/gstreamer/Bin.d @@ -68,46 +68,56 @@ private import std.algorithm; * the bin. Likewise the #GstBin::element-removed signal is fired whenever an * element is removed from the bin. * - * ## Notes - * * A #GstBin internally intercepts every #GstMessage posted by its children and * implements the following default behaviour for each of them: * - * * GST_MESSAGE_EOS: This message is only posted by sinks in the PLAYING + * * %GST_MESSAGE_EOS: This message is only posted by sinks in the PLAYING * state. If all sinks posted the EOS message, this bin will post and EOS * message upwards. * - * * GST_MESSAGE_SEGMENT_START: Just collected and never forwarded upwards. + * * %GST_MESSAGE_SEGMENT_START: Just collected and never forwarded upwards. * The messages are used to decide when all elements have completed playback * of their segment. * - * * GST_MESSAGE_SEGMENT_DONE: Is posted by #GstBin when all elements that posted + * * %GST_MESSAGE_SEGMENT_DONE: Is posted by #GstBin when all elements that posted * a SEGMENT_START have posted a SEGMENT_DONE. * - * * GST_MESSAGE_DURATION_CHANGED: Is posted by an element that detected a change - * in the stream duration. The default bin behaviour is to clear any - * cached duration values so that the next duration query will perform - * a full duration recalculation. The duration change is posted to the + * * %GST_MESSAGE_DURATION_CHANGED: Is posted by an element that detected a change + * in the stream duration. The duration change is posted to the * application so that it can refetch the new duration with a duration - * query. Note that these messages can be posted before the bin is - * prerolled, in which case the duration query might fail. + * query. + * + * Note that these messages can be posted before the bin is prerolled, in which + * case the duration query might fail. + * + * Note also that there might be a discrepancy (due to internal buffering/queueing) + * between the stream being currently displayed and the returned duration query. + * + * Applications might want to also query for duration (and changes) by + * listening to the %GST_MESSAGE_STREAM_START message, signaling the active start + * of a (new) stream. + * + * * %GST_MESSAGE_CLOCK_LOST: This message is posted by an element when it + * can no longer provide a clock. + * + * The default bin behaviour is to check if the lost clock was the one provided + * by the bin. If so and the bin is currently in the PLAYING state, the message + * is forwarded to the bin parent. * - * * GST_MESSAGE_CLOCK_LOST: This message is posted by an element when it - * can no longer provide a clock. The default bin behaviour is to - * check if the lost clock was the one provided by the bin. If so and - * the bin is currently in the PLAYING state, the message is forwarded to - * the bin parent. * This message is also generated when a clock provider is removed from * the bin. If this message is received by the application, it should * PAUSE the pipeline and set it back to PLAYING to force a new clock * distribution. * - * * GST_MESSAGE_CLOCK_PROVIDE: This message is generated when an element + * * %GST_MESSAGE_CLOCK_PROVIDE: This message is generated when an element * can provide a clock. This mostly happens when a new clock - * provider is added to the bin. The default behaviour of the bin is to - * mark the currently selected clock as dirty, which will perform a clock - * recalculation the next time the bin is asked to provide a clock. - * This message is never sent tot the application but is forwarded to + * provider is added to the bin. + * + * The default behaviour of the bin is to mark the currently selected clock as + * dirty, which will perform a clock recalculation the next time the bin is + * asked to provide a clock. + * + * This message is never sent to the application but is forwarded to * the parent of the bin. * * * OTHERS: posted upwards. @@ -115,24 +125,22 @@ private import std.algorithm; * A #GstBin implements the following default behaviour for answering to a * #GstQuery: * - * * GST_QUERY_DURATION:If the query has been asked before with the same format - * and the bin is a toplevel bin (ie. has no parent), - * use the cached previous value. If no previous value was cached, the - * query is sent to all sink elements in the bin and the MAXIMUM of all - * values is returned. If the bin is a toplevel bin the value is cached. + * * %GST_QUERY_DURATION: The bin will forward the query to all sink + * elements contained within and will return the maximum value. * If no sinks are available in the bin, the query fails. * - * * GST_QUERY_POSITION:The query is sent to all sink elements in the bin and the + * * %GST_QUERY_POSITION: The query is sent to all sink elements in the bin and the * MAXIMUM of all values is returned. If no sinks are available in the bin, * the query fails. * - * * OTHERS:the query is forwarded to all sink elements, the result + * * OTHERS: the query is forwarded to all sink elements, the result * of the first sink that answers the query successfully is returned. If no * sink is in the bin, the query fails. * * A #GstBin will by default forward any event sent to it to all sink - * (#GST_EVENT_TYPE_DOWNSTREAM) or source (#GST_EVENT_TYPE_UPSTREAM) elements + * ( %GST_EVENT_TYPE_DOWNSTREAM ) or source ( %GST_EVENT_TYPE_UPSTREAM ) elements * depending on the event type. + * * If all the elements return %TRUE, the bin will also return %TRUE, else %FALSE * is returned. If no elements of the required type are in the bin, the event * handler will return %TRUE. @@ -215,14 +223,14 @@ public class Bin : Element, ChildProxyIF */ public this(string name) { - auto p = gst_bin_new(Str.toStringz(name)); + auto __p = gst_bin_new(Str.toStringz(name)); - if(p is null) + if(__p is null) { throw new ConstructionException("null returned by new"); } - this(cast(GstBin*) p); + this(cast(GstBin*) __p); } /** @@ -238,8 +246,6 @@ public class Bin : Element, ChildProxyIF * > with gst_element_set_state(), or use gst_element_sync_state_with_parent(). * > The bin or pipeline will not take care of this for you. * - * MT safe. - * * Params: * element = the #GstElement to add * @@ -262,18 +268,18 @@ public class Bin : Element, ChildProxyIF * direction = whether to look for an unlinked source or sink pad * * Returns: unlinked pad of the given - * direction, %NULL. + * direction. */ public Pad findUnlinkedPad(GstPadDirection direction) { - auto p = gst_bin_find_unlinked_pad(gstBin, direction); + auto __p = gst_bin_find_unlinked_pad(gstBin, direction); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Pad)(cast(GstPad*) p, true); + return ObjectG.getDObject!(Pad)(cast(GstPad*) __p, true); } /** @@ -283,8 +289,6 @@ public class Bin : Element, ChildProxyIF * all elements that implement the interface, use * gst_bin_iterate_all_by_interface(). This function recurses into child bins. * - * MT safe. Caller owns returned reference. - * * Params: * iface = the #GType of an interface * @@ -293,74 +297,61 @@ public class Bin : Element, ChildProxyIF */ public Element getByInterface(GType iface) { - auto p = gst_bin_get_by_interface(gstBin, iface); + auto __p = gst_bin_get_by_interface(gstBin, iface); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Element)(cast(GstElement*) p, true); + return ObjectG.getDObject!(Element)(cast(GstElement*) __p, true); } /** * Gets the element with the given name from a bin. This * function recurses into child bins. * - * Returns %NULL if no element with the given name is found in the bin. - * - * MT safe. Caller owns returned reference. - * * Params: * name = the element name to search for * * Returns: the #GstElement with the given - * name, or %NULL + * name */ public Element getByName(string name) { - auto p = gst_bin_get_by_name(gstBin, Str.toStringz(name)); + auto __p = gst_bin_get_by_name(gstBin, Str.toStringz(name)); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Element)(cast(GstElement*) p, true); + return ObjectG.getDObject!(Element)(cast(GstElement*) __p, true); } /** * Gets the element with the given name from this bin. If the * element is not found, a recursion is performed on the parent bin. * - * Returns %NULL if: - * - no element with the given name is found in the bin - * - * MT safe. Caller owns returned reference. - * * Params: * name = the element name to search for * * Returns: the #GstElement with the given - * name, or %NULL + * name */ public Element getByNameRecurseUp(string name) { - auto p = gst_bin_get_by_name_recurse_up(gstBin, Str.toStringz(name)); + auto __p = gst_bin_get_by_name_recurse_up(gstBin, Str.toStringz(name)); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Element)(cast(GstElement*) p, true); + return ObjectG.getDObject!(Element)(cast(GstElement*) __p, true); } /** - * Return the suppressed flags of the bin. - * - * MT safe. - * * Returns: the bin's suppressed #GstElementFlags. * * Since: 1.10 @@ -370,93 +361,106 @@ public class Bin : Element, ChildProxyIF return gst_bin_get_suppressed_flags(gstBin); } + /** + * Looks for all elements inside the bin with the given element factory name. + * The function recurses inside child bins. The iterator will yield a series of + * #GstElement. + * + * Params: + * factoryName = the name of the #GstElementFactory + * + * Returns: a #GstIterator of #GstElement + * for all elements in the bin with the given element factory name + * + * Since: 1.18 + */ + public Iterator iterateAllByElementFactoryName(string factoryName) + { + auto __p = gst_bin_iterate_all_by_element_factory_name(gstBin, Str.toStringz(factoryName)); + + if(__p is null) + { + return null; + } + + return ObjectG.getDObject!(Iterator)(cast(GstIterator*) __p, true); + } + /** * Looks for all elements inside the bin that implements the given * interface. You can safely cast all returned elements to the given interface. * The function recurses inside child bins. The iterator will yield a series - * of #GstElement that should be unreffed after use. - * - * MT safe. Caller owns returned value. + * of #GstElement. * * Params: * iface = the #GType of an interface * * Returns: a #GstIterator of #GstElement - * for all elements in the bin implementing the given interface, - * or %NULL + * for all elements in the bin implementing the given interface */ public Iterator iterateAllByInterface(GType iface) { - auto p = gst_bin_iterate_all_by_interface(gstBin, iface); + auto __p = gst_bin_iterate_all_by_interface(gstBin, iface); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Iterator)(cast(GstIterator*) p, true); + return ObjectG.getDObject!(Iterator)(cast(GstIterator*) __p, true); } /** * Gets an iterator for the elements in this bin. * - * MT safe. Caller owns returned value. - * - * Returns: a #GstIterator of #GstElement, - * or %NULL + * Returns: a #GstIterator of #GstElement */ public Iterator iterateElements() { - auto p = gst_bin_iterate_elements(gstBin); + auto __p = gst_bin_iterate_elements(gstBin); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Iterator)(cast(GstIterator*) p, true); + return ObjectG.getDObject!(Iterator)(cast(GstIterator*) __p, true); } /** * Gets an iterator for the elements in this bin. * This iterator recurses into GstBin children. * - * MT safe. Caller owns returned value. - * - * Returns: a #GstIterator of #GstElement, - * or %NULL + * Returns: a #GstIterator of #GstElement */ public Iterator iterateRecurse() { - auto p = gst_bin_iterate_recurse(gstBin); + auto __p = gst_bin_iterate_recurse(gstBin); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Iterator)(cast(GstIterator*) p, true); + return ObjectG.getDObject!(Iterator)(cast(GstIterator*) __p, true); } /** * Gets an iterator for all elements in the bin that have the * #GST_ELEMENT_FLAG_SINK flag set. * - * MT safe. Caller owns returned value. - * - * Returns: a #GstIterator of #GstElement, - * or %NULL + * Returns: a #GstIterator of #GstElement */ public Iterator iterateSinks() { - auto p = gst_bin_iterate_sinks(gstBin); + auto __p = gst_bin_iterate_sinks(gstBin); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Iterator)(cast(GstIterator*) p, true); + return ObjectG.getDObject!(Iterator)(cast(GstIterator*) __p, true); } /** @@ -467,52 +471,46 @@ public class Bin : Element, ChildProxyIF * This function is used internally to perform the state changes * of the bin elements and for clock selection. * - * MT safe. Caller owns returned value. - * - * Returns: a #GstIterator of #GstElement, - * or %NULL + * Returns: a #GstIterator of #GstElement */ public Iterator iterateSorted() { - auto p = gst_bin_iterate_sorted(gstBin); + auto __p = gst_bin_iterate_sorted(gstBin); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Iterator)(cast(GstIterator*) p, true); + return ObjectG.getDObject!(Iterator)(cast(GstIterator*) __p, true); } /** * Gets an iterator for all elements in the bin that have the * #GST_ELEMENT_FLAG_SOURCE flag set. * - * MT safe. Caller owns returned value. - * - * Returns: a #GstIterator of #GstElement, - * or %NULL + * Returns: a #GstIterator of #GstElement */ public Iterator iterateSources() { - auto p = gst_bin_iterate_sources(gstBin); + auto __p = gst_bin_iterate_sources(gstBin); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Iterator)(cast(GstIterator*) p, true); + return ObjectG.getDObject!(Iterator)(cast(GstIterator*) __p, true); } /** - * Query @bin for the current latency using and reconfigures this latency to all the - * elements with a LATENCY event. + * Queries @bin for the current latency and reconfigures this latency on all the + * elements using a LATENCY event. * * This method is typically called on the pipeline when a #GST_MESSAGE_LATENCY * is posted on the bus. * - * This function simply emits the 'do-latency' signal so any custom latency + * This function simply emits the #GstBin::do-latency signal so any custom latency * calculations will be performed. * * Returns: %TRUE if the latency could be queried and reconfigured. @@ -533,8 +531,6 @@ public class Bin : Element, ChildProxyIF * If the element's pads are linked to other pads, the pads will be unlinked * before the element is removed from the bin. * - * MT safe. - * * Params: * element = the #GstElement to remove * @@ -547,13 +543,11 @@ public class Bin : Element, ChildProxyIF } /** - * Suppress the given flags on the bin. #GstElementFlags of a + * Suppresses the given flags on the bin. #GstElementFlags of a * child element are propagated when it is added to the bin. * When suppressed flags are set, those specified flags will * not be propagated to the bin. * - * MT safe. - * * Params: * flags = the #GstElementFlags to suppress * @@ -579,7 +573,7 @@ public class Bin : Element, ChildProxyIF } /** - * Will be emitted after the element was added to sub_bin. + * Will be emitted after the element was added to @sub_bin. * * Params: * subBin = the #GstBin the element was added to @@ -593,7 +587,7 @@ public class Bin : Element, ChildProxyIF } /** - * Will be emitted after the element was removed from sub_bin. + * Will be emitted after the element was removed from @sub_bin. * * Params: * subBin = the #GstBin the element was removed from @@ -608,7 +602,7 @@ public class Bin : Element, ChildProxyIF /** * Will be emitted when the bin needs to perform latency calculations. This - * signal is only emitted for toplevel bins or when async-handling is + * signal is only emitted for toplevel bins or when #GstBin:async-handling is * enabled. * * Only one signal handler is invoked. If no signals are connected, the diff --git a/generated/gstreamer/gstreamer/Bitmask.d b/generated/gstreamer/gstreamer/Bitmask.d index 29b489ab1..63caf0657 100644 --- a/generated/gstreamer/gstreamer/Bitmask.d +++ b/generated/gstreamer/gstreamer/Bitmask.d @@ -29,7 +29,9 @@ public import gstreamer.c.types; public import gstreamerc.gstreamertypes; -/** */ +/** + * A fundamental type that describes a 64-bit bitmask + */ public class Bitmask { /** the main Gtk struct */ diff --git a/generated/gstreamer/gstreamer/Buffer.d b/generated/gstreamer/gstreamer/Buffer.d index 973756fdf..b03d0c11d 100644 --- a/generated/gstreamer/gstreamer/Buffer.d +++ b/generated/gstreamer/gstreamer/Buffer.d @@ -26,17 +26,21 @@ module gstreamer.Buffer; private import glib.Bytes; private import glib.ConstructionException; +private import glib.Str; private import gobject.ObjectG; private import gstreamer.AllocationParams; private import gstreamer.Allocator; private import gstreamer.Caps; +private import gstreamer.CustomMeta; private import gstreamer.Memory; private import gstreamer.Meta; +private import gstreamer.MetaInfo; private import gstreamer.ProtectionMeta; private import gstreamer.Structure; private import gstreamer.c.functions; public import gstreamer.c.types; public import gstreamerc.gstreamertypes; +private import gtkd.Loader; /** @@ -48,7 +52,8 @@ public import gstreamerc.gstreamertypes; * created one will typically allocate memory for it and add it to the buffer. * The following example creates a buffer that can hold a given video frame * with a given width, height and bits per plane. - * |[ + * + * ``` C * GstBuffer *buffer; * GstMemory *memory; * gint size, width, height, bpp; @@ -58,7 +63,7 @@ public import gstreamerc.gstreamertypes; * memory = gst_allocator_alloc (NULL, size, NULL); * gst_buffer_insert_memory (buffer, -1, memory); * ... - * ]| + * ``` * * Alternatively, use gst_buffer_new_allocate() to create a buffer with * preallocated data of a given size. @@ -98,7 +103,7 @@ public import gstreamerc.gstreamertypes; * * If a plug-in wants to modify the buffer data or metadata in-place, it should * first obtain a buffer that is safe to modify by using - * gst_buffer_make_writable(). This function is optimized so that a copy will + * gst_buffer_make_writable(). This function is optimized so that a copy will * only be made when it is necessary. * * Several flags of the buffer can be set and unset with the @@ -110,7 +115,7 @@ public import gstreamerc.gstreamertypes; * needed. * * Arbitrary extra metadata can be set on a buffer with gst_buffer_add_meta(). - * Metadata can be retrieved with gst_buffer_get_meta(). See also #GstMeta + * Metadata can be retrieved with gst_buffer_get_meta(). See also #GstMeta. * * An element should either unref the buffer or push it out on a src pad * using gst_pad_push() (see #GstPad). @@ -127,7 +132,7 @@ public import gstreamerc.gstreamertypes; * Typically, #GstParentBufferMeta is used when the child buffer is directly * using the #GstMemory of the parent buffer, and wants to prevent the parent * buffer from being returned to a buffer pool until the #GstMemory is available - * for re-use. (Since 1.6) + * for re-use. (Since: 1.6) */ public class Buffer { @@ -158,6 +163,12 @@ public class Buffer this.ownedRef = ownedRef; } + ~this () + { + if ( Linker.isLoaded(LIBRARY_GSTREAMER) && ownedRef ) + gst_buffer_unref(gstBuffer); + } + /** */ public static GType getType() @@ -168,22 +179,20 @@ public class Buffer /** * Creates a newly allocated buffer without any data. * - * MT safe. - * * Returns: the new #GstBuffer. * * Throws: ConstructionException GTK+ fails to create the object. */ public this() { - auto p = gst_buffer_new(); + auto __p = gst_buffer_new(); - if(p is null) + if(__p is null) { throw new ConstructionException("null returned by new"); } - this(cast(GstBuffer*) p); + this(cast(GstBuffer*) __p); } /** @@ -195,36 +204,31 @@ public class Buffer * * Note that when @size == 0, the buffer will not have memory associated with it. * - * MT safe. - * * Params: * allocator = the #GstAllocator to use, or %NULL to use the * default allocator * size = the size in bytes of the new buffer's data. * params = optional parameters * - * Returns: a new #GstBuffer, or %NULL if - * the memory couldn't be allocated. + * Returns: a new #GstBuffer * * Throws: ConstructionException GTK+ fails to create the object. */ public this(Allocator allocator, size_t size, AllocationParams params) { - auto p = gst_buffer_new_allocate((allocator is null) ? null : allocator.getAllocatorStruct(), size, (params is null) ? null : params.getAllocationParamsStruct()); + auto __p = gst_buffer_new_allocate((allocator is null) ? null : allocator.getAllocatorStruct(), size, (params is null) ? null : params.getAllocationParamsStruct()); - if(p is null) + if(__p is null) { throw new ConstructionException("null returned by new_allocate"); } - this(cast(GstBuffer*) p); + this(cast(GstBuffer*) __p); } /** * Creates a new buffer that wraps the given @data. The memory will be freed - * with g_free and will be marked writable. - * - * MT safe. + * with g_free() and will be marked writable. * * Params: * data = data to wrap @@ -235,22 +239,20 @@ public class Buffer */ public this(ubyte[] data) { - auto p = gst_buffer_new_wrapped(data.ptr, cast(size_t)data.length); + auto __p = gst_buffer_new_wrapped(data.ptr, cast(size_t)data.length); - if(p is null) + if(__p is null) { throw new ConstructionException("null returned by new_wrapped"); } - this(cast(GstBuffer*) p); + this(cast(GstBuffer*) __p); } /** * Creates a new #GstBuffer that wraps the given @bytes. The data inside * @bytes cannot be %NULL and the resulting buffer will be marked as read only. * - * MT safe. - * * Params: * bytes = a #GBytes to wrap * @@ -262,18 +264,18 @@ public class Buffer */ public this(Bytes bytes) { - auto p = gst_buffer_new_wrapped_bytes((bytes is null) ? null : bytes.getBytesStruct()); + auto __p = gst_buffer_new_wrapped_bytes((bytes is null) ? null : bytes.getBytesStruct()); - if(p is null) + if(__p is null) { throw new ConstructionException("null returned by new_wrapped_bytes"); } - this(cast(GstBuffer*) p); + this(cast(GstBuffer*) __p); } /** - * Allocate a new buffer that wraps the given memory. @data must point to + * Allocates a new buffer that wraps the given memory. @data must point to * @maxsize of memory, the wrapped buffer will have the region from @offset and * @size visible. * @@ -296,18 +298,41 @@ public class Buffer */ public this(GstMemoryFlags flags, ubyte[] data, size_t maxsize, size_t offset, void* userData, GDestroyNotify notify) { - auto p = gst_buffer_new_wrapped_full(flags, data.ptr, maxsize, offset, cast(size_t)data.length, userData, notify); + auto __p = gst_buffer_new_wrapped_full(flags, data.ptr, maxsize, offset, cast(size_t)data.length, userData, notify); - if(p is null) + if(__p is null) { throw new ConstructionException("null returned by new_wrapped_full"); } - this(cast(GstBuffer*) p); + this(cast(GstBuffer*) __p); + } + + /** + * Creates and adds a #GstCustomMeta for the desired @name. @name must have + * been successfully registered with gst_meta_register_custom(). + * + * Params: + * name = the registered name of the desired custom meta + * + * Returns: The #GstCustomMeta that was added to the buffer + * + * Since: 1.20 + */ + public CustomMeta addCustomMeta(string name) + { + auto __p = gst_buffer_add_custom_meta(gstBuffer, Str.toStringz(name)); + + if(__p is null) + { + return null; + } + + return ObjectG.getDObject!(CustomMeta)(cast(GstCustomMeta*) __p); } /** - * Add metadata for @info to @buffer using the parameters in @params. + * Adds metadata for @info to @buffer using the parameters in @params. * * Params: * info = a #GstMetaInfo @@ -315,20 +340,20 @@ public class Buffer * * Returns: the metadata for the api in @info on @buffer. */ - public Meta addMeta(GstMetaInfo* info, void* params) + public Meta addMeta(MetaInfo info, void* params) { - auto p = gst_buffer_add_meta(gstBuffer, info, params); + auto __p = gst_buffer_add_meta(gstBuffer, (info is null) ? null : info.getMetaInfoStruct(), params); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Meta)(cast(GstMeta*) p); + return ObjectG.getDObject!(Meta)(cast(GstMeta*) __p); } /** - * Add a #GstParentBufferMeta to @buffer that holds a reference on + * Adds a #GstParentBufferMeta to @buffer that holds a reference on * @ref until the buffer is freed. * * Params: @@ -351,25 +376,24 @@ public class Buffer * information relating to the sample contained in @buffer. This * function takes ownership of @info. * - * Returns: a pointer to the added #GstProtectionMeta if successful; %NULL if - * unsuccessful. + * Returns: a pointer to the added #GstProtectionMeta if successful * * Since: 1.6 */ public ProtectionMeta addProtectionMeta(Structure info) { - auto p = gst_buffer_add_protection_meta(gstBuffer, (info is null) ? null : info.getStructureStruct(true)); + auto __p = gst_buffer_add_protection_meta(gstBuffer, (info is null) ? null : info.getStructureStruct(true)); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(ProtectionMeta)(cast(GstProtectionMeta*) p); + return ObjectG.getDObject!(ProtectionMeta)(cast(GstProtectionMeta*) __p); } /** - * Add a #GstReferenceTimestampMeta to @buffer that holds a @timestamp and + * Adds a #GstReferenceTimestampMeta to @buffer that holds a @timestamp and * optionally @duration based on a specific timestamp @reference. See the * documentation of #GstReferenceTimestampMeta for details. * @@ -388,7 +412,7 @@ public class Buffer } /** - * Append all the memory from @buf2 to @buf1. The result buffer will contain a + * Appends all the memory from @buf2 to @buf1. The result buffer will contain a * concatenation of the memory of @buf1 and @buf2. * * Params: @@ -399,18 +423,18 @@ public class Buffer */ public Buffer append(Buffer buf2) { - auto p = gst_buffer_append(gstBuffer, (buf2 is null) ? null : buf2.getBufferStruct()); + auto __p = gst_buffer_append(gstBuffer, (buf2 is null) ? null : buf2.getBufferStruct(true)); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Buffer)(cast(GstBuffer*) p, true); + return ObjectG.getDObject!(Buffer)(cast(GstBuffer*) __p, true); } /** - * Append the memory block @mem to @buffer. This function takes + * Appends the memory block @mem to @buffer. This function takes * ownership of @mem and thus doesn't increase its refcount. * * This function is identical to gst_buffer_insert_memory() with an index of -1. @@ -421,11 +445,11 @@ public class Buffer */ public void appendMemory(Memory mem) { - gst_buffer_append_memory(gstBuffer, (mem is null) ? null : mem.getMemoryStruct()); + gst_buffer_append_memory(gstBuffer, (mem is null) ? null : mem.getMemoryStruct(true)); } /** - * Append @size bytes at @offset from @buf2 to @buf1. The result buffer will + * Appends @size bytes at @offset from @buf2 to @buf1. The result buffer will * contain a concatenation of the memory of @buf1 and the requested region of * @buf2. * @@ -439,18 +463,39 @@ public class Buffer */ public Buffer appendRegion(Buffer buf2, ptrdiff_t offset, ptrdiff_t size) { - auto p = gst_buffer_append_region(gstBuffer, (buf2 is null) ? null : buf2.getBufferStruct(), offset, size); + auto __p = gst_buffer_append_region(gstBuffer, (buf2 is null) ? null : buf2.getBufferStruct(true), offset, size); + + if(__p is null) + { + return null; + } + + return ObjectG.getDObject!(Buffer)(cast(GstBuffer*) __p, true); + } + + /** + * Creates a copy of the given buffer. This will only copy the buffer's + * data to a newly allocated memory if needed (if the type of memory + * requires it), otherwise the underlying data is just referenced. + * Check gst_buffer_copy_deep() if you want to force the data + * to be copied to newly allocated memory. + * + * Returns: a new copy of @buf. + */ + public Buffer copy() + { + auto __p = gst_buffer_copy(gstBuffer); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Buffer)(cast(GstBuffer*) p, true); + return ObjectG.getDObject!(Buffer)(cast(GstBuffer*) __p, true); } /** - * Create a copy of the given buffer. This will make a newly allocated + * Creates a copy of the given buffer. This will make a newly allocated * copy of the data the source buffer contains. * * Returns: a new copy of @buf. @@ -459,14 +504,14 @@ public class Buffer */ public Buffer copyDeep() { - auto p = gst_buffer_copy_deep(gstBuffer); + auto __p = gst_buffer_copy_deep(gstBuffer); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Buffer)(cast(GstBuffer*) p, true); + return ObjectG.getDObject!(Buffer)(cast(GstBuffer*) __p, true); } /** @@ -500,8 +545,6 @@ public class Buffer * duration and offset end fields are also copied. If not they will be set * to #GST_CLOCK_TIME_NONE and #GST_BUFFER_OFFSET_NONE. * - * MT safe. - * * Params: * flags = the #GstBufferCopyFlags * offset = the offset into parent #GstBuffer at which the new sub-buffer @@ -514,18 +557,18 @@ public class Buffer */ public Buffer copyRegion(GstBufferCopyFlags flags, size_t offset, size_t size) { - auto p = gst_buffer_copy_region(gstBuffer, flags, offset, size); + auto __p = gst_buffer_copy_region(gstBuffer, flags, offset, size); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Buffer)(cast(GstBuffer*) p, true); + return ObjectG.getDObject!(Buffer)(cast(GstBuffer*) __p, true); } /** - * Copy @size bytes starting from @offset in @buffer to @dest. + * Copies @size bytes starting from @offset in @buffer to @dest. * * Params: * offset = the offset to extract @@ -553,7 +596,7 @@ public class Buffer */ public void extractDup(size_t offset, size_t size, out ubyte[] dest) { - ubyte* outdest = null; + ubyte* outdest; size_t destSize; gst_buffer_extract_dup(gstBuffer, offset, size, cast(void**)&outdest, &destSize); @@ -562,7 +605,7 @@ public class Buffer } /** - * Copy @size bytes from @src to @buffer at @offset. + * Copies @size bytes from @src to @buffer at @offset. * * Params: * offset = the offset to fill @@ -577,7 +620,7 @@ public class Buffer } /** - * Find the memory blocks that span @size bytes starting from @offset + * Finds the memory blocks that span @size bytes starting from @offset * in @buffer. * * When this function returns %TRUE, @idx will contain the index of the first @@ -604,10 +647,10 @@ public class Buffer } /** - * Call @func with @user_data for each meta in @buffer. + * Calls @func with @user_data for each meta in @buffer. * * @func can modify the passed meta pointer or its contents. The return value - * of @func define if this function returns or if the remaining metadata items + * of @func defines if this function returns or if the remaining metadata items * in the buffer should be skipped. * * Params: @@ -622,26 +665,47 @@ public class Buffer } /** - * Get all the memory block in @buffer. The memory blocks will be merged + * Gets all the memory blocks in @buffer. The memory blocks will be merged * into one large #GstMemory. * * Returns: a #GstMemory that contains the merged memory. - * Use gst_memory_unref () after usage. */ public Memory getAllMemory() { - auto p = gst_buffer_get_all_memory(gstBuffer); + auto __p = gst_buffer_get_all_memory(gstBuffer); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Memory)(cast(GstMemory*) p, true); + return ObjectG.getDObject!(Memory)(cast(GstMemory*) __p, true); } /** - * Get the #GstBufferFlags flags set on this buffer. + * Finds the first #GstCustomMeta on @buffer for the desired @name. + * + * Params: + * name = the registered name of the custom meta to retrieve. + * + * Returns: the #GstCustomMeta + * + * Since: 1.20 + */ + public CustomMeta getCustomMeta(string name) + { + auto __p = gst_buffer_get_custom_meta(gstBuffer, Str.toStringz(name)); + + if(__p is null) + { + return null; + } + + return ObjectG.getDObject!(CustomMeta)(cast(GstCustomMeta*) __p); + } + + /** + * Gets the #GstBufferFlags flags set on this buffer. * * Returns: the flags set on this buffer. * @@ -653,28 +717,28 @@ public class Buffer } /** - * Get the memory block at index @idx in @buffer. + * Gets the memory block at index @idx in @buffer. * * Params: * idx = an index * * Returns: a #GstMemory that contains the data of the - * memory block at @idx. Use gst_memory_unref () after usage. + * memory block at @idx. */ public Memory getMemory(uint idx) { - auto p = gst_buffer_get_memory(gstBuffer, idx); + auto __p = gst_buffer_get_memory(gstBuffer, idx); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Memory)(cast(GstMemory*) p, true); + return ObjectG.getDObject!(Memory)(cast(GstMemory*) __p, true); } /** - * Get @length memory blocks in @buffer starting at @idx. The memory blocks will + * Gets @length memory blocks in @buffer starting at @idx. The memory blocks will * be merged into one large #GstMemory. * * If @length is -1, all memory starting from @idx is merged. @@ -684,43 +748,42 @@ public class Buffer * length = a length * * Returns: a #GstMemory that contains the merged data of @length - * blocks starting at @idx. Use gst_memory_unref () after usage. + * blocks starting at @idx. */ public Memory getMemoryRange(uint idx, int length) { - auto p = gst_buffer_get_memory_range(gstBuffer, idx, length); + auto __p = gst_buffer_get_memory_range(gstBuffer, idx, length); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Memory)(cast(GstMemory*) p, true); + return ObjectG.getDObject!(Memory)(cast(GstMemory*) __p, true); } /** - * Get the metadata for @api on buffer. When there is no such metadata, %NULL is + * Gets the metadata for @api on buffer. When there is no such metadata, %NULL is * returned. If multiple metadata with the given @api are attached to this * buffer only the first one is returned. To handle multiple metadata with a * given API use gst_buffer_iterate_meta() or gst_buffer_foreach_meta() instead - * and check the meta->info.api member for the API type. + * and check the `meta->info.api` member for the API type. * * Params: * api = the #GType of an API * - * Returns: the metadata for @api on - * @buffer. + * Returns: the metadata for @api on @buffer. */ public Meta getMeta(GType api) { - auto p = gst_buffer_get_meta(gstBuffer, api); + auto __p = gst_buffer_get_meta(gstBuffer, api); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Meta)(cast(GstMeta*) p); + return ObjectG.getDObject!(Meta)(cast(GstMeta*) __p); } /** @@ -737,7 +800,7 @@ public class Buffer } /** - * Find the first #GstReferenceTimestampMeta on @buffer that conforms to + * Finds the first #GstReferenceTimestampMeta on @buffer that conforms to * @reference. Conformance is tested by checking if the meta's reference is a * subset of @reference. * @@ -757,7 +820,7 @@ public class Buffer } /** - * Get the total size of the memory blocks in @buffer. + * Gets the total size of the memory blocks in @buffer. * * Returns: total size of the memory blocks in @buffer. */ @@ -767,7 +830,7 @@ public class Buffer } /** - * Get the total size of the memory blocks in @b. + * Gets the total size of the memory blocks in @buffer. * * When not %NULL, @offset will contain the offset of the data in the * first memory block in @buffer and @maxsize will contain the sum of @@ -787,7 +850,7 @@ public class Buffer } /** - * Get the total size of @length memory blocks stating from @idx in @buffer. + * Gets the total size of @length memory blocks stating from @idx in @buffer. * * When not %NULL, @offset will contain the offset of the data in the * memory block in @buffer at @idx and @maxsize will contain the sum of the size @@ -809,14 +872,23 @@ public class Buffer return gst_buffer_get_sizes_range(gstBuffer, idx, length, &offset, &maxsize); } - /** */ + /** + * Gives the status of a specific flag on a buffer. + * + * Params: + * flags = the #GstBufferFlags flag to check. + * + * Returns: %TRUE if all flags in @flags are found on @buffer. + * + * Since: 1.10 + */ public bool hasFlags(GstBufferFlags flags) { return gst_buffer_has_flags(gstBuffer, flags) != 0; } /** - * Insert the memory block @mem to @buffer at @idx. This function takes ownership + * Inserts the memory block @mem into @buffer at @idx. This function takes ownership * of @mem and thus doesn't increase its refcount. * * Only gst_buffer_get_max_memory() can be added to a buffer. If more memory is @@ -829,11 +901,11 @@ public class Buffer */ public void insertMemory(int idx, Memory mem) { - gst_buffer_insert_memory(gstBuffer, idx, (mem is null) ? null : mem.getMemoryStruct()); + gst_buffer_insert_memory(gstBuffer, idx, (mem is null) ? null : mem.getMemoryStruct(true)); } /** - * Check if all memory blocks in @buffer are writable. + * Checks if all memory blocks in @buffer are writable. * * Note that this function does not check if @buffer is writable, use * gst_buffer_is_writable() to check that if needed. @@ -848,7 +920,7 @@ public class Buffer } /** - * Check if @length memory blocks in @buffer starting from @idx are writable. + * Checks if @length memory blocks in @buffer starting from @idx are writable. * * @length can be -1 to check all the memory blocks after @idx. * @@ -857,7 +929,7 @@ public class Buffer * * Params: * idx = an index - * length = a length should not be 0 + * length = a length, should not be 0 * * Returns: %TRUE if the memory range is writable * @@ -869,7 +941,7 @@ public class Buffer } /** - * Retrieve the next #GstMeta after @current. If @state points + * Retrieves the next #GstMeta after @current. If @state points * to %NULL, the first metadata is returned. * * @state will be updated with an opaque state pointer @@ -882,18 +954,18 @@ public class Buffer */ public Meta iterateMeta(out void* state) { - auto p = gst_buffer_iterate_meta(gstBuffer, &state); + auto __p = gst_buffer_iterate_meta(gstBuffer, &state); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Meta)(cast(GstMeta*) p); + return ObjectG.getDObject!(Meta)(cast(GstMeta*) __p); } /** - * Retrieve the next #GstMeta of type @meta_api_type after the current one + * Retrieves the next #GstMeta of type @meta_api_type after the current one * according to @state. If @state points to %NULL, the first metadata of * type @meta_api_type is returned. * @@ -910,19 +982,18 @@ public class Buffer */ public Meta iterateMetaFiltered(out void* state, GType metaApiType) { - auto p = gst_buffer_iterate_meta_filtered(gstBuffer, &state, metaApiType); + auto __p = gst_buffer_iterate_meta_filtered(gstBuffer, &state, metaApiType); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Meta)(cast(GstMeta*) p); + return ObjectG.getDObject!(Meta)(cast(GstMeta*) __p); } /** - * This function fills @info with the #GstMapInfo of all merged memory - * blocks in @buffer. + * Fills @info with the #GstMapInfo of all merged memory blocks in @buffer. * * @flags describe the desired access of the memory. When @flags is * #GST_MAP_WRITE, @buffer should be writable (as returned from @@ -947,7 +1018,7 @@ public class Buffer } /** - * This function fills @info with the #GstMapInfo of @length merged memory blocks + * Fills @info with the #GstMapInfo of @length merged memory blocks * starting at @idx in @buffer. When @length is -1, all memory blocks starting * from @idx are merged and mapped. * @@ -976,7 +1047,7 @@ public class Buffer } /** - * Compare @size bytes starting from @offset in @buffer with the memory in @mem. + * Compares @size bytes starting from @offset in @buffer with the memory in @mem. * * Params: * offset = the offset in @buffer @@ -990,7 +1061,7 @@ public class Buffer } /** - * Fill @buf with @size bytes with @val starting from @offset. + * Fills @buf with @size bytes with @val starting from @offset. * * Params: * offset = the offset in @buffer @@ -1006,7 +1077,7 @@ public class Buffer } /** - * Get the amount of memory blocks that this buffer has. This amount is never + * Gets the amount of memory blocks that this buffer has. This amount is never * larger than what gst_buffer_get_max_memory() returns. * * Returns: the number of memory blocks this buffer is made of. @@ -1017,7 +1088,7 @@ public class Buffer } /** - * Get the memory block at @idx in @buffer. The memory block stays valid until + * Gets the memory block at @idx in @buffer. The memory block stays valid until * the memory block in @buffer is removed, replaced or merged, typically with * any call that modifies the memory in @buffer. * @@ -1028,18 +1099,18 @@ public class Buffer */ public Memory peekMemory(uint idx) { - auto p = gst_buffer_peek_memory(gstBuffer, idx); + auto __p = gst_buffer_peek_memory(gstBuffer, idx); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Memory)(cast(GstMemory*) p); + return ObjectG.getDObject!(Memory)(cast(GstMemory*) __p); } /** - * Prepend the memory block @mem to @buffer. This function takes + * Prepends the memory block @mem to @buffer. This function takes * ownership of @mem and thus doesn't increase its refcount. * * This function is identical to gst_buffer_insert_memory() with an index of 0. @@ -1050,11 +1121,35 @@ public class Buffer */ public void prependMemory(Memory mem) { - gst_buffer_prepend_memory(gstBuffer, (mem is null) ? null : mem.getMemoryStruct()); + gst_buffer_prepend_memory(gstBuffer, (mem is null) ? null : mem.getMemoryStruct(true)); } + alias doref = ref_; /** - * Remove all the memory blocks in @buffer. + * Increases the refcount of the given buffer by one. + * + * Note that the refcount affects the writability + * of @buf and its metadata, see gst_buffer_is_writable(). + * It is important to note that keeping additional references to + * GstBuffer instances can potentially increase the number + * of `memcpy` operations in a pipeline. + * + * Returns: @buf + */ + public Buffer ref_() + { + auto __p = gst_buffer_ref(gstBuffer); + + if(__p is null) + { + return null; + } + + return ObjectG.getDObject!(Buffer)(cast(GstBuffer*) __p, true); + } + + /** + * Removes all the memory blocks in @buffer. */ public void removeAllMemory() { @@ -1062,7 +1157,7 @@ public class Buffer } /** - * Remove the memory block in @b at index @i. + * Removes the memory block in @b at index @i. * * Params: * idx = an index @@ -1073,7 +1168,7 @@ public class Buffer } /** - * Remove @length memory blocks in @buffer starting from @idx. + * Removes @length memory blocks in @buffer starting from @idx. * * @length can be -1, in which case all memory starting from @idx is removed. * @@ -1087,7 +1182,7 @@ public class Buffer } /** - * Remove the metadata for @meta on @buffer. + * Removes the metadata for @meta on @buffer. * * Params: * meta = a #GstMeta @@ -1108,7 +1203,7 @@ public class Buffer */ public void replaceAllMemory(Memory mem) { - gst_buffer_replace_all_memory(gstBuffer, (mem is null) ? null : mem.getMemoryStruct()); + gst_buffer_replace_all_memory(gstBuffer, (mem is null) ? null : mem.getMemoryStruct(true)); } /** @@ -1120,7 +1215,7 @@ public class Buffer */ public void replaceMemory(uint idx, Memory mem) { - gst_buffer_replace_memory(gstBuffer, idx, (mem is null) ? null : mem.getMemoryStruct()); + gst_buffer_replace_memory(gstBuffer, idx, (mem is null) ? null : mem.getMemoryStruct(true)); } /** @@ -1133,16 +1228,16 @@ public class Buffer * * Params: * idx = an index - * length = a length should not be 0 + * length = a length, should not be 0 * mem = a #GstMemory */ public void replaceMemoryRange(uint idx, int length, Memory mem) { - gst_buffer_replace_memory_range(gstBuffer, idx, length, (mem is null) ? null : mem.getMemoryStruct()); + gst_buffer_replace_memory_range(gstBuffer, idx, length, (mem is null) ? null : mem.getMemoryStruct(true)); } /** - * Set the offset and total size of the memory blocks in @buffer. + * Sets the offset and total size of the memory blocks in @buffer. * * Params: * offset = the offset adjustment @@ -1154,7 +1249,7 @@ public class Buffer } /** - * Set the total size of the @length memory blocks starting at @idx in + * Sets the total size of the @length memory blocks starting at @idx in * @buffer * * Params: @@ -1186,7 +1281,7 @@ public class Buffer } /** - * Set the total size of the memory blocks in @buffer. + * Sets the total size of the memory blocks in @buffer. * * Params: * size = the new size @@ -1197,7 +1292,7 @@ public class Buffer } /** - * Release the memory previously mapped with gst_buffer_map(). + * Releases the memory previously mapped with gst_buffer_map(). * * Params: * info = a #GstMapInfo @@ -1207,6 +1302,15 @@ public class Buffer gst_buffer_unmap(gstBuffer, info); } + /** + * Decreases the refcount of the buffer. If the refcount reaches 0, the buffer + * with the associated metadata and memory will be freed. + */ + public void unref() + { + gst_buffer_unref(gstBuffer); + } + /** * Clears one or more buffer flags. * @@ -1223,7 +1327,7 @@ public class Buffer } /** - * Get the maximum amount of memory blocks that a buffer can hold. This is a + * Gets the maximum amount of memory blocks that a buffer can hold. This is a * compile time constant that can be queried with the function. * * When more memory blocks are added, existing memory blocks will be merged @@ -1237,4 +1341,31 @@ public class Buffer { return gst_buffer_get_max_memory(); } + + /** + * Modifies a pointer to a #GstBuffer to point to a different #GstBuffer. The + * modification is done atomically (so this is useful for ensuring thread safety + * in some cases), and the reference counts are updated appropriately (the old + * buffer is unreffed, the new is reffed). + * + * Either @nbuf or the #GstBuffer pointed to by @obuf may be %NULL. + * + * Params: + * obuf = pointer to a pointer to + * a #GstBuffer to be replaced. + * nbuf = pointer to a #GstBuffer that will + * replace the buffer pointed to by @obuf. + * + * Returns: %TRUE when @obuf was different from @nbuf. + */ + public static bool replace(ref Buffer obuf, Buffer nbuf) + { + GstBuffer* outobuf = obuf.getBufferStruct(); + + auto __p = gst_buffer_replace(&outobuf, (nbuf is null) ? null : nbuf.getBufferStruct()) != 0; + + obuf = ObjectG.getDObject!(Buffer)(outobuf); + + return __p; + } } diff --git a/generated/gstreamer/gstreamer/BufferList.d b/generated/gstreamer/gstreamer/BufferList.d index 15590c77e..39ea82905 100644 --- a/generated/gstreamer/gstreamer/BufferList.d +++ b/generated/gstreamer/gstreamer/BufferList.d @@ -30,13 +30,14 @@ private import gstreamer.Buffer; private import gstreamer.c.functions; public import gstreamer.c.types; public import gstreamerc.gstreamertypes; +private import gtkd.Loader; /** * Buffer lists are an object containing a list of buffers. * * Buffer lists are created with gst_buffer_list_new() and filled with data - * using a gst_buffer_list_insert(). + * using gst_buffer_list_insert(). * * Buffer lists can be pushed on a srcpad with gst_pad_push_list(). This is * interesting when multiple buffers need to be pushed in one go because it @@ -71,6 +72,12 @@ public class BufferList this.ownedRef = ownedRef; } + ~this () + { + if ( Linker.isLoaded(LIBRARY_GSTREAMER) && ownedRef ) + gst_buffer_list_unref(gstBufferList); + } + /** */ public static GType getType() @@ -79,60 +86,52 @@ public class BufferList } /** - * Creates a new, empty #GstBufferList. The caller is responsible for unreffing - * the returned #GstBufferList. - * - * Free-function: gst_buffer_list_unref + * Creates a new, empty #GstBufferList. * - * Returns: the new #GstBufferList. gst_buffer_list_unref() - * after usage. + * Returns: the new #GstBufferList. * * Throws: ConstructionException GTK+ fails to create the object. */ public this() { - auto p = gst_buffer_list_new(); + auto __p = gst_buffer_list_new(); - if(p is null) + if(__p is null) { throw new ConstructionException("null returned by new"); } - this(cast(GstBufferList*) p); + this(cast(GstBufferList*) __p); } /** - * Creates a new, empty #GstBufferList. The caller is responsible for unreffing - * the returned #GstBufferList. The list will have @size space preallocated so - * that memory reallocations can be avoided. - * - * Free-function: gst_buffer_list_unref + * Creates a new, empty #GstBufferList. The list will have @size space + * preallocated so that memory reallocations can be avoided. * * Params: * size = an initial reserved size * - * Returns: the new #GstBufferList. gst_buffer_list_unref() - * after usage. + * Returns: the new #GstBufferList. * * Throws: ConstructionException GTK+ fails to create the object. */ public this(uint size) { - auto p = gst_buffer_list_new_sized(size); + auto __p = gst_buffer_list_new_sized(size); - if(p is null) + if(__p is null) { throw new ConstructionException("null returned by new_sized"); } - this(cast(GstBufferList*) p); + this(cast(GstBufferList*) __p); } /** - * Calculates the size of the data contained in buffer list by adding the + * Calculates the size of the data contained in @list by adding the * size of all buffers. * - * Returns: the size of the data contained in buffer list in bytes. + * Returns: the size of the data contained in @list in bytes. * * Since: 1.14 */ @@ -142,8 +141,27 @@ public class BufferList } /** - * Create a copy of the given buffer list. This will make a newly allocated - * copy of the buffer that the source buffer list contains. + * Creates a shallow copy of the given buffer list. This will make a newly + * allocated copy of the source list with copies of buffer pointers. The + * refcount of buffers pointed to will be increased by one. + * + * Returns: a new copy of @list. + */ + public BufferList copy() + { + auto __p = gst_buffer_list_copy(gstBufferList); + + if(__p is null) + { + return null; + } + + return ObjectG.getDObject!(BufferList)(cast(GstBufferList*) __p, true); + } + + /** + * Creates a copy of the given buffer list. This will make a newly allocated + * copy of the buffers that the source buffer list contains. * * Returns: a new copy of @list. * @@ -151,22 +169,22 @@ public class BufferList */ public BufferList copyDeep() { - auto p = gst_buffer_list_copy_deep(gstBufferList); + auto __p = gst_buffer_list_copy_deep(gstBufferList); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(BufferList)(cast(GstBufferList*) p, true); + return ObjectG.getDObject!(BufferList)(cast(GstBufferList*) __p, true); } alias foreac = foreach_; /** - * Call @func with @data for each buffer in @list. + * Calls @func with @data for each buffer in @list. * * @func can modify the passed buffer pointer or its contents. The return value - * of @func define if this function returns or if the remaining buffers in + * of @func defines if this function returns or if the remaining buffers in * the list should be skipped. * * Params: @@ -182,7 +200,7 @@ public class BufferList } /** - * Get the buffer at @idx. + * Gets the buffer at @idx. * * You must make sure that @idx does not exceed the number of * buffers available. @@ -196,14 +214,14 @@ public class BufferList */ public Buffer get(uint idx) { - auto p = gst_buffer_list_get(gstBufferList, idx); + auto __p = gst_buffer_list_get(gstBufferList, idx); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Buffer)(cast(GstBuffer*) p); + return ObjectG.getDObject!(Buffer)(cast(GstBuffer*) __p); } /** @@ -223,18 +241,18 @@ public class BufferList */ public Buffer getWritable(uint idx) { - auto p = gst_buffer_list_get_writable(gstBufferList, idx); + auto __p = gst_buffer_list_get_writable(gstBufferList, idx); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Buffer)(cast(GstBuffer*) p); + return ObjectG.getDObject!(Buffer)(cast(GstBuffer*) __p); } /** - * Insert @buffer at @idx in @list. Other buffers are moved to make room for + * Inserts @buffer at @idx in @list. Other buffers are moved to make room for * this new buffer. * * A -1 value for @idx will append the buffer at the end. @@ -245,7 +263,7 @@ public class BufferList */ public void insert(int idx, Buffer buffer) { - gst_buffer_list_insert(gstBufferList, idx, (buffer is null) ? null : buffer.getBufferStruct()); + gst_buffer_list_insert(gstBufferList, idx, (buffer is null) ? null : buffer.getBufferStruct(true)); } /** @@ -258,8 +276,31 @@ public class BufferList return gst_buffer_list_length(gstBufferList); } + alias doref = ref_; /** - * Remove @length buffers starting from @idx in @list. The following buffers + * Increases the refcount of the given buffer list by one. + * + * Note that the refcount affects the writability of @list and its data, see + * gst_buffer_list_make_writable(). It is important to note that keeping + * additional references to GstBufferList instances can potentially increase + * the number of memcpy operations in a pipeline. + * + * Returns: @list + */ + public BufferList ref_() + { + auto __p = gst_buffer_list_ref(gstBufferList); + + if(__p is null) + { + return null; + } + + return ObjectG.getDObject!(BufferList)(cast(GstBufferList*) __p, true); + } + + /** + * Removes @length buffers starting from @idx in @list. The following buffers * are moved to close the gap. * * Params: @@ -270,4 +311,68 @@ public class BufferList { gst_buffer_list_remove(gstBufferList, idx, length); } + + /** + * Decreases the refcount of the buffer list. If the refcount reaches 0, the + * buffer list will be freed. + */ + public void unref() + { + gst_buffer_list_unref(gstBufferList); + } + + /** + * Modifies a pointer to a #GstBufferList to point to a different + * #GstBufferList. The modification is done atomically (so this is useful for + * ensuring thread safety in some cases), and the reference counts are updated + * appropriately (the old buffer list is unreffed, the new is reffed). + * + * Either @new_list or the #GstBufferList pointed to by @old_list may be %NULL. + * + * Params: + * oldList = pointer to a pointer to a + * #GstBufferList to be replaced. + * newList = pointer to a #GstBufferList that + * will replace the buffer list pointed to by @old_list. + * + * Returns: %TRUE if @new_list was different from @old_list + * + * Since: 1.16 + */ + public static bool replace(ref BufferList oldList, BufferList newList) + { + GstBufferList* outoldList = oldList.getBufferListStruct(); + + auto __p = gst_buffer_list_replace(&outoldList, (newList is null) ? null : newList.getBufferListStruct()) != 0; + + oldList = ObjectG.getDObject!(BufferList)(outoldList); + + return __p; + } + + /** + * Modifies a pointer to a #GstBufferList to point to a different + * #GstBufferList. This function is similar to gst_buffer_list_replace() except + * that it takes ownership of @new_list. + * + * Params: + * oldList = pointer to a pointer to a #GstBufferList + * to be replaced. + * newList = pointer to a #GstBufferList + * that will replace the bufferlist pointed to by @old_list. + * + * Returns: %TRUE if @new_list was different from @old_list + * + * Since: 1.16 + */ + public static bool take(ref BufferList oldList, BufferList newList) + { + GstBufferList* outoldList = oldList.getBufferListStruct(); + + auto __p = gst_buffer_list_take(&outoldList, (newList is null) ? null : newList.getBufferListStruct(true)) != 0; + + oldList = ObjectG.getDObject!(BufferList)(outoldList); + + return __p; + } } diff --git a/generated/gstreamer/gstreamer/BufferPool.d b/generated/gstreamer/gstreamer/BufferPool.d index d3cdf8d66..b085ba009 100644 --- a/generated/gstreamer/gstreamer/BufferPool.d +++ b/generated/gstreamer/gstreamer/BufferPool.d @@ -27,6 +27,7 @@ module gstreamer.BufferPool; private import glib.ConstructionException; private import glib.MemorySlice; private import glib.Str; +private import glib.c.functions; private import gobject.ObjectG; private import gstreamer.AllocationParams; private import gstreamer.Allocator; @@ -61,7 +62,7 @@ public import gstreamerc.gstreamertypes; * gst_buffer_pool_set_config() updates the configuration in the pool. This can * fail when the configuration structure is not accepted. * - * After the a pool has been configured, it can be activated with + * After the pool has been configured, it can be activated with * gst_buffer_pool_set_active(). This will preallocate the configured resources * in the pool. * @@ -74,9 +75,6 @@ public import gstreamerc.gstreamertypes; * The bufferpool can be deactivated again with gst_buffer_pool_set_active(). * All further gst_buffer_pool_acquire_buffer() calls will return an error. When * all buffers are returned to the pool they will be freed. - * - * Use gst_object_unref() to release the reference to a bufferpool. If the - * refcount of the pool reaches 0, the pool will be freed. */ public class BufferPool : ObjectGst { @@ -122,21 +120,21 @@ public class BufferPool : ObjectGst */ public this() { - auto p = gst_buffer_pool_new(); + auto __p = gst_buffer_pool_new(); - if(p is null) + if(__p is null) { throw new ConstructionException("null returned by new"); } - this(cast(GstBufferPool*) p, true); + this(cast(GstBufferPool*) __p, true); } /** - * Enabled the option in @config. This will instruct the @bufferpool to enable + * Enables the option in @config. This will instruct the @bufferpool to enable * the specified option on the buffers that it allocates. * - * The supported options by @pool can be retrieved with gst_buffer_pool_get_options(). + * The options supported by @pool can be retrieved with gst_buffer_pool_get_options(). * * Params: * config = a #GstBufferPool configuration @@ -148,7 +146,7 @@ public class BufferPool : ObjectGst } /** - * Get the @allocator and @params from @config. + * Gets the @allocator and @params from @config. * * Params: * config = a #GstBufferPool configuration @@ -162,23 +160,23 @@ public class BufferPool : ObjectGst GstAllocator* outallocator = allocator.getAllocatorStruct(); GstAllocationParams* outparams = sliceNew!GstAllocationParams(); - auto p = gst_buffer_pool_config_get_allocator((config is null) ? null : config.getStructureStruct(), &outallocator, outparams) != 0; + auto __p = gst_buffer_pool_config_get_allocator((config is null) ? null : config.getStructureStruct(), &outallocator, outparams) != 0; allocator = ObjectG.getDObject!(Allocator)(outallocator); params = ObjectG.getDObject!(AllocationParams)(outparams, true); - return p; + return __p; } /** - * Parse an available @config and get the option at @index of the options API + * Parses an available @config and gets the option at @index of the options API * array. * * Params: * config = a #GstBufferPool configuration * index = position in the option array to read * - * Returns: a #gchar of the option at @index. + * Returns: the option at @index. */ public static string configGetOption(Structure config, uint index) { @@ -186,7 +184,7 @@ public class BufferPool : ObjectGst } /** - * Get the configuration values from @config. + * Gets the configuration values from @config. * * Params: * config = a #GstBufferPool configuration @@ -201,15 +199,15 @@ public class BufferPool : ObjectGst { GstCaps* outcaps = null; - auto p = gst_buffer_pool_config_get_params((config is null) ? null : config.getStructureStruct(), &outcaps, &size, &minBuffers, &maxBuffers) != 0; + auto __p = gst_buffer_pool_config_get_params((config is null) ? null : config.getStructureStruct(), &outcaps, &size, &minBuffers, &maxBuffers) != 0; caps = ObjectG.getDObject!(Caps)(outcaps); - return p; + return __p; } /** - * Check if @config contains @option. + * Checks if @config contains @option. * * Params: * config = a #GstBufferPool configuration @@ -223,7 +221,7 @@ public class BufferPool : ObjectGst } /** - * Retrieve the number of values currently stored in the options array of the + * Retrieves the number of values currently stored in the options array of the * @config structure. * * Params: @@ -237,7 +235,7 @@ public class BufferPool : ObjectGst } /** - * Set the @allocator and @params on @config. + * Sets the @allocator and @params on @config. * * One of @allocator and @params can be %NULL, but not both. When @allocator * is %NULL, the default allocator of the pool will use the values in @param @@ -261,7 +259,7 @@ public class BufferPool : ObjectGst } /** - * Configure @config with the given parameters. + * Configures @config with the given parameters. * * Params: * config = a #GstBufferPool configuration @@ -276,7 +274,7 @@ public class BufferPool : ObjectGst } /** - * Validate that changes made to @config are still valid in the context of the + * Validates that changes made to @config are still valid in the context of the * expected parameters. This function is a helper that can be used to validate * changes made by a pool to a config when gst_buffer_pool_set_config() * returns %FALSE. This expects that @caps haven't changed and that @@ -302,11 +300,10 @@ public class BufferPool : ObjectGst } /** - * Acquire a buffer from @pool. @buffer should point to a memory location that + * Acquires a buffer from @pool. @buffer should point to a memory location that * can hold a pointer to the new buffer. * - * @params can be %NULL or contain optional parameters to influence the - * allocation. + * @params can contain optional parameters to influence the allocation. * * Params: * buffer = a location for a #GstBuffer @@ -319,35 +316,33 @@ public class BufferPool : ObjectGst { GstBuffer* outbuffer = null; - auto p = gst_buffer_pool_acquire_buffer(gstBufferPool, &outbuffer, params); + auto __p = gst_buffer_pool_acquire_buffer(gstBufferPool, &outbuffer, params); buffer = ObjectG.getDObject!(Buffer)(outbuffer); - return p; + return __p; } /** - * Get a copy of the current configuration of the pool. This configuration - * can either be modified and used for the gst_buffer_pool_set_config() call - * or it must be freed after usage. + * Gets a copy of the current configuration of the pool. This configuration + * can be modified and used for the gst_buffer_pool_set_config() call. * - * Returns: a copy of the current configuration of @pool. use - * gst_structure_free() after usage or gst_buffer_pool_set_config(). + * Returns: a copy of the current configuration of @pool. */ public Structure getConfig() { - auto p = gst_buffer_pool_get_config(gstBufferPool); + auto __p = gst_buffer_pool_get_config(gstBufferPool); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Structure)(cast(GstStructure*) p, true); + return ObjectG.getDObject!(Structure)(cast(GstStructure*) __p, true); } /** - * Get a %NULL terminated array of string with supported bufferpool options for + * Gets a %NULL terminated array of string with supported bufferpool options for * @pool. An option would typically be enabled with * gst_buffer_pool_config_add_option(). * @@ -360,7 +355,7 @@ public class BufferPool : ObjectGst } /** - * Check if the bufferpool supports @option. + * Checks if the bufferpool supports @option. * * Params: * option = an option @@ -373,7 +368,7 @@ public class BufferPool : ObjectGst } /** - * Check if @pool is active. A pool can be activated with the + * Checks if @pool is active. A pool can be activated with the * gst_buffer_pool_set_active() call. * * Returns: %TRUE when the pool is active. @@ -384,7 +379,7 @@ public class BufferPool : ObjectGst } /** - * Release @buffer to @pool. @buffer should have previously been allocated from + * Releases @buffer to @pool. @buffer should have previously been allocated from * @pool with gst_buffer_pool_acquire_buffer(). * * This function is usually called automatically when the last ref on @buffer @@ -395,11 +390,11 @@ public class BufferPool : ObjectGst */ public void releaseBuffer(Buffer buffer) { - gst_buffer_pool_release_buffer(gstBufferPool, (buffer is null) ? null : buffer.getBufferStruct()); + gst_buffer_pool_release_buffer(gstBufferPool, (buffer is null) ? null : buffer.getBufferStruct(true)); } /** - * Control the active state of @pool. When the pool is inactive, new calls to + * Controls the active state of @pool. When the pool is inactive, new calls to * gst_buffer_pool_acquire_buffer() will return with %GST_FLOW_FLUSHING. * * Activating the bufferpool will preallocate all resources in the pool based on @@ -421,10 +416,10 @@ public class BufferPool : ObjectGst } /** - * Set the configuration of the pool. If the pool is already configured, and - * the configuration haven't change, this function will return %TRUE. If the + * Sets the configuration of the pool. If the pool is already configured, and + * the configuration hasn't changed, this function will return %TRUE. If the * pool is active, this method will return %FALSE and active configuration - * will remain. Buffers allocated form this pool must be returned or else this + * will remain. Buffers allocated from this pool must be returned or else this * function will do nothing and return %FALSE. * * @config is a #GstStructure that contains the configuration parameters for @@ -449,7 +444,7 @@ public class BufferPool : ObjectGst } /** - * Enable or disable the flushing state of a @pool without freeing or + * Enables or disables the flushing state of a @pool without freeing or * allocating buffers. * * Params: diff --git a/generated/gstreamer/gstreamer/Bus.d b/generated/gstreamer/gstreamer/Bus.d index c2c243ae8..4c25dae38 100644 --- a/generated/gstreamer/gstreamer/Bus.d +++ b/generated/gstreamer/gstreamer/Bus.d @@ -47,7 +47,7 @@ private import std.algorithm; * is done in another thread than the application. * * The GstBus provides support for #GSource based notifications. This makes it - * possible to handle the delivery in the glib mainloop. + * possible to handle the delivery in the glib #GMainLoop. * * The #GSource callback function gst_bus_async_signal_func() can be used to * convert all bus messages into signal emissions. @@ -177,19 +177,19 @@ public class Bus : ObjectGst */ public this() { - auto p = gst_bus_new(); + auto __p = gst_bus_new(); - if(p is null) + if(__p is null) { throw new ConstructionException("null returned by new"); } - this(cast(GstBus*) p, true); + this(cast(GstBus*) __p, true); } /** * Adds a bus signal watch to the default main context with the default priority - * (%G_PRIORITY_DEFAULT). It is also possible to use a non-default + * ( %G_PRIORITY_DEFAULT ). It is also possible to use a non-default * main context set up using g_main_context_push_thread_default() (before * one had to create a bus watch source and attach it to the desired main * context 'manually'). @@ -200,8 +200,6 @@ public class Bus : ObjectGst * This function may be called multiple times. To clean up, the caller is * responsible for calling gst_bus_remove_signal_watch() as many times as this * function is called. - * - * MT safe. */ public void addSignalWatch() { @@ -216,7 +214,7 @@ public class Bus : ObjectGst * main context 'manually'). * * After calling this statement, the bus will emit the "message" signal for each - * message posted on the bus when the main loop is running. + * message posted on the bus when the #GMainLoop is running. * * This function may be called multiple times. To clean up, the caller is * responsible for calling gst_bus_remove_signal_watch() as many times as this @@ -225,8 +223,6 @@ public class Bus : ObjectGst * There can only be a single bus watch per bus, you must remove any signal * watch before you can set another type of watch. * - * MT safe. - * * Params: * priority = The priority of the watch. */ @@ -246,7 +242,7 @@ public class Bus : ObjectGst * There can only be a single bus watch per bus, you must remove it before you * can set a new one. * - * The bus watch will only work if a GLib main loop is being run. + * The bus watch will only work if a #GMainLoop is being run. * * When @func is called, the message belongs to the caller; if you want to * keep a copy of it, call gst_message_ref() before leaving @func. @@ -258,8 +254,6 @@ public class Bus : ObjectGst * The bus watch will take its own reference to the @bus, so it is safe to unref * @bus using gst_object_unref() after setting the bus watch. * - * MT safe. - * * Params: * priority = The priority of the watch. * func = A function to call when a message is received. @@ -289,22 +283,25 @@ public class Bus : ObjectGst } /** - * Create watch for this bus. The GSource will be dispatched whenever + * Create watch for this bus. The #GSource will be dispatched whenever * a message is on the bus. After the GSource is dispatched, the * message is popped off the bus and unreffed. * - * Returns: a #GSource that can be added to a mainloop. + * As with other watches, there can only be one watch on the bus, including + * any signal watch added with #gst_bus_add_signal_watch. + * + * Returns: a #GSource that can be added to a #GMainLoop. */ public Source createWatch() { - auto p = gst_bus_create_watch(gstBus); + auto __p = gst_bus_create_watch(gstBus); - if(p is null) + if(__p is null) { return null; } - return new Source(cast(GSource*) p, true); + return new Source(cast(GSource*) __p, true); } /** @@ -317,8 +314,6 @@ public class Bus : ObjectGst * "cancelled" by calling this function. In this way the semantics are exactly * the same as gst_object_ref() that which calls enable should also call * disable. - * - * MT safe. */ public void disableSyncMessageEmission() { @@ -336,13 +331,11 @@ public class Bus : ObjectGst * as this function is called. * * While this function looks similar to gst_bus_add_signal_watch(), it is not - * exactly the same -- this function enables synchronous emission of + * exactly the same -- this function enables *synchronous* emission of * signals when messages arrive; gst_bus_add_signal_watch() adds an idle callback - * to pop messages off the bus asynchronously. The sync-message signal + * to pop messages off the bus *asynchronously*. The sync-message signal * comes from the thread of whatever object posted the message; the "message" - * signal is marshalled to the main thread via the main loop. - * - * MT safe. + * signal is marshalled to the main thread via the #GMainLoop. */ public void enableSyncMessageEmission() { @@ -370,13 +363,11 @@ public class Bus : ObjectGst } /** - * Check if there are pending messages on the bus that + * Checks if there are pending messages on the bus that * should be handled. * * Returns: %TRUE if there are messages on the bus to be handled, %FALSE * otherwise. - * - * MT safe. */ public bool havePending() { @@ -384,29 +375,26 @@ public class Bus : ObjectGst } /** - * Peek the message on the top of the bus' queue. The message will remain - * on the bus' message queue. A reference is returned, and needs to be unreffed - * by the caller. + * Peeks the message on the top of the bus' queue. The message will remain + * on the bus' message queue. * * Returns: the #GstMessage that is on the * bus, or %NULL if the bus is empty. - * - * MT safe. */ public Message peek() { - auto p = gst_bus_peek(gstBus); + auto __p = gst_bus_peek(gstBus); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Message)(cast(GstMessage*) p, true); + return ObjectG.getDObject!(Message)(cast(GstMessage*) __p, true); } /** - * Poll the bus for messages. Will block while waiting for messages to come. + * Polls the bus for messages. Will block while waiting for messages to come. * You can specify a maximum time to poll with the @timeout parameter. If * @timeout is negative, this function will block indefinitely. * @@ -420,7 +408,7 @@ public class Bus : ObjectGst * signal handler will see the same messages that this function sees -- neither * will steal messages from the other. * - * This function will run a main loop from the default main context when + * This function will run a #GMainLoop from the default main context when * polling. * * You should never use this function, since it is pure evil. This is @@ -447,46 +435,40 @@ public class Bus : ObjectGst * indefinitely. * * Returns: the message that was received, - * or %NULL if the poll timed out. The message is taken from the - * bus and needs to be unreffed with gst_message_unref() after - * usage. + * or %NULL if the poll timed out. */ public Message poll(GstMessageType events, GstClockTime timeout) { - auto p = gst_bus_poll(gstBus, events, timeout); + auto __p = gst_bus_poll(gstBus, events, timeout); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Message)(cast(GstMessage*) p, true); + return ObjectG.getDObject!(Message)(cast(GstMessage*) __p, true); } /** - * Get a message from the bus. + * Gets a message from the bus. * * Returns: the #GstMessage that is on the - * bus, or %NULL if the bus is empty. The message is taken from - * the bus and needs to be unreffed with gst_message_unref() after - * usage. - * - * MT safe. + * bus, or %NULL if the bus is empty. */ public Message pop() { - auto p = gst_bus_pop(gstBus); + auto __p = gst_bus_pop(gstBus); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Message)(cast(GstMessage*) p, true); + return ObjectG.getDObject!(Message)(cast(GstMessage*) __p, true); } /** - * Get a message matching @type from the bus. Will discard all messages on + * Gets a message matching @type from the bus. Will discard all messages on * the bus that do not match @type and that have been posted before the first * message that does match @type. If there is no message matching @type on * the bus, all messages will be discarded. It is not possible to use message @@ -497,43 +479,36 @@ public class Bus : ObjectGst * * Returns: the next #GstMessage matching * @type that is on the bus, or %NULL if the bus is empty or there - * is no message matching @type. The message is taken from the bus - * and needs to be unreffed with gst_message_unref() after usage. - * - * MT safe. + * is no message matching @type. */ public Message popFiltered(GstMessageType types) { - auto p = gst_bus_pop_filtered(gstBus, types); + auto __p = gst_bus_pop_filtered(gstBus, types); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Message)(cast(GstMessage*) p, true); + return ObjectG.getDObject!(Message)(cast(GstMessage*) __p, true); } /** - * Post a message on the given bus. Ownership of the message + * Posts a message on the given bus. Ownership of the message * is taken by the bus. * * Params: * message = the #GstMessage to post * * Returns: %TRUE if the message could be posted, %FALSE if the bus is flushing. - * - * MT safe. */ public bool post(Message message) { - return gst_bus_post(gstBus, (message is null) ? null : message.getMessageStruct()) != 0; + return gst_bus_post(gstBus, (message is null) ? null : message.getMessageStruct(true)) != 0; } /** * Removes a signal watch previously added with gst_bus_add_signal_watch(). - * - * MT safe. */ public void removeSignalWatch() { @@ -553,12 +528,10 @@ public class Bus : ObjectGst } /** - * If @flushing, flush out and unref any messages queued in the bus. Releases + * If @flushing, flushes out and unrefs any messages queued in the bus. Releases * references to the message origin objects. Will flush future messages until * gst_bus_set_flushing() sets @flushing to %FALSE. * - * MT safe. - * * Params: * flushing = whether or not to flush the bus */ @@ -568,14 +541,14 @@ public class Bus : ObjectGst } /** - * A helper GstBusSyncHandler that can be used to convert all synchronous + * A helper #GstBusSyncHandler that can be used to convert all synchronous * messages into signals. * * Params: * message = the #GstMessage received * data = user data * - * Returns: GST_BUS_PASS + * Returns: %GST_BUS_PASS */ public GstBusSyncReply syncSignalHandler(Message message, void* data) { @@ -583,7 +556,7 @@ public class Bus : ObjectGst } /** - * Get a message from the bus, waiting up to the specified timeout. + * Gets a message from the bus, waiting up to the specified timeout. * * If @timeout is 0, this function behaves like gst_bus_pop(). If @timeout is * #GST_CLOCK_TIME_NONE, this function will block forever until a message was @@ -594,25 +567,22 @@ public class Bus : ObjectGst * * Returns: the #GstMessage that is on the * bus after the specified timeout or %NULL if the bus is empty - * after the timeout expired. The message is taken from the bus - * and needs to be unreffed with gst_message_unref() after usage. - * - * MT safe. + * after the timeout expired. */ public Message timedPop(GstClockTime timeout) { - auto p = gst_bus_timed_pop(gstBus, timeout); + auto __p = gst_bus_timed_pop(gstBus, timeout); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Message)(cast(GstMessage*) p, true); + return ObjectG.getDObject!(Message)(cast(GstMessage*) __p, true); } /** - * Get a message from the bus whose type matches the message type mask @types, + * Gets a message from the bus whose type matches the message type mask @types, * waiting up to the specified timeout (and discarding any messages that do not * match the mask provided). * @@ -621,33 +591,29 @@ public class Bus : ObjectGst * matching message was posted on the bus. * * Params: - * timeout = a timeout in nanoseconds, or GST_CLOCK_TIME_NONE to wait forever - * types = message types to take into account, GST_MESSAGE_ANY for any type + * timeout = a timeout in nanoseconds, or %GST_CLOCK_TIME_NONE to wait forever + * types = message types to take into account, %GST_MESSAGE_ANY for any type * * Returns: a #GstMessage matching the * filter in @types, or %NULL if no matching message was found on - * the bus until the timeout expired. The message is taken from - * the bus and needs to be unreffed with gst_message_unref() after - * usage. - * - * MT safe. + * the bus until the timeout expired. */ public Message timedPopFiltered(GstClockTime timeout, GstMessageType types) { - auto p = gst_bus_timed_pop_filtered(gstBus, timeout, types); + auto __p = gst_bus_timed_pop_filtered(gstBus, timeout, types); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Message)(cast(GstMessage*) p, true); + return ObjectG.getDObject!(Message)(cast(GstMessage*) __p, true); } /** * A message has been posted on the bus. This signal is emitted from a - * GSource added to the mainloop. this signal will only be emitted when - * there is a mainloop running. + * #GSource added to the mainloop. this signal will only be emitted when + * there is a #GMainLoop running. * * Params: * message = the message that has been posted asynchronously diff --git a/generated/gstreamer/gstreamer/Caps.d b/generated/gstreamer/gstreamer/Caps.d index 5e2e0a123..75e297128 100644 --- a/generated/gstreamer/gstreamer/Caps.d +++ b/generated/gstreamer/gstreamer/Caps.d @@ -26,6 +26,7 @@ module gstreamer.Caps; private import glib.ConstructionException; private import glib.Str; +private import glib.c.functions; private import gobject.ObjectG; private import gobject.Value; private import gstreamer.CapsFeatures; @@ -33,6 +34,7 @@ private import gstreamer.Structure; private import gstreamer.c.functions; public import gstreamer.c.types; public import gstreamerc.gstreamertypes; +private import gtkd.Loader; /** @@ -48,7 +50,8 @@ public import gstreamerc.gstreamertypes; * handle or produce at runtime. * * A #GstCaps can be constructed with the following code fragment: - * |[ + * + * ``` C * GstCaps *caps = gst_caps_new_simple ("video/x-raw", * "format", G_TYPE_STRING, "I420", * "framerate", GST_TYPE_FRACTION, 25, 1, @@ -56,18 +59,18 @@ public import gstreamerc.gstreamertypes; * "width", G_TYPE_INT, 320, * "height", G_TYPE_INT, 240, * NULL); - * ]| + * ``` * - * A #GstCaps is fixed when it has no properties with ranges or lists. Use + * A #GstCaps is fixed when it has no fields with ranges or lists. Use * gst_caps_is_fixed() to test for fixed caps. Fixed caps can be used in a * caps event to notify downstream elements of the current media type. * * Various methods exist to work with the media types such as subtracting * or intersecting. * - * Be aware that the current #GstCaps / #GstStructure serialization into string - * has limited support for nested #GstCaps / #GstStructure fields. It can only - * support one level of nesting. Using more levels will lead to unexpected + * Be aware that until 1.20 the #GstCaps / #GstStructure serialization into string + * had limited support for nested #GstCaps / #GstStructure fields. It could only + * support one level of nesting. Using more levels would lead to unexpected * behavior when using serialization features, such as gst_caps_to_string() or * gst_value_serialize() and their counterparts. */ @@ -100,6 +103,12 @@ public class Caps this.ownedRef = ownedRef; } + ~this () + { + if ( Linker.isLoaded(LIBRARY_GSTREAMER) && ownedRef ) + gst_caps_unref(gstCaps); + } + /** * Creates a new GstCaps that indicates that it is compatible with * any media format. @@ -132,7 +141,6 @@ public class Caps * Creates a new #GstCaps that is empty. That is, the returned * #GstCaps contains no media formats. * The #GstCaps is guaranteed to be writable. - * Caller is responsible for unreffing the returned caps. * * Returns: the new #GstCaps * @@ -140,20 +148,19 @@ public class Caps */ public this() { - auto p = gst_caps_new_empty(); + auto __p = gst_caps_new_empty(); - if(p is null) + if(__p is null) { throw new ConstructionException("null returned by new_empty"); } - this(cast(GstCaps*) p); + this(cast(GstCaps*) __p); } /** * Creates a new #GstCaps that contains one #GstStructure with name * @media_type. - * Caller is responsible for unreffing the returned caps. * * Params: * mediaType = the media type of the structure @@ -164,14 +171,14 @@ public class Caps */ public this(string mediaType) { - auto p = gst_caps_new_empty_simple(Str.toStringz(mediaType)); + auto __p = gst_caps_new_empty_simple(Str.toStringz(mediaType)); - if(p is null) + if(__p is null) { throw new ConstructionException("null returned by new_empty_simple"); } - this(cast(GstCaps*) p); + this(cast(GstCaps*) __p); } /** @@ -189,14 +196,14 @@ public class Caps */ public this(Structure structure, void* varArgs) { - auto p = gst_caps_new_full_valist((structure is null) ? null : structure.getStructureStruct(), varArgs); + auto __p = gst_caps_new_full_valist((structure is null) ? null : structure.getStructureStruct(), varArgs); - if(p is null) + if(__p is null) { throw new ConstructionException("null returned by new_full_valist"); } - this(cast(GstCaps*) p); + this(cast(GstCaps*) __p); } /** @@ -209,7 +216,7 @@ public class Caps */ public void append(Caps caps2) { - gst_caps_append(gstCaps, (caps2 is null) ? null : caps2.getCapsStruct()); + gst_caps_append(gstCaps, (caps2 is null) ? null : caps2.getCapsStruct(true)); } /** @@ -261,20 +268,18 @@ public class Caps * followed by a gst_caps_make_writable(). If you only want to hold on to a * reference to the data, you should use gst_caps_ref(). * - * When you are finished with the caps, call gst_caps_unref() on it. - * * Returns: the new #GstCaps */ public Caps copy() { - auto p = gst_caps_copy(gstCaps); + auto __p = gst_caps_copy(gstCaps); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Caps)(cast(GstCaps*) p, true); + return ObjectG.getDObject!(Caps)(cast(GstCaps*) __p, true); } /** @@ -285,17 +290,19 @@ public class Caps * nth = the nth structure to copy * * Returns: the new #GstCaps + * + * Since: 1.16 */ public Caps copyNth(uint nth) { - auto p = gst_caps_copy_nth(gstCaps, nth); + auto __p = gst_caps_copy_nth(gstCaps, nth); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Caps)(cast(GstCaps*) p, true); + return ObjectG.getDObject!(Caps)(cast(GstCaps*) __p, true); } /** @@ -326,18 +333,24 @@ public class Caps * on it so you must not use @caps afterwards unless you keep an additional * reference to it with gst_caps_ref(). * + * Note that it is not guaranteed that the returned caps have exactly one + * structure. If @caps are empty caps then the returned caps will be + * the empty too and contain no structure at all. + * + * Calling this function with ANY caps is not allowed. + * * Returns: the fixated caps */ public Caps fixate() { - auto p = gst_caps_fixate(gstCaps); + auto __p = gst_caps_fixate(gstCaps); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Caps)(cast(GstCaps*) p, true); + return ObjectG.getDObject!(Caps)(cast(GstCaps*) __p, true); } alias foreac = foreach_; @@ -361,21 +374,17 @@ public class Caps } /** - * Finds the features in @caps that has the index @index, and - * returns it. + * Finds the features in @caps at @index, and returns it. * - * WARNING: This function takes a const GstCaps *, but returns a - * non-const GstCapsFeatures *. This is for programming convenience -- - * the caller should be aware that structures inside a constant + * WARNING: This function takes a `const GstCaps *`, but returns a + * non-const `GstCapsFeatures *`. This is for programming convenience -- + * the caller should be aware that features inside a constant * #GstCaps should not be modified. However, if you know the caps * are writable, either because you have just copied them or made * them writable with gst_caps_make_writable(), you may modify the * features returned in the usual way, e.g. with functions like * gst_caps_features_add(). * - * You do not need to free or unref the structure returned, it - * belongs to the #GstCaps. - * * Params: * index = the index of the structure * @@ -386,14 +395,14 @@ public class Caps */ public CapsFeatures getFeatures(uint index) { - auto p = gst_caps_get_features(gstCaps, index); + auto __p = gst_caps_get_features(gstCaps, index); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(CapsFeatures)(cast(GstCapsFeatures*) p); + return ObjectG.getDObject!(CapsFeatures)(cast(GstCapsFeatures*) __p); } /** @@ -407,11 +416,10 @@ public class Caps } /** - * Finds the structure in @caps that has the index @index, and - * returns it. + * Finds the structure in @caps at @index, and returns it. * - * WARNING: This function takes a const GstCaps *, but returns a - * non-const GstStructure *. This is for programming convenience -- + * WARNING: This function takes a `const GstCaps *`, but returns a + * non-const `GstStructure *`. This is for programming convenience -- * the caller should be aware that structures inside a constant * #GstCaps should not be modified. However, if you know the caps * are writable, either because you have just copied them or made @@ -419,9 +427,6 @@ public class Caps * structure returned in the usual way, e.g. with functions like * gst_structure_set(). * - * You do not need to free or unref the structure returned, it - * belongs to the #GstCaps. - * * Params: * index = the index of the structure * @@ -430,14 +435,14 @@ public class Caps */ public Structure getStructure(uint index) { - auto p = gst_caps_get_structure(gstCaps, index); + auto __p = gst_caps_get_structure(gstCaps, index); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Structure)(cast(GstStructure*) p); + return ObjectG.getDObject!(Structure)(cast(GstStructure*) __p); } /** @@ -451,14 +456,14 @@ public class Caps */ public Caps intersect(Caps caps2) { - auto p = gst_caps_intersect(gstCaps, (caps2 is null) ? null : caps2.getCapsStruct()); + auto __p = gst_caps_intersect(gstCaps, (caps2 is null) ? null : caps2.getCapsStruct()); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Caps)(cast(GstCaps*) p, true); + return ObjectG.getDObject!(Caps)(cast(GstCaps*) __p, true); } /** @@ -474,14 +479,14 @@ public class Caps */ public Caps intersectFull(Caps caps2, GstCapsIntersectMode mode) { - auto p = gst_caps_intersect_full(gstCaps, (caps2 is null) ? null : caps2.getCapsStruct(), mode); + auto __p = gst_caps_intersect_full(gstCaps, (caps2 is null) ? null : caps2.getCapsStruct(), mode); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Caps)(cast(GstCaps*) p, true); + return ObjectG.getDObject!(Caps)(cast(GstCaps*) __p, true); } /** @@ -647,18 +652,18 @@ public class Caps */ public Caps merge(Caps caps2) { - auto p = gst_caps_merge(gstCaps, (caps2 is null) ? null : caps2.getCapsStruct()); + auto __p = gst_caps_merge(gstCaps, (caps2 is null) ? null : caps2.getCapsStruct(true)); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Caps)(cast(GstCaps*) p, true); + return ObjectG.getDObject!(Caps)(cast(GstCaps*) __p, true); } /** - * Appends @structure to @caps if its not already expressed by @caps. + * Appends @structure to @caps if it is not already expressed by @caps. * * Params: * structure = the #GstStructure to merge @@ -667,14 +672,14 @@ public class Caps */ public Caps mergeStructure(Structure structure) { - auto p = gst_caps_merge_structure(gstCaps, (structure is null) ? null : structure.getStructureStruct(true)); + auto __p = gst_caps_merge_structure(gstCaps, (structure is null) ? null : structure.getStructureStruct(true)); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Caps)(cast(GstCaps*) p, true); + return ObjectG.getDObject!(Caps)(cast(GstCaps*) __p, true); } /** @@ -690,20 +695,20 @@ public class Caps */ public Caps mergeStructureFull(Structure structure, CapsFeatures features) { - auto p = gst_caps_merge_structure_full(gstCaps, (structure is null) ? null : structure.getStructureStruct(true), (features is null) ? null : features.getCapsFeaturesStruct(true)); + auto __p = gst_caps_merge_structure_full(gstCaps, (structure is null) ? null : structure.getStructureStruct(true), (features is null) ? null : features.getCapsFeaturesStruct(true)); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Caps)(cast(GstCaps*) p, true); + return ObjectG.getDObject!(Caps)(cast(GstCaps*) __p, true); } /** * Returns a #GstCaps that represents the same set of formats as * @caps, but contains no lists. Each list is expanded into separate - * @GstStructures. + * #GstStructure. * * This function takes ownership of @caps and will call gst_caps_make_writable() * on it so you must not use @caps afterwards unless you keep an additional @@ -713,18 +718,43 @@ public class Caps */ public Caps normalize() { - auto p = gst_caps_normalize(gstCaps); + auto __p = gst_caps_normalize(gstCaps); - if(p is null) + if(__p is null) + { + return null; + } + + return ObjectG.getDObject!(Caps)(cast(GstCaps*) __p, true); + } + + alias doref = ref_; + /** + * Adds a reference to a #GstCaps object. + * + * From this point on, until the caller calls gst_caps_unref() or + * gst_caps_make_writable(), it is guaranteed that the caps object will not + * change. This means its structures won't change, etc. To use a #GstCaps + * object, you must always have a refcount on it -- either the one made + * implicitly by e.g. gst_caps_new_simple(), or via taking one explicitly with + * this function. + * + * Returns: the same #GstCaps object. + */ + public Caps ref_() + { + auto __p = gst_caps_ref(gstCaps); + + if(__p is null) { return null; } - return ObjectG.getDObject!(Caps)(cast(GstCaps*) p, true); + return ObjectG.getDObject!(Caps)(cast(GstCaps*) __p, true); } /** - * removes the structure with the given index from the list of structures + * Removes the structure with the given index from the list of structures * contained in @caps. * * Params: @@ -736,7 +766,33 @@ public class Caps } /** - * Sets the #GstCapsFeatures @features for the structure at @index. + * Converts @caps to a string representation. This string representation can be + * converted back to a #GstCaps by gst_caps_from_string(). + * + * This prints the caps in human readable form. + * + * This version of the caps serialization function introduces support for nested + * structures and caps but the resulting strings won't be parsable with + * GStreamer prior to 1.20 unless #GST_SERIALIZE_FLAG_BACKWARD_COMPAT is passed + * as @flag. + * + * Params: + * flags = a #GstSerializeFlags + * + * Returns: a newly allocated string representing @caps. + * + * Since: 1.20 + */ + public string serialize(GstSerializeFlags flags) + { + auto retStr = gst_caps_serialize(gstCaps, flags); + + scope(exit) Str.freeString(retStr); + return Str.toString(retStr); + } + + /** + * Sets the @features for the structure at @index. * * Params: * index = the index of the structure @@ -750,7 +806,7 @@ public class Caps } /** - * Sets the #GstCapsFeatures @features for all the structures of @caps. + * Sets the @features for all the structures of @caps. * * Params: * features = the #GstCapsFeatures to set @@ -805,14 +861,14 @@ public class Caps */ public Caps simplify() { - auto p = gst_caps_simplify(gstCaps); + auto __p = gst_caps_simplify(gstCaps); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Caps)(cast(GstCaps*) p, true); + return ObjectG.getDObject!(Caps)(cast(GstCaps*) __p, true); } /** @@ -827,14 +883,14 @@ public class Caps */ public Structure stealStructure(uint index) { - auto p = gst_caps_steal_structure(gstCaps, index); + auto __p = gst_caps_steal_structure(gstCaps, index); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Structure)(cast(GstStructure*) p, true); + return ObjectG.getDObject!(Structure)(cast(GstStructure*) __p, true); } /** @@ -849,14 +905,14 @@ public class Caps */ public Caps subtract(Caps subtrahend) { - auto p = gst_caps_subtract(gstCaps, (subtrahend is null) ? null : subtrahend.getCapsStruct()); + auto __p = gst_caps_subtract(gstCaps, (subtrahend is null) ? null : subtrahend.getCapsStruct()); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Caps)(cast(GstCaps*) p, true); + return ObjectG.getDObject!(Caps)(cast(GstCaps*) __p, true); } /** @@ -864,13 +920,15 @@ public class Caps * can be converted back to a #GstCaps by gst_caps_from_string(). * * For debugging purposes its easier to do something like this: - * |[ + * + * ``` C * GST_LOG ("caps are %" GST_PTR_FORMAT, caps); - * ]| + * ``` + * * This prints the caps in human readable form. * - * The current implementation of serialization will lead to unexpected results - * when there are nested #GstCaps / #GstStructure deeper than one level. + * The implementation of serialization up to 1.20 would lead to unexpected results + * when there were nested #GstCaps / #GstStructure deeper than one level. * * Returns: a newly allocated string representing @caps. */ @@ -883,32 +941,45 @@ public class Caps } /** - * Discard all but the first structure from @caps. Useful when + * Discards all but the first structure from @caps. Useful when * fixating. * * This function takes ownership of @caps and will call gst_caps_make_writable() * on it if necessary, so you must not use @caps afterwards unless you keep an * additional reference to it with gst_caps_ref(). * + * Note that it is not guaranteed that the returned caps have exactly one + * structure. If @caps is any or empty caps then the returned caps will be + * the same and contain no structure at all. + * * Returns: truncated caps */ public Caps truncate() { - auto p = gst_caps_truncate(gstCaps); + auto __p = gst_caps_truncate(gstCaps); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Caps)(cast(GstCaps*) p, true); + return ObjectG.getDObject!(Caps)(cast(GstCaps*) __p, true); + } + + /** + * Unrefs a #GstCaps and frees all its structures and the + * structures' values when the refcount reaches 0. + */ + public void unref() + { + gst_caps_unref(gstCaps); } /** * Converts @caps from a string representation. * - * The current implementation of serialization will lead to unexpected results - * when there are nested #GstCaps / #GstStructure deeper than one level. + * The implementation of serialization up to 1.20 would lead to unexpected results + * when there were nested #GstCaps / #GstStructure deeper than one level. * * Params: * string_ = a string to convert to #GstCaps @@ -917,13 +988,64 @@ public class Caps */ public static Caps fromString(string string_) { - auto p = gst_caps_from_string(Str.toStringz(string_)); + auto __p = gst_caps_from_string(Str.toStringz(string_)); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Caps)(cast(GstCaps*) p, true); + return ObjectG.getDObject!(Caps)(cast(GstCaps*) __p, true); + } + + /** + * Modifies a pointer to a #GstCaps to point to a different #GstCaps. The + * modification is done atomically (so this is useful for ensuring thread safety + * in some cases), and the reference counts are updated appropriately (the old + * caps is unreffed, the new is reffed). + * + * Either @new_caps or the #GstCaps pointed to by @old_caps may be %NULL. + * + * Params: + * oldCaps = pointer to a pointer + * to a #GstCaps to be replaced. + * newCaps = pointer to a #GstCaps that will + * replace the caps pointed to by @old_caps. + * + * Returns: %TRUE if @new_caps was different from @old_caps + */ + public static bool replace(ref Caps oldCaps, Caps newCaps) + { + GstCaps* outoldCaps = oldCaps.getCapsStruct(); + + auto __p = gst_caps_replace(&outoldCaps, (newCaps is null) ? null : newCaps.getCapsStruct()) != 0; + + oldCaps = ObjectG.getDObject!(Caps)(outoldCaps); + + return __p; + } + + /** + * Modifies a pointer to a #GstCaps to point to a different #GstCaps. This + * function is similar to gst_caps_replace() except that it takes ownership + * of @new_caps. + * + * Params: + * oldCaps = pointer to a pointer to a #GstCaps to be + * replaced. + * newCaps = pointer to a #GstCaps that will + * replace the caps pointed to by @old_caps. + * + * Returns: %TRUE if @new_caps was different from @old_caps + */ + public static bool take(ref Caps oldCaps, Caps newCaps) + { + GstCaps* outoldCaps = oldCaps.getCapsStruct(); + + auto __p = gst_caps_take(&outoldCaps, (newCaps is null) ? null : newCaps.getCapsStruct(true)) != 0; + + oldCaps = ObjectG.getDObject!(Caps)(outoldCaps); + + return __p; } } diff --git a/generated/gstreamer/gstreamer/CapsFeatures.d b/generated/gstreamer/gstreamer/CapsFeatures.d index 57824ae19..e92fa4fe7 100644 --- a/generated/gstreamer/gstreamer/CapsFeatures.d +++ b/generated/gstreamer/gstreamer/CapsFeatures.d @@ -26,6 +26,7 @@ module gstreamer.CapsFeatures; private import glib.ConstructionException; private import glib.Str; +private import glib.c.functions; private import gobject.ObjectG; private import gstreamer.c.functions; public import gstreamer.c.types; @@ -50,8 +51,8 @@ private import gtkd.Loader; * * Examples for caps features would be the requirement of a specific #GstMemory * types or the requirement of having a specific #GstMeta on the buffer. Features - * are given as a string of the format "memory:GstMemoryTypeName" or - * "meta:GstMetaAPIName". + * are given as a string of the format `memory:GstMemoryTypeName` or + * `meta:GstMetaAPIName`. * * Since: 1.2 */ @@ -127,8 +128,6 @@ public class CapsFeatures /** * Creates a new, empty #GstCapsFeatures. * - * Free-function: gst_caps_features_free - * * Returns: a new, empty #GstCapsFeatures * * Since: 1.2 @@ -137,21 +136,19 @@ public class CapsFeatures */ public this() { - auto p = gst_caps_features_new_empty(); + auto __p = gst_caps_features_new_empty(); - if(p is null) + if(__p is null) { throw new ConstructionException("null returned by new_empty"); } - this(cast(GstCapsFeatures*) p); + this(cast(GstCapsFeatures*) __p); } /** * Creates a new #GstCapsFeatures with the given features. * - * Free-function: gst_caps_features_free - * * Params: * feature1 = name of first feature to set * varargs = variable argument list @@ -164,20 +161,42 @@ public class CapsFeatures */ public this(GQuark feature1, void* varargs) { - auto p = gst_caps_features_new_id_valist(feature1, varargs); + auto __p = gst_caps_features_new_id_valist(feature1, varargs); - if(p is null) + if(__p is null) { throw new ConstructionException("null returned by new_id_valist"); } - this(cast(GstCapsFeatures*) p); + this(cast(GstCapsFeatures*) __p); } /** - * Creates a new #GstCapsFeatures with the given features. + * Creates a new #GstCapsFeatures with a single feature. * - * Free-function: gst_caps_features_free + * Params: + * feature = The feature + * + * Returns: a new #GstCapsFeatures + * + * Since: 1.20 + * + * Throws: ConstructionException GTK+ fails to create the object. + */ + public this(string feature) + { + auto __p = gst_caps_features_new_single(Str.toStringz(feature)); + + if(__p is null) + { + throw new ConstructionException("null returned by new_single"); + } + + this(cast(GstCapsFeatures*) __p); + } + + /** + * Creates a new #GstCapsFeatures with the given features. * * Params: * feature1 = name of first feature to set @@ -191,14 +210,14 @@ public class CapsFeatures */ public this(string feature1, void* varargs) { - auto p = gst_caps_features_new_valist(Str.toStringz(feature1), varargs); + auto __p = gst_caps_features_new_valist(Str.toStringz(feature1), varargs); - if(p is null) + if(__p is null) { throw new ConstructionException("null returned by new_valist"); } - this(cast(GstCapsFeatures*) p); + this(cast(GstCapsFeatures*) __p); } /** @@ -228,7 +247,7 @@ public class CapsFeatures } /** - * Check if @features contains @feature. + * Checks if @features contains @feature. * * Params: * feature = a feature @@ -243,7 +262,7 @@ public class CapsFeatures } /** - * Check if @features contains @feature. + * Checks if @features contains @feature. * * Params: * feature = a feature @@ -260,22 +279,20 @@ public class CapsFeatures /** * Duplicates a #GstCapsFeatures and all its values. * - * Free-function: gst_caps_features_free - * * Returns: a new #GstCapsFeatures. * * Since: 1.2 */ public CapsFeatures copy() { - auto p = gst_caps_features_copy(gstCapsFeatures); + auto __p = gst_caps_features_copy(gstCapsFeatures); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(CapsFeatures)(cast(GstCapsFeatures*) p, true); + return ObjectG.getDObject!(CapsFeatures)(cast(GstCapsFeatures*) __p, true); } /** @@ -333,7 +350,7 @@ public class CapsFeatures } /** - * Check if @features is %GST_CAPS_FEATURES_ANY. + * Checks if @features is %GST_CAPS_FEATURES_ANY. * * Returns: %TRUE if @features is %GST_CAPS_FEATURES_ANY. * @@ -345,7 +362,7 @@ public class CapsFeatures } /** - * Check if @features1 and @features2 are equal. + * Checks if @features1 and @features2 are equal. * * Params: * features2 = a #GstCapsFeatures. @@ -389,7 +406,7 @@ public class CapsFeatures * Sets the parent_refcount field of #GstCapsFeatures. This field is used to * determine whether a caps features is mutable or not. This function should only be * called by code implementing parent objects of #GstCapsFeatures, as described in - * the MT Refcounting section of the design documents. + * [the MT refcounting design document](additional/design/MT-refcounting.md). * * Params: * refcount = a pointer to the parent's refcount @@ -407,15 +424,14 @@ public class CapsFeatures * Converts @features to a human-readable string representation. * * For debugging purposes its easier to do something like this: - * |[ + * + * ``` C * GST_LOG ("features is %" GST_PTR_FORMAT, features); - * ]| - * This prints the features in human readable form. + * ``` * - * Free-function: g_free + * This prints the features in human readable form. * * Returns: a pointer to string allocated by g_malloc(). - * g_free() after usage. * * Since: 1.2 */ @@ -430,26 +446,23 @@ public class CapsFeatures /** * Creates a #GstCapsFeatures from a string representation. * - * Free-function: gst_caps_features_free - * * Params: * features = a string representation of a #GstCapsFeatures. * * Returns: a new #GstCapsFeatures or - * %NULL when the string could not be parsed. Free with - * gst_caps_features_free() after use. + * %NULL when the string could not be parsed. * * Since: 1.2 */ public static CapsFeatures fromString(string features) { - auto p = gst_caps_features_from_string(Str.toStringz(features)); + auto __p = gst_caps_features_from_string(Str.toStringz(features)); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(CapsFeatures)(cast(GstCapsFeatures*) p, true); + return ObjectG.getDObject!(CapsFeatures)(cast(GstCapsFeatures*) __p, true); } } diff --git a/generated/gstreamer/gstreamer/ChildProxyIF.d b/generated/gstreamer/gstreamer/ChildProxyIF.d index 8c62b981c..ffc24978c 100644 --- a/generated/gstreamer/gstreamer/ChildProxyIF.d +++ b/generated/gstreamer/gstreamer/ChildProxyIF.d @@ -47,9 +47,9 @@ private import std.algorithm; * By implementing this interface the child properties can be accessed from the * parent element by using gst_child_proxy_get() and gst_child_proxy_set(). * - * Property names are written as "child-name::property-name". The whole naming - * scheme is recursive. Thus "child1::child2::property" is valid too, if - * "child1" and "child2" implement the #GstChildProxy interface. + * Property names are written as `child-name::property-name`. The whole naming + * scheme is recursive. Thus `child1::child2::property` is valid too, if + * `child1` and `child2` implement the #GstChildProxy interface. */ public interface ChildProxyIF{ /** Get the main Gtk struct */ @@ -66,7 +66,7 @@ public interface ChildProxyIF{ } /** - * Emits the "child-added" signal. + * Emits the #GstChildProxy::child-added signal. * * Params: * child = the newly added child @@ -75,7 +75,7 @@ public interface ChildProxyIF{ public void childAdded(ObjectG child, string name); /** - * Emits the "child-removed" signal. + * Emits the #GstChildProxy::child-removed signal. * * Params: * child = the removed child @@ -90,9 +90,7 @@ public interface ChildProxyIF{ * index = the child's position in the child list * * Returns: the child object or %NULL if - * not found (index too high). Unref after usage. - * - * MT safe. + * not found (index too high). */ public ObjectG getChildByIndex(uint index); @@ -107,9 +105,7 @@ public interface ChildProxyIF{ * name = the child's name * * Returns: the child object or %NULL if - * not found. Unref after usage. - * - * MT safe. + * not found. */ public ObjectG getChildByName(string name); @@ -117,8 +113,6 @@ public interface ChildProxyIF{ * Gets the number of child objects this parent contains. * * Returns: the number of child objects - * - * MT safe. */ public uint getChildrenCount(); @@ -144,8 +138,6 @@ public interface ChildProxyIF{ /** * Looks up which object and #GParamSpec would be effected by the given @name. * - * MT safe. - * * Params: * name = name of the property to look up * target = pointer to a #GObject that @@ -155,7 +147,7 @@ public interface ChildProxyIF{ * * 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. + * usage. For plain #GObject @target is the same as @object. */ public bool lookup(string name, out ObjectG target, out ParamSpec pspec); diff --git a/generated/gstreamer/gstreamer/ChildProxyT.d b/generated/gstreamer/gstreamer/ChildProxyT.d index 176a2dddf..8314615b6 100644 --- a/generated/gstreamer/gstreamer/ChildProxyT.d +++ b/generated/gstreamer/gstreamer/ChildProxyT.d @@ -47,9 +47,9 @@ public import std.algorithm; * By implementing this interface the child properties can be accessed from the * parent element by using gst_child_proxy_get() and gst_child_proxy_set(). * - * Property names are written as "child-name::property-name". The whole naming - * scheme is recursive. Thus "child1::child2::property" is valid too, if - * "child1" and "child2" implement the #GstChildProxy interface. + * Property names are written as `child-name::property-name`. The whole naming + * scheme is recursive. Thus `child1::child2::property` is valid too, if + * `child1` and `child2` implement the #GstChildProxy interface. */ public template ChildProxyT(TStruct) { @@ -63,7 +63,7 @@ public template ChildProxyT(TStruct) /** - * Emits the "child-added" signal. + * Emits the #GstChildProxy::child-added signal. * * Params: * child = the newly added child @@ -75,7 +75,7 @@ public template ChildProxyT(TStruct) } /** - * Emits the "child-removed" signal. + * Emits the #GstChildProxy::child-removed signal. * * Params: * child = the removed child @@ -93,20 +93,18 @@ public template ChildProxyT(TStruct) * index = the child's position in the child list * * Returns: the child object or %NULL if - * not found (index too high). Unref after usage. - * - * MT safe. + * not found (index too high). */ public ObjectG getChildByIndex(uint index) { - auto p = gst_child_proxy_get_child_by_index(getChildProxyStruct(), index); + auto __p = gst_child_proxy_get_child_by_index(getChildProxyStruct(), index); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(ObjectG)(cast(GObject*) p, true); + return ObjectG.getDObject!(ObjectG)(cast(GObject*) __p, true); } /** @@ -120,28 +118,24 @@ public template ChildProxyT(TStruct) * name = the child's name * * Returns: the child object or %NULL if - * not found. Unref after usage. - * - * MT safe. + * not found. */ public ObjectG getChildByName(string name) { - auto p = gst_child_proxy_get_child_by_name(getChildProxyStruct(), Str.toStringz(name)); + auto __p = gst_child_proxy_get_child_by_name(getChildProxyStruct(), Str.toStringz(name)); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(ObjectG)(cast(GObject*) p, true); + return ObjectG.getDObject!(ObjectG)(cast(GObject*) __p, true); } /** * Gets the number of child objects this parent contains. * * Returns: the number of child objects - * - * MT safe. */ public uint getChildrenCount() { @@ -180,8 +174,6 @@ public template ChildProxyT(TStruct) /** * Looks up which object and #GParamSpec would be effected by the given @name. * - * MT safe. - * * Params: * name = name of the property to look up * target = pointer to a #GObject that @@ -191,19 +183,19 @@ public template ChildProxyT(TStruct) * * 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. + * usage. For plain #GObject @target is the same as @object. */ public bool lookup(string name, out ObjectG target, out ParamSpec pspec) { GObject* outtarget = null; GParamSpec* outpspec = null; - auto p = gst_child_proxy_lookup(getChildProxyStruct(), Str.toStringz(name), &outtarget, &outpspec) != 0; + auto __p = gst_child_proxy_lookup(getChildProxyStruct(), Str.toStringz(name), &outtarget, &outpspec) != 0; target = ObjectG.getDObject!(ObjectG)(outtarget); pspec = ObjectG.getDObject!(ParamSpec)(outpspec); - return p; + return __p; } /** diff --git a/generated/gstreamer/gstreamer/Clock.d b/generated/gstreamer/gstreamer/Clock.d index 9bdf6df47..364d38309 100644 --- a/generated/gstreamer/gstreamer/Clock.d +++ b/generated/gstreamer/gstreamer/Clock.d @@ -47,7 +47,7 @@ private import std.algorithm; * * The pipeline uses the clock to calculate the running time. Usually all * renderers synchronize to the global clock using the buffer timestamps, the - * newsegment events and the element's base time, see #GstPipeline. + * #GST_EVENT_SEGMENT events and the element's base time, see #GstPipeline. * * A clock implementation can support periodic and single shot clock * notifications both synchronous and asynchronous. @@ -56,14 +56,14 @@ private import std.algorithm; * notification using gst_clock_new_single_shot_id() or * gst_clock_new_periodic_id(). * - * To perform a blocking wait for the specific time of the #GstClockID use the + * To perform a blocking wait for the specific time of the #GstClockID use * gst_clock_id_wait(). To receive a callback when the specific time is reached * in the clock use gst_clock_id_wait_async(). Both these calls can be * interrupted with the gst_clock_id_unschedule() call. If the blocking wait is * unscheduled a return value of #GST_CLOCK_UNSCHEDULED is returned. * * Periodic callbacks scheduled async will be repeatedly called automatically - * until it is unscheduled. To schedule a sync periodic callback, + * until they are unscheduled. To schedule a sync periodic callback, * gst_clock_id_wait() should be called repeatedly. * * The async callbacks can happen from any thread, either provided by the core @@ -91,7 +91,7 @@ private import std.algorithm; * the clock is not PLAYING. * * When a clock has the #GST_CLOCK_FLAG_CAN_SET_MASTER flag set, it can be - * slaved to another #GstClock with the gst_clock_set_master(). The clock will + * slaved to another #GstClock with gst_clock_set_master(). The clock will * then automatically be synchronized to this master clock by repeatedly * sampling the master clock and the slave clock and recalibrating the slave * clock with gst_clock_set_calibration(). This feature is mostly useful for @@ -150,9 +150,7 @@ public class Clock : ObjectGst * id1 = A #GstClockID * id2 = A #GstClockID to compare with * - * Returns: negative value if a < b; zero if a = b; positive value if a > b - * - * MT safe. + * Returns: negative value if `a < b`; zero if `a = b`; positive value if `a > b` */ public static int idCompareFunc(void* id1, void* id2) { @@ -166,33 +164,29 @@ public class Clock : ObjectGst * id = a #GstClockID * * Returns: a #GstClock or %NULL when the - * underlying clock has been freed. Unref after usage. - * - * MT safe. + * underlying clock has been freed. * * Since: 1.16 */ public static Clock idGetClock(GstClockID id) { - auto p = gst_clock_id_get_clock(id); + auto __p = gst_clock_id_get_clock(id); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Clock)(cast(GstClock*) p, true); + return ObjectG.getDObject!(Clock)(cast(GstClock*) __p, true); } /** - * Get the time of the clock ID + * Gets the time of the clock ID * * Params: * id = The #GstClockID to query * * Returns: the time of the given clock id. - * - * MT safe. */ public static GstClockTime idGetTime(GstClockID id) { @@ -200,14 +194,12 @@ public class Clock : ObjectGst } /** - * Increase the refcount of given @id. + * Increases the refcount of given @id. * * Params: * id = The #GstClockID to ref * * Returns: The same #GstClockID with increased refcount. - * - * MT safe. */ public static GstClockID idRef(GstClockID id) { @@ -215,11 +207,9 @@ public class Clock : ObjectGst } /** - * Unref given @id. When the refcount reaches 0 the + * Unrefs given @id. When the refcount reaches 0 the * #GstClockID will be freed. * - * MT safe. - * * Params: * id = The #GstClockID to unref */ @@ -229,13 +219,11 @@ public class Clock : ObjectGst } /** - * Cancel an outstanding request with @id. This can either + * Cancels an outstanding request with @id. This can either * be an outstanding async notification or a pending sync notification. * After this call, @id cannot be used anymore to receive sync or * async notifications, you need to create a new #GstClockID. * - * MT safe. - * * Params: * id = The id to unschedule */ @@ -256,8 +244,6 @@ public class Clock : ObjectGst * * Returns: whether the clock @id uses the same underlying #GstClock @clock. * - * MT safe. - * * Since: 1.16 */ public static bool idUsesClock(GstClockID id, Clock clock) @@ -266,7 +252,7 @@ public class Clock : ObjectGst } /** - * Perform a blocking wait on @id. + * Performs a blocking wait on @id. * @id should have been created with gst_clock_new_single_shot_id() * or gst_clock_new_periodic_id() and should not have been unscheduled * with a call to gst_clock_id_unschedule(). @@ -289,8 +275,6 @@ public class Clock : ObjectGst * if the current clock time is past the time of @id, #GST_CLOCK_OK if * @id was scheduled in time. #GST_CLOCK_UNSCHEDULED if @id was * unscheduled with gst_clock_id_unschedule(). - * - * MT safe. */ public static GstClockReturn idWait(GstClockID id, out GstClockTimeDiff jitter) { @@ -298,10 +282,10 @@ public class Clock : ObjectGst } /** - * Register a callback on the given #GstClockID @id with the given + * Registers a callback on the given #GstClockID @id with the given * function and user_data. When passing a #GstClockID with an invalid * time to this function, the callback will be called immediately - * with a time set to GST_CLOCK_TIME_NONE. The callback will + * with a time set to %GST_CLOCK_TIME_NONE. The callback will * be called when the time of @id has been reached. * * The callback @func can be invoked from any thread, either provided by the @@ -314,8 +298,6 @@ public class Clock : ObjectGst * destroyData = #GDestroyNotify for user_data * * Returns: the result of the non blocking wait. - * - * MT safe. */ public static GstClockReturn idWaitAsync(GstClockID id, GstClockCallback func, void* userData, GDestroyNotify destroyData) { @@ -341,8 +323,6 @@ public class Clock : ObjectGst * * Returns: %TRUE if enough observations were added to run the * regression algorithm. - * - * MT safe. */ public bool addObservation(GstClockTime slave, GstClockTime master, out double rSquared) { @@ -366,6 +346,9 @@ public class Clock : ObjectGst * rateNum = a location to store the rate numerator * rateDenom = a location to store the rate denominator * + * Returns: %TRUE if enough observations were added to run the + * regression algorithm. + * * Since: 1.6 */ public bool addObservationUnapplied(GstClockTime slave, GstClockTime master, out double rSquared, out GstClockTime internal, out GstClockTime external, out GstClockTime rateNum, out GstClockTime rateDenom) @@ -424,8 +407,6 @@ public class Clock : ObjectGst * @internal, @external, @rate_num, and @rate_denom can be left %NULL if the * caller is not interested in the values. * - * MT safe. - * * Params: * internal = a location to store the internal time * external = a location to store the external time @@ -441,10 +422,8 @@ public class Clock : ObjectGst * Gets the current internal time of the given clock. The time is returned * unadjusted for the offset and the rate. * - * Returns: the internal time of the clock. Or GST_CLOCK_TIME_NONE when + * Returns: the internal time of the clock. Or %GST_CLOCK_TIME_NONE when * given invalid input. - * - * MT safe. */ public GstClockTime getInternalTime() { @@ -452,34 +431,29 @@ public class Clock : ObjectGst } /** - * Get the master clock that @clock is slaved to or %NULL when the clock is + * Gets the master clock that @clock is slaved to or %NULL when the clock is * not slaved to any master clock. * * Returns: a master #GstClock or %NULL - * when this clock is not slaved to a master clock. Unref after - * usage. - * - * MT safe. + * when this clock is not slaved to a master clock. */ public Clock getMaster() { - auto p = gst_clock_get_master(gstClock); + auto __p = gst_clock_get_master(gstClock); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Clock)(cast(GstClock*) p, true); + return ObjectG.getDObject!(Clock)(cast(GstClock*) __p, true); } /** - * Get the accuracy of the clock. The accuracy of the clock is the granularity + * Gets the accuracy of the clock. The accuracy of the clock is the granularity * of the values returned by gst_clock_get_time(). * * Returns: the resolution of the clock in units of #GstClockTime. - * - * MT safe. */ public GstClockTime getResolution() { @@ -491,10 +465,8 @@ public class Clock : ObjectGst * monotonically increasing and adjusted according to the current * offset and rate. * - * Returns: the time of the clock. Or GST_CLOCK_TIME_NONE when + * Returns: the time of the clock. Or %GST_CLOCK_TIME_NONE when * given invalid input. - * - * MT safe. */ public GstClockTime getTime() { @@ -502,7 +474,7 @@ public class Clock : ObjectGst } /** - * Get the amount of time that master and slave clocks are sampled. + * Gets the amount of time that master and slave clocks are sampled. * * Returns: the interval between samples. */ @@ -512,9 +484,8 @@ public class Clock : ObjectGst } /** - * Checks if the clock is currently synced. - * - * This returns if GST_CLOCK_FLAG_NEEDS_STARTUP_SYNC is not set on the clock. + * Checks if the clock is currently synced, by looking at whether + * %GST_CLOCK_FLAG_NEEDS_STARTUP_SYNC is set. * * Returns: %TRUE if the clock is currently synced * @@ -526,12 +497,9 @@ public class Clock : ObjectGst } /** - * Get an ID from @clock to trigger a periodic notification. + * Gets an ID from @clock to trigger a periodic notification. * The periodic notifications will start at time @start_time and - * will then be fired with the given @interval. @id should be unreffed - * after usage. - * - * Free-function: gst_clock_id_unref + * will then be fired with the given @interval. * * Params: * startTime = the requested start time @@ -539,8 +507,6 @@ public class Clock : ObjectGst * * Returns: a #GstClockID that can be used to request the * time notification. - * - * MT safe. */ public GstClockID newPeriodicId(GstClockTime startTime, GstClockTime interval) { @@ -548,19 +514,14 @@ public class Clock : ObjectGst } /** - * Get a #GstClockID from @clock to trigger a single shot - * notification at the requested time. The single shot id should be - * unreffed after usage. - * - * Free-function: gst_clock_id_unref + * Gets a #GstClockID from @clock to trigger a single shot + * notification at the requested time. * * Params: * time = the requested time * * Returns: a #GstClockID that can be used to request the * time notification. - * - * MT safe. */ public GstClockID newSingleShotId(GstClockTime time) { @@ -596,9 +557,9 @@ public class Clock : ObjectGst * Subsequent calls to gst_clock_get_time() will return clock times computed as * follows: * - * |[ + * ``` C * time = (internal_time - internal) * rate_num / rate_denom + external - * ]| + * ``` * * This formula is implemented in gst_clock_adjust_unlocked(). Of course, it * tries to do the integer arithmetic as precisely as possible. @@ -607,8 +568,6 @@ public class Clock : ObjectGst * move the clock backwards, gst_clock_get_time() will report the previous value * until the clock catches up. * - * MT safe. - * * Params: * internal = a reference internal time * external = a reference external time @@ -622,7 +581,7 @@ public class Clock : ObjectGst } /** - * Set @master as the master clock for @clock. @clock will be automatically + * Sets @master as the master clock for @clock. @clock will be automatically * calibrated so that gst_clock_get_time() reports the same time as the * master clock. * @@ -639,8 +598,6 @@ public class Clock : ObjectGst * Returns: %TRUE if the clock is capable of being slaved to a master clock. * Trying to set a master on a clock without the * #GST_CLOCK_FLAG_CAN_SET_MASTER flag will make this function return %FALSE. - * - * MT safe. */ public bool setMaster(Clock master) { @@ -648,7 +605,7 @@ public class Clock : ObjectGst } /** - * Set the accuracy of the clock. Some clocks have the possibility to operate + * Sets the accuracy of the clock. Some clocks have the possibility to operate * with different accuracy at the expense of more resource usage. There is * normally no need to change the default resolution of a clock. The resolution * of a clock can only be changed if the clock has the @@ -665,10 +622,10 @@ public class Clock : ObjectGst } /** - * Sets @clock to synced and emits the GstClock::synced signal, and wakes up any + * Sets @clock to synced and emits the #GstClock::synced signal, and wakes up any * thread waiting in gst_clock_wait_for_sync(). * - * This function must only be called if GST_CLOCK_FLAG_NEEDS_STARTUP_SYNC + * This function must only be called if %GST_CLOCK_FLAG_NEEDS_STARTUP_SYNC * is set on the clock, and is intended to be called by subclasses only. * * Params: @@ -682,7 +639,7 @@ public class Clock : ObjectGst } /** - * Set the amount of time, in nanoseconds, to sample master and slave + * Sets the amount of time, in nanoseconds, to sample master and slave * clocks * * Params: @@ -757,9 +714,9 @@ public class Clock : ObjectGst * is %GST_CLOCK_TIME_NONE it will wait forever, otherwise it will time out * after @timeout nanoseconds. * - * For asynchronous waiting, the GstClock::synced signal can be used. + * For asynchronous waiting, the #GstClock::synced signal can be used. * - * This returns immediately with TRUE if GST_CLOCK_FLAG_NEEDS_STARTUP_SYNC + * This returns immediately with %TRUE if %GST_CLOCK_FLAG_NEEDS_STARTUP_SYNC * is not set on the clock, or if the clock is already synced. * * Params: @@ -775,7 +732,7 @@ public class Clock : ObjectGst } /** - * Signaled on clocks with GST_CLOCK_FLAG_NEEDS_STARTUP_SYNC set once + * Signaled on clocks with %GST_CLOCK_FLAG_NEEDS_STARTUP_SYNC set once * the clock is synchronized, or when it completely lost synchronization. * This signal will not be emitted on clocks without the flag. * diff --git a/generated/gstreamer/gstreamer/Context.d b/generated/gstreamer/gstreamer/Context.d index fe17bc0bc..8f6978ae5 100644 --- a/generated/gstreamer/gstreamer/Context.d +++ b/generated/gstreamer/gstreamer/Context.d @@ -26,11 +26,13 @@ module gstreamer.Context; private import glib.ConstructionException; private import glib.Str; +private import glib.c.functions; private import gobject.ObjectG; private import gstreamer.Structure; private import gstreamer.c.functions; public import gstreamer.c.types; public import gstreamerc.gstreamertypes; +private import gtkd.Loader; /** @@ -40,24 +42,25 @@ public import gstreamerc.gstreamertypes; * * Applications can set a context on a complete pipeline by using * gst_element_set_context(), which will then be propagated to all - * child elements. Elements can handle these in #GstElementClass.set_context() + * child elements. Elements can handle these in #GstElementClass::set_context * and merge them with the context information they already have. * * When an element needs a context it will do the following actions in this * order until one step succeeds: + * * 1. Check if the element already has a context - * 2. Query downstream with GST_QUERY_CONTEXT for the context - * 3. Query upstream with GST_QUERY_CONTEXT for the context - * 4. Post a GST_MESSAGE_NEED_CONTEXT message on the bus with the required + * 2. Query downstream with %GST_QUERY_CONTEXT for the context + * 3. Query upstream with %GST_QUERY_CONTEXT for the context + * 4. Post a %GST_MESSAGE_NEED_CONTEXT message on the bus with the required * context types and afterwards check if a usable context was set now - * 5. Create a context by itself and post a GST_MESSAGE_HAVE_CONTEXT message + * 5. Create a context by itself and post a %GST_MESSAGE_HAVE_CONTEXT message * on the bus. * - * Bins will catch GST_MESSAGE_NEED_CONTEXT messages and will set any previously + * Bins will catch %GST_MESSAGE_NEED_CONTEXT messages and will set any previously * known context on the element that asks for it if possible. Otherwise the * application should provide one if it can. * - * #GstContexts can be persistent. + * #GstContext can be persistent. * A persistent #GstContext is kept in elements when they reach * %GST_STATE_NULL, non-persistent ones will be removed. * Also, a non-persistent context won't override a previous persistent @@ -94,6 +97,12 @@ public class Context this.ownedRef = ownedRef; } + ~this () + { + if ( Linker.isLoaded(LIBRARY_GSTREAMER) && ownedRef ) + gst_context_unref(gstContext); + } + /** */ public static GType getType() @@ -102,7 +111,7 @@ public class Context } /** - * Create a new context. + * Creates a new context. * * Params: * contextType = Context type @@ -116,18 +125,39 @@ public class Context */ public this(string contextType, bool persistent) { - auto p = gst_context_new(Str.toStringz(contextType), persistent); + auto __p = gst_context_new(Str.toStringz(contextType), persistent); - if(p is null) + if(__p is null) { throw new ConstructionException("null returned by new"); } - this(cast(GstContext*) p); + this(cast(GstContext*) __p); + } + + /** + * Creates a copy of the context. Returns a copy of the context. + * + * Returns: a new copy of @context. + * + * MT safe + * + * Since: 1.2 + */ + public Context copy() + { + auto __p = gst_context_copy(gstContext); + + if(__p is null) + { + return null; + } + + return ObjectG.getDObject!(Context)(cast(GstContext*) __p, true); } /** - * Get the type of @context. + * Gets the type of @context. * * Returns: The type of the context. * @@ -139,7 +169,7 @@ public class Context } /** - * Access the structure of the context. + * Accesses the structure of the context. * * Returns: The structure of the context. The structure is * still owned by the context, which means that you should not modify it, @@ -149,14 +179,14 @@ public class Context */ public Structure getStructure() { - auto p = gst_context_get_structure(gstContext); + auto __p = gst_context_get_structure(gstContext); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Structure)(cast(GstStructure*) p); + return ObjectG.getDObject!(Structure)(cast(GstStructure*) __p); } /** @@ -175,7 +205,7 @@ public class Context } /** - * Check if @context is persistent. + * Checks if @context is persistent. * * Returns: %TRUE if the context is persistent. * @@ -186,8 +216,39 @@ public class Context return gst_context_is_persistent(gstContext) != 0; } + alias doref = ref_; + /** + * Convenience macro to increase the reference count of the context. + * + * Returns: @context (for convenience when doing assignments) + * + * Since: 1.2 + */ + public Context ref_() + { + auto __p = gst_context_ref(gstContext); + + if(__p is null) + { + return null; + } + + return ObjectG.getDObject!(Context)(cast(GstContext*) __p, true); + } + /** - * Get a writable version of the structure. + * Convenience macro to decrease the reference count of the context, possibly + * freeing it. + * + * Since: 1.2 + */ + public void unref() + { + gst_context_unref(gstContext); + } + + /** + * Gets a writable version of the structure. * * Returns: The structure of the context. The structure is still * owned by the context, which means that you should not free it and @@ -198,13 +259,42 @@ public class Context */ public Structure writableStructure() { - auto p = gst_context_writable_structure(gstContext); + auto __p = gst_context_writable_structure(gstContext); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Structure)(cast(GstStructure*) p, true); + return ObjectG.getDObject!(Structure)(cast(GstStructure*) __p); + } + + /** + * Modifies a pointer to a #GstContext to point to a different #GstContext. The + * modification is done atomically (so this is useful for ensuring thread safety + * in some cases), and the reference counts are updated appropriately (the old + * context is unreffed, the new one is reffed). + * + * Either @new_context or the #GstContext pointed to by @old_context may be %NULL. + * + * Params: + * oldContext = pointer to a pointer to a #GstContext + * to be replaced. + * newContext = pointer to a #GstContext that will + * replace the context pointed to by @old_context. + * + * Returns: %TRUE if @new_context was different from @old_context + * + * Since: 1.2 + */ + public static bool replace(ref Context oldContext, Context newContext) + { + GstContext* outoldContext = oldContext.getContextStruct(); + + auto __p = gst_context_replace(&outoldContext, (newContext is null) ? null : newContext.getContextStruct()) != 0; + + oldContext = ObjectG.getDObject!(Context)(outoldContext); + + return __p; } } diff --git a/generated/gstreamer/gstreamer/ControlBinding.d b/generated/gstreamer/gstreamer/ControlBinding.d index b9e7299af..a00b32f85 100644 --- a/generated/gstreamer/gstreamer/ControlBinding.d +++ b/generated/gstreamer/gstreamer/ControlBinding.d @@ -33,7 +33,7 @@ public import gstreamerc.gstreamertypes; /** - * A base class for value mapping objects that attaches control sources to gobject + * A base class for value mapping objects that attaches control sources to #GObject * properties. Such an object is taking one or more #GstControlSource instances, * combines them and maps the resulting value to the type and value range of the * bound property. @@ -110,19 +110,19 @@ public class ControlBinding : ObjectGst */ public Value getValue(GstClockTime timestamp) { - auto p = gst_control_binding_get_value(gstControlBinding, timestamp); + auto __p = gst_control_binding_get_value(gstControlBinding, timestamp); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Value)(cast(GValue*) p, true); + return ObjectG.getDObject!(Value)(cast(GValue*) __p, true); } /** * Gets a number of values for the given controlled property starting at the - * requested time. The array @values need to hold enough space for @n_values of + * requested time. The array @values needs to hold enough space for @n_values of * the same type as the objects property's type. * * This function is useful if one wants to e.g. draw a graph of the control @@ -145,7 +145,7 @@ public class ControlBinding : ObjectGst } /** - * Check if the control binding is disabled. + * Checks if the control binding is disabled. * * Returns: %TRUE if the binding is inactive */ @@ -169,7 +169,7 @@ public class ControlBinding : ObjectGst /** * Sets the property of the @object, according to the #GstControlSources that - * handle them and for the given timestamp. + * handles it and for the given timestamp. * * If this function fails, it is most likely the application developers fault. * Most probably the control sources are not setup correctly. diff --git a/generated/gstreamer/gstreamer/CustomMeta.d b/generated/gstreamer/gstreamer/CustomMeta.d new file mode 100644 index 000000000..2e31583a5 --- /dev/null +++ b/generated/gstreamer/gstreamer/CustomMeta.d @@ -0,0 +1,101 @@ +/* + * This file is part of gtkD. + * + * gtkD is free software; you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 + * of the License, or (at your option) any later version, with + * some exceptions, please read the COPYING file. + * + * gtkD is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with gtkD; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110, USA + */ + +// generated automatically - do not change +// find conversion definition on APILookup.txt +// implement new conversion functionalities on the wrap.utils pakage + + +module gstreamer.CustomMeta; + +private import glib.Str; +private import gobject.ObjectG; +private import gstreamer.Structure; +private import gstreamer.c.functions; +public import gstreamer.c.types; +public import gstreamerc.gstreamertypes; + + +/** + * Simple typing wrapper around #GstMeta + * + * Since: 1.20 + */ +public class CustomMeta +{ + /** the main Gtk struct */ + protected GstCustomMeta* gstCustomMeta; + protected bool ownedRef; + + /** Get the main Gtk struct */ + public GstCustomMeta* getCustomMetaStruct(bool transferOwnership = false) + { + if (transferOwnership) + ownedRef = false; + return gstCustomMeta; + } + + /** the main Gtk struct as a void* */ + protected void* getStruct() + { + return cast(void*)gstCustomMeta; + } + + /** + * Sets our main struct and passes it to the parent class. + */ + public this (GstCustomMeta* gstCustomMeta, bool ownedRef = false) + { + this.gstCustomMeta = gstCustomMeta; + this.ownedRef = ownedRef; + } + + + /** + * Retrieve the #GstStructure backing a custom meta, the structure's mutability + * is conditioned to the writability of the #GstBuffer @meta is attached to. + * + * Returns: the #GstStructure backing @meta + * + * Since: 1.20 + */ + public Structure getStructure() + { + auto __p = gst_custom_meta_get_structure(gstCustomMeta); + + if(__p is null) + { + return null; + } + + return ObjectG.getDObject!(Structure)(cast(GstStructure*) __p); + } + + /** + * Checks whether the name of the custom meta is @name + * + * Returns: Whether @name is the name of the custom meta + * + * Since: 1.20 + */ + public bool hasName(string name) + { + return gst_custom_meta_has_name(gstCustomMeta, Str.toStringz(name)) != 0; + } +} diff --git a/generated/gstreamer/gstreamer/DateTime.d b/generated/gstreamer/gstreamer/DateTime.d index 29365b33d..ee3c94be8 100644 --- a/generated/gstreamer/gstreamer/DateTime.d +++ b/generated/gstreamer/gstreamer/DateTime.d @@ -27,6 +27,7 @@ module gstreamer.DateTime; private import glib.ConstructionException; private import glib.DateTime : GLibDateTime = DateTime; private import glib.Str; +private import glib.c.functions; private import gobject.ObjectG; private import gstreamer.c.functions; public import gstreamer.c.types; @@ -38,9 +39,11 @@ private import gtkd.Loader; * Struct to store date, time and timezone information altogether. * #GstDateTime is refcounted and immutable. * - * Date information is handled using the proleptic Gregorian calendar. + * Date information is handled using the [proleptic Gregorian calendar]. * * Provides basic creation functions and accessor functions to its fields. + * + * [proleptic Gregorian calendar]: https://en.wikipedia.org/wiki/Proleptic_Gregorian_calendar */ public class DateTime { @@ -154,12 +157,10 @@ public class DateTime * representing it in hours for most timezones. * * If value is -1 then all over value will be ignored. For example - * if @month == -1, then #GstDateTime will created only for @year. If - * @day == -1, then #GstDateTime will created for @year and @month and + * if @month == -1, then #GstDateTime will be created only for @year. If + * @day == -1, then #GstDateTime will be created for @year and @month and * so on. * - * Free-function: gst_date_time_unref - * * Params: * tzoffset = Offset from UTC in hours. * year = the gregorian year @@ -169,59 +170,56 @@ public class DateTime * minute = the minute of the hour * seconds = the second of the minute * - * Returns: the newly created #GstDateTime + * Returns: the newly created #GstDateTime, + * or %NULL on error. * * Throws: ConstructionException GTK+ fails to create the object. */ public this(float tzoffset, int year, int month, int day, int hour, int minute, double seconds) { - auto p = gst_date_time_new(tzoffset, year, month, day, hour, minute, seconds); + auto __p = gst_date_time_new(tzoffset, year, month, day, hour, minute, seconds); - if(p is null) + if(__p is null) { throw new ConstructionException("null returned by new"); } - this(cast(GstDateTime*) p); + this(cast(GstDateTime*) __p); } /** * Creates a new #GstDateTime from a #GDateTime object. * - * Free-function: gst_date_time_unref - * * Params: - * dt = the #GDateTime. The new #GstDateTime takes ownership. + * dt = the #GDateTime. * * Returns: a newly created #GstDateTime, - * or %NULL on error + * or %NULL if @dt is %NULL. * * Throws: ConstructionException GTK+ fails to create the object. */ public this(GLibDateTime dt) { - auto p = gst_date_time_new_from_g_date_time((dt is null) ? null : dt.getDateTimeStruct(true)); + auto __p = gst_date_time_new_from_g_date_time((dt is null) ? null : dt.getDateTimeStruct(true)); - if(p is null) + if(__p is null) { throw new ConstructionException("null returned by new_from_g_date_time"); } - this(cast(GstDateTime*) p); + this(cast(GstDateTime*) __p); } /** * Tries to parse common variants of ISO-8601 datetime strings into a * #GstDateTime. Possible input formats are (for example): - * 2012-06-30T22:46:43Z, 2012, 2012-06, 2012-06-30, 2012-06-30T22:46:43-0430, - * 2012-06-30T22:46Z, 2012-06-30T22:46-0430, 2012-06-30 22:46, - * 2012-06-30 22:46:43, 2012-06-00, 2012-00-00, 2012-00-30, 22:46:43Z, 22:46Z, - * 22:46:43-0430, 22:46-0430, 22:46:30, 22:46 + * `2012-06-30T22:46:43Z`, `2012`, `2012-06`, `2012-06-30`, `2012-06-30T22:46:43-0430`, + * `2012-06-30T22:46Z`, `2012-06-30T22:46-0430`, `2012-06-30 22:46`, + * `2012-06-30 22:46:43`, `2012-06-00`, `2012-00-00`, `2012-00-30`, `22:46:43Z`, `22:46Z`, + * `22:46:43-0430`, `22:46-0430`, `22:46:30`, `22:46` * If no date is provided, it is assumed to be "today" in the timezone * provided (if any), otherwise UTC. * - * Free-function: gst_date_time_unref - * * Params: * string_ = ISO 8601-formatted datetime string. * @@ -232,14 +230,40 @@ public class DateTime */ public this(string string_) { - auto p = gst_date_time_new_from_iso8601_string(Str.toStringz(string_)); + auto __p = gst_date_time_new_from_iso8601_string(Str.toStringz(string_)); - if(p is null) + if(__p is null) { throw new ConstructionException("null returned by new_from_iso8601_string"); } - this(cast(GstDateTime*) p); + this(cast(GstDateTime*) __p); + } + + /** + * Creates a new #GstDateTime using the time since Jan 1, 1970 specified by + * @usecs. The #GstDateTime is in UTC. + * + * Params: + * usecs = microseconds from the Unix epoch + * + * Returns: a newly created #GstDateTime, or %NULL + * on error. + * + * Since: 1.18 + * + * Throws: ConstructionException GTK+ fails to create the object. + */ + public this(long usecs) + { + auto __p = gst_date_time_new_from_unix_epoch_utc_usecs(usecs); + + if(__p is null) + { + throw new ConstructionException("null returned by new_from_unix_epoch_utc_usecs"); + } + + this(cast(GstDateTime*) __p); } /** @@ -259,8 +283,6 @@ public class DateTime * @month and @day, and the time fields will be considered not set. In this * case @minute and @seconds should also be -1. * - * Free-function: gst_date_time_unref - * * Params: * year = the gregorian year * month = the gregorian month, or -1 @@ -269,20 +291,21 @@ public class DateTime * minute = the minute of the hour, or -1 * seconds = the second of the minute, or -1 * - * Returns: the newly created #GstDateTime + * Returns: the newly created #GstDateTime, + * or %NULL on error. * * Throws: ConstructionException GTK+ fails to create the object. */ public this(int year, int month, int day, int hour, int minute, double seconds) { - auto p = gst_date_time_new_local_time(year, month, day, hour, minute, seconds); + auto __p = gst_date_time_new_local_time(year, month, day, hour, minute, seconds); - if(p is null) + if(__p is null) { throw new ConstructionException("null returned by new_local_time"); } - this(cast(GstDateTime*) p); + this(cast(GstDateTime*) __p); } /** @@ -291,25 +314,24 @@ public class DateTime * * @year should be from 1 to 9999. * - * Free-function: gst_date_time_unref - * * Params: * year = the gregorian year * - * Returns: the newly created #GstDateTime + * Returns: the newly created #GstDateTime, + * or %NULL on error. * * Throws: ConstructionException GTK+ fails to create the object. */ public this(int year) { - auto p = gst_date_time_new_y(year); + auto __p = gst_date_time_new_y(year); - if(p is null) + if(__p is null) { throw new ConstructionException("null returned by new_y"); } - this(cast(GstDateTime*) p); + this(cast(GstDateTime*) __p); } /** @@ -321,26 +343,25 @@ public class DateTime * If value is -1 then all over value will be ignored. For example * if @month == -1, then #GstDateTime will created only for @year. * - * Free-function: gst_date_time_unref - * * Params: * year = the gregorian year * month = the gregorian month * - * Returns: the newly created #GstDateTime + * Returns: the newly created #GstDateTime, + * or %NULL on error. * * Throws: ConstructionException GTK+ fails to create the object. */ public this(int year, int month) { - auto p = gst_date_time_new_ym(year, month); + auto __p = gst_date_time_new_ym(year, month); - if(p is null) + if(__p is null) { throw new ConstructionException("null returned by new_ym"); } - this(cast(GstDateTime*) p); + this(cast(GstDateTime*) __p); } /** @@ -355,34 +376,32 @@ public class DateTime * @day == -1, then #GstDateTime will created for @year and @month and * so on. * - * Free-function: gst_date_time_unref - * * Params: * year = the gregorian year * month = the gregorian month * day = the day of the gregorian month * - * Returns: the newly created #GstDateTime + * Returns: the newly created #GstDateTime, + * or %NULL on error. * * Throws: ConstructionException GTK+ fails to create the object. */ public this(int year, int month, int day) { - auto p = gst_date_time_new_ymd(year, month, day); + auto __p = gst_date_time_new_ymd(year, month, day); - if(p is null) + if(__p is null) { throw new ConstructionException("null returned by new_ymd"); } - this(cast(GstDateTime*) p); + this(cast(GstDateTime*) __p); } /** * Returns the day of the month of this #GstDateTime. - * Call gst_date_time_has_day() before, to avoid warnings. * - * Returns: The day of this #GstDateTime + * Returns: The day of this #GstDateTime, or -1 if none is set. */ public int getDay() { @@ -392,9 +411,8 @@ public class DateTime /** * Retrieves the hour of the day represented by @datetime in the gregorian * calendar. The return is in the range of 0 to 23. - * Call gst_date_time_has_time() before, to avoid warnings. * - * Returns: the hour of the day + * Returns: the hour of the day, or -1 if none is set. */ public int getHour() { @@ -405,7 +423,7 @@ public class DateTime * Retrieves the fractional part of the seconds in microseconds represented by * @datetime in the gregorian calendar. * - * Returns: the microsecond of the second + * Returns: the microsecond of the second, or -1 if none is set. */ public int getMicrosecond() { @@ -415,9 +433,8 @@ public class DateTime /** * Retrieves the minute of the hour represented by @datetime in the gregorian * calendar. - * Call gst_date_time_has_time() before, to avoid warnings. * - * Returns: the minute of the hour + * Returns: the minute of the hour, or -1 if none is set. */ public int getMinute() { @@ -426,9 +443,8 @@ public class DateTime /** * Returns the month of this #GstDateTime. January is 1, February is 2, etc.. - * Call gst_date_time_has_month() before, to avoid warnings. * - * Returns: The month of this #GstDateTime + * Returns: The month of this #GstDateTime, or -1 if none is set. */ public int getMonth() { @@ -438,9 +454,8 @@ public class DateTime /** * Retrieves the second of the minute represented by @datetime in the gregorian * calendar. - * Call gst_date_time_has_time() before, to avoid warnings. * - * Returns: the second represented by @datetime + * Returns: the second represented by @datetime, or -1 if none is set. */ public int getSecond() { @@ -453,7 +468,7 @@ public class DateTime * values, timezones before (to the west) of UTC have negative values. * If @datetime represents UTC time, then the offset is zero. * - * Returns: the offset from UTC in hours + * Returns: the offset from UTC in hours, or %G_MAXDOUBLE if none is set. */ public float getTimeZoneOffset() { @@ -461,7 +476,7 @@ public class DateTime } /** - * Returns the year of this #GstDateTime + * Returns the year of this #GstDateTime. * Call gst_date_time_has_year() before, to avoid warnings. * * Returns: The year of this #GstDateTime @@ -521,45 +536,43 @@ public class DateTime */ public DateTime ref_() { - auto p = gst_date_time_ref(gstDateTime); + auto __p = gst_date_time_ref(gstDateTime); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(DateTime)(cast(GstDateTime*) p, true); + return ObjectG.getDObject!(DateTime)(cast(GstDateTime*) __p, true); } /** * Creates a new #GDateTime from a fully defined #GstDateTime object. * - * Free-function: g_date_time_unref - * * Returns: a newly created #GDateTime, or - * %NULL on error + * %NULL on error or if @datetime does not have a year, month, day, hour, + * minute and second. */ public GLibDateTime toGDateTime() { - auto p = gst_date_time_to_g_date_time(gstDateTime); + auto __p = gst_date_time_to_g_date_time(gstDateTime); - if(p is null) + if(__p is null) { return null; } - return new GLibDateTime(cast(GDateTime*) p, true); + return new GLibDateTime(cast(GDateTime*) __p, true); } /** * Create a minimal string compatible with ISO-8601. Possible output formats - * are (for example): 2012, 2012-06, 2012-06-23, 2012-06-23T23:30Z, - * 2012-06-23T23:30+0100, 2012-06-23T23:30:59Z, 2012-06-23T23:30:59+0100 + * are (for example): `2012`, `2012-06`, `2012-06-23`, `2012-06-23T23:30Z`, + * `2012-06-23T23:30+0100`, `2012-06-23T23:30:59Z`, `2012-06-23T23:30:59+0100` * * Returns: a newly allocated string formatted according * to ISO 8601 and only including the datetime fields that are - * valid, or %NULL in case there was an error. The string should - * be freed with g_free(). + * valid, or %NULL in case there was an error. */ public string toIso8601String() { diff --git a/generated/gstreamer/gstreamer/Debug.d b/generated/gstreamer/gstreamer/Debug.d index b05626902..2a646faec 100644 --- a/generated/gstreamer/gstreamer/Debug.d +++ b/generated/gstreamer/gstreamer/Debug.d @@ -26,6 +26,7 @@ module gstreamer.Debug; private import glib.ListSG; private import glib.Str; +private import glib.c.functions; private import gobject.ObjectG; private import gstreamer.Bin; private import gstreamer.DebugCategory; @@ -54,7 +55,7 @@ public struct Debug /** * To aid debugging applications one can use this method to obtain the whole - * network of gstreamer elements that form the pipeline into an dot file. + * network of gstreamer elements that form the pipeline into a dot file. * This data can be processed with graphviz to get an image. * * Params: @@ -74,11 +75,12 @@ public struct Debug /** * To aid debugging applications one can use this method to write out the whole - * network of gstreamer elements that form the pipeline into an dot file. + * network of gstreamer elements that form the pipeline into a dot file. * This file can be processed with graphviz to get an image. - * + * + * ``` shell * dot -Tpng -oimage.png graph_lowlevel.dot - * + * ``` * * Params: * bin = the top-level pipeline that should be analyzed @@ -150,14 +152,14 @@ public struct Debug */ public static ListSG getAllCategories() { - auto p = gst_debug_get_all_categories(); + auto __p = gst_debug_get_all_categories(); - if(p is null) + if(__p is null) { return null; } - return new ListSG(cast(GSList*) p); + return new ListSG(cast(GSList*) __p); } /** diff --git a/generated/gstreamer/gstreamer/DebugCategory.d b/generated/gstreamer/gstreamer/DebugCategory.d index 0ba4a4691..aa69304ec 100644 --- a/generated/gstreamer/gstreamer/DebugCategory.d +++ b/generated/gstreamer/gstreamer/DebugCategory.d @@ -25,6 +25,7 @@ module gstreamer.DebugCategory; private import glib.Str; +private import glib.c.functions; private import gstreamer.c.functions; public import gstreamer.c.types; public import gstreamerc.gstreamertypes; @@ -73,6 +74,8 @@ public class DebugCategory /** * Removes and frees the category and all associated resources. + * + * Deprecated: This function can easily cause memory corruption, don't use it. */ public void free() { diff --git a/generated/gstreamer/gstreamer/DebugMessage.d b/generated/gstreamer/gstreamer/DebugMessage.d index 82f490e09..4897f0044 100644 --- a/generated/gstreamer/gstreamer/DebugMessage.d +++ b/generated/gstreamer/gstreamer/DebugMessage.d @@ -25,6 +25,7 @@ module gstreamer.DebugMessage; private import glib.Str; +private import glib.c.functions; private import gstreamer.c.functions; public import gstreamer.c.types; public import gstreamerc.gstreamertypes; diff --git a/generated/gstreamer/gstreamer/Device.d b/generated/gstreamer/gstreamer/Device.d index 1223f8bb0..bb5c482a4 100644 --- a/generated/gstreamer/gstreamer/Device.d +++ b/generated/gstreamer/gstreamer/Device.d @@ -25,6 +25,7 @@ module gstreamer.Device; private import glib.Str; +private import glib.c.functions; private import gobject.ObjectG; private import gobject.Signals; private import gstreamer.Caps; @@ -97,14 +98,14 @@ public class Device : ObjectGst */ public Element createElement(string name) { - auto p = gst_device_create_element(gstDevice, Str.toStringz(name)); + auto __p = gst_device_create_element(gstDevice, Str.toStringz(name)); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Element)(cast(GstElement*) p, true); + return ObjectG.getDObject!(Element)(cast(GstElement*) __p); } /** @@ -117,14 +118,14 @@ public class Device : ObjectGst */ public Caps getCaps() { - auto p = gst_device_get_caps(gstDevice); + auto __p = gst_device_get_caps(gstDevice); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Caps)(cast(GstCaps*) p, true); + return ObjectG.getDObject!(Caps)(cast(GstCaps*) __p, true); } /** @@ -169,14 +170,14 @@ public class Device : ObjectGst */ public Structure getProperties() { - auto p = gst_device_get_properties(gstDevice); + auto __p = gst_device_get_properties(gstDevice); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Structure)(cast(GstStructure*) p, true); + return ObjectG.getDObject!(Structure)(cast(GstStructure*) __p, true); } /** diff --git a/generated/gstreamer/gstreamer/DeviceMonitor.d b/generated/gstreamer/gstreamer/DeviceMonitor.d index 2186a5726..5771307d0 100644 --- a/generated/gstreamer/gstreamer/DeviceMonitor.d +++ b/generated/gstreamer/gstreamer/DeviceMonitor.d @@ -27,6 +27,7 @@ module gstreamer.DeviceMonitor; private import glib.ConstructionException; private import glib.ListG; private import glib.Str; +private import glib.c.functions; private import gobject.ObjectG; private import gstreamer.Bus; private import gstreamer.Caps; @@ -147,14 +148,14 @@ public class DeviceMonitor : ObjectGst */ public this() { - auto p = gst_device_monitor_new(); + auto __p = gst_device_monitor_new(); - if(p is null) + if(__p is null) { throw new ConstructionException("null returned by new"); } - this(cast(GstDeviceMonitor*) p, true); + this(cast(GstDeviceMonitor*) __p, true); } /** @@ -193,14 +194,14 @@ public class DeviceMonitor : ObjectGst */ public Bus getBus() { - auto p = gst_device_monitor_get_bus(gstDeviceMonitor); + auto __p = gst_device_monitor_get_bus(gstDeviceMonitor); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Bus)(cast(GstBus*) p, true); + return ObjectG.getDObject!(Bus)(cast(GstBus*) __p, true); } /** @@ -214,14 +215,14 @@ public class DeviceMonitor : ObjectGst */ public ListG getDevices() { - auto p = gst_device_monitor_get_devices(gstDeviceMonitor); + auto __p = gst_device_monitor_get_devices(gstDeviceMonitor); - if(p is null) + if(__p is null) { return null; } - return new ListG(cast(GList*) p, true); + return new ListG(cast(GList*) __p, true); } /** @@ -243,7 +244,7 @@ public class DeviceMonitor : ObjectGst } /** - * Get if @monitor is curretly showing all devices, even those from hidden + * Get if @monitor is currently showing all devices, even those from hidden * providers. * * Returns: %TRUE when all devices will be shown. @@ -290,7 +291,8 @@ public class DeviceMonitor : ObjectGst * %GST_MESSAGE_DEVICE_ADDED and %GST_MESSAGE_DEVICE_REMOVED messages * will be emitted on the bus when the list of devices changes. * - * Returns: %TRUE if the device monitoring could be started + * Returns: %TRUE if the device monitoring could be started, i.e. at least a + * single device provider was started successfully. * * Since: 1.4 */ diff --git a/generated/gstreamer/gstreamer/DeviceProvider.d b/generated/gstreamer/gstreamer/DeviceProvider.d index 979656d97..e3d377920 100644 --- a/generated/gstreamer/gstreamer/DeviceProvider.d +++ b/generated/gstreamer/gstreamer/DeviceProvider.d @@ -26,6 +26,7 @@ module gstreamer.DeviceProvider; private import glib.ListG; private import glib.Str; +private import glib.c.functions; private import gobject.ObjectG; private import gobject.Signals; private import gstreamer.Bus; @@ -141,7 +142,7 @@ public class DeviceProvider : ObjectGst * * Params: * device = the new version of @changed_device - * changedDevice = the old version of the device that has been udpated + * changedDevice = the old version of the device that has been updated * * Since: 1.16 */ @@ -175,20 +176,23 @@ public class DeviceProvider : ObjectGst */ public Bus getBus() { - auto p = gst_device_provider_get_bus(gstDeviceProvider); + auto __p = gst_device_provider_get_bus(gstDeviceProvider); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Bus)(cast(GstBus*) p, true); + return ObjectG.getDObject!(Bus)(cast(GstBus*) __p, true); } /** * Gets a list of devices that this provider understands. This may actually * probe the hardware if the provider is not currently started. * + * If the provider has been started, this will returned the same #GstDevice + * objedcts that have been returned by the #GST_MESSAGE_DEVICE_ADDED messages. + * * Returns: a #GList of * #GstDevice * @@ -196,14 +200,14 @@ public class DeviceProvider : ObjectGst */ public ListG getDevices() { - auto p = gst_device_provider_get_devices(gstDeviceProvider); + auto __p = gst_device_provider_get_devices(gstDeviceProvider); - if(p is null) + if(__p is null) { return null; } - return new ListG(cast(GList*) p, true); + return new ListG(cast(GList*) __p, true); } /** @@ -216,14 +220,14 @@ public class DeviceProvider : ObjectGst */ public DeviceProviderFactory getFactory() { - auto p = gst_device_provider_get_factory(gstDeviceProvider); + auto __p = gst_device_provider_get_factory(gstDeviceProvider); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(DeviceProviderFactory)(cast(GstDeviceProviderFactory*) p); + return ObjectG.getDObject!(DeviceProviderFactory)(cast(GstDeviceProviderFactory*) __p); } /** @@ -275,6 +279,16 @@ public class DeviceProvider : ObjectGst gst_device_provider_hide_provider(gstDeviceProvider, Str.toStringz(name)); } + /** + * This function can be used to know if the @provider was successfully started. + * + * Since: 1.20 + */ + public bool isStarted() + { + return gst_device_provider_is_started(gstDeviceProvider) != 0; + } + /** * Starts providering the devices. This will cause #GST_MESSAGE_DEVICE_ADDED * and #GST_MESSAGE_DEVICE_REMOVED messages to be posted on the provider's bus @@ -285,6 +299,10 @@ public class DeviceProvider : ObjectGst * user of the object, gst_device_provider_stop() needs to be called the same * number of times. * + * After this function has been called, gst_device_provider_get_devices() will + * return the same objects that have been received from the + * #GST_MESSAGE_DEVICE_ADDED messages and will no longer probe. + * * Returns: %TRUE if the device providering could be started * * Since: 1.4 diff --git a/generated/gstreamer/gstreamer/DeviceProviderClass.d b/generated/gstreamer/gstreamer/DeviceProviderClass.d index f99b7f0e0..0f53e16b8 100644 --- a/generated/gstreamer/gstreamer/DeviceProviderClass.d +++ b/generated/gstreamer/gstreamer/DeviceProviderClass.d @@ -25,6 +25,7 @@ module gstreamer.DeviceProviderClass; private import glib.Str; +private import glib.c.functions; private import gstreamer.c.functions; public import gstreamer.c.types; public import gstreamerc.gstreamertypes; diff --git a/generated/gstreamer/gstreamer/DeviceProviderFactory.d b/generated/gstreamer/gstreamer/DeviceProviderFactory.d index 7be563e35..4246a08ae 100644 --- a/generated/gstreamer/gstreamer/DeviceProviderFactory.d +++ b/generated/gstreamer/gstreamer/DeviceProviderFactory.d @@ -26,6 +26,7 @@ module gstreamer.DeviceProviderFactory; private import glib.ListG; private import glib.Str; +private import glib.c.functions; private import gobject.ObjectG; private import gstreamer.DeviceProvider; private import gstreamer.PluginFeature; @@ -95,14 +96,14 @@ public class DeviceProviderFactory : PluginFeature */ public static DeviceProviderFactory find(string name) { - auto p = gst_device_provider_factory_find(Str.toStringz(name)); + auto __p = gst_device_provider_factory_find(Str.toStringz(name)); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(DeviceProviderFactory)(cast(GstDeviceProviderFactory*) p, true); + return ObjectG.getDObject!(DeviceProviderFactory)(cast(GstDeviceProviderFactory*) __p, true); } /** @@ -119,14 +120,14 @@ public class DeviceProviderFactory : PluginFeature */ public static DeviceProvider getByName(string factoryname) { - auto p = gst_device_provider_factory_get_by_name(Str.toStringz(factoryname)); + auto __p = gst_device_provider_factory_get_by_name(Str.toStringz(factoryname)); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(DeviceProvider)(cast(GstDeviceProvider*) p, true); + return ObjectG.getDObject!(DeviceProvider)(cast(GstDeviceProvider*) __p, true); } /** @@ -143,14 +144,14 @@ public class DeviceProviderFactory : PluginFeature */ public static ListG listGetDeviceProviders(GstRank minrank) { - auto p = gst_device_provider_factory_list_get_device_providers(minrank); + auto __p = gst_device_provider_factory_list_get_device_providers(minrank); - if(p is null) + if(__p is null) { return null; } - return new ListG(cast(GList*) p, true); + return new ListG(cast(GList*) __p, true); } /** @@ -164,14 +165,14 @@ public class DeviceProviderFactory : PluginFeature */ public DeviceProvider get() { - auto p = gst_device_provider_factory_get(gstDeviceProviderFactory); + auto __p = gst_device_provider_factory_get(gstDeviceProviderFactory); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(DeviceProvider)(cast(GstDeviceProvider*) p, true); + return ObjectG.getDObject!(DeviceProvider)(cast(GstDeviceProvider*) __p, true); } /** diff --git a/generated/gstreamer/gstreamer/DoubleRange.d b/generated/gstreamer/gstreamer/DoubleRange.d index 4331cee19..8539a08c2 100644 --- a/generated/gstreamer/gstreamer/DoubleRange.d +++ b/generated/gstreamer/gstreamer/DoubleRange.d @@ -29,7 +29,9 @@ public import gstreamer.c.types; public import gstreamerc.gstreamertypes; -/** */ +/** + * A fundamental type that describes a #gdouble range + */ public class DoubleRange { /** the main Gtk struct */ diff --git a/generated/gstreamer/gstreamer/DynamicTypeFactory.d b/generated/gstreamer/gstreamer/DynamicTypeFactory.d index 7c31e114e..f95c270f4 100644 --- a/generated/gstreamer/gstreamer/DynamicTypeFactory.d +++ b/generated/gstreamer/gstreamer/DynamicTypeFactory.d @@ -51,6 +51,8 @@ public import gstreamerc.gstreamertypes; * return gst_dynamic_type_register (plugin, GST_TYPE_CUSTOM_CAPS_FIELD); * } * ]| + * + * Since: 1.12 */ public class DynamicTypeFactory : PluginFeature { diff --git a/generated/gstreamer/gstreamer/Element.d b/generated/gstreamer/gstreamer/Element.d index 87659e5a2..66a1a1a71 100644 --- a/generated/gstreamer/gstreamer/Element.d +++ b/generated/gstreamer/gstreamer/Element.d @@ -28,6 +28,7 @@ private import glib.ErrorG; private import glib.GException; private import glib.ListG; private import glib.Str; +private import glib.c.functions; private import gobject.ObjectG; private import gobject.Signals; private import gobject.Type; @@ -233,19 +234,19 @@ public class Element : ObjectGst { GError* err = null; - auto p = gst_element_make_from_uri(type, Str.toStringz(uri), Str.toStringz(elementname), &err); + auto __p = gst_element_make_from_uri(type, Str.toStringz(uri), Str.toStringz(elementname), &err); if (err !is null) { throw new GException( new ErrorG(err) ); } - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Element)(cast(GstElement*) p); + return ObjectG.getDObject!(Element)(cast(GstElement*) __p); } /** @@ -293,6 +294,35 @@ public class Element : ObjectGst return Str.toString(gst_element_state_get_name(state)); } + /** + * Marks @type as "documentation should be skipped". + * Can be useful for dynamically registered element to be excluded from + * plugin documentation system. + * + * Example: + * ```c + * GType my_type; + * GTypeInfo my_type_info; + * + * // Fill "my_type_info" + * ... + * + * my_type = g_type_register_static (GST_TYPE_MY_ELEMENT, "my-type-name", + * &my_type_info, 0); + * gst_element_type_set_skip_documentation (my_type); + * gst_element_register (plugin, "my-plugin-feature-name", rank, my_type); + * ``` + * + * Params: + * type = a #GType of element + * + * Since: 1.20 + */ + public static void typeSetSkipDocumentation(GType type) + { + gst_element_type_set_skip_documentation(type); + } + /** * Abort the state change of the element. This function is used * by elements that do asynchronous state changes and find out @@ -533,14 +563,14 @@ public class Element : ObjectGst */ public Bus getBus() { - auto p = gst_element_get_bus(gstElement); + auto __p = gst_element_get_bus(gstElement); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Bus)(cast(GstBus*) p, true); + return ObjectG.getDObject!(Bus)(cast(GstBus*) __p, true); } /** @@ -556,14 +586,14 @@ public class Element : ObjectGst */ public Clock getClock() { - auto p = gst_element_get_clock(gstElement); + auto __p = gst_element_get_clock(gstElement); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Clock)(cast(GstClock*) p, true); + return ObjectG.getDObject!(Clock)(cast(GstClock*) __p, true); } /** @@ -585,14 +615,14 @@ public class Element : ObjectGst */ public Pad getCompatiblePad(Pad pad, Caps caps) { - auto p = gst_element_get_compatible_pad(gstElement, (pad is null) ? null : pad.getPadStruct(), (caps is null) ? null : caps.getCapsStruct()); + auto __p = gst_element_get_compatible_pad(gstElement, (pad is null) ? null : pad.getPadStruct(), (caps is null) ? null : caps.getCapsStruct()); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Pad)(cast(GstPad*) p, true); + return ObjectG.getDObject!(Pad)(cast(GstPad*) __p, true); } /** @@ -608,14 +638,14 @@ public class Element : ObjectGst */ public PadTemplate getCompatiblePadTemplate(PadTemplate compattempl) { - auto p = gst_element_get_compatible_pad_template(gstElement, (compattempl is null) ? null : compattempl.getPadTemplateStruct()); + auto __p = gst_element_get_compatible_pad_template(gstElement, (compattempl is null) ? null : compattempl.getPadTemplateStruct()); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(PadTemplate)(cast(GstPadTemplate*) p); + return ObjectG.getDObject!(PadTemplate)(cast(GstPadTemplate*) __p); } /** @@ -632,14 +662,14 @@ public class Element : ObjectGst */ public Context getContext(string contextType) { - auto p = gst_element_get_context(gstElement, Str.toStringz(contextType)); + auto __p = gst_element_get_context(gstElement, Str.toStringz(contextType)); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Context)(cast(GstContext*) p, true); + return ObjectG.getDObject!(Context)(cast(GstContext*) __p, true); } /** @@ -654,14 +684,14 @@ public class Element : ObjectGst */ public Context getContextUnlocked(string contextType) { - auto p = gst_element_get_context_unlocked(gstElement, Str.toStringz(contextType)); + auto __p = gst_element_get_context_unlocked(gstElement, Str.toStringz(contextType)); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Context)(cast(GstContext*) p, true); + return ObjectG.getDObject!(Context)(cast(GstContext*) __p, true); } /** @@ -675,14 +705,43 @@ public class Element : ObjectGst */ public ListG getContexts() { - auto p = gst_element_get_contexts(gstElement); + auto __p = gst_element_get_contexts(gstElement); - if(p is null) + if(__p is null) { return null; } - return new ListG(cast(GList*) p, true); + return new ListG(cast(GList*) __p, true); + } + + /** + * Returns the current clock time of the element, as in, the time of the + * element's clock, or GST_CLOCK_TIME_NONE if there is no clock. + * + * Returns: the clock time of the element, or GST_CLOCK_TIME_NONE if there is + * no clock. + * + * Since: 1.18 + */ + public GstClockTime getCurrentClockTime() + { + return gst_element_get_current_clock_time(gstElement); + } + + /** + * Returns the running time of the element. The running time is the + * element's clock time minus its base time. Will return GST_CLOCK_TIME_NONE + * if the element has no clock, or if its base time has not been set. + * + * Returns: the running time of the element, or GST_CLOCK_TIME_NONE if the + * element has no clock or its base time has not been set. + * + * Since: 1.18 + */ + public GstClockTime getCurrentRunningTime() + { + return gst_element_get_current_running_time(gstElement); } /** @@ -693,14 +752,14 @@ public class Element : ObjectGst */ public ElementFactory getFactory() { - auto p = gst_element_get_factory(gstElement); + auto __p = gst_element_get_factory(gstElement); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(ElementFactory)(cast(GstElementFactory*) p); + return ObjectG.getDObject!(ElementFactory)(cast(GstElementFactory*) __p); } /** @@ -732,14 +791,14 @@ public class Element : ObjectGst */ public PadTemplate getPadTemplate(string name) { - auto p = gst_element_get_pad_template(gstElement, Str.toStringz(name)); + auto __p = gst_element_get_pad_template(gstElement, Str.toStringz(name)); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(PadTemplate)(cast(GstPadTemplate*) p); + return ObjectG.getDObject!(PadTemplate)(cast(GstPadTemplate*) __p); } /** @@ -753,24 +812,23 @@ public class Element : ObjectGst */ public ListG getPadTemplateList() { - auto p = gst_element_get_pad_template_list(gstElement); + auto __p = gst_element_get_pad_template_list(gstElement); - if(p is null) + if(__p is null) { return null; } - return new ListG(cast(GList*) p); + return new ListG(cast(GList*) __p); } /** - * Retrieves a pad from the element by name (e.g. "src_\%d"). This version only - * retrieves request pads. The pad should be released with - * gst_element_release_request_pad(). + * The name of this function is confusing to people learning GStreamer. + * gst_element_request_pad_simple() aims at making it more explicit it is + * a simplified gst_element_request_pad(). * - * This method is slower than manually getting the pad template and calling - * gst_element_request_pad() if the pads should have a specific name (e.g. - * @name is "src_1" instead of "src_\%u"). + * Deprecated: Prefer using gst_element_request_pad_simple() which + * provides the exact same functionality. * * Params: * name = the name of the request #GstPad to retrieve. @@ -780,14 +838,14 @@ public class Element : ObjectGst */ public Pad getRequestPad(string name) { - auto p = gst_element_get_request_pad(gstElement, Str.toStringz(name)); + auto __p = gst_element_get_request_pad(gstElement, Str.toStringz(name)); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Pad)(cast(GstPad*) p, true); + return ObjectG.getDObject!(Pad)(cast(GstPad*) __p, true); } /** @@ -862,14 +920,14 @@ public class Element : ObjectGst */ public Pad getStaticPad(string name) { - auto p = gst_element_get_static_pad(gstElement, Str.toStringz(name)); + auto __p = gst_element_get_static_pad(gstElement, Str.toStringz(name)); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Pad)(cast(GstPad*) p, true); + return ObjectG.getDObject!(Pad)(cast(GstPad*) __p, true); } /** @@ -902,14 +960,14 @@ public class Element : ObjectGst */ public Iterator iteratePads() { - auto p = gst_element_iterate_pads(gstElement); + auto __p = gst_element_iterate_pads(gstElement); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Iterator)(cast(GstIterator*) p, true); + return ObjectG.getDObject!(Iterator)(cast(GstIterator*) __p, true); } /** @@ -924,14 +982,14 @@ public class Element : ObjectGst */ public Iterator iterateSinkPads() { - auto p = gst_element_iterate_sink_pads(gstElement); + auto __p = gst_element_iterate_sink_pads(gstElement); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Iterator)(cast(GstIterator*) p, true); + return ObjectG.getDObject!(Iterator)(cast(GstIterator*) __p, true); } /** @@ -946,14 +1004,14 @@ public class Element : ObjectGst */ public Iterator iterateSrcPads() { - auto p = gst_element_iterate_src_pads(gstElement); + auto __p = gst_element_iterate_src_pads(gstElement); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Iterator)(cast(GstIterator*) p, true); + return ObjectG.getDObject!(Iterator)(cast(GstIterator*) __p, true); } /** @@ -1176,7 +1234,7 @@ public class Element : ObjectGst */ public bool postMessage(Message message) { - return gst_element_post_message(gstElement, (message is null) ? null : message.getMessageStruct()) != 0; + return gst_element_post_message(gstElement, (message is null) ? null : message.getMessageStruct(true)) != 0; } /** @@ -1191,14 +1249,14 @@ public class Element : ObjectGst */ public Clock provideClock() { - auto p = gst_element_provide_clock(gstElement); + auto __p = gst_element_provide_clock(gstElement); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Clock)(cast(GstClock*) p, true); + return ObjectG.getDObject!(Clock)(cast(GstClock*) __p, true); } /** @@ -1356,14 +1414,48 @@ public class Element : ObjectGst */ public Pad requestPad(PadTemplate templ, string name, Caps caps) { - auto p = gst_element_request_pad(gstElement, (templ is null) ? null : templ.getPadTemplateStruct(), Str.toStringz(name), (caps is null) ? null : caps.getCapsStruct()); + auto __p = gst_element_request_pad(gstElement, (templ is null) ? null : templ.getPadTemplateStruct(), Str.toStringz(name), (caps is null) ? null : caps.getCapsStruct()); + + if(__p is null) + { + return null; + } + + return ObjectG.getDObject!(Pad)(cast(GstPad*) __p, true); + } + + /** + * Retrieves a pad from the element by name (e.g. "src_\%d"). This version only + * retrieves request pads. The pad should be released with + * gst_element_release_request_pad(). + * + * This method is slower than manually getting the pad template and calling + * gst_element_request_pad() if the pads should have a specific name (e.g. + * @name is "src_1" instead of "src_\%u"). + * + * Note that this function was introduced in GStreamer 1.20 in order to provide + * a better name to gst_element_get_request_pad(). Prior to 1.20, users + * should use gst_element_get_request_pad() which provides the same + * functionality. + * + * Params: + * name = the name of the request #GstPad to retrieve. + * + * Returns: requested #GstPad if found, + * otherwise %NULL. Release after usage. + * + * Since: 1.20 + */ + public Pad requestPadSimple(string name) + { + auto __p = gst_element_request_pad_simple(gstElement, Str.toStringz(name)); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Pad)(cast(GstPad*) p, true); + return ObjectG.getDObject!(Pad)(cast(GstPad*) __p, true); } /** @@ -1441,7 +1533,7 @@ public class Element : ObjectGst */ public bool sendEvent(Event event) { - return gst_element_send_event(gstElement, (event is null) ? null : event.getEventStruct()) != 0; + return gst_element_send_event(gstElement, (event is null) ? null : event.getEventStruct(true)) != 0; } /** diff --git a/generated/gstreamer/gstreamer/ElementClass.d b/generated/gstreamer/gstreamer/ElementClass.d index c5eac5954..b7788ed22 100644 --- a/generated/gstreamer/gstreamer/ElementClass.d +++ b/generated/gstreamer/gstreamer/ElementClass.d @@ -26,6 +26,7 @@ module gstreamer.ElementClass; private import glib.ListG; private import glib.Str; +private import glib.c.functions; private import gobject.ObjectG; private import gstreamer.PadTemplate; private import gstreamer.StaticPadTemplate; @@ -174,14 +175,14 @@ public class ElementClass */ public PadTemplate getPadTemplate(string name) { - auto p = gst_element_class_get_pad_template(gstElementClass, Str.toStringz(name)); + auto __p = gst_element_class_get_pad_template(gstElementClass, Str.toStringz(name)); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(PadTemplate)(cast(GstPadTemplate*) p); + return ObjectG.getDObject!(PadTemplate)(cast(GstPadTemplate*) __p); } /** @@ -196,14 +197,14 @@ public class ElementClass */ public ListG getPadTemplateList() { - auto p = gst_element_class_get_pad_template_list(gstElementClass); + auto __p = gst_element_class_get_pad_template_list(gstElementClass); - if(p is null) + if(__p is null) { return null; } - return new ListG(cast(GList*) p); + return new ListG(cast(GList*) __p); } /** diff --git a/generated/gstreamer/gstreamer/ElementFactory.d b/generated/gstreamer/gstreamer/ElementFactory.d index 10fb6793b..3d79a1056 100644 --- a/generated/gstreamer/gstreamer/ElementFactory.d +++ b/generated/gstreamer/gstreamer/ElementFactory.d @@ -26,7 +26,9 @@ module gstreamer.ElementFactory; private import glib.ListG; private import glib.Str; +private import glib.c.functions; private import gobject.ObjectG; +private import gobject.Value; private import gstreamer.Caps; private import gstreamer.Element; private import gstreamer.PluginFeature; @@ -48,12 +50,12 @@ public import gstreamerc.gstreamertypes; * * ## Using an element factory * |[ - * #include <gst/gst.h> + * #include * * GstElement *src; * GstElementFactory *srcfactory; * - * gst_init (&argc, &argv); + * gst_init (&argc, &argv); * * srcfactory = gst_element_factory_find ("filesrc"); * g_return_if_fail (srcfactory != NULL); @@ -133,14 +135,14 @@ public class ElementFactory : PluginFeature */ public static ElementFactory find(string name) { - auto p = gst_element_factory_find(Str.toStringz(name)); + auto __p = gst_element_factory_find(Str.toStringz(name)); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(ElementFactory)(cast(GstElementFactory*) p, true); + return ObjectG.getDObject!(ElementFactory)(cast(GstElementFactory*) __p, true); } /** @@ -164,14 +166,14 @@ public class ElementFactory : PluginFeature */ public static ListG listFilter(ListG list, Caps caps, GstPadDirection direction, bool subsetonly) { - auto p = gst_element_factory_list_filter((list is null) ? null : list.getListGStruct(), (caps is null) ? null : caps.getCapsStruct(), direction, subsetonly); + auto __p = gst_element_factory_list_filter((list is null) ? null : list.getListGStruct(), (caps is null) ? null : caps.getCapsStruct(), direction, subsetonly); - if(p is null) + if(__p is null) { return null; } - return new ListG(cast(GList*) p, true); + return new ListG(cast(GList*) __p, true); } /** @@ -189,14 +191,14 @@ public class ElementFactory : PluginFeature */ public static ListG listGetElements(GstElementFactoryListType type, GstRank minrank) { - auto p = gst_element_factory_list_get_elements(type, minrank); + auto __p = gst_element_factory_list_get_elements(type, minrank); - if(p is null) + if(__p is null) { return null; } - return new ListG(cast(GList*) p, true); + return new ListG(cast(GList*) __p, true); } /** @@ -215,14 +217,72 @@ public class ElementFactory : PluginFeature */ public static Element make(string factoryname, string name) { - auto p = gst_element_factory_make(Str.toStringz(factoryname), Str.toStringz(name)); + auto __p = gst_element_factory_make(Str.toStringz(factoryname), Str.toStringz(name)); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Element)(cast(GstElement*) p); + return ObjectG.getDObject!(Element)(cast(GstElement*) __p); + } + + /** + * Create a new element of the type defined by the given element factory. + * The supplied list of properties, will be passed at object construction. + * + * Params: + * factoryname = a named factory to instantiate + * first = name of first property + * properties = list of properties + * + * Returns: new #GstElement or %NULL + * if unable to create element + * + * Since: 1.20 + */ + public static Element makeValist(string factoryname, string first, void* properties) + { + auto __p = gst_element_factory_make_valist(Str.toStringz(factoryname), Str.toStringz(first), properties); + + if(__p is null) + { + return null; + } + + return ObjectG.getDObject!(Element)(cast(GstElement*) __p); + } + + /** + * Create a new element of the type defined by the given elementfactory. + * The supplied list of properties, will be passed at object construction. + * + * Params: + * factoryname = a named factory to instantiate + * names = array of properties names + * values = array of associated properties values + * + * Returns: new #GstElement or %NULL + * if the element couldn't be created + * + * Since: 1.20 + */ + public static Element makeWithProperties(string factoryname, string[] names, Value[] values) + { + GValue[] valuesArray = new GValue[values.length]; + for ( int i = 0; i < values.length; i++ ) + { + valuesArray[i] = *(values[i].getValueStruct()); + } + + auto __p = gst_element_factory_make_with_properties(Str.toStringz(factoryname), cast(uint)values.length, Str.toStringzArray(names), valuesArray.ptr); + + if(__p is null) + { + return null; + } + + return ObjectG.getDObject!(Element)(cast(GstElement*) __p); } /** @@ -291,14 +351,70 @@ public class ElementFactory : PluginFeature */ public Element create(string name) { - auto p = gst_element_factory_create(gstElementFactory, Str.toStringz(name)); + auto __p = gst_element_factory_create(gstElementFactory, Str.toStringz(name)); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Element)(cast(GstElement*) p); + return ObjectG.getDObject!(Element)(cast(GstElement*) __p); + } + + /** + * Create a new element of the type defined by the given elementfactory. + * The supplied list of properties, will be passed at object construction. + * + * Params: + * first = name of the first property + * properties = list of properties + * + * Returns: new #GstElement or %NULL + * if the element couldn't be created + * + * Since: 1.20 + */ + public Element createValist(string first, void* properties) + { + auto __p = gst_element_factory_create_valist(gstElementFactory, Str.toStringz(first), properties); + + if(__p is null) + { + return null; + } + + return ObjectG.getDObject!(Element)(cast(GstElement*) __p); + } + + /** + * Create a new element of the type defined by the given elementfactory. + * The supplied list of properties, will be passed at object construction. + * + * Params: + * names = array of properties names + * values = array of associated properties values + * + * Returns: new #GstElement or %NULL + * if the element couldn't be created + * + * Since: 1.20 + */ + public Element createWithProperties(string[] names, Value[] values) + { + GValue[] valuesArray = new GValue[values.length]; + for ( int i = 0; i < values.length; i++ ) + { + valuesArray[i] = *(values[i].getValueStruct()); + } + + auto __p = gst_element_factory_create_with_properties(gstElementFactory, cast(uint)values.length, Str.toStringzArray(names), valuesArray.ptr); + + if(__p is null) + { + return null; + } + + return ObjectG.getDObject!(Element)(cast(GstElement*) __p); } /** @@ -352,6 +468,19 @@ public class ElementFactory : PluginFeature return gst_element_factory_get_num_pad_templates(gstElementFactory); } + /** + * Queries whether registered element managed by @factory needs to + * be excluded from documentation system or not. + * + * Returns: %TRUE if documentation should be skipped + * + * Since: 1.20 + */ + public bool getSkipDocumentation() + { + return gst_element_factory_get_skip_documentation(gstElementFactory) != 0; + } + /** * Gets the #GList of #GstStaticPadTemplate for this factory. * @@ -360,14 +489,14 @@ public class ElementFactory : PluginFeature */ public ListG getStaticPadTemplates() { - auto p = gst_element_factory_get_static_pad_templates(gstElementFactory); + auto __p = gst_element_factory_get_static_pad_templates(gstElementFactory); - if(p is null) + if(__p is null) { return null; } - return new ListG(cast(GList*) p); + return new ListG(cast(GList*) __p); } /** diff --git a/generated/gstreamer/gstreamer/Event.d b/generated/gstreamer/gstreamer/Event.d index e91d060cd..a46e29ad5 100644 --- a/generated/gstreamer/gstreamer/Event.d +++ b/generated/gstreamer/gstreamer/Event.d @@ -27,6 +27,7 @@ module gstreamer.Event; private import glib.ConstructionException; private import glib.ListG; private import glib.Str; +private import glib.c.functions; private import gobject.ObjectG; private import gstreamer.Buffer; private import gstreamer.Caps; @@ -40,6 +41,7 @@ private import gstreamer.Toc; private import gstreamer.c.functions; public import gstreamer.c.types; public import gstreamerc.gstreamertypes; +private import gtkd.Loader; /** @@ -114,6 +116,12 @@ public class Event this.ownedRef = ownedRef; } + ~this () + { + if ( Linker.isLoaded(LIBRARY_GSTREAMER) && ownedRef ) + gst_event_unref(gstEvent); + } + /** * Create a new EOS event. The eos event can only travel downstream * synchronized with the buffer flow. Elements that receive the EOS @@ -209,14 +217,14 @@ public class Event */ public this(GstFormat format, long minsize, long maxsize, bool async) { - auto p = gst_event_new_buffer_size(format, minsize, maxsize, async); + auto __p = gst_event_new_buffer_size(format, minsize, maxsize, async); - if(p is null) + if(__p is null) { throw new ConstructionException("null returned by new_buffer_size"); } - this(cast(GstEvent*) p); + this(cast(GstEvent*) __p); } /** @@ -233,14 +241,14 @@ public class Event */ public this(Caps caps) { - auto p = gst_event_new_caps((caps is null) ? null : caps.getCapsStruct()); + auto __p = gst_event_new_caps((caps is null) ? null : caps.getCapsStruct()); - if(p is null) + if(__p is null) { throw new ConstructionException("null returned by new_caps"); } - this(cast(GstEvent*) p); + this(cast(GstEvent*) __p); } /** @@ -266,14 +274,14 @@ public class Event */ public this(GstEventType type, Structure structure) { - auto p = gst_event_new_custom(type, (structure is null) ? null : structure.getStructureStruct(true)); + auto __p = gst_event_new_custom(type, (structure is null) ? null : structure.getStructureStruct(true)); - if(p is null) + if(__p is null) { throw new ConstructionException("null returned by new_custom"); } - this(cast(GstEvent*) p); + this(cast(GstEvent*) __p); } /** @@ -297,14 +305,14 @@ public class Event */ public this(bool resetTime) { - auto p = gst_event_new_flush_stop(resetTime); + auto __p = gst_event_new_flush_stop(resetTime); - if(p is null) + if(__p is null) { throw new ConstructionException("null returned by new_flush_stop"); } - this(cast(GstEvent*) p); + this(cast(GstEvent*) __p); } /** @@ -324,14 +332,85 @@ public class Event */ public this(GstClockTime timestamp, GstClockTime duration) { - auto p = gst_event_new_gap(timestamp, duration); + auto __p = gst_event_new_gap(timestamp, duration); - if(p is null) + if(__p is null) { throw new ConstructionException("null returned by new_gap"); } - this(cast(GstEvent*) p); + this(cast(GstEvent*) __p); + } + + /** + * Create a new instant-rate-change event. This event is sent by seek + * handlers (e.g. demuxers) when receiving a seek with the + * %GST_SEEK_FLAG_INSTANT_RATE_CHANGE and signals to downstream elements that + * the playback rate in the existing segment should be immediately multiplied + * by the @rate_multiplier factor. + * + * The flags provided replace any flags in the existing segment, for the + * flags within the %GST_SEGMENT_INSTANT_FLAGS set. Other GstSegmentFlags + * are ignored and not transferred in the event. + * + * Params: + * rateMultiplier = the multiplier to be applied to the playback rate + * newFlags = A new subset of segment flags to replace in segments + * + * Returns: the new instant-rate-change event. + * + * Since: 1.18 + * + * Throws: ConstructionException GTK+ fails to create the object. + */ + public this(double rateMultiplier, GstSegmentFlags newFlags) + { + auto __p = gst_event_new_instant_rate_change(rateMultiplier, newFlags); + + if(__p is null) + { + throw new ConstructionException("null returned by new_instant_rate_change"); + } + + this(cast(GstEvent*) __p); + } + + /** + * Create a new instant-rate-sync-time event. This event is sent by the + * pipeline to notify elements handling the instant-rate-change event about + * the running-time when the new rate should be applied. The running time + * may be in the past when elements handle this event, which can lead to + * switching artifacts. The magnitude of those depends on the exact timing + * of event delivery to each element and the magnitude of the change in + * playback rate being applied. + * + * The @running_time and @upstream_running_time are the same if this + * is the first instant-rate adjustment, but will differ for later ones + * to compensate for the accumulated offset due to playing at a rate + * different to the one indicated in the playback segments. + * + * Params: + * rateMultiplier = the new playback rate multiplier to be applied + * runningTime = Running time when the rate change should be applied + * upstreamRunningTime = The upstream-centric running-time when the + * rate change should be applied. + * + * Returns: the new instant-rate-sync-time event. + * + * Since: 1.18 + * + * Throws: ConstructionException GTK+ fails to create the object. + */ + public this(double rateMultiplier, GstClockTime runningTime, GstClockTime upstreamRunningTime) + { + auto __p = gst_event_new_instant_rate_sync_time(rateMultiplier, runningTime, upstreamRunningTime); + + if(__p is null) + { + throw new ConstructionException("null returned by new_instant_rate_sync_time"); + } + + this(cast(GstEvent*) __p); } /** @@ -351,14 +430,14 @@ public class Event */ public this(GstClockTime latency) { - auto p = gst_event_new_latency(latency); + auto __p = gst_event_new_latency(latency); - if(p is null) + if(__p is null) { throw new ConstructionException("null returned by new_latency"); } - this(cast(GstEvent*) p); + this(cast(GstEvent*) __p); } /** @@ -374,14 +453,14 @@ public class Event */ public this(Structure structure) { - auto p = gst_event_new_navigation((structure is null) ? null : structure.getStructureStruct(true)); + auto __p = gst_event_new_navigation((structure is null) ? null : structure.getStructureStruct(true)); - if(p is null) + if(__p is null) { throw new ConstructionException("null returned by new_navigation"); } - this(cast(GstEvent*) p); + this(cast(GstEvent*) __p); } /** @@ -433,14 +512,14 @@ public class Event */ public this(string systemId, Buffer data, string origin) { - auto p = gst_event_new_protection(Str.toStringz(systemId), (data is null) ? null : data.getBufferStruct(), Str.toStringz(origin)); + auto __p = gst_event_new_protection(Str.toStringz(systemId), (data is null) ? null : data.getBufferStruct(), Str.toStringz(origin)); - if(p is null) + if(__p is null) { throw new ConstructionException("null returned by new_protection"); } - this(cast(GstEvent*) p); + this(cast(GstEvent*) __p); } /** @@ -499,14 +578,14 @@ public class Event */ public this(GstQOSType type, double proportion, GstClockTimeDiff diff, GstClockTime timestamp) { - auto p = gst_event_new_qos(type, proportion, diff, timestamp); + auto __p = gst_event_new_qos(type, proportion, diff, timestamp); - if(p is null) + if(__p is null) { throw new ConstructionException("null returned by new_qos"); } - this(cast(GstEvent*) p); + this(cast(GstEvent*) __p); } /** @@ -521,14 +600,14 @@ public class Event */ public this() { - auto p = gst_event_new_reconfigure(); + auto __p = gst_event_new_reconfigure(); - if(p is null) + if(__p is null) { throw new ConstructionException("null returned by new_reconfigure"); } - this(cast(GstEvent*) p); + this(cast(GstEvent*) __p); } /** @@ -579,14 +658,14 @@ public class Event */ public this(double rate, GstFormat format, GstSeekFlags flags, GstSeekType startType, long start, GstSeekType stopType, long stop) { - auto p = gst_event_new_seek(rate, format, flags, startType, start, stopType, stop); + auto __p = gst_event_new_seek(rate, format, flags, startType, start, stopType, stop); - if(p is null) + if(__p is null) { throw new ConstructionException("null returned by new_seek"); } - this(cast(GstEvent*) p); + this(cast(GstEvent*) __p); } /** @@ -631,14 +710,14 @@ public class Event */ public this(Segment segment) { - auto p = gst_event_new_segment((segment is null) ? null : segment.getSegmentStruct()); + auto __p = gst_event_new_segment((segment is null) ? null : segment.getSegmentStruct()); - if(p is null) + if(__p is null) { throw new ConstructionException("null returned by new_segment"); } - this(cast(GstEvent*) p); + this(cast(GstEvent*) __p); } /** @@ -655,14 +734,14 @@ public class Event */ public this(GstFormat format, long position) { - auto p = gst_event_new_segment_done(format, position); + auto __p = gst_event_new_segment_done(format, position); - if(p is null) + if(__p is null) { throw new ConstructionException("null returned by new_segment_done"); } - this(cast(GstEvent*) p); + this(cast(GstEvent*) __p); } /** @@ -690,14 +769,14 @@ public class Event */ public this(ListG streams) { - auto p = gst_event_new_select_streams((streams is null) ? null : streams.getListGStruct()); + auto __p = gst_event_new_select_streams((streams is null) ? null : streams.getListGStruct()); - if(p is null) + if(__p is null) { throw new ConstructionException("null returned by new_select_streams"); } - this(cast(GstEvent*) p); + this(cast(GstEvent*) __p); } /** @@ -717,14 +796,14 @@ public class Event */ public this(string name, Message msg) { - auto p = gst_event_new_sink_message(Str.toStringz(name), (msg is null) ? null : msg.getMessageStruct()); + auto __p = gst_event_new_sink_message(Str.toStringz(name), (msg is null) ? null : msg.getMessageStruct()); - if(p is null) + if(__p is null) { throw new ConstructionException("null returned by new_sink_message"); } - this(cast(GstEvent*) p); + this(cast(GstEvent*) __p); } /** @@ -755,14 +834,14 @@ public class Event */ public this(GstFormat format, ulong amount, double rate, bool flush, bool intermediate) { - auto p = gst_event_new_step(format, amount, rate, flush, intermediate); + auto __p = gst_event_new_step(format, amount, rate, flush, intermediate); - if(p is null) + if(__p is null) { throw new ConstructionException("null returned by new_step"); } - this(cast(GstEvent*) p); + this(cast(GstEvent*) __p); } /** @@ -786,14 +865,14 @@ public class Event */ public this(StreamCollection collection) { - auto p = gst_event_new_stream_collection((collection is null) ? null : collection.getStreamCollectionStruct()); + auto __p = gst_event_new_stream_collection((collection is null) ? null : collection.getStreamCollectionStruct()); - if(p is null) + if(__p is null) { throw new ConstructionException("null returned by new_stream_collection"); } - this(cast(GstEvent*) p); + this(cast(GstEvent*) __p); } /** @@ -818,14 +897,14 @@ public class Event */ public this(uint groupId) { - auto p = gst_event_new_stream_group_done(groupId); + auto __p = gst_event_new_stream_group_done(groupId); - if(p is null) + if(__p is null) { throw new ConstructionException("null returned by new_stream_group_done"); } - this(cast(GstEvent*) p); + this(cast(GstEvent*) __p); } /** @@ -860,14 +939,14 @@ public class Event */ public this(string streamId) { - auto p = gst_event_new_stream_start(Str.toStringz(streamId)); + auto __p = gst_event_new_stream_start(Str.toStringz(streamId)); - if(p is null) + if(__p is null) { throw new ConstructionException("null returned by new_stream_start"); } - this(cast(GstEvent*) p); + this(cast(GstEvent*) __p); } /** @@ -889,14 +968,14 @@ public class Event */ public this(TagList taglist) { - auto p = gst_event_new_tag((taglist is null) ? null : taglist.getTagListStruct()); + auto __p = gst_event_new_tag((taglist is null) ? null : taglist.getTagListStruct(true)); - if(p is null) + if(__p is null) { throw new ConstructionException("null returned by new_tag"); } - this(cast(GstEvent*) p); + this(cast(GstEvent*) __p); } /** @@ -913,14 +992,31 @@ public class Event */ public this(Toc toc, bool updated) { - auto p = gst_event_new_toc((toc is null) ? null : toc.getTocStruct(), updated); + auto __p = gst_event_new_toc((toc is null) ? null : toc.getTocStruct(), updated); - if(p is null) + if(__p is null) { throw new ConstructionException("null returned by new_toc"); } - this(cast(GstEvent*) p); + this(cast(GstEvent*) __p); + } + + /** + * Copy the event using the event specific copy function. + * + * Returns: the new event + */ + public Event copy() + { + auto __p = gst_event_copy(gstEvent); + + if(__p is null) + { + return null; + } + + return ObjectG.getDObject!(Event)(cast(GstEvent*) __p, true); } /** @@ -991,14 +1087,14 @@ public class Event */ public Structure getStructure() { - auto p = gst_event_get_structure(gstEvent); + auto __p = gst_event_get_structure(gstEvent); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Structure)(cast(GstStructure*) p); + return ObjectG.getDObject!(Structure)(cast(GstStructure*) __p); } /** @@ -1015,6 +1111,22 @@ public class Event return gst_event_has_name(gstEvent, Str.toStringz(name)) != 0; } + /** + * Checks if @event has the given @name. This function is usually used to + * check the name of a custom event. + * + * Params: + * name = name to check as a GQuark + * + * Returns: %TRUE if @name matches the name of the event structure. + * + * Since: 1.18 + */ + public bool hasNameId(GQuark name) + { + return gst_event_has_name_id(gstEvent, name) != 0; + } + /** * Get the format, minsize, maxsize and async-flag in the buffersize event. * @@ -1078,6 +1190,20 @@ public class Event gst_event_parse_gap(gstEvent, ×tamp, &duration); } + /** + * Retrieve the gap flags that may have been set on a gap event with + * gst_event_set_gap_flags(). + * + * Params: + * flags = a #GstGapFlags or %NULL + * + * Since: 1.20 + */ + public void parseGapFlags(out GstGapFlags flags) + { + gst_event_parse_gap_flags(gstEvent, &flags); + } + /** * * Params: @@ -1092,6 +1218,40 @@ public class Event return gst_event_parse_group_id(gstEvent, &groupId) != 0; } + /** + * Extract rate and flags from an instant-rate-change event. + * + * Params: + * rateMultiplier = location in which to store the rate + * multiplier of the instant-rate-change event, or %NULL + * newFlags = location in which to store the new + * segment flags of the instant-rate-change event, or %NULL + * + * Since: 1.18 + */ + public void parseInstantRateChange(out double rateMultiplier, out GstSegmentFlags newFlags) + { + gst_event_parse_instant_rate_change(gstEvent, &rateMultiplier, &newFlags); + } + + /** + * Extract the rate multiplier and running times from an instant-rate-sync-time event. + * + * Params: + * rateMultiplier = location where to store the rate of + * the instant-rate-sync-time event, or %NULL + * runningTime = location in which to store the running time + * of the instant-rate-sync-time event, or %NULL + * upstreamRunningTime = location in which to store the + * upstream running time of the instant-rate-sync-time event, or %NULL + * + * Since: 1.18 + */ + public void parseInstantRateSyncTime(out double rateMultiplier, out GstClockTime runningTime, out GstClockTime upstreamRunningTime) + { + gst_event_parse_instant_rate_sync_time(gstEvent, &rateMultiplier, &runningTime, &upstreamRunningTime); + } + /** * Get the latency in the latency event. * @@ -1383,6 +1543,38 @@ public class Event uid = Str.toString(outuid); } + alias doref = ref_; + /** + * Increase the refcount of this event. + * + * Returns: @event (for convenience when doing assignments) + */ + public Event ref_() + { + auto __p = gst_event_ref(gstEvent); + + if(__p is null) + { + return null; + } + + return ObjectG.getDObject!(Event)(cast(GstEvent*) __p, true); + } + + /** + * Sets @flags on @event to give additional information about the reason for + * the #GST_EVENT_GAP. + * + * Params: + * flags = a #GstGapFlags + * + * Since: 1.20 + */ + public void setGapFlags(GstGapFlags flags) + { + gst_event_set_gap_flags(gstEvent, flags); + } + /** * All streams that have the same group id are supposed to be played * together, i.e. all streams inside a container file should have the @@ -1466,6 +1658,14 @@ public class Event gst_event_set_stream_flags(gstEvent, flags); } + /** + * Decrease the refcount of an event, freeing it if the refcount reaches 0. + */ + public void unref() + { + gst_event_unref(gstEvent); + } + /** * Get a writable version of the structure. * @@ -1479,14 +1679,93 @@ public class Event */ public Structure writableStructure() { - auto p = gst_event_writable_structure(gstEvent); + auto __p = gst_event_writable_structure(gstEvent); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Structure)(cast(GstStructure*) p); + return ObjectG.getDObject!(Structure)(cast(GstStructure*) __p); + } + + /** + * Modifies a pointer to a #GstEvent to point to a different #GstEvent. The + * modification is done atomically (so this is useful for ensuring thread safety + * in some cases), and the reference counts are updated appropriately (the old + * event is unreffed, the new one is reffed). + * + * Either @new_event or the #GstEvent pointed to by @old_event may be %NULL. + * + * Params: + * oldEvent = pointer to a + * pointer to a #GstEvent to be replaced. + * newEvent = pointer to a #GstEvent that will + * replace the event pointed to by @old_event. + * + * Returns: %TRUE if @new_event was different from @old_event + */ + public static bool replace(ref Event oldEvent, Event newEvent) + { + GstEvent* outoldEvent = oldEvent.getEventStruct(); + + auto __p = gst_event_replace(&outoldEvent, (newEvent is null) ? null : newEvent.getEventStruct()) != 0; + + oldEvent = ObjectG.getDObject!(Event)(outoldEvent); + + return __p; + } + + /** + * Atomically replace the #GstEvent pointed to by @old_event with %NULL and + * return the original event. + * + * Params: + * oldEvent = pointer to a + * pointer to a #GstEvent to be stolen. + * + * Returns: the #GstEvent that was in @old_event + */ + public static Event steal(ref Event oldEvent) + { + GstEvent* outoldEvent = oldEvent.getEventStruct(); + + auto __p = gst_event_steal(&outoldEvent); + + oldEvent = ObjectG.getDObject!(Event)(outoldEvent); + + if(__p is null) + { + return null; + } + + return ObjectG.getDObject!(Event)(cast(GstEvent*) __p, true); + } + + /** + * Modifies a pointer to a #GstEvent to point to a different #GstEvent. This + * function is similar to gst_event_replace() except that it takes ownership of + * @new_event. + * + * Either @new_event or the #GstEvent pointed to by @old_event may be %NULL. + * + * Params: + * oldEvent = pointer to a + * pointer to a #GstEvent to be stolen. + * newEvent = pointer to a #GstEvent that will + * replace the event pointed to by @old_event. + * + * Returns: %TRUE if @new_event was different from @old_event + */ + public static bool take(ref Event oldEvent, Event newEvent) + { + GstEvent* outoldEvent = oldEvent.getEventStruct(); + + auto __p = gst_event_take(&outoldEvent, (newEvent is null) ? null : newEvent.getEventStruct(true)) != 0; + + oldEvent = ObjectG.getDObject!(Event)(outoldEvent); + + return __p; } /** diff --git a/generated/gstreamer/gstreamer/FlagSet.d b/generated/gstreamer/gstreamer/FlagSet.d index 737214313..249a5be25 100644 --- a/generated/gstreamer/gstreamer/FlagSet.d +++ b/generated/gstreamer/gstreamer/FlagSet.d @@ -29,7 +29,10 @@ public import gstreamer.c.types; public import gstreamerc.gstreamertypes; -/** */ +/** + * A fundamental type that describes a 32-bit flag bitfield, with 32-bit + * mask indicating which of the bits in the field are explicitly set. + */ public class FlagSet { /** the main Gtk struct */ diff --git a/generated/gstreamer/gstreamer/Format.d b/generated/gstreamer/gstreamer/Format.d index d80a576df..417d9a7ab 100644 --- a/generated/gstreamer/gstreamer/Format.d +++ b/generated/gstreamer/gstreamer/Format.d @@ -25,6 +25,7 @@ module gstreamer.Format; private import glib.Str; +private import glib.c.functions; private import gobject.ObjectG; private import gstreamer.Iterator; private import gstreamer.c.functions; @@ -88,14 +89,14 @@ public struct Format */ public static Iterator iterateDefinitions() { - auto p = gst_format_iterate_definitions(); + auto __p = gst_format_iterate_definitions(); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Iterator)(cast(GstIterator*) p, true); + return ObjectG.getDObject!(Iterator)(cast(GstIterator*) __p, true); } /** diff --git a/generated/gstreamer/gstreamer/Fraction.d b/generated/gstreamer/gstreamer/Fraction.d index d34281f7d..d1eaf657f 100644 --- a/generated/gstreamer/gstreamer/Fraction.d +++ b/generated/gstreamer/gstreamer/Fraction.d @@ -29,7 +29,10 @@ public import gstreamer.c.types; public import gstreamerc.gstreamertypes; -/** */ +/** + * A fundamental type that describes a fraction of an integer numerator + * over an integer denominator + */ public class Fraction { /** the main Gtk struct */ diff --git a/generated/gstreamer/gstreamer/FractionRange.d b/generated/gstreamer/gstreamer/FractionRange.d index 8132e1098..dd9aac716 100644 --- a/generated/gstreamer/gstreamer/FractionRange.d +++ b/generated/gstreamer/gstreamer/FractionRange.d @@ -29,7 +29,9 @@ public import gstreamer.c.types; public import gstreamerc.gstreamertypes; -/** */ +/** + * A fundamental type that describes a #GstFractionRange range + */ public class FractionRange { /** the main Gtk struct */ diff --git a/generated/gstreamer/gstreamer/GError.d b/generated/gstreamer/gstreamer/GError.d index ea5a98ed4..7a1588a5c 100644 --- a/generated/gstreamer/gstreamer/GError.d +++ b/generated/gstreamer/gstreamer/GError.d @@ -25,6 +25,7 @@ module gstreamer.GError; private import glib.Str; +private import glib.c.functions; private import gstreamer.c.functions; public import gstreamer.c.types; public import gstreamerc.gstreamertypes; diff --git a/generated/gstreamer/gstreamer/GStreamer.d b/generated/gstreamer/gstreamer/GStreamer.d index c960910e8..60b640243 100644 --- a/generated/gstreamer/gstreamer/GStreamer.d +++ b/generated/gstreamer/gstreamer/GStreamer.d @@ -28,6 +28,7 @@ private import glib.ErrorG; private import glib.GException; private import glib.OptionGroup; private import glib.Str; +private import glib.c.functions; private import gstreamer.c.functions; public import gstreamer.c.types; public import gstreamerc.gstreamertypes; @@ -63,9 +64,9 @@ public struct GStreamer * Running GStreamer Applications * for how to disable automatic registry updates. * - * > This function will terminate your program if it was unable to initialize - * > GStreamer for some reason. If you want your program to fall back, - * > use gst_init_check() instead. + * WARNING: This function will terminate your program if it was unable to + * initialize GStreamer for some reason. If you want your program to fall back, + * use gst_init_check() instead. * * WARNING: This function does not work in the same way as corresponding * functions in other glib-style libraries, such as gtk_init\(\). In @@ -106,7 +107,7 @@ public struct GStreamer char** outargv = Str.toStringzArray(argv); GError* err = null; - auto p = gst_init_check(&argc, &outargv, &err) != 0; + auto __p = gst_init_check(&argc, &outargv, &err) != 0; if (err !is null) { @@ -115,7 +116,7 @@ public struct GStreamer argv = Str.toStringArray(outargv, argc); - return p; + return __p; } /** @@ -135,14 +136,14 @@ public struct GStreamer */ public static OptionGroup initGetOptionGroup() { - auto p = gst_init_get_option_group(); + auto __p = gst_init_get_option_group(); - if(p is null) + if(__p is null) { return null; } - return new OptionGroup(cast(GOptionGroup*) p, true); + return new OptionGroup(cast(GOptionGroup*) __p, true); } /** diff --git a/generated/gstreamer/gstreamer/GhostPad.d b/generated/gstreamer/gstreamer/GhostPad.d index 6eb48add9..dc202f195 100644 --- a/generated/gstreamer/gstreamer/GhostPad.d +++ b/generated/gstreamer/gstreamer/GhostPad.d @@ -103,14 +103,14 @@ public class GhostPad : ProxyPad */ public this(string name, Pad target) { - auto p = gst_ghost_pad_new(Str.toStringz(name), (target is null) ? null : target.getPadStruct()); + auto __p = gst_ghost_pad_new(Str.toStringz(name), (target is null) ? null : target.getPadStruct()); - if(p is null) + if(__p is null) { throw new ConstructionException("null returned by new"); } - this(cast(GstGhostPad*) p); + this(cast(GstGhostPad*) __p); } /** @@ -131,14 +131,14 @@ public class GhostPad : ProxyPad */ public this(string name, Pad target, PadTemplate templ) { - auto p = gst_ghost_pad_new_from_template(Str.toStringz(name), (target is null) ? null : target.getPadStruct(), (templ is null) ? null : templ.getPadTemplateStruct()); + auto __p = gst_ghost_pad_new_from_template(Str.toStringz(name), (target is null) ? null : target.getPadStruct(), (templ is null) ? null : templ.getPadTemplateStruct()); - if(p is null) + if(__p is null) { throw new ConstructionException("null returned by new_from_template"); } - this(cast(GstGhostPad*) p); + this(cast(GstGhostPad*) __p); } /** @@ -159,14 +159,14 @@ public class GhostPad : ProxyPad */ public this(string name, GstPadDirection dir) { - auto p = gst_ghost_pad_new_no_target(Str.toStringz(name), dir); + auto __p = gst_ghost_pad_new_no_target(Str.toStringz(name), dir); - if(p is null) + if(__p is null) { throw new ConstructionException("null returned by new_no_target"); } - this(cast(GstGhostPad*) p); + this(cast(GstGhostPad*) __p); } /** @@ -184,14 +184,14 @@ public class GhostPad : ProxyPad */ public this(string name, PadTemplate templ) { - auto p = gst_ghost_pad_new_no_target_from_template(Str.toStringz(name), (templ is null) ? null : templ.getPadTemplateStruct()); + auto __p = gst_ghost_pad_new_no_target_from_template(Str.toStringz(name), (templ is null) ? null : templ.getPadTemplateStruct()); - if(p is null) + if(__p is null) { throw new ConstructionException("null returned by new_no_target_from_template"); } - this(cast(GstGhostPad*) p); + this(cast(GstGhostPad*) __p); } /** @@ -235,6 +235,9 @@ public class GhostPad : ProxyPad * function. Call this function directly after a call to g_object_new * (GST_TYPE_GHOST_PAD, "direction", @dir, ..., NULL). * + * Deprecated: This function is deprecated since 1.18 and does nothing + * anymore. + * * Returns: %TRUE if the construction succeeds, %FALSE otherwise. */ public bool construct() @@ -251,14 +254,14 @@ public class GhostPad : ProxyPad */ public Pad getTarget() { - auto p = gst_ghost_pad_get_target(gstGhostPad); + auto __p = gst_ghost_pad_get_target(gstGhostPad); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Pad)(cast(GstPad*) p, true); + return ObjectG.getDObject!(Pad)(cast(GstPad*) __p, true); } /** diff --git a/generated/gstreamer/gstreamer/Int64Range.d b/generated/gstreamer/gstreamer/Int64Range.d index c45a4acd3..689871a71 100644 --- a/generated/gstreamer/gstreamer/Int64Range.d +++ b/generated/gstreamer/gstreamer/Int64Range.d @@ -29,7 +29,9 @@ public import gstreamer.c.types; public import gstreamerc.gstreamertypes; -/** */ +/** + * A fundamental type that describes a #gint64 range + */ public class Int64Range { /** the main Gtk struct */ diff --git a/generated/gstreamer/gstreamer/IntRange.d b/generated/gstreamer/gstreamer/IntRange.d index 42710239a..a4275e241 100644 --- a/generated/gstreamer/gstreamer/IntRange.d +++ b/generated/gstreamer/gstreamer/IntRange.d @@ -29,7 +29,9 @@ public import gstreamer.c.types; public import gstreamerc.gstreamertypes; -/** */ +/** + * A fundamental type that describes a #gint range + */ public class IntRange { /** the main Gtk struct */ diff --git a/generated/gstreamer/gstreamer/Iterator.d b/generated/gstreamer/gstreamer/Iterator.d index 078b8c772..8f41b522c 100644 --- a/generated/gstreamer/gstreamer/Iterator.d +++ b/generated/gstreamer/gstreamer/Iterator.d @@ -54,10 +54,10 @@ private import gtkd.Loader; * GValue item = G_VALUE_INIT; * done = FALSE; * while (!done) { - * switch (gst_iterator_next (it, &item)) { + * switch (gst_iterator_next (it, &item)) { * case GST_ITERATOR_OK: * ...get/use/change item here... - * g_value_reset (&item); + * g_value_reset (&item); * break; * case GST_ITERATOR_RESYNC: * ...rollback changes to items... @@ -72,7 +72,7 @@ private import gtkd.Loader; * break; * } * } - * g_value_unset (&item); + * g_value_unset (&item); * gst_iterator_free (it); * ]| */ @@ -145,14 +145,14 @@ public class Iterator */ public this(uint size, GType type, Mutex lock, uint* masterCookie, GstIteratorCopyFunction copy, GstIteratorNextFunction next, GstIteratorItemFunction item, GstIteratorResyncFunction resync, GstIteratorFreeFunction free) { - auto p = gst_iterator_new(size, type, (lock is null) ? null : lock.getMutexStruct(), masterCookie, copy, next, item, resync, free); + auto __p = gst_iterator_new(size, type, (lock is null) ? null : lock.getMutexStruct(), masterCookie, copy, next, item, resync, free); - if(p is null) + if(__p is null) { throw new ConstructionException("null returned by new"); } - this(cast(GstIterator*) p); + this(cast(GstIterator*) __p); } /** @@ -188,16 +188,16 @@ public class Iterator { GList* outlist = list.getListGStruct(); - auto p = gst_iterator_new_list(type, (lock is null) ? null : lock.getMutexStruct(), masterCookie, &outlist, (owner is null) ? null : owner.getObjectGStruct(), item); + auto __p = gst_iterator_new_list(type, (lock is null) ? null : lock.getMutexStruct(), masterCookie, &outlist, (owner is null) ? null : owner.getObjectGStruct(), item); - if(p is null) + if(__p is null) { throw new ConstructionException("null returned by new_list"); } list = new ListG(outlist); - this(cast(GstIterator*) p); + this(cast(GstIterator*) __p); } /** @@ -216,14 +216,14 @@ public class Iterator */ public this(GType type, Value object) { - auto p = gst_iterator_new_single(type, (object is null) ? null : object.getValueStruct()); + auto __p = gst_iterator_new_single(type, (object is null) ? null : object.getValueStruct()); - if(p is null) + if(__p is null) { throw new ConstructionException("null returned by new_single"); } - this(cast(GstIterator*) p); + this(cast(GstIterator*) __p); } /** @@ -233,14 +233,14 @@ public class Iterator */ public Iterator copy() { - auto p = gst_iterator_copy(gstIterator); + auto __p = gst_iterator_copy(gstIterator); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Iterator)(cast(GstIterator*) p, true); + return ObjectG.getDObject!(Iterator)(cast(GstIterator*) __p, true); } /** @@ -262,14 +262,14 @@ public class Iterator */ public Iterator filter(GCompareFunc func, Value userData) { - auto p = gst_iterator_filter(gstIterator, func, (userData is null) ? null : userData.getValueStruct()); + auto __p = gst_iterator_filter(gstIterator, func, (userData is null) ? null : userData.getValueStruct()); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Iterator)(cast(GstIterator*) p, true); + return ObjectG.getDObject!(Iterator)(cast(GstIterator*) __p, true); } /** @@ -297,11 +297,11 @@ public class Iterator { GValue* outelem = sliceNew!GValue(); - auto p = gst_iterator_find_custom(gstIterator, func, outelem, userData) != 0; + auto __p = gst_iterator_find_custom(gstIterator, func, outelem, userData) != 0; elem = ObjectG.getDObject!(Value)(outelem, true); - return p; + return __p; } /** @@ -394,11 +394,11 @@ public class Iterator { GValue* outelem = sliceNew!GValue(); - auto p = gst_iterator_next(gstIterator, outelem); + auto __p = gst_iterator_next(gstIterator, outelem); elem = ObjectG.getDObject!(Value)(outelem, true); - return p; + return __p; } /** diff --git a/generated/gstreamer/gstreamer/Memory.d b/generated/gstreamer/gstreamer/Memory.d index 9d2142b0e..df7ff8bb7 100644 --- a/generated/gstreamer/gstreamer/Memory.d +++ b/generated/gstreamer/gstreamer/Memory.d @@ -31,6 +31,7 @@ private import gstreamer.Allocator; private import gstreamer.c.functions; public import gstreamer.c.types; public import gstreamerc.gstreamertypes; +private import gtkd.Loader; /** @@ -100,6 +101,12 @@ public class Memory this.ownedRef = ownedRef; } + ~this () + { + if ( Linker.isLoaded(LIBRARY_GSTREAMER) && ownedRef ) + gst_memory_unref(gstMemory); + } + /** */ public static GType getType() @@ -128,14 +135,14 @@ public class Memory */ public this(GstMemoryFlags flags, ubyte[] data, size_t maxsize, size_t offset, void* userData, GDestroyNotify notify) { - auto p = gst_memory_new_wrapped(flags, data.ptr, maxsize, offset, cast(size_t)data.length, userData, notify); + auto __p = gst_memory_new_wrapped(flags, data.ptr, maxsize, offset, cast(size_t)data.length, userData, notify); - if(p is null) + if(__p is null) { throw new ConstructionException("null returned by new_wrapped"); } - this(cast(GstMemory*) p); + this(cast(GstMemory*) __p); } /** @@ -151,14 +158,14 @@ public class Memory */ public Memory copy(ptrdiff_t offset, ptrdiff_t size) { - auto p = gst_memory_copy(gstMemory, offset, size); + auto __p = gst_memory_copy(gstMemory, offset, size); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Memory)(cast(GstMemory*) p, true); + return ObjectG.getDObject!(Memory)(cast(GstMemory*) __p, true); } /** @@ -168,7 +175,7 @@ public class Memory * offset = pointer to offset * maxsize = pointer to maxsize * - * Returns: the current sizes of @mem + * Returns: the current size of @mem */ public size_t getSizes(out size_t offset, out size_t maxsize) { @@ -244,14 +251,14 @@ public class Memory */ public Memory makeMapped(out GstMapInfo info, GstMapFlags flags) { - auto p = gst_memory_make_mapped(gstMemory, &info, flags); + auto __p = gst_memory_make_mapped(gstMemory, &info, flags); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Memory)(cast(GstMemory*) p, true); + return ObjectG.getDObject!(Memory)(cast(GstMemory*) __p, true); } /** @@ -279,6 +286,24 @@ public class Memory return gst_memory_map(gstMemory, &info, flags) != 0; } + alias doref = ref_; + /** + * Increase the refcount of this memory. + * + * Returns: @memory (for convenience when doing assignments) + */ + public Memory ref_() + { + auto __p = gst_memory_ref(gstMemory); + + if(__p is null) + { + return null; + } + + return ObjectG.getDObject!(Memory)(cast(GstMemory*) __p, true); + } + /** * Resize the memory region. @mem should be writable and offset + size should be * less than the maxsize of @mem. @@ -309,14 +334,14 @@ public class Memory */ public Memory share(ptrdiff_t offset, ptrdiff_t size) { - auto p = gst_memory_share(gstMemory, offset, size); + auto __p = gst_memory_share(gstMemory, offset, size); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Memory)(cast(GstMemory*) p, true); + return ObjectG.getDObject!(Memory)(cast(GstMemory*) __p, true); } /** @@ -329,4 +354,12 @@ public class Memory { gst_memory_unmap(gstMemory, info); } + + /** + * Decrease the refcount of a memory, freeing it if the refcount reaches 0. + */ + public void unref() + { + gst_memory_unref(gstMemory); + } } diff --git a/generated/gstreamer/gstreamer/Message.d b/generated/gstreamer/gstreamer/Message.d index bb20be6b3..994b630bf 100644 --- a/generated/gstreamer/gstreamer/Message.d +++ b/generated/gstreamer/gstreamer/Message.d @@ -27,6 +27,7 @@ module gstreamer.Message; private import glib.ConstructionException; private import glib.ErrorG; private import glib.Str; +private import glib.c.functions; private import gobject.ObjectG; private import gobject.Value; private import gstreamer.Clock; @@ -42,6 +43,7 @@ private import gstreamer.Toc; private import gstreamer.c.functions; public import gstreamer.c.types; public import gstreamerc.gstreamertypes; +private import gtkd.Loader; /** @@ -90,6 +92,12 @@ public class Message this.ownedRef = ownedRef; } + ~this () + { + if ( Linker.isLoaded(LIBRARY_GSTREAMER) && ownedRef ) + gst_message_unref(gstMessage); + } + /** * Get the type of the message. */ @@ -639,14 +647,14 @@ public class Message */ public this(ObjectGst src, Structure structure) { - auto p = gst_message_new_application((src is null) ? null : src.getObjectGstStruct(), (structure is null) ? null : structure.getStructureStruct(true)); + auto __p = gst_message_new_application((src is null) ? null : src.getObjectGstStruct(), (structure is null) ? null : structure.getStructureStruct(true)); - if(p is null) + if(__p is null) { throw new ConstructionException("null returned by new_application"); } - this(cast(GstMessage*) p); + this(cast(GstMessage*) __p); } /** @@ -668,14 +676,14 @@ public class Message */ public this(ObjectGst src, GstClockTime runningTime) { - auto p = gst_message_new_async_done((src is null) ? null : src.getObjectGstStruct(), runningTime); + auto __p = gst_message_new_async_done((src is null) ? null : src.getObjectGstStruct(), runningTime); - if(p is null) + if(__p is null) { throw new ConstructionException("null returned by new_async_done"); } - this(cast(GstMessage*) p); + this(cast(GstMessage*) __p); } /** @@ -702,14 +710,14 @@ public class Message */ public this(ObjectGst src, int percent) { - auto p = gst_message_new_buffering((src is null) ? null : src.getObjectGstStruct(), percent); + auto __p = gst_message_new_buffering((src is null) ? null : src.getObjectGstStruct(), percent); - if(p is null) + if(__p is null) { throw new ConstructionException("null returned by new_buffering"); } - this(cast(GstMessage*) p); + this(cast(GstMessage*) __p); } /** @@ -732,14 +740,14 @@ public class Message */ public this(ObjectGst src, Clock clock) { - auto p = gst_message_new_clock_lost((src is null) ? null : src.getObjectGstStruct(), (clock is null) ? null : clock.getClockStruct()); + auto __p = gst_message_new_clock_lost((src is null) ? null : src.getObjectGstStruct(), (clock is null) ? null : clock.getClockStruct()); - if(p is null) + if(__p is null) { throw new ConstructionException("null returned by new_clock_lost"); } - this(cast(GstMessage*) p); + this(cast(GstMessage*) __p); } /** @@ -763,14 +771,14 @@ public class Message */ public this(ObjectGst src, Clock clock, bool ready) { - auto p = gst_message_new_clock_provide((src is null) ? null : src.getObjectGstStruct(), (clock is null) ? null : clock.getClockStruct(), ready); + auto __p = gst_message_new_clock_provide((src is null) ? null : src.getObjectGstStruct(), (clock is null) ? null : clock.getClockStruct(), ready); - if(p is null) + if(__p is null) { throw new ConstructionException("null returned by new_clock_provide"); } - this(cast(GstMessage*) p); + this(cast(GstMessage*) __p); } /** @@ -792,14 +800,14 @@ public class Message */ public this(GstMessageType type, ObjectGst src, Structure structure) { - auto p = gst_message_new_custom(type, (src is null) ? null : src.getObjectGstStruct(), (structure is null) ? null : structure.getStructureStruct(true)); + auto __p = gst_message_new_custom(type, (src is null) ? null : src.getObjectGstStruct(), (structure is null) ? null : structure.getStructureStruct(true)); - if(p is null) + if(__p is null) { throw new ConstructionException("null returned by new_custom"); } - this(cast(GstMessage*) p); + this(cast(GstMessage*) __p); } /** @@ -820,14 +828,14 @@ public class Message */ public this(ObjectGst src, Device device, Device changedDevice) { - auto p = gst_message_new_device_changed((src is null) ? null : src.getObjectGstStruct(), (device is null) ? null : device.getDeviceStruct(), (changedDevice is null) ? null : changedDevice.getDeviceStruct()); + auto __p = gst_message_new_device_changed((src is null) ? null : src.getObjectGstStruct(), (device is null) ? null : device.getDeviceStruct(), (changedDevice is null) ? null : changedDevice.getDeviceStruct()); - if(p is null) + if(__p is null) { throw new ConstructionException("null returned by new_device_changed"); } - this(cast(GstMessage*) p); + this(cast(GstMessage*) __p); } /** @@ -847,14 +855,44 @@ public class Message */ public this(ObjectGst src, Context context) { - auto p = gst_message_new_have_context((src is null) ? null : src.getObjectGstStruct(), (context is null) ? null : context.getContextStruct()); + auto __p = gst_message_new_have_context((src is null) ? null : src.getObjectGstStruct(), (context is null) ? null : context.getContextStruct(true)); - if(p is null) + if(__p is null) { throw new ConstructionException("null returned by new_have_context"); } - this(cast(GstMessage*) p); + this(cast(GstMessage*) __p); + } + + /** + * Creates a new instant-rate-request message. Elements handling the + * instant-rate-change event must post this message. The message is + * handled at the pipeline, and allows the pipeline to select the + * running time when the rate change should happen and to send an + * @GST_EVENT_INSTANT_RATE_SYNC_TIME event to notify the elements + * in the pipeline. + * + * Params: + * src = The #GstObject that posted the message + * rateMultiplier = the rate multiplier factor that should be applied + * + * Returns: a newly allocated #GstMessage + * + * Since: 1.18 + * + * Throws: ConstructionException GTK+ fails to create the object. + */ + public this(ObjectGst src, double rateMultiplier) + { + auto __p = gst_message_new_instant_rate_request((src is null) ? null : src.getObjectGstStruct(), rateMultiplier); + + if(__p is null) + { + throw new ConstructionException("null returned by new_instant_rate_request"); + } + + this(cast(GstMessage*) __p); } /** @@ -874,14 +912,14 @@ public class Message */ public this(ObjectGst src, string contextType) { - auto p = gst_message_new_need_context((src is null) ? null : src.getObjectGstStruct(), Str.toStringz(contextType)); + auto __p = gst_message_new_need_context((src is null) ? null : src.getObjectGstStruct(), Str.toStringz(contextType)); - if(p is null) + if(__p is null) { throw new ConstructionException("null returned by new_need_context"); } - this(cast(GstMessage*) p); + this(cast(GstMessage*) __p); } /** @@ -903,14 +941,14 @@ public class Message */ public this(ObjectGst src, GstProgressType type, string code, string text) { - auto p = gst_message_new_progress((src is null) ? null : src.getObjectGstStruct(), type, Str.toStringz(code), Str.toStringz(text)); + auto __p = gst_message_new_progress((src is null) ? null : src.getObjectGstStruct(), type, Str.toStringz(code), Str.toStringz(text)); - if(p is null) + if(__p is null) { throw new ConstructionException("null returned by new_progress"); } - this(cast(GstMessage*) p); + this(cast(GstMessage*) __p); } /** @@ -927,14 +965,14 @@ public class Message */ public this(ObjectGst src, string propertyName, Value val) { - auto p = gst_message_new_property_notify((src is null) ? null : src.getObjectGstStruct(), Str.toStringz(propertyName), (val is null) ? null : val.getValueStruct()); + auto __p = gst_message_new_property_notify((src is null) ? null : src.getObjectGstStruct(), Str.toStringz(propertyName), (val is null) ? null : val.getValueStruct()); - if(p is null) + if(__p is null) { throw new ConstructionException("null returned by new_property_notify"); } - this(cast(GstMessage*) p); + this(cast(GstMessage*) __p); } /** @@ -968,14 +1006,14 @@ public class Message */ public this(ObjectGst src, bool live, ulong runningTime, ulong streamTime, ulong timestamp, ulong duration) { - auto p = gst_message_new_qos((src is null) ? null : src.getObjectGstStruct(), live, runningTime, streamTime, timestamp, duration); + auto __p = gst_message_new_qos((src is null) ? null : src.getObjectGstStruct(), live, runningTime, streamTime, timestamp, duration); - if(p is null) + if(__p is null) { throw new ConstructionException("null returned by new_qos"); } - this(cast(GstMessage*) p); + this(cast(GstMessage*) __p); } /** @@ -995,8 +1033,8 @@ public class Message * such as bitrate statistics for the given location. * * By default, message recipients should treat entries in the order they are - * stored. The recipient should therefore try entry #0 first, and if this - * entry is not acceptable or working, try entry #1 etc. Senders must make + * stored. The recipient should therefore try entry \#0 first, and if this + * entry is not acceptable or working, try entry \#1 etc. Senders must make * sure that they add entries in this order. However, recipients are free to * ignore the order and pick an entry that is "best" for them. One example * would be a recipient that scans the entries for the one with the highest @@ -1019,14 +1057,14 @@ public class Message */ public this(ObjectGst src, string location, TagList tagList, Structure entryStruct) { - auto p = gst_message_new_redirect((src is null) ? null : src.getObjectGstStruct(), Str.toStringz(location), (tagList is null) ? null : tagList.getTagListStruct(), (entryStruct is null) ? null : entryStruct.getStructureStruct(true)); + auto __p = gst_message_new_redirect((src is null) ? null : src.getObjectGstStruct(), Str.toStringz(location), (tagList is null) ? null : tagList.getTagListStruct(true), (entryStruct is null) ? null : entryStruct.getStructureStruct(true)); - if(p is null) + if(__p is null) { throw new ConstructionException("null returned by new_redirect"); } - this(cast(GstMessage*) p); + this(cast(GstMessage*) __p); } /** @@ -1046,14 +1084,14 @@ public class Message */ public this(ObjectGst src, GstState state) { - auto p = gst_message_new_request_state((src is null) ? null : src.getObjectGstStruct(), state); + auto __p = gst_message_new_request_state((src is null) ? null : src.getObjectGstStruct(), state); - if(p is null) + if(__p is null) { throw new ConstructionException("null returned by new_request_state"); } - this(cast(GstMessage*) p); + this(cast(GstMessage*) __p); } /** @@ -1074,14 +1112,14 @@ public class Message */ public this(ObjectGst src, GstState oldstate, GstState newstate, GstState pending) { - auto p = gst_message_new_state_changed((src is null) ? null : src.getObjectGstStruct(), oldstate, newstate, pending); + auto __p = gst_message_new_state_changed((src is null) ? null : src.getObjectGstStruct(), oldstate, newstate, pending); - if(p is null) + if(__p is null) { throw new ConstructionException("null returned by new_state_changed"); } - this(cast(GstMessage*) p); + this(cast(GstMessage*) __p); } /** @@ -1109,14 +1147,14 @@ public class Message */ public this(ObjectGst src, GstFormat format, ulong amount, double rate, bool flush, bool intermediate, ulong duration, bool eos) { - auto p = gst_message_new_step_done((src is null) ? null : src.getObjectGstStruct(), format, amount, rate, flush, intermediate, duration, eos); + auto __p = gst_message_new_step_done((src is null) ? null : src.getObjectGstStruct(), format, amount, rate, flush, intermediate, duration, eos); - if(p is null) + if(__p is null) { throw new ConstructionException("null returned by new_step_done"); } - this(cast(GstMessage*) p); + this(cast(GstMessage*) __p); } /** @@ -1148,14 +1186,14 @@ public class Message */ public this(ObjectGst src, bool active, GstFormat format, ulong amount, double rate, bool flush, bool intermediate) { - auto p = gst_message_new_step_start((src is null) ? null : src.getObjectGstStruct(), active, format, amount, rate, flush, intermediate); + auto __p = gst_message_new_step_start((src is null) ? null : src.getObjectGstStruct(), active, format, amount, rate, flush, intermediate); - if(p is null) + if(__p is null) { throw new ConstructionException("null returned by new_step_start"); } - this(cast(GstMessage*) p); + this(cast(GstMessage*) __p); } /** @@ -1174,14 +1212,14 @@ public class Message */ public this(ObjectGst src) { - auto p = gst_message_new_stream_start((src is null) ? null : src.getObjectGstStruct()); + auto __p = gst_message_new_stream_start((src is null) ? null : src.getObjectGstStruct()); - if(p is null) + if(__p is null) { throw new ConstructionException("null returned by new_stream_start"); } - this(cast(GstMessage*) p); + this(cast(GstMessage*) __p); } /** @@ -1201,14 +1239,14 @@ public class Message */ public this(ObjectGst src, GstStreamStatusType type, Element owner) { - auto p = gst_message_new_stream_status((src is null) ? null : src.getObjectGstStruct(), type, (owner is null) ? null : owner.getElementStruct()); + auto __p = gst_message_new_stream_status((src is null) ? null : src.getObjectGstStruct(), type, (owner is null) ? null : owner.getElementStruct()); - if(p is null) + if(__p is null) { throw new ConstructionException("null returned by new_stream_status"); } - this(cast(GstMessage*) p); + this(cast(GstMessage*) __p); } /** @@ -1232,14 +1270,14 @@ public class Message */ public this(ObjectGst src, GstStructureChangeType type, Element owner, bool busy) { - auto p = gst_message_new_structure_change((src is null) ? null : src.getObjectGstStruct(), type, (owner is null) ? null : owner.getElementStruct(), busy); + auto __p = gst_message_new_structure_change((src is null) ? null : src.getObjectGstStruct(), type, (owner is null) ? null : owner.getElementStruct(), busy); - if(p is null) + if(__p is null) { throw new ConstructionException("null returned by new_structure_change"); } - this(cast(GstMessage*) p); + this(cast(GstMessage*) __p); } /** @@ -1258,14 +1296,14 @@ public class Message */ public this(ObjectGst src, TagList tagList) { - auto p = gst_message_new_tag((src is null) ? null : src.getObjectGstStruct(), (tagList is null) ? null : tagList.getTagListStruct()); + auto __p = gst_message_new_tag((src is null) ? null : src.getObjectGstStruct(), (tagList is null) ? null : tagList.getTagListStruct(true)); - if(p is null) + if(__p is null) { throw new ConstructionException("null returned by new_tag"); } - this(cast(GstMessage*) p); + this(cast(GstMessage*) __p); } /** @@ -1285,14 +1323,14 @@ public class Message */ public this(ObjectGst src, Toc toc, bool updated) { - auto p = gst_message_new_toc((src is null) ? null : src.getObjectGstStruct(), (toc is null) ? null : toc.getTocStruct(), updated); + auto __p = gst_message_new_toc((src is null) ? null : src.getObjectGstStruct(), (toc is null) ? null : toc.getTocStruct(), updated); - if(p is null) + if(__p is null) { throw new ConstructionException("null returned by new_toc"); } - this(cast(GstMessage*) p); + this(cast(GstMessage*) __p); } /** @@ -1310,7 +1348,26 @@ public class Message */ public void addRedirectEntry(string location, TagList tagList, Structure entryStruct) { - gst_message_add_redirect_entry(gstMessage, Str.toStringz(location), (tagList is null) ? null : tagList.getTagListStruct(), (entryStruct is null) ? null : entryStruct.getStructureStruct(true)); + gst_message_add_redirect_entry(gstMessage, Str.toStringz(location), (tagList is null) ? null : tagList.getTagListStruct(true), (entryStruct is null) ? null : entryStruct.getStructureStruct(true)); + } + + /** + * Creates a copy of the message. Returns a copy of the message. + * + * Returns: a new copy of @msg. + * + * MT safe + */ + public Message copy() + { + auto __p = gst_message_copy(gstMessage); + + if(__p is null) + { + return null; + } + + return ObjectG.getDObject!(Message)(cast(GstMessage*) __p, true); } /** @@ -1356,14 +1413,14 @@ public class Message */ public Value getStreamStatusObject() { - auto p = gst_message_get_stream_status_object(gstMessage); + auto __p = gst_message_get_stream_status_object(gstMessage); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Value)(cast(GValue*) p); + return ObjectG.getDObject!(Value)(cast(GValue*) __p); } /** @@ -1377,14 +1434,14 @@ public class Message */ public Structure getStructure() { - auto p = gst_message_get_structure(gstMessage); + auto __p = gst_message_get_structure(gstMessage); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Structure)(cast(GstStructure*) p); + return ObjectG.getDObject!(Structure)(cast(GstStructure*) __p); } /** @@ -1497,11 +1554,11 @@ public class Message { char* outcontextType = null; - auto p = gst_message_parse_context_type(gstMessage, &outcontextType) != 0; + auto __p = gst_message_parse_context_type(gstMessage, &outcontextType) != 0; contextType = Str.toString(outcontextType); - return p; + return __p; } /** @@ -1581,7 +1638,7 @@ public class Message * GError *err = NULL; * gchar *dbg_info = NULL; * - * gst_message_parse_error (msg, &err, &dbg_info); + * gst_message_parse_error (msg, &err, &dbg_info); * g_printerr ("ERROR from element %s: %s\n", * GST_OBJECT_NAME (msg->src), err->message); * g_printerr ("Debugging info: %s\n", (dbg_info) ? dbg_info : "none"); @@ -1708,6 +1765,19 @@ public class Message structure = ObjectG.getDObject!(Structure)(outstructure); } + /** + * Parses the rate_multiplier from the instant-rate-request message. + * + * Params: + * rateMultiplier = return location for the rate, or %NULL + * + * Since: 1.18 + */ + public void parseInstantRateRequest(out double rateMultiplier) + { + gst_message_parse_instant_rate_request(gstMessage, &rateMultiplier); + } + /** * Extracts the new clock from the GstMessage. * The clock object returned remains valid until the message is freed. @@ -1942,7 +2012,7 @@ public class Message * case GST_MESSAGE_STATE_CHANGED: { * GstState old_state, new_state; * - * gst_message_parse_state_changed (msg, &old_state, &new_state, NULL); + * gst_message_parse_state_changed (msg, &old_state, &new_state, NULL); * g_print ("Element %s changed state from %s to %s.\n", * GST_OBJECT_NAME (msg->src), * gst_element_state_get_name (old_state), @@ -2109,7 +2179,7 @@ public class Message * case GST_MESSAGE_TAG: { * GstTagList *tags = NULL; * - * gst_message_parse_tag (msg, &tags); + * gst_message_parse_tag (msg, &tags); * g_print ("Got tags from element %s\n", GST_OBJECT_NAME (msg->src)); * handle_tags (tags); * gst_tag_list_unref (tags); @@ -2196,6 +2266,24 @@ public class Message structure = ObjectG.getDObject!(Structure)(outstructure); } + alias doref = ref_; + /** + * Convenience macro to increase the reference count of the message. + * + * Returns: @msg (for convenience when doing assignments) + */ + public Message ref_() + { + auto __p = gst_message_ref(gstMessage); + + if(__p is null) + { + return null; + } + + return ObjectG.getDObject!(Message)(cast(GstMessage*) __p, true); + } + /** * Configures the buffering stats values in @message. * @@ -2337,14 +2425,23 @@ public class Message */ public Stream streamsSelectedGetStream(uint idx) { - auto p = gst_message_streams_selected_get_stream(gstMessage, idx); + auto __p = gst_message_streams_selected_get_stream(gstMessage, idx); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Stream)(cast(GstStream*) p, true); + return ObjectG.getDObject!(Stream)(cast(GstStream*) __p, true); + } + + /** + * Convenience macro to decrease the reference count of the message, possibly + * freeing it. + */ + public void unref() + { + gst_message_unref(gstMessage); } /** @@ -2362,14 +2459,67 @@ public class Message */ public Structure writableStructure() { - auto p = gst_message_writable_structure(gstMessage); + auto __p = gst_message_writable_structure(gstMessage); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Structure)(cast(GstStructure*) p); + return ObjectG.getDObject!(Structure)(cast(GstStructure*) __p); + } + + /** + * Modifies a pointer to a #GstMessage to point to a different #GstMessage. The + * modification is done atomically (so this is useful for ensuring thread safety + * in some cases), and the reference counts are updated appropriately (the old + * message is unreffed, the new one is reffed). + * + * Either @new_message or the #GstMessage pointed to by @old_message may be %NULL. + * + * Params: + * oldMessage = pointer to a + * pointer to a #GstMessage to be replaced. + * newMessage = pointer to a #GstMessage that will + * replace the message pointed to by @old_message. + * + * Returns: %TRUE if @new_message was different from @old_message + */ + public static bool replace(ref Message oldMessage, Message newMessage) + { + GstMessage* outoldMessage = oldMessage.getMessageStruct(); + + auto __p = gst_message_replace(&outoldMessage, (newMessage is null) ? null : newMessage.getMessageStruct()) != 0; + + oldMessage = ObjectG.getDObject!(Message)(outoldMessage); + + return __p; + } + + /** + * Modifies a pointer to a #GstMessage to point to a different #GstMessage. This + * function is similar to gst_message_replace() except that it takes ownership + * of @new_message. + * + * Params: + * oldMessage = pointer to a pointer to a #GstMessage + * to be replaced. + * newMessage = pointer to a #GstMessage that + * will replace the message pointed to by @old_message. + * + * Returns: %TRUE if @new_message was different from @old_message + * + * Since: 1.16 + */ + public static bool take(ref Message oldMessage, Message newMessage) + { + GstMessage* outoldMessage = oldMessage.getMessageStruct(); + + auto __p = gst_message_take(&outoldMessage, (newMessage is null) ? null : newMessage.getMessageStruct(true)) != 0; + + oldMessage = ObjectG.getDObject!(Message)(outoldMessage); + + return __p; } /** diff --git a/generated/gstreamer/gstreamer/Meta.d b/generated/gstreamer/gstreamer/Meta.d index 50ac35da8..a903f5945 100644 --- a/generated/gstreamer/gstreamer/Meta.d +++ b/generated/gstreamer/gstreamer/Meta.d @@ -26,6 +26,9 @@ module gstreamer.Meta; private import glib.MemorySlice; private import glib.Str; +private import glib.c.functions; +private import gobject.ObjectG; +private import gstreamer.MetaInfo; private import gstreamer.c.functions; public import gstreamer.c.types; public import gstreamerc.gstreamertypes; @@ -106,15 +109,15 @@ public final class Meta /** * pointer to the #GstMetaInfo */ - public @property GstMetaInfo* info() + public @property MetaInfo info() { - return gstMeta.info; + return ObjectG.getDObject!(MetaInfo)(gstMeta.info, false); } /** Ditto */ - public @property void info(GstMetaInfo* value) + public @property void info(MetaInfo value) { - gstMeta.info = value; + gstMeta.info = value.getMetaInfoStruct(); } /** @@ -197,9 +200,16 @@ public final class Meta * Returns: a #GstMetaInfo with @impl, or * %NULL when no such metainfo exists. */ - public static GstMetaInfo* getInfo(string impl) + public static MetaInfo getInfo(string impl) { - return gst_meta_get_info(Str.toStringz(impl)); + auto __p = gst_meta_get_info(Str.toStringz(impl)); + + if(__p is null) + { + return null; + } + + return ObjectG.getDObject!(MetaInfo)(cast(GstMetaInfo*) __p); } /** @@ -219,8 +229,54 @@ public final class Meta * Returns: a #GstMetaInfo that can be used to * access metadata. */ - public static GstMetaInfo* register(GType api, string impl, size_t size, GstMetaInitFunction initFunc, GstMetaFreeFunction freeFunc, GstMetaTransformFunction transformFunc) + public static MetaInfo register(GType api, string impl, size_t size, GstMetaInitFunction initFunc, GstMetaFreeFunction freeFunc, GstMetaTransformFunction transformFunc) + { + auto __p = gst_meta_register(api, Str.toStringz(impl), size, initFunc, freeFunc, transformFunc); + + if(__p is null) + { + return null; + } + + return ObjectG.getDObject!(MetaInfo)(cast(GstMetaInfo*) __p); + } + + /** + * Register a new custom #GstMeta implementation, backed by an opaque + * structure holding a #GstStructure. + * + * The registered info can be retrieved later with gst_meta_get_info() by using + * @name as the key. + * + * The backing #GstStructure can be retrieved with + * gst_custom_meta_get_structure(), its mutability is conditioned by the + * writability of the buffer the meta is attached to. + * + * When @transform_func is %NULL, the meta and its backing #GstStructure + * will always be copied when the transform operation is copy, other operations + * are discarded, copy regions are ignored. + * + * Params: + * name = the name of the #GstMeta implementation + * tags = tags for @api + * transformFunc = a #GstMetaTransformFunction + * userData = user data passed to @transform_func + * destroyData = #GDestroyNotify for user_data + * + * Returns: a #GstMetaInfo that can be used to + * access metadata. + * + * Since: 1.20 + */ + public static MetaInfo registerCustom(string name, string[] tags, GstCustomMetaTransformFunction transformFunc, void* userData, GDestroyNotify destroyData) { - return gst_meta_register(api, Str.toStringz(impl), size, initFunc, freeFunc, transformFunc); + auto __p = gst_meta_register_custom(Str.toStringz(name), Str.toStringzArray(tags), transformFunc, userData, destroyData); + + if(__p is null) + { + return null; + } + + return ObjectG.getDObject!(MetaInfo)(cast(GstMetaInfo*) __p); } } diff --git a/generated/gstreamer/gstreamer/MetaInfo.d b/generated/gstreamer/gstreamer/MetaInfo.d new file mode 100644 index 000000000..b8ca89d6e --- /dev/null +++ b/generated/gstreamer/gstreamer/MetaInfo.d @@ -0,0 +1,168 @@ +/* + * This file is part of gtkD. + * + * gtkD is free software; you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 + * of the License, or (at your option) any later version, with + * some exceptions, please read the COPYING file. + * + * gtkD is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with gtkD; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110, USA + */ + +// generated automatically - do not change +// find conversion definition on APILookup.txt +// implement new conversion functionalities on the wrap.utils pakage + + +module gstreamer.MetaInfo; + +private import glib.MemorySlice; +private import gstreamer.c.functions; +public import gstreamer.c.types; +public import gstreamerc.gstreamertypes; +private import gtkd.Loader; + + +/** + * The #GstMetaInfo provides information about a specific metadata + * structure. + */ +public final class MetaInfo +{ + /** the main Gtk struct */ + protected GstMetaInfo* gstMetaInfo; + protected bool ownedRef; + + /** Get the main Gtk struct */ + public GstMetaInfo* getMetaInfoStruct(bool transferOwnership = false) + { + if (transferOwnership) + ownedRef = false; + return gstMetaInfo; + } + + /** the main Gtk struct as a void* */ + protected void* getStruct() + { + return cast(void*)gstMetaInfo; + } + + /** + * Sets our main struct and passes it to the parent class. + */ + public this (GstMetaInfo* gstMetaInfo, bool ownedRef = false) + { + this.gstMetaInfo = gstMetaInfo; + this.ownedRef = ownedRef; + } + + ~this () + { + if ( Linker.isLoaded(LIBRARY_GSTREAMER) && ownedRef ) + sliceFree(gstMetaInfo); + } + + + /** + * tag identifying the metadata structure and api + */ + public @property GType api() + { + return gstMetaInfo.api; + } + + /** Ditto */ + public @property void api(GType value) + { + gstMetaInfo.api = value; + } + + /** + * type identifying the implementor of the api + */ + public @property GType type() + { + return gstMetaInfo.type; + } + + /** Ditto */ + public @property void type(GType value) + { + gstMetaInfo.type = value; + } + + /** + * size of the metadata + */ + public @property size_t size() + { + return gstMetaInfo.size; + } + + /** Ditto */ + public @property void size(size_t value) + { + gstMetaInfo.size = value; + } + + /** + * function for initializing the metadata + */ + public @property GstMetaInitFunction initFunc() + { + return gstMetaInfo.initFunc; + } + + /** Ditto */ + public @property void initFunc(GstMetaInitFunction value) + { + gstMetaInfo.initFunc = value; + } + + /** + * function for freeing the metadata + */ + public @property GstMetaFreeFunction freeFunc() + { + return gstMetaInfo.freeFunc; + } + + /** Ditto */ + public @property void freeFunc(GstMetaFreeFunction value) + { + gstMetaInfo.freeFunc = value; + } + + /** + * function for transforming the metadata + */ + public @property GstMetaTransformFunction transformFunc() + { + return gstMetaInfo.transformFunc; + } + + /** Ditto */ + public @property void transformFunc(GstMetaTransformFunction value) + { + gstMetaInfo.transformFunc = value; + } + + /** + * Returns: whether @info was registered as a #GstCustomMeta with + * gst_meta_register_custom() + * + * Since: 1.20 + */ + public bool isCustom() + { + return gst_meta_info_is_custom(gstMetaInfo) != 0; + } +} diff --git a/generated/gstreamer/gstreamer/MiniObject.d b/generated/gstreamer/gstreamer/MiniObject.d index 0b6c35119..18dc3e88b 100644 --- a/generated/gstreamer/gstreamer/MiniObject.d +++ b/generated/gstreamer/gstreamer/MiniObject.d @@ -95,6 +95,12 @@ public class MiniObject } + /** */ + public static GType getType() + { + return gst_mini_object_get_type(); + } + /** * This adds @parent as a parent for @object. Having one ore more parents affects the * writability of @object: if a @parent is not writable, @object is also not @@ -125,14 +131,14 @@ public class MiniObject */ public MiniObject copy() { - auto p = gst_mini_object_copy(gstMiniObject); + auto __p = gst_mini_object_copy(gstMiniObject); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(MiniObject)(cast(GstMiniObject*) p, true); + return ObjectG.getDObject!(MiniObject)(cast(GstMiniObject*) __p, true); } /** @@ -210,14 +216,14 @@ public class MiniObject */ public MiniObject makeWritable() { - auto p = gst_mini_object_make_writable(gstMiniObject); + auto __p = gst_mini_object_make_writable(gstMiniObject); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(MiniObject)(cast(GstMiniObject*) p, true); + return ObjectG.getDObject!(MiniObject)(cast(GstMiniObject*) __p, true); } alias doref = ref_; @@ -235,14 +241,14 @@ public class MiniObject */ public MiniObject ref_() { - auto p = gst_mini_object_ref(gstMiniObject); + auto __p = gst_mini_object_ref(gstMiniObject); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(MiniObject)(cast(GstMiniObject*) p, true); + return ObjectG.getDObject!(MiniObject)(cast(GstMiniObject*) __p, true); } /** @@ -286,7 +292,7 @@ public class MiniObject /** * This function gets back user data pointers stored via gst_mini_object_set_qdata() - * and removes the data from @object without invoking its destroy() function (if + * and removes the data from @object without invoking its `destroy()` function (if * any was set). * * Params: @@ -367,11 +373,11 @@ public class MiniObject { GstMiniObject* outolddata = olddata.getMiniObjectStruct(); - auto p = gst_mini_object_replace(&outolddata, (newdata is null) ? null : newdata.getMiniObjectStruct()) != 0; + auto __p = gst_mini_object_replace(&outolddata, (newdata is null) ? null : newdata.getMiniObjectStruct()) != 0; olddata = ObjectG.getDObject!(MiniObject)(outolddata); - return p; + return __p; } /** @@ -388,16 +394,16 @@ public class MiniObject { GstMiniObject* outolddata = olddata.getMiniObjectStruct(); - auto p = gst_mini_object_steal(&outolddata); + auto __p = gst_mini_object_steal(&outolddata); olddata = ObjectG.getDObject!(MiniObject)(outolddata); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(MiniObject)(cast(GstMiniObject*) p); + return ObjectG.getDObject!(MiniObject)(cast(GstMiniObject*) __p, true); } /** @@ -419,10 +425,10 @@ public class MiniObject { GstMiniObject* outolddata = olddata.getMiniObjectStruct(); - auto p = gst_mini_object_take(&outolddata, (newdata is null) ? null : newdata.getMiniObjectStruct()) != 0; + auto __p = gst_mini_object_take(&outolddata, (newdata is null) ? null : newdata.getMiniObjectStruct()) != 0; olddata = ObjectG.getDObject!(MiniObject)(outolddata); - return p; + return __p; } } diff --git a/generated/gstreamer/gstreamer/ObjectGst.d b/generated/gstreamer/gstreamer/ObjectGst.d index fa4c0330d..6024b67f1 100644 --- a/generated/gstreamer/gstreamer/ObjectGst.d +++ b/generated/gstreamer/gstreamer/ObjectGst.d @@ -27,6 +27,7 @@ module gstreamer.ObjectGst; private import glib.ErrorG; private import glib.ListG; private import glib.Str; +private import glib.c.functions; private import gobject.ObjectG; private import gobject.ParamSpec; private import gobject.Signals; @@ -206,11 +207,11 @@ public class ObjectGst : ObjectG { GstObject* outoldobj = oldobj.getObjectGstStruct(); - auto p = gst_object_replace(&outoldobj, (newobj is null) ? null : newobj.getObjectGstStruct()) != 0; + auto __p = gst_object_replace(&outoldobj, (newobj is null) ? null : newobj.getObjectGstStruct()) != 0; oldobj = ObjectG.getDObject!(ObjectGst)(outoldobj); - return p; + return __p; } /** @@ -258,14 +259,14 @@ public class ObjectGst : ObjectG */ public ControlBinding getControlBinding(string propertyName) { - auto p = gst_object_get_control_binding(gstObject, Str.toStringz(propertyName)); + auto __p = gst_object_get_control_binding(gstObject, Str.toStringz(propertyName)); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(ControlBinding)(cast(GstControlBinding*) p, true); + return ObjectG.getDObject!(ControlBinding)(cast(GstControlBinding*) __p, true); } /** @@ -346,14 +347,14 @@ public class ObjectGst : ObjectG */ public ObjectGst getParent() { - auto p = gst_object_get_parent(gstObject); + auto __p = gst_object_get_parent(gstObject); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(ObjectGst)(cast(GstObject*) p, true); + return ObjectG.getDObject!(ObjectGst)(cast(GstObject*) __p, true); } /** @@ -388,14 +389,14 @@ public class ObjectGst : ObjectG */ public Value getValue(string propertyName, GstClockTime timestamp) { - auto p = gst_object_get_value(gstObject, Str.toStringz(propertyName), timestamp); + auto __p = gst_object_get_value(gstObject, Str.toStringz(propertyName), timestamp); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Value)(cast(GValue*) p, true); + return ObjectG.getDObject!(Value)(cast(GValue*) __p, true); } /** @@ -501,14 +502,14 @@ public class ObjectGst : ObjectG */ public override ObjectGst ref_() { - auto p = gst_object_ref(gstObject); + auto __p = gst_object_ref(gstObject); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(ObjectGst)(cast(GstObject*) p, true); + return ObjectG.getDObject!(ObjectGst)(cast(GstObject*) __p, true); } /** diff --git a/generated/gstreamer/gstreamer/Pad.d b/generated/gstreamer/gstreamer/Pad.d index 2dac5ad6f..7c33e7709 100644 --- a/generated/gstreamer/gstreamer/Pad.d +++ b/generated/gstreamer/gstreamer/Pad.d @@ -26,6 +26,7 @@ module gstreamer.Pad; private import glib.ConstructionException; private import glib.Str; +private import glib.c.functions; private import gobject.ObjectG; private import gobject.Signals; private import gstreamer.Buffer; @@ -63,7 +64,7 @@ private import std.algorithm; * then a guaranteed unique name will be assigned to it. * * A #GstElement creating a pad will typically use the various - * gst_pad_set_*_function() calls to register callbacks for events, queries or + * gst_pad_set_*_function\() calls to register callbacks for events, queries or * dataflow on the pads. * * gst_pad_get_parent() will retrieve the #GstElement that owns the pad. @@ -187,14 +188,14 @@ public class Pad : ObjectGst */ public this(string name, GstPadDirection direction) { - auto p = gst_pad_new(Str.toStringz(name), direction); + auto __p = gst_pad_new(Str.toStringz(name), direction); - if(p is null) + if(__p is null) { throw new ConstructionException("null returned by new"); } - this(cast(GstPad*) p); + this(cast(GstPad*) __p); } /** @@ -213,14 +214,14 @@ public class Pad : ObjectGst */ public this(StaticPadTemplate templ, string name) { - auto p = gst_pad_new_from_static_template((templ is null) ? null : templ.getStaticPadTemplateStruct(), Str.toStringz(name)); + auto __p = gst_pad_new_from_static_template((templ is null) ? null : templ.getStaticPadTemplateStruct(), Str.toStringz(name)); - if(p is null) + if(__p is null) { throw new ConstructionException("null returned by new_from_static_template"); } - this(cast(GstPad*) p); + this(cast(GstPad*) __p); } /** @@ -239,14 +240,14 @@ public class Pad : ObjectGst */ public this(PadTemplate templ, string name) { - auto p = gst_pad_new_from_template((templ is null) ? null : templ.getPadTemplateStruct(), Str.toStringz(name)); + auto __p = gst_pad_new_from_template((templ is null) ? null : templ.getPadTemplateStruct(), Str.toStringz(name)); - if(p is null) + if(__p is null) { throw new ConstructionException("null returned by new_from_template"); } - this(cast(GstPad*) p); + this(cast(GstPad*) __p); } /** @@ -354,7 +355,7 @@ public class Pad : ObjectGst */ public GstFlowReturn chain(Buffer buffer) { - return gst_pad_chain(gstPad, (buffer is null) ? null : buffer.getBufferStruct()); + return gst_pad_chain(gstPad, (buffer is null) ? null : buffer.getBufferStruct(true)); } /** @@ -383,7 +384,7 @@ public class Pad : ObjectGst */ public GstFlowReturn chainList(BufferList list) { - return gst_pad_chain_list(gstPad, (list is null) ? null : list.getBufferListStruct()); + return gst_pad_chain_list(gstPad, (list is null) ? null : list.getBufferListStruct(true)); } /** @@ -477,7 +478,7 @@ public class Pad : ObjectGst */ public bool eventDefault(ObjectGst parent, Event event) { - return gst_pad_event_default(gstPad, (parent is null) ? null : parent.getObjectGstStruct(), (event is null) ? null : event.getEventStruct()) != 0; + return gst_pad_event_default(gstPad, (parent is null) ? null : parent.getObjectGstStruct(), (event is null) ? null : event.getEventStruct(true)) != 0; } /** @@ -514,14 +515,14 @@ public class Pad : ObjectGst */ public Caps getAllowedCaps() { - auto p = gst_pad_get_allowed_caps(gstPad); + auto __p = gst_pad_get_allowed_caps(gstPad); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Caps)(cast(GstCaps*) p, true); + return ObjectG.getDObject!(Caps)(cast(GstCaps*) __p, true); } /** @@ -533,14 +534,14 @@ public class Pad : ObjectGst */ public Caps getCurrentCaps() { - auto p = gst_pad_get_current_caps(gstPad); + auto __p = gst_pad_get_current_caps(gstPad); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Caps)(cast(GstCaps*) p, true); + return ObjectG.getDObject!(Caps)(cast(GstCaps*) __p, true); } /** @@ -598,14 +599,14 @@ public class Pad : ObjectGst */ public PadTemplate getPadTemplate() { - auto p = gst_pad_get_pad_template(gstPad); + auto __p = gst_pad_get_pad_template(gstPad); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(PadTemplate)(cast(GstPadTemplate*) p, true); + return ObjectG.getDObject!(PadTemplate)(cast(GstPadTemplate*) __p, true); } /** @@ -616,14 +617,14 @@ public class Pad : ObjectGst */ public Caps getPadTemplateCaps() { - auto p = gst_pad_get_pad_template_caps(gstPad); + auto __p = gst_pad_get_pad_template_caps(gstPad); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Caps)(cast(GstCaps*) p, true); + return ObjectG.getDObject!(Caps)(cast(GstCaps*) __p, true); } /** @@ -638,14 +639,14 @@ public class Pad : ObjectGst */ public Element getParentElement() { - auto p = gst_pad_get_parent_element(gstPad); + auto __p = gst_pad_get_parent_element(gstPad); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Element)(cast(GstElement*) p, true); + return ObjectG.getDObject!(Element)(cast(GstElement*) __p, true); } /** @@ -658,14 +659,14 @@ public class Pad : ObjectGst */ public Pad getPeer() { - auto p = gst_pad_get_peer(gstPad); + auto __p = gst_pad_get_peer(gstPad); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Pad)(cast(GstPad*) p, true); + return ObjectG.getDObject!(Pad)(cast(GstPad*) __p, true); } /** @@ -710,11 +711,33 @@ public class Pad : ObjectGst { GstBuffer* outbuffer = null; - auto p = gst_pad_get_range(gstPad, offset, size, &outbuffer); + auto __p = gst_pad_get_range(gstPad, offset, size, &outbuffer); buffer = ObjectG.getDObject!(Buffer)(outbuffer); - return p; + return __p; + } + + /** + * If there is a single internal link of the given pad, this function will + * return it. Otherwise, it will return NULL. + * + * Returns: a #GstPad, or %NULL if @pad has none + * or more than one internal links. Unref returned pad with + * gst_object_unref(). + * + * Since: 1.18 + */ + public Pad getSingleInternalLink() + { + auto __p = gst_pad_get_single_internal_link(gstPad); + + if(__p is null) + { + return null; + } + + return ObjectG.getDObject!(Pad)(cast(GstPad*) __p, true); } /** @@ -731,14 +754,14 @@ public class Pad : ObjectGst */ public Event getStickyEvent(GstEventType eventType, uint idx) { - auto p = gst_pad_get_sticky_event(gstPad, eventType, idx); + auto __p = gst_pad_get_sticky_event(gstPad, eventType, idx); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Event)(cast(GstEvent*) p, true); + return ObjectG.getDObject!(Event)(cast(GstEvent*) __p, true); } /** @@ -755,14 +778,14 @@ public class Pad : ObjectGst */ public Stream getStream() { - auto p = gst_pad_get_stream(gstPad); + auto __p = gst_pad_get_stream(gstPad); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Stream)(cast(GstStream*) p, true); + return ObjectG.getDObject!(Stream)(cast(GstStream*) __p, true); } /** @@ -878,14 +901,14 @@ public class Pad : ObjectGst */ public Iterator iterateInternalLinks() { - auto p = gst_pad_iterate_internal_links(gstPad); + auto __p = gst_pad_iterate_internal_links(gstPad); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Iterator)(cast(GstIterator*) p, true); + return ObjectG.getDObject!(Iterator)(cast(GstIterator*) __p, true); } /** @@ -904,14 +927,14 @@ public class Pad : ObjectGst */ public Iterator iterateInternalLinksDefault(ObjectGst parent) { - auto p = gst_pad_iterate_internal_links_default(gstPad, (parent is null) ? null : parent.getObjectGstStruct()); + auto __p = gst_pad_iterate_internal_links_default(gstPad, (parent is null) ? null : parent.getObjectGstStruct()); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Iterator)(cast(GstIterator*) p, true); + return ObjectG.getDObject!(Iterator)(cast(GstIterator*) __p, true); } /** @@ -1083,14 +1106,14 @@ public class Pad : ObjectGst */ public Caps peerQueryCaps(Caps filter) { - auto p = gst_pad_peer_query_caps(gstPad, (filter is null) ? null : filter.getCapsStruct()); + auto __p = gst_pad_peer_query_caps(gstPad, (filter is null) ? null : filter.getCapsStruct()); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Caps)(cast(GstCaps*) p, true); + return ObjectG.getDObject!(Caps)(cast(GstCaps*) __p, true); } /** @@ -1217,11 +1240,11 @@ public class Pad : ObjectGst { GstBuffer* outbuffer = null; - auto p = gst_pad_pull_range(gstPad, offset, size, &outbuffer); + auto __p = gst_pad_pull_range(gstPad, offset, size, &outbuffer); buffer = ObjectG.getDObject!(Buffer)(outbuffer); - return p; + return __p; } /** @@ -1247,7 +1270,7 @@ public class Pad : ObjectGst */ public GstFlowReturn push(Buffer buffer) { - return gst_pad_push(gstPad, (buffer is null) ? null : buffer.getBufferStruct()); + return gst_pad_push(gstPad, (buffer is null) ? null : buffer.getBufferStruct(true)); } /** @@ -1267,7 +1290,7 @@ public class Pad : ObjectGst */ public bool pushEvent(Event event) { - return gst_pad_push_event(gstPad, (event is null) ? null : event.getEventStruct()) != 0; + return gst_pad_push_event(gstPad, (event is null) ? null : event.getEventStruct(true)) != 0; } /** @@ -1295,7 +1318,7 @@ public class Pad : ObjectGst */ public GstFlowReturn pushList(BufferList list) { - return gst_pad_push_list(gstPad, (list is null) ? null : list.getBufferListStruct()); + return gst_pad_push_list(gstPad, (list is null) ? null : list.getBufferListStruct(true)); } /** @@ -1357,14 +1380,14 @@ public class Pad : ObjectGst */ public Caps queryCaps(Caps filter) { - auto p = gst_pad_query_caps(gstPad, (filter is null) ? null : filter.getCapsStruct()); + auto __p = gst_pad_query_caps(gstPad, (filter is null) ? null : filter.getCapsStruct()); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Caps)(cast(GstCaps*) p, true); + return ObjectG.getDObject!(Caps)(cast(GstCaps*) __p, true); } /** @@ -1472,7 +1495,7 @@ public class Pad : ObjectGst */ public bool sendEvent(Event event) { - return gst_pad_send_event(gstPad, (event is null) ? null : event.getEventStruct()) != 0; + return gst_pad_send_event(gstPad, (event is null) ? null : event.getEventStruct(true)) != 0; } /** diff --git a/generated/gstreamer/gstreamer/PadProbeInfo.d b/generated/gstreamer/gstreamer/PadProbeInfo.d index d2e75a4a2..def6c57b5 100644 --- a/generated/gstreamer/gstreamer/PadProbeInfo.d +++ b/generated/gstreamer/gstreamer/PadProbeInfo.d @@ -72,14 +72,14 @@ public class PadProbeInfo */ public Buffer getBuffer() { - auto p = gst_pad_probe_info_get_buffer(gstPadProbeInfo); + auto __p = gst_pad_probe_info_get_buffer(gstPadProbeInfo); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Buffer)(cast(GstBuffer*) p); + return ObjectG.getDObject!(Buffer)(cast(GstBuffer*) __p); } /** @@ -87,14 +87,14 @@ public class PadProbeInfo */ public BufferList getBufferList() { - auto p = gst_pad_probe_info_get_buffer_list(gstPadProbeInfo); + auto __p = gst_pad_probe_info_get_buffer_list(gstPadProbeInfo); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(BufferList)(cast(GstBufferList*) p); + return ObjectG.getDObject!(BufferList)(cast(GstBufferList*) __p); } /** @@ -102,14 +102,14 @@ public class PadProbeInfo */ public Event getEvent() { - auto p = gst_pad_probe_info_get_event(gstPadProbeInfo); + auto __p = gst_pad_probe_info_get_event(gstPadProbeInfo); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Event)(cast(GstEvent*) p); + return ObjectG.getDObject!(Event)(cast(GstEvent*) __p); } /** @@ -117,13 +117,13 @@ public class PadProbeInfo */ public Query getQuery() { - auto p = gst_pad_probe_info_get_query(gstPadProbeInfo); + auto __p = gst_pad_probe_info_get_query(gstPadProbeInfo); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Query)(cast(GstQuery*) p); + return ObjectG.getDObject!(Query)(cast(GstQuery*) __p); } } diff --git a/generated/gstreamer/gstreamer/PadTemplate.d b/generated/gstreamer/gstreamer/PadTemplate.d index b062b2cdb..d9925299f 100644 --- a/generated/gstreamer/gstreamer/PadTemplate.d +++ b/generated/gstreamer/gstreamer/PadTemplate.d @@ -55,7 +55,7 @@ private import std.algorithm; * GST_PAD_TEMPLATE_DIRECTION(). * * The GST_PAD_TEMPLATE_NAME_TEMPLATE () is important for GST_PAD_REQUEST pads - * because it has to be used as the name in the gst_element_get_request_pad() + * because it has to be used as the name in the gst_element_request_pad_simple() * call to instantiate a pad from this template. * * Padtemplates can be created with gst_pad_template_new() or with @@ -83,7 +83,7 @@ private import std.algorithm; * my_method (void) * { * GstPad *pad; - * pad = gst_pad_new_from_static_template (&my_template, "sink"); + * pad = gst_pad_new_from_static_template (&my_template, "sink"); * ... * } * ]| @@ -96,7 +96,7 @@ private import std.algorithm; * { * GstElementClass *gstelement_class = GST_ELEMENT_CLASS (klass); * - * gst_element_class_add_static_pad_template (gstelement_class, &my_template); + * gst_element_class_add_static_pad_template (gstelement_class, &my_template); * } * ]| */ @@ -151,14 +151,14 @@ public class PadTemplate : ObjectGst */ public this(string nameTemplate, GstPadDirection direction, GstPadPresence presence, Caps caps) { - auto p = gst_pad_template_new(Str.toStringz(nameTemplate), direction, presence, (caps is null) ? null : caps.getCapsStruct()); + auto __p = gst_pad_template_new(Str.toStringz(nameTemplate), direction, presence, (caps is null) ? null : caps.getCapsStruct()); - if(p is null) + if(__p is null) { throw new ConstructionException("null returned by new"); } - this(cast(GstPadTemplate*) p); + this(cast(GstPadTemplate*) __p); } /** @@ -176,14 +176,14 @@ public class PadTemplate : ObjectGst */ public this(StaticPadTemplate padTemplate, GType padType) { - auto p = gst_pad_template_new_from_static_pad_template_with_gtype((padTemplate is null) ? null : padTemplate.getStaticPadTemplateStruct(), padType); + auto __p = gst_pad_template_new_from_static_pad_template_with_gtype((padTemplate is null) ? null : padTemplate.getStaticPadTemplateStruct(), padType); - if(p is null) + if(__p is null) { throw new ConstructionException("null returned by new_from_static_pad_template_with_gtype"); } - this(cast(GstPadTemplate*) p); + this(cast(GstPadTemplate*) __p); } /** @@ -205,14 +205,14 @@ public class PadTemplate : ObjectGst */ public this(string nameTemplate, GstPadDirection direction, GstPadPresence presence, Caps caps, GType padType) { - auto p = gst_pad_template_new_with_gtype(Str.toStringz(nameTemplate), direction, presence, (caps is null) ? null : caps.getCapsStruct(), padType); + auto __p = gst_pad_template_new_with_gtype(Str.toStringz(nameTemplate), direction, presence, (caps is null) ? null : caps.getCapsStruct(), padType); - if(p is null) + if(__p is null) { throw new ConstructionException("null returned by new_with_gtype"); } - this(cast(GstPadTemplate*) p); + this(cast(GstPadTemplate*) __p); } /** @@ -223,14 +223,34 @@ public class PadTemplate : ObjectGst */ public Caps getCaps() { - auto p = gst_pad_template_get_caps(gstPadTemplate); + auto __p = gst_pad_template_get_caps(gstPadTemplate); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Caps)(cast(GstCaps*) p, true); + return ObjectG.getDObject!(Caps)(cast(GstCaps*) __p, true); + } + + /** + * See gst_pad_template_set_documentation_caps(). + * + * Returns: The caps to document. For convenience, this will return + * gst_pad_template_get_caps() when no documentation caps were set. + * + * Since: 1.18 + */ + public Caps getDocumentationCaps() + { + auto __p = gst_pad_template_get_documentation_caps(gstPadTemplate); + + if(__p is null) + { + return null; + } + + return ObjectG.getDObject!(Caps)(cast(GstCaps*) __p, true); } /** @@ -244,6 +264,22 @@ public class PadTemplate : ObjectGst gst_pad_template_pad_created(gstPadTemplate, (pad is null) ? null : pad.getPadStruct()); } + /** + * Certain elements will dynamically construct the caps of their + * pad templates. In order not to let environment-specific information + * into the documentation, element authors should use this method to + * expose "stable" caps to the reader. + * + * Params: + * caps = the documented capabilities + * + * Since: 1.18 + */ + public void setDocumentationCaps(Caps caps) + { + gst_pad_template_set_documentation_caps(gstPadTemplate, (caps is null) ? null : caps.getCapsStruct(true)); + } + /** * This signal is fired when an element creates a pad from this template. * diff --git a/generated/gstreamer/gstreamer/ParentBufferMeta.d b/generated/gstreamer/gstreamer/ParentBufferMeta.d index c9e4622bc..911591846 100644 --- a/generated/gstreamer/gstreamer/ParentBufferMeta.d +++ b/generated/gstreamer/gstreamer/ParentBufferMeta.d @@ -24,6 +24,8 @@ module gstreamer.ParentBufferMeta; +private import gobject.ObjectG; +private import gstreamer.MetaInfo; private import gstreamer.c.functions; public import gstreamer.c.types; public import gstreamerc.gstreamertypes; @@ -45,15 +47,22 @@ public struct ParentBufferMeta { /** - * Get the global #GstMetaInfo describing the #GstParentBufferMeta meta. + * Gets the global #GstMetaInfo describing the #GstParentBufferMeta meta. * * Returns: The #GstMetaInfo * * Since: 1.6 */ - public static GstMetaInfo* getInfo() + public static MetaInfo getInfo() { - return gst_parent_buffer_meta_get_info(); + auto __p = gst_parent_buffer_meta_get_info(); + + if(__p is null) + { + return null; + } + + return ObjectG.getDObject!(MetaInfo)(cast(GstMetaInfo*) __p); } /** */ diff --git a/generated/gstreamer/gstreamer/Parse.d b/generated/gstreamer/gstreamer/Parse.d index f1f15e85e..a59eba2aa 100644 --- a/generated/gstreamer/gstreamer/Parse.d +++ b/generated/gstreamer/gstreamer/Parse.d @@ -65,19 +65,19 @@ public struct Parse { GError* err = null; - auto p = gst_parse_bin_from_description(Str.toStringz(binDescription), ghostUnlinkedPads, &err); + auto __p = gst_parse_bin_from_description(Str.toStringz(binDescription), ghostUnlinkedPads, &err); if (err !is null) { throw new GException( new ErrorG(err) ); } - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Bin)(cast(GstBin*) p); + return ObjectG.getDObject!(Bin)(cast(GstBin*) __p); } /** @@ -101,7 +101,7 @@ public struct Parse * * Returns: a newly-created * element, which is guaranteed to be a bin unless - * GST_FLAG_NO_SINGLE_ELEMENT_BINS was passed, or %NULL if an error + * #GST_PARSE_FLAG_NO_SINGLE_ELEMENT_BINS was passed, or %NULL if an error * occurred. * * Throws: GException on failure. @@ -110,19 +110,19 @@ public struct Parse { GError* err = null; - auto p = gst_parse_bin_from_description_full(Str.toStringz(binDescription), ghostUnlinkedPads, (context is null) ? null : context.getParseContextStruct(), flags, &err); + auto __p = gst_parse_bin_from_description_full(Str.toStringz(binDescription), ghostUnlinkedPads, (context is null) ? null : context.getParseContextStruct(), flags, &err); if (err !is null) { throw new GException( new ErrorG(err) ); } - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Element)(cast(GstElement*) p); + return ObjectG.getDObject!(Element)(cast(GstElement*) __p); } /** @@ -141,6 +141,9 @@ public struct Parse * the @error is set. In this case there was a recoverable parsing error and you * can try to play the pipeline. * + * To create a sub-pipeline (bin) for embedding into an existing pipeline + * use gst_parse_bin_from_description(). + * * Params: * pipelineDescription = the command line describing the pipeline * @@ -155,19 +158,19 @@ public struct Parse { GError* err = null; - auto p = gst_parse_launch(Str.toStringz(pipelineDescription), &err); + auto __p = gst_parse_launch(Str.toStringz(pipelineDescription), &err); if (err !is null) { throw new GException( new ErrorG(err) ); } - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Element)(cast(GstElement*) p); + return ObjectG.getDObject!(Element)(cast(GstElement*) __p); } /** @@ -176,6 +179,9 @@ public struct Parse * the @error is set. In this case there was a recoverable parsing error and you * can try to play the pipeline. * + * To create a sub-pipeline (bin) for embedding into an existing pipeline + * use gst_parse_bin_from_description_full(). + * * Params: * pipelineDescription = the command line describing the pipeline * context = a parse context allocated with @@ -194,19 +200,19 @@ public struct Parse { GError* err = null; - auto p = gst_parse_launch_full(Str.toStringz(pipelineDescription), (context is null) ? null : context.getParseContextStruct(), flags, &err); + auto __p = gst_parse_launch_full(Str.toStringz(pipelineDescription), (context is null) ? null : context.getParseContextStruct(), flags, &err); if (err !is null) { throw new GException( new ErrorG(err) ); } - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Element)(cast(GstElement*) p); + return ObjectG.getDObject!(Element)(cast(GstElement*) __p); } /** @@ -226,19 +232,19 @@ public struct Parse { GError* err = null; - auto p = gst_parse_launchv(Str.toStringzArray(argv), &err); + auto __p = gst_parse_launchv(Str.toStringzArray(argv), &err); if (err !is null) { throw new GException( new ErrorG(err) ); } - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Element)(cast(GstElement*) p); + return ObjectG.getDObject!(Element)(cast(GstElement*) __p); } /** @@ -264,18 +270,18 @@ public struct Parse { GError* err = null; - auto p = gst_parse_launchv_full(Str.toStringzArray(argv), (context is null) ? null : context.getParseContextStruct(), flags, &err); + auto __p = gst_parse_launchv_full(Str.toStringzArray(argv), (context is null) ? null : context.getParseContextStruct(), flags, &err); if (err !is null) { throw new GException( new ErrorG(err) ); } - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Element)(cast(GstElement*) p); + return ObjectG.getDObject!(Element)(cast(GstElement*) __p); } } diff --git a/generated/gstreamer/gstreamer/ParseContext.d b/generated/gstreamer/gstreamer/ParseContext.d index 3402772f8..a8860a5c6 100644 --- a/generated/gstreamer/gstreamer/ParseContext.d +++ b/generated/gstreamer/gstreamer/ParseContext.d @@ -26,6 +26,7 @@ module gstreamer.ParseContext; private import glib.ConstructionException; private import glib.Str; +private import glib.c.functions; private import gobject.ObjectG; private import gstreamer.c.functions; public import gstreamer.c.types; @@ -91,31 +92,33 @@ public class ParseContext */ public this() { - auto p = gst_parse_context_new(); + auto __p = gst_parse_context_new(); - if(p is null) + if(__p is null) { throw new ConstructionException("null returned by new"); } - this(cast(GstParseContext*) p); + this(cast(GstParseContext*) __p); } /** * Copies the @context. * * Returns: A copied #GstParseContext + * + * Since: 1.12.1 */ public ParseContext copy() { - auto p = gst_parse_context_copy(gstParseContext); + auto __p = gst_parse_context_copy(gstParseContext); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(ParseContext)(cast(GstParseContext*) p, true); + return ObjectG.getDObject!(ParseContext)(cast(GstParseContext*) __p, true); } /** diff --git a/generated/gstreamer/gstreamer/Pipeline.d b/generated/gstreamer/gstreamer/Pipeline.d index 0cf737b24..185a22511 100644 --- a/generated/gstreamer/gstreamer/Pipeline.d +++ b/generated/gstreamer/gstreamer/Pipeline.d @@ -50,8 +50,12 @@ public import gstreamerc.gstreamertypes; * methods like gst_bin_add() and gst_bin_remove() (see #GstBin). * * Before changing the state of the #GstPipeline (see #GstElement) a #GstBus - * can be retrieved with gst_pipeline_get_bus(). This bus can then be - * used to receive #GstMessage from the elements in the pipeline. + * should be retrieved with gst_pipeline_get_bus(). This #GstBus should then + * be used to receive #GstMessage from the elements in the pipeline. Listening + * to the #GstBus is necessary for retrieving error messages from the + * #GstPipeline and otherwise the #GstPipeline might stop without any + * indication, why. Furthermore, the #GstPipeline posts messages even if + * nobody listens on the #GstBus, which will pile up and use up memory. * * By default, a #GstPipeline will automatically flush the pending #GstBus * messages when going to the NULL state to ensure that no circular @@ -132,14 +136,14 @@ public class Pipeline : Bin */ public this(string name) { - auto p = gst_pipeline_new(Str.toStringz(name)); + auto __p = gst_pipeline_new(Str.toStringz(name)); - if(p is null) + if(__p is null) { throw new ConstructionException("null returned by new"); } - this(cast(GstPipeline*) p); + this(cast(GstPipeline*) __p); } /** @@ -181,14 +185,14 @@ public class Pipeline : Bin */ public override Bus getBus() { - auto p = gst_pipeline_get_bus(gstPipeline); + auto __p = gst_pipeline_get_bus(gstPipeline); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Bus)(cast(GstBus*) p, true); + return ObjectG.getDObject!(Bus)(cast(GstBus*) __p, true); } /** @@ -203,14 +207,14 @@ public class Pipeline : Bin */ public override Clock getClock() { - auto p = gst_pipeline_get_clock(gstPipeline); + auto __p = gst_pipeline_get_clock(gstPipeline); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Clock)(cast(GstClock*) p, true); + return ObjectG.getDObject!(Clock)(cast(GstClock*) __p, true); } /** @@ -250,14 +254,14 @@ public class Pipeline : Bin */ public Clock getPipelineClock() { - auto p = gst_pipeline_get_pipeline_clock(gstPipeline); + auto __p = gst_pipeline_get_pipeline_clock(gstPipeline); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Clock)(cast(GstClock*) p, true); + return ObjectG.getDObject!(Clock)(cast(GstClock*) __p, true); } /** diff --git a/generated/gstreamer/gstreamer/Plugin.d b/generated/gstreamer/gstreamer/Plugin.d index 553580509..7f2c4c927 100644 --- a/generated/gstreamer/gstreamer/Plugin.d +++ b/generated/gstreamer/gstreamer/Plugin.d @@ -28,6 +28,7 @@ private import glib.ErrorG; private import glib.GException; private import glib.ListG; private import glib.Str; +private import glib.c.functions; private import gobject.ObjectG; private import gstreamer.ObjectGst; private import gstreamer.Structure; @@ -38,15 +39,15 @@ public import gstreamerc.gstreamertypes; /** * GStreamer is extensible, so #GstElement instances can be loaded at runtime. - * A plugin system can provide one or more of the basic - * GStreamer #GstPluginFeature subclasses. + * A plugin system can provide one or more of the basic GStreamer + * #GstPluginFeature subclasses. * - * A plugin should export a symbol gst_plugin_desc that is a + * A plugin should export a symbol `gst_plugin_desc` that is a * struct of type #GstPluginDesc. * the plugin loader will check the version of the core library the plugin was * linked against and will create a new #GstPlugin. It will then call the * #GstPluginInitFunc function that was provided in the - * gst_plugin_desc. + * `gst_plugin_desc`. * * Once you have a handle to a #GstPlugin (e.g. from the #GstRegistry), you * can add any object that subclasses #GstPluginFeature. @@ -114,14 +115,14 @@ public class Plugin : ObjectGst */ public static Plugin loadByName(string name) { - auto p = gst_plugin_load_by_name(Str.toStringz(name)); + auto __p = gst_plugin_load_by_name(Str.toStringz(name)); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Plugin)(cast(GstPlugin*) p, true); + return ObjectG.getDObject!(Plugin)(cast(GstPlugin*) __p, true); } /** @@ -139,19 +140,19 @@ public class Plugin : ObjectGst { GError* err = null; - auto p = gst_plugin_load_file(Str.toStringz(filename), &err); + auto __p = gst_plugin_load_file(Str.toStringz(filename), &err); if (err !is null) { throw new GException( new ErrorG(err) ); } - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Plugin)(cast(GstPlugin*) p, true); + return ObjectG.getDObject!(Plugin)(cast(GstPlugin*) __p, true); } /** @@ -293,14 +294,14 @@ public class Plugin : ObjectGst */ public Structure getCacheData() { - auto p = gst_plugin_get_cache_data(gstPlugin); + auto __p = gst_plugin_get_cache_data(gstPlugin); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Structure)(cast(GstStructure*) p); + return ObjectG.getDObject!(Structure)(cast(GstStructure*) __p); } /** @@ -428,14 +429,14 @@ public class Plugin : ObjectGst */ public Plugin load() { - auto p = gst_plugin_load(gstPlugin); + auto __p = gst_plugin_load(gstPlugin); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Plugin)(cast(GstPlugin*) p, true); + return ObjectG.getDObject!(Plugin)(cast(GstPlugin*) __p, true); } /** diff --git a/generated/gstreamer/gstreamer/PluginFeature.d b/generated/gstreamer/gstreamer/PluginFeature.d index 94b67a4e1..448fc3691 100644 --- a/generated/gstreamer/gstreamer/PluginFeature.d +++ b/generated/gstreamer/gstreamer/PluginFeature.d @@ -26,6 +26,7 @@ module gstreamer.PluginFeature; private import glib.ListG; private import glib.Str; +private import glib.c.functions; private import gobject.ObjectG; private import gstreamer.ObjectGst; private import gstreamer.Plugin; @@ -85,14 +86,14 @@ public class PluginFeature : ObjectGst */ public static ListG listCopy(ListG list) { - auto p = gst_plugin_feature_list_copy((list is null) ? null : list.getListGStruct()); + auto __p = gst_plugin_feature_list_copy((list is null) ? null : list.getListGStruct()); - if(p is null) + if(__p is null) { return null; } - return new ListG(cast(GList*) p, true); + return new ListG(cast(GList*) __p, true); } /** @@ -163,14 +164,14 @@ public class PluginFeature : ObjectGst */ public Plugin getPlugin() { - auto p = gst_plugin_feature_get_plugin(gstPluginFeature); + auto __p = gst_plugin_feature_get_plugin(gstPluginFeature); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Plugin)(cast(GstPlugin*) p, true); + return ObjectG.getDObject!(Plugin)(cast(GstPlugin*) __p, true); } /** @@ -216,14 +217,14 @@ public class PluginFeature : ObjectGst */ public PluginFeature load() { - auto p = gst_plugin_feature_load(gstPluginFeature); + auto __p = gst_plugin_feature_load(gstPluginFeature); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(PluginFeature)(cast(GstPluginFeature*) p, true); + return ObjectG.getDObject!(PluginFeature)(cast(GstPluginFeature*) __p, true); } /** diff --git a/generated/gstreamer/gstreamer/Poll.d b/generated/gstreamer/gstreamer/Poll.d index bf3a10a84..d44de7aea 100644 --- a/generated/gstreamer/gstreamer/Poll.d +++ b/generated/gstreamer/gstreamer/Poll.d @@ -35,7 +35,7 @@ private import gtkd.Loader; /** * A #GstPoll keeps track of file descriptors much like fd_set (used with - * select()) or a struct pollfd array (used with poll()). Once created with + * select ()) or a struct pollfd array (used with poll ()). Once created with * gst_poll_new(), the set can be used to wait for file descriptors to be * readable and/or writable. It is possible to make this wait be controlled * by specifying %TRUE for the @controllable flag when creating the set (or @@ -405,14 +405,14 @@ public class Poll */ public this(bool controllable) { - auto p = gst_poll_new(controllable); + auto __p = gst_poll_new(controllable); - if(p is null) + if(__p is null) { throw new ConstructionException("null returned by new"); } - this(cast(GstPoll*) p); + this(cast(GstPoll*) __p); } /** @@ -431,13 +431,13 @@ public class Poll */ public this() { - auto p = gst_poll_new_timer(); + auto __p = gst_poll_new_timer(); - if(p is null) + if(__p is null) { throw new ConstructionException("null returned by new_timer"); } - this(cast(GstPoll*) p); + this(cast(GstPoll*) __p); } } diff --git a/generated/gstreamer/gstreamer/PresetIF.d b/generated/gstreamer/gstreamer/PresetIF.d index 334f4c79f..f3008c3fc 100644 --- a/generated/gstreamer/gstreamer/PresetIF.d +++ b/generated/gstreamer/gstreamer/PresetIF.d @@ -25,6 +25,7 @@ module gstreamer.PresetIF; private import glib.Str; +private import glib.c.functions; private import gstreamer.c.functions; public import gstreamer.c.types; public import gstreamerc.gstreamertypes; diff --git a/generated/gstreamer/gstreamer/PresetT.d b/generated/gstreamer/gstreamer/PresetT.d index 6a2ff9fbb..2e90cf3e4 100644 --- a/generated/gstreamer/gstreamer/PresetT.d +++ b/generated/gstreamer/gstreamer/PresetT.d @@ -25,6 +25,7 @@ module gstreamer.PresetT; public import glib.Str; +public import glib.c.functions; public import gstreamer.c.functions; public import gstreamer.c.types; public import gstreamerc.gstreamertypes; @@ -95,11 +96,11 @@ public template PresetT(TStruct) { char* outvalue = null; - auto p = gst_preset_get_meta(getPresetStruct(), Str.toStringz(name), Str.toStringz(tag), &outvalue) != 0; + auto __p = gst_preset_get_meta(getPresetStruct(), Str.toStringz(name), Str.toStringz(tag), &outvalue) != 0; value = Str.toString(outvalue); - return p; + return __p; } /** diff --git a/generated/gstreamer/gstreamer/Promise.d b/generated/gstreamer/gstreamer/Promise.d index 902ec459a..a12629cf0 100644 --- a/generated/gstreamer/gstreamer/Promise.d +++ b/generated/gstreamer/gstreamer/Promise.d @@ -30,19 +30,22 @@ private import gstreamer.Structure; private import gstreamer.c.functions; public import gstreamer.c.types; public import gstreamerc.gstreamertypes; +private import gtkd.Loader; /** * The #GstPromise object implements the container for values that may * be available later. i.e. a Future or a Promise in - * https://en.wikipedia.org/wiki/Futures_and_promises + * . * As with all Future/Promise-like functionality, there is the concept of the * producer of the value and the consumer of the value. * * A #GstPromise is created with gst_promise_new() by the consumer and passed * to the producer to avoid thread safety issues with the change callback. * A #GstPromise can be replied to with a value (or an error) by the producer - * with gst_promise_reply(). gst_promise_interrupt() is for the consumer to + * with gst_promise_reply(). The exact value returned is defined by the API + * contract of the producer and %NULL may be a valid reply. + * gst_promise_interrupt() is for the consumer to * indicate to the producer that the value is not needed anymore and producing * that value can stop. The @GST_PROMISE_RESULT_EXPIRED state set by a call * to gst_promise_expire() indicates to the consumer that a value will never @@ -116,6 +119,12 @@ public class Promise this.ownedRef = ownedRef; } + ~this () + { + if ( Linker.isLoaded(LIBRARY_GSTREAMER) && ownedRef ) + gst_promise_unref(gstPromise); + } + /** */ public static GType getType() @@ -132,14 +141,14 @@ public class Promise */ public this() { - auto p = gst_promise_new(); + auto __p = gst_promise_new(); - if(p is null) + if(__p is null) { throw new ConstructionException("null returned by new"); } - this(cast(GstPromise*) p); + this(cast(GstPromise*) __p); } /** @@ -160,14 +169,14 @@ public class Promise */ public this(GstPromiseChangeFunc func, void* userData, GDestroyNotify notify) { - auto p = gst_promise_new_with_change_func(func, userData, notify); + auto __p = gst_promise_new_with_change_func(func, userData, notify); - if(p is null) + if(__p is null) { throw new ConstructionException("null returned by new_with_change_func"); } - this(cast(GstPromise*) p); + this(cast(GstPromise*) __p); } /** @@ -192,14 +201,14 @@ public class Promise */ public Structure getReply() { - auto p = gst_promise_get_reply(gstPromise); + auto __p = gst_promise_get_reply(gstPromise); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Structure)(cast(GstStructure*) p); + return ObjectG.getDObject!(Structure)(cast(GstStructure*) __p); } /** @@ -214,6 +223,26 @@ public class Promise gst_promise_interrupt(gstPromise); } + alias doref = ref_; + /** + * Increases the refcount of the given @promise by one. + * + * Returns: @promise + * + * Since: 1.14 + */ + public Promise ref_() + { + auto __p = gst_promise_ref(gstPromise); + + if(__p is null) + { + return null; + } + + return ObjectG.getDObject!(Promise)(cast(GstPromise*) __p, true); + } + /** * Set a reply on @promise. This will wake up any waiters with * %GST_PROMISE_RESULT_REPLIED. Called by the producer of the value to @@ -232,6 +261,17 @@ public class Promise gst_promise_reply(gstPromise, (s is null) ? null : s.getStructureStruct(true)); } + /** + * Decreases the refcount of the promise. If the refcount reaches 0, the + * promise will be freed. + * + * Since: 1.14 + */ + public void unref() + { + gst_promise_unref(gstPromise); + } + /** * Wait for @promise to move out of the %GST_PROMISE_RESULT_PENDING state. * If @promise is not in %GST_PROMISE_RESULT_PENDING then it will return diff --git a/generated/gstreamer/gstreamer/ProtectionMeta.d b/generated/gstreamer/gstreamer/ProtectionMeta.d index f39a65998..b598ed96e 100644 --- a/generated/gstreamer/gstreamer/ProtectionMeta.d +++ b/generated/gstreamer/gstreamer/ProtectionMeta.d @@ -25,6 +25,9 @@ module gstreamer.ProtectionMeta; private import glib.Str; +private import glib.c.functions; +private import gobject.ObjectG; +private import gstreamer.MetaInfo; private import gstreamer.c.functions; public import gstreamer.c.types; public import gstreamerc.gstreamertypes; @@ -67,9 +70,16 @@ public class ProtectionMeta /** */ - public static GstMetaInfo* getInfo() + public static MetaInfo getInfo() { - return gst_protection_meta_get_info(); + auto __p = gst_protection_meta_get_info(); + + if(__p is null) + { + return null; + } + + return ObjectG.getDObject!(MetaInfo)(cast(GstMetaInfo*) __p); } /** */ diff --git a/generated/gstreamer/gstreamer/ProxyPad.d b/generated/gstreamer/gstreamer/ProxyPad.d index 703b5ff0b..9f5a8baec 100644 --- a/generated/gstreamer/gstreamer/ProxyPad.d +++ b/generated/gstreamer/gstreamer/ProxyPad.d @@ -84,7 +84,7 @@ public class ProxyPad : Pad */ public static GstFlowReturn chainDefault(Pad pad, ObjectGst parent, Buffer buffer) { - return gst_proxy_pad_chain_default((pad is null) ? null : pad.getPadStruct(), (parent is null) ? null : parent.getObjectGstStruct(), (buffer is null) ? null : buffer.getBufferStruct()); + return gst_proxy_pad_chain_default((pad is null) ? null : pad.getPadStruct(), (parent is null) ? null : parent.getObjectGstStruct(), (buffer is null) ? null : buffer.getBufferStruct(true)); } /** @@ -100,7 +100,7 @@ public class ProxyPad : Pad */ public static GstFlowReturn chainListDefault(Pad pad, ObjectGst parent, BufferList list) { - return gst_proxy_pad_chain_list_default((pad is null) ? null : pad.getPadStruct(), (parent is null) ? null : parent.getObjectGstStruct(), (list is null) ? null : list.getBufferListStruct()); + return gst_proxy_pad_chain_list_default((pad is null) ? null : pad.getPadStruct(), (parent is null) ? null : parent.getObjectGstStruct(), (list is null) ? null : list.getBufferListStruct(true)); } /** @@ -120,11 +120,11 @@ public class ProxyPad : Pad { GstBuffer* outbuffer = null; - auto p = gst_proxy_pad_getrange_default((pad is null) ? null : pad.getPadStruct(), (parent is null) ? null : parent.getObjectGstStruct(), offset, size, &outbuffer); + auto __p = gst_proxy_pad_getrange_default((pad is null) ? null : pad.getPadStruct(), (parent is null) ? null : parent.getObjectGstStruct(), offset, size, &outbuffer); buffer = ObjectG.getDObject!(Buffer)(outbuffer); - return p; + return __p; } /** @@ -139,14 +139,14 @@ public class ProxyPad : Pad */ public static Iterator iterateInternalLinksDefault(Pad pad, ObjectGst parent) { - auto p = gst_proxy_pad_iterate_internal_links_default((pad is null) ? null : pad.getPadStruct(), (parent is null) ? null : parent.getObjectGstStruct()); + auto __p = gst_proxy_pad_iterate_internal_links_default((pad is null) ? null : pad.getPadStruct(), (parent is null) ? null : parent.getObjectGstStruct()); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Iterator)(cast(GstIterator*) p, true); + return ObjectG.getDObject!(Iterator)(cast(GstIterator*) __p, true); } /** @@ -160,13 +160,13 @@ public class ProxyPad : Pad */ public ProxyPad getInternal() { - auto p = gst_proxy_pad_get_internal(gstProxyPad); + auto __p = gst_proxy_pad_get_internal(gstProxyPad); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(ProxyPad)(cast(GstProxyPad*) p, true); + return ObjectG.getDObject!(ProxyPad)(cast(GstProxyPad*) __p, true); } } diff --git a/generated/gstreamer/gstreamer/Query.d b/generated/gstreamer/gstreamer/Query.d index 38437c880..b5297be93 100644 --- a/generated/gstreamer/gstreamer/Query.d +++ b/generated/gstreamer/gstreamer/Query.d @@ -27,6 +27,7 @@ module gstreamer.Query; private import glib.ConstructionException; private import glib.MemorySlice; private import glib.Str; +private import glib.c.functions; private import gobject.ObjectG; private import gstreamer.AllocationParams; private import gstreamer.Allocator; @@ -37,6 +38,7 @@ private import gstreamer.Structure; private import gstreamer.c.functions; public import gstreamer.c.types; public import gstreamerc.gstreamertypes; +private import gtkd.Loader; /** @@ -56,7 +58,7 @@ public import gstreamerc.gstreamertypes; * res = gst_element_query (pipeline, query); * if (res) { * gint64 duration; - * gst_query_parse_duration (query, NULL, &duration); + * gst_query_parse_duration (query, NULL, &duration); * g_print ("duration = %"GST_TIME_FORMAT, GST_TIME_ARGS (duration)); * } else { * g_print ("duration query failed..."); @@ -93,6 +95,12 @@ public class Query this.ownedRef = ownedRef; } + ~this () + { + if ( Linker.isLoaded(LIBRARY_GSTREAMER) && ownedRef ) + gst_query_unref(gstQuery); + } + /** * Constructs a new query stream position query object. Use gst_query_unref() * when done with it. A position query is used to query the current position @@ -309,14 +317,14 @@ public class Query */ public this(Caps caps, bool needPool) { - auto p = gst_query_new_allocation((caps is null) ? null : caps.getCapsStruct(), needPool); + auto __p = gst_query_new_allocation((caps is null) ? null : caps.getCapsStruct(), needPool); - if(p is null) + if(__p is null) { throw new ConstructionException("null returned by new_allocation"); } - this(cast(GstQuery*) p); + this(cast(GstQuery*) __p); } /** @@ -332,14 +340,14 @@ public class Query */ public this() { - auto p = gst_query_new_bitrate(); + auto __p = gst_query_new_bitrate(); - if(p is null) + if(__p is null) { throw new ConstructionException("null returned by new_bitrate"); } - this(cast(GstQuery*) p); + this(cast(GstQuery*) __p); } /** @@ -357,14 +365,14 @@ public class Query */ public this(GstFormat format) { - auto p = gst_query_new_buffering(format); + auto __p = gst_query_new_buffering(format); - if(p is null) + if(__p is null) { throw new ConstructionException("null returned by new_buffering"); } - this(cast(GstQuery*) p); + this(cast(GstQuery*) __p); } /** @@ -398,14 +406,14 @@ public class Query */ public this(Caps filter) { - auto p = gst_query_new_caps((filter is null) ? null : filter.getCapsStruct()); + auto __p = gst_query_new_caps((filter is null) ? null : filter.getCapsStruct()); - if(p is null) + if(__p is null) { throw new ConstructionException("null returned by new_caps"); } - this(cast(GstQuery*) p); + this(cast(GstQuery*) __p); } /** @@ -424,14 +432,14 @@ public class Query */ public this(string contextType) { - auto p = gst_query_new_context(Str.toStringz(contextType)); + auto __p = gst_query_new_context(Str.toStringz(contextType)); - if(p is null) + if(__p is null) { throw new ConstructionException("null returned by new_context"); } - this(cast(GstQuery*) p); + this(cast(GstQuery*) __p); } /** @@ -452,14 +460,14 @@ public class Query */ public this(GstFormat srcFormat, long value, GstFormat destFormat) { - auto p = gst_query_new_convert(srcFormat, value, destFormat); + auto __p = gst_query_new_convert(srcFormat, value, destFormat); - if(p is null) + if(__p is null) { throw new ConstructionException("null returned by new_convert"); } - this(cast(GstQuery*) p); + this(cast(GstQuery*) __p); } /** @@ -478,14 +486,14 @@ public class Query */ public this(GstQueryType type, Structure structure) { - auto p = gst_query_new_custom(type, (structure is null) ? null : structure.getStructureStruct(true)); + auto __p = gst_query_new_custom(type, (structure is null) ? null : structure.getStructureStruct(true)); - if(p is null) + if(__p is null) { throw new ConstructionException("null returned by new_custom"); } - this(cast(GstQuery*) p); + this(cast(GstQuery*) __p); } /** @@ -552,6 +560,25 @@ public class Query gst_query_add_scheduling_mode(gstQuery, mode); } + /** + * Copies the given query using the copy function of the parent #GstStructure. + * + * Free-function: gst_query_unref + * + * Returns: a new copy of @q. + */ + public Query copy() + { + auto __p = gst_query_copy(gstQuery); + + if(__p is null) + { + return null; + } + + return ObjectG.getDObject!(Query)(cast(GstQuery*) __p, true); + } + /** * Check if @query has metadata @api set. When this function returns %TRUE, * @index will contain the index where the requested API and the parameters @@ -637,14 +664,14 @@ public class Query */ public Structure getStructure() { - auto p = gst_query_get_structure(gstQuery); + auto __p = gst_query_get_structure(gstQuery); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Structure)(cast(GstStructure*) p); + return ObjectG.getDObject!(Structure)(cast(GstStructure*) __p); } /** @@ -863,11 +890,11 @@ public class Query { char* outcontextType = null; - auto p = gst_query_parse_context_type(gstQuery, &outcontextType) != 0; + auto __p = gst_query_parse_context_type(gstQuery, &outcontextType) != 0; contextType = Str.toString(outcontextType); - return p; + return __p; } /** @@ -944,11 +971,11 @@ public class Query { GstStructure* outparams = null; - auto p = gst_query_parse_nth_allocation_meta(gstQuery, index, &outparams); + auto __p = gst_query_parse_nth_allocation_meta(gstQuery, index, &outparams); params = ObjectG.getDObject!(Structure)(outparams); - return p; + return __p; } /** @@ -1162,6 +1189,24 @@ public class Query permanent = (outpermanent == 1); } + alias doref = ref_; + /** + * Increases the refcount of the given query by one. + * + * Returns: @q + */ + public Query ref_() + { + auto __p = gst_query_ref(gstQuery); + + if(__p is null) + { + return null; + } + + return ObjectG.getDObject!(Query)(cast(GstQuery*) __p, true); + } + /** * Remove the metadata API at @index of the metadata API array. * @@ -1474,6 +1519,15 @@ public class Query gst_query_set_uri_redirection_permanent(gstQuery, permanent); } + /** + * Decreases the refcount of the query. If the refcount reaches 0, the query + * will be freed. + */ + public void unref() + { + gst_query_unref(gstQuery); + } + /** * Get the structure of a query. This method should be called with a writable * @query so that the returned structure is guaranteed to be writable. @@ -1484,14 +1538,69 @@ public class Query */ public Structure writableStructure() { - auto p = gst_query_writable_structure(gstQuery); + auto __p = gst_query_writable_structure(gstQuery); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Structure)(cast(GstStructure*) p); + return ObjectG.getDObject!(Structure)(cast(GstStructure*) __p); + } + + /** + * Modifies a pointer to a #GstQuery to point to a different #GstQuery. The + * modification is done atomically (so this is useful for ensuring thread safety + * in some cases), and the reference counts are updated appropriately (the old + * query is unreffed, the new one is reffed). + * + * Either @new_query or the #GstQuery pointed to by @old_query may be %NULL. + * + * Params: + * oldQuery = pointer to a pointer to a + * #GstQuery to be replaced. + * newQuery = pointer to a #GstQuery that will + * replace the query pointed to by @old_query. + * + * Returns: %TRUE if @new_query was different from @old_query + */ + public static bool replace(ref Query oldQuery, Query newQuery) + { + GstQuery* outoldQuery = oldQuery.getQueryStruct(); + + auto __p = gst_query_replace(&outoldQuery, (newQuery is null) ? null : newQuery.getQueryStruct()) != 0; + + oldQuery = ObjectG.getDObject!(Query)(outoldQuery); + + return __p; + } + + /** + * Modifies a pointer to a #GstQuery to point to a different #GstQuery. This + * function is similar to gst_query_replace() except that it takes ownership of + * @new_query. + * + * Either @new_query or the #GstQuery pointed to by @old_query may be %NULL. + * + * Params: + * oldQuery = pointer to a + * pointer to a #GstQuery to be stolen. + * newQuery = pointer to a #GstQuery that will + * replace the query pointed to by @old_query. + * + * Returns: %TRUE if @new_query was different from @old_query + * + * Since: 1.16 + */ + public static bool take(ref Query oldQuery, Query newQuery) + { + GstQuery* outoldQuery = oldQuery.getQueryStruct(); + + auto __p = gst_query_take(&outoldQuery, (newQuery is null) ? null : newQuery.getQueryStruct(true)) != 0; + + oldQuery = ObjectG.getDObject!(Query)(outoldQuery); + + return __p; } /** diff --git a/generated/gstreamer/gstreamer/ReferenceTimestampMeta.d b/generated/gstreamer/gstreamer/ReferenceTimestampMeta.d index 0cae2f80f..f4bcfda4c 100644 --- a/generated/gstreamer/gstreamer/ReferenceTimestampMeta.d +++ b/generated/gstreamer/gstreamer/ReferenceTimestampMeta.d @@ -24,6 +24,8 @@ module gstreamer.ReferenceTimestampMeta; +private import gobject.ObjectG; +private import gstreamer.MetaInfo; private import gstreamer.c.functions; public import gstreamer.c.types; public import gstreamerc.gstreamertypes; @@ -36,10 +38,10 @@ public import gstreamerc.gstreamertypes; * captured. * * The reference is stored as a #GstCaps in @reference. Examples of valid - * references would be "timestamp/x-drivername-stream" for timestamps that are locally - * generated by some driver named "drivername" when generating the stream, - * e.g. based on a frame counter, or "timestamp/x-ntp, host=pool.ntp.org, - * port=123" for timestamps based on a specific NTP server. + * references would be `timestamp/x-drivername-stream` for timestamps that are locally + * generated by some driver named `drivername` when generating the stream, + * e.g. based on a frame counter, or `timestamp/x-ntp, host=pool.ntp.org, + * port=123` for timestamps based on a specific NTP server. * * Since: 1.14 */ @@ -47,14 +49,21 @@ public struct ReferenceTimestampMeta { /** - * Get the global #GstMetaInfo describing the #GstReferenceTimestampMeta meta. + * Gets the global #GstMetaInfo describing the #GstReferenceTimestampMeta meta. * * Returns: The #GstMetaInfo * * Since: 1.14 */ - public static GstMetaInfo* getInfo() + public static MetaInfo getInfo() { - return gst_reference_timestamp_meta_get_info(); + auto __p = gst_reference_timestamp_meta_get_info(); + + if(__p is null) + { + return null; + } + + return ObjectG.getDObject!(MetaInfo)(cast(GstMetaInfo*) __p); } } diff --git a/generated/gstreamer/gstreamer/Registry.d b/generated/gstreamer/gstreamer/Registry.d index dba6c67a2..e26ce2745 100644 --- a/generated/gstreamer/gstreamer/Registry.d +++ b/generated/gstreamer/gstreamer/Registry.d @@ -170,14 +170,14 @@ public class Registry : ObjectGst */ public static Registry get() { - auto p = gst_registry_get(); + auto __p = gst_registry_get(); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Registry)(cast(GstRegistry*) p); + return ObjectG.getDObject!(Registry)(cast(GstRegistry*) __p); } /** @@ -253,14 +253,14 @@ public class Registry : ObjectGst */ public ListG featureFilter(GstPluginFeatureFilter filter, bool first, void* userData) { - auto p = gst_registry_feature_filter(gstRegistry, filter, first, userData); + auto __p = gst_registry_feature_filter(gstRegistry, filter, first, userData); - if(p is null) + if(__p is null) { return null; } - return new ListG(cast(GList*) p, true); + return new ListG(cast(GList*) __p, true); } /** @@ -278,14 +278,14 @@ public class Registry : ObjectGst */ public PluginFeature findFeature(string name, GType type) { - auto p = gst_registry_find_feature(gstRegistry, Str.toStringz(name), type); + auto __p = gst_registry_find_feature(gstRegistry, Str.toStringz(name), type); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(PluginFeature)(cast(GstPluginFeature*) p, true); + return ObjectG.getDObject!(PluginFeature)(cast(GstPluginFeature*) __p, true); } /** @@ -303,14 +303,14 @@ public class Registry : ObjectGst */ public Plugin findPlugin(string name) { - auto p = gst_registry_find_plugin(gstRegistry, Str.toStringz(name)); + auto __p = gst_registry_find_plugin(gstRegistry, Str.toStringz(name)); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Plugin)(cast(GstPlugin*) p, true); + return ObjectG.getDObject!(Plugin)(cast(GstPlugin*) __p, true); } /** @@ -326,14 +326,14 @@ public class Registry : ObjectGst */ public ListG getFeatureList(GType type) { - auto p = gst_registry_get_feature_list(gstRegistry, type); + auto __p = gst_registry_get_feature_list(gstRegistry, type); - if(p is null) + if(__p is null) { return null; } - return new ListG(cast(GList*) p, true); + return new ListG(cast(GList*) __p, true); } /** @@ -347,14 +347,14 @@ public class Registry : ObjectGst */ public ListG getFeatureListByPlugin(string name) { - auto p = gst_registry_get_feature_list_by_plugin(gstRegistry, Str.toStringz(name)); + auto __p = gst_registry_get_feature_list_by_plugin(gstRegistry, Str.toStringz(name)); - if(p is null) + if(__p is null) { return null; } - return new ListG(cast(GList*) p, true); + return new ListG(cast(GList*) __p, true); } /** @@ -379,14 +379,14 @@ public class Registry : ObjectGst */ public ListG getPluginList() { - auto p = gst_registry_get_plugin_list(gstRegistry); + auto __p = gst_registry_get_plugin_list(gstRegistry); - if(p is null) + if(__p is null) { return null; } - return new ListG(cast(GList*) p, true); + return new ListG(cast(GList*) __p, true); } /** @@ -401,14 +401,14 @@ public class Registry : ObjectGst */ public Plugin lookup(string filename) { - auto p = gst_registry_lookup(gstRegistry, Str.toStringz(filename)); + auto __p = gst_registry_lookup(gstRegistry, Str.toStringz(filename)); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Plugin)(cast(GstPlugin*) p, true); + return ObjectG.getDObject!(Plugin)(cast(GstPlugin*) __p, true); } /** @@ -424,14 +424,14 @@ public class Registry : ObjectGst */ public PluginFeature lookupFeature(string name) { - auto p = gst_registry_lookup_feature(gstRegistry, Str.toStringz(name)); + auto __p = gst_registry_lookup_feature(gstRegistry, Str.toStringz(name)); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(PluginFeature)(cast(GstPluginFeature*) p, true); + return ObjectG.getDObject!(PluginFeature)(cast(GstPluginFeature*) __p, true); } /** @@ -453,14 +453,14 @@ public class Registry : ObjectGst */ public ListG pluginFilter(GstPluginFilter filter, bool first, void* userData) { - auto p = gst_registry_plugin_filter(gstRegistry, filter, first, userData); + auto __p = gst_registry_plugin_filter(gstRegistry, filter, first, userData); - if(p is null) + if(__p is null) { return null; } - return new ListG(cast(GList*) p, true); + return new ListG(cast(GList*) __p, true); } /** diff --git a/generated/gstreamer/gstreamer/Sample.d b/generated/gstreamer/gstreamer/Sample.d index d96046599..0ad71d818 100644 --- a/generated/gstreamer/gstreamer/Sample.d +++ b/generated/gstreamer/gstreamer/Sample.d @@ -34,6 +34,7 @@ private import gstreamer.Structure; private import gstreamer.c.functions; public import gstreamer.c.types; public import gstreamerc.gstreamertypes; +private import gtkd.Loader; /** @@ -69,6 +70,12 @@ public class Sample this.ownedRef = ownedRef; } + ~this () + { + if ( Linker.isLoaded(LIBRARY_GSTREAMER) && ownedRef ) + gst_sample_unref(gstSample); + } + /** */ public static GType getType() @@ -94,14 +101,34 @@ public class Sample */ public this(Buffer buffer, Caps caps, Segment segment, Structure info) { - auto p = gst_sample_new((buffer is null) ? null : buffer.getBufferStruct(), (caps is null) ? null : caps.getCapsStruct(), (segment is null) ? null : segment.getSegmentStruct(), (info is null) ? null : info.getStructureStruct(true)); + auto __p = gst_sample_new((buffer is null) ? null : buffer.getBufferStruct(), (caps is null) ? null : caps.getCapsStruct(), (segment is null) ? null : segment.getSegmentStruct(), (info is null) ? null : info.getStructureStruct(true)); - if(p is null) + if(__p is null) { throw new ConstructionException("null returned by new"); } - this(cast(GstSample*) p); + this(cast(GstSample*) __p); + } + + /** + * Create a copy of the given sample. This will also make a newly allocated + * copy of the data the source sample contains. + * + * Returns: a new copy of @buf. + * + * Since: 1.2 + */ + public Sample copy() + { + auto __p = gst_sample_copy(gstSample); + + if(__p is null) + { + return null; + } + + return ObjectG.getDObject!(Sample)(cast(GstSample*) __p, true); } /** @@ -114,14 +141,14 @@ public class Sample */ public Buffer getBuffer() { - auto p = gst_sample_get_buffer(gstSample); + auto __p = gst_sample_get_buffer(gstSample); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Buffer)(cast(GstBuffer*) p); + return ObjectG.getDObject!(Buffer)(cast(GstBuffer*) __p); } /** @@ -136,14 +163,14 @@ public class Sample */ public BufferList getBufferList() { - auto p = gst_sample_get_buffer_list(gstSample); + auto __p = gst_sample_get_buffer_list(gstSample); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(BufferList)(cast(GstBufferList*) p); + return ObjectG.getDObject!(BufferList)(cast(GstBufferList*) __p); } /** @@ -156,14 +183,14 @@ public class Sample */ public Caps getCaps() { - auto p = gst_sample_get_caps(gstSample); + auto __p = gst_sample_get_caps(gstSample); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Caps)(cast(GstCaps*) p); + return ObjectG.getDObject!(Caps)(cast(GstCaps*) __p); } /** @@ -174,14 +201,14 @@ public class Sample */ public Structure getInfo() { - auto p = gst_sample_get_info(gstSample); + auto __p = gst_sample_get_info(gstSample); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Structure)(cast(GstStructure*) p); + return ObjectG.getDObject!(Structure)(cast(GstStructure*) __p); } /** @@ -192,14 +219,32 @@ public class Sample */ public Segment getSegment() { - auto p = gst_sample_get_segment(gstSample); + auto __p = gst_sample_get_segment(gstSample); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Segment)(cast(GstSegment*) p); + return ObjectG.getDObject!(Segment)(cast(GstSegment*) __p); + } + + alias doref = ref_; + /** + * Increases the refcount of the given sample by one. + * + * Returns: @sample + */ + public Sample ref_() + { + auto __p = gst_sample_ref(gstSample); + + if(__p is null) + { + return null; + } + + return ObjectG.getDObject!(Sample)(cast(GstSample*) __p, true); } /** @@ -267,4 +312,13 @@ public class Sample { gst_sample_set_segment(gstSample, (segment is null) ? null : segment.getSegmentStruct()); } + + /** + * Decreases the refcount of the sample. If the refcount reaches 0, the + * sample will be freed. + */ + public void unref() + { + gst_sample_unref(gstSample); + } } diff --git a/generated/gstreamer/gstreamer/Segment.d b/generated/gstreamer/gstreamer/Segment.d index cd2ca7163..251e62afe 100644 --- a/generated/gstreamer/gstreamer/Segment.d +++ b/generated/gstreamer/gstreamer/Segment.d @@ -134,14 +134,14 @@ public class Segment */ public this() { - auto p = gst_segment_new(); + auto __p = gst_segment_new(); - if(p is null) + if(__p is null) { throw new ConstructionException("null returned by new"); } - this(cast(GstSegment*) p); + this(cast(GstSegment*) __p); } /** @@ -184,14 +184,14 @@ public class Segment */ public Segment copy() { - auto p = gst_segment_copy(gstSegment); + auto __p = gst_segment_copy(gstSegment); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Segment)(cast(GstSegment*) p, true); + return ObjectG.getDObject!(Segment)(cast(GstSegment*) __p, true); } /** @@ -250,11 +250,11 @@ public class Segment { int outupdate = (update ? 1 : 0); - auto p = gst_segment_do_seek(gstSegment, rate, format, flags, startType, start, stopType, stop, &outupdate) != 0; + auto __p = gst_segment_do_seek(gstSegment, rate, format, flags, startType, start, stopType, stop, &outupdate) != 0; update = (outupdate == 1); - return p; + return __p; } /** diff --git a/generated/gstreamer/gstreamer/SharedTaskPool.d b/generated/gstreamer/gstreamer/SharedTaskPool.d new file mode 100644 index 000000000..0bfdd4905 --- /dev/null +++ b/generated/gstreamer/gstreamer/SharedTaskPool.d @@ -0,0 +1,127 @@ +/* + * This file is part of gtkD. + * + * gtkD is free software; you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 + * of the License, or (at your option) any later version, with + * some exceptions, please read the COPYING file. + * + * gtkD is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with gtkD; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110, USA + */ + +// generated automatically - do not change +// find conversion definition on APILookup.txt +// implement new conversion functionalities on the wrap.utils pakage + + +module gstreamer.SharedTaskPool; + +private import glib.ConstructionException; +private import gobject.ObjectG; +private import gstreamer.TaskPool; +private import gstreamer.c.functions; +public import gstreamer.c.types; +public import gstreamerc.gstreamertypes; + + +/** + * The #GstSharedTaskPool object. + * + * Since: 1.20 + */ +public class SharedTaskPool : TaskPool +{ + /** the main Gtk struct */ + protected GstSharedTaskPool* gstSharedTaskPool; + + /** Get the main Gtk struct */ + public GstSharedTaskPool* getSharedTaskPoolStruct(bool transferOwnership = false) + { + if (transferOwnership) + ownedRef = false; + return gstSharedTaskPool; + } + + /** the main Gtk struct as a void* */ + protected override void* getStruct() + { + return cast(void*)gstSharedTaskPool; + } + + /** + * Sets our main struct and passes it to the parent class. + */ + public this (GstSharedTaskPool* gstSharedTaskPool, bool ownedRef = false) + { + this.gstSharedTaskPool = gstSharedTaskPool; + super(cast(GstTaskPool*)gstSharedTaskPool, ownedRef); + } + + + /** */ + public static GType getType() + { + return gst_shared_task_pool_get_type(); + } + + /** + * Create a new shared task pool. The shared task pool will queue tasks on + * a maximum number of threads, 1 by default. + * + * Do not use a #GstSharedTaskPool to manage potentially inter-dependent tasks such + * as pad tasks, as having one task waiting on another to return before returning + * would cause obvious deadlocks if they happen to share the same thread. + * + * Returns: a new #GstSharedTaskPool. gst_object_unref() after usage. + * + * Since: 1.20 + * + * Throws: ConstructionException GTK+ fails to create the object. + */ + public this() + { + auto __p = gst_shared_task_pool_new(); + + if(__p is null) + { + throw new ConstructionException("null returned by new"); + } + + this(cast(GstSharedTaskPool*) __p, true); + } + + /** + * Returns: the maximum number of threads @pool is configured to spawn + * + * Since: 1.20 + */ + public uint getMaxThreads() + { + return gst_shared_task_pool_get_max_threads(gstSharedTaskPool); + } + + /** + * Update the maximal number of threads the @pool may spawn. When + * the maximal number of threads is reduced, existing threads are not + * immediately shut down, see g_thread_pool_set_max_threads(). + * + * Setting @max_threads to 0 effectively freezes the pool. + * + * Params: + * maxThreads = Maximum number of threads to spawn. + * + * Since: 1.20 + */ + public void setMaxThreads(uint maxThreads) + { + gst_shared_task_pool_set_max_threads(gstSharedTaskPool, maxThreads); + } +} diff --git a/generated/gstreamer/gstreamer/StaticCaps.d b/generated/gstreamer/gstreamer/StaticCaps.d index 6b61dfed9..f78df5bdf 100644 --- a/generated/gstreamer/gstreamer/StaticCaps.d +++ b/generated/gstreamer/gstreamer/StaticCaps.d @@ -32,7 +32,7 @@ public import gstreamerc.gstreamertypes; /** - * Datastructure to initialize #GstCaps from a string description usually + * Data structure to initialize #GstCaps from a string description usually * used in conjunction with GST_STATIC_CAPS() and gst_static_caps_get() to * instantiate a #GstCaps. */ @@ -67,7 +67,7 @@ public class StaticCaps /** - * Clean up the cached caps contained in @static_caps. + * Cleans up the cached caps contained in @static_caps. */ public void cleanup() { @@ -77,20 +77,19 @@ public class StaticCaps /** * Converts a #GstStaticCaps to a #GstCaps. * - * Returns: a pointer to the #GstCaps. Unref - * after usage. Since the core holds an additional ref to the - * returned caps, use gst_caps_make_writable() on the returned caps - * to modify it. + * Returns: a pointer to the #GstCaps. Since the + * core holds an additional ref to the returned caps, use + * gst_caps_make_writable() on the returned caps to modify it. */ public Caps get() { - auto p = gst_static_caps_get(gstStaticCaps); + auto __p = gst_static_caps_get(gstStaticCaps); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Caps)(cast(GstCaps*) p, true); + return ObjectG.getDObject!(Caps)(cast(GstCaps*) __p, true); } } diff --git a/generated/gstreamer/gstreamer/StaticPadTemplate.d b/generated/gstreamer/gstreamer/StaticPadTemplate.d index 7da809029..a6de934a4 100644 --- a/generated/gstreamer/gstreamer/StaticPadTemplate.d +++ b/generated/gstreamer/gstreamer/StaticPadTemplate.d @@ -26,6 +26,7 @@ module gstreamer.StaticPadTemplate; private import glib.MemorySlice; private import glib.Str; +private import glib.c.functions; private import gobject.ObjectG; private import gstreamer.Caps; private import gstreamer.PadTemplate; @@ -138,14 +139,14 @@ public final class StaticPadTemplate */ public PadTemplate get() { - auto p = gst_static_pad_template_get(gstStaticPadTemplate); + auto __p = gst_static_pad_template_get(gstStaticPadTemplate); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(PadTemplate)(cast(GstPadTemplate*) p); + return ObjectG.getDObject!(PadTemplate)(cast(GstPadTemplate*) __p); } /** @@ -158,13 +159,13 @@ public final class StaticPadTemplate */ public Caps getCaps() { - auto p = gst_static_pad_template_get_caps(gstStaticPadTemplate); + auto __p = gst_static_pad_template_get_caps(gstStaticPadTemplate); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Caps)(cast(GstCaps*) p, true); + return ObjectG.getDObject!(Caps)(cast(GstCaps*) __p, true); } } diff --git a/generated/gstreamer/gstreamer/Stream.d b/generated/gstreamer/gstreamer/Stream.d index 7dec13241..1c4c0c979 100644 --- a/generated/gstreamer/gstreamer/Stream.d +++ b/generated/gstreamer/gstreamer/Stream.d @@ -26,6 +26,7 @@ module gstreamer.Stream; private import glib.ConstructionException; private import glib.Str; +private import glib.c.functions; private import gobject.ObjectG; private import gstreamer.Caps; private import gstreamer.ObjectGst; @@ -105,14 +106,14 @@ public class Stream : ObjectGst */ public this(string streamId, Caps caps, GstStreamType type, GstStreamFlags flags) { - auto p = gst_stream_new(Str.toStringz(streamId), (caps is null) ? null : caps.getCapsStruct(), type, flags); + auto __p = gst_stream_new(Str.toStringz(streamId), (caps is null) ? null : caps.getCapsStruct(), type, flags); - if(p is null) + if(__p is null) { throw new ConstructionException("null returned by new"); } - this(cast(GstStream*) p, true); + this(cast(GstStream*) __p, true); } /** @@ -124,14 +125,14 @@ public class Stream : ObjectGst */ public Caps getCaps() { - auto p = gst_stream_get_caps(gstStream); + auto __p = gst_stream_get_caps(gstStream); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Caps)(cast(GstCaps*) p, true); + return ObjectG.getDObject!(Caps)(cast(GstCaps*) __p, true); } /** @@ -180,14 +181,14 @@ public class Stream : ObjectGst */ public TagList getTags() { - auto p = gst_stream_get_tags(gstStream); + auto __p = gst_stream_get_tags(gstStream); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(TagList)(cast(GstTagList*) p, true); + return ObjectG.getDObject!(TagList)(cast(GstTagList*) __p, true); } /** diff --git a/generated/gstreamer/gstreamer/StreamCollection.d b/generated/gstreamer/gstreamer/StreamCollection.d index c0905bbfb..11d1fc959 100644 --- a/generated/gstreamer/gstreamer/StreamCollection.d +++ b/generated/gstreamer/gstreamer/StreamCollection.d @@ -26,6 +26,7 @@ module gstreamer.StreamCollection; private import glib.ConstructionException; private import glib.Str; +private import glib.c.functions; private import gobject.ObjectG; private import gobject.ParamSpec; private import gobject.Signals; @@ -106,14 +107,14 @@ public class StreamCollection : ObjectGst */ public this(string upstreamId) { - auto p = gst_stream_collection_new(Str.toStringz(upstreamId)); + auto __p = gst_stream_collection_new(Str.toStringz(upstreamId)); - if(p is null) + if(__p is null) { throw new ConstructionException("null returned by new"); } - this(cast(GstStreamCollection*) p, true); + this(cast(GstStreamCollection*) __p, true); } /** @@ -157,14 +158,14 @@ public class StreamCollection : ObjectGst */ public Stream getStream(uint index) { - auto p = gst_stream_collection_get_stream(gstStreamCollection, index); + auto __p = gst_stream_collection_get_stream(gstStreamCollection, index); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Stream)(cast(GstStream*) p); + return ObjectG.getDObject!(Stream)(cast(GstStream*) __p); } /** diff --git a/generated/gstreamer/gstreamer/Structure.d b/generated/gstreamer/gstreamer/Structure.d index fca2c22a7..5d0a7f6df 100644 --- a/generated/gstreamer/gstreamer/Structure.d +++ b/generated/gstreamer/gstreamer/Structure.d @@ -27,6 +27,7 @@ module gstreamer.Structure; private import glib.ConstructionException; private import glib.Date; private import glib.Str; +private import glib.c.functions; private import gobject.ObjectG; private import gobject.Value; private import gobject.ValueArray; @@ -38,22 +39,23 @@ private import gtkd.Loader; /** - * A #GstStructure is a collection of key/value pairs. The keys are expressed - * as GQuarks and the values can be of any GType. + * A #GstStructure is a collection of key/value pairs. The keys are expressed as + * GQuarks and the values can be of any GType. * * In addition to the key/value pairs, a #GstStructure also has a name. The name - * starts with a letter and can be filled by letters, numbers and any of "/-_.:". + * starts with a letter and can be filled by letters, numbers and any of + * "/-_.:". * - * #GstStructure is used by various GStreamer subsystems to store information - * in a flexible and extensible way. A #GstStructure does not have a refcount + * #GstStructure is used by various GStreamer subsystems to store information in + * a flexible and extensible way. A #GstStructure does not have a refcount * because it usually is part of a higher level object such as #GstCaps, * #GstMessage, #GstEvent, #GstQuery. It provides a means to enforce mutability * using the refcount of the parent with the gst_structure_set_parent_refcount() * method. * * A #GstStructure can be created with gst_structure_new_empty() or - * gst_structure_new(), which both take a name and an optional set of - * key/value pairs along with the types of the values. + * gst_structure_new(), which both take a name and an optional set of key/value + * pairs along with the types of the values. * * Field values can be changed with gst_structure_set_value() or * gst_structure_set(). @@ -64,14 +66,83 @@ private import gtkd.Loader; * Fields can be removed with gst_structure_remove_field() or * gst_structure_remove_fields(). * - * Strings in structures must be ASCII or UTF-8 encoded. Other encodings are - * not allowed. Strings may be %NULL however. + * Strings in structures must be ASCII or UTF-8 encoded. Other encodings are not + * allowed. Strings may be %NULL however. * - * Be aware that the current #GstCaps / #GstStructure serialization into string - * has limited support for nested #GstCaps / #GstStructure fields. It can only - * support one level of nesting. Using more levels will lead to unexpected - * behavior when using serialization features, such as gst_caps_to_string() or - * gst_value_serialize() and their counterparts. + * ## The serialization format + * + * GstStructure serialization format serialize the GstStructure name, + * keys/GType/values in a comma separated list with the structure name as first + * field without value followed by separated key/value pairs in the form + * `key=value`, for example: + * + * ``` + * a-structure, key=value + * ```` + * + * The values type will be inferred if not explicitly specified with the + * `(GTypeName)value` syntax, for example the following struct will have one + * field called 'is-string' which has the string 'true' as a value: + * + * ``` + * a-struct, field-is-string=(string)true, field-is-boolean=true + * ``` + * + * *Note*: without specifying `(string), `field-is-string` type would have been + * inferred as boolean. + * + * *Note*: we specified `(string)` as a type even if `gchararray` is the actual + * GType name as for convenience some well known types have been aliased or + * abbreviated. + * + * To avoid specifying the type, you can give some hints to the "type system". + * For example to specify a value as a double, you should add a decimal (ie. `1` + * is an `int` while `1.0` is a `double`). + * + * *Note*: when a structure is serialized with #gst_structure_to_string, all + * values are explicitly typed. + * + * Some types have special delimiters: + * + * - [GstValueArray](GST_TYPE_ARRAY) are inside curly brackets (`{` and `}`). + * For example `a-structure, array={1, 2, 3}` + * - Ranges are inside brackets (`[` and `]`). For example `a-structure, + * range=[1, 6, 2]` 1 being the min value, 6 the maximum and 2 the step. To + * specify a #GST_TYPE_INT64_RANGE you need to explicitly specify it like: + * `a-structure, a-int64-range=(gint64) [1, 5]` + * - [GstValueList](GST_TYPE_LIST) are inside "less and greater than" (`<` and + * `>`). For example `a-structure, list=<1, 2, 3> + * + * Structures are delimited either by a null character `\0` or a semicolon `;` + * the latter allowing to store multiple structures in the same string (see + * #GstCaps). + * + * Quotes are used as "default" delimiters and can be used around any types that + * don't use other delimiters (for example `a-struct, i=(int)"1"`). They are use + * to allow adding spaces or special characters (such as delimiters, + * semicolumns, etc..) inside strings and you can use backslashes `\` to escape + * characters inside them, for example: + * + * ``` + * a-struct, special="\"{[(;)]}\" can be used inside quotes" + * ``` + * + * They also allow for nested structure, such as: + * + * ``` + * a-struct, nested=(GstStructure)"nested-struct, nested=true" + * ``` + * + * Since 1.20, nested structures and caps can be specified using brackets (`[` + * and `]`), for example: + * + * ``` + * a-struct, nested=[nested-struct, nested=true] + * ``` + * + * > *note*: gst_structure_to_string() won't use that syntax for backward + * > compatibility reason, gst_structure_serialize() has been added for + * > that purpose. */ public class Structure { @@ -129,6 +200,39 @@ public class Structure return gst_structure_get_type(); } + /** + * Creates a #GstStructure from a string representation. + * If end is not %NULL, a pointer to the place inside the given string + * where parsing ended will be returned. + * + * Free-function: gst_structure_free + * + * Params: + * string_ = a string representation of a #GstStructure. + * end = pointer to store the end of the string in. + * + * Returns: a new #GstStructure or %NULL + * when the string could not be parsed. Free with + * gst_structure_free() after use. + * + * Throws: ConstructionException GTK+ fails to create the object. + */ + public this(string string_, out string end) + { + char* outend = null; + + auto __p = gst_structure_from_string(Str.toStringz(string_), &outend); + + if(__p is null) + { + throw new ConstructionException("null returned by from_string"); + } + + end = Str.toString(outend); + + this(cast(GstStructure*) __p); + } + /** * Creates a new, empty #GstStructure with the given @name. * @@ -145,14 +249,14 @@ public class Structure */ public this(string name) { - auto p = gst_structure_new_empty(Str.toStringz(name)); + auto __p = gst_structure_new_empty(Str.toStringz(name)); - if(p is null) + if(__p is null) { throw new ConstructionException("null returned by new_empty"); } - this(cast(GstStructure*) p); + this(cast(GstStructure*) __p); } /** @@ -169,14 +273,14 @@ public class Structure */ public this(GQuark quark) { - auto p = gst_structure_new_id_empty(quark); + auto __p = gst_structure_new_id_empty(quark); - if(p is null) + if(__p is null) { throw new ConstructionException("null returned by new_id_empty"); } - this(cast(GstStructure*) p); + this(cast(GstStructure*) __p); } /** @@ -199,14 +303,14 @@ public class Structure */ public this(string name, string firstfield, void* varargs) { - auto p = gst_structure_new_valist(Str.toStringz(name), Str.toStringz(firstfield), varargs); + auto __p = gst_structure_new_valist(Str.toStringz(name), Str.toStringz(firstfield), varargs); - if(p is null) + if(__p is null) { throw new ConstructionException("null returned by new_valist"); } - this(cast(GstStructure*) p); + this(cast(GstStructure*) __p); } /** @@ -232,14 +336,14 @@ public class Structure */ public Structure copy() { - auto p = gst_structure_copy(gstStructure); + auto __p = gst_structure_copy(gstStructure); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Structure)(cast(GstStructure*) p, true); + return ObjectG.getDObject!(Structure)(cast(GstStructure*) __p, true); } /** @@ -400,16 +504,18 @@ public class Structure * Returns: %TRUE if the value could be set correctly. If there was no field * with @fieldname or the existing field did not contain a %GST_TYPE_ARRAY, * this function returns %FALSE. + * + * Since: 1.12 */ public bool getArray(string fieldname, out ValueArray array) { GValueArray* outarray = null; - auto p = gst_structure_get_array(gstStructure, Str.toStringz(fieldname), &outarray) != 0; + auto __p = gst_structure_get_array(gstStructure, Str.toStringz(fieldname), &outarray) != 0; array = ObjectG.getDObject!(ValueArray)(outarray); - return p; + return __p; } /** @@ -429,11 +535,11 @@ public class Structure { int outvalue; - auto p = gst_structure_get_boolean(gstStructure, Str.toStringz(fieldname), &outvalue) != 0; + auto __p = gst_structure_get_boolean(gstStructure, Str.toStringz(fieldname), &outvalue) != 0; value = (outvalue == 1); - return p; + return __p; } /** @@ -476,11 +582,11 @@ public class Structure { GDate* outvalue = null; - auto p = gst_structure_get_date(gstStructure, Str.toStringz(fieldname), &outvalue) != 0; + auto __p = gst_structure_get_date(gstStructure, Str.toStringz(fieldname), &outvalue) != 0; value = new Date(outvalue); - return p; + return __p; } /** @@ -505,11 +611,11 @@ public class Structure { GstDateTime* outvalue = null; - auto p = gst_structure_get_date_time(gstStructure, Str.toStringz(fieldname), &outvalue) != 0; + auto __p = gst_structure_get_date_time(gstStructure, Str.toStringz(fieldname), &outvalue) != 0; value = ObjectG.getDObject!(DateTime)(outvalue); - return p; + return __p; } /** @@ -655,17 +761,17 @@ public class Structure * with @fieldname or the existing field did not contain a %GST_TYPE_LIST, this * function returns %FALSE. * - * Since 1.12 + * Since: 1.12 */ public bool getList(string fieldname, out ValueArray array) { GValueArray* outarray = null; - auto p = gst_structure_get_list(gstStructure, Str.toStringz(fieldname), &outarray) != 0; + auto __p = gst_structure_get_list(gstStructure, Str.toStringz(fieldname), &outarray) != 0; array = ObjectG.getDObject!(ValueArray)(outarray); - return p; + return __p; } /** @@ -772,14 +878,14 @@ public class Structure */ public Value getValue(string fieldname) { - auto p = gst_structure_get_value(gstStructure, Str.toStringz(fieldname)); + auto __p = gst_structure_get_value(gstStructure, Str.toStringz(fieldname)); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Value)(cast(GValue*) p); + return ObjectG.getDObject!(Value)(cast(GValue*) __p); } /** @@ -849,14 +955,14 @@ public class Structure */ public Value idGetValue(GQuark field) { - auto p = gst_structure_id_get_value(gstStructure, field); + auto __p = gst_structure_id_get_value(gstStructure, field); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Value)(cast(GValue*) p); + return ObjectG.getDObject!(Value)(cast(GValue*) __p); } /** @@ -936,14 +1042,14 @@ public class Structure */ public Structure intersect(Structure struct2) { - auto p = gst_structure_intersect(gstStructure, (struct2 is null) ? null : struct2.getStructureStruct()); + auto __p = gst_structure_intersect(gstStructure, (struct2 is null) ? null : struct2.getStructureStruct()); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Structure)(cast(GstStructure*) p, true); + return ObjectG.getDObject!(Structure)(cast(GstStructure*) __p, true); } /** @@ -1046,17 +1152,43 @@ public class Structure gst_structure_remove_fields_valist(gstStructure, Str.toStringz(fieldname), varargs); } + /** + * Converts @structure to a human-readable string representation. + * + * This version of the caps serialization function introduces support for nested + * structures and caps but the resulting strings won't be parsable with + * GStreamer prior to 1.20 unless #GST_SERIALIZE_FLAG_BACKWARD_COMPAT is passed + * as @flag. + * + * Free-function: g_free + * + * Params: + * flags = The flags to use to serialize structure + * + * Returns: a pointer to string allocated by g_malloc(). + * g_free() after usage. + * + * Since: 1.20 + */ + public string serialize(GstSerializeFlags flags) + { + auto retStr = gst_structure_serialize(gstStructure, flags); + + scope(exit) Str.freeString(retStr); + return Str.toString(retStr); + } + /** * This is useful in language bindings where unknown GValue types are not * supported. This function will convert a @array to %GST_TYPE_ARRAY and set * the field specified by @fieldname. Be aware that this is slower then using * %GST_TYPE_ARRAY in a #GValue directly. * - * Since 1.12 - * * Params: * fieldname = the name of a field * array = a pointer to a #GValueArray + * + * Since: 1.12 */ public void setArray(string fieldname, ValueArray array) { @@ -1069,11 +1201,11 @@ public class Structure * the field specified by @fieldname. Be aware that this is slower then using * %GST_TYPE_LIST in a #GValue directly. * - * Since 1.12 - * * Params: * fieldname = the name of a field * array = a pointer to a #GValueArray + * + * Since: 1.12 */ public void setList(string fieldname, ValueArray array) { @@ -1152,14 +1284,14 @@ public class Structure /** * Converts @structure to a human-readable string representation. * - * For debugging purposes its easier to do something like this: - * |[ - * GST_LOG ("structure is %" GST_PTR_FORMAT, structure); + * For debugging purposes its easier to do something like this: |[ GST_LOG ("structure is %" GST_PTR_FORMAT, structure); * ]| * This prints the structure in human readable form. * - * The current implementation of serialization will lead to unexpected results - * when there are nested #GstCaps / #GstStructure deeper than one level. + * This function will lead to unexpected results when there are nested #GstCaps + * / #GstStructure deeper than one level, you should user + * gst_structure_serialize() instead for those cases. * * Free-function: g_free * @@ -1175,33 +1307,32 @@ public class Structure } /** - * Creates a #GstStructure from a string representation. - * If end is not %NULL, a pointer to the place inside the given string - * where parsing ended will be returned. + * Atomically modifies a pointer to point to a new structure. + * The #GstStructure @oldstr_ptr is pointing to is freed and + * @newstr is taken ownership over. * - * Free-function: gst_structure_free + * Either @newstr and the value pointed to by @oldstr_ptr may be %NULL. + * + * It is a programming error if both @newstr and the value pointed to by + * @oldstr_ptr refer to the same, non-%NULL structure. * * Params: - * string_ = a string representation of a #GstStructure. - * end = pointer to store the end of the string in. + * oldstrPtr = pointer to a place of + * a #GstStructure to take + * newstr = a new #GstStructure * - * Returns: a new #GstStructure or %NULL - * when the string could not be parsed. Free with - * gst_structure_free() after use. + * Returns: %TRUE if @newstr was different from @oldstr_ptr + * + * Since: 1.18 */ - public static Structure fromString(string string_, out string end) + public static bool take(ref Structure oldstrPtr, Structure newstr) { - char* outend = null; + GstStructure* outoldstrPtr = oldstrPtr.getStructureStruct(); - auto p = gst_structure_from_string(Str.toStringz(string_), &outend); + auto __p = gst_structure_take(&outoldstrPtr, (newstr is null) ? null : newstr.getStructureStruct(true)) != 0; - end = Str.toString(outend); - - if(p is null) - { - return null; - } + oldstrPtr = ObjectG.getDObject!(Structure)(outoldstrPtr); - return ObjectG.getDObject!(Structure)(cast(GstStructure*) p, true); + return __p; } } diff --git a/generated/gstreamer/gstreamer/SystemClock.d b/generated/gstreamer/gstreamer/SystemClock.d index 4f160e7ac..e00d4cdf4 100644 --- a/generated/gstreamer/gstreamer/SystemClock.d +++ b/generated/gstreamer/gstreamer/SystemClock.d @@ -88,14 +88,14 @@ public class SystemClock : Clock */ public static Clock obtain() { - auto p = gst_system_clock_obtain(); + auto __p = gst_system_clock_obtain(); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Clock)(cast(GstClock*) p, true); + return ObjectG.getDObject!(Clock)(cast(GstClock*) __p, true); } /** diff --git a/generated/gstreamer/gstreamer/TagList.d b/generated/gstreamer/gstreamer/TagList.d index 3b572d746..0112d5acf 100644 --- a/generated/gstreamer/gstreamer/TagList.d +++ b/generated/gstreamer/gstreamer/TagList.d @@ -28,6 +28,7 @@ private import glib.ConstructionException; private import glib.Date; private import glib.MemorySlice; private import glib.Str; +private import glib.c.functions; private import gobject.ObjectG; private import gobject.Value; private import gstreamer.DateTime; @@ -35,6 +36,7 @@ private import gstreamer.Sample; private import gstreamer.c.functions; public import gstreamer.c.types; public import gstreamerc.gstreamertypes; +private import gtkd.Loader; /** @@ -72,6 +74,12 @@ public class TagList this.ownedRef = ownedRef; } + ~this () + { + if ( Linker.isLoaded(LIBRARY_GSTREAMER) && ownedRef ) + gst_tag_list_unref(gstTagList); + } + /** * Gets the #GType used for this tag. @@ -97,14 +105,14 @@ public class TagList */ public this() { - auto p = gst_tag_list_new_empty(); + auto __p = gst_tag_list_new_empty(); - if(p is null) + if(__p is null) { throw new ConstructionException("null returned by new_empty"); } - this(cast(GstTagList*) p); + this(cast(GstTagList*) __p); } /** @@ -120,14 +128,14 @@ public class TagList */ public this(string str) { - auto p = gst_tag_list_new_from_string(Str.toStringz(str)); + auto __p = gst_tag_list_new_from_string(Str.toStringz(str)); - if(p is null) + if(__p is null) { throw new ConstructionException("null returned by new_from_string"); } - this(cast(GstTagList*) p); + this(cast(GstTagList*) __p); } /** @@ -146,14 +154,14 @@ public class TagList */ public this(void* varArgs) { - auto p = gst_tag_list_new_valist(varArgs); + auto __p = gst_tag_list_new_valist(varArgs); - if(p is null) + if(__p is null) { throw new ConstructionException("null returned by new_valist"); } - this(cast(GstTagList*) p); + this(cast(GstTagList*) __p); } /** @@ -195,6 +203,31 @@ public class TagList gst_tag_list_add_value(gstTagList, mode, Str.toStringz(tag), (value is null) ? null : value.getValueStruct()); } + /** + * Creates a new #GstTagList as a copy of the old @taglist. The new taglist + * will have a refcount of 1, owned by the caller, and will be writable as + * a result. + * + * Note that this function is the semantic equivalent of a gst_tag_list_ref() + * followed by a gst_tag_list_make_writable(). If you only want to hold on to a + * reference to the data, you should use gst_tag_list_ref(). + * + * When you are finished with the taglist, call gst_tag_list_unref() on it. + * + * Returns: the new #GstTagList + */ + public TagList copy() + { + auto __p = gst_tag_list_copy(gstTagList); + + if(__p is null) + { + return null; + } + + return ObjectG.getDObject!(TagList)(cast(GstTagList*) __p, true); + } + alias foreac = foreach_; /** * Calls the given function for each tag inside the tag list. Note that if there @@ -224,11 +257,11 @@ public class TagList { int outvalue; - auto p = gst_tag_list_get_boolean(gstTagList, Str.toStringz(tag), &outvalue) != 0; + auto __p = gst_tag_list_get_boolean(gstTagList, Str.toStringz(tag), &outvalue) != 0; value = (outvalue == 1); - return p; + return __p; } /** @@ -247,11 +280,11 @@ public class TagList { int outvalue; - auto p = gst_tag_list_get_boolean_index(gstTagList, Str.toStringz(tag), index, &outvalue) != 0; + auto __p = gst_tag_list_get_boolean_index(gstTagList, Str.toStringz(tag), index, &outvalue) != 0; value = (outvalue == 1); - return p; + return __p; } /** @@ -273,11 +306,11 @@ public class TagList { GDate* outvalue = null; - auto p = gst_tag_list_get_date(gstTagList, Str.toStringz(tag), &outvalue) != 0; + auto __p = gst_tag_list_get_date(gstTagList, Str.toStringz(tag), &outvalue) != 0; value = new Date(outvalue); - return p; + return __p; } /** @@ -299,11 +332,11 @@ public class TagList { GDate* outvalue = null; - auto p = gst_tag_list_get_date_index(gstTagList, Str.toStringz(tag), index, &outvalue) != 0; + auto __p = gst_tag_list_get_date_index(gstTagList, Str.toStringz(tag), index, &outvalue) != 0; value = new Date(outvalue); - return p; + return __p; } /** @@ -325,11 +358,11 @@ public class TagList { GstDateTime* outvalue = null; - auto p = gst_tag_list_get_date_time(gstTagList, Str.toStringz(tag), &outvalue) != 0; + auto __p = gst_tag_list_get_date_time(gstTagList, Str.toStringz(tag), &outvalue) != 0; value = ObjectG.getDObject!(DateTime)(outvalue); - return p; + return __p; } /** @@ -351,11 +384,11 @@ public class TagList { GstDateTime* outvalue = null; - auto p = gst_tag_list_get_date_time_index(gstTagList, Str.toStringz(tag), index, &outvalue) != 0; + auto __p = gst_tag_list_get_date_time_index(gstTagList, Str.toStringz(tag), index, &outvalue) != 0; value = ObjectG.getDObject!(DateTime)(outvalue); - return p; + return __p; } /** @@ -544,11 +577,11 @@ public class TagList { GstSample* outsample = null; - auto p = gst_tag_list_get_sample(gstTagList, Str.toStringz(tag), &outsample) != 0; + auto __p = gst_tag_list_get_sample(gstTagList, Str.toStringz(tag), &outsample) != 0; sample = ObjectG.getDObject!(Sample)(outsample); - return p; + return __p; } /** @@ -573,11 +606,11 @@ public class TagList { GstSample* outsample = null; - auto p = gst_tag_list_get_sample_index(gstTagList, Str.toStringz(tag), index, &outsample) != 0; + auto __p = gst_tag_list_get_sample_index(gstTagList, Str.toStringz(tag), index, &outsample) != 0; sample = ObjectG.getDObject!(Sample)(outsample); - return p; + return __p; } /** @@ -614,11 +647,11 @@ public class TagList { char* outvalue = null; - auto p = gst_tag_list_get_string(gstTagList, Str.toStringz(tag), &outvalue) != 0; + auto __p = gst_tag_list_get_string(gstTagList, Str.toStringz(tag), &outvalue) != 0; value = Str.toString(outvalue); - return p; + return __p; } /** @@ -643,11 +676,11 @@ public class TagList { char* outvalue = null; - auto p = gst_tag_list_get_string_index(gstTagList, Str.toStringz(tag), index, &outvalue) != 0; + auto __p = gst_tag_list_get_string_index(gstTagList, Str.toStringz(tag), index, &outvalue) != 0; value = Str.toString(outvalue); - return p; + return __p; } /** @@ -743,14 +776,14 @@ public class TagList */ public Value getValueIndex(string tag, uint index) { - auto p = gst_tag_list_get_value_index(gstTagList, Str.toStringz(tag), index); + auto __p = gst_tag_list_get_value_index(gstTagList, Str.toStringz(tag), index); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Value)(cast(GValue*) p); + return ObjectG.getDObject!(Value)(cast(GValue*) __p); } /** @@ -802,14 +835,14 @@ public class TagList */ public TagList merge(TagList list2, GstTagMergeMode mode) { - auto p = gst_tag_list_merge(gstTagList, (list2 is null) ? null : list2.getTagListStruct(), mode); + auto __p = gst_tag_list_merge(gstTagList, (list2 is null) ? null : list2.getTagListStruct(), mode); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(TagList)(cast(GstTagList*) p, true); + return ObjectG.getDObject!(TagList)(cast(GstTagList*) __p, true); } /** @@ -855,11 +888,35 @@ public class TagList { char* outvalue = null; - auto p = gst_tag_list_peek_string_index(gstTagList, Str.toStringz(tag), index, &outvalue) != 0; + auto __p = gst_tag_list_peek_string_index(gstTagList, Str.toStringz(tag), index, &outvalue) != 0; value = Str.toString(outvalue); - return p; + return __p; + } + + alias doref = ref_; + /** + * Add a reference to a #GstTagList mini object. + * + * From this point on, until the caller calls gst_tag_list_unref() or + * gst_tag_list_make_writable(), it is guaranteed that the taglist object will + * not change. To use a #GstTagList object, you must always have a refcount on + * it -- either the one made implicitly by e.g. gst_tag_list_new(), or via + * taking one explicitly with this function. + * + * Returns: the same #GstTagList mini object. + */ + public TagList ref_() + { + auto __p = gst_tag_list_ref(gstTagList); + + if(__p is null) + { + return null; + } + + return ObjectG.getDObject!(TagList)(cast(GstTagList*) __p, true); } /** @@ -900,6 +957,14 @@ public class TagList return Str.toString(retStr); } + /** + * Unref a #GstTagList, and and free all its memory when the refcount reaches 0. + */ + public void unref() + { + gst_tag_list_unref(gstTagList); + } + /** * Copies the contents for the given tag into the value, * merging multiple values into one if multiple values are associated @@ -918,11 +983,67 @@ public class TagList { GValue* outdest = sliceNew!GValue(); - auto p = gst_tag_list_copy_value(outdest, (list is null) ? null : list.getTagListStruct(), Str.toStringz(tag)) != 0; + auto __p = gst_tag_list_copy_value(outdest, (list is null) ? null : list.getTagListStruct(), Str.toStringz(tag)) != 0; dest = ObjectG.getDObject!(Value)(outdest, true); - return p; + return __p; + } + + /** + * Modifies a pointer to a #GstTagList to point to a different #GstTagList. The + * modification is done atomically (so this is useful for ensuring thread + * safety in some cases), and the reference counts are updated appropriately + * (the old tag list is unreffed, the new is reffed). + * + * Either @new_taglist or the #GstTagList pointed to by @old_taglist may be + * %NULL. + * + * Params: + * oldTaglist = pointer to a pointer to a + * #GstTagList to be replaced. + * newTaglist = pointer to a #GstTagList that + * will replace the tag list pointed to by @old_taglist. + * + * Returns: %TRUE if @new_taglist was different from @old_taglist + * + * Since: 1.16 + */ + public static bool replace(ref TagList oldTaglist, TagList newTaglist) + { + GstTagList* outoldTaglist = oldTaglist.getTagListStruct(); + + auto __p = gst_tag_list_replace(&outoldTaglist, (newTaglist is null) ? null : newTaglist.getTagListStruct()) != 0; + + oldTaglist = ObjectG.getDObject!(TagList)(outoldTaglist); + + return __p; + } + + /** + * Modifies a pointer to a #GstTagList to point to a different #GstTagList. + * This function is similar to gst_tag_list_replace() except that it takes + * ownership of @new_taglist. + * + * Params: + * oldTaglist = pointer to a pointer to a #GstTagList + * to be replaced. + * newTaglist = pointer to a #GstTagList that + * will replace the taglist pointed to by @old_taglist. + * + * Returns: %TRUE if @new_taglist was different from @old_taglist + * + * Since: 1.16 + */ + public static bool take(ref TagList oldTaglist, TagList newTaglist) + { + GstTagList* outoldTaglist = oldTaglist.getTagListStruct(); + + auto __p = gst_tag_list_take(&outoldTaglist, (newTaglist is null) ? null : newTaglist.getTagListStruct(true)) != 0; + + oldTaglist = ObjectG.getDObject!(TagList)(outoldTaglist); + + return __p; } /** diff --git a/generated/gstreamer/gstreamer/TagSetterT.d b/generated/gstreamer/gstreamer/TagSetterT.d index ec7d7f7c8..b489febe9 100644 --- a/generated/gstreamer/gstreamer/TagSetterT.d +++ b/generated/gstreamer/gstreamer/TagSetterT.d @@ -138,14 +138,14 @@ public template TagSetterT(TStruct) */ public TagList getTagList() { - auto p = gst_tag_setter_get_tag_list(getTagSetterStruct()); + auto __p = gst_tag_setter_get_tag_list(getTagSetterStruct()); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(TagList)(cast(GstTagList*) p); + return ObjectG.getDObject!(TagList)(cast(GstTagList*) __p); } /** diff --git a/generated/gstreamer/gstreamer/Task.d b/generated/gstreamer/gstreamer/Task.d index e814848d8..511d3ca64 100644 --- a/generated/gstreamer/gstreamer/Task.d +++ b/generated/gstreamer/gstreamer/Task.d @@ -138,14 +138,14 @@ public class Task : ObjectGst */ public this(GstTaskFunction func, void* userData, GDestroyNotify notify) { - auto p = gst_task_new(func, userData, notify); + auto __p = gst_task_new(func, userData, notify); - if(p is null) + if(__p is null) { throw new ConstructionException("null returned by new"); } - this(cast(GstTask*) p, true); + this(cast(GstTask*) __p, true); } /** @@ -170,14 +170,14 @@ public class Task : ObjectGst */ public TaskPool getPool() { - auto p = gst_task_get_pool(gstTask); + auto __p = gst_task_get_pool(gstTask); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(TaskPool)(cast(GstTaskPool*) p, true); + return ObjectG.getDObject!(TaskPool)(cast(GstTaskPool*) __p, true); } /** @@ -226,6 +226,21 @@ public class Task : ObjectGst return gst_task_pause(gstTask) != 0; } + /** + * Resume @task in case it was paused. If the task was stopped, it will + * remain in that state and this function will return %FALSE. + * + * Returns: %TRUE if the task could be resumed. + * + * MT safe. + * + * Since: 1.18 + */ + public bool resume() + { + return gst_task_resume(gstTask) != 0; + } + /** * Call @enter_func when the task function of @task is entered. @user_data will * be passed to @enter_func and @notify will be called when @user_data is no diff --git a/generated/gstreamer/gstreamer/TaskPool.d b/generated/gstreamer/gstreamer/TaskPool.d index 8491cc3ed..8e8d84e82 100644 --- a/generated/gstreamer/gstreamer/TaskPool.d +++ b/generated/gstreamer/gstreamer/TaskPool.d @@ -85,14 +85,14 @@ public class TaskPool : ObjectGst */ public this() { - auto p = gst_task_pool_new(); + auto __p = gst_task_pool_new(); - if(p is null) + if(__p is null) { throw new ConstructionException("null returned by new"); } - this(cast(GstTaskPool*) p, true); + this(cast(GstTaskPool*) __p, true); } /** @@ -106,9 +106,34 @@ public class TaskPool : ObjectGst gst_task_pool_cleanup(gstTaskPool); } + /** + * Dispose of the handle returned by gst_task_pool_push(). This does + * not need to be called with the default implementation as the default + * #GstTaskPoolClass::push implementation always returns %NULL. This does not need to be + * called either when calling gst_task_pool_join(), but should be called + * when joining is not necessary, but gst_task_pool_push() returned a + * non-%NULL value. + * + * This method should only be called with the same @pool instance that provided + * @id. + * + * Params: + * id = the id + * + * Since: 1.20 + */ + public void disposeHandle(void* id) + { + gst_task_pool_dispose_handle(gstTaskPool, id); + } + /** * Join a task and/or return it to the pool. @id is the id obtained from - * gst_task_pool_push(). + * gst_task_pool_push(). The default implementation does nothing, as the + * default #GstTaskPoolClass::push implementation always returns %NULL. + * + * This method should only be called with the same @pool instance that provided + * @id. * * Params: * id = the id @@ -146,7 +171,9 @@ public class TaskPool : ObjectGst * * Returns: a pointer that should be used * for the gst_task_pool_join function. This pointer can be %NULL, you - * must check @error to detect errors. + * must check @error to detect errors. If the pointer is not %NULL and + * gst_task_pool_join() is not used, call gst_task_pool_dispose_handle() + * instead. * * Throws: GException on failure. */ @@ -154,13 +181,13 @@ public class TaskPool : ObjectGst { GError* err = null; - auto p = gst_task_pool_push(gstTaskPool, func, userData, &err); + auto __p = gst_task_pool_push(gstTaskPool, func, userData, &err); if (err !is null) { throw new GException( new ErrorG(err) ); } - return p; + return __p; } } diff --git a/generated/gstreamer/gstreamer/Toc.d b/generated/gstreamer/gstreamer/Toc.d index 51b44eec4..3a5d8f1d2 100644 --- a/generated/gstreamer/gstreamer/Toc.d +++ b/generated/gstreamer/gstreamer/Toc.d @@ -131,14 +131,14 @@ public class Toc */ public this(GstTocScope scope_) { - auto p = gst_toc_new(scope_); + auto __p = gst_toc_new(scope_); - if(p is null) + if(__p is null) { throw new ConstructionException("null returned by new"); } - this(cast(GstToc*) p); + this(cast(GstToc*) __p); } /** @@ -169,14 +169,14 @@ public class Toc */ public TocEntry findEntry(string uid) { - auto p = gst_toc_find_entry(gstToc, Str.toStringz(uid)); + auto __p = gst_toc_find_entry(gstToc, Str.toStringz(uid)); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(TocEntry)(cast(GstTocEntry*) p); + return ObjectG.getDObject!(TocEntry)(cast(GstTocEntry*) __p); } /** @@ -186,14 +186,14 @@ public class Toc */ public ListG getEntries() { - auto p = gst_toc_get_entries(gstToc); + auto __p = gst_toc_get_entries(gstToc); - if(p is null) + if(__p is null) { return null; } - return new ListG(cast(GList*) p); + return new ListG(cast(GList*) __p); } /** @@ -211,14 +211,14 @@ public class Toc */ public TagList getTags() { - auto p = gst_toc_get_tags(gstToc); + auto __p = gst_toc_get_tags(gstToc); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(TagList)(cast(GstTagList*) p); + return ObjectG.getDObject!(TagList)(cast(GstTagList*) __p); } /** @@ -241,6 +241,6 @@ public class Toc */ public void setTags(TagList tags) { - gst_toc_set_tags(gstToc, (tags is null) ? null : tags.getTagListStruct()); + gst_toc_set_tags(gstToc, (tags is null) ? null : tags.getTagListStruct(true)); } } diff --git a/generated/gstreamer/gstreamer/TocEntry.d b/generated/gstreamer/gstreamer/TocEntry.d index b4d25f49b..28debbaf6 100644 --- a/generated/gstreamer/gstreamer/TocEntry.d +++ b/generated/gstreamer/gstreamer/TocEntry.d @@ -27,6 +27,7 @@ module gstreamer.TocEntry; private import glib.ConstructionException; private import glib.ListG; private import glib.Str; +private import glib.c.functions; private import gobject.ObjectG; private import gstreamer.TagList; private import gstreamer.Toc; @@ -85,14 +86,14 @@ public class TocEntry */ public this(GstTocEntryType type, string uid) { - auto p = gst_toc_entry_new(type, Str.toStringz(uid)); + auto __p = gst_toc_entry_new(type, Str.toStringz(uid)); - if(p is null) + if(__p is null) { throw new ConstructionException("null returned by new"); } - this(cast(GstTocEntry*) p); + this(cast(GstTocEntry*) __p); } /** @@ -143,14 +144,14 @@ public class TocEntry */ public TocEntry getParent() { - auto p = gst_toc_entry_get_parent(gstTocEntry); + auto __p = gst_toc_entry_get_parent(gstTocEntry); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(TocEntry)(cast(GstTocEntry*) p); + return ObjectG.getDObject!(TocEntry)(cast(GstTocEntry*) __p); } /** @@ -178,14 +179,14 @@ public class TocEntry */ public ListG getSubEntries() { - auto p = gst_toc_entry_get_sub_entries(gstTocEntry); + auto __p = gst_toc_entry_get_sub_entries(gstTocEntry); - if(p is null) + if(__p is null) { return null; } - return new ListG(cast(GList*) p); + return new ListG(cast(GList*) __p); } /** @@ -195,14 +196,14 @@ public class TocEntry */ public TagList getTags() { - auto p = gst_toc_entry_get_tags(gstTocEntry); + auto __p = gst_toc_entry_get_tags(gstTocEntry); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(TagList)(cast(GstTagList*) p); + return ObjectG.getDObject!(TagList)(cast(GstTagList*) __p); } /** @@ -212,14 +213,14 @@ public class TocEntry */ public Toc getToc() { - auto p = gst_toc_entry_get_toc(gstTocEntry); + auto __p = gst_toc_entry_get_toc(gstTocEntry); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Toc)(cast(GstToc*) p); + return ObjectG.getDObject!(Toc)(cast(GstToc*) __p); } /** @@ -294,6 +295,6 @@ public class TocEntry */ public void setTags(TagList tags) { - gst_toc_entry_set_tags(gstTocEntry, (tags is null) ? null : tags.getTagListStruct()); + gst_toc_entry_set_tags(gstTocEntry, (tags is null) ? null : tags.getTagListStruct(true)); } } diff --git a/generated/gstreamer/gstreamer/TocSetterT.d b/generated/gstreamer/gstreamer/TocSetterT.d index dcdf1c004..6b3aa6b73 100644 --- a/generated/gstreamer/gstreamer/TocSetterT.d +++ b/generated/gstreamer/gstreamer/TocSetterT.d @@ -67,14 +67,14 @@ public template TocSetterT(TStruct) */ public Toc getToc() { - auto p = gst_toc_setter_get_toc(getTocSetterStruct()); + auto __p = gst_toc_setter_get_toc(getTocSetterStruct()); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Toc)(cast(GstToc*) p, true); + return ObjectG.getDObject!(Toc)(cast(GstToc*) __p, true); } /** diff --git a/generated/gstreamer/gstreamer/Tracer.d b/generated/gstreamer/gstreamer/Tracer.d index 4cd5a50bb..4462e63cd 100644 --- a/generated/gstreamer/gstreamer/Tracer.d +++ b/generated/gstreamer/gstreamer/Tracer.d @@ -24,7 +24,9 @@ module gstreamer.Tracer; +private import glib.Str; private import gstreamer.ObjectGst; +private import gstreamer.Plugin; private import gstreamer.c.functions; public import gstreamer.c.types; public import gstreamerc.gstreamertypes; @@ -72,4 +74,20 @@ public class Tracer : ObjectGst { return gst_tracer_get_type(); } + + /** + * Create a new tracer-factory capable of instantiating objects of the + * @type and add the factory to @plugin. + * + * Params: + * plugin = A #GstPlugin, or %NULL for a static typefind function + * name = The name for registering + * type = GType of tracer to register + * + * Returns: %TRUE, if the registering succeeded, %FALSE on error + */ + public static bool register(Plugin plugin, string name, GType type) + { + return gst_tracer_register((plugin is null) ? null : plugin.getPluginStruct(), Str.toStringz(name), type) != 0; + } } diff --git a/generated/gstreamer/gstreamer/TracerFactory.d b/generated/gstreamer/gstreamer/TracerFactory.d index 8896a5600..538a8cb9f 100644 --- a/generated/gstreamer/gstreamer/TracerFactory.d +++ b/generated/gstreamer/gstreamer/TracerFactory.d @@ -87,14 +87,14 @@ public class TracerFactory : PluginFeature */ public static ListG getList() { - auto p = gst_tracer_factory_get_list(); + auto __p = gst_tracer_factory_get_list(); - if(p is null) + if(__p is null) { return null; } - return new ListG(cast(GList*) p, true); + return new ListG(cast(GList*) __p, true); } /** @@ -104,6 +104,8 @@ public class TracerFactory : PluginFeature * * Returns: the #GType for tracers managed by this factory or 0 if * the factory is not loaded. + * + * Since: 1.14 */ public GType getTracerType() { diff --git a/generated/gstreamer/gstreamer/TracerRecord.d b/generated/gstreamer/gstreamer/TracerRecord.d index 8817cddf2..649cc0952 100644 --- a/generated/gstreamer/gstreamer/TracerRecord.d +++ b/generated/gstreamer/gstreamer/TracerRecord.d @@ -24,6 +24,9 @@ module gstreamer.TracerRecord; +private import glib.ConstructionException; +private import glib.Str; +private import gobject.ObjectG; private import gstreamer.ObjectGst; private import gstreamer.c.functions; public import gstreamer.c.types; diff --git a/generated/gstreamer/gstreamer/TypeFind.d b/generated/gstreamer/gstreamer/TypeFind.d index 5239318bf..48976d116 100644 --- a/generated/gstreamer/gstreamer/TypeFind.d +++ b/generated/gstreamer/gstreamer/TypeFind.d @@ -111,6 +111,24 @@ public class TypeFind gst_type_find_suggest(gstTypeFind, probability, (caps is null) ? null : caps.getCapsStruct()); } + /** + * If a #GstTypeFindFunction calls this function it suggests caps of the + * given @media_type with the given @probability. + * + * This function is similar to gst_type_find_suggest_simple(), but uses + * a #GstCaps with no fields. + * + * Params: + * probability = The probability in percent that the suggestion is right + * mediaType = the media type of the suggested caps + * + * Since: 1.20 + */ + public void suggestEmptySimple(uint probability, string mediaType) + { + gst_type_find_suggest_empty_simple(gstTypeFind, probability, Str.toStringz(mediaType)); + } + /** * Registers a new typefind function to be used for typefinding. After * registering this function will be available for typefinding. diff --git a/generated/gstreamer/gstreamer/TypeFindFactory.d b/generated/gstreamer/gstreamer/TypeFindFactory.d index 2db2b5645..cb232b11c 100644 --- a/generated/gstreamer/gstreamer/TypeFindFactory.d +++ b/generated/gstreamer/gstreamer/TypeFindFactory.d @@ -26,6 +26,7 @@ module gstreamer.TypeFindFactory; private import glib.ListG; private import glib.Str; +private import glib.c.functions; private import gobject.ObjectG; private import gstreamer.Caps; private import gstreamer.PluginFeature; @@ -55,7 +56,7 @@ public import gstreamerc.gstreamertypes; * my_peek (gpointer data, gint64 offset, guint size) * { * MyTypeFind *find = (MyTypeFind *) data; - * if (offset >= 0 && offset + size <= find->size) { + * if (offset >= 0 && offset + size <= find->size) { * return find->data + offset; * } * return NULL; @@ -64,9 +65,9 @@ public import gstreamerc.gstreamertypes; * my_suggest (gpointer data, guint probability, GstCaps *caps) * { * MyTypeFind *find = (MyTypeFind *) data; - * if (probability > find->probability) { + * if (probability > find->probability) { * find->probability = probability; - * gst_caps_replace (&find->caps, caps); + * gst_caps_replace (&find->caps, caps); * } * } * static GstCaps * @@ -74,12 +75,12 @@ public import gstreamerc.gstreamertypes; * { * GList *walk, *type_list; * MyTypeFind find = {data, size, 0, NULL}; - * GstTypeFind gst_find = {my_peek, my_suggest, &find, }; + * GstTypeFind gst_find = {my_peek, my_suggest, &find, }; * walk = type_list = gst_type_find_factory_get_list (); * while (walk) { * GstTypeFindFactory *factory = GST_TYPE_FIND_FACTORY (walk->data); * walk = g_list_next (walk) - * gst_type_find_factory_call_function (factory, &gst_find); + * gst_type_find_factory_call_function (factory, &gst_find); * } * g_list_free (type_list); * return find.caps; @@ -135,14 +136,14 @@ public class TypeFindFactory : PluginFeature */ public static ListG getList() { - auto p = gst_type_find_factory_get_list(); + auto __p = gst_type_find_factory_get_list(); - if(p is null) + if(__p is null) { return null; } - return new ListG(cast(GList*) p, true); + return new ListG(cast(GList*) __p, true); } /** @@ -164,14 +165,14 @@ public class TypeFindFactory : PluginFeature */ public Caps getCaps() { - auto p = gst_type_find_factory_get_caps(gstTypeFindFactory); + auto __p = gst_type_find_factory_get_caps(gstTypeFindFactory); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Caps)(cast(GstCaps*) p); + return ObjectG.getDObject!(Caps)(cast(GstCaps*) __p); } /** diff --git a/generated/gstreamer/gstreamer/URIHandlerIF.d b/generated/gstreamer/gstreamer/URIHandlerIF.d index 9882b4542..f93a12b3f 100644 --- a/generated/gstreamer/gstreamer/URIHandlerIF.d +++ b/generated/gstreamer/gstreamer/URIHandlerIF.d @@ -27,6 +27,7 @@ module gstreamer.URIHandlerIF; private import glib.ErrorG; private import glib.GException; private import glib.Str; +private import glib.c.functions; private import gstreamer.c.functions; public import gstreamer.c.types; public import gstreamerc.gstreamertypes; diff --git a/generated/gstreamer/gstreamer/URIHandlerT.d b/generated/gstreamer/gstreamer/URIHandlerT.d index aa2476562..833261595 100644 --- a/generated/gstreamer/gstreamer/URIHandlerT.d +++ b/generated/gstreamer/gstreamer/URIHandlerT.d @@ -27,6 +27,7 @@ module gstreamer.URIHandlerT; public import glib.ErrorG; public import glib.GException; public import glib.Str; +public import glib.c.functions; public import gstreamer.c.functions; public import gstreamer.c.types; public import gstreamerc.gstreamertypes; @@ -108,13 +109,13 @@ public template URIHandlerT(TStruct) { GError* err = null; - auto p = gst_uri_handler_set_uri(getURIHandlerStruct(), Str.toStringz(uri), &err) != 0; + auto __p = gst_uri_handler_set_uri(getURIHandlerStruct(), Str.toStringz(uri), &err) != 0; if (err !is null) { throw new GException( new ErrorG(err) ); } - return p; + return __p; } } diff --git a/generated/gstreamer/gstreamer/Uri.d b/generated/gstreamer/gstreamer/Uri.d index 2f6b5f12a..3fa33fe23 100644 --- a/generated/gstreamer/gstreamer/Uri.d +++ b/generated/gstreamer/gstreamer/Uri.d @@ -30,10 +30,12 @@ private import glib.GException; private import glib.HashTable; private import glib.ListG; private import glib.Str; +private import glib.c.functions; private import gobject.ObjectG; private import gstreamer.c.functions; public import gstreamer.c.types; public import gstreamerc.gstreamertypes; +private import gtkd.Loader; /** @@ -70,6 +72,12 @@ public class Uri this.ownedRef = ownedRef; } + ~this () + { + if ( Linker.isLoaded(LIBRARY_GSTREAMER) && ownedRef ) + gst_uri_unref(gstUri); + } + /** */ public static GType getType() @@ -102,14 +110,14 @@ public class Uri */ public this(string scheme, string userinfo, string host, uint port, string path, string query, string fragment) { - auto p = gst_uri_new(Str.toStringz(scheme), Str.toStringz(userinfo), Str.toStringz(host), port, Str.toStringz(path), Str.toStringz(query), Str.toStringz(fragment)); + auto __p = gst_uri_new(Str.toStringz(scheme), Str.toStringz(userinfo), Str.toStringz(host), port, Str.toStringz(path), Str.toStringz(query), Str.toStringz(fragment)); - if(p is null) + if(__p is null) { throw new ConstructionException("null returned by new"); } - this(cast(GstUri*) p); + this(cast(GstUri*) __p); } /** @@ -143,6 +151,27 @@ public class Uri return gst_uri_append_path_segment(gstUri, Str.toStringz(pathSegment)) != 0; } + /** + * Create a new #GstUri object with the same data as this #GstUri object. + * If @uri is %NULL then returns %NULL. + * + * Returns: A new #GstUri object which is a copy of this + * #GstUri or %NULL. + * + * Since: 1.6 + */ + public Uri copy() + { + auto __p = gst_uri_copy(gstUri); + + if(__p is null) + { + return null; + } + + return ObjectG.getDObject!(Uri)(cast(GstUri*) __p, true); + } + /** * Compares two #GstUri objects to see if they represent the same normalized * URI. @@ -171,14 +200,14 @@ public class Uri */ public Uri fromStringWithBase(string uri) { - auto p = gst_uri_from_string_with_base(gstUri, Str.toStringz(uri)); + auto __p = gst_uri_from_string_with_base(gstUri, Str.toStringz(uri)); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Uri)(cast(GstUri*) p, true); + return ObjectG.getDObject!(Uri)(cast(GstUri*) __p, true); } /** @@ -227,14 +256,14 @@ public class Uri */ public HashTable getMediaFragmentTable() { - auto p = gst_uri_get_media_fragment_table(gstUri); + auto __p = gst_uri_get_media_fragment_table(gstUri); - if(p is null) + if(__p is null) { return null; } - return new HashTable(cast(GHashTable*) p, true); + return new HashTable(cast(GHashTable*) __p, true); } /** @@ -264,14 +293,14 @@ public class Uri */ public ListG getPathSegments() { - auto p = gst_uri_get_path_segments(gstUri); + auto __p = gst_uri_get_path_segments(gstUri); - if(p is null) + if(__p is null) { return null; } - return new ListG(cast(GList*) p, true); + return new ListG(cast(GList*) __p, true); } /** @@ -313,14 +342,14 @@ public class Uri */ public ListG getQueryKeys() { - auto p = gst_uri_get_query_keys(gstUri); + auto __p = gst_uri_get_query_keys(gstUri); - if(p is null) + if(__p is null) { return null; } - return new ListG(cast(GList*) p); + return new ListG(cast(GList*) __p); } /** @@ -354,14 +383,14 @@ public class Uri */ public HashTable getQueryTable() { - auto p = gst_uri_get_query_table(gstUri); + auto __p = gst_uri_get_query_table(gstUri); - if(p is null) + if(__p is null) { return null; } - return new HashTable(cast(GHashTable*) p, true); + return new HashTable(cast(GHashTable*) __p, true); } /** @@ -454,14 +483,14 @@ public class Uri */ public Uri join(Uri refUri) { - auto p = gst_uri_join(gstUri, (refUri is null) ? null : refUri.getUriStruct()); + auto __p = gst_uri_join(gstUri, (refUri is null) ? null : refUri.getUriStruct()); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Uri)(cast(GstUri*) p, true); + return ObjectG.getDObject!(Uri)(cast(GstUri*) __p, true); } /** @@ -478,14 +507,14 @@ public class Uri */ public Uri makeWritable() { - auto p = gst_uri_make_writable(gstUri); + auto __p = gst_uri_make_writable(gstUri); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Uri)(cast(GstUri*) p, true); + return ObjectG.getDObject!(Uri)(cast(GstUri*) __p, true); } /** @@ -509,14 +538,14 @@ public class Uri */ public Uri newWithBase(string scheme, string userinfo, string host, uint port, string path, string query, string fragment) { - auto p = gst_uri_new_with_base(gstUri, Str.toStringz(scheme), Str.toStringz(userinfo), Str.toStringz(host), port, Str.toStringz(path), Str.toStringz(query), Str.toStringz(fragment)); + auto __p = gst_uri_new_with_base(gstUri, Str.toStringz(scheme), Str.toStringz(userinfo), Str.toStringz(host), port, Str.toStringz(path), Str.toStringz(query), Str.toStringz(fragment)); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Uri)(cast(GstUri*) p, true); + return ObjectG.getDObject!(Uri)(cast(GstUri*) __p, true); } /** @@ -551,6 +580,27 @@ public class Uri return gst_uri_query_has_key(gstUri, Str.toStringz(queryKey)) != 0; } + alias doref = ref_; + /** + * Add a reference to this #GstUri object. See gst_mini_object_ref() for further + * info. + * + * Returns: This object with the reference count incremented. + * + * Since: 1.6 + */ + public Uri ref_() + { + auto __p = gst_uri_ref(gstUri); + + if(__p is null) + { + return null; + } + + return ObjectG.getDObject!(Uri)(cast(GstUri*) __p, true); + } + /** * Remove an entry from the query table by key. * @@ -761,6 +811,20 @@ public class Uri return Str.toString(retStr); } + /** + * Decrement the reference count to this #GstUri object. + * + * If the reference count drops to 0 then finalize this object. + * + * See gst_mini_object_unref() for further info. + * + * Since: 1.6 + */ + public void unref() + { + gst_uri_unref(gstUri); + } + /** * Constructs a URI for a given valid protocol and location. * @@ -796,14 +860,48 @@ public class Uri */ public static Uri fromString(string uri) { - auto p = gst_uri_from_string(Str.toStringz(uri)); + auto __p = gst_uri_from_string(Str.toStringz(uri)); + + if(__p is null) + { + return null; + } + + return ObjectG.getDObject!(Uri)(cast(GstUri*) __p, true); + } + + /** + * Parses a URI string into a new #GstUri object. Will return NULL if the URI + * cannot be parsed. This is identical to gst_uri_from_string() except that + * the userinfo and fragment components of the URI will not be unescaped while + * parsing. + * + * Use this when you need to extract a username and password from the userinfo + * such as https://user:password@example.com since either may contain + * a URI-escaped ':' character. gst_uri_from_string() will unescape the entire + * userinfo component, which will make it impossible to know which ':' + * delineates the username and password. + * + * The same applies to the fragment component of the URI, such as + * https://example.com/path#fragment which may contain a URI-escaped '#'. + * + * Params: + * uri = The URI string to parse. + * + * Returns: A new #GstUri object, or NULL. + * + * Since: 1.18 + */ + public static Uri fromStringEscaped(string uri) + { + auto __p = gst_uri_from_string_escaped(Str.toStringz(uri)); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Uri)(cast(GstUri*) p, true); + return ObjectG.getDObject!(Uri)(cast(GstUri*) __p, true); } /** @@ -932,7 +1030,7 @@ public class Uri * the current working directory if it is a relative path, and then the path * will be canonicalised so that it doesn't contain any './' or '../' segments. * - * On Windows #filename should be in UTF-8 encoding. + * On Windows @filename should be in UTF-8 encoding. * * Params: * filename = absolute or relative file name path diff --git a/generated/gstreamer/gstreamer/Utils.d b/generated/gstreamer/gstreamer/Utils.d index b7d646ee5..8f1bd9195 100644 --- a/generated/gstreamer/gstreamer/Utils.d +++ b/generated/gstreamer/gstreamer/Utils.d @@ -158,7 +158,12 @@ public struct Utils gst_util_fraction_to_double(srcN, srcD, &dest); } - /** */ + /** + * + * Params: + * value = The #gdouble value to convert guint64 double + * Returns: @value casted to #guint64 + */ public static ulong gdoubleToGuint64(double value) { return gst_util_gdouble_to_guint64(value); @@ -221,7 +226,12 @@ public struct Utils return gst_util_group_id_next(); } - /** */ + /** + * + * Params: + * value = The #guint64 value to convert to double + * Returns: @value casted to #gdouble + */ public static double guint64ToGdouble(ulong value) { return gst_util_guint64_to_gdouble(value); @@ -475,7 +485,15 @@ public struct Utils return gst_calculate_linear_regression(xy, temp, n, &mNum, &mDenom, &b, &xbase, &rSquared) != 0; } - /** */ + /** + * Registers a new #GstDynamicTypeFactory in the registry + * + * Params: + * plugin = The #GstPlugin to register @dyn_type for + * type = The #GType to register dynamically + * + * Since: 1.12 + */ public static bool dynamicTypeRegister(Plugin plugin, GType type) { return gst_dynamic_type_register((plugin is null) ? null : plugin.getPluginStruct(), type) != 0; @@ -497,11 +515,11 @@ public struct Utils { GValueArray* outarray = null; - auto p = gst_util_get_object_array((object is null) ? null : object.getObjectGStruct(), Str.toStringz(name), &outarray) != 0; + auto __p = gst_util_get_object_array((object is null) ? null : object.getObjectGStruct(), Str.toStringz(name), &outarray) != 0; array = ObjectG.getDObject!(ValueArray)(outarray); - return p; + return __p; } /** diff --git a/generated/gstreamer/gstreamer/ValueArray.d b/generated/gstreamer/gstreamer/ValueArray.d index 93a39138f..544bb1df0 100644 --- a/generated/gstreamer/gstreamer/ValueArray.d +++ b/generated/gstreamer/gstreamer/ValueArray.d @@ -31,7 +31,9 @@ public import gstreamer.c.types; public import gstreamerc.gstreamertypes; -/** */ +/** + * A fundamental type that describes an ordered list of #GValue + */ public class ValueArray { /** the main Gtk struct */ @@ -119,14 +121,37 @@ public class ValueArray */ public static Value getValue(Value value, uint index) { - auto p = gst_value_array_get_value((value is null) ? null : value.getValueStruct(), index); + auto __p = gst_value_array_get_value((value is null) ? null : value.getValueStruct(), index); + + if(__p is null) + { + return null; + } + + return ObjectG.getDObject!(Value)(cast(GValue*) __p); + } + + /** + * Initializes and pre-allocates a #GValue of type #GST_TYPE_ARRAY. + * + * Params: + * value = A zero-filled (uninitialized) #GValue structure + * prealloc = The number of entries to pre-allocate in the array + * + * Returns: The #GValue structure that has been passed in + * + * Since: 1.18 + */ + public static Value init(Value value, uint prealloc) + { + auto __p = gst_value_array_init((value is null) ? null : value.getValueStruct(), prealloc); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Value)(cast(GValue*) p); + return ObjectG.getDObject!(Value)(cast(GValue*) __p); } /** diff --git a/generated/gstreamer/gstreamer/ValueGst.d b/generated/gstreamer/gstreamer/ValueGst.d index 2e9a6e34d..a5e190bd1 100644 --- a/generated/gstreamer/gstreamer/ValueGst.d +++ b/generated/gstreamer/gstreamer/ValueGst.d @@ -26,6 +26,7 @@ module gstreamer.ValueGst; private import glib.MemorySlice; private import glib.Str; +private import glib.c.functions; private import gobject.ObjectG; private import gobject.Value; private import gstreamer.Caps; @@ -138,11 +139,11 @@ public struct ValueGst { GValue* outdest = sliceNew!GValue(); - auto p = gst_value_deserialize(outdest, Str.toStringz(src)) != 0; + auto __p = gst_value_deserialize(outdest, Str.toStringz(src)) != 0; dest = ObjectG.getDObject!(Value)(outdest, true); - return p; + return __p; } /** @@ -218,14 +219,14 @@ public struct ValueGst */ public static Caps getCaps(Value value) { - auto p = gst_value_get_caps((value is null) ? null : value.getValueStruct()); + auto __p = gst_value_get_caps((value is null) ? null : value.getValueStruct()); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Caps)(cast(GstCaps*) p); + return ObjectG.getDObject!(Caps)(cast(GstCaps*) __p); } /** @@ -238,14 +239,14 @@ public struct ValueGst */ public static CapsFeatures getCapsFeatures(Value value) { - auto p = gst_value_get_caps_features((value is null) ? null : value.getValueStruct()); + auto __p = gst_value_get_caps_features((value is null) ? null : value.getValueStruct()); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(CapsFeatures)(cast(GstCapsFeatures*) p); + return ObjectG.getDObject!(CapsFeatures)(cast(GstCapsFeatures*) __p); } /** @@ -357,14 +358,14 @@ public struct ValueGst */ public static Value getFractionRangeMax(Value value) { - auto p = gst_value_get_fraction_range_max((value is null) ? null : value.getValueStruct()); + auto __p = gst_value_get_fraction_range_max((value is null) ? null : value.getValueStruct()); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Value)(cast(GValue*) p); + return ObjectG.getDObject!(Value)(cast(GValue*) __p); } /** @@ -377,14 +378,14 @@ public struct ValueGst */ public static Value getFractionRangeMin(Value value) { - auto p = gst_value_get_fraction_range_min((value is null) ? null : value.getValueStruct()); + auto __p = gst_value_get_fraction_range_min((value is null) ? null : value.getValueStruct()); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Value)(cast(GValue*) p); + return ObjectG.getDObject!(Value)(cast(GValue*) __p); } /** @@ -475,14 +476,14 @@ public struct ValueGst */ public static Structure getStructure(Value value) { - auto p = gst_value_get_structure((value is null) ? null : value.getValueStruct()); + auto __p = gst_value_get_structure((value is null) ? null : value.getValueStruct()); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Structure)(cast(GstStructure*) p); + return ObjectG.getDObject!(Structure)(cast(GstStructure*) __p); } /** @@ -521,11 +522,11 @@ public struct ValueGst { GValue* outdest = sliceNew!GValue(); - auto p = gst_value_intersect(outdest, (value1 is null) ? null : value1.getValueStruct(), (value2 is null) ? null : value2.getValueStruct()) != 0; + auto __p = gst_value_intersect(outdest, (value1 is null) ? null : value1.getValueStruct(), (value2 is null) ? null : value2.getValueStruct()) != 0; dest = ObjectG.getDObject!(Value)(outdest, true); - return p; + return __p; } /** @@ -768,11 +769,11 @@ public struct ValueGst { GValue* outdest = sliceNew!GValue(); - auto p = gst_value_subtract(outdest, (minuend is null) ? null : minuend.getValueStruct(), (subtrahend is null) ? null : subtrahend.getValueStruct()) != 0; + auto __p = gst_value_subtract(outdest, (minuend is null) ? null : minuend.getValueStruct(), (subtrahend is null) ? null : subtrahend.getValueStruct()) != 0; dest = ObjectG.getDObject!(Value)(outdest, true); - return p; + return __p; } alias unio = union_; @@ -790,10 +791,10 @@ public struct ValueGst { GValue* outdest = sliceNew!GValue(); - auto p = gst_value_union(outdest, (value1 is null) ? null : value1.getValueStruct(), (value2 is null) ? null : value2.getValueStruct()) != 0; + auto __p = gst_value_union(outdest, (value1 is null) ? null : value1.getValueStruct(), (value2 is null) ? null : value2.getValueStruct()) != 0; dest = ObjectG.getDObject!(Value)(outdest, true); - return p; + return __p; } } diff --git a/generated/gstreamer/gstreamer/ValueList.d b/generated/gstreamer/gstreamer/ValueList.d index c3216aa3c..470f931b8 100644 --- a/generated/gstreamer/gstreamer/ValueList.d +++ b/generated/gstreamer/gstreamer/ValueList.d @@ -32,7 +32,9 @@ public import gstreamer.c.types; public import gstreamerc.gstreamertypes; -/** */ +/** + * A fundamental type that describes an unordered list of #GValue + */ public class ValueList { /** the main Gtk struct */ @@ -139,14 +141,37 @@ public class ValueList */ public static Value getValue(Value value, uint index) { - auto p = gst_value_list_get_value((value is null) ? null : value.getValueStruct(), index); + auto __p = gst_value_list_get_value((value is null) ? null : value.getValueStruct(), index); + + if(__p is null) + { + return null; + } + + return ObjectG.getDObject!(Value)(cast(GValue*) __p); + } + + /** + * Initializes and pre-allocates a #GValue of type #GST_TYPE_LIST. + * + * Params: + * value = A zero-filled (uninitialized) #GValue structure + * prealloc = The number of entries to pre-allocate in the list + * + * Returns: The #GValue structure that has been passed in + * + * Since: 1.18 + */ + public static Value init(Value value, uint prealloc) + { + auto __p = gst_value_list_init((value is null) ? null : value.getValueStruct(), prealloc); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Value)(cast(GValue*) p); + return ObjectG.getDObject!(Value)(cast(GValue*) __p); } /** diff --git a/generated/gstreamer/gstreamer/c/functions.d b/generated/gstreamer/gstreamer/c/functions.d index c0ff96dc1..b838a8c1f 100644 --- a/generated/gstreamer/gstreamer/c/functions.d +++ b/generated/gstreamer/gstreamer/c/functions.d @@ -40,6 +40,7 @@ shared static this() // gstreamer.AllocationParams Linker.link(gst_allocation_params_get_type, "gst_allocation_params_get_type", LIBRARY_GSTREAMER); + Linker.link(gst_allocation_params_new, "gst_allocation_params_new", LIBRARY_GSTREAMER); Linker.link(gst_allocation_params_copy, "gst_allocation_params_copy", LIBRARY_GSTREAMER); Linker.link(gst_allocation_params_free, "gst_allocation_params_free", LIBRARY_GSTREAMER); Linker.link(gst_allocation_params_init, "gst_allocation_params_init", LIBRARY_GSTREAMER); @@ -75,6 +76,7 @@ shared static this() Linker.link(gst_bin_get_by_name, "gst_bin_get_by_name", LIBRARY_GSTREAMER); Linker.link(gst_bin_get_by_name_recurse_up, "gst_bin_get_by_name_recurse_up", LIBRARY_GSTREAMER); Linker.link(gst_bin_get_suppressed_flags, "gst_bin_get_suppressed_flags", LIBRARY_GSTREAMER); + Linker.link(gst_bin_iterate_all_by_element_factory_name, "gst_bin_iterate_all_by_element_factory_name", LIBRARY_GSTREAMER); Linker.link(gst_bin_iterate_all_by_interface, "gst_bin_iterate_all_by_interface", LIBRARY_GSTREAMER); Linker.link(gst_bin_iterate_elements, "gst_bin_iterate_elements", LIBRARY_GSTREAMER); Linker.link(gst_bin_iterate_recurse, "gst_bin_iterate_recurse", LIBRARY_GSTREAMER); @@ -96,9 +98,11 @@ shared static this() Linker.link(gst_buffer_get_type, "gst_buffer_get_type", LIBRARY_GSTREAMER); Linker.link(gst_buffer_new, "gst_buffer_new", LIBRARY_GSTREAMER); Linker.link(gst_buffer_new_allocate, "gst_buffer_new_allocate", LIBRARY_GSTREAMER); + Linker.link(gst_buffer_new_memdup, "gst_buffer_new_memdup", LIBRARY_GSTREAMER); Linker.link(gst_buffer_new_wrapped, "gst_buffer_new_wrapped", LIBRARY_GSTREAMER); Linker.link(gst_buffer_new_wrapped_bytes, "gst_buffer_new_wrapped_bytes", LIBRARY_GSTREAMER); Linker.link(gst_buffer_new_wrapped_full, "gst_buffer_new_wrapped_full", LIBRARY_GSTREAMER); + Linker.link(gst_buffer_add_custom_meta, "gst_buffer_add_custom_meta", LIBRARY_GSTREAMER); Linker.link(gst_buffer_add_meta, "gst_buffer_add_meta", LIBRARY_GSTREAMER); Linker.link(gst_buffer_add_parent_buffer_meta, "gst_buffer_add_parent_buffer_meta", LIBRARY_GSTREAMER); Linker.link(gst_buffer_add_protection_meta, "gst_buffer_add_protection_meta", LIBRARY_GSTREAMER); @@ -106,6 +110,7 @@ shared static this() Linker.link(gst_buffer_append, "gst_buffer_append", LIBRARY_GSTREAMER); Linker.link(gst_buffer_append_memory, "gst_buffer_append_memory", LIBRARY_GSTREAMER); Linker.link(gst_buffer_append_region, "gst_buffer_append_region", LIBRARY_GSTREAMER); + Linker.link(gst_buffer_copy, "gst_buffer_copy", LIBRARY_GSTREAMER); Linker.link(gst_buffer_copy_deep, "gst_buffer_copy_deep", LIBRARY_GSTREAMER); Linker.link(gst_buffer_copy_into, "gst_buffer_copy_into", LIBRARY_GSTREAMER); Linker.link(gst_buffer_copy_region, "gst_buffer_copy_region", LIBRARY_GSTREAMER); @@ -115,6 +120,7 @@ shared static this() Linker.link(gst_buffer_find_memory, "gst_buffer_find_memory", LIBRARY_GSTREAMER); Linker.link(gst_buffer_foreach_meta, "gst_buffer_foreach_meta", LIBRARY_GSTREAMER); Linker.link(gst_buffer_get_all_memory, "gst_buffer_get_all_memory", LIBRARY_GSTREAMER); + Linker.link(gst_buffer_get_custom_meta, "gst_buffer_get_custom_meta", LIBRARY_GSTREAMER); Linker.link(gst_buffer_get_flags, "gst_buffer_get_flags", LIBRARY_GSTREAMER); Linker.link(gst_buffer_get_memory, "gst_buffer_get_memory", LIBRARY_GSTREAMER); Linker.link(gst_buffer_get_memory_range, "gst_buffer_get_memory_range", LIBRARY_GSTREAMER); @@ -137,6 +143,7 @@ shared static this() Linker.link(gst_buffer_n_memory, "gst_buffer_n_memory", LIBRARY_GSTREAMER); Linker.link(gst_buffer_peek_memory, "gst_buffer_peek_memory", LIBRARY_GSTREAMER); Linker.link(gst_buffer_prepend_memory, "gst_buffer_prepend_memory", LIBRARY_GSTREAMER); + Linker.link(gst_buffer_ref, "gst_buffer_ref", LIBRARY_GSTREAMER); Linker.link(gst_buffer_remove_all_memory, "gst_buffer_remove_all_memory", LIBRARY_GSTREAMER); Linker.link(gst_buffer_remove_memory, "gst_buffer_remove_memory", LIBRARY_GSTREAMER); Linker.link(gst_buffer_remove_memory_range, "gst_buffer_remove_memory_range", LIBRARY_GSTREAMER); @@ -149,8 +156,10 @@ shared static this() Linker.link(gst_buffer_set_flags, "gst_buffer_set_flags", LIBRARY_GSTREAMER); Linker.link(gst_buffer_set_size, "gst_buffer_set_size", LIBRARY_GSTREAMER); Linker.link(gst_buffer_unmap, "gst_buffer_unmap", LIBRARY_GSTREAMER); + Linker.link(gst_buffer_unref, "gst_buffer_unref", LIBRARY_GSTREAMER); Linker.link(gst_buffer_unset_flags, "gst_buffer_unset_flags", LIBRARY_GSTREAMER); Linker.link(gst_buffer_get_max_memory, "gst_buffer_get_max_memory", LIBRARY_GSTREAMER); + Linker.link(gst_buffer_replace, "gst_buffer_replace", LIBRARY_GSTREAMER); // gstreamer.BufferList @@ -158,13 +167,18 @@ shared static this() Linker.link(gst_buffer_list_new, "gst_buffer_list_new", LIBRARY_GSTREAMER); Linker.link(gst_buffer_list_new_sized, "gst_buffer_list_new_sized", LIBRARY_GSTREAMER); Linker.link(gst_buffer_list_calculate_size, "gst_buffer_list_calculate_size", LIBRARY_GSTREAMER); + Linker.link(gst_buffer_list_copy, "gst_buffer_list_copy", LIBRARY_GSTREAMER); Linker.link(gst_buffer_list_copy_deep, "gst_buffer_list_copy_deep", LIBRARY_GSTREAMER); Linker.link(gst_buffer_list_foreach, "gst_buffer_list_foreach", LIBRARY_GSTREAMER); Linker.link(gst_buffer_list_get, "gst_buffer_list_get", LIBRARY_GSTREAMER); Linker.link(gst_buffer_list_get_writable, "gst_buffer_list_get_writable", LIBRARY_GSTREAMER); Linker.link(gst_buffer_list_insert, "gst_buffer_list_insert", LIBRARY_GSTREAMER); Linker.link(gst_buffer_list_length, "gst_buffer_list_length", LIBRARY_GSTREAMER); + Linker.link(gst_buffer_list_ref, "gst_buffer_list_ref", LIBRARY_GSTREAMER); Linker.link(gst_buffer_list_remove, "gst_buffer_list_remove", LIBRARY_GSTREAMER); + Linker.link(gst_buffer_list_unref, "gst_buffer_list_unref", LIBRARY_GSTREAMER); + Linker.link(gst_buffer_list_replace, "gst_buffer_list_replace", LIBRARY_GSTREAMER); + Linker.link(gst_buffer_list_take, "gst_buffer_list_take", LIBRARY_GSTREAMER); // gstreamer.BufferPool @@ -254,7 +268,9 @@ shared static this() Linker.link(gst_caps_merge_structure, "gst_caps_merge_structure", LIBRARY_GSTREAMER); Linker.link(gst_caps_merge_structure_full, "gst_caps_merge_structure_full", LIBRARY_GSTREAMER); Linker.link(gst_caps_normalize, "gst_caps_normalize", LIBRARY_GSTREAMER); + Linker.link(gst_caps_ref, "gst_caps_ref", LIBRARY_GSTREAMER); Linker.link(gst_caps_remove_structure, "gst_caps_remove_structure", LIBRARY_GSTREAMER); + Linker.link(gst_caps_serialize, "gst_caps_serialize", LIBRARY_GSTREAMER); Linker.link(gst_caps_set_features, "gst_caps_set_features", LIBRARY_GSTREAMER); Linker.link(gst_caps_set_features_simple, "gst_caps_set_features_simple", LIBRARY_GSTREAMER); Linker.link(gst_caps_set_simple, "gst_caps_set_simple", LIBRARY_GSTREAMER); @@ -265,7 +281,10 @@ shared static this() Linker.link(gst_caps_subtract, "gst_caps_subtract", LIBRARY_GSTREAMER); Linker.link(gst_caps_to_string, "gst_caps_to_string", LIBRARY_GSTREAMER); Linker.link(gst_caps_truncate, "gst_caps_truncate", LIBRARY_GSTREAMER); + Linker.link(gst_caps_unref, "gst_caps_unref", LIBRARY_GSTREAMER); Linker.link(gst_caps_from_string, "gst_caps_from_string", LIBRARY_GSTREAMER); + Linker.link(gst_caps_replace, "gst_caps_replace", LIBRARY_GSTREAMER); + Linker.link(gst_caps_take, "gst_caps_take", LIBRARY_GSTREAMER); // gstreamer.CapsFeatures @@ -275,6 +294,7 @@ shared static this() Linker.link(gst_caps_features_new_empty, "gst_caps_features_new_empty", LIBRARY_GSTREAMER); Linker.link(gst_caps_features_new_id, "gst_caps_features_new_id", LIBRARY_GSTREAMER); Linker.link(gst_caps_features_new_id_valist, "gst_caps_features_new_id_valist", LIBRARY_GSTREAMER); + Linker.link(gst_caps_features_new_single, "gst_caps_features_new_single", LIBRARY_GSTREAMER); Linker.link(gst_caps_features_new_valist, "gst_caps_features_new_valist", LIBRARY_GSTREAMER); Linker.link(gst_caps_features_add, "gst_caps_features_add", LIBRARY_GSTREAMER); Linker.link(gst_caps_features_add_id, "gst_caps_features_add_id", LIBRARY_GSTREAMER); @@ -349,11 +369,15 @@ shared static this() Linker.link(gst_context_get_type, "gst_context_get_type", LIBRARY_GSTREAMER); Linker.link(gst_context_new, "gst_context_new", LIBRARY_GSTREAMER); + Linker.link(gst_context_copy, "gst_context_copy", LIBRARY_GSTREAMER); Linker.link(gst_context_get_context_type, "gst_context_get_context_type", LIBRARY_GSTREAMER); Linker.link(gst_context_get_structure, "gst_context_get_structure", LIBRARY_GSTREAMER); Linker.link(gst_context_has_context_type, "gst_context_has_context_type", LIBRARY_GSTREAMER); Linker.link(gst_context_is_persistent, "gst_context_is_persistent", LIBRARY_GSTREAMER); + Linker.link(gst_context_ref, "gst_context_ref", LIBRARY_GSTREAMER); + Linker.link(gst_context_unref, "gst_context_unref", LIBRARY_GSTREAMER); Linker.link(gst_context_writable_structure, "gst_context_writable_structure", LIBRARY_GSTREAMER); + Linker.link(gst_context_replace, "gst_context_replace", LIBRARY_GSTREAMER); // gstreamer.ControlBinding @@ -371,6 +395,11 @@ shared static this() Linker.link(gst_control_source_get_value, "gst_control_source_get_value", LIBRARY_GSTREAMER); Linker.link(gst_control_source_get_value_array, "gst_control_source_get_value_array", LIBRARY_GSTREAMER); + // gstreamer.CustomMeta + + Linker.link(gst_custom_meta_get_structure, "gst_custom_meta_get_structure", LIBRARY_GSTREAMER); + Linker.link(gst_custom_meta_has_name, "gst_custom_meta_has_name", LIBRARY_GSTREAMER); + // gstreamer.DateTime Linker.link(gst_date_time_get_type, "gst_date_time_get_type", LIBRARY_GSTREAMER); @@ -378,7 +407,9 @@ shared static this() Linker.link(gst_date_time_new_from_g_date_time, "gst_date_time_new_from_g_date_time", LIBRARY_GSTREAMER); Linker.link(gst_date_time_new_from_iso8601_string, "gst_date_time_new_from_iso8601_string", LIBRARY_GSTREAMER); Linker.link(gst_date_time_new_from_unix_epoch_local_time, "gst_date_time_new_from_unix_epoch_local_time", LIBRARY_GSTREAMER); + Linker.link(gst_date_time_new_from_unix_epoch_local_time_usecs, "gst_date_time_new_from_unix_epoch_local_time_usecs", LIBRARY_GSTREAMER); Linker.link(gst_date_time_new_from_unix_epoch_utc, "gst_date_time_new_from_unix_epoch_utc", LIBRARY_GSTREAMER); + Linker.link(gst_date_time_new_from_unix_epoch_utc_usecs, "gst_date_time_new_from_unix_epoch_utc_usecs", LIBRARY_GSTREAMER); Linker.link(gst_date_time_new_local_time, "gst_date_time_new_local_time", LIBRARY_GSTREAMER); Linker.link(gst_date_time_new_now_local_time, "gst_date_time_new_now_local_time", LIBRARY_GSTREAMER); Linker.link(gst_date_time_new_now_utc, "gst_date_time_new_now_utc", LIBRARY_GSTREAMER); @@ -457,6 +488,7 @@ shared static this() Linker.link(gst_device_provider_get_hidden_providers, "gst_device_provider_get_hidden_providers", LIBRARY_GSTREAMER); Linker.link(gst_device_provider_get_metadata, "gst_device_provider_get_metadata", LIBRARY_GSTREAMER); Linker.link(gst_device_provider_hide_provider, "gst_device_provider_hide_provider", LIBRARY_GSTREAMER); + Linker.link(gst_device_provider_is_started, "gst_device_provider_is_started", LIBRARY_GSTREAMER); Linker.link(gst_device_provider_start, "gst_device_provider_start", LIBRARY_GSTREAMER); Linker.link(gst_device_provider_stop, "gst_device_provider_stop", LIBRARY_GSTREAMER); Linker.link(gst_device_provider_unhide_provider, "gst_device_provider_unhide_provider", LIBRARY_GSTREAMER); @@ -498,6 +530,7 @@ shared static this() Linker.link(gst_element_register, "gst_element_register", LIBRARY_GSTREAMER); Linker.link(gst_element_state_change_return_get_name, "gst_element_state_change_return_get_name", LIBRARY_GSTREAMER); Linker.link(gst_element_state_get_name, "gst_element_state_get_name", LIBRARY_GSTREAMER); + Linker.link(gst_element_type_set_skip_documentation, "gst_element_type_set_skip_documentation", LIBRARY_GSTREAMER); Linker.link(gst_element_abort_state, "gst_element_abort_state", LIBRARY_GSTREAMER); Linker.link(gst_element_add_pad, "gst_element_add_pad", LIBRARY_GSTREAMER); Linker.link(gst_element_add_property_deep_notify_watch, "gst_element_add_property_deep_notify_watch", LIBRARY_GSTREAMER); @@ -517,6 +550,8 @@ shared static this() Linker.link(gst_element_get_context, "gst_element_get_context", LIBRARY_GSTREAMER); Linker.link(gst_element_get_context_unlocked, "gst_element_get_context_unlocked", LIBRARY_GSTREAMER); Linker.link(gst_element_get_contexts, "gst_element_get_contexts", LIBRARY_GSTREAMER); + Linker.link(gst_element_get_current_clock_time, "gst_element_get_current_clock_time", LIBRARY_GSTREAMER); + Linker.link(gst_element_get_current_running_time, "gst_element_get_current_running_time", LIBRARY_GSTREAMER); Linker.link(gst_element_get_factory, "gst_element_get_factory", LIBRARY_GSTREAMER); Linker.link(gst_element_get_metadata, "gst_element_get_metadata", LIBRARY_GSTREAMER); Linker.link(gst_element_get_pad_template, "gst_element_get_pad_template", LIBRARY_GSTREAMER); @@ -549,6 +584,7 @@ shared static this() Linker.link(gst_element_remove_pad, "gst_element_remove_pad", LIBRARY_GSTREAMER); Linker.link(gst_element_remove_property_notify_watch, "gst_element_remove_property_notify_watch", LIBRARY_GSTREAMER); Linker.link(gst_element_request_pad, "gst_element_request_pad", LIBRARY_GSTREAMER); + Linker.link(gst_element_request_pad_simple, "gst_element_request_pad_simple", LIBRARY_GSTREAMER); Linker.link(gst_element_seek, "gst_element_seek", LIBRARY_GSTREAMER); Linker.link(gst_element_seek_simple, "gst_element_seek_simple", LIBRARY_GSTREAMER); Linker.link(gst_element_send_event, "gst_element_send_event", LIBRARY_GSTREAMER); @@ -584,15 +620,22 @@ shared static this() Linker.link(gst_element_factory_list_filter, "gst_element_factory_list_filter", LIBRARY_GSTREAMER); Linker.link(gst_element_factory_list_get_elements, "gst_element_factory_list_get_elements", LIBRARY_GSTREAMER); Linker.link(gst_element_factory_make, "gst_element_factory_make", LIBRARY_GSTREAMER); + Linker.link(gst_element_factory_make_full, "gst_element_factory_make_full", LIBRARY_GSTREAMER); + Linker.link(gst_element_factory_make_valist, "gst_element_factory_make_valist", LIBRARY_GSTREAMER); + Linker.link(gst_element_factory_make_with_properties, "gst_element_factory_make_with_properties", LIBRARY_GSTREAMER); Linker.link(gst_element_factory_can_sink_all_caps, "gst_element_factory_can_sink_all_caps", LIBRARY_GSTREAMER); Linker.link(gst_element_factory_can_sink_any_caps, "gst_element_factory_can_sink_any_caps", LIBRARY_GSTREAMER); Linker.link(gst_element_factory_can_src_all_caps, "gst_element_factory_can_src_all_caps", LIBRARY_GSTREAMER); Linker.link(gst_element_factory_can_src_any_caps, "gst_element_factory_can_src_any_caps", LIBRARY_GSTREAMER); Linker.link(gst_element_factory_create, "gst_element_factory_create", LIBRARY_GSTREAMER); + Linker.link(gst_element_factory_create_full, "gst_element_factory_create_full", LIBRARY_GSTREAMER); + Linker.link(gst_element_factory_create_valist, "gst_element_factory_create_valist", LIBRARY_GSTREAMER); + Linker.link(gst_element_factory_create_with_properties, "gst_element_factory_create_with_properties", LIBRARY_GSTREAMER); Linker.link(gst_element_factory_get_element_type, "gst_element_factory_get_element_type", LIBRARY_GSTREAMER); Linker.link(gst_element_factory_get_metadata, "gst_element_factory_get_metadata", LIBRARY_GSTREAMER); Linker.link(gst_element_factory_get_metadata_keys, "gst_element_factory_get_metadata_keys", LIBRARY_GSTREAMER); Linker.link(gst_element_factory_get_num_pad_templates, "gst_element_factory_get_num_pad_templates", LIBRARY_GSTREAMER); + Linker.link(gst_element_factory_get_skip_documentation, "gst_element_factory_get_skip_documentation", LIBRARY_GSTREAMER); Linker.link(gst_element_factory_get_static_pad_templates, "gst_element_factory_get_static_pad_templates", LIBRARY_GSTREAMER); Linker.link(gst_element_factory_get_uri_protocols, "gst_element_factory_get_uri_protocols", LIBRARY_GSTREAMER); Linker.link(gst_element_factory_get_uri_type, "gst_element_factory_get_uri_type", LIBRARY_GSTREAMER); @@ -609,6 +652,8 @@ shared static this() Linker.link(gst_event_new_flush_start, "gst_event_new_flush_start", LIBRARY_GSTREAMER); Linker.link(gst_event_new_flush_stop, "gst_event_new_flush_stop", LIBRARY_GSTREAMER); Linker.link(gst_event_new_gap, "gst_event_new_gap", LIBRARY_GSTREAMER); + Linker.link(gst_event_new_instant_rate_change, "gst_event_new_instant_rate_change", LIBRARY_GSTREAMER); + Linker.link(gst_event_new_instant_rate_sync_time, "gst_event_new_instant_rate_sync_time", LIBRARY_GSTREAMER); Linker.link(gst_event_new_latency, "gst_event_new_latency", LIBRARY_GSTREAMER); Linker.link(gst_event_new_navigation, "gst_event_new_navigation", LIBRARY_GSTREAMER); Linker.link(gst_event_new_protection, "gst_event_new_protection", LIBRARY_GSTREAMER); @@ -626,16 +671,21 @@ shared static this() Linker.link(gst_event_new_tag, "gst_event_new_tag", LIBRARY_GSTREAMER); Linker.link(gst_event_new_toc, "gst_event_new_toc", LIBRARY_GSTREAMER); Linker.link(gst_event_new_toc_select, "gst_event_new_toc_select", LIBRARY_GSTREAMER); + Linker.link(gst_event_copy, "gst_event_copy", LIBRARY_GSTREAMER); Linker.link(gst_event_copy_segment, "gst_event_copy_segment", LIBRARY_GSTREAMER); Linker.link(gst_event_get_running_time_offset, "gst_event_get_running_time_offset", LIBRARY_GSTREAMER); Linker.link(gst_event_get_seqnum, "gst_event_get_seqnum", LIBRARY_GSTREAMER); Linker.link(gst_event_get_structure, "gst_event_get_structure", LIBRARY_GSTREAMER); Linker.link(gst_event_has_name, "gst_event_has_name", LIBRARY_GSTREAMER); + Linker.link(gst_event_has_name_id, "gst_event_has_name_id", LIBRARY_GSTREAMER); Linker.link(gst_event_parse_buffer_size, "gst_event_parse_buffer_size", LIBRARY_GSTREAMER); Linker.link(gst_event_parse_caps, "gst_event_parse_caps", LIBRARY_GSTREAMER); Linker.link(gst_event_parse_flush_stop, "gst_event_parse_flush_stop", LIBRARY_GSTREAMER); Linker.link(gst_event_parse_gap, "gst_event_parse_gap", LIBRARY_GSTREAMER); + Linker.link(gst_event_parse_gap_flags, "gst_event_parse_gap_flags", LIBRARY_GSTREAMER); Linker.link(gst_event_parse_group_id, "gst_event_parse_group_id", LIBRARY_GSTREAMER); + Linker.link(gst_event_parse_instant_rate_change, "gst_event_parse_instant_rate_change", LIBRARY_GSTREAMER); + Linker.link(gst_event_parse_instant_rate_sync_time, "gst_event_parse_instant_rate_sync_time", LIBRARY_GSTREAMER); Linker.link(gst_event_parse_latency, "gst_event_parse_latency", LIBRARY_GSTREAMER); Linker.link(gst_event_parse_protection, "gst_event_parse_protection", LIBRARY_GSTREAMER); Linker.link(gst_event_parse_qos, "gst_event_parse_qos", LIBRARY_GSTREAMER); @@ -654,13 +704,19 @@ shared static this() Linker.link(gst_event_parse_tag, "gst_event_parse_tag", LIBRARY_GSTREAMER); Linker.link(gst_event_parse_toc, "gst_event_parse_toc", LIBRARY_GSTREAMER); Linker.link(gst_event_parse_toc_select, "gst_event_parse_toc_select", LIBRARY_GSTREAMER); + Linker.link(gst_event_ref, "gst_event_ref", LIBRARY_GSTREAMER); + Linker.link(gst_event_set_gap_flags, "gst_event_set_gap_flags", LIBRARY_GSTREAMER); Linker.link(gst_event_set_group_id, "gst_event_set_group_id", LIBRARY_GSTREAMER); Linker.link(gst_event_set_running_time_offset, "gst_event_set_running_time_offset", LIBRARY_GSTREAMER); Linker.link(gst_event_set_seek_trickmode_interval, "gst_event_set_seek_trickmode_interval", LIBRARY_GSTREAMER); Linker.link(gst_event_set_seqnum, "gst_event_set_seqnum", LIBRARY_GSTREAMER); Linker.link(gst_event_set_stream, "gst_event_set_stream", LIBRARY_GSTREAMER); Linker.link(gst_event_set_stream_flags, "gst_event_set_stream_flags", LIBRARY_GSTREAMER); + Linker.link(gst_event_unref, "gst_event_unref", LIBRARY_GSTREAMER); Linker.link(gst_event_writable_structure, "gst_event_writable_structure", LIBRARY_GSTREAMER); + Linker.link(gst_event_replace, "gst_event_replace", LIBRARY_GSTREAMER); + Linker.link(gst_event_steal, "gst_event_steal", LIBRARY_GSTREAMER); + Linker.link(gst_event_take, "gst_event_take", LIBRARY_GSTREAMER); Linker.link(gst_event_type_get_flags, "gst_event_type_get_flags", LIBRARY_GSTREAMER); Linker.link(gst_event_type_get_name, "gst_event_type_get_name", LIBRARY_GSTREAMER); Linker.link(gst_event_type_to_quark, "gst_event_type_to_quark", LIBRARY_GSTREAMER); @@ -726,9 +782,11 @@ shared static this() Linker.link(gst_memory_is_type, "gst_memory_is_type", LIBRARY_GSTREAMER); Linker.link(gst_memory_make_mapped, "gst_memory_make_mapped", LIBRARY_GSTREAMER); Linker.link(gst_memory_map, "gst_memory_map", LIBRARY_GSTREAMER); + Linker.link(gst_memory_ref, "gst_memory_ref", LIBRARY_GSTREAMER); Linker.link(gst_memory_resize, "gst_memory_resize", LIBRARY_GSTREAMER); Linker.link(gst_memory_share, "gst_memory_share", LIBRARY_GSTREAMER); Linker.link(gst_memory_unmap, "gst_memory_unmap", LIBRARY_GSTREAMER); + Linker.link(gst_memory_unref, "gst_memory_unref", LIBRARY_GSTREAMER); // gstreamer.Message @@ -751,6 +809,7 @@ shared static this() Linker.link(gst_message_new_have_context, "gst_message_new_have_context", LIBRARY_GSTREAMER); Linker.link(gst_message_new_info, "gst_message_new_info", LIBRARY_GSTREAMER); Linker.link(gst_message_new_info_with_details, "gst_message_new_info_with_details", LIBRARY_GSTREAMER); + Linker.link(gst_message_new_instant_rate_request, "gst_message_new_instant_rate_request", LIBRARY_GSTREAMER); Linker.link(gst_message_new_latency, "gst_message_new_latency", LIBRARY_GSTREAMER); Linker.link(gst_message_new_need_context, "gst_message_new_need_context", LIBRARY_GSTREAMER); Linker.link(gst_message_new_new_clock, "gst_message_new_new_clock", LIBRARY_GSTREAMER); @@ -776,6 +835,7 @@ shared static this() Linker.link(gst_message_new_warning, "gst_message_new_warning", LIBRARY_GSTREAMER); Linker.link(gst_message_new_warning_with_details, "gst_message_new_warning_with_details", LIBRARY_GSTREAMER); Linker.link(gst_message_add_redirect_entry, "gst_message_add_redirect_entry", LIBRARY_GSTREAMER); + Linker.link(gst_message_copy, "gst_message_copy", LIBRARY_GSTREAMER); Linker.link(gst_message_get_num_redirect_entries, "gst_message_get_num_redirect_entries", LIBRARY_GSTREAMER); Linker.link(gst_message_get_seqnum, "gst_message_get_seqnum", LIBRARY_GSTREAMER); Linker.link(gst_message_get_stream_status_object, "gst_message_get_stream_status_object", LIBRARY_GSTREAMER); @@ -796,6 +856,7 @@ shared static this() Linker.link(gst_message_parse_have_context, "gst_message_parse_have_context", LIBRARY_GSTREAMER); Linker.link(gst_message_parse_info, "gst_message_parse_info", LIBRARY_GSTREAMER); Linker.link(gst_message_parse_info_details, "gst_message_parse_info_details", LIBRARY_GSTREAMER); + Linker.link(gst_message_parse_instant_rate_request, "gst_message_parse_instant_rate_request", LIBRARY_GSTREAMER); Linker.link(gst_message_parse_new_clock, "gst_message_parse_new_clock", LIBRARY_GSTREAMER); Linker.link(gst_message_parse_progress, "gst_message_parse_progress", LIBRARY_GSTREAMER); Linker.link(gst_message_parse_property_notify, "gst_message_parse_property_notify", LIBRARY_GSTREAMER); @@ -818,6 +879,7 @@ shared static this() Linker.link(gst_message_parse_toc, "gst_message_parse_toc", LIBRARY_GSTREAMER); Linker.link(gst_message_parse_warning, "gst_message_parse_warning", LIBRARY_GSTREAMER); Linker.link(gst_message_parse_warning_details, "gst_message_parse_warning_details", LIBRARY_GSTREAMER); + Linker.link(gst_message_ref, "gst_message_ref", LIBRARY_GSTREAMER); Linker.link(gst_message_set_buffering_stats, "gst_message_set_buffering_stats", LIBRARY_GSTREAMER); Linker.link(gst_message_set_group_id, "gst_message_set_group_id", LIBRARY_GSTREAMER); Linker.link(gst_message_set_qos_stats, "gst_message_set_qos_stats", LIBRARY_GSTREAMER); @@ -827,7 +889,10 @@ shared static this() Linker.link(gst_message_streams_selected_add, "gst_message_streams_selected_add", LIBRARY_GSTREAMER); Linker.link(gst_message_streams_selected_get_size, "gst_message_streams_selected_get_size", LIBRARY_GSTREAMER); Linker.link(gst_message_streams_selected_get_stream, "gst_message_streams_selected_get_stream", LIBRARY_GSTREAMER); + Linker.link(gst_message_unref, "gst_message_unref", LIBRARY_GSTREAMER); Linker.link(gst_message_writable_structure, "gst_message_writable_structure", LIBRARY_GSTREAMER); + Linker.link(gst_message_replace, "gst_message_replace", LIBRARY_GSTREAMER); + Linker.link(gst_message_take, "gst_message_take", LIBRARY_GSTREAMER); Linker.link(gst_message_type_get_name, "gst_message_type_get_name", LIBRARY_GSTREAMER); Linker.link(gst_message_type_to_quark, "gst_message_type_to_quark", LIBRARY_GSTREAMER); @@ -840,9 +905,15 @@ shared static this() Linker.link(gst_meta_api_type_register, "gst_meta_api_type_register", LIBRARY_GSTREAMER); Linker.link(gst_meta_get_info, "gst_meta_get_info", LIBRARY_GSTREAMER); Linker.link(gst_meta_register, "gst_meta_register", LIBRARY_GSTREAMER); + Linker.link(gst_meta_register_custom, "gst_meta_register_custom", LIBRARY_GSTREAMER); + + // gstreamer.MetaInfo + + Linker.link(gst_meta_info_is_custom, "gst_meta_info_is_custom", LIBRARY_GSTREAMER); // gstreamer.MiniObject + Linker.link(gst_mini_object_get_type, "gst_mini_object_get_type", LIBRARY_GSTREAMER); Linker.link(gst_mini_object_add_parent, "gst_mini_object_add_parent", LIBRARY_GSTREAMER); Linker.link(gst_mini_object_copy, "gst_mini_object_copy", LIBRARY_GSTREAMER); Linker.link(gst_mini_object_get_qdata, "gst_mini_object_get_qdata", LIBRARY_GSTREAMER); @@ -924,6 +995,7 @@ shared static this() Linker.link(gst_pad_get_parent_element, "gst_pad_get_parent_element", LIBRARY_GSTREAMER); Linker.link(gst_pad_get_peer, "gst_pad_get_peer", LIBRARY_GSTREAMER); Linker.link(gst_pad_get_range, "gst_pad_get_range", LIBRARY_GSTREAMER); + Linker.link(gst_pad_get_single_internal_link, "gst_pad_get_single_internal_link", LIBRARY_GSTREAMER); Linker.link(gst_pad_get_sticky_event, "gst_pad_get_sticky_event", LIBRARY_GSTREAMER); Linker.link(gst_pad_get_stream, "gst_pad_get_stream", LIBRARY_GSTREAMER); Linker.link(gst_pad_get_stream_id, "gst_pad_get_stream_id", LIBRARY_GSTREAMER); @@ -1001,7 +1073,9 @@ shared static this() Linker.link(gst_pad_template_new_from_static_pad_template_with_gtype, "gst_pad_template_new_from_static_pad_template_with_gtype", LIBRARY_GSTREAMER); Linker.link(gst_pad_template_new_with_gtype, "gst_pad_template_new_with_gtype", LIBRARY_GSTREAMER); Linker.link(gst_pad_template_get_caps, "gst_pad_template_get_caps", LIBRARY_GSTREAMER); + Linker.link(gst_pad_template_get_documentation_caps, "gst_pad_template_get_documentation_caps", LIBRARY_GSTREAMER); Linker.link(gst_pad_template_pad_created, "gst_pad_template_pad_created", LIBRARY_GSTREAMER); + Linker.link(gst_pad_template_set_documentation_caps, "gst_pad_template_set_documentation_caps", LIBRARY_GSTREAMER); // gstreamer.ParamArray @@ -1135,7 +1209,9 @@ shared static this() Linker.link(gst_promise_expire, "gst_promise_expire", LIBRARY_GSTREAMER); Linker.link(gst_promise_get_reply, "gst_promise_get_reply", LIBRARY_GSTREAMER); Linker.link(gst_promise_interrupt, "gst_promise_interrupt", LIBRARY_GSTREAMER); + Linker.link(gst_promise_ref, "gst_promise_ref", LIBRARY_GSTREAMER); Linker.link(gst_promise_reply, "gst_promise_reply", LIBRARY_GSTREAMER); + Linker.link(gst_promise_unref, "gst_promise_unref", LIBRARY_GSTREAMER); Linker.link(gst_promise_wait, "gst_promise_wait", LIBRARY_GSTREAMER); // gstreamer.ProtectionMeta @@ -1178,6 +1254,7 @@ shared static this() Linker.link(gst_query_add_allocation_pool, "gst_query_add_allocation_pool", LIBRARY_GSTREAMER); Linker.link(gst_query_add_buffering_range, "gst_query_add_buffering_range", LIBRARY_GSTREAMER); Linker.link(gst_query_add_scheduling_mode, "gst_query_add_scheduling_mode", LIBRARY_GSTREAMER); + Linker.link(gst_query_copy, "gst_query_copy", LIBRARY_GSTREAMER); Linker.link(gst_query_find_allocation_meta, "gst_query_find_allocation_meta", LIBRARY_GSTREAMER); Linker.link(gst_query_get_n_allocation_metas, "gst_query_get_n_allocation_metas", LIBRARY_GSTREAMER); Linker.link(gst_query_get_n_allocation_params, "gst_query_get_n_allocation_params", LIBRARY_GSTREAMER); @@ -1215,6 +1292,7 @@ shared static this() Linker.link(gst_query_parse_uri, "gst_query_parse_uri", LIBRARY_GSTREAMER); Linker.link(gst_query_parse_uri_redirection, "gst_query_parse_uri_redirection", LIBRARY_GSTREAMER); Linker.link(gst_query_parse_uri_redirection_permanent, "gst_query_parse_uri_redirection_permanent", LIBRARY_GSTREAMER); + Linker.link(gst_query_ref, "gst_query_ref", LIBRARY_GSTREAMER); Linker.link(gst_query_remove_nth_allocation_meta, "gst_query_remove_nth_allocation_meta", LIBRARY_GSTREAMER); Linker.link(gst_query_remove_nth_allocation_param, "gst_query_remove_nth_allocation_param", LIBRARY_GSTREAMER); Linker.link(gst_query_remove_nth_allocation_pool, "gst_query_remove_nth_allocation_pool", LIBRARY_GSTREAMER); @@ -1239,7 +1317,10 @@ shared static this() Linker.link(gst_query_set_uri, "gst_query_set_uri", LIBRARY_GSTREAMER); Linker.link(gst_query_set_uri_redirection, "gst_query_set_uri_redirection", LIBRARY_GSTREAMER); Linker.link(gst_query_set_uri_redirection_permanent, "gst_query_set_uri_redirection_permanent", LIBRARY_GSTREAMER); + Linker.link(gst_query_unref, "gst_query_unref", LIBRARY_GSTREAMER); Linker.link(gst_query_writable_structure, "gst_query_writable_structure", LIBRARY_GSTREAMER); + Linker.link(gst_query_replace, "gst_query_replace", LIBRARY_GSTREAMER); + Linker.link(gst_query_take, "gst_query_take", LIBRARY_GSTREAMER); Linker.link(gst_query_type_get_flags, "gst_query_type_get_flags", LIBRARY_GSTREAMER); Linker.link(gst_query_type_get_name, "gst_query_type_get_name", LIBRARY_GSTREAMER); Linker.link(gst_query_type_to_quark, "gst_query_type_to_quark", LIBRARY_GSTREAMER); @@ -1275,16 +1356,19 @@ shared static this() Linker.link(gst_sample_get_type, "gst_sample_get_type", LIBRARY_GSTREAMER); Linker.link(gst_sample_new, "gst_sample_new", LIBRARY_GSTREAMER); + Linker.link(gst_sample_copy, "gst_sample_copy", LIBRARY_GSTREAMER); Linker.link(gst_sample_get_buffer, "gst_sample_get_buffer", LIBRARY_GSTREAMER); Linker.link(gst_sample_get_buffer_list, "gst_sample_get_buffer_list", LIBRARY_GSTREAMER); Linker.link(gst_sample_get_caps, "gst_sample_get_caps", LIBRARY_GSTREAMER); Linker.link(gst_sample_get_info, "gst_sample_get_info", LIBRARY_GSTREAMER); Linker.link(gst_sample_get_segment, "gst_sample_get_segment", LIBRARY_GSTREAMER); + Linker.link(gst_sample_ref, "gst_sample_ref", LIBRARY_GSTREAMER); Linker.link(gst_sample_set_buffer, "gst_sample_set_buffer", LIBRARY_GSTREAMER); Linker.link(gst_sample_set_buffer_list, "gst_sample_set_buffer_list", LIBRARY_GSTREAMER); Linker.link(gst_sample_set_caps, "gst_sample_set_caps", LIBRARY_GSTREAMER); Linker.link(gst_sample_set_info, "gst_sample_set_info", LIBRARY_GSTREAMER); Linker.link(gst_sample_set_segment, "gst_sample_set_segment", LIBRARY_GSTREAMER); + Linker.link(gst_sample_unref, "gst_sample_unref", LIBRARY_GSTREAMER); // gstreamer.Segment @@ -1309,6 +1393,13 @@ shared static this() Linker.link(gst_segment_to_stream_time, "gst_segment_to_stream_time", LIBRARY_GSTREAMER); Linker.link(gst_segment_to_stream_time_full, "gst_segment_to_stream_time_full", LIBRARY_GSTREAMER); + // gstreamer.SharedTaskPool + + Linker.link(gst_shared_task_pool_get_type, "gst_shared_task_pool_get_type", LIBRARY_GSTREAMER); + Linker.link(gst_shared_task_pool_new, "gst_shared_task_pool_new", LIBRARY_GSTREAMER); + Linker.link(gst_shared_task_pool_get_max_threads, "gst_shared_task_pool_get_max_threads", LIBRARY_GSTREAMER); + Linker.link(gst_shared_task_pool_set_max_threads, "gst_shared_task_pool_set_max_threads", LIBRARY_GSTREAMER); + // gstreamer.StaticCaps Linker.link(gst_static_caps_cleanup, "gst_static_caps_cleanup", LIBRARY_GSTREAMER); @@ -1345,6 +1436,7 @@ shared static this() // gstreamer.Structure Linker.link(gst_structure_get_type, "gst_structure_get_type", LIBRARY_GSTREAMER); + Linker.link(gst_structure_from_string, "gst_structure_from_string", LIBRARY_GSTREAMER); Linker.link(gst_structure_new, "gst_structure_new", LIBRARY_GSTREAMER); Linker.link(gst_structure_new_empty, "gst_structure_new_empty", LIBRARY_GSTREAMER); Linker.link(gst_structure_new_from_string, "gst_structure_new_from_string", LIBRARY_GSTREAMER); @@ -1406,6 +1498,7 @@ shared static this() Linker.link(gst_structure_remove_field, "gst_structure_remove_field", LIBRARY_GSTREAMER); Linker.link(gst_structure_remove_fields, "gst_structure_remove_fields", LIBRARY_GSTREAMER); Linker.link(gst_structure_remove_fields_valist, "gst_structure_remove_fields_valist", LIBRARY_GSTREAMER); + Linker.link(gst_structure_serialize, "gst_structure_serialize", LIBRARY_GSTREAMER); Linker.link(gst_structure_set, "gst_structure_set", LIBRARY_GSTREAMER); Linker.link(gst_structure_set_array, "gst_structure_set_array", LIBRARY_GSTREAMER); Linker.link(gst_structure_set_list, "gst_structure_set_list", LIBRARY_GSTREAMER); @@ -1415,7 +1508,7 @@ shared static this() Linker.link(gst_structure_set_value, "gst_structure_set_value", LIBRARY_GSTREAMER); Linker.link(gst_structure_take_value, "gst_structure_take_value", LIBRARY_GSTREAMER); Linker.link(gst_structure_to_string, "gst_structure_to_string", LIBRARY_GSTREAMER); - Linker.link(gst_structure_from_string, "gst_structure_from_string", LIBRARY_GSTREAMER); + Linker.link(gst_structure_take, "gst_structure_take", LIBRARY_GSTREAMER); // gstreamer.SystemClock @@ -1435,6 +1528,7 @@ shared static this() Linker.link(gst_tag_list_add_valist_values, "gst_tag_list_add_valist_values", LIBRARY_GSTREAMER); Linker.link(gst_tag_list_add_value, "gst_tag_list_add_value", LIBRARY_GSTREAMER); Linker.link(gst_tag_list_add_values, "gst_tag_list_add_values", LIBRARY_GSTREAMER); + Linker.link(gst_tag_list_copy, "gst_tag_list_copy", LIBRARY_GSTREAMER); Linker.link(gst_tag_list_foreach, "gst_tag_list_foreach", LIBRARY_GSTREAMER); Linker.link(gst_tag_list_get_boolean, "gst_tag_list_get_boolean", LIBRARY_GSTREAMER); Linker.link(gst_tag_list_get_boolean_index, "gst_tag_list_get_boolean_index", LIBRARY_GSTREAMER); @@ -1470,10 +1564,14 @@ shared static this() Linker.link(gst_tag_list_n_tags, "gst_tag_list_n_tags", LIBRARY_GSTREAMER); Linker.link(gst_tag_list_nth_tag_name, "gst_tag_list_nth_tag_name", LIBRARY_GSTREAMER); Linker.link(gst_tag_list_peek_string_index, "gst_tag_list_peek_string_index", LIBRARY_GSTREAMER); + Linker.link(gst_tag_list_ref, "gst_tag_list_ref", LIBRARY_GSTREAMER); Linker.link(gst_tag_list_remove_tag, "gst_tag_list_remove_tag", LIBRARY_GSTREAMER); Linker.link(gst_tag_list_set_scope, "gst_tag_list_set_scope", LIBRARY_GSTREAMER); Linker.link(gst_tag_list_to_string, "gst_tag_list_to_string", LIBRARY_GSTREAMER); + Linker.link(gst_tag_list_unref, "gst_tag_list_unref", LIBRARY_GSTREAMER); Linker.link(gst_tag_list_copy_value, "gst_tag_list_copy_value", LIBRARY_GSTREAMER); + Linker.link(gst_tag_list_replace, "gst_tag_list_replace", LIBRARY_GSTREAMER); + Linker.link(gst_tag_list_take, "gst_tag_list_take", LIBRARY_GSTREAMER); Linker.link(gst_tag_exists, "gst_tag_exists", LIBRARY_GSTREAMER); Linker.link(gst_tag_get_description, "gst_tag_get_description", LIBRARY_GSTREAMER); Linker.link(gst_tag_get_flag, "gst_tag_get_flag", LIBRARY_GSTREAMER); @@ -1507,6 +1605,7 @@ shared static this() Linker.link(gst_task_get_state, "gst_task_get_state", LIBRARY_GSTREAMER); Linker.link(gst_task_join, "gst_task_join", LIBRARY_GSTREAMER); Linker.link(gst_task_pause, "gst_task_pause", LIBRARY_GSTREAMER); + Linker.link(gst_task_resume, "gst_task_resume", LIBRARY_GSTREAMER); Linker.link(gst_task_set_enter_callback, "gst_task_set_enter_callback", LIBRARY_GSTREAMER); Linker.link(gst_task_set_leave_callback, "gst_task_set_leave_callback", LIBRARY_GSTREAMER); Linker.link(gst_task_set_lock, "gst_task_set_lock", LIBRARY_GSTREAMER); @@ -1520,6 +1619,7 @@ shared static this() Linker.link(gst_task_pool_get_type, "gst_task_pool_get_type", LIBRARY_GSTREAMER); Linker.link(gst_task_pool_new, "gst_task_pool_new", LIBRARY_GSTREAMER); Linker.link(gst_task_pool_cleanup, "gst_task_pool_cleanup", LIBRARY_GSTREAMER); + Linker.link(gst_task_pool_dispose_handle, "gst_task_pool_dispose_handle", LIBRARY_GSTREAMER); Linker.link(gst_task_pool_join, "gst_task_pool_join", LIBRARY_GSTREAMER); Linker.link(gst_task_pool_prepare, "gst_task_pool_prepare", LIBRARY_GSTREAMER); Linker.link(gst_task_pool_push, "gst_task_pool_push", LIBRARY_GSTREAMER); @@ -1567,6 +1667,7 @@ shared static this() // gstreamer.Tracer Linker.link(gst_tracer_get_type, "gst_tracer_get_type", LIBRARY_GSTREAMER); + Linker.link(gst_tracer_register, "gst_tracer_register", LIBRARY_GSTREAMER); // gstreamer.TracerFactory @@ -1577,12 +1678,15 @@ shared static this() // gstreamer.TracerRecord Linker.link(gst_tracer_record_get_type, "gst_tracer_record_get_type", LIBRARY_GSTREAMER); + Linker.link(gst_tracer_record_new, "gst_tracer_record_new", LIBRARY_GSTREAMER); + Linker.link(gst_tracer_record_log, "gst_tracer_record_log", LIBRARY_GSTREAMER); // gstreamer.TypeFind Linker.link(gst_type_find_get_length, "gst_type_find_get_length", LIBRARY_GSTREAMER); Linker.link(gst_type_find_peek, "gst_type_find_peek", LIBRARY_GSTREAMER); Linker.link(gst_type_find_suggest, "gst_type_find_suggest", LIBRARY_GSTREAMER); + Linker.link(gst_type_find_suggest_empty_simple, "gst_type_find_suggest_empty_simple", LIBRARY_GSTREAMER); Linker.link(gst_type_find_suggest_simple, "gst_type_find_suggest_simple", LIBRARY_GSTREAMER); Linker.link(gst_type_find_register, "gst_type_find_register", LIBRARY_GSTREAMER); Linker.link(gst_type_find_get_type, "gst_type_find_get_type", LIBRARY_GSTREAMER); @@ -1610,6 +1714,7 @@ shared static this() Linker.link(gst_uri_new, "gst_uri_new", LIBRARY_GSTREAMER); Linker.link(gst_uri_append_path, "gst_uri_append_path", LIBRARY_GSTREAMER); Linker.link(gst_uri_append_path_segment, "gst_uri_append_path_segment", LIBRARY_GSTREAMER); + Linker.link(gst_uri_copy, "gst_uri_copy", LIBRARY_GSTREAMER); Linker.link(gst_uri_equal, "gst_uri_equal", LIBRARY_GSTREAMER); Linker.link(gst_uri_from_string_with_base, "gst_uri_from_string_with_base", LIBRARY_GSTREAMER); Linker.link(gst_uri_get_fragment, "gst_uri_get_fragment", LIBRARY_GSTREAMER); @@ -1632,6 +1737,7 @@ shared static this() Linker.link(gst_uri_new_with_base, "gst_uri_new_with_base", LIBRARY_GSTREAMER); Linker.link(gst_uri_normalize, "gst_uri_normalize", LIBRARY_GSTREAMER); Linker.link(gst_uri_query_has_key, "gst_uri_query_has_key", LIBRARY_GSTREAMER); + Linker.link(gst_uri_ref, "gst_uri_ref", LIBRARY_GSTREAMER); Linker.link(gst_uri_remove_query_key, "gst_uri_remove_query_key", LIBRARY_GSTREAMER); Linker.link(gst_uri_set_fragment, "gst_uri_set_fragment", LIBRARY_GSTREAMER); Linker.link(gst_uri_set_host, "gst_uri_set_host", LIBRARY_GSTREAMER); @@ -1645,8 +1751,10 @@ shared static this() Linker.link(gst_uri_set_scheme, "gst_uri_set_scheme", LIBRARY_GSTREAMER); Linker.link(gst_uri_set_userinfo, "gst_uri_set_userinfo", LIBRARY_GSTREAMER); Linker.link(gst_uri_to_string, "gst_uri_to_string", LIBRARY_GSTREAMER); + Linker.link(gst_uri_unref, "gst_uri_unref", LIBRARY_GSTREAMER); Linker.link(gst_uri_construct, "gst_uri_construct", LIBRARY_GSTREAMER); Linker.link(gst_uri_from_string, "gst_uri_from_string", LIBRARY_GSTREAMER); + Linker.link(gst_uri_from_string_escaped, "gst_uri_from_string_escaped", LIBRARY_GSTREAMER); Linker.link(gst_uri_get_location, "gst_uri_get_location", LIBRARY_GSTREAMER); Linker.link(gst_uri_get_protocol, "gst_uri_get_protocol", LIBRARY_GSTREAMER); Linker.link(gst_uri_has_protocol, "gst_uri_has_protocol", LIBRARY_GSTREAMER); @@ -1664,6 +1772,7 @@ shared static this() Linker.link(gst_value_array_append_value, "gst_value_array_append_value", LIBRARY_GSTREAMER); Linker.link(gst_value_array_get_size, "gst_value_array_get_size", LIBRARY_GSTREAMER); Linker.link(gst_value_array_get_value, "gst_value_array_get_value", LIBRARY_GSTREAMER); + Linker.link(gst_value_array_init, "gst_value_array_init", LIBRARY_GSTREAMER); Linker.link(gst_value_array_prepend_value, "gst_value_array_prepend_value", LIBRARY_GSTREAMER); // gstreamer.ValueList @@ -1674,6 +1783,7 @@ shared static this() Linker.link(gst_value_list_concat, "gst_value_list_concat", LIBRARY_GSTREAMER); Linker.link(gst_value_list_get_size, "gst_value_list_get_size", LIBRARY_GSTREAMER); Linker.link(gst_value_list_get_value, "gst_value_list_get_value", LIBRARY_GSTREAMER); + Linker.link(gst_value_list_init, "gst_value_list_init", LIBRARY_GSTREAMER); Linker.link(gst_value_list_merge, "gst_value_list_merge", LIBRARY_GSTREAMER); Linker.link(gst_value_list_prepend_value, "gst_value_list_prepend_value", LIBRARY_GSTREAMER); @@ -1831,6 +1941,7 @@ __gshared extern(C) // gstreamer.AllocationParams GType function() c_gst_allocation_params_get_type; + GstAllocationParams* function() c_gst_allocation_params_new; GstAllocationParams* function(GstAllocationParams* params) c_gst_allocation_params_copy; void function(GstAllocationParams* params) c_gst_allocation_params_free; void function(GstAllocationParams* params) c_gst_allocation_params_init; @@ -1866,6 +1977,7 @@ __gshared extern(C) GstElement* function(GstBin* bin, const(char)* name) c_gst_bin_get_by_name; GstElement* function(GstBin* bin, const(char)* name) c_gst_bin_get_by_name_recurse_up; GstElementFlags function(GstBin* bin) c_gst_bin_get_suppressed_flags; + GstIterator* function(GstBin* bin, const(char)* factoryName) c_gst_bin_iterate_all_by_element_factory_name; GstIterator* function(GstBin* bin, GType iface) c_gst_bin_iterate_all_by_interface; GstIterator* function(GstBin* bin) c_gst_bin_iterate_elements; GstIterator* function(GstBin* bin) c_gst_bin_iterate_recurse; @@ -1887,9 +1999,11 @@ __gshared extern(C) GType function() c_gst_buffer_get_type; GstBuffer* function() c_gst_buffer_new; GstBuffer* function(GstAllocator* allocator, size_t size, GstAllocationParams* params) c_gst_buffer_new_allocate; + GstBuffer* function(void* data, size_t size) c_gst_buffer_new_memdup; GstBuffer* function(void* data, size_t size) c_gst_buffer_new_wrapped; GstBuffer* function(GBytes* bytes) c_gst_buffer_new_wrapped_bytes; GstBuffer* function(GstMemoryFlags flags, void* data, size_t maxsize, size_t offset, size_t size, void* userData, GDestroyNotify notify) c_gst_buffer_new_wrapped_full; + GstCustomMeta* function(GstBuffer* buffer, const(char)* name) c_gst_buffer_add_custom_meta; GstMeta* function(GstBuffer* buffer, GstMetaInfo* info, void* params) c_gst_buffer_add_meta; GstParentBufferMeta* function(GstBuffer* buffer, GstBuffer* ref_) c_gst_buffer_add_parent_buffer_meta; GstProtectionMeta* function(GstBuffer* buffer, GstStructure* info) c_gst_buffer_add_protection_meta; @@ -1897,6 +2011,7 @@ __gshared extern(C) GstBuffer* function(GstBuffer* buf1, GstBuffer* buf2) c_gst_buffer_append; void function(GstBuffer* buffer, GstMemory* mem) c_gst_buffer_append_memory; GstBuffer* function(GstBuffer* buf1, GstBuffer* buf2, ptrdiff_t offset, ptrdiff_t size) c_gst_buffer_append_region; + GstBuffer* function(GstBuffer* buf) c_gst_buffer_copy; GstBuffer* function(GstBuffer* buf) c_gst_buffer_copy_deep; int function(GstBuffer* dest, GstBuffer* src, GstBufferCopyFlags flags, size_t offset, size_t size) c_gst_buffer_copy_into; GstBuffer* function(GstBuffer* parent, GstBufferCopyFlags flags, size_t offset, size_t size) c_gst_buffer_copy_region; @@ -1906,6 +2021,7 @@ __gshared extern(C) int function(GstBuffer* buffer, size_t offset, size_t size, uint* idx, uint* length, size_t* skip) c_gst_buffer_find_memory; int function(GstBuffer* buffer, GstBufferForeachMetaFunc func, void* userData) c_gst_buffer_foreach_meta; GstMemory* function(GstBuffer* buffer) c_gst_buffer_get_all_memory; + GstCustomMeta* function(GstBuffer* buffer, const(char)* name) c_gst_buffer_get_custom_meta; GstBufferFlags function(GstBuffer* buffer) c_gst_buffer_get_flags; GstMemory* function(GstBuffer* buffer, uint idx) c_gst_buffer_get_memory; GstMemory* function(GstBuffer* buffer, uint idx, int length) c_gst_buffer_get_memory_range; @@ -1928,6 +2044,7 @@ __gshared extern(C) uint function(GstBuffer* buffer) c_gst_buffer_n_memory; GstMemory* function(GstBuffer* buffer, uint idx) c_gst_buffer_peek_memory; void function(GstBuffer* buffer, GstMemory* mem) c_gst_buffer_prepend_memory; + GstBuffer* function(GstBuffer* buf) c_gst_buffer_ref; void function(GstBuffer* buffer) c_gst_buffer_remove_all_memory; void function(GstBuffer* buffer, uint idx) c_gst_buffer_remove_memory; void function(GstBuffer* buffer, uint idx, int length) c_gst_buffer_remove_memory_range; @@ -1940,8 +2057,10 @@ __gshared extern(C) int function(GstBuffer* buffer, GstBufferFlags flags) c_gst_buffer_set_flags; void function(GstBuffer* buffer, ptrdiff_t size) c_gst_buffer_set_size; void function(GstBuffer* buffer, GstMapInfo* info) c_gst_buffer_unmap; + void function(GstBuffer* buf) c_gst_buffer_unref; int function(GstBuffer* buffer, GstBufferFlags flags) c_gst_buffer_unset_flags; uint function() c_gst_buffer_get_max_memory; + int function(GstBuffer** obuf, GstBuffer* nbuf) c_gst_buffer_replace; // gstreamer.BufferList @@ -1949,13 +2068,18 @@ __gshared extern(C) GstBufferList* function() c_gst_buffer_list_new; GstBufferList* function(uint size) c_gst_buffer_list_new_sized; size_t function(GstBufferList* list) c_gst_buffer_list_calculate_size; + GstBufferList* function(GstBufferList* list) c_gst_buffer_list_copy; GstBufferList* function(GstBufferList* list) c_gst_buffer_list_copy_deep; int function(GstBufferList* list, GstBufferListFunc func, void* userData) c_gst_buffer_list_foreach; GstBuffer* function(GstBufferList* list, uint idx) c_gst_buffer_list_get; GstBuffer* function(GstBufferList* list, uint idx) c_gst_buffer_list_get_writable; void function(GstBufferList* list, int idx, GstBuffer* buffer) c_gst_buffer_list_insert; uint function(GstBufferList* list) c_gst_buffer_list_length; + GstBufferList* function(GstBufferList* list) c_gst_buffer_list_ref; void function(GstBufferList* list, uint idx, uint length) c_gst_buffer_list_remove; + void function(GstBufferList* list) c_gst_buffer_list_unref; + int function(GstBufferList** oldList, GstBufferList* newList) c_gst_buffer_list_replace; + int function(GstBufferList** oldList, GstBufferList* newList) c_gst_buffer_list_take; // gstreamer.BufferPool @@ -2045,7 +2169,9 @@ __gshared extern(C) GstCaps* function(GstCaps* caps, GstStructure* structure) c_gst_caps_merge_structure; GstCaps* function(GstCaps* caps, GstStructure* structure, GstCapsFeatures* features) c_gst_caps_merge_structure_full; GstCaps* function(GstCaps* caps) c_gst_caps_normalize; + GstCaps* function(GstCaps* caps) c_gst_caps_ref; void function(GstCaps* caps, uint idx) c_gst_caps_remove_structure; + char* function(GstCaps* caps, GstSerializeFlags flags) c_gst_caps_serialize; void function(GstCaps* caps, uint index, GstCapsFeatures* features) c_gst_caps_set_features; void function(GstCaps* caps, GstCapsFeatures* features) c_gst_caps_set_features_simple; void function(GstCaps* caps, const(char)* field, ... ) c_gst_caps_set_simple; @@ -2056,7 +2182,10 @@ __gshared extern(C) GstCaps* function(GstCaps* minuend, GstCaps* subtrahend) c_gst_caps_subtract; char* function(GstCaps* caps) c_gst_caps_to_string; GstCaps* function(GstCaps* caps) c_gst_caps_truncate; + void function(GstCaps* caps) c_gst_caps_unref; GstCaps* function(const(char)* string_) c_gst_caps_from_string; + int function(GstCaps** oldCaps, GstCaps* newCaps) c_gst_caps_replace; + int function(GstCaps** oldCaps, GstCaps* newCaps) c_gst_caps_take; // gstreamer.CapsFeatures @@ -2066,6 +2195,7 @@ __gshared extern(C) GstCapsFeatures* function() c_gst_caps_features_new_empty; GstCapsFeatures* function(GQuark feature1, ... ) c_gst_caps_features_new_id; GstCapsFeatures* function(GQuark feature1, void* varargs) c_gst_caps_features_new_id_valist; + GstCapsFeatures* function(const(char)* feature) c_gst_caps_features_new_single; GstCapsFeatures* function(const(char)* feature1, void* varargs) c_gst_caps_features_new_valist; void function(GstCapsFeatures* features, const(char)* feature) c_gst_caps_features_add; void function(GstCapsFeatures* features, GQuark feature) c_gst_caps_features_add_id; @@ -2140,11 +2270,15 @@ __gshared extern(C) GType function() c_gst_context_get_type; GstContext* function(const(char)* contextType, int persistent) c_gst_context_new; + GstContext* function(GstContext* context) c_gst_context_copy; const(char)* function(GstContext* context) c_gst_context_get_context_type; GstStructure* function(GstContext* context) c_gst_context_get_structure; int function(GstContext* context, const(char)* contextType) c_gst_context_has_context_type; int function(GstContext* context) c_gst_context_is_persistent; + GstContext* function(GstContext* context) c_gst_context_ref; + void function(GstContext* context) c_gst_context_unref; GstStructure* function(GstContext* context) c_gst_context_writable_structure; + int function(GstContext** oldContext, GstContext* newContext) c_gst_context_replace; // gstreamer.ControlBinding @@ -2162,6 +2296,11 @@ __gshared extern(C) int function(GstControlSource* self, GstClockTime timestamp, double* value) c_gst_control_source_get_value; int function(GstControlSource* self, GstClockTime timestamp, GstClockTime interval, uint nValues, double* values) c_gst_control_source_get_value_array; + // gstreamer.CustomMeta + + GstStructure* function(GstCustomMeta* meta) c_gst_custom_meta_get_structure; + int function(GstCustomMeta* meta, const(char)* name) c_gst_custom_meta_has_name; + // gstreamer.DateTime GType function() c_gst_date_time_get_type; @@ -2169,7 +2308,9 @@ __gshared extern(C) GstDateTime* function(GDateTime* dt) c_gst_date_time_new_from_g_date_time; GstDateTime* function(const(char)* string_) c_gst_date_time_new_from_iso8601_string; GstDateTime* function(long secs) c_gst_date_time_new_from_unix_epoch_local_time; + GstDateTime* function(long usecs) c_gst_date_time_new_from_unix_epoch_local_time_usecs; GstDateTime* function(long secs) c_gst_date_time_new_from_unix_epoch_utc; + GstDateTime* function(long usecs) c_gst_date_time_new_from_unix_epoch_utc_usecs; GstDateTime* function(int year, int month, int day, int hour, int minute, double seconds) c_gst_date_time_new_local_time; GstDateTime* function() c_gst_date_time_new_now_local_time; GstDateTime* function() c_gst_date_time_new_now_utc; @@ -2248,6 +2389,7 @@ __gshared extern(C) char** function(GstDeviceProvider* provider) c_gst_device_provider_get_hidden_providers; const(char)* function(GstDeviceProvider* provider, const(char)* key) c_gst_device_provider_get_metadata; void function(GstDeviceProvider* provider, const(char)* name) c_gst_device_provider_hide_provider; + int function(GstDeviceProvider* provider) c_gst_device_provider_is_started; int function(GstDeviceProvider* provider) c_gst_device_provider_start; void function(GstDeviceProvider* provider) c_gst_device_provider_stop; void function(GstDeviceProvider* provider, const(char)* name) c_gst_device_provider_unhide_provider; @@ -2289,6 +2431,7 @@ __gshared extern(C) int function(GstPlugin* plugin, const(char)* name, uint rank, GType type) c_gst_element_register; const(char)* function(GstStateChangeReturn stateRet) c_gst_element_state_change_return_get_name; const(char)* function(GstState state) c_gst_element_state_get_name; + void function(GType type) c_gst_element_type_set_skip_documentation; void function(GstElement* element) c_gst_element_abort_state; int function(GstElement* element, GstPad* pad) c_gst_element_add_pad; gulong function(GstElement* element, const(char)* propertyName, int includeValue) c_gst_element_add_property_deep_notify_watch; @@ -2308,6 +2451,8 @@ __gshared extern(C) GstContext* function(GstElement* element, const(char)* contextType) c_gst_element_get_context; GstContext* function(GstElement* element, const(char)* contextType) c_gst_element_get_context_unlocked; GList* function(GstElement* element) c_gst_element_get_contexts; + GstClockTime function(GstElement* element) c_gst_element_get_current_clock_time; + GstClockTime function(GstElement* element) c_gst_element_get_current_running_time; GstElementFactory* function(GstElement* element) c_gst_element_get_factory; const(char)* function(GstElement* element, const(char)* key) c_gst_element_get_metadata; GstPadTemplate* function(GstElement* element, const(char)* name) c_gst_element_get_pad_template; @@ -2340,6 +2485,7 @@ __gshared extern(C) int function(GstElement* element, GstPad* pad) c_gst_element_remove_pad; void function(GstElement* element, gulong watchId) c_gst_element_remove_property_notify_watch; GstPad* function(GstElement* element, GstPadTemplate* templ, const(char)* name, GstCaps* caps) c_gst_element_request_pad; + GstPad* function(GstElement* element, const(char)* name) c_gst_element_request_pad_simple; int function(GstElement* element, double rate, GstFormat format, GstSeekFlags flags, GstSeekType startType, long start, GstSeekType stopType, long stop) c_gst_element_seek; int function(GstElement* element, GstFormat format, GstSeekFlags seekFlags, long seekPos) c_gst_element_seek_simple; int function(GstElement* element, GstEvent* event) c_gst_element_send_event; @@ -2375,15 +2521,22 @@ __gshared extern(C) GList* function(GList* list, GstCaps* caps, GstPadDirection direction, int subsetonly) c_gst_element_factory_list_filter; GList* function(GstElementFactoryListType type, GstRank minrank) c_gst_element_factory_list_get_elements; GstElement* function(const(char)* factoryname, const(char)* name) c_gst_element_factory_make; + GstElement* function(const(char)* factoryname, const(char)* first, ... ) c_gst_element_factory_make_full; + GstElement* function(const(char)* factoryname, const(char)* first, void* properties) c_gst_element_factory_make_valist; + GstElement* function(const(char)* factoryname, uint n, char** names, GValue* values) c_gst_element_factory_make_with_properties; int function(GstElementFactory* factory, GstCaps* caps) c_gst_element_factory_can_sink_all_caps; int function(GstElementFactory* factory, GstCaps* caps) c_gst_element_factory_can_sink_any_caps; int function(GstElementFactory* factory, GstCaps* caps) c_gst_element_factory_can_src_all_caps; int function(GstElementFactory* factory, GstCaps* caps) c_gst_element_factory_can_src_any_caps; GstElement* function(GstElementFactory* factory, const(char)* name) c_gst_element_factory_create; + GstElement* function(GstElementFactory* factory, const(char)* first, ... ) c_gst_element_factory_create_full; + GstElement* function(GstElementFactory* factory, const(char)* first, void* properties) c_gst_element_factory_create_valist; + GstElement* function(GstElementFactory* factory, uint n, char** names, GValue* values) c_gst_element_factory_create_with_properties; GType function(GstElementFactory* factory) c_gst_element_factory_get_element_type; const(char)* function(GstElementFactory* factory, const(char)* key) c_gst_element_factory_get_metadata; char** function(GstElementFactory* factory) c_gst_element_factory_get_metadata_keys; uint function(GstElementFactory* factory) c_gst_element_factory_get_num_pad_templates; + int function(GstElementFactory* factory) c_gst_element_factory_get_skip_documentation; GList* function(GstElementFactory* factory) c_gst_element_factory_get_static_pad_templates; char** function(GstElementFactory* factory) c_gst_element_factory_get_uri_protocols; GstURIType function(GstElementFactory* factory) c_gst_element_factory_get_uri_type; @@ -2400,6 +2553,8 @@ __gshared extern(C) GstEvent* function() c_gst_event_new_flush_start; GstEvent* function(int resetTime) c_gst_event_new_flush_stop; GstEvent* function(GstClockTime timestamp, GstClockTime duration) c_gst_event_new_gap; + GstEvent* function(double rateMultiplier, GstSegmentFlags newFlags) c_gst_event_new_instant_rate_change; + GstEvent* function(double rateMultiplier, GstClockTime runningTime, GstClockTime upstreamRunningTime) c_gst_event_new_instant_rate_sync_time; GstEvent* function(GstClockTime latency) c_gst_event_new_latency; GstEvent* function(GstStructure* structure) c_gst_event_new_navigation; GstEvent* function(const(char)* systemId, GstBuffer* data, const(char)* origin) c_gst_event_new_protection; @@ -2417,16 +2572,21 @@ __gshared extern(C) GstEvent* function(GstTagList* taglist) c_gst_event_new_tag; GstEvent* function(GstToc* toc, int updated) c_gst_event_new_toc; GstEvent* function(const(char)* uid) c_gst_event_new_toc_select; + GstEvent* function(GstEvent* event) c_gst_event_copy; void function(GstEvent* event, GstSegment* segment) c_gst_event_copy_segment; long function(GstEvent* event) c_gst_event_get_running_time_offset; uint function(GstEvent* event) c_gst_event_get_seqnum; GstStructure* function(GstEvent* event) c_gst_event_get_structure; int function(GstEvent* event, const(char)* name) c_gst_event_has_name; + int function(GstEvent* event, GQuark name) c_gst_event_has_name_id; void function(GstEvent* event, GstFormat* format, long* minsize, long* maxsize, int* async) c_gst_event_parse_buffer_size; void function(GstEvent* event, GstCaps** caps) c_gst_event_parse_caps; void function(GstEvent* event, int* resetTime) c_gst_event_parse_flush_stop; void function(GstEvent* event, GstClockTime* timestamp, GstClockTime* duration) c_gst_event_parse_gap; + void function(GstEvent* event, GstGapFlags* flags) c_gst_event_parse_gap_flags; int function(GstEvent* event, uint* groupId) c_gst_event_parse_group_id; + void function(GstEvent* event, double* rateMultiplier, GstSegmentFlags* newFlags) c_gst_event_parse_instant_rate_change; + void function(GstEvent* event, double* rateMultiplier, GstClockTime* runningTime, GstClockTime* upstreamRunningTime) c_gst_event_parse_instant_rate_sync_time; void function(GstEvent* event, GstClockTime* latency) c_gst_event_parse_latency; void function(GstEvent* event, char** systemId, GstBuffer** data, char** origin) c_gst_event_parse_protection; void function(GstEvent* event, GstQOSType* type, double* proportion, GstClockTimeDiff* diff, GstClockTime* timestamp) c_gst_event_parse_qos; @@ -2445,13 +2605,19 @@ __gshared extern(C) void function(GstEvent* event, GstTagList** taglist) c_gst_event_parse_tag; void function(GstEvent* event, GstToc** toc, int* updated) c_gst_event_parse_toc; void function(GstEvent* event, char** uid) c_gst_event_parse_toc_select; + GstEvent* function(GstEvent* event) c_gst_event_ref; + void function(GstEvent* event, GstGapFlags flags) c_gst_event_set_gap_flags; void function(GstEvent* event, uint groupId) c_gst_event_set_group_id; void function(GstEvent* event, long offset) c_gst_event_set_running_time_offset; void function(GstEvent* event, GstClockTime interval) c_gst_event_set_seek_trickmode_interval; void function(GstEvent* event, uint seqnum) c_gst_event_set_seqnum; void function(GstEvent* event, GstStream* stream) c_gst_event_set_stream; void function(GstEvent* event, GstStreamFlags flags) c_gst_event_set_stream_flags; + void function(GstEvent* event) c_gst_event_unref; GstStructure* function(GstEvent* event) c_gst_event_writable_structure; + int function(GstEvent** oldEvent, GstEvent* newEvent) c_gst_event_replace; + GstEvent* function(GstEvent** oldEvent) c_gst_event_steal; + int function(GstEvent** oldEvent, GstEvent* newEvent) c_gst_event_take; GstEventTypeFlags function(GstEventType type) c_gst_event_type_get_flags; const(char)* function(GstEventType type) c_gst_event_type_get_name; GQuark function(GstEventType type) c_gst_event_type_to_quark; @@ -2517,9 +2683,11 @@ __gshared extern(C) int function(GstMemory* mem, const(char)* memType) c_gst_memory_is_type; GstMemory* function(GstMemory* mem, GstMapInfo* info, GstMapFlags flags) c_gst_memory_make_mapped; int function(GstMemory* mem, GstMapInfo* info, GstMapFlags flags) c_gst_memory_map; + GstMemory* function(GstMemory* memory) c_gst_memory_ref; void function(GstMemory* mem, ptrdiff_t offset, size_t size) c_gst_memory_resize; GstMemory* function(GstMemory* mem, ptrdiff_t offset, ptrdiff_t size) c_gst_memory_share; void function(GstMemory* mem, GstMapInfo* info) c_gst_memory_unmap; + void function(GstMemory* memory) c_gst_memory_unref; // gstreamer.Message @@ -2542,6 +2710,7 @@ __gshared extern(C) GstMessage* function(GstObject* src, GstContext* context) c_gst_message_new_have_context; GstMessage* function(GstObject* src, GError* error, const(char)* debug_) c_gst_message_new_info; GstMessage* function(GstObject* src, GError* error, const(char)* debug_, GstStructure* details) c_gst_message_new_info_with_details; + GstMessage* function(GstObject* src, double rateMultiplier) c_gst_message_new_instant_rate_request; GstMessage* function(GstObject* src) c_gst_message_new_latency; GstMessage* function(GstObject* src, const(char)* contextType) c_gst_message_new_need_context; GstMessage* function(GstObject* src, GstClock* clock) c_gst_message_new_new_clock; @@ -2567,6 +2736,7 @@ __gshared extern(C) GstMessage* function(GstObject* src, GError* error, const(char)* debug_) c_gst_message_new_warning; GstMessage* function(GstObject* src, GError* error, const(char)* debug_, GstStructure* details) c_gst_message_new_warning_with_details; void function(GstMessage* message, const(char)* location, GstTagList* tagList, GstStructure* entryStruct) c_gst_message_add_redirect_entry; + GstMessage* function(GstMessage* msg) c_gst_message_copy; size_t function(GstMessage* message) c_gst_message_get_num_redirect_entries; uint function(GstMessage* message) c_gst_message_get_seqnum; GValue* function(GstMessage* message) c_gst_message_get_stream_status_object; @@ -2587,6 +2757,7 @@ __gshared extern(C) void function(GstMessage* message, GstContext** context) c_gst_message_parse_have_context; void function(GstMessage* message, GError** gerror, char** debug_) c_gst_message_parse_info; void function(GstMessage* message, GstStructure** structure) c_gst_message_parse_info_details; + void function(GstMessage* message, double* rateMultiplier) c_gst_message_parse_instant_rate_request; void function(GstMessage* message, GstClock** clock) c_gst_message_parse_new_clock; void function(GstMessage* message, GstProgressType* type, char** code, char** text) c_gst_message_parse_progress; void function(GstMessage* message, GstObject** object, char** propertyName, GValue** propertyValue) c_gst_message_parse_property_notify; @@ -2609,6 +2780,7 @@ __gshared extern(C) void function(GstMessage* message, GstToc** toc, int* updated) c_gst_message_parse_toc; void function(GstMessage* message, GError** gerror, char** debug_) c_gst_message_parse_warning; void function(GstMessage* message, GstStructure** structure) c_gst_message_parse_warning_details; + GstMessage* function(GstMessage* msg) c_gst_message_ref; void function(GstMessage* message, GstBufferingMode mode, int avgIn, int avgOut, long bufferingLeft) c_gst_message_set_buffering_stats; void function(GstMessage* message, uint groupId) c_gst_message_set_group_id; void function(GstMessage* message, GstFormat format, ulong processed, ulong dropped) c_gst_message_set_qos_stats; @@ -2618,7 +2790,10 @@ __gshared extern(C) void function(GstMessage* message, GstStream* stream) c_gst_message_streams_selected_add; uint function(GstMessage* message) c_gst_message_streams_selected_get_size; GstStream* function(GstMessage* message, uint idx) c_gst_message_streams_selected_get_stream; + void function(GstMessage* msg) c_gst_message_unref; GstStructure* function(GstMessage* message) c_gst_message_writable_structure; + int function(GstMessage** oldMessage, GstMessage* newMessage) c_gst_message_replace; + int function(GstMessage** oldMessage, GstMessage* newMessage) c_gst_message_take; const(char)* function(GstMessageType type) c_gst_message_type_get_name; GQuark function(GstMessageType type) c_gst_message_type_to_quark; @@ -2631,9 +2806,15 @@ __gshared extern(C) GType function(const(char)* api, char** tags) c_gst_meta_api_type_register; GstMetaInfo* function(const(char)* impl) c_gst_meta_get_info; GstMetaInfo* function(GType api, const(char)* impl, size_t size, GstMetaInitFunction initFunc, GstMetaFreeFunction freeFunc, GstMetaTransformFunction transformFunc) c_gst_meta_register; + GstMetaInfo* function(const(char)* name, char** tags, GstCustomMetaTransformFunction transformFunc, void* userData, GDestroyNotify destroyData) c_gst_meta_register_custom; + + // gstreamer.MetaInfo + + int function(GstMetaInfo* info) c_gst_meta_info_is_custom; // gstreamer.MiniObject + GType function() c_gst_mini_object_get_type; void function(GstMiniObject* object, GstMiniObject* parent) c_gst_mini_object_add_parent; GstMiniObject* function(GstMiniObject* miniObject) c_gst_mini_object_copy; void* function(GstMiniObject* object, GQuark quark) c_gst_mini_object_get_qdata; @@ -2715,6 +2896,7 @@ __gshared extern(C) GstElement* function(GstPad* pad) c_gst_pad_get_parent_element; GstPad* function(GstPad* pad) c_gst_pad_get_peer; GstFlowReturn function(GstPad* pad, ulong offset, uint size, GstBuffer** buffer) c_gst_pad_get_range; + GstPad* function(GstPad* pad) c_gst_pad_get_single_internal_link; GstEvent* function(GstPad* pad, GstEventType eventType, uint idx) c_gst_pad_get_sticky_event; GstStream* function(GstPad* pad) c_gst_pad_get_stream; char* function(GstPad* pad) c_gst_pad_get_stream_id; @@ -2792,7 +2974,9 @@ __gshared extern(C) GstPadTemplate* function(GstStaticPadTemplate* padTemplate, GType padType) c_gst_pad_template_new_from_static_pad_template_with_gtype; GstPadTemplate* function(const(char)* nameTemplate, GstPadDirection direction, GstPadPresence presence, GstCaps* caps, GType padType) c_gst_pad_template_new_with_gtype; GstCaps* function(GstPadTemplate* templ) c_gst_pad_template_get_caps; + GstCaps* function(GstPadTemplate* templ) c_gst_pad_template_get_documentation_caps; void function(GstPadTemplate* templ, GstPad* pad) c_gst_pad_template_pad_created; + void function(GstPadTemplate* templ, GstCaps* caps) c_gst_pad_template_set_documentation_caps; // gstreamer.ParamArray @@ -2926,7 +3110,9 @@ __gshared extern(C) void function(GstPromise* promise) c_gst_promise_expire; GstStructure* function(GstPromise* promise) c_gst_promise_get_reply; void function(GstPromise* promise) c_gst_promise_interrupt; + GstPromise* function(GstPromise* promise) c_gst_promise_ref; void function(GstPromise* promise, GstStructure* s) c_gst_promise_reply; + void function(GstPromise* promise) c_gst_promise_unref; GstPromiseResult function(GstPromise* promise) c_gst_promise_wait; // gstreamer.ProtectionMeta @@ -2969,6 +3155,7 @@ __gshared extern(C) void function(GstQuery* query, GstBufferPool* pool, uint size, uint minBuffers, uint maxBuffers) c_gst_query_add_allocation_pool; int function(GstQuery* query, long start, long stop) c_gst_query_add_buffering_range; void function(GstQuery* query, GstPadMode mode) c_gst_query_add_scheduling_mode; + GstQuery* function(GstQuery* q) c_gst_query_copy; int function(GstQuery* query, GType api, uint* index) c_gst_query_find_allocation_meta; uint function(GstQuery* query) c_gst_query_get_n_allocation_metas; uint function(GstQuery* query) c_gst_query_get_n_allocation_params; @@ -3006,6 +3193,7 @@ __gshared extern(C) void function(GstQuery* query, char** uri) c_gst_query_parse_uri; void function(GstQuery* query, char** uri) c_gst_query_parse_uri_redirection; void function(GstQuery* query, int* permanent) c_gst_query_parse_uri_redirection_permanent; + GstQuery* function(GstQuery* q) c_gst_query_ref; void function(GstQuery* query, uint index) c_gst_query_remove_nth_allocation_meta; void function(GstQuery* query, uint index) c_gst_query_remove_nth_allocation_param; void function(GstQuery* query, uint index) c_gst_query_remove_nth_allocation_pool; @@ -3030,7 +3218,10 @@ __gshared extern(C) void function(GstQuery* query, const(char)* uri) c_gst_query_set_uri; void function(GstQuery* query, const(char)* uri) c_gst_query_set_uri_redirection; void function(GstQuery* query, int permanent) c_gst_query_set_uri_redirection_permanent; + void function(GstQuery* q) c_gst_query_unref; GstStructure* function(GstQuery* query) c_gst_query_writable_structure; + int function(GstQuery** oldQuery, GstQuery* newQuery) c_gst_query_replace; + int function(GstQuery** oldQuery, GstQuery* newQuery) c_gst_query_take; GstQueryTypeFlags function(GstQueryType type) c_gst_query_type_get_flags; const(char)* function(GstQueryType type) c_gst_query_type_get_name; GQuark function(GstQueryType type) c_gst_query_type_to_quark; @@ -3066,16 +3257,19 @@ __gshared extern(C) GType function() c_gst_sample_get_type; GstSample* function(GstBuffer* buffer, GstCaps* caps, GstSegment* segment, GstStructure* info) c_gst_sample_new; + GstSample* function(GstSample* buf) c_gst_sample_copy; GstBuffer* function(GstSample* sample) c_gst_sample_get_buffer; GstBufferList* function(GstSample* sample) c_gst_sample_get_buffer_list; GstCaps* function(GstSample* sample) c_gst_sample_get_caps; GstStructure* function(GstSample* sample) c_gst_sample_get_info; GstSegment* function(GstSample* sample) c_gst_sample_get_segment; + GstSample* function(GstSample* sample) c_gst_sample_ref; void function(GstSample* sample, GstBuffer* buffer) c_gst_sample_set_buffer; void function(GstSample* sample, GstBufferList* bufferList) c_gst_sample_set_buffer_list; void function(GstSample* sample, GstCaps* caps) c_gst_sample_set_caps; int function(GstSample* sample, GstStructure* info) c_gst_sample_set_info; void function(GstSample* sample, GstSegment* segment) c_gst_sample_set_segment; + void function(GstSample* sample) c_gst_sample_unref; // gstreamer.Segment @@ -3100,6 +3294,13 @@ __gshared extern(C) ulong function(GstSegment* segment, GstFormat format, ulong position) c_gst_segment_to_stream_time; int function(GstSegment* segment, GstFormat format, ulong position, ulong* streamTime) c_gst_segment_to_stream_time_full; + // gstreamer.SharedTaskPool + + GType function() c_gst_shared_task_pool_get_type; + GstTaskPool* function() c_gst_shared_task_pool_new; + uint function(GstSharedTaskPool* pool) c_gst_shared_task_pool_get_max_threads; + void function(GstSharedTaskPool* pool, uint maxThreads) c_gst_shared_task_pool_set_max_threads; + // gstreamer.StaticCaps void function(GstStaticCaps* staticCaps) c_gst_static_caps_cleanup; @@ -3136,6 +3337,7 @@ __gshared extern(C) // gstreamer.Structure GType function() c_gst_structure_get_type; + GstStructure* function(const(char)* string_, char** end) c_gst_structure_from_string; GstStructure* function(const(char)* name, const(char)* firstfield, ... ) c_gst_structure_new; GstStructure* function(const(char)* name) c_gst_structure_new_empty; GstStructure* function(const(char)* string_) c_gst_structure_new_from_string; @@ -3197,6 +3399,7 @@ __gshared extern(C) void function(GstStructure* structure, const(char)* fieldname) c_gst_structure_remove_field; void function(GstStructure* structure, const(char)* fieldname, ... ) c_gst_structure_remove_fields; void function(GstStructure* structure, const(char)* fieldname, void* varargs) c_gst_structure_remove_fields_valist; + char* function(GstStructure* structure, GstSerializeFlags flags) c_gst_structure_serialize; void function(GstStructure* structure, const(char)* fieldname, ... ) c_gst_structure_set; void function(GstStructure* structure, const(char)* fieldname, GValueArray* array) c_gst_structure_set_array; void function(GstStructure* structure, const(char)* fieldname, GValueArray* array) c_gst_structure_set_list; @@ -3206,7 +3409,7 @@ __gshared extern(C) void function(GstStructure* structure, const(char)* fieldname, GValue* value) c_gst_structure_set_value; void function(GstStructure* structure, const(char)* fieldname, GValue* value) c_gst_structure_take_value; char* function(GstStructure* structure) c_gst_structure_to_string; - GstStructure* function(const(char)* string_, char** end) c_gst_structure_from_string; + int function(GstStructure** oldstrPtr, GstStructure* newstr) c_gst_structure_take; // gstreamer.SystemClock @@ -3226,6 +3429,7 @@ __gshared extern(C) void function(GstTagList* list, GstTagMergeMode mode, const(char)* tag, void* varArgs) c_gst_tag_list_add_valist_values; void function(GstTagList* list, GstTagMergeMode mode, const(char)* tag, GValue* value) c_gst_tag_list_add_value; void function(GstTagList* list, GstTagMergeMode mode, const(char)* tag, ... ) c_gst_tag_list_add_values; + GstTagList* function(GstTagList* taglist) c_gst_tag_list_copy; void function(GstTagList* list, GstTagForeachFunc func, void* userData) c_gst_tag_list_foreach; int function(GstTagList* list, const(char)* tag, int* value) c_gst_tag_list_get_boolean; int function(GstTagList* list, const(char)* tag, uint index, int* value) c_gst_tag_list_get_boolean_index; @@ -3261,10 +3465,14 @@ __gshared extern(C) int function(GstTagList* list) c_gst_tag_list_n_tags; const(char)* function(GstTagList* list, uint index) c_gst_tag_list_nth_tag_name; int function(GstTagList* list, const(char)* tag, uint index, char** value) c_gst_tag_list_peek_string_index; + GstTagList* function(GstTagList* taglist) c_gst_tag_list_ref; void function(GstTagList* list, const(char)* tag) c_gst_tag_list_remove_tag; void function(GstTagList* list, GstTagScope scope_) c_gst_tag_list_set_scope; char* function(GstTagList* list) c_gst_tag_list_to_string; + void function(GstTagList* taglist) c_gst_tag_list_unref; int function(GValue* dest, GstTagList* list, const(char)* tag) c_gst_tag_list_copy_value; + int function(GstTagList** oldTaglist, GstTagList* newTaglist) c_gst_tag_list_replace; + int function(GstTagList** oldTaglist, GstTagList* newTaglist) c_gst_tag_list_take; int function(const(char)* tag) c_gst_tag_exists; const(char)* function(const(char)* tag) c_gst_tag_get_description; GstTagFlag function(const(char)* tag) c_gst_tag_get_flag; @@ -3298,6 +3506,7 @@ __gshared extern(C) GstTaskState function(GstTask* task) c_gst_task_get_state; int function(GstTask* task) c_gst_task_join; int function(GstTask* task) c_gst_task_pause; + int function(GstTask* task) c_gst_task_resume; void function(GstTask* task, GstTaskThreadFunc enterFunc, void* userData, GDestroyNotify notify) c_gst_task_set_enter_callback; void function(GstTask* task, GstTaskThreadFunc leaveFunc, void* userData, GDestroyNotify notify) c_gst_task_set_leave_callback; void function(GstTask* task, GRecMutex* mutex) c_gst_task_set_lock; @@ -3311,6 +3520,7 @@ __gshared extern(C) GType function() c_gst_task_pool_get_type; GstTaskPool* function() c_gst_task_pool_new; void function(GstTaskPool* pool) c_gst_task_pool_cleanup; + void function(GstTaskPool* pool, void* id) c_gst_task_pool_dispose_handle; void function(GstTaskPool* pool, void* id) c_gst_task_pool_join; void function(GstTaskPool* pool, GError** err) c_gst_task_pool_prepare; void* function(GstTaskPool* pool, GstTaskPoolFunction func, void* userData, GError** err) c_gst_task_pool_push; @@ -3358,6 +3568,7 @@ __gshared extern(C) // gstreamer.Tracer GType function() c_gst_tracer_get_type; + int function(GstPlugin* plugin, const(char)* name, GType type) c_gst_tracer_register; // gstreamer.TracerFactory @@ -3368,12 +3579,15 @@ __gshared extern(C) // gstreamer.TracerRecord GType function() c_gst_tracer_record_get_type; + GstTracerRecord* function(const(char)* name, const(char)* firstfield, ... ) c_gst_tracer_record_new; + void function(GstTracerRecord* self, ... ) c_gst_tracer_record_log; // gstreamer.TypeFind ulong function(GstTypeFind* find) c_gst_type_find_get_length; ubyte* function(GstTypeFind* find, long offset, uint size) c_gst_type_find_peek; void function(GstTypeFind* find, uint probability, GstCaps* caps) c_gst_type_find_suggest; + void function(GstTypeFind* find, uint probability, const(char)* mediaType) c_gst_type_find_suggest_empty_simple; void function(GstTypeFind* find, uint probability, const(char)* mediaType, const(char)* fieldname, ... ) c_gst_type_find_suggest_simple; int function(GstPlugin* plugin, const(char)* name, uint rank, GstTypeFindFunction func, const(char)* extensions, GstCaps* possibleCaps, void* data, GDestroyNotify dataNotify) c_gst_type_find_register; GType function() c_gst_type_find_get_type; @@ -3401,6 +3615,7 @@ __gshared extern(C) GstUri* function(const(char)* scheme, const(char)* userinfo, const(char)* host, uint port, const(char)* path, const(char)* query, const(char)* fragment) c_gst_uri_new; int function(GstUri* uri, const(char)* relativePath) c_gst_uri_append_path; int function(GstUri* uri, const(char)* pathSegment) c_gst_uri_append_path_segment; + GstUri* function(GstUri* uri) c_gst_uri_copy; int function(GstUri* first, GstUri* second) c_gst_uri_equal; GstUri* function(GstUri* base, const(char)* uri) c_gst_uri_from_string_with_base; const(char)* function(GstUri* uri) c_gst_uri_get_fragment; @@ -3423,6 +3638,7 @@ __gshared extern(C) GstUri* function(GstUri* base, const(char)* scheme, const(char)* userinfo, const(char)* host, uint port, const(char)* path, const(char)* query, const(char)* fragment) c_gst_uri_new_with_base; int function(GstUri* uri) c_gst_uri_normalize; int function(GstUri* uri, const(char)* queryKey) c_gst_uri_query_has_key; + GstUri* function(GstUri* uri) c_gst_uri_ref; int function(GstUri* uri, const(char)* queryKey) c_gst_uri_remove_query_key; int function(GstUri* uri, const(char)* fragment) c_gst_uri_set_fragment; int function(GstUri* uri, const(char)* host) c_gst_uri_set_host; @@ -3436,8 +3652,10 @@ __gshared extern(C) int function(GstUri* uri, const(char)* scheme) c_gst_uri_set_scheme; int function(GstUri* uri, const(char)* userinfo) c_gst_uri_set_userinfo; char* function(GstUri* uri) c_gst_uri_to_string; + void function(GstUri* uri) c_gst_uri_unref; char* function(const(char)* protocol, const(char)* location) c_gst_uri_construct; GstUri* function(const(char)* uri) c_gst_uri_from_string; + GstUri* function(const(char)* uri) c_gst_uri_from_string_escaped; char* function(const(char)* uri) c_gst_uri_get_location; char* function(const(char)* uri) c_gst_uri_get_protocol; int function(const(char)* uri, const(char)* protocol) c_gst_uri_has_protocol; @@ -3455,6 +3673,7 @@ __gshared extern(C) void function(GValue* value, GValue* appendValue) c_gst_value_array_append_value; uint function(GValue* value) c_gst_value_array_get_size; GValue* function(GValue* value, uint index) c_gst_value_array_get_value; + GValue* function(GValue* value, uint prealloc) c_gst_value_array_init; void function(GValue* value, GValue* prependValue) c_gst_value_array_prepend_value; // gstreamer.ValueList @@ -3465,6 +3684,7 @@ __gshared extern(C) void function(GValue* dest, GValue* value1, GValue* value2) c_gst_value_list_concat; uint function(GValue* value) c_gst_value_list_get_size; GValue* function(GValue* value, uint index) c_gst_value_list_get_value; + GValue* function(GValue* value, uint prealloc) c_gst_value_list_init; void function(GValue* dest, GValue* value1, GValue* value2) c_gst_value_list_merge; void function(GValue* value, GValue* prependValue) c_gst_value_list_prepend_value; @@ -3620,6 +3840,7 @@ __gshared extern(C) // gstreamer.AllocationParams alias c_gst_allocation_params_get_type gst_allocation_params_get_type; +alias c_gst_allocation_params_new gst_allocation_params_new; alias c_gst_allocation_params_copy gst_allocation_params_copy; alias c_gst_allocation_params_free gst_allocation_params_free; alias c_gst_allocation_params_init gst_allocation_params_init; @@ -3655,6 +3876,7 @@ alias c_gst_bin_get_by_interface gst_bin_get_by_interface; alias c_gst_bin_get_by_name gst_bin_get_by_name; alias c_gst_bin_get_by_name_recurse_up gst_bin_get_by_name_recurse_up; alias c_gst_bin_get_suppressed_flags gst_bin_get_suppressed_flags; +alias c_gst_bin_iterate_all_by_element_factory_name gst_bin_iterate_all_by_element_factory_name; alias c_gst_bin_iterate_all_by_interface gst_bin_iterate_all_by_interface; alias c_gst_bin_iterate_elements gst_bin_iterate_elements; alias c_gst_bin_iterate_recurse gst_bin_iterate_recurse; @@ -3676,9 +3898,11 @@ alias c_gst_bitmask_get_type gst_bitmask_get_type; alias c_gst_buffer_get_type gst_buffer_get_type; alias c_gst_buffer_new gst_buffer_new; alias c_gst_buffer_new_allocate gst_buffer_new_allocate; +alias c_gst_buffer_new_memdup gst_buffer_new_memdup; alias c_gst_buffer_new_wrapped gst_buffer_new_wrapped; alias c_gst_buffer_new_wrapped_bytes gst_buffer_new_wrapped_bytes; alias c_gst_buffer_new_wrapped_full gst_buffer_new_wrapped_full; +alias c_gst_buffer_add_custom_meta gst_buffer_add_custom_meta; alias c_gst_buffer_add_meta gst_buffer_add_meta; alias c_gst_buffer_add_parent_buffer_meta gst_buffer_add_parent_buffer_meta; alias c_gst_buffer_add_protection_meta gst_buffer_add_protection_meta; @@ -3686,6 +3910,7 @@ alias c_gst_buffer_add_reference_timestamp_meta gst_buffer_add_reference_timesta alias c_gst_buffer_append gst_buffer_append; alias c_gst_buffer_append_memory gst_buffer_append_memory; alias c_gst_buffer_append_region gst_buffer_append_region; +alias c_gst_buffer_copy gst_buffer_copy; alias c_gst_buffer_copy_deep gst_buffer_copy_deep; alias c_gst_buffer_copy_into gst_buffer_copy_into; alias c_gst_buffer_copy_region gst_buffer_copy_region; @@ -3695,6 +3920,7 @@ alias c_gst_buffer_fill gst_buffer_fill; alias c_gst_buffer_find_memory gst_buffer_find_memory; alias c_gst_buffer_foreach_meta gst_buffer_foreach_meta; alias c_gst_buffer_get_all_memory gst_buffer_get_all_memory; +alias c_gst_buffer_get_custom_meta gst_buffer_get_custom_meta; alias c_gst_buffer_get_flags gst_buffer_get_flags; alias c_gst_buffer_get_memory gst_buffer_get_memory; alias c_gst_buffer_get_memory_range gst_buffer_get_memory_range; @@ -3717,6 +3943,7 @@ alias c_gst_buffer_memset gst_buffer_memset; alias c_gst_buffer_n_memory gst_buffer_n_memory; alias c_gst_buffer_peek_memory gst_buffer_peek_memory; alias c_gst_buffer_prepend_memory gst_buffer_prepend_memory; +alias c_gst_buffer_ref gst_buffer_ref; alias c_gst_buffer_remove_all_memory gst_buffer_remove_all_memory; alias c_gst_buffer_remove_memory gst_buffer_remove_memory; alias c_gst_buffer_remove_memory_range gst_buffer_remove_memory_range; @@ -3729,8 +3956,10 @@ alias c_gst_buffer_resize_range gst_buffer_resize_range; alias c_gst_buffer_set_flags gst_buffer_set_flags; alias c_gst_buffer_set_size gst_buffer_set_size; alias c_gst_buffer_unmap gst_buffer_unmap; +alias c_gst_buffer_unref gst_buffer_unref; alias c_gst_buffer_unset_flags gst_buffer_unset_flags; alias c_gst_buffer_get_max_memory gst_buffer_get_max_memory; +alias c_gst_buffer_replace gst_buffer_replace; // gstreamer.BufferList @@ -3738,13 +3967,18 @@ alias c_gst_buffer_list_get_type gst_buffer_list_get_type; alias c_gst_buffer_list_new gst_buffer_list_new; alias c_gst_buffer_list_new_sized gst_buffer_list_new_sized; alias c_gst_buffer_list_calculate_size gst_buffer_list_calculate_size; +alias c_gst_buffer_list_copy gst_buffer_list_copy; alias c_gst_buffer_list_copy_deep gst_buffer_list_copy_deep; alias c_gst_buffer_list_foreach gst_buffer_list_foreach; alias c_gst_buffer_list_get gst_buffer_list_get; alias c_gst_buffer_list_get_writable gst_buffer_list_get_writable; alias c_gst_buffer_list_insert gst_buffer_list_insert; alias c_gst_buffer_list_length gst_buffer_list_length; +alias c_gst_buffer_list_ref gst_buffer_list_ref; alias c_gst_buffer_list_remove gst_buffer_list_remove; +alias c_gst_buffer_list_unref gst_buffer_list_unref; +alias c_gst_buffer_list_replace gst_buffer_list_replace; +alias c_gst_buffer_list_take gst_buffer_list_take; // gstreamer.BufferPool @@ -3834,7 +4068,9 @@ alias c_gst_caps_merge gst_caps_merge; alias c_gst_caps_merge_structure gst_caps_merge_structure; alias c_gst_caps_merge_structure_full gst_caps_merge_structure_full; alias c_gst_caps_normalize gst_caps_normalize; +alias c_gst_caps_ref gst_caps_ref; alias c_gst_caps_remove_structure gst_caps_remove_structure; +alias c_gst_caps_serialize gst_caps_serialize; alias c_gst_caps_set_features gst_caps_set_features; alias c_gst_caps_set_features_simple gst_caps_set_features_simple; alias c_gst_caps_set_simple gst_caps_set_simple; @@ -3845,7 +4081,10 @@ alias c_gst_caps_steal_structure gst_caps_steal_structure; alias c_gst_caps_subtract gst_caps_subtract; alias c_gst_caps_to_string gst_caps_to_string; alias c_gst_caps_truncate gst_caps_truncate; +alias c_gst_caps_unref gst_caps_unref; alias c_gst_caps_from_string gst_caps_from_string; +alias c_gst_caps_replace gst_caps_replace; +alias c_gst_caps_take gst_caps_take; // gstreamer.CapsFeatures @@ -3855,6 +4094,7 @@ alias c_gst_caps_features_new_any gst_caps_features_new_any; alias c_gst_caps_features_new_empty gst_caps_features_new_empty; alias c_gst_caps_features_new_id gst_caps_features_new_id; alias c_gst_caps_features_new_id_valist gst_caps_features_new_id_valist; +alias c_gst_caps_features_new_single gst_caps_features_new_single; alias c_gst_caps_features_new_valist gst_caps_features_new_valist; alias c_gst_caps_features_add gst_caps_features_add; alias c_gst_caps_features_add_id gst_caps_features_add_id; @@ -3929,11 +4169,15 @@ alias c_gst_clock_wait_for_sync gst_clock_wait_for_sync; alias c_gst_context_get_type gst_context_get_type; alias c_gst_context_new gst_context_new; +alias c_gst_context_copy gst_context_copy; alias c_gst_context_get_context_type gst_context_get_context_type; alias c_gst_context_get_structure gst_context_get_structure; alias c_gst_context_has_context_type gst_context_has_context_type; alias c_gst_context_is_persistent gst_context_is_persistent; +alias c_gst_context_ref gst_context_ref; +alias c_gst_context_unref gst_context_unref; alias c_gst_context_writable_structure gst_context_writable_structure; +alias c_gst_context_replace gst_context_replace; // gstreamer.ControlBinding @@ -3951,6 +4195,11 @@ alias c_gst_control_source_get_type gst_control_source_get_type; alias c_gst_control_source_get_value gst_control_source_get_value; alias c_gst_control_source_get_value_array gst_control_source_get_value_array; +// gstreamer.CustomMeta + +alias c_gst_custom_meta_get_structure gst_custom_meta_get_structure; +alias c_gst_custom_meta_has_name gst_custom_meta_has_name; + // gstreamer.DateTime alias c_gst_date_time_get_type gst_date_time_get_type; @@ -3958,7 +4207,9 @@ alias c_gst_date_time_new gst_date_time_new; alias c_gst_date_time_new_from_g_date_time gst_date_time_new_from_g_date_time; alias c_gst_date_time_new_from_iso8601_string gst_date_time_new_from_iso8601_string; alias c_gst_date_time_new_from_unix_epoch_local_time gst_date_time_new_from_unix_epoch_local_time; +alias c_gst_date_time_new_from_unix_epoch_local_time_usecs gst_date_time_new_from_unix_epoch_local_time_usecs; alias c_gst_date_time_new_from_unix_epoch_utc gst_date_time_new_from_unix_epoch_utc; +alias c_gst_date_time_new_from_unix_epoch_utc_usecs gst_date_time_new_from_unix_epoch_utc_usecs; alias c_gst_date_time_new_local_time gst_date_time_new_local_time; alias c_gst_date_time_new_now_local_time gst_date_time_new_now_local_time; alias c_gst_date_time_new_now_utc gst_date_time_new_now_utc; @@ -4037,6 +4288,7 @@ alias c_gst_device_provider_get_factory gst_device_provider_get_factory; alias c_gst_device_provider_get_hidden_providers gst_device_provider_get_hidden_providers; alias c_gst_device_provider_get_metadata gst_device_provider_get_metadata; alias c_gst_device_provider_hide_provider gst_device_provider_hide_provider; +alias c_gst_device_provider_is_started gst_device_provider_is_started; alias c_gst_device_provider_start gst_device_provider_start; alias c_gst_device_provider_stop gst_device_provider_stop; alias c_gst_device_provider_unhide_provider gst_device_provider_unhide_provider; @@ -4078,6 +4330,7 @@ alias c_gst_element_make_from_uri gst_element_make_from_uri; alias c_gst_element_register gst_element_register; alias c_gst_element_state_change_return_get_name gst_element_state_change_return_get_name; alias c_gst_element_state_get_name gst_element_state_get_name; +alias c_gst_element_type_set_skip_documentation gst_element_type_set_skip_documentation; alias c_gst_element_abort_state gst_element_abort_state; alias c_gst_element_add_pad gst_element_add_pad; alias c_gst_element_add_property_deep_notify_watch gst_element_add_property_deep_notify_watch; @@ -4097,6 +4350,8 @@ alias c_gst_element_get_compatible_pad_template gst_element_get_compatible_pad_t alias c_gst_element_get_context gst_element_get_context; alias c_gst_element_get_context_unlocked gst_element_get_context_unlocked; alias c_gst_element_get_contexts gst_element_get_contexts; +alias c_gst_element_get_current_clock_time gst_element_get_current_clock_time; +alias c_gst_element_get_current_running_time gst_element_get_current_running_time; alias c_gst_element_get_factory gst_element_get_factory; alias c_gst_element_get_metadata gst_element_get_metadata; alias c_gst_element_get_pad_template gst_element_get_pad_template; @@ -4129,6 +4384,7 @@ alias c_gst_element_release_request_pad gst_element_release_request_pad; alias c_gst_element_remove_pad gst_element_remove_pad; alias c_gst_element_remove_property_notify_watch gst_element_remove_property_notify_watch; alias c_gst_element_request_pad gst_element_request_pad; +alias c_gst_element_request_pad_simple gst_element_request_pad_simple; alias c_gst_element_seek gst_element_seek; alias c_gst_element_seek_simple gst_element_seek_simple; alias c_gst_element_send_event gst_element_send_event; @@ -4164,15 +4420,22 @@ alias c_gst_element_factory_find gst_element_factory_find; alias c_gst_element_factory_list_filter gst_element_factory_list_filter; alias c_gst_element_factory_list_get_elements gst_element_factory_list_get_elements; alias c_gst_element_factory_make gst_element_factory_make; +alias c_gst_element_factory_make_full gst_element_factory_make_full; +alias c_gst_element_factory_make_valist gst_element_factory_make_valist; +alias c_gst_element_factory_make_with_properties gst_element_factory_make_with_properties; alias c_gst_element_factory_can_sink_all_caps gst_element_factory_can_sink_all_caps; alias c_gst_element_factory_can_sink_any_caps gst_element_factory_can_sink_any_caps; alias c_gst_element_factory_can_src_all_caps gst_element_factory_can_src_all_caps; alias c_gst_element_factory_can_src_any_caps gst_element_factory_can_src_any_caps; alias c_gst_element_factory_create gst_element_factory_create; +alias c_gst_element_factory_create_full gst_element_factory_create_full; +alias c_gst_element_factory_create_valist gst_element_factory_create_valist; +alias c_gst_element_factory_create_with_properties gst_element_factory_create_with_properties; alias c_gst_element_factory_get_element_type gst_element_factory_get_element_type; alias c_gst_element_factory_get_metadata gst_element_factory_get_metadata; alias c_gst_element_factory_get_metadata_keys gst_element_factory_get_metadata_keys; alias c_gst_element_factory_get_num_pad_templates gst_element_factory_get_num_pad_templates; +alias c_gst_element_factory_get_skip_documentation gst_element_factory_get_skip_documentation; alias c_gst_element_factory_get_static_pad_templates gst_element_factory_get_static_pad_templates; alias c_gst_element_factory_get_uri_protocols gst_element_factory_get_uri_protocols; alias c_gst_element_factory_get_uri_type gst_element_factory_get_uri_type; @@ -4189,6 +4452,8 @@ alias c_gst_event_new_eos gst_event_new_eos; alias c_gst_event_new_flush_start gst_event_new_flush_start; alias c_gst_event_new_flush_stop gst_event_new_flush_stop; alias c_gst_event_new_gap gst_event_new_gap; +alias c_gst_event_new_instant_rate_change gst_event_new_instant_rate_change; +alias c_gst_event_new_instant_rate_sync_time gst_event_new_instant_rate_sync_time; alias c_gst_event_new_latency gst_event_new_latency; alias c_gst_event_new_navigation gst_event_new_navigation; alias c_gst_event_new_protection gst_event_new_protection; @@ -4206,16 +4471,21 @@ alias c_gst_event_new_stream_start gst_event_new_stream_start; alias c_gst_event_new_tag gst_event_new_tag; alias c_gst_event_new_toc gst_event_new_toc; alias c_gst_event_new_toc_select gst_event_new_toc_select; +alias c_gst_event_copy gst_event_copy; alias c_gst_event_copy_segment gst_event_copy_segment; alias c_gst_event_get_running_time_offset gst_event_get_running_time_offset; alias c_gst_event_get_seqnum gst_event_get_seqnum; alias c_gst_event_get_structure gst_event_get_structure; alias c_gst_event_has_name gst_event_has_name; +alias c_gst_event_has_name_id gst_event_has_name_id; alias c_gst_event_parse_buffer_size gst_event_parse_buffer_size; alias c_gst_event_parse_caps gst_event_parse_caps; alias c_gst_event_parse_flush_stop gst_event_parse_flush_stop; alias c_gst_event_parse_gap gst_event_parse_gap; +alias c_gst_event_parse_gap_flags gst_event_parse_gap_flags; alias c_gst_event_parse_group_id gst_event_parse_group_id; +alias c_gst_event_parse_instant_rate_change gst_event_parse_instant_rate_change; +alias c_gst_event_parse_instant_rate_sync_time gst_event_parse_instant_rate_sync_time; alias c_gst_event_parse_latency gst_event_parse_latency; alias c_gst_event_parse_protection gst_event_parse_protection; alias c_gst_event_parse_qos gst_event_parse_qos; @@ -4234,13 +4504,19 @@ alias c_gst_event_parse_stream_start gst_event_parse_stream_start; alias c_gst_event_parse_tag gst_event_parse_tag; alias c_gst_event_parse_toc gst_event_parse_toc; alias c_gst_event_parse_toc_select gst_event_parse_toc_select; +alias c_gst_event_ref gst_event_ref; +alias c_gst_event_set_gap_flags gst_event_set_gap_flags; alias c_gst_event_set_group_id gst_event_set_group_id; alias c_gst_event_set_running_time_offset gst_event_set_running_time_offset; alias c_gst_event_set_seek_trickmode_interval gst_event_set_seek_trickmode_interval; alias c_gst_event_set_seqnum gst_event_set_seqnum; alias c_gst_event_set_stream gst_event_set_stream; alias c_gst_event_set_stream_flags gst_event_set_stream_flags; +alias c_gst_event_unref gst_event_unref; alias c_gst_event_writable_structure gst_event_writable_structure; +alias c_gst_event_replace gst_event_replace; +alias c_gst_event_steal gst_event_steal; +alias c_gst_event_take gst_event_take; alias c_gst_event_type_get_flags gst_event_type_get_flags; alias c_gst_event_type_get_name gst_event_type_get_name; alias c_gst_event_type_to_quark gst_event_type_to_quark; @@ -4306,9 +4582,11 @@ alias c_gst_memory_is_span gst_memory_is_span; alias c_gst_memory_is_type gst_memory_is_type; alias c_gst_memory_make_mapped gst_memory_make_mapped; alias c_gst_memory_map gst_memory_map; +alias c_gst_memory_ref gst_memory_ref; alias c_gst_memory_resize gst_memory_resize; alias c_gst_memory_share gst_memory_share; alias c_gst_memory_unmap gst_memory_unmap; +alias c_gst_memory_unref gst_memory_unref; // gstreamer.Message @@ -4331,6 +4609,7 @@ alias c_gst_message_new_error_with_details gst_message_new_error_with_details; alias c_gst_message_new_have_context gst_message_new_have_context; alias c_gst_message_new_info gst_message_new_info; alias c_gst_message_new_info_with_details gst_message_new_info_with_details; +alias c_gst_message_new_instant_rate_request gst_message_new_instant_rate_request; alias c_gst_message_new_latency gst_message_new_latency; alias c_gst_message_new_need_context gst_message_new_need_context; alias c_gst_message_new_new_clock gst_message_new_new_clock; @@ -4356,6 +4635,7 @@ alias c_gst_message_new_toc gst_message_new_toc; alias c_gst_message_new_warning gst_message_new_warning; alias c_gst_message_new_warning_with_details gst_message_new_warning_with_details; alias c_gst_message_add_redirect_entry gst_message_add_redirect_entry; +alias c_gst_message_copy gst_message_copy; alias c_gst_message_get_num_redirect_entries gst_message_get_num_redirect_entries; alias c_gst_message_get_seqnum gst_message_get_seqnum; alias c_gst_message_get_stream_status_object gst_message_get_stream_status_object; @@ -4376,6 +4656,7 @@ alias c_gst_message_parse_group_id gst_message_parse_group_id; alias c_gst_message_parse_have_context gst_message_parse_have_context; alias c_gst_message_parse_info gst_message_parse_info; alias c_gst_message_parse_info_details gst_message_parse_info_details; +alias c_gst_message_parse_instant_rate_request gst_message_parse_instant_rate_request; alias c_gst_message_parse_new_clock gst_message_parse_new_clock; alias c_gst_message_parse_progress gst_message_parse_progress; alias c_gst_message_parse_property_notify gst_message_parse_property_notify; @@ -4398,6 +4679,7 @@ alias c_gst_message_parse_tag gst_message_parse_tag; alias c_gst_message_parse_toc gst_message_parse_toc; alias c_gst_message_parse_warning gst_message_parse_warning; alias c_gst_message_parse_warning_details gst_message_parse_warning_details; +alias c_gst_message_ref gst_message_ref; alias c_gst_message_set_buffering_stats gst_message_set_buffering_stats; alias c_gst_message_set_group_id gst_message_set_group_id; alias c_gst_message_set_qos_stats gst_message_set_qos_stats; @@ -4407,7 +4689,10 @@ alias c_gst_message_set_stream_status_object gst_message_set_stream_status_objec alias c_gst_message_streams_selected_add gst_message_streams_selected_add; alias c_gst_message_streams_selected_get_size gst_message_streams_selected_get_size; alias c_gst_message_streams_selected_get_stream gst_message_streams_selected_get_stream; +alias c_gst_message_unref gst_message_unref; alias c_gst_message_writable_structure gst_message_writable_structure; +alias c_gst_message_replace gst_message_replace; +alias c_gst_message_take gst_message_take; alias c_gst_message_type_get_name gst_message_type_get_name; alias c_gst_message_type_to_quark gst_message_type_to_quark; @@ -4420,9 +4705,15 @@ alias c_gst_meta_api_type_has_tag gst_meta_api_type_has_tag; alias c_gst_meta_api_type_register gst_meta_api_type_register; alias c_gst_meta_get_info gst_meta_get_info; alias c_gst_meta_register gst_meta_register; +alias c_gst_meta_register_custom gst_meta_register_custom; + +// gstreamer.MetaInfo + +alias c_gst_meta_info_is_custom gst_meta_info_is_custom; // gstreamer.MiniObject +alias c_gst_mini_object_get_type gst_mini_object_get_type; alias c_gst_mini_object_add_parent gst_mini_object_add_parent; alias c_gst_mini_object_copy gst_mini_object_copy; alias c_gst_mini_object_get_qdata gst_mini_object_get_qdata; @@ -4504,6 +4795,7 @@ alias c_gst_pad_get_pad_template_caps gst_pad_get_pad_template_caps; alias c_gst_pad_get_parent_element gst_pad_get_parent_element; alias c_gst_pad_get_peer gst_pad_get_peer; alias c_gst_pad_get_range gst_pad_get_range; +alias c_gst_pad_get_single_internal_link gst_pad_get_single_internal_link; alias c_gst_pad_get_sticky_event gst_pad_get_sticky_event; alias c_gst_pad_get_stream gst_pad_get_stream; alias c_gst_pad_get_stream_id gst_pad_get_stream_id; @@ -4581,7 +4873,9 @@ alias c_gst_pad_template_new gst_pad_template_new; alias c_gst_pad_template_new_from_static_pad_template_with_gtype gst_pad_template_new_from_static_pad_template_with_gtype; alias c_gst_pad_template_new_with_gtype gst_pad_template_new_with_gtype; alias c_gst_pad_template_get_caps gst_pad_template_get_caps; +alias c_gst_pad_template_get_documentation_caps gst_pad_template_get_documentation_caps; alias c_gst_pad_template_pad_created gst_pad_template_pad_created; +alias c_gst_pad_template_set_documentation_caps gst_pad_template_set_documentation_caps; // gstreamer.ParamArray @@ -4715,7 +5009,9 @@ alias c_gst_promise_new_with_change_func gst_promise_new_with_change_func; alias c_gst_promise_expire gst_promise_expire; alias c_gst_promise_get_reply gst_promise_get_reply; alias c_gst_promise_interrupt gst_promise_interrupt; +alias c_gst_promise_ref gst_promise_ref; alias c_gst_promise_reply gst_promise_reply; +alias c_gst_promise_unref gst_promise_unref; alias c_gst_promise_wait gst_promise_wait; // gstreamer.ProtectionMeta @@ -4758,6 +5054,7 @@ alias c_gst_query_add_allocation_param gst_query_add_allocation_param; alias c_gst_query_add_allocation_pool gst_query_add_allocation_pool; alias c_gst_query_add_buffering_range gst_query_add_buffering_range; alias c_gst_query_add_scheduling_mode gst_query_add_scheduling_mode; +alias c_gst_query_copy gst_query_copy; alias c_gst_query_find_allocation_meta gst_query_find_allocation_meta; alias c_gst_query_get_n_allocation_metas gst_query_get_n_allocation_metas; alias c_gst_query_get_n_allocation_params gst_query_get_n_allocation_params; @@ -4795,6 +5092,7 @@ alias c_gst_query_parse_segment gst_query_parse_segment; alias c_gst_query_parse_uri gst_query_parse_uri; alias c_gst_query_parse_uri_redirection gst_query_parse_uri_redirection; alias c_gst_query_parse_uri_redirection_permanent gst_query_parse_uri_redirection_permanent; +alias c_gst_query_ref gst_query_ref; alias c_gst_query_remove_nth_allocation_meta gst_query_remove_nth_allocation_meta; alias c_gst_query_remove_nth_allocation_param gst_query_remove_nth_allocation_param; alias c_gst_query_remove_nth_allocation_pool gst_query_remove_nth_allocation_pool; @@ -4819,7 +5117,10 @@ alias c_gst_query_set_segment gst_query_set_segment; alias c_gst_query_set_uri gst_query_set_uri; alias c_gst_query_set_uri_redirection gst_query_set_uri_redirection; alias c_gst_query_set_uri_redirection_permanent gst_query_set_uri_redirection_permanent; +alias c_gst_query_unref gst_query_unref; alias c_gst_query_writable_structure gst_query_writable_structure; +alias c_gst_query_replace gst_query_replace; +alias c_gst_query_take gst_query_take; alias c_gst_query_type_get_flags gst_query_type_get_flags; alias c_gst_query_type_get_name gst_query_type_get_name; alias c_gst_query_type_to_quark gst_query_type_to_quark; @@ -4855,16 +5156,19 @@ alias c_gst_registry_scan_path gst_registry_scan_path; alias c_gst_sample_get_type gst_sample_get_type; alias c_gst_sample_new gst_sample_new; +alias c_gst_sample_copy gst_sample_copy; alias c_gst_sample_get_buffer gst_sample_get_buffer; alias c_gst_sample_get_buffer_list gst_sample_get_buffer_list; alias c_gst_sample_get_caps gst_sample_get_caps; alias c_gst_sample_get_info gst_sample_get_info; alias c_gst_sample_get_segment gst_sample_get_segment; +alias c_gst_sample_ref gst_sample_ref; alias c_gst_sample_set_buffer gst_sample_set_buffer; alias c_gst_sample_set_buffer_list gst_sample_set_buffer_list; alias c_gst_sample_set_caps gst_sample_set_caps; alias c_gst_sample_set_info gst_sample_set_info; alias c_gst_sample_set_segment gst_sample_set_segment; +alias c_gst_sample_unref gst_sample_unref; // gstreamer.Segment @@ -4889,6 +5193,13 @@ alias c_gst_segment_to_running_time_full gst_segment_to_running_time_full; alias c_gst_segment_to_stream_time gst_segment_to_stream_time; alias c_gst_segment_to_stream_time_full gst_segment_to_stream_time_full; +// gstreamer.SharedTaskPool + +alias c_gst_shared_task_pool_get_type gst_shared_task_pool_get_type; +alias c_gst_shared_task_pool_new gst_shared_task_pool_new; +alias c_gst_shared_task_pool_get_max_threads gst_shared_task_pool_get_max_threads; +alias c_gst_shared_task_pool_set_max_threads gst_shared_task_pool_set_max_threads; + // gstreamer.StaticCaps alias c_gst_static_caps_cleanup gst_static_caps_cleanup; @@ -4925,6 +5236,7 @@ alias c_gst_stream_collection_get_upstream_id gst_stream_collection_get_upstream // gstreamer.Structure alias c_gst_structure_get_type gst_structure_get_type; +alias c_gst_structure_from_string gst_structure_from_string; alias c_gst_structure_new gst_structure_new; alias c_gst_structure_new_empty gst_structure_new_empty; alias c_gst_structure_new_from_string gst_structure_new_from_string; @@ -4986,6 +5298,7 @@ alias c_gst_structure_remove_all_fields gst_structure_remove_all_fields; alias c_gst_structure_remove_field gst_structure_remove_field; alias c_gst_structure_remove_fields gst_structure_remove_fields; alias c_gst_structure_remove_fields_valist gst_structure_remove_fields_valist; +alias c_gst_structure_serialize gst_structure_serialize; alias c_gst_structure_set gst_structure_set; alias c_gst_structure_set_array gst_structure_set_array; alias c_gst_structure_set_list gst_structure_set_list; @@ -4995,7 +5308,7 @@ alias c_gst_structure_set_valist gst_structure_set_valist; alias c_gst_structure_set_value gst_structure_set_value; alias c_gst_structure_take_value gst_structure_take_value; alias c_gst_structure_to_string gst_structure_to_string; -alias c_gst_structure_from_string gst_structure_from_string; +alias c_gst_structure_take gst_structure_take; // gstreamer.SystemClock @@ -5015,6 +5328,7 @@ alias c_gst_tag_list_add_valist gst_tag_list_add_valist; alias c_gst_tag_list_add_valist_values gst_tag_list_add_valist_values; alias c_gst_tag_list_add_value gst_tag_list_add_value; alias c_gst_tag_list_add_values gst_tag_list_add_values; +alias c_gst_tag_list_copy gst_tag_list_copy; alias c_gst_tag_list_foreach gst_tag_list_foreach; alias c_gst_tag_list_get_boolean gst_tag_list_get_boolean; alias c_gst_tag_list_get_boolean_index gst_tag_list_get_boolean_index; @@ -5050,10 +5364,14 @@ alias c_gst_tag_list_merge gst_tag_list_merge; alias c_gst_tag_list_n_tags gst_tag_list_n_tags; alias c_gst_tag_list_nth_tag_name gst_tag_list_nth_tag_name; alias c_gst_tag_list_peek_string_index gst_tag_list_peek_string_index; +alias c_gst_tag_list_ref gst_tag_list_ref; alias c_gst_tag_list_remove_tag gst_tag_list_remove_tag; alias c_gst_tag_list_set_scope gst_tag_list_set_scope; alias c_gst_tag_list_to_string gst_tag_list_to_string; +alias c_gst_tag_list_unref gst_tag_list_unref; alias c_gst_tag_list_copy_value gst_tag_list_copy_value; +alias c_gst_tag_list_replace gst_tag_list_replace; +alias c_gst_tag_list_take gst_tag_list_take; alias c_gst_tag_exists gst_tag_exists; alias c_gst_tag_get_description gst_tag_get_description; alias c_gst_tag_get_flag gst_tag_get_flag; @@ -5087,6 +5405,7 @@ alias c_gst_task_get_pool gst_task_get_pool; alias c_gst_task_get_state gst_task_get_state; alias c_gst_task_join gst_task_join; alias c_gst_task_pause gst_task_pause; +alias c_gst_task_resume gst_task_resume; alias c_gst_task_set_enter_callback gst_task_set_enter_callback; alias c_gst_task_set_leave_callback gst_task_set_leave_callback; alias c_gst_task_set_lock gst_task_set_lock; @@ -5100,6 +5419,7 @@ alias c_gst_task_stop gst_task_stop; alias c_gst_task_pool_get_type gst_task_pool_get_type; alias c_gst_task_pool_new gst_task_pool_new; alias c_gst_task_pool_cleanup gst_task_pool_cleanup; +alias c_gst_task_pool_dispose_handle gst_task_pool_dispose_handle; alias c_gst_task_pool_join gst_task_pool_join; alias c_gst_task_pool_prepare gst_task_pool_prepare; alias c_gst_task_pool_push gst_task_pool_push; @@ -5147,6 +5467,7 @@ alias c_gst_toc_setter_set_toc gst_toc_setter_set_toc; // gstreamer.Tracer alias c_gst_tracer_get_type gst_tracer_get_type; +alias c_gst_tracer_register gst_tracer_register; // gstreamer.TracerFactory @@ -5157,12 +5478,15 @@ alias c_gst_tracer_factory_get_tracer_type gst_tracer_factory_get_tracer_type; // gstreamer.TracerRecord alias c_gst_tracer_record_get_type gst_tracer_record_get_type; +alias c_gst_tracer_record_new gst_tracer_record_new; +alias c_gst_tracer_record_log gst_tracer_record_log; // gstreamer.TypeFind alias c_gst_type_find_get_length gst_type_find_get_length; alias c_gst_type_find_peek gst_type_find_peek; alias c_gst_type_find_suggest gst_type_find_suggest; +alias c_gst_type_find_suggest_empty_simple gst_type_find_suggest_empty_simple; alias c_gst_type_find_suggest_simple gst_type_find_suggest_simple; alias c_gst_type_find_register gst_type_find_register; alias c_gst_type_find_get_type gst_type_find_get_type; @@ -5190,6 +5514,7 @@ alias c_gst_uri_get_type gst_uri_get_type; alias c_gst_uri_new gst_uri_new; alias c_gst_uri_append_path gst_uri_append_path; alias c_gst_uri_append_path_segment gst_uri_append_path_segment; +alias c_gst_uri_copy gst_uri_copy; alias c_gst_uri_equal gst_uri_equal; alias c_gst_uri_from_string_with_base gst_uri_from_string_with_base; alias c_gst_uri_get_fragment gst_uri_get_fragment; @@ -5212,6 +5537,7 @@ alias c_gst_uri_make_writable gst_uri_make_writable; alias c_gst_uri_new_with_base gst_uri_new_with_base; alias c_gst_uri_normalize gst_uri_normalize; alias c_gst_uri_query_has_key gst_uri_query_has_key; +alias c_gst_uri_ref gst_uri_ref; alias c_gst_uri_remove_query_key gst_uri_remove_query_key; alias c_gst_uri_set_fragment gst_uri_set_fragment; alias c_gst_uri_set_host gst_uri_set_host; @@ -5225,8 +5551,10 @@ alias c_gst_uri_set_query_value gst_uri_set_query_value; alias c_gst_uri_set_scheme gst_uri_set_scheme; alias c_gst_uri_set_userinfo gst_uri_set_userinfo; alias c_gst_uri_to_string gst_uri_to_string; +alias c_gst_uri_unref gst_uri_unref; alias c_gst_uri_construct gst_uri_construct; alias c_gst_uri_from_string gst_uri_from_string; +alias c_gst_uri_from_string_escaped gst_uri_from_string_escaped; alias c_gst_uri_get_location gst_uri_get_location; alias c_gst_uri_get_protocol gst_uri_get_protocol; alias c_gst_uri_has_protocol gst_uri_has_protocol; @@ -5244,6 +5572,7 @@ alias c_gst_value_array_append_and_take_value gst_value_array_append_and_take_va alias c_gst_value_array_append_value gst_value_array_append_value; alias c_gst_value_array_get_size gst_value_array_get_size; alias c_gst_value_array_get_value gst_value_array_get_value; +alias c_gst_value_array_init gst_value_array_init; alias c_gst_value_array_prepend_value gst_value_array_prepend_value; // gstreamer.ValueList @@ -5254,6 +5583,7 @@ alias c_gst_value_list_append_value gst_value_list_append_value; alias c_gst_value_list_concat gst_value_list_concat; alias c_gst_value_list_get_size gst_value_list_get_size; alias c_gst_value_list_get_value gst_value_list_get_value; +alias c_gst_value_list_init gst_value_list_init; alias c_gst_value_list_merge gst_value_list_merge; alias c_gst_value_list_prepend_value gst_value_list_prepend_value; diff --git a/generated/gstreamer/gstreamer/c/types.d b/generated/gstreamer/gstreamer/c/types.d index 539c8f2d9..7c6b21e3b 100644 --- a/generated/gstreamer/gstreamer/c/types.d +++ b/generated/gstreamer/gstreamer/c/types.d @@ -43,6 +43,9 @@ public alias ulong GstClockTime; */ public alias long GstClockTimeDiff; +/** + * A type defining the type of an element factory. + */ public alias ulong GstElementFactoryListType; /** * Available details for pipeline graphs produced by GST_DEBUG_BIN_TO_DOT_FILE() @@ -102,25 +105,23 @@ alias GstAllocatorFlags AllocatorFlags; /** * GstBinFlags are a set of flags specific to bins. Most are set/used - * internally. They can be checked using the GST_OBJECT_FLAG_IS_SET () macro, - * and (un)set using GST_OBJECT_FLAG_SET () and GST_OBJECT_FLAG_UNSET (). + * internally. They can be checked using the GST_OBJECT_FLAG_IS_SET() macro, + * and (un)set using GST_OBJECT_FLAG_SET() and GST_OBJECT_FLAG_UNSET(). */ public enum GstBinFlags { /** - * don't resync a state change when elements are - * added or linked in the bin (Since 1.0.5) + * Don't resync a state change when elements are added or linked in the bin */ NO_RESYNC = 16384, /** - * Indicates whether the bin can handle elements - * that add/remove source pads at any point in time without - * first posting a no-more-pads signal (Since 1.10) + * Indicates whether the bin can handle elements that add/remove source pads + * at any point in time without first posting a no-more-pads signal. */ STREAMS_AWARE = 32768, /** - * the last enum in the series of flags for bins. - * Derived classes can use this as first value in a list of flags. + * The last enum in the series of flags for bins. Derived classes can use this + * as first value in a list of flags. */ LAST = 524288, } @@ -163,8 +164,7 @@ public enum GstBufferCopyFlags */ MERGE = 16, /** - * flag indicating that memory should always be - * copied instead of reffed (Since 1.2) + * flag indicating that memory should always be copied instead of reffed */ DEEP = 32, } @@ -204,8 +204,8 @@ public enum GstBufferFlags CORRUPTED = 256, /** * the buffer contains a media specific marker. for - * video this is typically the end of a frame boundary, for audio - * this is usually the start of a talkspurt. + * video this is the end of a frame boundary, for audio + * this is the start of a talkspurt. */ MARKER = 512, /** @@ -235,17 +235,17 @@ public enum GstBufferFlags */ TAG_MEMORY = 16384, /** - * Elements which write to disk or permanent - * storage should ensure the data is synced after - * writing the contents of this buffer. (Since 1.6) + * Elements which write to disk or permanent storage should ensure the data + * is synced after writing the contents of this buffer. */ SYNC_AFTER = 32768, /** * This buffer is important and should not be dropped. - * This can be used to mark important buffers, e.g. to flag - * RTP packets carrying keyframes or codec setup data for RTP - * Forward Error Correction purposes, or to prevent still video - * frames from being dropped by elements due to QoS. (Since 1.14) + * + * This can be used to mark important buffers, e.g. to flag RTP packets + * carrying keyframes or codec setup data for RTP Forward Error Correction + * purposes, or to prevent still video frames from being dropped by elements + * due to QoS. */ NON_DROPPABLE = 65536, /** @@ -363,23 +363,25 @@ alias GstCapsFlags CapsFlags; /** * Modes of caps intersection * - * @GST_CAPS_INTERSECT_ZIG_ZAG tries to preserve overall order of both caps + * %GST_CAPS_INTERSECT_ZIG_ZAG tries to preserve overall order of both caps * by iterating on the caps' structures as the following matrix shows: - * |[ + * + * ``` * caps1 * +------------- * | 1 2 4 7 * caps2 | 3 5 8 10 * | 6 9 11 12 - * ]| + * ``` + * * Used when there is no explicit precedence of one caps over the other. e.g. * tee's sink pad getcaps function, it will probe its src pad peers' for their * caps and intersect them with this mode. * - * @GST_CAPS_INTERSECT_FIRST is useful when an element wants to preserve + * %GST_CAPS_INTERSECT_FIRST is useful when an element wants to preserve * another element's caps priority order when intersecting with its own caps. - * Example: If caps1 is [A, B, C] and caps2 is [E, B, D, A], the result - * would be [A, B], maintaining the first caps priority on the intersection. + * Example: If caps1 is `[A, B, C]` and caps2 is `[E, B, D, A]`, the result + * would be `[A, B]`, maintaining the first caps priority on the intersection. */ public enum GstCapsIntersectMode { @@ -441,7 +443,6 @@ public enum GstClockFlags CAN_SET_MASTER = 512, /** * clock needs to be synced before it can be used - * (Since 1.6) */ NEEDS_STARTUP_SYNC = 1024, /** @@ -506,9 +507,14 @@ public enum GstClockType */ MONOTONIC = 1, /** - * some other time source is used (Since 1.0.5) + * some other time source is used (Since: 1.0.5) */ OTHER = 2, + /** + * time since Epoch, but using International Atomic Time + * as reference (Since: 1.18) + */ + TAI = 3, } alias GstClockType ClockType; @@ -838,7 +844,7 @@ public enum GstEventType */ SEGMENT = 17934, /** - * A new #GstStreamCollection is available (Since 1.10) + * A new #GstStreamCollection is available (Since: 1.10) */ STREAM_COLLECTION = 19230, /** @@ -859,7 +865,7 @@ public enum GstEventType /** * Indicates that there is no more data for * the stream group ID in the message. Sent before EOS - * in some instances and should be handled mostly the same. (Since 1.10) + * in some instances and should be handled mostly the same. (Since: 1.10) */ STREAM_GROUP_DONE = 26894, /** @@ -886,6 +892,11 @@ public enum GstEventType * Marks a gap in the datastream. */ GAP = 40966, + /** + * Notify downstream that a playback rate override + * should be applied as soon as possible. (Since: 1.18) + */ + INSTANT_RATE_CHANGE = 46090, /** * A quality message. Used to indicate to upstream elements * that the downstream elements should adjust their processing @@ -922,9 +933,15 @@ public enum GstEventType */ TOC_SELECT = 64001, /** - * A request to select one or more streams (Since 1.10) + * A request to select one or more streams (Since: 1.10) */ SELECT_STREAMS = 66561, + /** + * Sent by the pipeline to notify elements that handle the + * instant-rate-change event about the running-time when + * the rate multiplier should be applied (or was applied). (Since: 1.18) + */ + INSTANT_RATE_SYNC_TIME = 66817, /** * Upstream custom event */ @@ -1032,8 +1049,8 @@ public enum GstFlowReturn NOT_NEGOTIATED = -4, /** * Some (fatal) error occurred. Element generating - * this error should post an error message with more - * details. + * this error should post an error message using + * GST_ELEMENT_ERROR() with more details. */ ERROR = -5, /** @@ -1095,6 +1112,22 @@ public enum GstFormat } alias GstFormat Format; +/** + * The different flags that can be set on #GST_EVENT_GAP events. See + * gst_event_set_gap_flags() for details. + * + * Since: 1.20 + */ +public enum GstGapFlags +{ + /** + * The #GST_EVENT_GAP signals missing data, + * for example because of packet loss. + */ + DATA = 1, +} +alias GstGapFlags GapFlags; + /** * The result of a #GstIteratorItemFunction. */ @@ -1234,7 +1267,10 @@ public enum GstMemoryFlags READONLY = 2, /** * memory must not be shared. Copies will have to be - * made when this memory needs to be shared between buffers. + * made when this memory needs to be shared between buffers. (DEPRECATED: + * do not use in new code, instead you should create a custom GstAllocator for + * memory pooling instead of relying on the GstBuffer they were originally + * attached to.) */ NO_SHARE = 16, /** @@ -1246,11 +1282,13 @@ public enum GstMemoryFlags */ ZERO_PADDED = 64, /** - * the memory is physically contiguous. (Since 1.2) + * the memory is physically + * contiguous. (Since: 1.2) */ PHYSICALLY_CONTIGUOUS = 128, /** - * the memory can't be mapped via gst_memory_map() without any preconditions. (Since 1.2) + * the memory can't be mapped via + * gst_memory_map() without any preconditions. (Since: 1.2) */ NOT_MAPPABLE = 256, /** @@ -1279,7 +1317,9 @@ public enum GstMessageType : uint /** * an error occurred. When the application receives an error * message it should stop playback of the pipeline and not assume that more - * data will be played. + * data will be played. It is possible to specify a redirection url to the error + * messages by setting a `redirect-location` field into the error message, application + * or high level bins might use the information as required. */ ERROR = 2, /** @@ -1425,11 +1465,11 @@ public enum GstMessageType : uint */ STREAM_START = 268435456, /** - * Message indicating that an element wants a specific context (Since 1.2) + * Message indicating that an element wants a specific context (Since: 1.2) */ NEED_CONTEXT = 536870912, /** - * Message indicating that an element created a context (Since 1.2) + * Message indicating that an element created a context (Since: 1.2) */ HAVE_CONTEXT = 1073741824, /** @@ -1437,45 +1477,51 @@ public enum GstMessageType : uint * These extended message IDs can't be used directly with mask-based API * like gst_bus_poll() or gst_bus_timed_pop_filtered(), but you can still * filter for GST_MESSAGE_EXTENDED and then check the result for the - * specific type. (Since 1.4) + * specific type. (Since: 1.4) */ EXTENDED = 2147483648, /** * Message indicating a #GstDevice was added to - * a #GstDeviceProvider (Since 1.4) + * a #GstDeviceProvider (Since: 1.4) */ DEVICE_ADDED = 2147483649, /** * Message indicating a #GstDevice was removed - * from a #GstDeviceProvider (Since 1.4) + * from a #GstDeviceProvider (Since: 1.4) */ DEVICE_REMOVED = 2147483650, /** * Message indicating a #GObject property has - * changed (Since 1.10) + * changed (Since: 1.10) */ PROPERTY_NOTIFY = 2147483651, /** * Message indicating a new #GstStreamCollection - * is available (Since 1.10) + * is available (Since: 1.10) */ STREAM_COLLECTION = 2147483652, /** * Message indicating the active selection of - * #GstStreams has changed (Since 1.10) + * #GstStreams has changed (Since: 1.10) */ STREAMS_SELECTED = 2147483653, /** * Message indicating to request the application to * try to play the given URL(s). Useful if for example a HTTP 302/303 - * response is received with a non-HTTP URL inside. (Since 1.10) + * response is received with a non-HTTP URL inside. (Since: 1.10) */ REDIRECT = 2147483654, /** * Message indicating a #GstDevice was changed - * a #GstDeviceProvider (Since 1.16) + * a #GstDeviceProvider (Since: 1.16) + */ + DEVICE_CHANGED = 2147483655, + /** + * Message sent by elements to request the + * running time from the pipeline when an instant rate change should + * be applied (which may be in the past when the answer arrives). (Since: 1.18) */ - DEVICE_CHANGED = 2147483654, + INSTANT_RATE_REQUEST = 2147483656, /** * mask for all of the above messages. */ @@ -1529,7 +1575,7 @@ public enum GstMiniObjectFlags /** * the object is expected to stay alive * even after gst_deinit() has been called and so should be ignored by leak - * detection tools. (Since 1.10) + * detection tools. (Since: 1.10) */ MAY_BE_LEAKED = 4, /** @@ -1547,7 +1593,7 @@ public enum GstObjectFlags /** * the object is expected to stay alive even * after gst_deinit() has been called and so should be ignored by leak - * detection tools. (Since 1.10) + * detection tools. (Since: 1.10) */ MAY_BE_LEAKED = 1, /** @@ -1648,7 +1694,7 @@ public enum GstPadFlags * the default accept-caps handler will use * the template pad caps instead of query caps to * compare with the accept caps. Use this in combination - * with %GST_PAD_FLAG_ACCEPT_INTERSECT. (Since 1.6) + * with %GST_PAD_FLAG_ACCEPT_INTERSECT. (Since: 1.6) */ ACCEPT_TEMPLATE = 65536, /** @@ -1805,12 +1851,15 @@ public enum GstPadProbeReturn */ OK = 1, /** - * remove this probe. + * remove this probe, passing the data. For blocking probes + * this will cause data flow to unblock, unless there are also other + * blocking probes installed. */ REMOVE = 2, /** * pass the data item in the block probe and block on the - * next item. + * next item. Note, that if there are multiple pad probes installed and + * any probe returns PASS, the data will be passed. */ PASS = 3, /** @@ -2003,7 +2052,7 @@ public enum GstParseFlags /** * If more than one toplevel element is described * by the pipeline description string, put them in a #GstBin instead of a - * #GstPipeline. (Since 1.10) + * #GstPipeline. (Since: 1.10) */ PLACE_IN_BIN = 4, } @@ -2025,6 +2074,17 @@ public enum GstPipelineFlags } alias GstPipelineFlags PipelineFlags; +public enum GstPluginAPIFlags +{ + /** + * Ignore enum members when generating + * the plugins cache. This is useful if the members of the enum are generated + * dynamically, in order not to expose incorrect documentation to the end user. + */ + MEMBERS = 1, +} +alias GstPluginAPIFlags PluginAPIFlags; + /** * Flags used in connection with gst_plugin_add_dependency(). */ @@ -2052,7 +2112,7 @@ public enum GstPluginDependencyFlags /** * interpret * filename argument as filter prefix and check all matching files in - * the directory. Since 1.8. + * the directory. Since: 1.8. */ FILE_NAME_IS_PREFIX = 8, /** @@ -2397,7 +2457,7 @@ public enum GstResourceError /** * used when the resource can't be opened * due to missing authorization. - * (Since 1.2.4) + * (Since: 1.2.4) */ NOT_AUTHORIZED = 15, /** @@ -2465,6 +2525,16 @@ alias GstSearchMode SearchMode; * continue playback. With this seek method it is possible to perform seamless * looping or simple linear editing. * + * When only changing the playback rate and not the direction, the + * %GST_SEEK_FLAG_INSTANT_RATE_CHANGE flag can be used for a non-flushing seek + * to signal that the rate change should be applied immediately. This requires + * special support in the seek handlers (e.g. demuxers) and any elements + * synchronizing to the clock, and in general can't work in all cases (for example + * UDP streaming where the delivery rate is controlled by a remote server). The + * instant-rate-change mode supports changing the trickmode-related GST_SEEK_ flags, + * but can't be used in conjunction with other seek flags that affect the new + * playback position - as the playback position will not be changing. + * * When doing fast forward (rate > 1.0) or fast reverse (rate < -1.0) trickmode * playback, the %GST_SEEK_FLAG_TRICKMODE flag can be used to instruct decoders * and demuxers to adjust the playback rate by skipping frames. This can improve @@ -2517,7 +2587,7 @@ public enum GstSeekFlags /** * when doing fast forward or fast reverse playback, allow * elements to skip frames instead of generating all - * frames. (Since 1.6) + * frames. (Since: 1.6) */ TRICKMODE = 16, /** @@ -2548,15 +2618,30 @@ public enum GstSeekFlags * when doing fast forward or fast reverse * playback, request that elements only decode keyframes * and skip all other content, for formats that have - * keyframes. (Since 1.6) + * keyframes. (Since: 1.6) */ TRICKMODE_KEY_UNITS = 128, /** * when doing fast forward or fast reverse * playback, request that audio decoder elements skip - * decoding and output only gap events or silence. (Since 1.6) + * decoding and output only gap events or silence. (Since: 1.6) */ TRICKMODE_NO_AUDIO = 256, + /** + * When doing fast forward or fast reverse + * playback, request that elements only decode keyframes and + * forward predicted frames and skip all other content (for example + * B-Frames), for formats that have keyframes and forward predicted + * frames. (Since: 1.18) + */ + TRICKMODE_FORWARD_PREDICTED = 512, + /** + * Signals that a rate change should be + * applied immediately. Only valid if start/stop position + * are GST_CLOCK_TIME_NONE, the playback direction does not change + * and the seek is not flushing. (Since: 1.18) + */ + INSTANT_RATE_CHANGE = 1024, } alias GstSeekFlags SeekFlags; @@ -2597,7 +2682,7 @@ public enum GstSegmentFlags */ RESET = 1, /** - * perform skip playback (Since 1.6) + * perform skip playback (Since: 1.6) */ TRICKMODE = 16, /** @@ -2611,22 +2696,48 @@ public enum GstSegmentFlags SEGMENT = 8, /** * Decode only keyframes, where - * possible (Since 1.6) + * possible (Since: 1.6) */ TRICKMODE_KEY_UNITS = 128, + /** + * Decode only keyframes or forward + * predicted frames, where possible (Since: 1.18) + */ + TRICKMODE_FORWARD_PREDICTED = 512, /** * Do not decode any audio, where - * possible (Since 1.6) + * possible (Since: 1.6) */ TRICKMODE_NO_AUDIO = 256, } alias GstSegmentFlags SegmentFlags; +public enum GstSerializeFlags +{ + /** + * No special flags specified. + */ + NONE = 0, + /** + * Serialize using the old format for + * nested structures. + */ + BACKWARD_COMPAT = 1, +} +alias GstSerializeFlags SerializeFlags; + public enum GstStackTraceFlags { /** - * Try to retrieve as much information as - * possible when getting the stack trace + * Try to retrieve the minimum information + * available, which may be none on some platforms + * (Since: 1.18) + */ + NONE = 0, + /** + * Try to retrieve as much information as possible, + * including source information when getting the + * stack trace */ FULL = 1, } @@ -2744,23 +2855,23 @@ public enum GstStateChange */ READY_TO_NULL = 17, /** - * state change from NULL to NULL. (Since 1.14) + * state change from NULL to NULL. (Since: 1.14) */ NULL_TO_NULL = 9, /** * state change from READY to READY, * This might happen when going to PAUSED asynchronously failed, in that case - * elements should make sure they are in a proper, coherent READY state. (Since 1.14) + * elements should make sure they are in a proper, coherent READY state. (Since: 1.14) */ READY_TO_READY = 18, /** * state change from PAUSED to PAUSED. * This might happen when elements were in PLAYING state and 'lost state', - * they should make sure to go back to real 'PAUSED' state (prerolling for example). (Since 1.14) + * they should make sure to go back to real 'PAUSED' state (prerolling for example). (Since: 1.14) */ PAUSED_TO_PAUSED = 27, /** - * state change from PLAYING to PLAYING. (Since 1.14) + * state change from PLAYING to PLAYING. (Since: 1.14) */ PLAYING_TO_PLAYING = 36, } @@ -3022,64 +3133,14 @@ alias GstTagFlag TagFlag; * In the table below this is shown for the cases that a tag exists in the list * (A) or does not exists (!A) and combinations thereof. * - * - * merge mode - * - * - * - * merge mode - * A + B - * A + !B - * !A + B - * !A + !B - * - * - * - * - * REPLACE_ALL - * B - * - - * B - * - - * - * - * REPLACE - * B - * A - * B - * - - * - * - * APPEND - * A, B - * A - * B - * - - * - * - * PREPEND - * B, A - * A - * B - * - - * - * - * KEEP - * A - * A - * B - * - - * - * - * KEEP_ALL - * A - * A - * - - * - - * - * - * - *
+ * | merge mode | A + B | A + !B | !A + B | !A + !B | + * | ----------- | ----- | ------ | ------ | ------- | + * | REPLACE_ALL | B | ø | B | ø | + * | REPLACE | B | A | B | ø | + * | APPEND | A, B | A | B | ø | + * | PREPEND | B, A | A | B | ø | + * | KEEP | A | A | B | ø | + * | KEEP_ALL | A | A | ø | ø | */ public enum GstTagMergeMode { @@ -3422,12 +3483,12 @@ struct GstAllocator GstMemoryIsSpanFunction memIsSpan; /** * the implementation of the GstMemoryMapFullFunction. - * Will be used instead of @mem_map if present. (Since 1.6) + * Will be used instead of @mem_map if present. (Since: 1.6) */ GstMemoryMapFullFunction memMapFull; /** * the implementation of the GstMemoryUnmapFullFunction. - * Will be used instead of @mem_unmap if present. (Since 1.6) + * Will be used instead of @mem_unmap if present. (Since: 1.6) */ GstMemoryUnmapFullFunction memUnmapFull; void*[2] GstReserved; @@ -3509,18 +3570,17 @@ struct GstBin } /** - * Subclasses can override the @add_element and @remove_element to - * update the list of children in the bin. + * Subclasses can override #GstBinClass::add_element and #GstBinClass::remove_element + * to update the list of children in the bin. * - * The @handle_message method can be overridden to implement custom - * message handling. @handle_message takes ownership of the message, just like - * #gst_element_post_message. + * The #GstBinClass::handle_message method can be overridden to implement custom + * message handling. * - * The @deep_element_added vfunc will be called when a new element has been + * #GstBinClass::deep_element_added will be called when a new element has been * added to any bin inside this bin, so it will also be called if a new child * was added to a sub-bin of this bin. #GstBin implementations that override * this message should chain up to the parent class implementation so the - * element-added-deep signal is emitted on all parents. + * #GstBin::deep-element-added signal is emitted on all parents. */ struct GstBinClass { @@ -3533,9 +3593,21 @@ struct GstBinClass extern(C) void function(GstBin* bin, GstElement* child) elementAdded; /** */ extern(C) void function(GstBin* bin, GstElement* child) elementRemoved; - /** */ + /** + * + * Params: + * bin = the #GstBin + * element = the element to be added + * Returns: %TRUE if the @element was added + */ extern(C) int function(GstBin* bin, GstElement* element) addElement; - /** */ + /** + * + * Params: + * bin = the #GstBin + * element = the element to be removed + * Returns: %TRUE if the @element was removed + */ extern(C) int function(GstBin* bin, GstElement* element) removeElement; /** */ extern(C) void function(GstBin* bin, GstMessage* message) handleMessage; @@ -3598,7 +3670,13 @@ struct GstBufferList; struct GstBufferPool { + /** + * the parent structure + */ GstObject object; + /** + * whether the pool is currently gathering back outstanding buffers + */ int flushing; GstBufferPoolPrivate* priv; void*[4] GstReserved; @@ -3634,7 +3712,7 @@ struct GstBufferPoolAcquireParams } /** - * The GstBufferPool class. + * The #GstBufferPool class. */ struct GstBufferPoolClass { @@ -3658,9 +3736,19 @@ struct GstBufferPoolClass * Returns: %TRUE when the configuration could be set. */ extern(C) int function(GstBufferPool* pool, GstStructure* config) setConfig; - /** */ + /** + * + * Params: + * pool = the #GstBufferPool + * Returns: whether the pool could be started. + */ extern(C) int function(GstBufferPool* pool) start; - /** */ + /** + * + * Params: + * pool = the #GstBufferPool + * Returns: whether the pool could be stopped. + */ extern(C) int function(GstBufferPool* pool) stop; /** * @@ -3672,7 +3760,15 @@ struct GstBufferPoolClass * inactive. */ extern(C) GstFlowReturn function(GstBufferPool* pool, GstBuffer** buffer, GstBufferPoolAcquireParams* params) acquireBuffer; - /** */ + /** + * + * Params: + * pool = the #GstBufferPool + * buffer = a location for a #GstBuffer + * params = parameters. + * Returns: a #GstFlowReturn to indicate whether the allocation was + * successful. + */ extern(C) GstFlowReturn function(GstBufferPool* pool, GstBuffer** buffer, GstBufferPoolAcquireParams* params) allocBuffer; /** */ extern(C) void function(GstBufferPool* pool, GstBuffer* buffer) resetBuffer; @@ -3691,13 +3787,22 @@ struct GstBufferPoolPrivate; struct GstBus { + /** + * the parent structure + */ GstObject object; GstBusPrivate* priv; void*[4] GstReserved; } +/** + * GStreamer bus class. + */ struct GstBusClass { + /** + * the parent class structure + */ GstObjectClass parentClass; /** */ extern(C) void function(GstBus* bus, GstMessage* message) message; @@ -3735,9 +3840,7 @@ struct GstChildProxyInterface * parent = the parent object to get the child from * name = the child's name * Returns: the child object or %NULL if - * not found. Unref after usage. - * - * MT safe. + * not found. */ extern(C) GObject* function(GstChildProxy* parent, const(char)* name) getChildByName; /** @@ -3746,9 +3849,7 @@ struct GstChildProxyInterface * parent = the parent object to get the child from * index = the child's position in the child list * Returns: the child object or %NULL if - * not found (index too high). Unref after usage. - * - * MT safe. + * not found (index too high). */ extern(C) GObject* function(GstChildProxy* parent, uint index) getChildByIndex; /** @@ -3756,8 +3857,6 @@ struct GstChildProxyInterface * Params: * parent = the parent object * Returns: the number of child objects - * - * MT safe. */ extern(C) uint function(GstChildProxy* parent) getChildrenCount; /** */ @@ -3769,6 +3868,9 @@ struct GstChildProxyInterface struct GstClock { + /** + * the parent structure + */ GstObject object; GstClockPrivate* priv; void*[4] GstReserved; @@ -3784,30 +3886,49 @@ struct GstClockClass * the parent class structure */ GstObjectClass parentClass; - /** */ + /** + * + * Params: + * clock = the #GstClock + * oldResolution = the previous resolution + * newResolution = the new resolution + * Returns: the new resolution + */ extern(C) GstClockTime function(GstClock* clock, GstClockTime oldResolution, GstClockTime newResolution) changeResolution; /** * * Params: * clock = a #GstClock * Returns: the resolution of the clock in units of #GstClockTime. - * - * MT safe. */ extern(C) GstClockTime function(GstClock* clock) getResolution; /** * * Params: * clock = a #GstClock to query - * Returns: the internal time of the clock. Or GST_CLOCK_TIME_NONE when + * Returns: the internal time of the clock. Or %GST_CLOCK_TIME_NONE when * given invalid input. - * - * MT safe. */ extern(C) GstClockTime function(GstClock* clock) getInternalTime; - /** */ + /** + * + * Params: + * clock = the #GstClock + * entry = the entry to wait on + * jitter = a pointer that will contain the jitter + * Returns: the result of the blocking wait. #GST_CLOCK_EARLY will be returned + * if the current clock time is past the time of @id, #GST_CLOCK_OK if + * @id was scheduled in time. #GST_CLOCK_UNSCHEDULED if @id was + * unscheduled with gst_clock_id_unschedule(). + */ extern(C) GstClockReturn function(GstClock* clock, GstClockEntry* entry, GstClockTimeDiff* jitter) wait; - /** */ + /** + * + * Params: + * clock = the #GstClock + * entry = the entry to wait on + * Returns: the result of the non blocking wait. + */ extern(C) GstClockReturn function(GstClock* clock, GstClockEntry* entry) waitAsync; /** */ extern(C) void function(GstClock* clock, GstClockEntry* entry) unschedule; @@ -3845,6 +3966,9 @@ struct GstContext; struct GstControlBinding { + /** + * the parent structure + */ GstObject parent; /** * name of the property of this binding @@ -3926,6 +4050,9 @@ struct GstControlBindingPrivate; struct GstControlSource { + /** + * the parent structure + */ GstObject parent; /** * Function for returning a value for a given timestamp @@ -3950,6 +4077,11 @@ struct GstControlSourceClass void*[4] GstReserved; } +struct GstCustomMeta +{ + GstMeta meta; +} + struct GstDateTime; struct GstDebugCategory @@ -4552,10 +4684,6 @@ struct GstMeta GstMetaInfo* info; } -/** - * The #GstMetaInfo provides information about a specific metadata - * structure. - */ struct GstMetaInfo { /** @@ -4811,6 +4939,7 @@ struct GstPadTemplate struct Abi { GType gtype; + GstCaps* documentationCaps; } Abi abi; } @@ -5160,10 +5289,10 @@ struct GstQuery * captured. * * The reference is stored as a #GstCaps in @reference. Examples of valid - * references would be "timestamp/x-drivername-stream" for timestamps that are locally - * generated by some driver named "drivername" when generating the stream, - * e.g. based on a frame counter, or "timestamp/x-ntp, host=pool.ntp.org, - * port=123" for timestamps based on a specific NTP server. + * references would be `timestamp/x-drivername-stream` for timestamps that are locally + * generated by some driver named `drivername` when generating the stream, + * e.g. based on a frame counter, or `timestamp/x-ntp, host=pool.ntp.org, + * port=123` for timestamps based on a specific NTP server. * * Since: 1.14 */ @@ -5209,50 +5338,115 @@ struct GstSegment */ GstSegmentFlags flags; /** - * the playback rate of the segment + * the playback rate of the segment is set in response to a seek + * event and, without any seek, the value should be `1.0`. This + * value is used by elements that synchronize buffer [running + * times](additional/design/synchronisation.md#running-time) on + * the clock (usually the sink elements), leading to consuming + * buffers faster (for a value `> 1.0`) or slower (for `0.0 < + * value < 1.0`) than normal playback speed. The rate also + * defines the playback direction, meaning that when the value is + * lower than `0.0`, the playback happens in reverse, and the + * [stream-time](additional/design/synchronisation.md#stream-time) + * is going backward. The `rate` value should never be `0.0`. */ double rate; /** - * the already applied rate to the segment + * The applied rate is the rate that has been applied to the stream. + * The effective/resulting playback rate of a stream is + * `rate * applied_rate`. + * The applied rate can be set by source elements when a server is + * sending the stream with an already modified playback speed + * rate. Filter elements that modify the stream in a way that + * modifies the playback speed should also modify the applied + * rate. For example the #videorate element when its + * #videorate:rate property is set will set the applied rate of + * the segment it pushed downstream. Also #scaletempo applies the + * input segment rate to the stream and outputs a segment with + * rate=1.0 and applied_rate=. */ double appliedRate; /** - * the format of the segment values + * the unit used for all of the segment's values. */ GstFormat format; /** - * the running time (plus elapsed time, see offset) of the segment start + * the running time (plus elapsed time, see offset) of the + * segment [start](GstSegment.start) ([stop](GstSegment.stop) if + * rate < 0.0). */ ulong base; /** - * the amount (in buffer timestamps) that has already been elapsed in - * the segment + * the offset expresses the elapsed time (in buffer timestamps) + * before a seek with its start (stop if rate < 0.0) seek type + * set to #GST_SEEK_TYPE_NONE, the value is set to the position + * of the segment at the time of the seek. */ ulong offset; /** - * the start of the segment in buffer timestamp time (PTS) + * the start time of the segment (in buffer timestamps) + * [(PTS)](GstBuffer.pts), that is the timestamp of the first + * buffer to output inside the segment (last one during + * reverse playback). For example decoders will + * [clip](gst_segment_clip) out the buffers before the start + * time. */ ulong start; /** - * the stop of the segment in buffer timestamp time (PTS) + * the stop time of the segment (in buffer timestamps) + * [(PTS)](GstBuffer.pts), that is the timestamp of the last + * buffer to output inside the segment (first one during + * reverse playback). For example decoders will + * [clip](gst_segment_clip) out buffers after the stop time. */ ulong stop; /** - * the stream time of the segment start + * the stream time of the segment [start](GstSegment.start) + * ([stop](GstSegment.stop) if rate < 0.0). */ ulong time; /** - * the buffer timestamp position in the segment (used internally by - * elements such as sources, demuxers or parsers to track progress) + * the buffer timestamp position in the segment is supposed to be + * updated by elements such as sources, demuxers or parsers to + * track progress by setting it to the last pushed buffer' end time + * ([timestamp](GstBuffer.pts) + #GstBuffer.duration) for that + * specific segment. The position is used when reconfiguring the + * segment with #gst_segment_do_seek when the seek is only + * updating the segment (see [offset](GstSegment.offset)). */ ulong position; /** - * the duration of the stream + * the duration of the segment is the maximum absolute difference + * between #GstSegment.start and #GstSegment.stop if stop is not + * set, otherwise it should be the difference between those + * two values. This should be set by elements that know the + * overall stream duration (like demuxers) and will be used when + * seeking with #GST_SEEK_TYPE_END. */ ulong duration; void*[4] GstReserved; } +struct GstSharedTaskPool +{ + GstTaskPool parent; + GstSharedTaskPoolPrivate* priv; + void*[4] GstReserved; +} + +/** + * The #GstSharedTaskPoolClass object. + * + * Since: 1.20 + */ +struct GstSharedTaskPoolClass +{ + GstTaskPoolClass parentClass; + void*[4] GstReserved; +} + +struct GstSharedTaskPoolPrivate; + struct GstStaticCaps { /** @@ -5451,20 +5645,24 @@ struct GstTaskPoolClass * userData = data to pass to @func * Returns: a pointer that should be used * for the gst_task_pool_join function. This pointer can be %NULL, you - * must check @error to detect errors. + * must check @error to detect errors. If the pointer is not %NULL and + * gst_task_pool_join() is not used, call gst_task_pool_dispose_handle() + * instead. * * Throws: GException on failure. */ extern(C) void* function(GstTaskPool* pool, GstTaskPoolFunction func, void* userData, GError** err) push; /** */ extern(C) void function(GstTaskPool* pool, void* id) join; - void*[4] GstReserved; + /** */ + extern(C) void function(GstTaskPool* pool, void* id) disposeHandle; + void*[3] GstReserved; } struct GstTaskPrivate; /** - * Structure for saving a timestamp and a value. + * Structure for storing a timestamp and a value. */ struct GstTimedValue { @@ -5601,7 +5799,11 @@ struct GstValueTable * a #GstValueDeserializeFunc */ GstValueDeserializeFunc deserialize; - void*[4] GstReserved; + /** + * a #GstValueDeserializeWithPSpecFunc + */ + GstValueDeserializeWithPSpecFunc deserializeWithPspec; + void*[3] GstReserved; } /** @@ -5637,7 +5839,7 @@ public alias extern(C) int function(GstBuffer* buffer, GstMeta** meta, void* use * removing or modifying. * * Params: - * buffer = pointer the buffer + * buffer = pointer to the buffer * idx = the index of @buffer * userData = user data passed to gst_buffer_list_foreach() * @@ -5653,8 +5855,8 @@ public alias extern(C) int function(GstBuffer** buffer, uint idx, void* userData * The message passed to the function will be unreffed after execution of this * function so it should not be freed in the function. * - * Note that this function is used as a GSourceFunc which means that returning - * %FALSE will remove the GSource from the mainloop. + * Note that this function is used as a #GSourceFunc which means that returning + * %FALSE will remove the #GSource from the mainloop. * * Params: * bus = the #GstBus that sent the message @@ -5670,7 +5872,7 @@ public alias extern(C) int function(GstBus* bus, GstMessage* message, void* user * into the bus. This function is mostly used internally. Only one sync handler * can be attached to a given bus. * - * If the handler returns GST_BUS_DROP, it should unref the message, else the + * If the handler returns %GST_BUS_DROP, it should unref the message, else the * message should not be unreffed by the sync handler. * * Params: @@ -5740,7 +5942,9 @@ public alias extern(C) int function(GstCapsFeatures* features, GstStructure* str */ public alias extern(C) int function(GstClock* clock, GstClockTime time, GstClockID id, void* userData) GstClockCallback; -/** */ +/** + * FIXME(2.0): remove, this is unused + */ public alias extern(C) void function(GstControlBinding* binding, double srcValue, GValue* destValue) GstControlBindingConvert; /** @@ -5756,7 +5960,7 @@ public alias extern(C) void function(GstControlBinding* binding, double srcValue public alias extern(C) int function(GstControlSource* self, GstClockTime timestamp, double* value) GstControlSourceGetValue; /** - * Function for returning an array of values for starting at a given timestamp. + * Function for returning an array of values starting at a given timestamp. * * Params: * self = the #GstControlSource instance @@ -5769,10 +5973,43 @@ public alias extern(C) int function(GstControlSource* self, GstClockTime timesta */ public alias extern(C) int function(GstControlSource* self, GstClockTime timestamp, GstClockTime interval, uint nValues, double* values) GstControlSourceGetValueArray; -/** */ +/** + * Function called for each @meta in @buffer as a result of performing a + * transformation on @transbuf. Additional @type specific transform data + * is passed to the function as @data. + * + * Implementations should check the @type of the transform and parse + * additional type specific fields in @data that should be used to update + * the metadata on @transbuf. + * + * Params: + * transbuf = a #GstBuffer + * meta = a #GstCustomMeta + * buffer = a #GstBuffer + * type = the transform type + * data = transform specific data. + * userData = user data passed when registering the meta + * + * Returns: %TRUE if the transform could be performed + * + * Since: 1.20 + */ +public alias extern(C) int function(GstBuffer* transbuf, GstCustomMeta* meta, GstBuffer* buffer, GQuark type, void* data, void* userData) GstCustomMetaTransformFunction; + +/** + * we define this to avoid a compiler warning regarding a cast from a function + * pointer to a void pointer + * (see https://bugzilla.gnome.org/show_bug.cgi?id=309253) + */ public alias extern(C) void function() GstDebugFuncPtr; -/** */ +/** + * Callback prototype used in #gst_element_call_async + * + * Params: + * element = The #GstElement this function has been called against + * userData = Data passed in the function where that callback has been passed + */ public alias extern(C) void function(GstElement* element, void* userData) GstElementCallAsyncFunc; /** @@ -5970,7 +6207,7 @@ public alias extern(C) void* function(GstMemory* mem, size_t maxsize, GstMapFlag public alias extern(C) GstMemory* function(GstMemory* mem, ptrdiff_t offset, ptrdiff_t size) GstMemoryShareFunction; /** - * Return the pointer previously retrieved with gst_memory_map() with @info. + * Release the pointer previously retrieved with gst_memory_map() with @info. * * Params: * mem = a #GstMemory @@ -5979,7 +6216,7 @@ public alias extern(C) GstMemory* function(GstMemory* mem, ptrdiff_t offset, ptr public alias extern(C) void function(GstMemory* mem, GstMapInfo* info) GstMemoryUnmapFullFunction; /** - * Return the pointer previously retrieved with gst_memory_map(). + * Release the pointer previously retrieved with gst_memory_map(). * * Params: * mem = a #GstMemory @@ -6508,6 +6745,20 @@ public alias extern(C) int function(GValue* value1, GValue* value2) GstValueComp */ public alias extern(C) int function(GValue* dest, const(char)* s) GstValueDeserializeFunc; +/** + * Used by gst_value_deserialize_with_pspec() to parse a non-binary form into the #GValue. + * + * Params: + * dest = a #GValue + * s = a string + * pspec = a #GParamSpec describing the expected value + * + * Returns: %TRUE for success + * + * Since: 1.20 + */ +public alias extern(C) int function(GValue* dest, const(char)* s, GParamSpec* pspec) GstValueDeserializeWithPSpecFunc; + /** * Used by gst_value_serialize() to obtain a non-binary form of the #GValue. * @@ -6671,6 +6922,9 @@ alias GST_ELEMENT_FACTORY_TYPE_ENCRYPTOR = ELEMENT_FACTORY_TYPE_ENCRYPTOR; enum ELEMENT_FACTORY_TYPE_FORMATTER = 512UL; alias GST_ELEMENT_FACTORY_TYPE_FORMATTER = ELEMENT_FACTORY_TYPE_FORMATTER; +enum ELEMENT_FACTORY_TYPE_HARDWARE = 4096UL; +alias GST_ELEMENT_FACTORY_TYPE_HARDWARE = ELEMENT_FACTORY_TYPE_HARDWARE; + enum ELEMENT_FACTORY_TYPE_MAX_ELEMENTS = 281474976710656UL; alias GST_ELEMENT_FACTORY_TYPE_MAX_ELEMENTS = ELEMENT_FACTORY_TYPE_MAX_ELEMENTS; @@ -6803,7 +7057,7 @@ alias GST_FORMAT_PERCENT_SCALE = FORMAT_PERCENT_SCALE; /** * Can be used together with #GST_FOURCC_ARGS to properly output a - * #guint32 fourcc value in a printf()-style text message. + * #guint32 fourcc value in a printf\()-style text message. * * |[ * printf ("fourcc: %" GST_FOURCC_FORMAT "\n", GST_FOURCC_ARGS (fcc)); @@ -6857,6 +7111,15 @@ alias GST_MSECOND = MSECOND; enum NSECOND = 1UL; alias GST_NSECOND = NSECOND; +/** + * Use this flag on GObject properties of GstObject to indicate that + * they might not be available depending on environment such as OS, device, etc, + * so such properties will be installed conditionally only if the GstObject is + * able to support it. + */ +enum PARAM_CONDITIONALLY_AVAILABLE = 16384; +alias GST_PARAM_CONDITIONALLY_AVAILABLE = PARAM_CONDITIONALLY_AVAILABLE; + /** * Use this flag on GObject properties to signal they can make sense to be. * controlled over time. This hint is used by the GstController. @@ -6864,6 +7127,14 @@ alias GST_NSECOND = NSECOND; enum PARAM_CONTROLLABLE = 512; alias GST_PARAM_CONTROLLABLE = PARAM_CONTROLLABLE; +/** + * Use this flag on GObject properties of GstObject to indicate that + * during `gst-inspect` and friends, the default value should be used + * as default instead of the current value. + */ +enum PARAM_DOC_SHOW_DEFAULT = 8192; +alias GST_PARAM_DOC_SHOW_DEFAULT = PARAM_DOC_SHOW_DEFAULT; + /** * Use this flag on GObject properties of GstElements to indicate that * they can be changed when the element is in the PAUSED or lower state. @@ -6955,6 +7226,9 @@ alias GST_SECOND = SECOND; enum SEGMENT_FORMAT = "paB"; alias GST_SEGMENT_FORMAT = SEGMENT_FORMAT; +enum SEGMENT_INSTANT_FLAGS = 912; +alias GST_SEGMENT_INSTANT_FLAGS = SEGMENT_INSTANT_FLAGS; + /** * A value which is guaranteed to never be returned by * gst_util_seqnum_next(). @@ -6964,15 +7238,26 @@ alias GST_SEGMENT_FORMAT = SEGMENT_FORMAT; enum SEQNUM_INVALID = 0; alias GST_SEQNUM_INVALID = SEQNUM_INVALID; +/** + * printf format type used to debug GStreamer signed time value pointers. You + * can use this in combination with GStreamer's debug logging system as well as + * the functions gst_info_vasprintf(), gst_info_strdup_vprintf() and + * gst_info_strdup_printf() to pretty-print signed time (pointers to + * #GstClockTimeDiff or #gint64). + */ +enum STIMEP_FORMAT = "paS"; +alias GST_STIMEP_FORMAT = STIMEP_FORMAT; + /** * A string that can be used in printf-like format strings to display a signed - * #GstClockTimeDiff or #gint64 value in h:m:s format. Use GST_TIME_ARGS() to + * #GstClockTimeDiff or #gint64 value in `h:m:s` format. Use GST_TIME_ARGS() to * construct the matching arguments. * * Example: - * |[ + * + * ``` C * printf("%" GST_STIME_FORMAT "\n", GST_STIME_ARGS(ts)); - * ]| + * ``` */ enum STIME_FORMAT = "c%"; alias GST_STIME_FORMAT = STIME_FORMAT; @@ -7323,7 +7608,7 @@ alias GST_TAG_HOMEPAGE = TAG_HOMEPAGE; /** * image (sample) (sample taglist should specify the content type and preferably - * also set "image-type" field as #GstTagImageType) + * also set "image-type" field as `GstTagImageType`) */ enum TAG_IMAGE = "image"; alias GST_TAG_IMAGE = TAG_IMAGE; @@ -7375,7 +7660,7 @@ alias GST_TAG_KEYWORDS = TAG_KEYWORDS; * ISO-639-2 or ISO-639-1 code for the language the content is in (string) * * There is utility API in libgsttag in gst-plugins-base to obtain a translated - * language name from the language code: gst_tag_get_language_name() + * language name from the language code: `gst_tag_get_language_name()` */ enum TAG_LANGUAGE_CODE = "language-code"; alias GST_TAG_LANGUAGE_CODE = TAG_LANGUAGE_CODE; @@ -7422,7 +7707,7 @@ enum TAG_MAXIMUM_BITRATE = "maximum-bitrate"; alias GST_TAG_MAXIMUM_BITRATE = TAG_MAXIMUM_BITRATE; /** - * Midi note number + * [Midi note number](http://en.wikipedia.org/wiki/Note#Note_designation_in_accordance_with_octave_name) * of the audio track. This is useful for sample instruments and in particular * for multi-samples. */ @@ -7584,15 +7869,26 @@ alias GST_TAG_VERSION = TAG_VERSION; enum TAG_VIDEO_CODEC = "video-codec"; alias GST_TAG_VIDEO_CODEC = TAG_VIDEO_CODEC; +/** + * printf format type used to debug GStreamer ClockTime pointers. You can use + * this in combination with GStreamer's debug logging system as well as the + * functions gst_info_vasprintf(), gst_info_strdup_vprintf() and + * gst_info_strdup_printf() to pretty-print #GstClockTime pointers. This can + * only be used on pointers to GstClockTime values. + */ +enum TIMEP_FORMAT = "paT"; +alias GST_TIMEP_FORMAT = TIMEP_FORMAT; + /** * A string that can be used in printf-like format strings to display a - * #GstClockTime value in h:m:s format. Use GST_TIME_ARGS() to construct + * #GstClockTime value in `h:m:s` format. Use GST_TIME_ARGS() to construct * the matching arguments. * * Example: - * |[ + * + * ``` C * printf("%" GST_TIME_FORMAT "\n", GST_TIME_ARGS(ts)); - * ]| + * ``` */ enum TIME_FORMAT = "u:%02u:%02u.%09u"; alias GST_TIME_FORMAT = TIME_FORMAT; @@ -7653,13 +7949,13 @@ alias GST_VERSION_MAJOR = VERSION_MAJOR; /** * The micro version of GStreamer at compile time: */ -enum VERSION_MICRO = 0; +enum VERSION_MICRO = 1; alias GST_VERSION_MICRO = VERSION_MICRO; /** * The minor version of GStreamer at compile time: */ -enum VERSION_MINOR = 16; +enum VERSION_MINOR = 20; alias GST_VERSION_MINOR = VERSION_MINOR; /** diff --git a/generated/gtkd/atk/ActionIF.d b/generated/gtkd/atk/ActionIF.d index 10b137110..432b78eca 100644 --- a/generated/gtkd/atk/ActionIF.d +++ b/generated/gtkd/atk/ActionIF.d @@ -27,6 +27,7 @@ module atk.ActionIF; private import atk.c.functions; public import atk.c.types; private import glib.Str; +private import glib.c.functions; public import gtkc.atktypes; diff --git a/generated/gtkd/atk/ActionT.d b/generated/gtkd/atk/ActionT.d index 351a1d6ec..8f7ebb20d 100644 --- a/generated/gtkd/atk/ActionT.d +++ b/generated/gtkd/atk/ActionT.d @@ -27,6 +27,7 @@ module atk.ActionT; public import atk.c.functions; public import atk.c.types; public import glib.Str; +public import glib.c.functions; public import gtkc.atktypes; diff --git a/generated/gtkd/atk/ComponentIF.d b/generated/gtkd/atk/ComponentIF.d index 040aa59e6..ddd1e1bfe 100644 --- a/generated/gtkd/atk/ComponentIF.d +++ b/generated/gtkd/atk/ComponentIF.d @@ -108,6 +108,9 @@ public interface ComponentIF{ /** * Gets the rectangle which gives the extent of the @component. * + * If the extent can not be obtained (e.g. a non-embedded plug or missing + * support), all of x, y, width, height are set to -1. + * * Params: * x = address of #gint to put x coordinate * y = address of #gint to put y coordinate @@ -139,6 +142,9 @@ public interface ComponentIF{ * Gets the position of @component in the form of * a point specifying @component's top-left corner. * + * If the position can not be obtained (e.g. a non-embedded plug or missing + * support), x and y are set to -1. + * * Deprecated: Since 2.12. Use atk_component_get_extents() instead. * * Params: @@ -152,6 +158,9 @@ public interface ComponentIF{ /** * Gets the size of the @component in terms of width and height. * + * If the size can not be obtained (e.g. a non-embedded plug or missing + * support), width and height are set to -1. + * * Deprecated: Since 2.12. Use atk_component_get_extents() instead. * * Params: @@ -213,8 +222,8 @@ public interface ComponentIF{ public bool scrollTo(AtkScrollType type); /** - * Makes an object visible on the screen at a given position by scrolling all - * necessary parents. + * Move the top-left of @component to a given position of the screen by + * scrolling all necessary parents. * * Params: * coords = specify whether coordinates are relative to the screen or to the diff --git a/generated/gtkd/atk/ComponentT.d b/generated/gtkd/atk/ComponentT.d index 800593458..656433cc9 100644 --- a/generated/gtkd/atk/ComponentT.d +++ b/generated/gtkd/atk/ComponentT.d @@ -114,6 +114,9 @@ public template ComponentT(TStruct) /** * Gets the rectangle which gives the extent of the @component. * + * If the extent can not be obtained (e.g. a non-embedded plug or missing + * support), all of x, y, width, height are set to -1. + * * Params: * x = address of #gint to put x coordinate * y = address of #gint to put y coordinate @@ -154,6 +157,9 @@ public template ComponentT(TStruct) * Gets the position of @component in the form of * a point specifying @component's top-left corner. * + * If the position can not be obtained (e.g. a non-embedded plug or missing + * support), x and y are set to -1. + * * Deprecated: Since 2.12. Use atk_component_get_extents() instead. * * Params: @@ -170,6 +176,9 @@ public template ComponentT(TStruct) /** * Gets the size of the @component in terms of width and height. * + * If the size can not be obtained (e.g. a non-embedded plug or missing + * support), width and height are set to -1. + * * Deprecated: Since 2.12. Use atk_component_get_extents() instead. * * Params: @@ -253,8 +262,8 @@ public template ComponentT(TStruct) } /** - * Makes an object visible on the screen at a given position by scrolling all - * necessary parents. + * Move the top-left of @component to a given position of the screen by + * scrolling all necessary parents. * * Params: * coords = specify whether coordinates are relative to the screen or to the diff --git a/generated/gtkd/atk/DocumentIF.d b/generated/gtkd/atk/DocumentIF.d index e8a1095c2..31811e1c6 100644 --- a/generated/gtkd/atk/DocumentIF.d +++ b/generated/gtkd/atk/DocumentIF.d @@ -27,6 +27,7 @@ module atk.DocumentIF; private import atk.c.functions; public import atk.c.types; private import glib.Str; +private import glib.c.functions; private import gobject.Signals; public import gtkc.atktypes; private import std.algorithm; diff --git a/generated/gtkd/atk/DocumentT.d b/generated/gtkd/atk/DocumentT.d index b62dddac5..0f9265dc1 100644 --- a/generated/gtkd/atk/DocumentT.d +++ b/generated/gtkd/atk/DocumentT.d @@ -27,6 +27,7 @@ module atk.DocumentT; public import atk.c.functions; public import atk.c.types; public import glib.Str; +public import glib.c.functions; public import gobject.Signals; public import gtkc.atktypes; public import std.algorithm; diff --git a/generated/gtkd/atk/Hyperlink.d b/generated/gtkd/atk/Hyperlink.d index 3345af80b..6e49ee358 100644 --- a/generated/gtkd/atk/Hyperlink.d +++ b/generated/gtkd/atk/Hyperlink.d @@ -30,6 +30,7 @@ private import atk.ObjectAtk; private import atk.c.functions; public import atk.c.types; private import glib.Str; +private import glib.c.functions; private import gobject.ObjectG; private import gobject.Signals; public import gtkc.atktypes; diff --git a/generated/gtkd/atk/ImageIF.d b/generated/gtkd/atk/ImageIF.d index bcd86a314..40291c41e 100644 --- a/generated/gtkd/atk/ImageIF.d +++ b/generated/gtkd/atk/ImageIF.d @@ -27,6 +27,7 @@ module atk.ImageIF; private import atk.c.functions; public import atk.c.types; private import glib.Str; +private import glib.c.functions; public import gtkc.atktypes; @@ -81,6 +82,9 @@ public interface ImageIF{ * Gets the position of the image in the form of a point specifying the * images top-left corner. * + * If the position can not be obtained (e.g. missing support), x and y are set + * to -1. + * * Params: * x = address of #gint to put x coordinate position; otherwise, -1 if value cannot be obtained. * y = address of #gint to put y coordinate position; otherwise, -1 if value cannot be obtained. @@ -94,6 +98,9 @@ public interface ImageIF{ * The values of @width and @height are returned as -1 if the * values cannot be obtained (for instance, if the object is not onscreen). * + * If the size can not be obtained (e.g. missing support), x and y are set + * to -1. + * * Params: * width = filled with the image width, or -1 if the value cannot be obtained. * height = filled with the image height, or -1 if the value cannot be obtained. diff --git a/generated/gtkd/atk/ImageT.d b/generated/gtkd/atk/ImageT.d index dddfee581..478357ed2 100644 --- a/generated/gtkd/atk/ImageT.d +++ b/generated/gtkd/atk/ImageT.d @@ -27,6 +27,7 @@ module atk.ImageT; public import atk.c.functions; public import atk.c.types; public import glib.Str; +public import glib.c.functions; public import gtkc.atktypes; @@ -84,6 +85,9 @@ public template ImageT(TStruct) * Gets the position of the image in the form of a point specifying the * images top-left corner. * + * If the position can not be obtained (e.g. missing support), x and y are set + * to -1. + * * Params: * x = address of #gint to put x coordinate position; otherwise, -1 if value cannot be obtained. * y = address of #gint to put y coordinate position; otherwise, -1 if value cannot be obtained. @@ -100,6 +104,9 @@ public template ImageT(TStruct) * The values of @width and @height are returned as -1 if the * values cannot be obtained (for instance, if the object is not onscreen). * + * If the size can not be obtained (e.g. missing support), x and y are set + * to -1. + * * Params: * width = filled with the image width, or -1 if the value cannot be obtained. * height = filled with the image height, or -1 if the value cannot be obtained. diff --git a/generated/gtkd/atk/ObjectAtk.d b/generated/gtkd/atk/ObjectAtk.d index c2b92e834..53f4ee954 100644 --- a/generated/gtkd/atk/ObjectAtk.d +++ b/generated/gtkd/atk/ObjectAtk.d @@ -29,6 +29,7 @@ private import atk.StateSet; private import atk.c.functions; public import atk.c.types; private import glib.Str; +private import glib.c.functions; private import gobject.ObjectG; private import gobject.Signals; public import gtkc.atktypes; diff --git a/generated/gtkd/atk/Plug.d b/generated/gtkd/atk/Plug.d index e475e8953..a448db05f 100644 --- a/generated/gtkd/atk/Plug.d +++ b/generated/gtkd/atk/Plug.d @@ -31,6 +31,7 @@ private import atk.c.functions; public import atk.c.types; private import glib.ConstructionException; private import glib.Str; +private import glib.c.functions; private import gobject.ObjectG; public import gtkc.atktypes; @@ -118,4 +119,25 @@ public class Plug : ObjectAtk, ComponentIF scope(exit) Str.freeString(retStr); return Str.toString(retStr); } + + /** + * Sets @child as accessible child of @plug and @plug as accessible parent of + * @child. @child can be NULL. + * + * In some cases, one can not use the AtkPlug type directly as accessible + * object for the toplevel widget of the application. For instance in the gtk + * case, GtkPlugAccessible can not inherit both from GtkWindowAccessible and + * from AtkPlug. In such a case, one can create, in addition to the standard + * accessible object for the toplevel widget, an AtkPlug object, and make the + * former the child of the latter by calling atk_plug_set_child(). + * + * Params: + * child = an #AtkObject to be set as accessible child of @plug. + * + * Since: 2.35.0 + */ + public void setChild(ObjectAtk child) + { + atk_plug_set_child(atkPlug, (child is null) ? null : child.getObjectAtkStruct()); + } } diff --git a/generated/gtkd/atk/Range.d b/generated/gtkd/atk/Range.d index 746fbe6ef..53a836585 100644 --- a/generated/gtkd/atk/Range.d +++ b/generated/gtkd/atk/Range.d @@ -28,6 +28,7 @@ private import atk.c.functions; public import atk.c.types; private import glib.ConstructionException; private import glib.Str; +private import glib.c.functions; private import gobject.ObjectG; public import gtkc.atktypes; private import gtkd.Loader; diff --git a/generated/gtkd/atk/Relation.d b/generated/gtkd/atk/Relation.d index cd505b45b..bf475834c 100644 --- a/generated/gtkd/atk/Relation.d +++ b/generated/gtkd/atk/Relation.d @@ -30,6 +30,7 @@ public import atk.c.types; private import glib.ConstructionException; private import glib.PtrArray; private import glib.Str; +private import glib.c.functions; private import gobject.ObjectG; public import gtkc.atktypes; diff --git a/generated/gtkd/atk/State.d b/generated/gtkd/atk/State.d index 0b141a120..8d7eb2ade 100644 --- a/generated/gtkd/atk/State.d +++ b/generated/gtkd/atk/State.d @@ -27,6 +27,7 @@ module atk.State; private import atk.c.functions; public import atk.c.types; private import glib.Str; +private import glib.c.functions; public import gtkc.atktypes; diff --git a/generated/gtkd/atk/StreamableContentIF.d b/generated/gtkd/atk/StreamableContentIF.d index 2ab0c9f49..c726d5913 100644 --- a/generated/gtkd/atk/StreamableContentIF.d +++ b/generated/gtkd/atk/StreamableContentIF.d @@ -28,6 +28,7 @@ private import atk.c.functions; public import atk.c.types; private import glib.IOChannel; private import glib.Str; +private import glib.c.functions; public import gtkc.atktypes; diff --git a/generated/gtkd/atk/StreamableContentT.d b/generated/gtkd/atk/StreamableContentT.d index 3a95ba2e9..ebbd2c31d 100644 --- a/generated/gtkd/atk/StreamableContentT.d +++ b/generated/gtkd/atk/StreamableContentT.d @@ -28,6 +28,7 @@ public import atk.c.functions; public import atk.c.types; public import glib.IOChannel; public import glib.Str; +public import glib.c.functions; public import gtkc.atktypes; diff --git a/generated/gtkd/atk/TableIF.d b/generated/gtkd/atk/TableIF.d index 6ee6ed103..c164d21c0 100644 --- a/generated/gtkd/atk/TableIF.d +++ b/generated/gtkd/atk/TableIF.d @@ -28,6 +28,7 @@ private import atk.ObjectAtk; private import atk.c.functions; public import atk.c.types; private import glib.Str; +private import glib.c.functions; private import gobject.ObjectG; private import gobject.Signals; public import gtkc.atktypes; diff --git a/generated/gtkd/atk/TableT.d b/generated/gtkd/atk/TableT.d index 3baf027ff..f8453b945 100644 --- a/generated/gtkd/atk/TableT.d +++ b/generated/gtkd/atk/TableT.d @@ -28,6 +28,7 @@ public import atk.ObjectAtk; public import atk.c.functions; public import atk.c.types; public import glib.Str; +public import glib.c.functions; public import gobject.ObjectG; public import gobject.Signals; public import gtkc.atktypes; diff --git a/generated/gtkd/atk/TextIF.d b/generated/gtkd/atk/TextIF.d index 563a17fb6..d15138950 100644 --- a/generated/gtkd/atk/TextIF.d +++ b/generated/gtkd/atk/TextIF.d @@ -28,6 +28,7 @@ private import atk.TextRange; private import atk.c.functions; public import atk.c.types; private import glib.Str; +private import glib.c.functions; private import gobject.ObjectG; private import gobject.Signals; public import gtkc.atktypes; @@ -145,6 +146,9 @@ public interface TextIF{ public int getCharacterCount(); /** + * If the extent can not be obtained (e.g. missing support), all of x, y, width, + * height are set to -1. + * * Get the bounding box containing the glyph representing the character at * a particular text offset. * @@ -196,6 +200,9 @@ public interface TextIF{ /** * Get the bounding box for text within the specified range. * + * If the extents can not be obtained (e.g. or missing support), the rectangle + * fields are set to -1. + * * Params: * startOffset = The offset of the first text character for which boundary * information is required. @@ -402,15 +409,11 @@ public interface TextIF{ public bool removeSelection(int selectionNum); /** - * Makes @text visible on the screen by scrolling all necessary parents. - * - * Contrary to atk_text_set_position, this does not actually move - * @text in its parent, this only makes the parents scroll so that the - * object shows up on the screen, given its current position within the parents. + * Makes a substring of @text visible on the screen by scrolling all necessary parents. * * Params: - * startOffset = start position - * endOffset = end position, or -1 for the end of the string. + * startOffset = start offset in the @text + * endOffset = end offset in the @text, or -1 for the end of the text. * type = specify where the object should be made visible. * * Returns: whether scrolling was successful. @@ -420,12 +423,12 @@ public interface TextIF{ public bool scrollSubstringTo(int startOffset, int endOffset, AtkScrollType type); /** - * Makes an object visible on the screen at a given position by scrolling all - * necessary parents. + * Move the top-left of a substring of @text to a given position of the screen + * by scrolling all necessary parents. * * Params: - * startOffset = start position - * endOffset = end position, or -1 for the end of the string. + * startOffset = start offset in the @text + * endOffset = end offset in the @text, or -1 for the end of the text. * coords = specify whether coordinates are relative to the screen or to the * parent object. * x = x-position where to scroll to @@ -440,6 +443,22 @@ public interface TextIF{ /** * Sets the caret (cursor) position to the specified @offset. * + * In the case of rich-text content, this method should either grab focus + * or move the sequential focus navigation starting point (if the application + * supports this concept) as if the user had clicked on the new caret position. + * Typically, this means that the target of this operation is the node containing + * the new caret position or one of its ancestors. In other words, after this + * method is called, if the user advances focus, it should move to the first + * focusable node following the new caret position. + * + * Calling this method should also scroll the application viewport in a way + * that matches the behavior of the application's typical caret motion or tab + * navigation as closely as possible. This also means that if the application's + * caret motion or focus navigation does not trigger a scroll operation, this + * method should not trigger one either. If the application does not have a caret + * motion or focus navigation operation, this method should try to scroll the new + * caret position into view while minimizing unnecessary scroll motion. + * * Params: * offset = the character offset of the new caret position * diff --git a/generated/gtkd/atk/TextRange.d b/generated/gtkd/atk/TextRange.d index 00169b109..7cfec217f 100644 --- a/generated/gtkd/atk/TextRange.d +++ b/generated/gtkd/atk/TextRange.d @@ -28,6 +28,7 @@ private import atk.c.functions; public import atk.c.types; private import glib.MemorySlice; private import glib.Str; +private import glib.c.functions; public import gtkc.atktypes; private import gtkd.Loader; diff --git a/generated/gtkd/atk/TextT.d b/generated/gtkd/atk/TextT.d index bf8b4c399..703e0faaf 100644 --- a/generated/gtkd/atk/TextT.d +++ b/generated/gtkd/atk/TextT.d @@ -28,6 +28,7 @@ public import atk.TextRange; public import atk.c.functions; public import atk.c.types; public import glib.Str; +public import glib.c.functions; public import gobject.ObjectG; public import gobject.Signals; public import gtkc.atktypes; @@ -148,6 +149,9 @@ public template TextT(TStruct) } /** + * If the extent can not be obtained (e.g. missing support), all of x, y, width, + * height are set to -1. + * * Get the bounding box containing the glyph representing the character at * a particular text offset. * @@ -211,6 +215,9 @@ public template TextT(TStruct) /** * Get the bounding box for text within the specified range. * + * If the extents can not be obtained (e.g. or missing support), the rectangle + * fields are set to -1. + * * Params: * startOffset = The offset of the first text character for which boundary * information is required. @@ -462,15 +469,11 @@ public template TextT(TStruct) } /** - * Makes @text visible on the screen by scrolling all necessary parents. - * - * Contrary to atk_text_set_position, this does not actually move - * @text in its parent, this only makes the parents scroll so that the - * object shows up on the screen, given its current position within the parents. + * Makes a substring of @text visible on the screen by scrolling all necessary parents. * * Params: - * startOffset = start position - * endOffset = end position, or -1 for the end of the string. + * startOffset = start offset in the @text + * endOffset = end offset in the @text, or -1 for the end of the text. * type = specify where the object should be made visible. * * Returns: whether scrolling was successful. @@ -483,12 +486,12 @@ public template TextT(TStruct) } /** - * Makes an object visible on the screen at a given position by scrolling all - * necessary parents. + * Move the top-left of a substring of @text to a given position of the screen + * by scrolling all necessary parents. * * Params: - * startOffset = start position - * endOffset = end position, or -1 for the end of the string. + * startOffset = start offset in the @text + * endOffset = end offset in the @text, or -1 for the end of the text. * coords = specify whether coordinates are relative to the screen or to the * parent object. * x = x-position where to scroll to @@ -506,6 +509,22 @@ public template TextT(TStruct) /** * Sets the caret (cursor) position to the specified @offset. * + * In the case of rich-text content, this method should either grab focus + * or move the sequential focus navigation starting point (if the application + * supports this concept) as if the user had clicked on the new caret position. + * Typically, this means that the target of this operation is the node containing + * the new caret position or one of its ancestors. In other words, after this + * method is called, if the user advances focus, it should move to the first + * focusable node following the new caret position. + * + * Calling this method should also scroll the application viewport in a way + * that matches the behavior of the application's typical caret motion or tab + * navigation as closely as possible. This also means that if the application's + * caret motion or focus navigation does not trigger a scroll operation, this + * method should not trigger one either. If the application does not have a caret + * motion or focus navigation operation, this method should try to scroll the new + * caret position into view while minimizing unnecessary scroll motion. + * * Params: * offset = the character offset of the new caret position * diff --git a/generated/gtkd/atk/Util.d b/generated/gtkd/atk/Util.d index 65479e4ab..36618050e 100644 --- a/generated/gtkd/atk/Util.d +++ b/generated/gtkd/atk/Util.d @@ -28,6 +28,7 @@ private import atk.ObjectAtk; private import atk.c.functions; public import atk.c.types; private import glib.Str; +private import glib.c.functions; private import gobject.ObjectG; public import gtkc.atktypes; diff --git a/generated/gtkd/atk/ValueIF.d b/generated/gtkd/atk/ValueIF.d index 911a2eb83..bcf38e014 100644 --- a/generated/gtkd/atk/ValueIF.d +++ b/generated/gtkd/atk/ValueIF.d @@ -30,6 +30,7 @@ public import atk.c.types; private import glib.ListSG; private import glib.MemorySlice; private import glib.Str; +private import glib.c.functions; private import gobject.ObjectG; private import gobject.Signals; private import gobject.Value; diff --git a/generated/gtkd/atk/ValueT.d b/generated/gtkd/atk/ValueT.d index 2c5bb45ce..a73677707 100644 --- a/generated/gtkd/atk/ValueT.d +++ b/generated/gtkd/atk/ValueT.d @@ -30,6 +30,7 @@ public import atk.c.types; public import glib.ListSG; public import glib.MemorySlice; public import glib.Str; +public import glib.c.functions; public import gobject.ObjectG; public import gobject.Signals; public import gobject.Value; diff --git a/generated/gtkd/atk/Version.d b/generated/gtkd/atk/Version.d index 3c9c8ce0e..51651fbd8 100644 --- a/generated/gtkd/atk/Version.d +++ b/generated/gtkd/atk/Version.d @@ -27,6 +27,7 @@ module atk.Version; private import atk.c.functions; public import atk.c.types; private import glib.Str; +private import glib.c.functions; public import gtkc.atktypes; diff --git a/generated/gtkd/atk/c/functions.d b/generated/gtkd/atk/c/functions.d index a171d59db..2e77066bb 100644 --- a/generated/gtkd/atk/c/functions.d +++ b/generated/gtkd/atk/c/functions.d @@ -198,6 +198,7 @@ shared static this() Linker.link(atk_plug_get_type, "atk_plug_get_type", LIBRARY_ATK); Linker.link(atk_plug_new, "atk_plug_new", LIBRARY_ATK); Linker.link(atk_plug_get_id, "atk_plug_get_id", LIBRARY_ATK); + Linker.link(atk_plug_set_child, "atk_plug_set_child", LIBRARY_ATK); // atk.Range @@ -581,6 +582,7 @@ __gshared extern(C) GType function() c_atk_plug_get_type; AtkObject* function() c_atk_plug_new; char* function(AtkPlug* plug) c_atk_plug_get_id; + void function(AtkPlug* plug, AtkObject* child) c_atk_plug_set_child; // atk.Range @@ -644,7 +646,7 @@ __gshared extern(C) GType function() c_atk_socket_get_type; AtkObject* function() c_atk_socket_new; - void function(AtkSocket* obj, char* plugId) c_atk_socket_embed; + void function(AtkSocket* obj, const(char)* plugId) c_atk_socket_embed; int function(AtkSocket* obj) c_atk_socket_is_occupied; // atk.StateSet @@ -962,6 +964,7 @@ alias c_atk_object_factory_invalidate atk_object_factory_invalidate; alias c_atk_plug_get_type atk_plug_get_type; alias c_atk_plug_new atk_plug_new; alias c_atk_plug_get_id atk_plug_get_id; +alias c_atk_plug_set_child atk_plug_set_child; // atk.Range diff --git a/generated/gtkd/atk/c/types.d b/generated/gtkd/atk/c/types.d index d066546ff..2d8186825 100644 --- a/generated/gtkd/atk/c/types.d +++ b/generated/gtkd/atk/c/types.d @@ -836,10 +836,28 @@ public enum AtkRole * from reviewers. (Since: 2.34) */ CONTENT_INSERTION = 124, + /** + * A run of content that is marked or highlighted, such as for + * reference purposes, or to call it out as having a special purpose. If the + * marked content has an associated section in the document elaborating on the + * reason for the mark, then %ATK_RELATION_DETAILS should be used on the mark + * to point to that associated section. In addition, the reciprocal relation + * %ATK_RELATION_DETAILS_FOR should be used on the associated content section + * to point back to the mark. (Since: 2.36) + */ + MARK = 125, + /** + * A container for content that is called out as a proposed + * change from the current version of the document, such as by a reviewer of the + * content. This role should include either %ATK_ROLE_CONTENT_DELETION and/or + * %ATK_ROLE_CONTENT_INSERTION children, in any order, to indicate what the + * actual change is. (Since: 2.36) + */ + SUGGESTION = 126, /** * not a valid role, used for finding end of the enumeration */ - LAST_DEFINED = 125, + LAST_DEFINED = 127, } alias AtkRole Role; @@ -851,33 +869,33 @@ alias AtkRole Role; public enum AtkScrollType { /** - * Scroll the object vertically and horizontally to the top - * left corner of the window. + * Scroll the object vertically and horizontally to bring + * its top left corner to the top left corner of the window. */ TOP_LEFT = 0, /** - * Scroll the object vertically and horizontally to the - * bottom right corner of the window. + * Scroll the object vertically and horizontally to + * bring its bottom right corner to the bottom right corner of the window. */ BOTTOM_RIGHT = 1, /** - * Scroll the object vertically to the top edge of the - * window. + * Scroll the object vertically to bring its top edge to + * the top edge of the window. */ TOP_EDGE = 2, /** - * Scroll the object vertically to the bottom edge of - * the window. + * Scroll the object vertically to bring its bottom + * edge to the bottom edge of the window. */ BOTTOM_EDGE = 3, /** - * Scroll the object vertically and horizontally to the - * left edge of the window. + * Scroll the object vertically and horizontally to bring + * its left edge to the left edge of the window. */ LEFT_EDGE = 4, /** - * Scroll the object vertically and horizontally to the - * right edge of the window. + * Scroll the object vertically and horizontally to + * bring its right edge to the right edge of the window. */ RIGHT_EDGE = 5, /** @@ -1133,10 +1151,14 @@ public enum AtkStateType * ATK_STATE_EDITABLE. @Since: ATK-2-16 */ READ_ONLY = 42, + /** + * Indicates this object is collapsed. @Since: ATK-2.38 + */ + COLLAPSED = 43, /** * Not a valid state, used for finding end of enumeration */ - LAST_DEFINED = 43, + LAST_DEFINED = 44, } alias AtkStateType StateType; @@ -1186,7 +1208,7 @@ public enum AtkTextAttribute */ BG_FULL_HEIGHT = 9, /** - * Number of pixels that the characters are risen above the baseline + * Number of pixels that the characters are risen above the baseline. See also ATK_TEXT_ATTR_TEXT_POSITION. */ RISE = 10, /** @@ -1257,10 +1279,14 @@ public enum AtkTextAttribute * The slant style of the text, if set. Values are "normal", "oblique" or "italic" */ STYLE = 27, + /** + * The vertical position with respect to the baseline. Values are "baseline", "super", or "sub". Note that a super or sub text attribute refers to position with respect to the baseline of the prior character. + */ + TEXT_POSITION = 28, /** * not a valid text attribute, used for finding end of enumeration */ - LAST_DEFINED = 28, + LAST_DEFINED = 29, } alias AtkTextAttribute TextAttribute; @@ -2300,7 +2326,7 @@ struct AtkSocketClass { AtkObjectClass parentClass; /** */ - extern(C) void function(AtkSocket* obj, char* plugId) embed; + extern(C) void function(AtkSocket* obj, const(char)* plugId) embed; } struct AtkStateSet @@ -2900,8 +2926,8 @@ struct AtkTextIface * * Params: * text = an #AtkText - * startOffset = start position - * endOffset = end position, or -1 for the end of the string. + * startOffset = start offset in the @text + * endOffset = end offset in the @text, or -1 for the end of the text. * type = specify where the object should be made visible. * Returns: whether scrolling was successful. */ @@ -2910,8 +2936,8 @@ struct AtkTextIface * * Params: * text = an #AtkText - * startOffset = start position - * endOffset = end position, or -1 for the end of the string. + * startOffset = start offset in the @text + * endOffset = end offset in the @text, or -1 for the end of the text. * coords = specify whether coordinates are relative to the screen or to the * parent object. * x = x-position where to scroll to @@ -3144,7 +3170,7 @@ public alias extern(C) void function(AtkObject* obj, AtkPropertyValues* vals) At * application compile time, rather than from the library linked * against at application run time. */ -enum BINARY_AGE = 23411; +enum BINARY_AGE = 23810; alias ATK_BINARY_AGE = BINARY_AGE; /** @@ -3168,7 +3194,7 @@ alias ATK_MAJOR_VERSION = MAJOR_VERSION; * application compile time, rather than from the library linked * against at application run time. */ -enum MICRO_VERSION = 1; +enum MICRO_VERSION = 0; alias ATK_MICRO_VERSION = MICRO_VERSION; /** @@ -3176,7 +3202,7 @@ alias ATK_MICRO_VERSION = MICRO_VERSION; * application compile time, rather than from the library linked * against at application run time. */ -enum MINOR_VERSION = 34; +enum MINOR_VERSION = 38; alias ATK_MINOR_VERSION = MINOR_VERSION; /** diff --git a/generated/gtkd/gdk/AppLaunchContext.d b/generated/gtkd/gdk/AppLaunchContext.d index 115a39847..236a578c7 100644 --- a/generated/gtkd/gdk/AppLaunchContext.d +++ b/generated/gtkd/gdk/AppLaunchContext.d @@ -28,7 +28,7 @@ private import gdk.Display; private import gdk.Screen; private import gdk.c.functions; public import gdk.c.types; -private import gio.AppLaunchContext : GioAppLaunchContext = AppLaunchContext; +private import gio.AppLaunchContext : DGioAppLaunchContext = AppLaunchContext; private import gio.IconIF; private import glib.ConstructionException; private import glib.Str; @@ -58,7 +58,7 @@ public import gtkc.gdktypes; * g_object_unref (context); * ]| */ -public class AppLaunchContext : GioAppLaunchContext +public class AppLaunchContext : DGioAppLaunchContext { /** the main Gtk struct */ protected GdkAppLaunchContext* gdkAppLaunchContext; @@ -106,14 +106,14 @@ public class AppLaunchContext : GioAppLaunchContext */ public this() { - auto p = gdk_app_launch_context_new(); + auto __p = gdk_app_launch_context_new(); - if(p is null) + if(__p is null) { throw new ConstructionException("null returned by new"); } - this(cast(GdkAppLaunchContext*) p, true); + this(cast(GdkAppLaunchContext*) __p, true); } /** @@ -195,6 +195,9 @@ public class AppLaunchContext : GioAppLaunchContext * Sets the screen on which applications will be launched when * using this context. See also gdk_app_launch_context_set_display(). * + * Note that, typically, a #GdkScreen represents a logical screen, + * not a physical monitor. + * * If both @screen and @display are set, the @screen takes priority. * If neither @screen or @display are set, the default screen and * display are used. diff --git a/generated/gtkd/gdk/Atom.d b/generated/gtkd/gdk/Atom.d index da7fb55dd..ede9c7726 100644 --- a/generated/gtkd/gdk/Atom.d +++ b/generated/gtkd/gdk/Atom.d @@ -29,6 +29,7 @@ private import gdk.Window; private import gdk.c.functions; public import gdk.c.types; private import glib.Str; +private import glib.c.functions; public import gtkc.gdktypes; @@ -173,13 +174,13 @@ public void propertyDelete(Window window, GdkAtom property) public bool propertyGet(Window window, GdkAtom property, GdkAtom type, gulong offset, gulong length, int pdelete, out GdkAtom actualPropertyType, out int actualFormat, out char[] data) { int actualLength; - char* outdata = null; + char* outdata; - auto p = gdk_property_get((window is null) ? null : window.getWindowStruct(), property, type, offset, length, pdelete, &actualPropertyType, &actualFormat, &actualLength, &outdata) != 0; + auto __p = gdk_property_get((window is null) ? null : window.getWindowStruct(), property, type, offset, length, pdelete, &actualPropertyType, &actualFormat, &actualLength, &outdata) != 0; data = outdata[0 .. actualLength]; - return p; + return __p; } /** @@ -203,11 +204,11 @@ public int textPropertyToUtf8ListForDisplay(Display display, GdkAtom encoding, i { char** outlist = null; - auto p = gdk_text_property_to_utf8_list_for_display((display is null) ? null : display.getDisplayStruct(), encoding, format, text.ptr, cast(int)text.length, &outlist); + auto __p = gdk_text_property_to_utf8_list_for_display((display is null) ? null : display.getDisplayStruct(), encoding, format, text.ptr, cast(int)text.length, &outlist); list = Str.toStringArray(outlist); - return p; + return __p; } /** diff --git a/generated/gtkd/gdk/Cairo.d b/generated/gtkd/gdk/Cairo.d index aa4aac863..c5e0b27d5 100644 --- a/generated/gtkd/gdk/Cairo.d +++ b/generated/gtkd/gdk/Cairo.d @@ -67,14 +67,14 @@ public import gtkc.gdktypes; */ public Context createContext(Window window) { - auto p = gdk_cairo_create((window is null) ? null : window.getWindowStruct()); + auto __p = gdk_cairo_create((window is null) ? null : window.getWindowStruct()); - if(p is null) + if(__p is null) { return null; } - return new Context(cast(cairo_t*) p); + return new Context(cast(cairo_t*) __p); } /** @@ -172,14 +172,14 @@ public void region(Context cr, Region region) */ public Region regionCreateFromSurface(Surface surface) { - auto p = gdk_cairo_region_create_from_surface((surface is null) ? null : surface.getSurfaceStruct()); + auto __p = gdk_cairo_region_create_from_surface((surface is null) ? null : surface.getSurfaceStruct()); - if(p is null) + if(__p is null) { return null; } - return new Region(cast(cairo_region_t*) p); + return new Region(cast(cairo_region_t*) __p); } /** @@ -269,14 +269,14 @@ public void setSourceWindow(Context cr, Window window, double x, double y) */ public Surface surfaceCreateFromPixbuf(Pixbuf pixbuf, int scale, Window forWindow) { - auto p = gdk_cairo_surface_create_from_pixbuf((pixbuf is null) ? null : pixbuf.getPixbufStruct(), scale, (forWindow is null) ? null : forWindow.getWindowStruct()); + auto __p = gdk_cairo_surface_create_from_pixbuf((pixbuf is null) ? null : pixbuf.getPixbufStruct(), scale, (forWindow is null) ? null : forWindow.getWindowStruct()); - if(p is null) + if(__p is null) { return null; } - return new Surface(cast(cairo_surface_t*) p); + return new Surface(cast(cairo_surface_t*) __p); } /** @@ -292,12 +292,12 @@ public Surface surfaceCreateFromPixbuf(Pixbuf pixbuf, int scale, Window forWindo */ public DrawingContext getDrawingContext(Context cr) { - auto p = gdk_cairo_get_drawing_context((cr is null) ? null : cr.getContextStruct()); + auto __p = gdk_cairo_get_drawing_context((cr is null) ? null : cr.getContextStruct()); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(DrawingContext)(cast(GdkDrawingContext*) p); + return ObjectG.getDObject!(DrawingContext)(cast(GdkDrawingContext*) __p); } diff --git a/generated/gtkd/gdk/Color.d b/generated/gtkd/gdk/Color.d index 08fd6f6ee..c2b03ca5c 100644 --- a/generated/gtkd/gdk/Color.d +++ b/generated/gtkd/gdk/Color.d @@ -28,6 +28,7 @@ private import gdk.c.functions; public import gdk.c.types; private import glib.MemorySlice; private import glib.Str; +private import glib.c.functions; private import gobject.ObjectG; public import gtkc.gdktypes; private import gtkd.Loader; @@ -192,14 +193,14 @@ public final class Color */ public Color copy() { - auto p = gdk_color_copy(gdkColor); + auto __p = gdk_color_copy(gdkColor); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Color)(cast(GdkColor*) p, true); + return ObjectG.getDObject!(Color)(cast(GdkColor*) __p, true); } /** @@ -286,10 +287,10 @@ public final class Color { GdkColor* outcolor = sliceNew!GdkColor(); - auto p = gdk_color_parse(Str.toStringz(spec), outcolor) != 0; + auto __p = gdk_color_parse(Str.toStringz(spec), outcolor) != 0; color = ObjectG.getDObject!(Color)(outcolor, true); - return p; + return __p; } } diff --git a/generated/gtkd/gdk/Cursor.d b/generated/gtkd/gdk/Cursor.d index b4aef27bb..13434112a 100644 --- a/generated/gtkd/gdk/Cursor.d +++ b/generated/gtkd/gdk/Cursor.d @@ -90,14 +90,14 @@ public class Cursor : ObjectG */ public this(GdkCursorType cursorType) { - auto p = gdk_cursor_new(cursorType); + auto __p = gdk_cursor_new(cursorType); - if(p is null) + if(__p is null) { throw new ConstructionException("null returned by new"); } - this(cast(GdkCursor*) p, true); + this(cast(GdkCursor*) __p, true); } /** @@ -107,7 +107,7 @@ public class Cursor : ObjectG * display = the #GdkDisplay for which the cursor will be created * cursorType = cursor to create * - * Returns: a new #GdkCursor + * Returns: a new #GdkCursor, or %NULL on failure * * Since: 2.2 * @@ -115,14 +115,14 @@ public class Cursor : ObjectG */ public this(Display display, GdkCursorType cursorType) { - auto p = gdk_cursor_new_for_display((display is null) ? null : display.getDisplayStruct(), cursorType); + auto __p = gdk_cursor_new_for_display((display is null) ? null : display.getDisplayStruct(), cursorType); - if(p is null) + if(__p is null) { throw new ConstructionException("null returned by new_for_display"); } - this(cast(GdkCursor*) p, true); + this(cast(GdkCursor*) __p, true); } /** @@ -180,14 +180,14 @@ public class Cursor : ObjectG */ public this(Display display, string name) { - auto p = gdk_cursor_new_from_name((display is null) ? null : display.getDisplayStruct(), Str.toStringz(name)); + auto __p = gdk_cursor_new_from_name((display is null) ? null : display.getDisplayStruct(), Str.toStringz(name)); - if(p is null) + if(__p is null) { throw new ConstructionException("null returned by new_from_name"); } - this(cast(GdkCursor*) p, true); + this(cast(GdkCursor*) __p, true); } /** @@ -224,14 +224,14 @@ public class Cursor : ObjectG */ public this(Display display, Pixbuf pixbuf, int x, int y) { - auto p = gdk_cursor_new_from_pixbuf((display is null) ? null : display.getDisplayStruct(), (pixbuf is null) ? null : pixbuf.getPixbufStruct(), x, y); + auto __p = gdk_cursor_new_from_pixbuf((display is null) ? null : display.getDisplayStruct(), (pixbuf is null) ? null : pixbuf.getPixbufStruct(), x, y); - if(p is null) + if(__p is null) { throw new ConstructionException("null returned by new_from_pixbuf"); } - this(cast(GdkCursor*) p, true); + this(cast(GdkCursor*) __p, true); } /** @@ -263,14 +263,14 @@ public class Cursor : ObjectG */ public this(Display display, Surface surface, double x, double y) { - auto p = gdk_cursor_new_from_surface((display is null) ? null : display.getDisplayStruct(), (surface is null) ? null : surface.getSurfaceStruct(), x, y); + auto __p = gdk_cursor_new_from_surface((display is null) ? null : display.getDisplayStruct(), (surface is null) ? null : surface.getSurfaceStruct(), x, y); - if(p is null) + if(__p is null) { throw new ConstructionException("null returned by new_from_surface"); } - this(cast(GdkCursor*) p, true); + this(cast(GdkCursor*) __p, true); } /** @@ -294,14 +294,14 @@ public class Cursor : ObjectG */ public Display getDisplay() { - auto p = gdk_cursor_get_display(gdkCursor); + auto __p = gdk_cursor_get_display(gdkCursor); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Display)(cast(GdkDisplay*) p); + return ObjectG.getDObject!(Display)(cast(GdkDisplay*) __p); } /** @@ -318,14 +318,14 @@ public class Cursor : ObjectG */ public Pixbuf getImage() { - auto p = gdk_cursor_get_image(gdkCursor); + auto __p = gdk_cursor_get_image(gdkCursor); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Pixbuf)(cast(GdkPixbuf*) p, true); + return ObjectG.getDObject!(Pixbuf)(cast(GdkPixbuf*) __p, true); } /** @@ -348,14 +348,14 @@ public class Cursor : ObjectG */ public Surface getSurface(out double xHot, out double yHot) { - auto p = gdk_cursor_get_surface(gdkCursor, &xHot, &yHot); + auto __p = gdk_cursor_get_surface(gdkCursor, &xHot, &yHot); - if(p is null) + if(__p is null) { return null; } - return new Surface(cast(cairo_surface_t*) p); + return new Surface(cast(cairo_surface_t*) __p); } alias doref = ref_; @@ -368,14 +368,14 @@ public class Cursor : ObjectG */ public override Cursor ref_() { - auto p = gdk_cursor_ref(gdkCursor); + auto __p = gdk_cursor_ref(gdkCursor); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Cursor)(cast(GdkCursor*) p, true); + return ObjectG.getDObject!(Cursor)(cast(GdkCursor*) __p, true); } /** diff --git a/generated/gtkd/gdk/Device.d b/generated/gtkd/gdk/Device.d index ccb618884..23c05c8cb 100644 --- a/generated/gtkd/gdk/Device.d +++ b/generated/gtkd/gdk/Device.d @@ -34,6 +34,7 @@ private import gdk.c.functions; public import gdk.c.types; private import glib.ListG; private import glib.Str; +private import glib.c.functions; private import gobject.ObjectG; private import gobject.Signals; public import gtkc.gdktypes; @@ -117,12 +118,12 @@ public class Device : ObjectG GdkWindow* outgrabWindow = null; int outownerEvents; - auto p = gdk_device_grab_info_libgtk_only((display is null) ? null : display.getDisplayStruct(), (device is null) ? null : device.getDeviceStruct(), &outgrabWindow, &outownerEvents) != 0; + auto __p = gdk_device_grab_info_libgtk_only((display is null) ? null : display.getDisplayStruct(), (device is null) ? null : device.getDeviceStruct(), &outgrabWindow, &outownerEvents) != 0; grabWindow = ObjectG.getDObject!(Window)(outgrabWindow); ownerEvents = (outownerEvents == 1); - return p; + return __p; } /** @@ -143,14 +144,14 @@ public class Device : ObjectG */ public Device getAssociatedDevice() { - auto p = gdk_device_get_associated_device(gdkDevice); + auto __p = gdk_device_get_associated_device(gdkDevice); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Device)(cast(GdkDevice*) p); + return ObjectG.getDObject!(Device)(cast(GdkDevice*) __p); } /** @@ -235,14 +236,14 @@ public class Device : ObjectG */ public Display getDisplay() { - auto p = gdk_device_get_display(gdkDevice); + auto __p = gdk_device_get_display(gdkDevice); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Display)(cast(GdkDisplay*) p); + return ObjectG.getDObject!(Display)(cast(GdkDisplay*) __p); } /** @@ -282,14 +283,14 @@ public class Device : ObjectG */ public bool getHistory(Window window, uint start, uint stop, out GdkTimeCoord*[] events) { - GdkTimeCoord** outevents = null; + GdkTimeCoord** outevents; int nEvents; - auto p = gdk_device_get_history(gdkDevice, (window is null) ? null : window.getWindowStruct(), start, stop, &outevents, &nEvents) != 0; + auto __p = gdk_device_get_history(gdkDevice, (window is null) ? null : window.getWindowStruct(), start, stop, &outevents, &nEvents) != 0; events = outevents[0 .. nEvents]; - return p; + return __p; } /** @@ -323,14 +324,14 @@ public class Device : ObjectG */ public Window getLastEventWindow() { - auto p = gdk_device_get_last_event_window(gdkDevice); + auto __p = gdk_device_get_last_event_window(gdkDevice); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Window)(cast(GdkWindow*) p); + return ObjectG.getDObject!(Window)(cast(GdkWindow*) __p); } /** @@ -451,14 +452,14 @@ public class Device : ObjectG */ public Seat getSeat() { - auto p = gdk_device_get_seat(gdkDevice); + auto __p = gdk_device_get_seat(gdkDevice); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Seat)(cast(GdkSeat*) p); + return ObjectG.getDObject!(Seat)(cast(GdkSeat*) __p); } /** @@ -548,14 +549,14 @@ public class Device : ObjectG */ public Window getWindowAtPosition(out int winX, out int winY) { - auto p = gdk_device_get_window_at_position(gdkDevice, &winX, &winY); + auto __p = gdk_device_get_window_at_position(gdkDevice, &winX, &winY); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Window)(cast(GdkWindow*) p); + return ObjectG.getDObject!(Window)(cast(GdkWindow*) __p); } /** @@ -580,14 +581,14 @@ public class Device : ObjectG */ public Window getWindowAtPositionDouble(out double winX, out double winY) { - auto p = gdk_device_get_window_at_position_double(gdkDevice, &winX, &winY); + auto __p = gdk_device_get_window_at_position_double(gdkDevice, &winX, &winY); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Window)(cast(GdkWindow*) p); + return ObjectG.getDObject!(Window)(cast(GdkWindow*) __p); } /** @@ -653,14 +654,14 @@ public class Device : ObjectG */ public ListG listAxes() { - auto p = gdk_device_list_axes(gdkDevice); + auto __p = gdk_device_list_axes(gdkDevice); - if(p is null) + if(__p is null) { return null; } - return new ListG(cast(GList*) p); + return new ListG(cast(GList*) __p); } /** @@ -674,14 +675,14 @@ public class Device : ObjectG */ public ListG listSlaveDevices() { - auto p = gdk_device_list_slave_devices(gdkDevice); + auto __p = gdk_device_list_slave_devices(gdkDevice); - if(p is null) + if(__p is null) { return null; } - return new ListG(cast(GList*) p); + return new ListG(cast(GList*) __p); } /** diff --git a/generated/gtkd/gdk/DeviceManager.d b/generated/gtkd/gdk/DeviceManager.d index 654d635ce..d70e29713 100644 --- a/generated/gtkd/gdk/DeviceManager.d +++ b/generated/gtkd/gdk/DeviceManager.d @@ -203,14 +203,14 @@ public class DeviceManager : ObjectG */ public Device getClientPointer() { - auto p = gdk_device_manager_get_client_pointer(gdkDeviceManager); + auto __p = gdk_device_manager_get_client_pointer(gdkDeviceManager); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Device)(cast(GdkDevice*) p); + return ObjectG.getDObject!(Device)(cast(GdkDevice*) __p); } /** @@ -224,14 +224,14 @@ public class DeviceManager : ObjectG */ public Display getDisplay() { - auto p = gdk_device_manager_get_display(gdkDeviceManager); + auto __p = gdk_device_manager_get_display(gdkDeviceManager); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Display)(cast(GdkDisplay*) p); + return ObjectG.getDObject!(Display)(cast(GdkDisplay*) __p); } /** @@ -253,14 +253,14 @@ public class DeviceManager : ObjectG */ public ListG listDevices(GdkDeviceType type) { - auto p = gdk_device_manager_list_devices(gdkDeviceManager, type); + auto __p = gdk_device_manager_list_devices(gdkDeviceManager, type); - if(p is null) + if(__p is null) { return null; } - return new ListG(cast(GList*) p); + return new ListG(cast(GList*) __p); } /** diff --git a/generated/gtkd/gdk/Display.d b/generated/gtkd/gdk/Display.d index 7ee44492c..1855a9ab3 100644 --- a/generated/gtkd/gdk/Display.d +++ b/generated/gtkd/gdk/Display.d @@ -36,6 +36,7 @@ private import gdk.c.functions; public import gdk.c.types; private import glib.ListG; private import glib.Str; +private import glib.c.functions; private import gobject.ObjectG; private import gobject.Signals; public import gtkc.gdktypes; @@ -109,14 +110,14 @@ public class Display : ObjectG */ public static Display getDefault() { - auto p = gdk_display_get_default(); + auto __p = gdk_display_get_default(); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Display)(cast(GdkDisplay*) p); + return ObjectG.getDObject!(Display)(cast(GdkDisplay*) __p); } /** @@ -132,14 +133,14 @@ public class Display : ObjectG */ public static Display open(string displayName) { - auto p = gdk_display_open(Str.toStringz(displayName)); + auto __p = gdk_display_open(Str.toStringz(displayName)); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Display)(cast(GdkDisplay*) p); + return ObjectG.getDObject!(Display)(cast(GdkDisplay*) __p); } /** @@ -157,14 +158,14 @@ public class Display : ObjectG */ public static Display openDefaultLibgtkOnly() { - auto p = gdk_display_open_default_libgtk_only(); + auto __p = gdk_display_open_default_libgtk_only(); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Display)(cast(GdkDisplay*) p); + return ObjectG.getDObject!(Display)(cast(GdkDisplay*) __p); } /** @@ -230,14 +231,14 @@ public class Display : ObjectG */ public AppLaunchContext getAppLaunchContext() { - auto p = gdk_display_get_app_launch_context(gdkDisplay); + auto __p = gdk_display_get_app_launch_context(gdkDisplay); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(AppLaunchContext)(cast(GdkAppLaunchContext*) p, true); + return ObjectG.getDObject!(AppLaunchContext)(cast(GdkAppLaunchContext*) __p, true); } /** @@ -264,14 +265,14 @@ public class Display : ObjectG */ public Window getDefaultGroup() { - auto p = gdk_display_get_default_group(gdkDisplay); + auto __p = gdk_display_get_default_group(gdkDisplay); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Window)(cast(GdkWindow*) p); + return ObjectG.getDObject!(Window)(cast(GdkWindow*) __p); } /** @@ -283,14 +284,14 @@ public class Display : ObjectG */ public Screen getDefaultScreen() { - auto p = gdk_display_get_default_screen(gdkDisplay); + auto __p = gdk_display_get_default_screen(gdkDisplay); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Screen)(cast(GdkScreen*) p); + return ObjectG.getDObject!(Screen)(cast(GdkScreen*) __p); } /** @@ -302,14 +303,14 @@ public class Display : ObjectG */ public Seat getDefaultSeat() { - auto p = gdk_display_get_default_seat(gdkDisplay); + auto __p = gdk_display_get_default_seat(gdkDisplay); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Seat)(cast(GdkSeat*) p); + return ObjectG.getDObject!(Seat)(cast(GdkSeat*) __p); } /** @@ -325,14 +326,14 @@ public class Display : ObjectG */ public DeviceManager getDeviceManager() { - auto p = gdk_display_get_device_manager(gdkDisplay); + auto __p = gdk_display_get_device_manager(gdkDisplay); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(DeviceManager)(cast(GdkDeviceManager*) p); + return ObjectG.getDObject!(DeviceManager)(cast(GdkDeviceManager*) __p); } /** @@ -347,14 +348,14 @@ public class Display : ObjectG */ public Event getEvent() { - auto p = gdk_display_get_event(gdkDisplay); + auto __p = gdk_display_get_event(gdkDisplay); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Event)(cast(GdkEvent*) p, true); + return ObjectG.getDObject!(Event)(cast(GdkEvent*) __p, true); } /** @@ -384,14 +385,14 @@ public class Display : ObjectG */ public MonitorG getMonitor(int monitorNum) { - auto p = gdk_display_get_monitor(gdkDisplay, monitorNum); + auto __p = gdk_display_get_monitor(gdkDisplay, monitorNum); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(MonitorG)(cast(GdkMonitor*) p); + return ObjectG.getDObject!(MonitorG)(cast(GdkMonitor*) __p); } /** @@ -408,14 +409,14 @@ public class Display : ObjectG */ public MonitorG getMonitorAtPoint(int x, int y) { - auto p = gdk_display_get_monitor_at_point(gdkDisplay, x, y); + auto __p = gdk_display_get_monitor_at_point(gdkDisplay, x, y); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(MonitorG)(cast(GdkMonitor*) p); + return ObjectG.getDObject!(MonitorG)(cast(GdkMonitor*) __p); } /** @@ -432,14 +433,14 @@ public class Display : ObjectG */ public MonitorG getMonitorAtWindow(Window window) { - auto p = gdk_display_get_monitor_at_window(gdkDisplay, (window is null) ? null : window.getWindowStruct()); + auto __p = gdk_display_get_monitor_at_window(gdkDisplay, (window is null) ? null : window.getWindowStruct()); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(MonitorG)(cast(GdkMonitor*) p); + return ObjectG.getDObject!(MonitorG)(cast(GdkMonitor*) __p); } /** @@ -523,14 +524,14 @@ public class Display : ObjectG */ public MonitorG getPrimaryMonitor() { - auto p = gdk_display_get_primary_monitor(gdkDisplay); + auto __p = gdk_display_get_primary_monitor(gdkDisplay); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(MonitorG)(cast(GdkMonitor*) p); + return ObjectG.getDObject!(MonitorG)(cast(GdkMonitor*) __p); } /** @@ -547,14 +548,14 @@ public class Display : ObjectG */ public Screen getScreen(int screenNum) { - auto p = gdk_display_get_screen(gdkDisplay, screenNum); + auto __p = gdk_display_get_screen(gdkDisplay, screenNum); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Screen)(cast(GdkScreen*) p); + return ObjectG.getDObject!(Screen)(cast(GdkScreen*) __p); } /** @@ -578,14 +579,14 @@ public class Display : ObjectG */ public Window getWindowAtPointer(out int winX, out int winY) { - auto p = gdk_display_get_window_at_pointer(gdkDisplay, &winX, &winY); + auto __p = gdk_display_get_window_at_pointer(gdkDisplay, &winX, &winY); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Window)(cast(GdkWindow*) p); + return ObjectG.getDObject!(Window)(cast(GdkWindow*) __p); } /** @@ -641,14 +642,14 @@ public class Display : ObjectG */ public ListG listDevices() { - auto p = gdk_display_list_devices(gdkDisplay); + auto __p = gdk_display_list_devices(gdkDisplay); - if(p is null) + if(__p is null) { return null; } - return new ListG(cast(GList*) p); + return new ListG(cast(GList*) __p); } /** @@ -661,14 +662,14 @@ public class Display : ObjectG */ public ListG listSeats() { - auto p = gdk_display_list_seats(gdkDisplay); + auto __p = gdk_display_list_seats(gdkDisplay); - if(p is null) + if(__p is null) { return null; } - return new ListG(cast(GList*) p); + return new ListG(cast(GList*) __p); } /** @@ -705,14 +706,14 @@ public class Display : ObjectG */ public Event peekEvent() { - auto p = gdk_display_peek_event(gdkDisplay); + auto __p = gdk_display_peek_event(gdkDisplay); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Event)(cast(GdkEvent*) p, true); + return ObjectG.getDObject!(Event)(cast(GdkEvent*) __p, true); } /** diff --git a/generated/gtkd/gdk/DisplayManager.d b/generated/gtkd/gdk/DisplayManager.d index be18f4e2c..ce69d680a 100644 --- a/generated/gtkd/gdk/DisplayManager.d +++ b/generated/gtkd/gdk/DisplayManager.d @@ -128,14 +128,14 @@ public class DisplayManager : ObjectG */ public static DisplayManager get() { - auto p = gdk_display_manager_get(); + auto __p = gdk_display_manager_get(); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(DisplayManager)(cast(GdkDisplayManager*) p); + return ObjectG.getDObject!(DisplayManager)(cast(GdkDisplayManager*) __p); } /** @@ -148,14 +148,14 @@ public class DisplayManager : ObjectG */ public Display getDefaultDisplay() { - auto p = gdk_display_manager_get_default_display(gdkDisplayManager); + auto __p = gdk_display_manager_get_default_display(gdkDisplayManager); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Display)(cast(GdkDisplay*) p); + return ObjectG.getDObject!(Display)(cast(GdkDisplay*) __p); } /** @@ -169,14 +169,14 @@ public class DisplayManager : ObjectG */ public ListSG listDisplays() { - auto p = gdk_display_manager_list_displays(gdkDisplayManager); + auto __p = gdk_display_manager_list_displays(gdkDisplayManager); - if(p is null) + if(__p is null) { return null; } - return new ListSG(cast(GSList*) p); + return new ListSG(cast(GSList*) __p); } /** @@ -192,14 +192,14 @@ public class DisplayManager : ObjectG */ public Display openDisplay(string name) { - auto p = gdk_display_manager_open_display(gdkDisplayManager, Str.toStringz(name)); + auto __p = gdk_display_manager_open_display(gdkDisplayManager, Str.toStringz(name)); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Display)(cast(GdkDisplay*) p); + return ObjectG.getDObject!(Display)(cast(GdkDisplay*) __p); } /** diff --git a/generated/gtkd/gdk/DragContext.d b/generated/gtkd/gdk/DragContext.d index a13dcb039..bb9d7d2da 100644 --- a/generated/gtkd/gdk/DragContext.d +++ b/generated/gtkd/gdk/DragContext.d @@ -94,14 +94,14 @@ public class DragContext : ObjectG */ public Window getDestWindow() { - auto p = gdk_drag_context_get_dest_window(gdkDragContext); + auto __p = gdk_drag_context_get_dest_window(gdkDragContext); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Window)(cast(GdkWindow*) p); + return ObjectG.getDObject!(Window)(cast(GdkWindow*) __p); } /** @@ -111,14 +111,14 @@ public class DragContext : ObjectG */ public Device getDevice() { - auto p = gdk_drag_context_get_device(gdkDragContext); + auto __p = gdk_drag_context_get_device(gdkDragContext); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Device)(cast(GdkDevice*) p); + return ObjectG.getDObject!(Device)(cast(GdkDevice*) __p); } /** @@ -135,14 +135,14 @@ public class DragContext : ObjectG */ public Window getDragWindow() { - auto p = gdk_drag_context_get_drag_window(gdkDragContext); + auto __p = gdk_drag_context_get_drag_window(gdkDragContext); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Window)(cast(GdkWindow*) p); + return ObjectG.getDObject!(Window)(cast(GdkWindow*) __p); } /** @@ -178,14 +178,14 @@ public class DragContext : ObjectG */ public Window getSourceWindow() { - auto p = gdk_drag_context_get_source_window(gdkDragContext); + auto __p = gdk_drag_context_get_source_window(gdkDragContext); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Window)(cast(GdkWindow*) p); + return ObjectG.getDObject!(Window)(cast(GdkWindow*) __p); } /** @@ -209,14 +209,14 @@ public class DragContext : ObjectG */ public ListG listTargets() { - auto p = gdk_drag_context_list_targets(gdkDragContext); + auto __p = gdk_drag_context_list_targets(gdkDragContext); - if(p is null) + if(__p is null) { return null; } - return new ListG(cast(GList*) p); + return new ListG(cast(GList*) __p); } /** @@ -379,14 +379,14 @@ public class DragContext : ObjectG */ public static DragContext dragBegin(Window window, ListG targets) { - auto p = gdk_drag_begin((window is null) ? null : window.getWindowStruct(), (targets is null) ? null : targets.getListGStruct()); + auto __p = gdk_drag_begin((window is null) ? null : window.getWindowStruct(), (targets is null) ? null : targets.getListGStruct()); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(DragContext)(cast(GdkDragContext*) p, true); + return ObjectG.getDObject!(DragContext)(cast(GdkDragContext*) __p, true); } /** @@ -404,14 +404,14 @@ public class DragContext : ObjectG */ public static DragContext dragBeginForDevice(Window window, Device device, ListG targets) { - auto p = gdk_drag_begin_for_device((window is null) ? null : window.getWindowStruct(), (device is null) ? null : device.getDeviceStruct(), (targets is null) ? null : targets.getListGStruct()); + auto __p = gdk_drag_begin_for_device((window is null) ? null : window.getWindowStruct(), (device is null) ? null : device.getDeviceStruct(), (targets is null) ? null : targets.getListGStruct()); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(DragContext)(cast(GdkDragContext*) p, true); + return ObjectG.getDObject!(DragContext)(cast(GdkDragContext*) __p, true); } /** @@ -433,14 +433,14 @@ public class DragContext : ObjectG */ public static DragContext dragBeginFromPoint(Window window, Device device, ListG targets, int xRoot, int yRoot) { - auto p = gdk_drag_begin_from_point((window is null) ? null : window.getWindowStruct(), (device is null) ? null : device.getDeviceStruct(), (targets is null) ? null : targets.getListGStruct(), xRoot, yRoot); + auto __p = gdk_drag_begin_from_point((window is null) ? null : window.getWindowStruct(), (device is null) ? null : device.getDeviceStruct(), (targets is null) ? null : targets.getListGStruct(), xRoot, yRoot); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(DragContext)(cast(GdkDragContext*) p, true); + return ObjectG.getDObject!(DragContext)(cast(GdkDragContext*) __p, true); } /** diff --git a/generated/gtkd/gdk/DrawingContext.d b/generated/gtkd/gdk/DrawingContext.d index f9b0fa1b3..b03522e45 100644 --- a/generated/gtkd/gdk/DrawingContext.d +++ b/generated/gtkd/gdk/DrawingContext.d @@ -96,14 +96,14 @@ public class DrawingContext : ObjectG */ public Context getCairoContext() { - auto p = gdk_drawing_context_get_cairo_context(gdkDrawingContext); + auto __p = gdk_drawing_context_get_cairo_context(gdkDrawingContext); - if(p is null) + if(__p is null) { return null; } - return new Context(cast(cairo_t*) p); + return new Context(cast(cairo_t*) __p); } /** @@ -115,14 +115,14 @@ public class DrawingContext : ObjectG */ public Region getClip() { - auto p = gdk_drawing_context_get_clip(gdkDrawingContext); + auto __p = gdk_drawing_context_get_clip(gdkDrawingContext); - if(p is null) + if(__p is null) { return null; } - return new Region(cast(cairo_region_t*) p); + return new Region(cast(cairo_region_t*) __p); } /** @@ -134,14 +134,14 @@ public class DrawingContext : ObjectG */ public Window getWindow() { - auto p = gdk_drawing_context_get_window(gdkDrawingContext); + auto __p = gdk_drawing_context_get_window(gdkDrawingContext); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Window)(cast(GdkWindow*) p); + return ObjectG.getDObject!(Window)(cast(GdkWindow*) __p); } /** diff --git a/generated/gtkd/gdk/Event.d b/generated/gtkd/gdk/Event.d index f8e254297..4e20c8f3e 100644 --- a/generated/gtkd/gdk/Event.d +++ b/generated/gtkd/gdk/Event.d @@ -260,14 +260,14 @@ public class Event */ public this(GdkEventType type) { - auto p = gdk_event_new(type); + auto __p = gdk_event_new(type); - if(p is null) + if(__p is null) { throw new ConstructionException("null returned by new"); } - this(cast(GdkEvent*) p); + this(cast(GdkEvent*) __p); } /** @@ -336,14 +336,14 @@ public class Event */ public Event copy() { - auto p = gdk_event_copy(gdkEvent); + auto __p = gdk_event_copy(gdkEvent); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Event)(cast(GdkEvent*) p, true); + return ObjectG.getDObject!(Event)(cast(GdkEvent*) __p, true); } /** @@ -427,14 +427,14 @@ public class Event */ public Device getDevice() { - auto p = gdk_event_get_device(gdkEvent); + auto __p = gdk_event_get_device(gdkEvent); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Device)(cast(GdkDevice*) p); + return ObjectG.getDObject!(Device)(cast(GdkDevice*) __p); } /** @@ -453,14 +453,14 @@ public class Event */ public DeviceTool getDeviceTool() { - auto p = gdk_event_get_device_tool(gdkEvent); + auto __p = gdk_event_get_device_tool(gdkEvent); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(DeviceTool)(cast(GdkDeviceTool*) p); + return ObjectG.getDObject!(DeviceTool)(cast(GdkDeviceTool*) __p); } /** @@ -580,24 +580,27 @@ public class Event */ public Screen getScreen() { - auto p = gdk_event_get_screen(gdkEvent); + auto __p = gdk_event_get_screen(gdkEvent); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Screen)(cast(GdkScreen*) p); + return ObjectG.getDObject!(Screen)(cast(GdkScreen*) __p); } /** * Retrieves the scroll deltas from a #GdkEvent * + * See also: gdk_event_get_scroll_direction() + * * Params: * deltaX = return location for X delta * deltaY = return location for Y delta * * Returns: %TRUE if the event contains smooth scroll information + * and %FALSE otherwise * * Since: 3.4 */ @@ -609,10 +612,48 @@ public class Event /** * Extracts the scroll direction from an event. * + * If @event is not of type %GDK_SCROLL, the contents of @direction + * are undefined. + * + * If you wish to handle both discrete and smooth scrolling, you + * should check the return value of this function, or of + * gdk_event_get_scroll_deltas(); for instance: + * + * |[ + * GdkScrollDirection direction; + * double vscroll_factor = 0.0; + * double x_scroll, y_scroll; + * + * if (gdk_event_get_scroll_direction (event, &direction)) + * { + * // Handle discrete scrolling with a known constant delta; + * const double delta = 12.0; + * + * switch (direction) + * { + * case GDK_SCROLL_UP: + * vscroll_factor = -delta; + * break; + * case GDK_SCROLL_DOWN: + * vscroll_factor = delta; + * break; + * default: + * // no scrolling + * break; + * } + * } + * else if (gdk_event_get_scroll_deltas (event, &x_scroll, &y_scroll)) + * { + * // Handle smooth scrolling directly + * vscroll_factor = y_scroll; + * } + * ]| + * * Params: * direction = location to store the scroll direction * * Returns: %TRUE if the event delivered a scroll direction + * and %FALSE otherwise * * Since: 3.2 */ @@ -630,14 +671,14 @@ public class Event */ public Seat getSeat() { - auto p = gdk_event_get_seat(gdkEvent); + auto __p = gdk_event_get_seat(gdkEvent); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Seat)(cast(GdkSeat*) p); + return ObjectG.getDObject!(Seat)(cast(GdkSeat*) __p); } /** @@ -657,14 +698,14 @@ public class Event */ public Device getSourceDevice() { - auto p = gdk_event_get_source_device(gdkEvent); + auto __p = gdk_event_get_source_device(gdkEvent); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Device)(cast(GdkDevice*) p); + return ObjectG.getDObject!(Device)(cast(GdkDevice*) __p); } /** @@ -703,14 +744,14 @@ public class Event */ public Window getWindow() { - auto p = gdk_event_get_window(gdkEvent); + auto __p = gdk_event_get_window(gdkEvent); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Window)(cast(GdkWindow*) p); + return ObjectG.getDObject!(Window)(cast(GdkWindow*) __p); } /** @@ -831,14 +872,14 @@ public class Event */ public static Event get() { - auto p = gdk_event_get(); + auto __p = gdk_event_get(); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Event)(cast(GdkEvent*) p, true); + return ObjectG.getDObject!(Event)(cast(GdkEvent*) __p, true); } /** @@ -870,14 +911,14 @@ public class Event */ public static Event peek() { - auto p = gdk_event_peek(); + auto __p = gdk_event_peek(); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Event)(cast(GdkEvent*) p, true); + return ObjectG.getDObject!(Event)(cast(GdkEvent*) __p, true); } /** diff --git a/generated/gtkd/gdk/FrameClock.d b/generated/gtkd/gdk/FrameClock.d index 31017a551..b4ca1400f 100644 --- a/generated/gtkd/gdk/FrameClock.d +++ b/generated/gtkd/gdk/FrameClock.d @@ -141,14 +141,14 @@ public class FrameClock : ObjectG */ public FrameTimings getCurrentTimings() { - auto p = gdk_frame_clock_get_current_timings(gdkFrameClock); + auto __p = gdk_frame_clock_get_current_timings(gdkFrameClock); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(FrameTimings)(cast(GdkFrameTimings*) p); + return ObjectG.getDObject!(FrameTimings)(cast(GdkFrameTimings*) __p); } /** @@ -243,14 +243,14 @@ public class FrameClock : ObjectG */ public FrameTimings getTimings(long frameCounter) { - auto p = gdk_frame_clock_get_timings(gdkFrameClock, frameCounter); + auto __p = gdk_frame_clock_get_timings(gdkFrameClock, frameCounter); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(FrameTimings)(cast(GdkFrameTimings*) p); + return ObjectG.getDObject!(FrameTimings)(cast(GdkFrameTimings*) __p); } /** diff --git a/generated/gtkd/gdk/FrameTimings.d b/generated/gtkd/gdk/FrameTimings.d index edc522828..97847e7db 100644 --- a/generated/gtkd/gdk/FrameTimings.d +++ b/generated/gtkd/gdk/FrameTimings.d @@ -191,14 +191,14 @@ public class FrameTimings */ public FrameTimings ref_() { - auto p = gdk_frame_timings_ref(gdkFrameTimings); + auto __p = gdk_frame_timings_ref(gdkFrameTimings); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(FrameTimings)(cast(GdkFrameTimings*) p, true); + return ObjectG.getDObject!(FrameTimings)(cast(GdkFrameTimings*) __p, true); } /** diff --git a/generated/gtkd/gdk/GLContext.d b/generated/gtkd/gdk/GLContext.d index 73f446b53..7fa80201d 100644 --- a/generated/gtkd/gdk/GLContext.d +++ b/generated/gtkd/gdk/GLContext.d @@ -144,14 +144,14 @@ public class GLContext : ObjectG */ public static GLContext getCurrent() { - auto p = gdk_gl_context_get_current(); + auto __p = gdk_gl_context_get_current(); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(GLContext)(cast(GdkGLContext*) p); + return ObjectG.getDObject!(GLContext)(cast(GdkGLContext*) __p); } /** @@ -175,14 +175,14 @@ public class GLContext : ObjectG */ public Display getDisplay() { - auto p = gdk_gl_context_get_display(gdkGLContext); + auto __p = gdk_gl_context_get_display(gdkGLContext); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Display)(cast(GdkDisplay*) p); + return ObjectG.getDObject!(Display)(cast(GdkDisplay*) __p); } /** @@ -221,14 +221,14 @@ public class GLContext : ObjectG */ public GLContext getSharedContext() { - auto p = gdk_gl_context_get_shared_context(gdkGLContext); + auto __p = gdk_gl_context_get_shared_context(gdkGLContext); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(GLContext)(cast(GdkGLContext*) p); + return ObjectG.getDObject!(GLContext)(cast(GdkGLContext*) __p); } /** @@ -268,14 +268,14 @@ public class GLContext : ObjectG */ public Window getWindow() { - auto p = gdk_gl_context_get_window(gdkGLContext); + auto __p = gdk_gl_context_get_window(gdkGLContext); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Window)(cast(GdkWindow*) p); + return ObjectG.getDObject!(Window)(cast(GdkWindow*) __p); } /** @@ -330,14 +330,14 @@ public class GLContext : ObjectG { GError* err = null; - auto p = gdk_gl_context_realize(gdkGLContext, &err) != 0; + auto __p = gdk_gl_context_realize(gdkGLContext, &err) != 0; if (err !is null) { throw new GException( new ErrorG(err) ); } - return p; + return __p; } /** diff --git a/generated/gtkd/gdk/Gdk.d b/generated/gtkd/gdk/Gdk.d index 53270ee17..077b9e84a 100644 --- a/generated/gtkd/gdk/Gdk.d +++ b/generated/gtkd/gdk/Gdk.d @@ -29,6 +29,7 @@ private import gdk.Window; private import gdk.c.functions; public import gdk.c.types; private import glib.Str; +private import glib.c.functions; public import gtkc.gdktypes; @@ -211,11 +212,11 @@ public struct Gdk int argc = cast(int)argv.length; char** outargv = Str.toStringzArray(argv); - auto p = gdk_init_check(&argc, &outargv) != 0; + auto __p = gdk_init_check(&argc, &outargv) != 0; argv = Str.toStringArray(outargv, argc); - return p; + return __p; } /** diff --git a/generated/gtkd/gdk/Keymap.d b/generated/gtkd/gdk/Keymap.d index 987eeff57..e865f07bd 100644 --- a/generated/gtkd/gdk/Keymap.d +++ b/generated/gtkd/gdk/Keymap.d @@ -28,6 +28,7 @@ private import gdk.Display; private import gdk.c.functions; public import gdk.c.types; private import glib.Str; +private import glib.c.functions; private import gobject.ObjectG; private import gobject.Signals; public import gtkc.gdktypes; @@ -86,14 +87,14 @@ public class Keymap : ObjectG */ public static Keymap getDefault() { - auto p = gdk_keymap_get_default(); + auto __p = gdk_keymap_get_default(); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Keymap)(cast(GdkKeymap*) p); + return ObjectG.getDObject!(Keymap)(cast(GdkKeymap*) __p); } /** @@ -108,14 +109,14 @@ public class Keymap : ObjectG */ public static Keymap getForDisplay(Display display) { - auto p = gdk_keymap_get_for_display((display is null) ? null : display.getDisplayStruct()); + auto __p = gdk_keymap_get_for_display((display is null) ? null : display.getDisplayStruct()); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Keymap)(cast(GdkKeymap*) p); + return ObjectG.getDObject!(Keymap)(cast(GdkKeymap*) __p); } /** @@ -183,16 +184,16 @@ public class Keymap : ObjectG */ public bool getEntriesForKeycode(uint hardwareKeycode, out GdkKeymapKey[] keys, out uint[] keyvals) { - GdkKeymapKey* outkeys = null; - uint* outkeyvals = null; + GdkKeymapKey* outkeys; + uint* outkeyvals; int nEntries; - auto p = gdk_keymap_get_entries_for_keycode(gdkKeymap, hardwareKeycode, &outkeys, &outkeyvals, &nEntries) != 0; + auto __p = gdk_keymap_get_entries_for_keycode(gdkKeymap, hardwareKeycode, &outkeys, &outkeyvals, &nEntries) != 0; keys = outkeys[0 .. nEntries]; keyvals = outkeyvals[0 .. nEntries]; - return p; + return __p; } /** @@ -217,14 +218,14 @@ public class Keymap : ObjectG */ public bool getEntriesForKeyval(uint keyval, out GdkKeymapKey[] keys) { - GdkKeymapKey* outkeys = null; + GdkKeymapKey* outkeys; int nKeys; - auto p = gdk_keymap_get_entries_for_keyval(gdkKeymap, keyval, &outkeys, &nKeys) != 0; + auto __p = gdk_keymap_get_entries_for_keyval(gdkKeymap, keyval, &outkeys, &nKeys) != 0; keys = outkeys[0 .. nKeys]; - return p; + return __p; } /** diff --git a/generated/gtkd/gdk/Keysyms.d b/generated/gtkd/gdk/Keysyms.d index 07a97b891..4c23efe1b 100644 --- a/generated/gtkd/gdk/Keysyms.d +++ b/generated/gtkd/gdk/Keysyms.d @@ -279,6 +279,7 @@ public enum GdkKeysyms GDK_AudioNext = 269025047, GDK_AudioPause = 269025073, GDK_AudioPlay = 269025044, + GDK_AudioPreset = 269025206, GDK_AudioPrev = 269025046, GDK_AudioRaiseVolume = 269025043, GDK_AudioRandomPlay = 269025177, @@ -879,6 +880,7 @@ public enum GdkKeysyms GDK_KbdBrightnessUp = 269025029, GDK_KbdLightOnOff = 269025028, GDK_Kcedilla = 979, + GDK_Keyboard = 269025203, GDK_Korean_Won = 3839, GDK_L = 76, GDK_L1 = 65480, @@ -1062,6 +1064,7 @@ public enum GdkKeysyms GDK_R7 = 65496, GDK_R8 = 65497, GDK_R9 = 65498, + GDK_RFKill = 269025205, GDK_Racute = 448, GDK_Rcaron = 472, GDK_Rcedilla = 931, @@ -1372,6 +1375,7 @@ public enum GdkKeysyms GDK_VoidSymbol = 16777215, GDK_W = 87, GDK_WLAN = 269025173, + GDK_WWAN = 269025204, GDK_WWW = 269025070, GDK_Wacute = 16785026, GDK_WakeUp = 269025067, @@ -1766,6 +1770,7 @@ public enum GdkKeysyms GDK_dead_abovedot = 65110, GDK_dead_abovereversedcomma = 65125, GDK_dead_abovering = 65112, + GDK_dead_aboveverticalline = 65169, GDK_dead_acute = 65105, GDK_dead_belowbreve = 65131, GDK_dead_belowcircumflex = 65129, @@ -1775,6 +1780,7 @@ public enum GdkKeysyms GDK_dead_belowmacron = 65128, GDK_dead_belowring = 65127, GDK_dead_belowtilde = 65130, + GDK_dead_belowverticalline = 65170, GDK_dead_breve = 65109, GDK_dead_capital_schwa = 65163, GDK_dead_caron = 65114, @@ -1793,6 +1799,8 @@ public enum GdkKeysyms GDK_dead_i = 65156, GDK_dead_invertedbreve = 65133, GDK_dead_iota = 65117, + GDK_dead_longsolidusoverlay = 65171, + GDK_dead_lowline = 65168, GDK_dead_macron = 65108, GDK_dead_o = 65158, GDK_dead_ogonek = 65116, diff --git a/generated/gtkd/gdk/MonitorG.d b/generated/gtkd/gdk/MonitorG.d index dc68b67c6..9a6456c5f 100644 --- a/generated/gtkd/gdk/MonitorG.d +++ b/generated/gtkd/gdk/MonitorG.d @@ -28,6 +28,7 @@ private import gdk.Display; private import gdk.c.functions; public import gdk.c.types; private import glib.Str; +private import glib.c.functions; private import gobject.ObjectG; private import gobject.Signals; public import gtkc.gdktypes; @@ -88,14 +89,14 @@ public class MonitorG : ObjectG */ public Display getDisplay() { - auto p = gdk_monitor_get_display(gdkMonitor); + auto __p = gdk_monitor_get_display(gdkMonitor); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Display)(cast(GdkDisplay*) p); + return ObjectG.getDObject!(Display)(cast(GdkDisplay*) __p); } /** @@ -126,7 +127,12 @@ public class MonitorG : ObjectG } /** - * Gets the name of the monitor's manufacturer, if available. + * Gets the name or PNP ID of the monitor's manufacturer, if available. + * + * Note that this value might also vary depending on actual + * display backend. + * + * PNP ID registry is located at https://uefi.org/pnp_id_list * * Returns: the name of the manufacturer, or %NULL */ diff --git a/generated/gtkd/gdk/Pango.d b/generated/gtkd/gdk/Pango.d index b4557e1b3..ef1f4704e 100644 --- a/generated/gtkd/gdk/Pango.d +++ b/generated/gtkd/gdk/Pango.d @@ -57,14 +57,14 @@ private import pango.PgLayoutLine; */ public PgContext contextGet() { - auto p = gdk_pango_context_get(); + auto __p = gdk_pango_context_get(); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(PgContext)(cast(PangoContext*) p, true); + return ObjectG.getDObject!(PgContext)(cast(PangoContext*) __p, true); } /** @@ -91,14 +91,14 @@ public PgContext contextGet() */ public PgContext contextGetForScreen(Screen screen) { - auto p = gdk_pango_context_get_for_screen((screen is null) ? null : screen.getScreenStruct()); + auto __p = gdk_pango_context_get_for_screen((screen is null) ? null : screen.getScreenStruct()); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(PgContext)(cast(PangoContext*) p, true); + return ObjectG.getDObject!(PgContext)(cast(PangoContext*) __p, true); } /** @@ -123,14 +123,14 @@ public PgContext contextGetForScreen(Screen screen) */ public Region layoutGetClipRegion(PgLayout layout, int xOrigin, int yOrigin, int* indexRanges, int nRanges) { - auto p = gdk_pango_layout_get_clip_region((layout is null) ? null : layout.getPgLayoutStruct(), xOrigin, yOrigin, indexRanges, nRanges); + auto __p = gdk_pango_layout_get_clip_region((layout is null) ? null : layout.getPgLayoutStruct(), xOrigin, yOrigin, indexRanges, nRanges); - if(p is null) + if(__p is null) { return null; } - return new Region(cast(cairo_region_t*) p); + return new Region(cast(cairo_region_t*) __p); } /** @@ -162,14 +162,14 @@ public Region layoutGetClipRegion(PgLayout layout, int xOrigin, int yOrigin, int */ public Region layoutLineGetClipRegion(PgLayoutLine line, int xOrigin, int yOrigin, int[] indexRanges, int nRanges) { - auto p = gdk_pango_layout_line_get_clip_region((line is null) ? null : line.getPgLayoutLineStruct(), xOrigin, yOrigin, indexRanges.ptr, nRanges); + auto __p = gdk_pango_layout_line_get_clip_region((line is null) ? null : line.getPgLayoutLineStruct(), xOrigin, yOrigin, indexRanges.ptr, nRanges); - if(p is null) + if(__p is null) { return null; } - return new Region(cast(cairo_region_t*) p); + return new Region(cast(cairo_region_t*) __p); } /** @@ -196,12 +196,12 @@ public Region layoutLineGetClipRegion(PgLayoutLine line, int xOrigin, int yOrigi */ public PgContext contextGetForDisplay(Display display) { - auto p = gdk_pango_context_get_for_display((display is null) ? null : display.getDisplayStruct()); + auto __p = gdk_pango_context_get_for_display((display is null) ? null : display.getDisplayStruct()); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(PgContext)(cast(PangoContext*) p, true); + return ObjectG.getDObject!(PgContext)(cast(PangoContext*) __p, true); } diff --git a/generated/gtkd/gdk/Pixbuf.d b/generated/gtkd/gdk/Pixbuf.d index 0f8813d6c..a23a60f1d 100644 --- a/generated/gtkd/gdk/Pixbuf.d +++ b/generated/gtkd/gdk/Pixbuf.d @@ -60,14 +60,14 @@ public import gdkpixbuf.Pixbuf; */ public Pixbuf getFromSurface(Surface surface, int srcX, int srcY, int width, int height) { - auto p = gdk_pixbuf_get_from_surface((surface is null) ? null : surface.getSurfaceStruct(), srcX, srcY, width, height); + auto __p = gdk_pixbuf_get_from_surface((surface is null) ? null : surface.getSurfaceStruct(), srcX, srcY, width, height); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Pixbuf)(cast(GdkPixbuf*) p, true); + return ObjectG.getDObject!(Pixbuf)(cast(GdkPixbuf*) __p, true); } /** @@ -110,12 +110,12 @@ public Pixbuf getFromSurface(Surface surface, int srcX, int srcY, int width, int */ public Pixbuf getFromWindow(Window window, int srcX, int srcY, int width, int height) { - auto p = gdk_pixbuf_get_from_window((window is null) ? null : window.getWindowStruct(), srcX, srcY, width, height); + auto __p = gdk_pixbuf_get_from_window((window is null) ? null : window.getWindowStruct(), srcX, srcY, width, height); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Pixbuf)(cast(GdkPixbuf*) p, true); + return ObjectG.getDObject!(Pixbuf)(cast(GdkPixbuf*) __p, true); } diff --git a/generated/gtkd/gdk/RGBA.d b/generated/gtkd/gdk/RGBA.d index 83c479f12..c036d0f4c 100644 --- a/generated/gtkd/gdk/RGBA.d +++ b/generated/gtkd/gdk/RGBA.d @@ -28,6 +28,7 @@ private import gdk.c.functions; public import gdk.c.types; private import glib.MemorySlice; private import glib.Str; +private import glib.c.functions; private import gobject.ObjectG; public import gtkc.gdktypes; private import gtkd.Loader; @@ -172,14 +173,14 @@ public final class RGBA */ public RGBA copy() { - auto p = gdk_rgba_copy(gdkRGBA); + auto __p = gdk_rgba_copy(gdkRGBA); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(RGBA)(cast(GdkRGBA*) p, true); + return ObjectG.getDObject!(RGBA)(cast(GdkRGBA*) __p, true); } /** diff --git a/generated/gtkd/gdk/Screen.d b/generated/gtkd/gdk/Screen.d index f1affbeb3..afc018dd7 100644 --- a/generated/gtkd/gdk/Screen.d +++ b/generated/gtkd/gdk/Screen.d @@ -32,6 +32,7 @@ private import gdk.c.functions; public import gdk.c.types; private import glib.ListG; private import glib.Str; +private import glib.c.functions; private import gobject.ObjectG; private import gobject.Signals; private import gobject.Value; @@ -98,14 +99,14 @@ public class Screen : ObjectG */ public static Screen getDefault() { - auto p = gdk_screen_get_default(); + auto __p = gdk_screen_get_default(); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Screen)(cast(GdkScreen*) p); + return ObjectG.getDObject!(Screen)(cast(GdkScreen*) __p); } /** @@ -187,14 +188,14 @@ public class Screen : ObjectG */ public Window getActiveWindow() { - auto p = gdk_screen_get_active_window(gdkScreen); + auto __p = gdk_screen_get_active_window(gdkScreen); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Window)(cast(GdkWindow*) p, true); + return ObjectG.getDObject!(Window)(cast(GdkWindow*) __p, true); } /** @@ -206,14 +207,14 @@ public class Screen : ObjectG */ public Display getDisplay() { - auto p = gdk_screen_get_display(gdkScreen); + auto __p = gdk_screen_get_display(gdkScreen); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Display)(cast(GdkDisplay*) p); + return ObjectG.getDObject!(Display)(cast(GdkDisplay*) __p); } /** @@ -226,14 +227,14 @@ public class Screen : ObjectG */ public FontOption getFontOptions() { - auto p = gdk_screen_get_font_options(gdkScreen); + auto __p = gdk_screen_get_font_options(gdkScreen); - if(p is null) + if(__p is null) { return null; } - return new FontOption(cast(cairo_font_options_t*) p); + return new FontOption(cast(cairo_font_options_t*) __p); } /** @@ -531,14 +532,14 @@ public class Screen : ObjectG */ public Visual getRgbaVisual() { - auto p = gdk_screen_get_rgba_visual(gdkScreen); + auto __p = gdk_screen_get_rgba_visual(gdkScreen); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Visual)(cast(GdkVisual*) p); + return ObjectG.getDObject!(Visual)(cast(GdkVisual*) __p); } /** @@ -550,14 +551,14 @@ public class Screen : ObjectG */ public Window getRootWindow() { - auto p = gdk_screen_get_root_window(gdkScreen); + auto __p = gdk_screen_get_root_window(gdkScreen); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Window)(cast(GdkWindow*) p); + return ObjectG.getDObject!(Window)(cast(GdkWindow*) __p); } /** @@ -592,14 +593,14 @@ public class Screen : ObjectG */ public Visual getSystemVisual() { - auto p = gdk_screen_get_system_visual(gdkScreen); + auto __p = gdk_screen_get_system_visual(gdkScreen); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Visual)(cast(GdkVisual*) p); + return ObjectG.getDObject!(Visual)(cast(GdkVisual*) __p); } /** @@ -616,14 +617,14 @@ public class Screen : ObjectG */ public ListG getToplevelWindows() { - auto p = gdk_screen_get_toplevel_windows(gdkScreen); + auto __p = gdk_screen_get_toplevel_windows(gdkScreen); - if(p is null) + if(__p is null) { return null; } - return new ListG(cast(GList*) p); + return new ListG(cast(GList*) __p); } /** @@ -684,14 +685,14 @@ public class Screen : ObjectG */ public ListG getWindowStack() { - auto p = gdk_screen_get_window_stack(gdkScreen); + auto __p = gdk_screen_get_window_stack(gdkScreen); - if(p is null) + if(__p is null) { return null; } - return new ListG(cast(GList*) p, true); + return new ListG(cast(GList*) __p, true); } /** @@ -726,14 +727,14 @@ public class Screen : ObjectG */ public ListG listVisuals() { - auto p = gdk_screen_list_visuals(gdkScreen); + auto __p = gdk_screen_list_visuals(gdkScreen); - if(p is null) + if(__p is null) { return null; } - return new ListG(cast(GList*) p); + return new ListG(cast(GList*) __p); } /** diff --git a/generated/gtkd/gdk/Seat.d b/generated/gtkd/gdk/Seat.d index c45793d59..de2a0d644 100644 --- a/generated/gtkd/gdk/Seat.d +++ b/generated/gtkd/gdk/Seat.d @@ -98,14 +98,14 @@ public class Seat : ObjectG */ public Display getDisplay() { - auto p = gdk_seat_get_display(gdkSeat); + auto __p = gdk_seat_get_display(gdkSeat); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Display)(cast(GdkDisplay*) p); + return ObjectG.getDObject!(Display)(cast(GdkDisplay*) __p); } /** @@ -118,14 +118,14 @@ public class Seat : ObjectG */ public Device getKeyboard() { - auto p = gdk_seat_get_keyboard(gdkSeat); + auto __p = gdk_seat_get_keyboard(gdkSeat); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Device)(cast(GdkDevice*) p); + return ObjectG.getDObject!(Device)(cast(GdkDevice*) __p); } /** @@ -138,14 +138,14 @@ public class Seat : ObjectG */ public Device getPointer() { - auto p = gdk_seat_get_pointer(gdkSeat); + auto __p = gdk_seat_get_pointer(gdkSeat); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Device)(cast(GdkDevice*) p); + return ObjectG.getDObject!(Device)(cast(GdkDevice*) __p); } /** @@ -162,14 +162,14 @@ public class Seat : ObjectG */ public ListG getSlaves(GdkSeatCapabilities capabilities) { - auto p = gdk_seat_get_slaves(gdkSeat, capabilities); + auto __p = gdk_seat_get_slaves(gdkSeat, capabilities); - if(p is null) + if(__p is null) { return null; } - return new ListG(cast(GList*) p); + return new ListG(cast(GList*) __p); } /** diff --git a/generated/gtkd/gdk/Selection.d b/generated/gtkd/gdk/Selection.d index 0b7981834..b26af1322 100644 --- a/generated/gtkd/gdk/Selection.d +++ b/generated/gtkd/gdk/Selection.d @@ -29,6 +29,7 @@ private import gdk.Window; private import gdk.c.functions; public import gdk.c.types; private import glib.Str; +private import glib.c.functions; private import gobject.ObjectG; public import gtkc.gdktypes; @@ -71,14 +72,14 @@ public struct Selection */ public static Window ownerGet(GdkAtom selection) { - auto p = gdk_selection_owner_get(selection); + auto __p = gdk_selection_owner_get(selection); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Window)(cast(GdkWindow*) p); + return ObjectG.getDObject!(Window)(cast(GdkWindow*) __p); } /** @@ -101,14 +102,14 @@ public struct Selection */ public static Window ownerGetForDisplay(Display display, GdkAtom selection) { - auto p = gdk_selection_owner_get_for_display((display is null) ? null : display.getDisplayStruct(), selection); + auto __p = gdk_selection_owner_get_for_display((display is null) ? null : display.getDisplayStruct(), selection); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Window)(cast(GdkWindow*) p); + return ObjectG.getDObject!(Window)(cast(GdkWindow*) __p); } /** diff --git a/generated/gtkd/gdk/Visual.d b/generated/gtkd/gdk/Visual.d index 60cccdc92..62ff42411 100644 --- a/generated/gtkd/gdk/Visual.d +++ b/generated/gtkd/gdk/Visual.d @@ -82,14 +82,14 @@ public class Visual : ObjectG */ public static Visual getBest() { - auto p = gdk_visual_get_best(); + auto __p = gdk_visual_get_best(); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Visual)(cast(GdkVisual*) p); + return ObjectG.getDObject!(Visual)(cast(GdkVisual*) __p); } /** @@ -136,14 +136,14 @@ public class Visual : ObjectG */ public static Visual getBestWithBoth(int depth, GdkVisualType visualType) { - auto p = gdk_visual_get_best_with_both(depth, visualType); + auto __p = gdk_visual_get_best_with_both(depth, visualType); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Visual)(cast(GdkVisual*) p); + return ObjectG.getDObject!(Visual)(cast(GdkVisual*) __p); } /** @@ -162,14 +162,14 @@ public class Visual : ObjectG */ public static Visual getBestWithDepth(int depth) { - auto p = gdk_visual_get_best_with_depth(depth); + auto __p = gdk_visual_get_best_with_depth(depth); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Visual)(cast(GdkVisual*) p); + return ObjectG.getDObject!(Visual)(cast(GdkVisual*) __p); } /** @@ -188,14 +188,14 @@ public class Visual : ObjectG */ public static Visual getBestWithType(GdkVisualType visualType) { - auto p = gdk_visual_get_best_with_type(visualType); + auto __p = gdk_visual_get_best_with_type(visualType); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Visual)(cast(GdkVisual*) p); + return ObjectG.getDObject!(Visual)(cast(GdkVisual*) __p); } /** @@ -209,14 +209,14 @@ public class Visual : ObjectG */ public static Visual getSystem() { - auto p = gdk_visual_get_system(); + auto __p = gdk_visual_get_system(); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Visual)(cast(GdkVisual*) p); + return ObjectG.getDObject!(Visual)(cast(GdkVisual*) __p); } /** @@ -349,14 +349,14 @@ public class Visual : ObjectG */ public Screen getScreen() { - auto p = gdk_visual_get_screen(gdkVisual); + auto __p = gdk_visual_get_screen(gdkVisual); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Screen)(cast(GdkScreen*) p); + return ObjectG.getDObject!(Screen)(cast(GdkScreen*) __p); } /** @@ -386,14 +386,14 @@ public class Visual : ObjectG */ public static ListG listVisuals() { - auto p = gdk_list_visuals(); + auto __p = gdk_list_visuals(); - if(p is null) + if(__p is null) { return null; } - return new ListG(cast(GList*) p); + return new ListG(cast(GList*) __p); } /** @@ -413,7 +413,7 @@ public class Visual : ObjectG */ public static void queryDepths(out int[] depths) { - int* outdepths = null; + int* outdepths; int count; gdk_query_depths(&outdepths, &count); @@ -438,7 +438,7 @@ public class Visual : ObjectG */ public static void queryVisualTypes(out GdkVisualType[] visualTypes) { - GdkVisualType* outvisualTypes = null; + GdkVisualType* outvisualTypes; int count; gdk_query_visual_types(&outvisualTypes, &count); diff --git a/generated/gtkd/gdk/Window.d b/generated/gtkd/gdk/Window.d index 8e329e801..4a23bdfb3 100644 --- a/generated/gtkd/gdk/Window.d +++ b/generated/gtkd/gdk/Window.d @@ -108,14 +108,14 @@ public class Window : ObjectG */ public this(Window parent, GdkWindowAttr* attributes, int attributesMask) { - auto p = gdk_window_new((parent is null) ? null : parent.getWindowStruct(), attributes, attributesMask); + auto __p = gdk_window_new((parent is null) ? null : parent.getWindowStruct(), attributes, attributesMask); - if(p is null) + if(__p is null) { throw new ConstructionException("null returned by new"); } - this(cast(GdkWindow*) p, true); + this(cast(GdkWindow*) __p, true); } /** @@ -138,14 +138,14 @@ public class Window : ObjectG */ public static Window atPointer(out int winX, out int winY) { - auto p = gdk_window_at_pointer(&winX, &winY); + auto __p = gdk_window_at_pointer(&winX, &winY); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Window)(cast(GdkWindow*) p); + return ObjectG.getDObject!(Window)(cast(GdkWindow*) __p); } /** @@ -275,14 +275,14 @@ public class Window : ObjectG */ public DrawingContext beginDrawFrame(Region region) { - auto p = gdk_window_begin_draw_frame(gdkWindow, (region is null) ? null : region.getRegionStruct()); + auto __p = gdk_window_begin_draw_frame(gdkWindow, (region is null) ? null : region.getRegionStruct()); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(DrawingContext)(cast(GdkDrawingContext*) p); + return ObjectG.getDObject!(DrawingContext)(cast(GdkDrawingContext*) __p); } /** @@ -528,19 +528,19 @@ public class Window : ObjectG { GError* err = null; - auto p = gdk_window_create_gl_context(gdkWindow, &err); + auto __p = gdk_window_create_gl_context(gdkWindow, &err); if (err !is null) { throw new GException( new ErrorG(err) ); } - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(GLContext)(cast(GdkGLContext*) p, true); + return ObjectG.getDObject!(GLContext)(cast(GdkGLContext*) __p, true); } /** @@ -591,14 +591,14 @@ public class Window : ObjectG */ public Surface createSimilarImageSurface(cairo_format_t format, int width, int height, int scale) { - auto p = gdk_window_create_similar_image_surface(gdkWindow, format, width, height, scale); + auto __p = gdk_window_create_similar_image_surface(gdkWindow, format, width, height, scale); - if(p is null) + if(__p is null) { return null; } - return new Surface(cast(cairo_surface_t*) p); + return new Surface(cast(cairo_surface_t*) __p); } /** @@ -629,14 +629,14 @@ public class Window : ObjectG */ public Surface createSimilarSurface(cairo_content_t content, int width, int height) { - auto p = gdk_window_create_similar_surface(gdkWindow, content, width, height); + auto __p = gdk_window_create_similar_surface(gdkWindow, content, width, height); - if(p is null) + if(__p is null) { return null; } - return new Surface(cast(cairo_surface_t*) p); + return new Surface(cast(cairo_surface_t*) __p); } /** @@ -859,14 +859,14 @@ public class Window : ObjectG */ public Pattern getBackgroundPattern() { - auto p = gdk_window_get_background_pattern(gdkWindow); + auto __p = gdk_window_get_background_pattern(gdkWindow); - if(p is null) + if(__p is null) { return null; } - return new Pattern(cast(cairo_pattern_t*) p); + return new Pattern(cast(cairo_pattern_t*) __p); } /** @@ -882,14 +882,14 @@ public class Window : ObjectG */ public ListG getChildren() { - auto p = gdk_window_get_children(gdkWindow); + auto __p = gdk_window_get_children(gdkWindow); - if(p is null) + if(__p is null) { return null; } - return new ListG(cast(GList*) p); + return new ListG(cast(GList*) __p); } /** @@ -911,14 +911,14 @@ public class Window : ObjectG */ public ListG getChildrenWithUserData(void* userData) { - auto p = gdk_window_get_children_with_user_data(gdkWindow, userData); + auto __p = gdk_window_get_children_with_user_data(gdkWindow, userData); - if(p is null) + if(__p is null) { return null; } - return new ListG(cast(GList*) p); + return new ListG(cast(GList*) __p); } /** @@ -933,14 +933,14 @@ public class Window : ObjectG */ public Region getClipRegion() { - auto p = gdk_window_get_clip_region(gdkWindow); + auto __p = gdk_window_get_clip_region(gdkWindow); - if(p is null) + if(__p is null) { return null; } - return new Region(cast(cairo_region_t*) p); + return new Region(cast(cairo_region_t*) __p); } /** @@ -975,14 +975,14 @@ public class Window : ObjectG */ public Cursor getCursor() { - auto p = gdk_window_get_cursor(gdkWindow); + auto __p = gdk_window_get_cursor(gdkWindow); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Cursor)(cast(GdkCursor*) p); + return ObjectG.getDObject!(Cursor)(cast(GdkCursor*) __p); } /** @@ -1017,14 +1017,14 @@ public class Window : ObjectG */ public Cursor getDeviceCursor(Device device) { - auto p = gdk_window_get_device_cursor(gdkWindow, (device is null) ? null : device.getDeviceStruct()); + auto __p = gdk_window_get_device_cursor(gdkWindow, (device is null) ? null : device.getDeviceStruct()); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Cursor)(cast(GdkCursor*) p); + return ObjectG.getDObject!(Cursor)(cast(GdkCursor*) __p); } /** @@ -1063,14 +1063,14 @@ public class Window : ObjectG */ public Window getDevicePosition(Device device, out int x, out int y, out GdkModifierType mask) { - auto p = gdk_window_get_device_position(gdkWindow, (device is null) ? null : device.getDeviceStruct(), &x, &y, &mask); + auto __p = gdk_window_get_device_position(gdkWindow, (device is null) ? null : device.getDeviceStruct(), &x, &y, &mask); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Window)(cast(GdkWindow*) p); + return ObjectG.getDObject!(Window)(cast(GdkWindow*) __p); } /** @@ -1092,14 +1092,14 @@ public class Window : ObjectG */ public Window getDevicePositionDouble(Device device, out double x, out double y, out GdkModifierType mask) { - auto p = gdk_window_get_device_position_double(gdkWindow, (device is null) ? null : device.getDeviceStruct(), &x, &y, &mask); + auto __p = gdk_window_get_device_position_double(gdkWindow, (device is null) ? null : device.getDeviceStruct(), &x, &y, &mask); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Window)(cast(GdkWindow*) p); + return ObjectG.getDObject!(Window)(cast(GdkWindow*) __p); } /** @@ -1111,14 +1111,14 @@ public class Window : ObjectG */ public Display getDisplay() { - auto p = gdk_window_get_display(gdkWindow); + auto __p = gdk_window_get_display(gdkWindow); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Display)(cast(GdkDisplay*) p); + return ObjectG.getDObject!(Display)(cast(GdkDisplay*) __p); } /** @@ -1137,11 +1137,11 @@ public class Window : ObjectG { GdkWindow* outtarget = null; - auto p = gdk_window_get_drag_protocol(gdkWindow, &outtarget); + auto __p = gdk_window_get_drag_protocol(gdkWindow, &outtarget); target = ObjectG.getDObject!(Window)(outtarget); - return p; + return __p; } /** @@ -1157,14 +1157,14 @@ public class Window : ObjectG */ public Window getEffectiveParent() { - auto p = gdk_window_get_effective_parent(gdkWindow); + auto __p = gdk_window_get_effective_parent(gdkWindow); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Window)(cast(GdkWindow*) p); + return ObjectG.getDObject!(Window)(cast(GdkWindow*) __p); } /** @@ -1181,14 +1181,14 @@ public class Window : ObjectG */ public Window getEffectiveToplevel() { - auto p = gdk_window_get_effective_toplevel(gdkWindow); + auto __p = gdk_window_get_effective_toplevel(gdkWindow); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Window)(cast(GdkWindow*) p); + return ObjectG.getDObject!(Window)(cast(GdkWindow*) __p); } /** @@ -1239,14 +1239,14 @@ public class Window : ObjectG */ public FrameClock getFrameClock() { - auto p = gdk_window_get_frame_clock(gdkWindow); + auto __p = gdk_window_get_frame_clock(gdkWindow); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(FrameClock)(cast(GdkFrameClock*) p); + return ObjectG.getDObject!(FrameClock)(cast(GdkFrameClock*) __p); } /** @@ -1317,14 +1317,14 @@ public class Window : ObjectG */ public Window getGroup() { - auto p = gdk_window_get_group(gdkWindow); + auto __p = gdk_window_get_group(gdkWindow); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Window)(cast(GdkWindow*) p); + return ObjectG.getDObject!(Window)(cast(GdkWindow*) __p); } /** @@ -1390,14 +1390,14 @@ public class Window : ObjectG */ public Window getParent() { - auto p = gdk_window_get_parent(gdkWindow); + auto __p = gdk_window_get_parent(gdkWindow); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Window)(cast(GdkWindow*) p); + return ObjectG.getDObject!(Window)(cast(GdkWindow*) __p); } /** @@ -1434,14 +1434,14 @@ public class Window : ObjectG */ public Window getPointer(out int x, out int y, out GdkModifierType mask) { - auto p = gdk_window_get_pointer(gdkWindow, &x, &y, &mask); + auto __p = gdk_window_get_pointer(gdkWindow, &x, &y, &mask); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Window)(cast(GdkWindow*) p); + return ObjectG.getDObject!(Window)(cast(GdkWindow*) __p); } /** @@ -1526,14 +1526,14 @@ public class Window : ObjectG */ public Screen getScreen() { - auto p = gdk_window_get_screen(gdkWindow); + auto __p = gdk_window_get_screen(gdkWindow); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Screen)(cast(GdkScreen*) p); + return ObjectG.getDObject!(Screen)(cast(GdkScreen*) __p); } /** @@ -1590,14 +1590,14 @@ public class Window : ObjectG */ public Window getToplevel() { - auto p = gdk_window_get_toplevel(gdkWindow); + auto __p = gdk_window_get_toplevel(gdkWindow); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Window)(cast(GdkWindow*) p); + return ObjectG.getDObject!(Window)(cast(GdkWindow*) __p); } /** @@ -1624,14 +1624,14 @@ public class Window : ObjectG */ public Region getUpdateArea() { - auto p = gdk_window_get_update_area(gdkWindow); + auto __p = gdk_window_get_update_area(gdkWindow); - if(p is null) + if(__p is null) { return null; } - return new Region(cast(cairo_region_t*) p); + return new Region(cast(cairo_region_t*) __p); } /** @@ -1657,14 +1657,14 @@ public class Window : ObjectG */ public Region getVisibleRegion() { - auto p = gdk_window_get_visible_region(gdkWindow); + auto __p = gdk_window_get_visible_region(gdkWindow); - if(p is null) + if(__p is null) { return null; } - return new Region(cast(cairo_region_t*) p); + return new Region(cast(cairo_region_t*) __p); } /** @@ -1676,14 +1676,14 @@ public class Window : ObjectG */ public Visual getVisual() { - auto p = gdk_window_get_visual(gdkWindow); + auto __p = gdk_window_get_visual(gdkWindow); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Visual)(cast(GdkVisual*) p); + return ObjectG.getDObject!(Visual)(cast(GdkVisual*) __p); } /** @@ -2093,14 +2093,14 @@ public class Window : ObjectG */ public ListG peekChildren() { - auto p = gdk_window_peek_children(gdkWindow); + auto __p = gdk_window_peek_children(gdkWindow); - if(p is null) + if(__p is null) { return null; } - return new ListG(cast(GList*) p); + return new ListG(cast(GList*) __p); } /** @@ -3351,14 +3351,14 @@ public class Window : ObjectG */ public static Window getDefaultRootWindow() { - auto p = gdk_get_default_root_window(); + auto __p = gdk_get_default_root_window(); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Window)(cast(GdkWindow*) p); + return ObjectG.getDObject!(Window)(cast(GdkWindow*) __p); } /** @@ -3374,14 +3374,14 @@ public class Window : ObjectG */ public static Window offscreenWindowGetEmbedder(Window window) { - auto p = gdk_offscreen_window_get_embedder((window is null) ? null : window.getWindowStruct()); + auto __p = gdk_offscreen_window_get_embedder((window is null) ? null : window.getWindowStruct()); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Window)(cast(GdkWindow*) p); + return ObjectG.getDObject!(Window)(cast(GdkWindow*) __p); } /** @@ -3397,14 +3397,14 @@ public class Window : ObjectG */ public static Surface offscreenWindowGetSurface(Window window) { - auto p = gdk_offscreen_window_get_surface((window is null) ? null : window.getWindowStruct()); + auto __p = gdk_offscreen_window_get_surface((window is null) ? null : window.getWindowStruct()); - if(p is null) + if(__p is null) { return null; } - return new Surface(cast(cairo_surface_t*) p); + return new Surface(cast(cairo_surface_t*) __p); } /** diff --git a/generated/gtkd/gdk/c/types.d b/generated/gtkd/gdk/c/types.d index 0f45742a0..63db61bdb 100644 --- a/generated/gtkd/gdk/c/types.d +++ b/generated/gtkd/gdk/c/types.d @@ -4187,7 +4187,7 @@ alias GDK_MAJOR_VERSION = MAJOR_VERSION; enum MAX_TIMECOORD_AXES = 128; alias GDK_MAX_TIMECOORD_AXES = MAX_TIMECOORD_AXES; -enum MICRO_VERSION = 8; +enum MICRO_VERSION = 33; alias GDK_MICRO_VERSION = MICRO_VERSION; enum MINOR_VERSION = 24; diff --git a/generated/gtkd/gdkpixbuf/Pixbuf.d b/generated/gtkd/gdkpixbuf/Pixbuf.d index 262b2b2a5..92e584c61 100644 --- a/generated/gtkd/gdkpixbuf/Pixbuf.d +++ b/generated/gtkd/gdkpixbuf/Pixbuf.d @@ -43,16 +43,147 @@ private import glib.GException; private import glib.HashTable; private import glib.ListSG; private import glib.Str; +private import glib.c.functions; private import gobject.ObjectG; public import gtkc.gdkpixbuftypes; /** - * This is the main structure in the gdk-pixbuf library. It is - * used to represent images. It contains information about the - * image's pixel data, its color space, bits per sample, width and - * height, and the rowstride (the number of bytes between the start of - * one row and the start of the next). + * A pixel buffer. + * + * `GdkPixbuf` contains information about an image's pixel data, + * its color space, bits per sample, width and height, and the + * rowstride (the number of bytes between the start of one row + * and the start of the next). + * + * ## Creating new `GdkPixbuf` + * + * The most basic way to create a pixbuf is to wrap an existing pixel + * buffer with a [class@GdkPixbuf.Pixbuf] instance. You can use the + * [`ctor@GdkPixbuf.Pixbuf.new_from_data`] function to do this. + * + * Every time you create a new `GdkPixbuf` instance for some data, you + * will need to specify the destroy notification function that will be + * called when the data buffer needs to be freed; this will happen when + * a `GdkPixbuf` is finalized by the reference counting functions. If + * you have a chunk of static data compiled into your application, you + * can pass in `NULL` as the destroy notification function so that the + * data will not be freed. + * + * The [`ctor@GdkPixbuf.Pixbuf.new`] constructor function can be used + * as a convenience to create a pixbuf with an empty buffer; this is + * equivalent to allocating a data buffer using `malloc()` and then + * wrapping it with `gdk_pixbuf_new_from_data()`. The `gdk_pixbuf_new()` + * function will compute an optimal rowstride so that rendering can be + * performed with an efficient algorithm. + * + * As a special case, you can use the [`ctor@GdkPixbuf.Pixbuf.new_from_xpm_data`] + * function to create a pixbuf from inline XPM image data. + * + * You can also copy an existing pixbuf with the [method@Pixbuf.copy] + * function. This is not the same as just acquiring a reference to + * the old pixbuf instance: the copy function will actually duplicate + * the pixel data in memory and create a new [class@Pixbuf] instance + * for it. + * + * ## Reference counting + * + * `GdkPixbuf` structures are reference counted. This means that an + * application can share a single pixbuf among many parts of the + * code. When a piece of the program needs to use a pixbuf, it should + * acquire a reference to it by calling `g_object_ref()`; when it no + * longer needs the pixbuf, it should release the reference it acquired + * by calling `g_object_unref()`. The resources associated with a + * `GdkPixbuf` will be freed when its reference count drops to zero. + * Newly-created `GdkPixbuf` instances start with a reference count + * of one. + * + * ## Image Data + * + * Image data in a pixbuf is stored in memory in an uncompressed, + * packed format. Rows in the image are stored top to bottom, and + * in each row pixels are stored from left to right. + * + * There may be padding at the end of a row. + * + * The "rowstride" value of a pixbuf, as returned by [`method@GdkPixbuf.Pixbuf.get_rowstride`], + * indicates the number of bytes between rows. + * + * **NOTE**: If you are copying raw pixbuf data with `memcpy()` note that the + * last row in the pixbuf may not be as wide as the full rowstride, but rather + * just as wide as the pixel data needs to be; that is: it is unsafe to do + * `memcpy (dest, pixels, rowstride * height)` to copy a whole pixbuf. Use + * [method@GdkPixbuf.Pixbuf.copy] instead, or compute the width in bytes of the + * last row as: + * + * ```c + * last_row = width * ((n_channels * bits_per_sample + 7) / 8); + * ``` + * + * The same rule applies when iterating over each row of a `GdkPixbuf` pixels + * array. + * + * The following code illustrates a simple `put_pixel()` + * function for RGB pixbufs with 8 bits per channel with an alpha + * channel. + * + * ```c + * static void + * put_pixel (GdkPixbuf *pixbuf, + * int x, + * int y, + * guchar red, + * guchar green, + * guchar blue, + * guchar alpha) + * { + * int n_channels = gdk_pixbuf_get_n_channels (pixbuf); + * + * // Ensure that the pixbuf is valid + * g_assert (gdk_pixbuf_get_colorspace (pixbuf) == GDK_COLORSPACE_RGB); + * g_assert (gdk_pixbuf_get_bits_per_sample (pixbuf) == 8); + * g_assert (gdk_pixbuf_get_has_alpha (pixbuf)); + * g_assert (n_channels == 4); + * + * int width = gdk_pixbuf_get_width (pixbuf); + * int height = gdk_pixbuf_get_height (pixbuf); + * + * // Ensure that the coordinates are in a valid range + * g_assert (x >= 0 && x < width); + * g_assert (y >= 0 && y < height); + * + * int rowstride = gdk_pixbuf_get_rowstride (pixbuf); + * + * // The pixel buffer in the GdkPixbuf instance + * guchar *pixels = gdk_pixbuf_get_pixels (pixbuf); + * + * // The pixel we wish to modify + * guchar *p = pixels + y * rowstride + x * n_channels; + * p[0] = red; + * p[1] = green; + * p[2] = blue; + * p[3] = alpha; + * } + * ``` + * + * ## Loading images + * + * The `GdkPixBuf` class provides a simple mechanism for loading + * an image from a file in synchronous and asynchronous fashion. + * + * For GUI applications, it is recommended to use the asynchronous + * stream API to avoid blocking the control flow of the application. + * + * Additionally, `GdkPixbuf` provides the [class@GdkPixbuf.PixbufLoader`] + * API for progressive image loading. + * + * ## Saving images + * + * The `GdkPixbuf` class provides methods for saving image data in + * a number of file formats. The formatted data can be written to a + * file or to a memory buffer. `GdkPixbuf` can also call a user-defined + * callback on the data, which allows to e.g. write the image + * to a socket or store it in a database. */ public class Pixbuf : ObjectG, IconIF, LoadableIconIF { @@ -223,8 +354,11 @@ public class Pixbuf : ObjectG, IconIF, LoadableIconIF } /** - * Creates a new #GdkPixbuf structure and allocates a buffer for it. The - * buffer has an optimal rowstride. Note that the buffer is not cleared; + * Creates a new `GdkPixbuf` structure and allocates a buffer for it. + * + * If the allocation of the buffer failed, this function will return `NULL`. + * + * The buffer has an optimal rowstride. Note that the buffer is not cleared; * you will have to fill it completely yourself. * * Params: @@ -234,27 +368,29 @@ public class Pixbuf : ObjectG, IconIF, LoadableIconIF * width = Width of image in pixels, must be > 0 * height = Height of image in pixels, must be > 0 * - * Returns: A newly-created #GdkPixbuf with a reference count of 1, or - * %NULL if not enough memory could be allocated for the image buffer. + * Returns: A newly-created pixel buffer * * Throws: ConstructionException GTK+ fails to create the object. */ public this(GdkColorspace colorspace, bool hasAlpha, int bitsPerSample, int width, int height) { - auto p = gdk_pixbuf_new(colorspace, hasAlpha, bitsPerSample, width, height); + auto __p = gdk_pixbuf_new(colorspace, hasAlpha, bitsPerSample, width, height); - if(p is null) + if(__p is null) { throw new ConstructionException("null returned by new"); } - this(cast(GdkPixbuf*) p, true); + this(cast(GdkPixbuf*) __p, true); } /** * Creates a new #GdkPixbuf out of in-memory readonly image data. + * * Currently only RGB images with 8 bits per sample are supported. - * This is the #GBytes variant of gdk_pixbuf_new_from_data(). + * + * This is the `GBytes` variant of gdk_pixbuf_new_from_data(), useful + * for language bindings. * * Params: * data = Image data in 8-bit/sample packed format inside a #GBytes @@ -265,7 +401,7 @@ public class Pixbuf : ObjectG, IconIF, LoadableIconIF * height = Height of the image in pixels, must be > 0 * rowstride = Distance in bytes between row starts * - * Returns: A newly-created #GdkPixbuf structure with a reference count of 1. + * Returns: A newly-created pixbuf * * Since: 2.32 * @@ -273,27 +409,28 @@ public class Pixbuf : ObjectG, IconIF, LoadableIconIF */ public this(Bytes data, GdkColorspace colorspace, bool hasAlpha, int bitsPerSample, int width, int height, int rowstride) { - auto p = gdk_pixbuf_new_from_bytes((data is null) ? null : data.getBytesStruct(), colorspace, hasAlpha, bitsPerSample, width, height, rowstride); + auto __p = gdk_pixbuf_new_from_bytes((data is null) ? null : data.getBytesStruct(), colorspace, hasAlpha, bitsPerSample, width, height, rowstride); - if(p is null) + if(__p is null) { throw new ConstructionException("null returned by new_from_bytes"); } - this(cast(GdkPixbuf*) p, true); + this(cast(GdkPixbuf*) __p, true); } /** - * Creates a new #GdkPixbuf out of in-memory image data. Currently only RGB - * images with 8 bits per sample are supported. + * Creates a new #GdkPixbuf out of in-memory image data. + * + * Currently only RGB images with 8 bits per sample are supported. * * Since you are providing a pre-allocated pixel buffer, you must also * specify a way to free that data. This is done with a function of - * type #GdkPixbufDestroyNotify. When a pixbuf created with is + * type `GdkPixbufDestroyNotify`. When a pixbuf created with is * finalized, your destroy notification function will be called, and * it is its responsibility to free the pixel array. * - * See also gdk_pixbuf_new_from_bytes(). + * See also: [ctor@GdkPixbuf.Pixbuf.new_from_bytes] * * Params: * data = Image data in 8-bit/sample packed format @@ -307,35 +444,41 @@ public class Pixbuf : ObjectG, IconIF, LoadableIconIF * drops to zero, or %NULL if the data should not be freed * destroyFnData = Closure data to pass to the destroy notification function * - * Returns: A newly-created #GdkPixbuf structure with a reference count of 1. + * Returns: A newly-created pixbuf * * Throws: ConstructionException GTK+ fails to create the object. */ public this(char[] data, GdkColorspace colorspace, bool hasAlpha, int bitsPerSample, int width, int height, int rowstride, GdkPixbufDestroyNotify destroyFn, void* destroyFnData) { - auto p = gdk_pixbuf_new_from_data(data.ptr, colorspace, hasAlpha, bitsPerSample, width, height, rowstride, destroyFn, destroyFnData); + auto __p = gdk_pixbuf_new_from_data(data.ptr, colorspace, hasAlpha, bitsPerSample, width, height, rowstride, destroyFn, destroyFnData); - if(p is null) + if(__p is null) { throw new ConstructionException("null returned by new_from_data"); } - this(cast(GdkPixbuf*) p, true); + this(cast(GdkPixbuf*) __p, true); } /** - * Creates a new pixbuf by loading an image from a file. The file format is - * detected automatically. If %NULL is returned, then @error will be set. - * Possible errors are in the #GDK_PIXBUF_ERROR and #G_FILE_ERROR domains. + * Creates a new pixbuf by loading an image from a file. + * + * The file format is detected automatically. + * + * If `NULL` is returned, then @error will be set. Possible errors are: + * + * - the file could not be opened + * - there is no loader for the file's format + * - there is not enough memory to allocate the image buffer + * - the image buffer contains invalid data + * + * The error domains are `GDK_PIXBUF_ERROR` and `G_FILE_ERROR`. * * Params: * filename = Name of file to load, in the GLib file * name encoding * - * Returns: A newly-created pixbuf with a reference count of 1, or %NULL if - * any of several error conditions occurred: the file could not be opened, - * there was no loader for the file's format, there was not enough memory to - * allocate the image buffer, or the image file contained invalid data. + * Returns: A newly-created pixbuf * * Throws: GException on failure. * Throws: ConstructionException GTK+ fails to create the object. @@ -344,33 +487,43 @@ public class Pixbuf : ObjectG, IconIF, LoadableIconIF { GError* err = null; - auto p = gdk_pixbuf_new_from_file(Str.toStringz(filename), &err); + auto __p = gdk_pixbuf_new_from_file(Str.toStringz(filename), &err); if (err !is null) { throw new GException( new ErrorG(err) ); } - if(p is null) + if(__p is null) { throw new ConstructionException("null returned by new_from_file"); } - this(cast(GdkPixbuf*) p, true); + this(cast(GdkPixbuf*) __p, true); } /** - * Creates a new pixbuf by loading an image from a file. The file format is - * detected automatically. If %NULL is returned, then @error will be set. - * Possible errors are in the #GDK_PIXBUF_ERROR and #G_FILE_ERROR domains. + * Creates a new pixbuf by loading an image from a file. + * + * The file format is detected automatically. + * + * If `NULL` is returned, then @error will be set. Possible errors are: + * + * - the file could not be opened + * - there is no loader for the file's format + * - there is not enough memory to allocate the image buffer + * - the image buffer contains invalid data + * + * The error domains are `GDK_PIXBUF_ERROR` and `G_FILE_ERROR`. + * * The image will be scaled to fit in the requested size, optionally preserving * the image's aspect ratio. * - * When preserving the aspect ratio, a @width of -1 will cause the image - * to be scaled to the exact given height, and a @height of -1 will cause + * When preserving the aspect ratio, a `width` of -1 will cause the image + * to be scaled to the exact given height, and a `height` of -1 will cause * the image to be scaled to the exact given width. When not preserving - * aspect ratio, a @width or @height of -1 means to not scale the image - * at all in that dimension. Negative values for @width and @height are + * aspect ratio, a `width` or `height` of -1 means to not scale the image + * at all in that dimension. Negative values for `width` and `height` are * allowed since 2.8. * * Params: @@ -378,12 +531,9 @@ public class Pixbuf : ObjectG, IconIF, LoadableIconIF * name encoding * width = The width the image should have or -1 to not constrain the width * height = The height the image should have or -1 to not constrain the height - * preserveAspectRatio = %TRUE to preserve the image's aspect ratio + * preserveAspectRatio = `TRUE` to preserve the image's aspect ratio * - * Returns: A newly-created pixbuf with a reference count of 1, or %NULL - * if any of several error conditions occurred: the file could not be opened, - * there was no loader for the file's format, there was not enough memory to - * allocate the image buffer, or the image file contained invalid data. + * Returns: A newly-created pixbuf * * Since: 2.6 * @@ -394,32 +544,40 @@ public class Pixbuf : ObjectG, IconIF, LoadableIconIF { GError* err = null; - auto p = gdk_pixbuf_new_from_file_at_scale(Str.toStringz(filename), width, height, preserveAspectRatio, &err); + auto __p = gdk_pixbuf_new_from_file_at_scale(Str.toStringz(filename), width, height, preserveAspectRatio, &err); if (err !is null) { throw new GException( new ErrorG(err) ); } - if(p is null) + if(__p is null) { throw new ConstructionException("null returned by new_from_file_at_scale"); } - this(cast(GdkPixbuf*) p, true); + this(cast(GdkPixbuf*) __p, true); } /** * Creates a new pixbuf by loading an image from a file. - * The file format is detected automatically. If %NULL is returned, then - * @error will be set. Possible errors are in the #GDK_PIXBUF_ERROR and - * #G_FILE_ERROR domains. + * + * The file format is detected automatically. + * + * If `NULL` is returned, then @error will be set. Possible errors are: + * + * - the file could not be opened + * - there is no loader for the file's format + * - there is not enough memory to allocate the image buffer + * - the image buffer contains invalid data + * + * The error domains are `GDK_PIXBUF_ERROR` and `G_FILE_ERROR`. * * The image will be scaled to fit in the requested size, preserving * the image's aspect ratio. Note that the returned pixbuf may be smaller - * than @width x @height, if the aspect ratio requires it. To load + * than `width` x `height`, if the aspect ratio requires it. To load * and image at the requested size, regardless of aspect ratio, use - * gdk_pixbuf_new_from_file_at_scale(). + * [ctor@GdkPixbuf.Pixbuf.new_from_file_at_scale]. * * Params: * filename = Name of file to load, in the GLib file @@ -427,11 +585,7 @@ public class Pixbuf : ObjectG, IconIF, LoadableIconIF * width = The width the image should have or -1 to not constrain the width * height = The height the image should have or -1 to not constrain the height * - * Returns: A newly-created pixbuf with a reference count of 1, or - * %NULL if any of several error conditions occurred: the file could not - * be opened, there was no loader for the file's format, there was not - * enough memory to allocate the image buffer, or the image file contained - * invalid data. + * Returns: A newly-created pixbuf * * Since: 2.4 * @@ -442,63 +596,65 @@ public class Pixbuf : ObjectG, IconIF, LoadableIconIF { GError* err = null; - auto p = gdk_pixbuf_new_from_file_at_size(Str.toStringz(filename), width, height, &err); + auto __p = gdk_pixbuf_new_from_file_at_size(Str.toStringz(filename), width, height, &err); if (err !is null) { throw new GException( new ErrorG(err) ); } - if(p is null) + if(__p is null) { throw new ConstructionException("null returned by new_from_file_at_size"); } - this(cast(GdkPixbuf*) p, true); + this(cast(GdkPixbuf*) __p, true); } /** - * Create a #GdkPixbuf from a flat representation that is suitable for - * storing as inline data in a program. This is useful if you want to - * ship a program with images, but don't want to depend on any - * external files. + * Creates a `GdkPixbuf` from a flat representation that is suitable for + * storing as inline data in a program. + * + * This is useful if you want to ship a program with images, but don't want + * to depend on any external files. + * + * GdkPixbuf ships with a program called `gdk-pixbuf-csource`, which allows + * for conversion of `GdkPixbuf`s into such a inline representation. * - * gdk-pixbuf ships with a program called [gdk-pixbuf-csource][gdk-pixbuf-csource], - * which allows for conversion of #GdkPixbufs into such a inline representation. * In almost all cases, you should pass the `--raw` option to * `gdk-pixbuf-csource`. A sample invocation would be: * - * |[ + * ``` * gdk-pixbuf-csource --raw --name=myimage_inline myimage.png - * ]| + * ``` * * For the typical case where the inline pixbuf is read-only static data, * you don't need to copy the pixel data unless you intend to write to - * it, so you can pass %FALSE for @copy_pixels. (If you pass `--rle` to - * `gdk-pixbuf-csource`, a copy will be made even if @copy_pixels is %FALSE, - * so using this option is generally a bad idea.) + * it, so you can pass `FALSE` for `copy_pixels`. If you pass `--rle` to + * `gdk-pixbuf-csource`, a copy will be made even if `copy_pixels` is `FALSE`, + * so using this option is generally a bad idea. * * If you create a pixbuf from const inline data compiled into your * program, it's probably safe to ignore errors and disable length checks, * since things will always succeed: - * |[ + * + * ```c * pixbuf = gdk_pixbuf_new_from_inline (-1, myimage_inline, FALSE, NULL); - * ]| + * ``` * * For non-const inline data, you could get out of memory. For untrusted * inline data located at runtime, you could have corrupt inline data in * addition. * - * Deprecated: Use #GResource instead. + * Deprecated: Use `GResource` instead. * * Params: * data = Byte data containing a - * serialized #GdkPixdata structure + * serialized `GdkPixdata` structure * copyPixels = Whether to copy the pixel data, or use direct pointers - * @data for the resulting pixbuf + * `data` for the resulting pixbuf * - * Returns: A newly-created #GdkPixbuf structure with a reference, - * count of 1, or %NULL if an error occurred. + * Returns: A newly-created pixbuf * * Throws: GException on failure. * Throws: ConstructionException GTK+ fails to create the object. @@ -507,40 +663,40 @@ public class Pixbuf : ObjectG, IconIF, LoadableIconIF { GError* err = null; - auto p = gdk_pixbuf_new_from_inline(cast(int)data.length, data.ptr, copyPixels, &err); + auto __p = gdk_pixbuf_new_from_inline(cast(int)data.length, data.ptr, copyPixels, &err); if (err !is null) { throw new GException( new ErrorG(err) ); } - if(p is null) + if(__p is null) { throw new ConstructionException("null returned by new_from_inline"); } - this(cast(GdkPixbuf*) p, true); + this(cast(GdkPixbuf*) __p, true); } /** * Creates a new pixbuf by loading an image from an input stream. * - * The file format is detected automatically. If %NULL is returned, then - * @error will be set. The @cancellable can be used to abort the operation - * from another thread. If the operation was cancelled, the error - * %G_IO_ERROR_CANCELLED will be returned. Other possible errors are in - * the #GDK_PIXBUF_ERROR and %G_IO_ERROR domains. + * The file format is detected automatically. + * + * If `NULL` is returned, then `error` will be set. + * + * The `cancellable` can be used to abort the operation from another thread. + * If the operation was cancelled, the error `G_IO_ERROR_CANCELLED` will be + * returned. Other possible errors are in the `GDK_PIXBUF_ERROR` and + * `G_IO_ERROR` domains. * * The stream is not closed. * * Params: - * stream = a #GInputStream to load the pixbuf from - * cancellable = optional #GCancellable object, %NULL to ignore + * stream = a `GInputStream` to load the pixbuf from + * cancellable = optional `GCancellable` object, `NULL` to ignore * - * Returns: A newly-created pixbuf, or %NULL if any of several error - * conditions occurred: the file could not be opened, the image format is - * not supported, there was not enough memory to allocate the image buffer, - * the stream contained invalid data, or the operation was cancelled. + * Returns: A newly-created pixbuf * * Since: 2.14 * @@ -551,55 +707,52 @@ public class Pixbuf : ObjectG, IconIF, LoadableIconIF { GError* err = null; - auto p = gdk_pixbuf_new_from_stream((stream is null) ? null : stream.getInputStreamStruct(), (cancellable is null) ? null : cancellable.getCancellableStruct(), &err); + auto __p = gdk_pixbuf_new_from_stream((stream is null) ? null : stream.getInputStreamStruct(), (cancellable is null) ? null : cancellable.getCancellableStruct(), &err); if (err !is null) { throw new GException( new ErrorG(err) ); } - if(p is null) + if(__p is null) { throw new ConstructionException("null returned by new_from_stream"); } - this(cast(GdkPixbuf*) p, true); + this(cast(GdkPixbuf*) __p, true); } /** * Creates a new pixbuf by loading an image from an input stream. * - * The file format is detected automatically. If %NULL is returned, then + * The file format is detected automatically. If `NULL` is returned, then * @error will be set. The @cancellable can be used to abort the operation * from another thread. If the operation was cancelled, the error - * %G_IO_ERROR_CANCELLED will be returned. Other possible errors are in - * the #GDK_PIXBUF_ERROR and %G_IO_ERROR domains. + * `G_IO_ERROR_CANCELLED` will be returned. Other possible errors are in + * the `GDK_PIXBUF_ERROR` and `G_IO_ERROR` domains. * * The image will be scaled to fit in the requested size, optionally * preserving the image's aspect ratio. * - * When preserving the aspect ratio, a @width of -1 will cause the image to be - * scaled to the exact given height, and a @height of -1 will cause the image - * to be scaled to the exact given width. If both @width and @height are + * When preserving the aspect ratio, a `width` of -1 will cause the image to be + * scaled to the exact given height, and a `height` of -1 will cause the image + * to be scaled to the exact given width. If both `width` and `height` are * given, this function will behave as if the smaller of the two values * is passed as -1. * - * When not preserving aspect ratio, a @width or @height of -1 means to not + * When not preserving aspect ratio, a `width` or `height` of -1 means to not * scale the image at all in that dimension. * * The stream is not closed. * * Params: - * stream = a #GInputStream to load the pixbuf from + * stream = a `GInputStream` to load the pixbuf from * width = The width the image should have or -1 to not constrain the width * height = The height the image should have or -1 to not constrain the height - * preserveAspectRatio = %TRUE to preserve the image's aspect ratio - * cancellable = optional #GCancellable object, %NULL to ignore + * preserveAspectRatio = `TRUE` to preserve the image's aspect ratio + * cancellable = optional `GCancellable` object, `NULL` to ignore * - * Returns: A newly-created pixbuf, or %NULL if any of several error - * conditions occurred: the file could not be opened, the image format is - * not supported, there was not enough memory to allocate the image buffer, - * the stream contained invalid data, or the operation was cancelled. + * Returns: A newly-created pixbuf * * Since: 2.14 * @@ -610,19 +763,19 @@ public class Pixbuf : ObjectG, IconIF, LoadableIconIF { GError* err = null; - auto p = gdk_pixbuf_new_from_stream_at_scale((stream is null) ? null : stream.getInputStreamStruct(), width, height, preserveAspectRatio, (cancellable is null) ? null : cancellable.getCancellableStruct(), &err); + auto __p = gdk_pixbuf_new_from_stream_at_scale((stream is null) ? null : stream.getInputStreamStruct(), width, height, preserveAspectRatio, (cancellable is null) ? null : cancellable.getCancellableStruct(), &err); if (err !is null) { throw new GException( new ErrorG(err) ); } - if(p is null) + if(__p is null) { throw new ConstructionException("null returned by new_from_stream_at_scale"); } - this(cast(GdkPixbuf*) p, true); + this(cast(GdkPixbuf*) __p, true); } /** @@ -630,10 +783,9 @@ public class Pixbuf : ObjectG, IconIF, LoadableIconIF * gdk_pixbuf_new_from_stream_async(). * * Params: - * asyncResult = a #GAsyncResult + * asyncResult = a `GAsyncResult` * - * Returns: a #GdkPixbuf or %NULL on error. Free the returned - * object with g_object_unref(). + * Returns: the newly created pixbuf * * Since: 2.24 * @@ -644,48 +796,52 @@ public class Pixbuf : ObjectG, IconIF, LoadableIconIF { GError* err = null; - auto p = gdk_pixbuf_new_from_stream_finish((asyncResult is null) ? null : asyncResult.getAsyncResultStruct(), &err); + auto __p = gdk_pixbuf_new_from_stream_finish((asyncResult is null) ? null : asyncResult.getAsyncResultStruct(), &err); if (err !is null) { throw new GException( new ErrorG(err) ); } - if(p is null) + if(__p is null) { throw new ConstructionException("null returned by new_from_stream_finish"); } - this(cast(GdkPixbuf*) p, true); + this(cast(GdkPixbuf*) __p, true); } /** - * Creates a new pixbuf by parsing XPM data in memory. This data is commonly - * the result of including an XPM file into a program's C source. + * Creates a new pixbuf by parsing XPM data in memory. + * + * This data is commonly the result of including an XPM file into a + * program's C source. * * Params: * data = Pointer to inline XPM data. * - * Returns: A newly-created pixbuf with a reference count of 1. + * Returns: A newly-created pixbuf * * Throws: ConstructionException GTK+ fails to create the object. */ public this(string[] data) { - auto p = gdk_pixbuf_new_from_xpm_data(Str.toStringzArray(data)); + auto __p = gdk_pixbuf_new_from_xpm_data(Str.toStringzArray(data)); - if(p is null) + if(__p is null) { throw new ConstructionException("null returned by new_from_xpm_data"); } - this(cast(GdkPixbuf*) p, true); + this(cast(GdkPixbuf*) __p, true); } /** * Calculates the rowstride that an image created with those values would - * have. This is useful for front-ends and backends that want to sanity - * check image values without needing to create them. + * have. + * + * This function is useful for front-ends and backends that want to check + * image values without needing to create a `GdkPixbuf`. * * Params: * colorspace = Color space for image @@ -708,28 +864,24 @@ public class Pixbuf : ObjectG, IconIF, LoadableIconIF * * Params: * filename = The name of the file to identify. - * width = Return location for the width of the - * image, or %NULL - * height = Return location for the height of the - * image, or %NULL + * width = Return location for the width of the image + * height = Return location for the height of the image * - * Returns: A #GdkPixbufFormat describing - * the image format of the file or %NULL if the image format wasn't - * recognized. The return value is owned by #GdkPixbuf and should - * not be freed. + * Returns: A `GdkPixbufFormat` describing + * the image format of the file * * Since: 2.4 */ public static PixbufFormat getFileInfo(string filename, out int width, out int height) { - auto p = gdk_pixbuf_get_file_info(Str.toStringz(filename), &width, &height); + auto __p = gdk_pixbuf_get_file_info(Str.toStringz(filename), &width, &height); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(PixbufFormat)(cast(GdkPixbufFormat*) p); + return ObjectG.getDObject!(PixbufFormat)(cast(GdkPixbufFormat*) __p); } /** @@ -745,8 +897,8 @@ public class Pixbuf : ObjectG, IconIF, LoadableIconIF * * Params: * filename = The name of the file to identify - * cancellable = optional #GCancellable object, %NULL to ignore - * callback = a #GAsyncReadyCallback to call when the file info is available + * cancellable = optional `GCancellable` object, `NULL` to ignore + * callback = a `GAsyncReadyCallback` to call when the file info is available * userData = the data to pass to the callback function * * Since: 2.32 @@ -761,14 +913,12 @@ public class Pixbuf : ObjectG, IconIF, LoadableIconIF * gdk_pixbuf_get_file_info_async(). * * Params: - * asyncResult = a #GAsyncResult - * width = Return location for the width of the image, or %NULL - * height = Return location for the height of the image, or %NULL + * asyncResult = a `GAsyncResult` + * width = Return location for the width of the image, or `NULL` + * height = Return location for the height of the image, or `NULL` * - * Returns: A #GdkPixbufFormat describing the image - * format of the file or %NULL if the image format wasn't - * recognized. The return value is owned by GdkPixbuf and should - * not be freed. + * Returns: A `GdkPixbufFormat` describing the + * image format of the file * * Since: 2.32 * @@ -778,19 +928,19 @@ public class Pixbuf : ObjectG, IconIF, LoadableIconIF { GError* err = null; - auto p = gdk_pixbuf_get_file_info_finish((asyncResult is null) ? null : asyncResult.getAsyncResultStruct(), &width, &height, &err); + auto __p = gdk_pixbuf_get_file_info_finish((asyncResult is null) ? null : asyncResult.getAsyncResultStruct(), &width, &height, &err); if (err !is null) { throw new GException( new ErrorG(err) ); } - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(PixbufFormat)(cast(GdkPixbufFormat*) p); + return ObjectG.getDObject!(PixbufFormat)(cast(GdkPixbufFormat*) __p); } /** @@ -798,22 +948,56 @@ public class Pixbuf : ObjectG, IconIF, LoadableIconIF * by GdkPixbuf. * * Returns: A list of - * #GdkPixbufFormats describing the supported image formats. The list should - * be freed when it is no longer needed, but the structures themselves are - * owned by #GdkPixbuf and should not be freed. + * support image formats. * * Since: 2.2 */ public static ListSG getFormats() { - auto p = gdk_pixbuf_get_formats(); + auto __p = gdk_pixbuf_get_formats(); - if(p is null) + if(__p is null) { return null; } - return new ListSG(cast(GSList*) p); + return new ListSG(cast(GSList*) __p); + } + + /** + * Initalizes the gdk-pixbuf loader modules referenced by the `loaders.cache` + * file present inside that directory. + * + * This is to be used by applications that want to ship certain loaders + * in a different location from the system ones. + * + * This is needed when the OS or runtime ships a minimal number of loaders + * so as to reduce the potential attack surface of carefully crafted image + * files, especially for uncommon file types. Applications that require + * broader image file types coverage, such as image viewers, would be + * expected to ship the gdk-pixbuf modules in a separate location, bundled + * with the application in a separate directory from the OS or runtime- + * provided modules. + * + * Params: + * path = Path to directory where the `loaders.cache` is installed + * + * Since: 2.40 + * + * Throws: GException on failure. + */ + public static bool initModules(string path) + { + GError* err = null; + + auto __p = gdk_pixbuf_init_modules(Str.toStringz(path), &err) != 0; + + if (err !is null) + { + throw new GException( new ErrorG(err) ); + } + + return __p; } /** @@ -823,12 +1007,13 @@ public class Pixbuf : ObjectG, IconIF, LoadableIconIF * version of this function. * * When the operation is finished, @callback will be called in the main thread. - * You can then call gdk_pixbuf_new_from_stream_finish() to get the result of the operation. + * You can then call gdk_pixbuf_new_from_stream_finish() to get the result of + * the operation. * * Params: - * stream = a #GInputStream from which to load the pixbuf - * cancellable = optional #GCancellable object, %NULL to ignore - * callback = a #GAsyncReadyCallback to call when the pixbuf is loaded + * stream = a `GInputStream` from which to load the pixbuf + * cancellable = optional `GCancellable` object, `NULL` to ignore + * callback = a `GAsyncReadyCallback` to call when the pixbuf is loaded * userData = the data to pass to the callback function * * Since: 2.24 @@ -848,12 +1033,12 @@ public class Pixbuf : ObjectG, IconIF, LoadableIconIF * You can then call gdk_pixbuf_new_from_stream_finish() to get the result of the operation. * * Params: - * stream = a #GInputStream from which to load the pixbuf + * stream = a `GInputStream` from which to load the pixbuf * width = the width the image should have or -1 to not constrain the width * height = the height the image should have or -1 to not constrain the height - * preserveAspectRatio = %TRUE to preserve the image's aspect ratio - * cancellable = optional #GCancellable object, %NULL to ignore - * callback = a #GAsyncReadyCallback to call when the pixbuf is loaded + * preserveAspectRatio = `TRUE` to preserve the image's aspect ratio + * cancellable = optional `GCancellable` object, `NULL` to ignore + * callback = a `GAsyncReadyCallback` to call when the pixbuf is loaded * userData = the data to pass to the callback function * * Since: 2.24 @@ -868,9 +1053,9 @@ public class Pixbuf : ObjectG, IconIF, LoadableIconIF * gdk_pixbuf_save_to_stream_async(). * * Params: - * asyncResult = a #GAsyncResult + * asyncResult = a `GAsyncResult` * - * Returns: %TRUE if the pixbuf was saved successfully, %FALSE if an error was set. + * Returns: `TRUE` if the pixbuf was saved successfully, `FALSE` if an error was set. * * Since: 2.24 * @@ -880,78 +1065,83 @@ public class Pixbuf : ObjectG, IconIF, LoadableIconIF { GError* err = null; - auto p = gdk_pixbuf_save_to_stream_finish((asyncResult is null) ? null : asyncResult.getAsyncResultStruct(), &err) != 0; + auto __p = gdk_pixbuf_save_to_stream_finish((asyncResult is null) ? null : asyncResult.getAsyncResultStruct(), &err) != 0; if (err !is null) { throw new GException( new ErrorG(err) ); } - return p; + return __p; } /** * Takes an existing pixbuf and adds an alpha channel to it. + * * If the existing pixbuf already had an alpha channel, the channel * values are copied from the original; otherwise, the alpha channel * is initialized to 255 (full opacity). * - * If @substitute_color is %TRUE, then the color specified by (@r, @g, @b) will be - * assigned zero opacity. That is, if you pass (255, 255, 255) for the - * substitute color, all white pixels will become fully transparent. + * If `substitute_color` is `TRUE`, then the color specified by the + * (`r`, `g`, `b`) arguments will be assigned zero opacity. That is, + * if you pass `(255, 255, 255)` for the substitute color, all white + * pixels will become fully transparent. + * + * If `substitute_color` is `FALSE`, then the (`r`, `g`, `b`) arguments + * will be ignored. * * Params: - * substituteColor = Whether to set a color to zero opacity. If this - * is %FALSE, then the (@r, @g, @b) arguments will be ignored. + * substituteColor = Whether to set a color to zero opacity. * r = Red value to substitute. * g = Green value to substitute. * b = Blue value to substitute. * - * Returns: A newly-created pixbuf with a reference count of 1. + * Returns: A newly-created pixbuf */ public Pixbuf addAlpha(bool substituteColor, char r, char g, char b) { - auto p = gdk_pixbuf_add_alpha(gdkPixbuf, substituteColor, r, g, b); + auto __p = gdk_pixbuf_add_alpha(gdkPixbuf, substituteColor, r, g, b); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Pixbuf)(cast(GdkPixbuf*) p, true); + return ObjectG.getDObject!(Pixbuf)(cast(GdkPixbuf*) __p, true); } /** * Takes an existing pixbuf and checks for the presence of an - * associated "orientation" option, which may be provided by the - * jpeg loader (which reads the exif orientation tag) or the - * tiff loader (which reads the tiff orientation tag, and - * compensates it for the partial transforms performed by - * libtiff). If an orientation option/tag is present, the - * appropriate transform will be performed so that the pixbuf - * is oriented correctly. - * - * Returns: A newly-created pixbuf, %NULL if - * not enough memory could be allocated for it, or a reference to the - * input pixbuf (with an increased reference count). + * associated "orientation" option. + * + * The orientation option may be provided by the JPEG loader (which + * reads the exif orientation tag) or the TIFF loader (which reads + * the TIFF orientation tag, and compensates it for the partial + * transforms performed by libtiff). + * + * If an orientation option/tag is present, the appropriate transform + * will be performed so that the pixbuf is oriented correctly. + * + * Returns: A newly-created pixbuf * * Since: 2.12 */ public Pixbuf applyEmbeddedOrientation() { - auto p = gdk_pixbuf_apply_embedded_orientation(gdkPixbuf); + auto __p = gdk_pixbuf_apply_embedded_orientation(gdkPixbuf); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Pixbuf)(cast(GdkPixbuf*) p, true); + return ObjectG.getDObject!(Pixbuf)(cast(GdkPixbuf*) __p, true); } /** * Creates a transformation of the source image @src by scaling by * @scale_x and @scale_y then translating by @offset_x and @offset_y. + * * This gives an image in the coordinates of the destination pixbuf. * The rectangle (@dest_x, @dest_y, @dest_width, @dest_height) * is then alpha blended onto the corresponding rectangle of the @@ -1019,9 +1209,9 @@ public class Pixbuf : ObjectG, IconIF, LoadableIconIF } /** - * Creates a new #GdkPixbuf by scaling @src to @dest_width x - * @dest_height and alpha blending the result with a checkboard of colors - * @color1 and @color2. + * Creates a new pixbuf by scaling `src` to `dest_width` x `dest_height` + * and alpha blending the result with a checkboard of colors `color1` + * and `color2`. * * Params: * destWidth = the width of destination image @@ -1032,44 +1222,45 @@ public class Pixbuf : ObjectG, IconIF, LoadableIconIF * color1 = the color of check at upper left * color2 = the color of the other check * - * Returns: the new #GdkPixbuf, or %NULL if not enough memory could be - * allocated for it. + * Returns: the new pixbuf */ public Pixbuf compositeColorSimple(int destWidth, int destHeight, GdkInterpType interpType, int overallAlpha, int checkSize, uint color1, uint color2) { - auto p = gdk_pixbuf_composite_color_simple(gdkPixbuf, destWidth, destHeight, interpType, overallAlpha, checkSize, color1, color2); + auto __p = gdk_pixbuf_composite_color_simple(gdkPixbuf, destWidth, destHeight, interpType, overallAlpha, checkSize, color1, color2); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Pixbuf)(cast(GdkPixbuf*) p, true); + return ObjectG.getDObject!(Pixbuf)(cast(GdkPixbuf*) __p, true); } /** - * Creates a new #GdkPixbuf with a copy of the information in the specified - * @pixbuf. Note that this does not copy the options set on the original #GdkPixbuf, + * Creates a new `GdkPixbuf` with a copy of the information in the specified + * `pixbuf`. + * + * Note that this does not copy the options set on the original `GdkPixbuf`, * use gdk_pixbuf_copy_options() for this. * - * Returns: A newly-created pixbuf with a reference count of 1, or %NULL if - * not enough memory could be allocated. + * Returns: A newly-created pixbuf */ public Pixbuf copy() { - auto p = gdk_pixbuf_copy(gdkPixbuf); + auto __p = gdk_pixbuf_copy(gdkPixbuf); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Pixbuf)(cast(GdkPixbuf*) p, true); + return ObjectG.getDObject!(Pixbuf)(cast(GdkPixbuf*) __p, true); } /** - * Copies a rectangular area from @src_pixbuf to @dest_pixbuf. Conversion of - * pixbuf formats is done automatically. + * Copies a rectangular area from `src_pixbuf` to `dest_pixbuf`. + * + * Conversion of pixbuf formats is done automatically. * * If the source rectangle overlaps the destination rectangle on the * same pixbuf, it will be overwritten during the copy operation. @@ -1090,15 +1281,17 @@ public class Pixbuf : ObjectG, IconIF, LoadableIconIF } /** - * Copy the key/value pair options attached to a #GdkPixbuf to another. + * Copies the key/value pair options attached to a `GdkPixbuf` to another + * `GdkPixbuf`. + * * This is useful to keep original metadata after having manipulated * a file. However be careful to remove metadata which you've already * applied, such as the "orientation" option after rotating the image. * * Params: - * destPixbuf = the #GdkPixbuf to copy options to + * destPixbuf = the destination pixbuf * - * Returns: %TRUE on success. + * Returns: `TRUE` on success. * * Since: 2.36 */ @@ -1109,12 +1302,14 @@ public class Pixbuf : ObjectG, IconIF, LoadableIconIF /** * Clears a pixbuf to the given RGBA value, converting the RGBA value into - * the pixbuf's pixel format. The alpha will be ignored if the pixbuf - * doesn't have an alpha channel. + * the pixbuf's pixel format. + * + * The alpha component will be ignored if the pixbuf doesn't have an alpha + * channel. * * Params: - * pixel = RGBA pixel to clear to - * (0xffffffff is opaque white, 0x00000000 transparent black) + * pixel = RGBA pixel to used to clear (`0xffffffff` is opaque white, + * `0x00000000` transparent black) */ public void fill(uint pixel) { @@ -1126,23 +1321,22 @@ public class Pixbuf : ObjectG, IconIF, LoadableIconIF * result in a new pixbuf. * * Params: - * horizontal = %TRUE to flip horizontally, %FALSE to flip vertically + * horizontal = `TRUE` to flip horizontally, `FALSE` to flip vertically * - * Returns: the new #GdkPixbuf, or %NULL - * if not enough memory could be allocated for it. + * Returns: the new pixbuf * * Since: 2.6 */ public Pixbuf flip(bool horizontal) { - auto p = gdk_pixbuf_flip(gdkPixbuf, horizontal); + auto __p = gdk_pixbuf_flip(gdkPixbuf, horizontal); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Pixbuf)(cast(GdkPixbuf*) p, true); + return ObjectG.getDObject!(Pixbuf)(cast(GdkPixbuf*) __p, true); } /** @@ -1180,7 +1374,7 @@ public class Pixbuf : ObjectG, IconIF, LoadableIconIF /** * Queries whether a pixbuf has an alpha channel (opacity information). * - * Returns: %TRUE if it has an alpha channel, %FALSE otherwise. + * Returns: `TRUE` if it has an alpha channel, `FALSE` otherwise. */ public bool getHasAlpha() { @@ -1227,8 +1421,7 @@ public class Pixbuf : ObjectG, IconIF, LoadableIconIF * Params: * key = a nul-terminated string. * - * Returns: the value associated with @key. This is a nul-terminated - * string that should not be freed or %NULL if @key was not found. + * Returns: the value associated with `key` */ public string getOption(string key) { @@ -1236,37 +1429,38 @@ public class Pixbuf : ObjectG, IconIF, LoadableIconIF } /** - * Returns a #GHashTable with a list of all the options that may have been - * attached to the @pixbuf when it was loaded, or that may have been - * attached by another function using gdk_pixbuf_set_option(). + * Returns a `GHashTable` with a list of all the options that may have been + * attached to the `pixbuf` when it was loaded, or that may have been + * attached by another function using [method@GdkPixbuf.Pixbuf.set_option]. * - * See gdk_pixbuf_get_option() for more details. - * - * Returns: a #GHashTable of key/values + * Returns: a #GHashTable + * of key/values pairs * * Since: 2.32 */ public HashTable getOptions() { - auto p = gdk_pixbuf_get_options(gdkPixbuf); + auto __p = gdk_pixbuf_get_options(gdkPixbuf); - if(p is null) + if(__p is null) { return null; } - return new HashTable(cast(GHashTable*) p); + return new HashTable(cast(GHashTable*) __p); } /** * Queries a pointer to the pixel data of a pixbuf. * - * Returns: A pointer to the pixbuf's - * pixel data. Please see the section on [image data][image-data] - * for information about how the pixel data is stored in memory. + * This function will cause an implicit copy of the pixbuf data if the + * pixbuf was created from read-only data. * - * This function will cause an implicit copy of the pixbuf data if the - * pixbuf was created from read-only data. + * Please see the section on [image data](class.Pixbuf.html#image-data) for information + * about how the pixel data is stored in memory. + * + * Returns: A pointer to the pixbuf's + * pixel data. * * Since: 2.26 */ @@ -1274,9 +1468,9 @@ public class Pixbuf : ObjectG, IconIF, LoadableIconIF { uint length; - auto p = gdk_pixbuf_get_pixels_with_length(gdkPixbuf, &length); + auto __p = gdk_pixbuf_get_pixels_with_length(gdkPixbuf, &length); - return p[0 .. length]; + return __p[0 .. length]; } /** @@ -1301,13 +1495,14 @@ public class Pixbuf : ObjectG, IconIF, LoadableIconIF } /** - * Creates a new pixbuf which represents a sub-region of @src_pixbuf. + * Creates a new pixbuf which represents a sub-region of `src_pixbuf`. + * * The new pixbuf shares its pixels with the original pixbuf, so * writing to one affects both. The new pixbuf holds a reference to - * @src_pixbuf, so @src_pixbuf will not be finalized until the new + * `src_pixbuf`, so `src_pixbuf` will not be finalized until the new * pixbuf is finalized. * - * Note that if @src_pixbuf is read-only, this function will force it + * Note that if `src_pixbuf` is read-only, this function will force it * to be mutable. * * Params: @@ -1320,21 +1515,22 @@ public class Pixbuf : ObjectG, IconIF, LoadableIconIF */ public Pixbuf newSubpixbuf(int srcX, int srcY, int width, int height) { - auto p = gdk_pixbuf_new_subpixbuf(gdkPixbuf, srcX, srcY, width, height); + auto __p = gdk_pixbuf_new_subpixbuf(gdkPixbuf, srcX, srcY, width, height); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Pixbuf)(cast(GdkPixbuf*) p, true); + return ObjectG.getDObject!(Pixbuf)(cast(GdkPixbuf*) __p, true); } /** * Provides a #GBytes buffer containing the raw pixel data; the data - * must not be modified. This function allows skipping the implicit - * copy that must be made if gdk_pixbuf_get_pixels() is called on a - * read-only pixbuf. + * must not be modified. + * + * This function allows skipping the implicit copy that must be made + * if gdk_pixbuf_get_pixels() is called on a read-only pixbuf. * * Returns: A new reference to a read-only copy of * the pixel data. Note that for mutable pixbufs, this function will @@ -1345,21 +1541,21 @@ public class Pixbuf : ObjectG, IconIF, LoadableIconIF */ public Bytes readPixelBytes() { - auto p = gdk_pixbuf_read_pixel_bytes(gdkPixbuf); + auto __p = gdk_pixbuf_read_pixel_bytes(gdkPixbuf); - if(p is null) + if(__p is null) { return null; } - return new Bytes(cast(GBytes*) p, true); + return new Bytes(cast(GBytes*) __p, true); } /** - * Provides a read-only pointer to the raw pixel data; must not be - * modified. This function allows skipping the implicit copy that - * must be made if gdk_pixbuf_get_pixels() is called on a read-only - * pixbuf. + * Provides a read-only pointer to the raw pixel data. + * + * This function allows skipping the implicit copy that must be made + * if gdk_pixbuf_get_pixels() is called on a read-only pixbuf. * * Returns: a read-only pointer to the raw pixel data * @@ -1371,12 +1567,12 @@ public class Pixbuf : ObjectG, IconIF, LoadableIconIF } /** - * Remove the key/value pair option attached to a #GdkPixbuf. + * Removes the key/value pair option attached to a `GdkPixbuf`. * * Params: * key = a nul-terminated string representing the key to remove. * - * Returns: %TRUE if an option was removed, %FALSE if not. + * Returns: `TRUE` if an option was removed, `FALSE` if not. * * Since: 2.36 */ @@ -1389,38 +1585,43 @@ public class Pixbuf : ObjectG, IconIF, LoadableIconIF * Rotates a pixbuf by a multiple of 90 degrees, and returns the * result in a new pixbuf. * - * If @angle is 0, a copy of @src is returned, avoiding any rotation. + * If `angle` is 0, this function will return a copy of `src`. * * Params: * angle = the angle to rotate by * - * Returns: the new #GdkPixbuf, or %NULL - * if not enough memory could be allocated for it. + * Returns: the new pixbuf * * Since: 2.6 */ public Pixbuf rotateSimple(GdkPixbufRotation angle) { - auto p = gdk_pixbuf_rotate_simple(gdkPixbuf, angle); + auto __p = gdk_pixbuf_rotate_simple(gdkPixbuf, angle); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Pixbuf)(cast(GdkPixbuf*) p, true); + return ObjectG.getDObject!(Pixbuf)(cast(GdkPixbuf*) __p, true); } /** - * Modifies saturation and optionally pixelates @src, placing the result in - * @dest. @src and @dest may be the same pixbuf with no ill effects. If - * @saturation is 1.0 then saturation is not changed. If it's less than 1.0, - * saturation is reduced (the image turns toward grayscale); if greater than - * 1.0, saturation is increased (the image gets more vivid colors). If @pixelate - * is %TRUE, then pixels are faded in a checkerboard pattern to create a - * pixelated image. @src and @dest must have the same image format, size, and + * Modifies saturation and optionally pixelates `src`, placing the result in + * `dest`. + * + * The `src` and `dest` pixbufs must have the same image format, size, and * rowstride. * + * The `src` and `dest` arguments may be the same pixbuf with no ill effects. + * + * If `saturation` is 1.0 then saturation is not changed. If it's less than 1.0, + * saturation is reduced (the image turns toward grayscale); if greater than + * 1.0, saturation is increased (the image gets more vivid colors). + * + * If `pixelate` is `TRUE`, then pixels are faded in a checkerboard pattern to + * create a pixelated image. + * * Params: * dest = place to write modified version of @src * saturation = saturation factor @@ -1432,16 +1633,21 @@ public class Pixbuf : ObjectG, IconIF, LoadableIconIF } /** + * Vector version of `gdk_pixbuf_save_to_callback()`. + * * Saves pixbuf to a callback in format @type, which is currently "jpeg", - * "png", "tiff", "ico" or "bmp". If @error is set, %FALSE will be returned. See - * gdk_pixbuf_save_to_callback () for more details. + * "png", "tiff", "ico" or "bmp". + * + * If @error is set, `FALSE` will be returned. + * + * See [method@GdkPixbuf.Pixbuf.save_to_callback] for more details. * * Params: * saveFunc = a function that is called to save each block of data that * the save routine generates. * userData = user data to pass to the save function. * type = name of file format. - * optionKeys = name of options to set, %NULL-terminated + * optionKeys = name of options to set * optionValues = values for named options * * Returns: whether an error was set @@ -1454,30 +1660,32 @@ public class Pixbuf : ObjectG, IconIF, LoadableIconIF { GError* err = null; - auto p = gdk_pixbuf_save_to_callbackv(gdkPixbuf, saveFunc, userData, Str.toStringz(type), Str.toStringzArray(optionKeys), Str.toStringzArray(optionValues), &err) != 0; + auto __p = gdk_pixbuf_save_to_callbackv(gdkPixbuf, saveFunc, userData, Str.toStringz(type), Str.toStringzArray(optionKeys), Str.toStringzArray(optionValues), &err) != 0; if (err !is null) { throw new GException( new ErrorG(err) ); } - return p; + return __p; } /** - * Saves @pixbuf to an output stream. + * Saves `pixbuf` to an output stream. * * Supported file formats are currently "jpeg", "tiff", "png", "ico" or - * "bmp". See gdk_pixbuf_save_to_stream() for more details. + * "bmp". + * + * See [method@GdkPixbuf.Pixbuf.save_to_stream] for more details. * * Params: - * stream = a #GOutputStream to save the pixbuf to + * stream = a `GOutputStream` to save the pixbuf to * type = name of file format - * optionKeys = name of options to set, %NULL-terminated + * optionKeys = name of options to set * optionValues = values for named options - * cancellable = optional #GCancellable object, %NULL to ignore + * cancellable = optional `GCancellable` object, `NULL` to ignore * - * Returns: %TRUE if the pixbuf was saved successfully, %FALSE if an + * Returns: `TRUE` if the pixbuf was saved successfully, `FALSE` if an * error was set. * * Since: 2.36 @@ -1488,32 +1696,34 @@ public class Pixbuf : ObjectG, IconIF, LoadableIconIF { GError* err = null; - auto p = gdk_pixbuf_save_to_streamv(gdkPixbuf, (stream is null) ? null : stream.getOutputStreamStruct(), Str.toStringz(type), Str.toStringzArray(optionKeys), Str.toStringzArray(optionValues), (cancellable is null) ? null : cancellable.getCancellableStruct(), &err) != 0; + auto __p = gdk_pixbuf_save_to_streamv(gdkPixbuf, (stream is null) ? null : stream.getOutputStreamStruct(), Str.toStringz(type), Str.toStringzArray(optionKeys), Str.toStringzArray(optionValues), (cancellable is null) ? null : cancellable.getCancellableStruct(), &err) != 0; if (err !is null) { throw new GException( new ErrorG(err) ); } - return p; + return __p; } /** - * Saves @pixbuf to an output stream asynchronously. + * Saves `pixbuf` to an output stream asynchronously. * * For more details see gdk_pixbuf_save_to_streamv(), which is the synchronous * version of this function. * - * When the operation is finished, @callback will be called in the main thread. - * You can then call gdk_pixbuf_save_to_stream_finish() to get the result of the operation. + * When the operation is finished, `callback` will be called in the main thread. + * + * You can then call gdk_pixbuf_save_to_stream_finish() to get the result of + * the operation. * * Params: - * stream = a #GOutputStream to which to save the pixbuf + * stream = a `GOutputStream` to which to save the pixbuf * type = name of file format - * optionKeys = name of options to set, %NULL-terminated + * optionKeys = name of options to set * optionValues = values for named options - * cancellable = optional #GCancellable object, %NULL to ignore - * callback = a #GAsyncReadyCallback to call when the pixbuf is saved + * cancellable = optional `GCancellable` object, `NULL` to ignore + * callback = a `GAsyncReadyCallback` to call when the pixbuf is saved * userData = the data to pass to the callback function * * Since: 2.36 @@ -1524,14 +1734,18 @@ public class Pixbuf : ObjectG, IconIF, LoadableIconIF } /** - * Saves pixbuf to a file in @type, which is currently "jpeg", "png", "tiff", "ico" or "bmp". - * If @error is set, %FALSE will be returned. - * See gdk_pixbuf_save () for more details. + * Vector version of `gdk_pixbuf_save()`. + * + * Saves pixbuf to a file in `type`, which is currently "jpeg", "png", "tiff", "ico" or "bmp". + * + * If @error is set, `FALSE` will be returned. + * + * See [method@GdkPixbuf.Pixbuf.save] for more details. * * Params: * filename = name of file to save. * type = name of file format. - * optionKeys = name of options to set, %NULL-terminated + * optionKeys = name of options to set * optionValues = values for named options * * Returns: whether an error was set @@ -1542,14 +1756,14 @@ public class Pixbuf : ObjectG, IconIF, LoadableIconIF { GError* err = null; - auto p = gdk_pixbuf_savev(gdkPixbuf, Str.toStringz(filename), Str.toStringz(type), Str.toStringzArray(optionKeys), Str.toStringzArray(optionValues), &err) != 0; + auto __p = gdk_pixbuf_savev(gdkPixbuf, Str.toStringz(filename), Str.toStringz(type), Str.toStringzArray(optionKeys), Str.toStringzArray(optionValues), &err) != 0; if (err !is null) { throw new GException( new ErrorG(err) ); } - return p; + return __p; } /** @@ -1559,8 +1773,8 @@ public class Pixbuf : ObjectG, IconIF, LoadableIconIF * @dest_height) of the resulting image onto the destination image * replacing the previous contents. * - * Try to use gdk_pixbuf_scale_simple() first, this function is - * the industrial-strength power tool you can fall back to if + * Try to use gdk_pixbuf_scale_simple() first; this function is + * the industrial-strength power tool you can fall back to, if * gdk_pixbuf_scale_simple() isn't powerful enough. * * If the source rectangle overlaps the destination rectangle on the @@ -1585,52 +1799,55 @@ public class Pixbuf : ObjectG, IconIF, LoadableIconIF } /** - * Create a new #GdkPixbuf containing a copy of @src scaled to - * @dest_width x @dest_height. Leaves @src unaffected. @interp_type - * should be #GDK_INTERP_NEAREST if you want maximum speed (but when - * scaling down #GDK_INTERP_NEAREST is usually unusably ugly). The - * default @interp_type should be #GDK_INTERP_BILINEAR which offers - * reasonable quality and speed. + * Create a new pixbuf containing a copy of `src` scaled to + * `dest_width` x `dest_height`. + * + * This function leaves `src` unaffected. + * + * The `interp_type` should be `GDK_INTERP_NEAREST` if you want maximum + * speed (but when scaling down `GDK_INTERP_NEAREST` is usually unusably + * ugly). The default `interp_type` should be `GDK_INTERP_BILINEAR` which + * offers reasonable quality and speed. * - * You can scale a sub-portion of @src by creating a sub-pixbuf - * pointing into @src; see gdk_pixbuf_new_subpixbuf(). + * You can scale a sub-portion of `src` by creating a sub-pixbuf + * pointing into `src`; see [method@GdkPixbuf.Pixbuf.new_subpixbuf]. * - * If @dest_width and @dest_height are equal to the @src width and height, a - * copy of @src is returned, avoiding any scaling. + * If `dest_width` and `dest_height` are equal to the width and height of + * `src`, this function will return an unscaled copy of `src`. * - * For more complicated scaling/alpha blending see gdk_pixbuf_scale() - * and gdk_pixbuf_composite(). + * For more complicated scaling/alpha blending see [method@GdkPixbuf.Pixbuf.scale] + * and [method@GdkPixbuf.Pixbuf.composite]. * * Params: * destWidth = the width of destination image * destHeight = the height of destination image * interpType = the interpolation type for the transformation. * - * Returns: the new #GdkPixbuf, or %NULL if not enough memory could be - * allocated for it. + * Returns: the new pixbuf */ public Pixbuf scaleSimple(int destWidth, int destHeight, GdkInterpType interpType) { - auto p = gdk_pixbuf_scale_simple(gdkPixbuf, destWidth, destHeight, interpType); + auto __p = gdk_pixbuf_scale_simple(gdkPixbuf, destWidth, destHeight, interpType); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Pixbuf)(cast(GdkPixbuf*) p, true); + return ObjectG.getDObject!(Pixbuf)(cast(GdkPixbuf*) __p, true); } /** - * Attaches a key/value pair as an option to a #GdkPixbuf. If @key already - * exists in the list of options attached to @pixbuf, the new value is - * ignored and %FALSE is returned. + * Attaches a key/value pair as an option to a `GdkPixbuf`. + * + * If `key` already exists in the list of options attached to the `pixbuf`, + * the new value is ignored and `FALSE` is returned. * * Params: * key = a nul-terminated string. * value = a nul-terminated string. * - * Returns: %TRUE on success. + * Returns: `TRUE` on success * * Since: 2.2 */ @@ -1640,18 +1857,20 @@ public class Pixbuf : ObjectG, IconIF, LoadableIconIF } /** - * Converts a #GdkPixdata to a #GdkPixbuf. If @copy_pixels is %TRUE or - * if the pixel data is run-length-encoded, the pixel data is copied into - * newly-allocated memory; otherwise it is reused. + * Converts a `GdkPixdata` to a `GdkPixbuf`. + * + * If `copy_pixels` is `TRUE` or if the pixel data is run-length-encoded, + * the pixel data is copied into newly-allocated memory; otherwise it is + * reused. * - * Deprecated: Use #GResource instead. + * Deprecated: Use `GResource` instead. * * Params: - * pixdata = a #GdkPixdata to convert into a #GdkPixbuf. + * pixdata = a #GdkPixdata to convert into a `GdkPixbuf`. * copyPixels = whether to copy raw pixel data; run-length encoded * pixel data is always copied. * - * Returns: a new #GdkPixbuf. + * Returns: a new pixbuf * * Throws: GException on failure. */ @@ -1659,18 +1878,18 @@ public class Pixbuf : ObjectG, IconIF, LoadableIconIF { GError* err = null; - auto p = gdk_pixbuf_from_pixdata((pixdata is null) ? null : pixdata.getPixdataStruct(), copyPixels, &err); + auto __p = gdk_pixbuf_from_pixdata((pixdata is null) ? null : pixdata.getPixdataStruct(), copyPixels, &err); if (err !is null) { throw new GException( new ErrorG(err) ); } - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Pixbuf)(cast(GdkPixbuf*) p, true); + return ObjectG.getDObject!(Pixbuf)(cast(GdkPixbuf*) __p, true); } } diff --git a/generated/gtkd/gdkpixbuf/PixbufAnimation.d b/generated/gtkd/gdkpixbuf/PixbufAnimation.d index ed51ca8be..048d27732 100644 --- a/generated/gtkd/gdkpixbuf/PixbufAnimation.d +++ b/generated/gtkd/gdkpixbuf/PixbufAnimation.d @@ -41,7 +41,19 @@ public import gtkc.gdkpixbuftypes; /** - * An opaque struct representing an animation. + * An opaque object representing an animation. + * + * The GdkPixBuf library provides a simple mechanism to load and + * represent animations. An animation is conceptually a series of + * frames to be displayed over time. + * + * The animation may not be represented as a series of frames + * internally; for example, it may be stored as a sprite and + * instructions for moving the sprite around a background. + * + * To display an animation you don't need to understand its + * representation, however; you just ask `GdkPixbuf` what should + * be displayed at a given point in time. */ public class PixbufAnimation : ObjectG { @@ -79,19 +91,20 @@ public class PixbufAnimation : ObjectG } /** - * Creates a new animation by loading it from a file. The file format is - * detected automatically. If the file's format does not support multi-frame - * images, then an animation with a single frame will be created. Possible errors - * are in the #GDK_PIXBUF_ERROR and #G_FILE_ERROR domains. + * Creates a new animation by loading it from a file. + * + * The file format is detected automatically. + * + * If the file's format does not support multi-frame images, then an animation + * with a single frame will be created. + * + * Possible errors are in the `GDK_PIXBUF_ERROR` and `G_FILE_ERROR` domains. * * Params: * filename = Name of file to load, in the GLib file * name encoding * - * Returns: A newly-created animation with a reference count of 1, or %NULL - * if any of several error conditions ocurred: the file could not be opened, - * there was no loader for the file's format, there was not enough memory to - * allocate the image buffer, or the image file contained invalid data. + * Returns: A newly-created animation * * Throws: GException on failure. * Throws: ConstructionException GTK+ fails to create the object. @@ -100,40 +113,40 @@ public class PixbufAnimation : ObjectG { GError* err = null; - auto p = gdk_pixbuf_animation_new_from_file(Str.toStringz(filename), &err); + auto __p = gdk_pixbuf_animation_new_from_file(Str.toStringz(filename), &err); if (err !is null) { throw new GException( new ErrorG(err) ); } - if(p is null) + if(__p is null) { throw new ConstructionException("null returned by new_from_file"); } - this(cast(GdkPixbufAnimation*) p, true); + this(cast(GdkPixbufAnimation*) __p, true); } /** * Creates a new animation by loading it from an input stream. * - * The file format is detected automatically. If %NULL is returned, then - * @error will be set. The @cancellable can be used to abort the operation - * from another thread. If the operation was cancelled, the error - * %G_IO_ERROR_CANCELLED will be returned. Other possible errors are in - * the #GDK_PIXBUF_ERROR and %G_IO_ERROR domains. + * The file format is detected automatically. + * + * If `NULL` is returned, then @error will be set. + * + * The @cancellable can be used to abort the operation from another thread. + * If the operation was cancelled, the error `G_IO_ERROR_CANCELLED` will be + * returned. Other possible errors are in the `GDK_PIXBUF_ERROR` and + * `G_IO_ERROR` domains. * * The stream is not closed. * * Params: - * stream = a #GInputStream to load the pixbuf from - * cancellable = optional #GCancellable object, %NULL to ignore + * stream = a `GInputStream` to load the pixbuf from + * cancellable = optional `GCancellable` object * - * Returns: A newly-created pixbuf, or %NULL if any of several error - * conditions occurred: the file could not be opened, the image format is - * not supported, there was not enough memory to allocate the image buffer, - * the stream contained invalid data, or the operation was cancelled. + * Returns: A newly-created animation * * Since: 2.28 * @@ -144,30 +157,29 @@ public class PixbufAnimation : ObjectG { GError* err = null; - auto p = gdk_pixbuf_animation_new_from_stream((stream is null) ? null : stream.getInputStreamStruct(), (cancellable is null) ? null : cancellable.getCancellableStruct(), &err); + auto __p = gdk_pixbuf_animation_new_from_stream((stream is null) ? null : stream.getInputStreamStruct(), (cancellable is null) ? null : cancellable.getCancellableStruct(), &err); if (err !is null) { throw new GException( new ErrorG(err) ); } - if(p is null) + if(__p is null) { throw new ConstructionException("null returned by new_from_stream"); } - this(cast(GdkPixbufAnimation*) p, true); + this(cast(GdkPixbufAnimation*) __p, true); } /** * Finishes an asynchronous pixbuf animation creation operation started with - * gdk_pixbuf_animation_new_from_stream_async(). + * [func@GdkPixbuf.PixbufAnimation.new_from_stream_async]. * * Params: * asyncResult = a #GAsyncResult * - * Returns: a #GdkPixbufAnimation or %NULL on error. Free the returned - * object with g_object_unref(). + * Returns: the newly created animation * * Since: 2.28 * @@ -178,19 +190,19 @@ public class PixbufAnimation : ObjectG { GError* err = null; - auto p = gdk_pixbuf_animation_new_from_stream_finish((asyncResult is null) ? null : asyncResult.getAsyncResultStruct(), &err); + auto __p = gdk_pixbuf_animation_new_from_stream_finish((asyncResult is null) ? null : asyncResult.getAsyncResultStruct(), &err); if (err !is null) { throw new GException( new ErrorG(err) ); } - if(p is null) + if(__p is null) { throw new ConstructionException("null returned by new_from_stream_finish"); } - this(cast(GdkPixbufAnimation*) p, true); + this(cast(GdkPixbufAnimation*) __p, true); } /** @@ -199,14 +211,14 @@ public class PixbufAnimation : ObjectG * For more details see gdk_pixbuf_new_from_stream(), which is the synchronous * version of this function. * - * When the operation is finished, @callback will be called in the main thread. + * When the operation is finished, `callback` will be called in the main thread. * You can then call gdk_pixbuf_animation_new_from_stream_finish() to get the * result of the operation. * * Params: * stream = a #GInputStream from which to load the animation - * cancellable = optional #GCancellable object, %NULL to ignore - * callback = a #GAsyncReadyCallback to call when the pixbuf is loaded + * cancellable = optional #GCancellable object + * callback = a `GAsyncReadyCallback` to call when the pixbuf is loaded * userData = the data to pass to the callback function * * Since: 2.28 @@ -227,9 +239,10 @@ public class PixbufAnimation : ObjectG } /** - * Get an iterator for displaying an animation. The iterator provides - * the frames that should be displayed at a given time. It should be - * freed after use with g_object_unref(). + * Get an iterator for displaying an animation. + * + * The iterator provides the frames that should be displayed at a + * given time. * * @start_time would normally come from g_get_current_time(), and marks * the beginning of animation playback. After creating an iterator, you @@ -241,7 +254,7 @@ public class PixbufAnimation : ObjectG * the image is updated, you should reinstall the timeout with the new, * possibly-changed delay time. * - * As a shortcut, if @start_time is %NULL, the result of + * As a shortcut, if @start_time is `NULL`, the result of * g_get_current_time() will be used automatically. * * To update the image (i.e. possibly change the result of @@ -252,14 +265,14 @@ public class PixbufAnimation : ObjectG * after the delay time, you should also update it whenever you * receive the area_updated signal and * gdk_pixbuf_animation_iter_on_currently_loading_frame() returns - * %TRUE. In this case, the frame currently being fed into the loader + * `TRUE`. In this case, the frame currently being fed into the loader * has received new data, so needs to be refreshed. The delay time for * a frame may also be modified after an area_updated signal, for * example if the delay time for a frame is encoded in the data after * the frame itself. So your timeout should be reinstalled after any * area_updated signal. * - * A delay time of -1 is possible, indicating "infinite." + * A delay time of -1 is possible, indicating "infinite". * * Params: * startTime = time when the animation starts playing @@ -268,36 +281,41 @@ public class PixbufAnimation : ObjectG */ public PixbufAnimationIter getIter(TimeVal startTime) { - auto p = gdk_pixbuf_animation_get_iter(gdkPixbufAnimation, (startTime is null) ? null : startTime.getTimeValStruct()); + auto __p = gdk_pixbuf_animation_get_iter(gdkPixbufAnimation, (startTime is null) ? null : startTime.getTimeValStruct()); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(PixbufAnimationIter)(cast(GdkPixbufAnimationIter*) p, true); + return ObjectG.getDObject!(PixbufAnimationIter)(cast(GdkPixbufAnimationIter*) __p, true); } /** + * Retrieves a static image for the animation. + * * If an animation is really just a plain image (has only one frame), - * this function returns that image. If the animation is an animation, - * this function returns a reasonable thing to display as a static - * unanimated image, which might be the first frame, or something more - * sophisticated. If an animation hasn't loaded any frames yet, this - * function will return %NULL. + * this function returns that image. + * + * If the animation is an animation, this function returns a reasonable + * image to use as a static unanimated image, which might be the first + * frame, or something more sophisticated depending on the file format. + * + * If an animation hasn't loaded any frames yet, this function will + * return `NULL`. * * Returns: unanimated image representing the animation */ public Pixbuf getStaticImage() { - auto p = gdk_pixbuf_animation_get_static_image(gdkPixbufAnimation); + auto __p = gdk_pixbuf_animation_get_static_image(gdkPixbufAnimation); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Pixbuf)(cast(GdkPixbuf*) p); + return ObjectG.getDObject!(Pixbuf)(cast(GdkPixbuf*) __p); } /** @@ -311,12 +329,14 @@ public class PixbufAnimation : ObjectG } /** + * Checks whether the animation is a static image. + * * If you load a file with gdk_pixbuf_animation_new_from_file() and it * turns out to be a plain, unanimated image, then this function will - * return %TRUE. Use gdk_pixbuf_animation_get_static_image() to retrieve + * return `TRUE`. Use gdk_pixbuf_animation_get_static_image() to retrieve * the image. * - * Returns: %TRUE if the "animation" was really just an image + * Returns: `TRUE` if the "animation" was really just an image */ public bool isStaticImage() { @@ -333,14 +353,14 @@ public class PixbufAnimation : ObjectG */ public override PixbufAnimation ref_() { - auto p = gdk_pixbuf_animation_ref(gdkPixbufAnimation); + auto __p = gdk_pixbuf_animation_ref(gdkPixbufAnimation); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(PixbufAnimation)(cast(GdkPixbufAnimation*) p); + return ObjectG.getDObject!(PixbufAnimation)(cast(GdkPixbufAnimation*) __p); } /** diff --git a/generated/gtkd/gdkpixbuf/PixbufAnimationIter.d b/generated/gtkd/gdkpixbuf/PixbufAnimationIter.d index b03726825..2d4ad8650 100644 --- a/generated/gtkd/gdkpixbuf/PixbufAnimationIter.d +++ b/generated/gtkd/gdkpixbuf/PixbufAnimationIter.d @@ -33,7 +33,7 @@ public import gtkc.gdkpixbuftypes; /** - * An opaque struct representing an iterator which points to a + * An opaque object representing an iterator which points to a * certain position in an animation. */ public class PixbufAnimationIter : ObjectG @@ -72,8 +72,10 @@ public class PixbufAnimationIter : ObjectG } /** - * Possibly advances an animation to a new frame. Chooses the frame based - * on the start time passed to gdk_pixbuf_animation_get_iter(). + * Possibly advances an animation to a new frame. + * + * Chooses the frame based on the start time passed to + * gdk_pixbuf_animation_get_iter(). * * @current_time would normally come from g_get_current_time(), and * must be greater than or equal to the time passed to @@ -82,20 +84,20 @@ public class PixbufAnimationIter : ObjectG * called. That is, you can't go backward in time; animations only * play forward. * - * As a shortcut, pass %NULL for the current time and g_get_current_time() + * As a shortcut, pass `NULL` for the current time and g_get_current_time() * will be invoked on your behalf. So you only need to explicitly pass * @current_time if you're doing something odd like playing the animation * at double speed. * - * If this function returns %FALSE, there's no need to update the animation + * If this function returns `FALSE`, there's no need to update the animation * display, assuming the display had been rendered prior to advancing; - * if %TRUE, you need to call gdk_pixbuf_animation_iter_get_pixbuf() + * if `TRUE`, you need to call gdk_pixbuf_animation_iter_get_pixbuf() * and update the display with the new pixbuf. * * Params: * currentTime = current time * - * Returns: %TRUE if the image may need updating + * Returns: `TRUE` if the image may need updating */ public bool advance(TimeVal currentTime) { @@ -104,9 +106,10 @@ public class PixbufAnimationIter : ObjectG /** * Gets the number of milliseconds the current pixbuf should be displayed, - * or -1 if the current pixbuf should be displayed forever. g_timeout_add() - * conveniently takes a timeout in milliseconds, so you can use a timeout - * to schedule the next update. + * or -1 if the current pixbuf should be displayed forever. + * + * The `g_timeout_add()` function conveniently takes a timeout in milliseconds, + * so you can use a timeout to schedule the next update. * * Note that some formats, like GIF, might clamp the timeout values in the * image file to avoid updates that are just too quick. The minimum timeout @@ -120,40 +123,45 @@ public class PixbufAnimationIter : ObjectG } /** - * Gets the current pixbuf which should be displayed; the pixbuf might not - * be the same size as the animation itself + * Gets the current pixbuf which should be displayed. + * + * The pixbuf might not be the same size as the animation itself * (gdk_pixbuf_animation_get_width(), gdk_pixbuf_animation_get_height()). - * This pixbuf should be displayed for - * gdk_pixbuf_animation_iter_get_delay_time() milliseconds. The caller - * of this function does not own a reference to the returned pixbuf; - * the returned pixbuf will become invalid when the iterator advances - * to the next frame, which may happen anytime you call - * gdk_pixbuf_animation_iter_advance(). Copy the pixbuf to keep it - * (don't just add a reference), as it may get recycled as you advance - * the iterator. + * + * This pixbuf should be displayed for gdk_pixbuf_animation_iter_get_delay_time() + * milliseconds. + * + * The caller of this function does not own a reference to the returned + * pixbuf; the returned pixbuf will become invalid when the iterator + * advances to the next frame, which may happen anytime you call + * gdk_pixbuf_animation_iter_advance(). + * + * Copy the pixbuf to keep it (don't just add a reference), as it may get + * recycled as you advance the iterator. * * Returns: the pixbuf to be displayed */ public Pixbuf getPixbuf() { - auto p = gdk_pixbuf_animation_iter_get_pixbuf(gdkPixbufAnimationIter); + auto __p = gdk_pixbuf_animation_iter_get_pixbuf(gdkPixbufAnimationIter); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Pixbuf)(cast(GdkPixbuf*) p); + return ObjectG.getDObject!(Pixbuf)(cast(GdkPixbuf*) __p); } /** * Used to determine how to respond to the area_updated signal on - * #GdkPixbufLoader when loading an animation. area_updated is emitted - * for an area of the frame currently streaming in to the loader. So if - * you're on the currently loading frame, you need to redraw the screen for - * the updated area. + * #GdkPixbufLoader when loading an animation. + * + * The `::area_updated` signal is emitted for an area of the frame currently + * streaming in to the loader. So if you're on the currently loading frame, + * you will need to redraw the screen for the updated area. * - * Returns: %TRUE if the frame we're on is partially loaded, or the last frame + * Returns: `TRUE` if the frame we're on is partially loaded, or the last frame */ public bool onCurrentlyLoadingFrame() { diff --git a/generated/gtkd/gdkpixbuf/PixbufFormat.d b/generated/gtkd/gdkpixbuf/PixbufFormat.d index 18ee1a211..f1503ed81 100644 --- a/generated/gtkd/gdkpixbuf/PixbufFormat.d +++ b/generated/gtkd/gdkpixbuf/PixbufFormat.d @@ -26,14 +26,24 @@ module gdkpixbuf.PixbufFormat; private import gdkpixbuf.c.functions; public import gdkpixbuf.c.types; +private import glib.MemorySlice; private import glib.Str; +private import glib.c.functions; private import gobject.ObjectG; public import gtkc.gdkpixbuftypes; private import gtkd.Loader; -/** */ -public class PixbufFormat +/** + * A `GdkPixbufFormat` contains information about the image format accepted + * by a module. + * + * Only modules should access the fields directly, applications should + * use the `gdk_pixbuf_format_*` family of functions. + * + * Since: 2.2 + */ +public final class PixbufFormat { /** the main Gtk struct */ protected GdkPixbufFormat* gdkPixbufFormat; @@ -69,6 +79,134 @@ public class PixbufFormat } + /** + * the name of the image format + */ + public @property string name() + { + return Str.toString(gdkPixbufFormat.name); + } + + /** Ditto */ + public @property void name(string value) + { + gdkPixbufFormat.name = Str.toStringz(value); + } + + /** + * the signature of the module + */ + public @property GdkPixbufModulePattern* signature() + { + return gdkPixbufFormat.signature; + } + + /** Ditto */ + public @property void signature(GdkPixbufModulePattern* value) + { + gdkPixbufFormat.signature = value; + } + + /** + * the message domain for the `description` + */ + public @property string domain() + { + return Str.toString(gdkPixbufFormat.domain); + } + + /** Ditto */ + public @property void domain(string value) + { + gdkPixbufFormat.domain = Str.toStringz(value); + } + + /** + * a description of the image format + */ + public @property string description() + { + return Str.toString(gdkPixbufFormat.description); + } + + /** Ditto */ + public @property void description(string value) + { + gdkPixbufFormat.description = Str.toStringz(value); + } + + /** + * the MIME types for the image format + */ + public @property string[] mimeTypes() + { + return Str.toStringArray(gdkPixbufFormat.mimeTypes); + } + + /** Ditto */ + public @property void mimeTypes(string[] value) + { + gdkPixbufFormat.mimeTypes = Str.toStringzArray(value); + } + + /** + * typical filename extensions for the + * image format + */ + public @property string[] extensions() + { + return Str.toStringArray(gdkPixbufFormat.extensions); + } + + /** Ditto */ + public @property void extensions(string[] value) + { + gdkPixbufFormat.extensions = Str.toStringzArray(value); + } + + /** + * a combination of `GdkPixbufFormatFlags` + */ + public @property uint flags() + { + return gdkPixbufFormat.flags; + } + + /** Ditto */ + public @property void flags(uint value) + { + gdkPixbufFormat.flags = value; + } + + /** + * a boolean determining whether the loader is disabled` + */ + public @property bool disabled() + { + return gdkPixbufFormat.disabled != 0; + } + + /** Ditto */ + public @property void disabled(bool value) + { + gdkPixbufFormat.disabled = value; + } + + /** + * a string containing license information, typically set to + * shorthands like "GPL", "LGPL", etc. + */ + public @property string license() + { + return Str.toString(gdkPixbufFormat.license); + } + + /** Ditto */ + public @property void license(string value) + { + gdkPixbufFormat.license = Str.toStringz(value); + } + /** */ public static GType getType() { @@ -76,27 +214,27 @@ public class PixbufFormat } /** - * Creates a copy of @format + * Creates a copy of `format`. * - * Returns: the newly allocated copy of a #GdkPixbufFormat. Use + * Returns: the newly allocated copy of a `GdkPixbufFormat`. Use * gdk_pixbuf_format_free() to free the resources when done * * Since: 2.22 */ public PixbufFormat copy() { - auto p = gdk_pixbuf_format_copy(gdkPixbufFormat); + auto __p = gdk_pixbuf_format_copy(gdkPixbufFormat); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(PixbufFormat)(cast(GdkPixbufFormat*) p, true); + return ObjectG.getDObject!(PixbufFormat)(cast(GdkPixbufFormat*) __p, true); } /** - * Frees the resources allocated when copying a #GdkPixbufFormat + * Frees the resources allocated when copying a `GdkPixbufFormat` * using gdk_pixbuf_format_copy() * * Since: 2.22 @@ -126,8 +264,8 @@ public class PixbufFormat * Returns the filename extensions typically used for files in the * given format. * - * Returns: a %NULL-terminated array of filename extensions which must be - * freed with g_strfreev() when it is no longer needed. + * Returns: an array of + * filename extensions * * Since: 2.2 */ @@ -140,12 +278,12 @@ public class PixbufFormat } /** - * Returns information about the license of the image loader for the format. The - * returned string should be a shorthand for a wellknown license, e.g. "LGPL", - * "GPL", "QPL", "GPL/QPL", or "other" to indicate some other license. This - * string should be freed with g_free() when it's no longer needed. + * Returns information about the license of the image loader for the format. + * + * The returned string should be a shorthand for a well known license, e.g. + * "LGPL", "GPL", "QPL", "GPL/QPL", or "other" to indicate some other license. * - * Returns: a string describing the license of @format. + * Returns: a string describing the license of the pixbuf format * * Since: 2.6 */ @@ -160,8 +298,7 @@ public class PixbufFormat /** * Returns the mime types supported by the format. * - * Returns: a %NULL-terminated array of mime types which must be freed with - * g_strfreev() when it is no longer needed. + * Returns: an array of mime types * * Since: 2.2 */ @@ -189,8 +326,9 @@ public class PixbufFormat } /** - * Returns whether this image format is disabled. See - * gdk_pixbuf_format_set_disabled(). + * Returns whether this image format is disabled. + * + * See gdk_pixbuf_format_set_disabled(). * * Returns: whether this image format is disabled. * @@ -202,14 +340,15 @@ public class PixbufFormat } /** - * Returns %TRUE if the save option specified by @option_key is supported when + * Returns `TRUE` if the save option specified by @option_key is supported when * saving a pixbuf using the module implementing @format. + * * See gdk_pixbuf_save() for more information about option keys. * * Params: * optionKey = the name of an option * - * Returns: %TRUE if the specified option is supported + * Returns: `TRUE` if the specified option is supported * * Since: 2.36 */ @@ -219,10 +358,11 @@ public class PixbufFormat } /** - * Returns whether this image format is scalable. If a file is in a - * scalable format, it is preferable to load it at the desired size, - * rather than loading it at the default size and scaling the - * resulting pixbuf to the desired size. + * Returns whether this image format is scalable. + * + * If a file is in a scalable format, it is preferable to load it at + * the desired size, rather than loading it at the default size and + * scaling the resulting pixbuf to the desired size. * * Returns: whether this image format is scalable. * @@ -246,13 +386,16 @@ public class PixbufFormat } /** - * Disables or enables an image format. If a format is disabled, - * gdk-pixbuf won't use the image loader for this format to load - * images. Applications can use this to avoid using image loaders - * with an inappropriate license, see gdk_pixbuf_format_get_license(). + * Disables or enables an image format. + * + * If a format is disabled, GdkPixbuf won't use the image loader for + * this format to load images. + * + * Applications can use this to avoid using image loaders with an + * inappropriate license, see gdk_pixbuf_format_get_license(). * * Params: - * disabled = %TRUE to disable the format @format + * disabled = `TRUE` to disable the format @format * * Since: 2.6 */ diff --git a/generated/gtkd/gdkpixbuf/PixbufLoader.d b/generated/gtkd/gdkpixbuf/PixbufLoader.d index ef01566be..e5fb73ccf 100644 --- a/generated/gtkd/gdkpixbuf/PixbufLoader.d +++ b/generated/gtkd/gdkpixbuf/PixbufLoader.d @@ -41,8 +41,51 @@ private import std.algorithm; /** - * The GdkPixbufLoader struct contains only private - * fields. + * Incremental image loader. + * + * `GdkPixbufLoader` provides a way for applications to drive the + * process of loading an image, by letting them send the image data + * directly to the loader instead of having the loader read the data + * from a file. Applications can use this functionality instead of + * `gdk_pixbuf_new_from_file()` or `gdk_pixbuf_animation_new_from_file()` + * when they need to parse image data in small chunks. For example, + * it should be used when reading an image from a (potentially) slow + * network connection, or when loading an extremely large file. + * + * To use `GdkPixbufLoader` to load an image, create a new instance, + * and call [method@GdkPixbuf.PixbufLoader.write] to send the data + * to it. When done, [method@GdkPixbuf.PixbufLoader.close] should be + * called to end the stream and finalize everything. + * + * The loader will emit three important signals throughout the process: + * + * - [signal@GdkPixbuf.PixbufLoader::size-prepared] will be emitted as + * soon as the image has enough information to determine the size of + * the image to be used. If you want to scale the image while loading + * it, you can call [method@GdkPixbuf.PixbufLoader.set_size] in + * response to this signal. + * - [signal@GdkPixbuf.PixbufLoader::area-prepared] will be emitted as + * soon as the pixbuf of the desired has been allocated. You can obtain + * the `GdkPixbuf` instance by calling [method@GdkPixbuf.PixbufLoader.get_pixbuf]. + * If you want to use it, simply acquire a reference to it. You can + * also call `gdk_pixbuf_loader_get_pixbuf()` later to get the same + * pixbuf. + * - [signal@GdkPixbuf.PixbufLoader::area-updated] will be emitted every + * time a region is updated. This way you can update a partially + * completed image. Note that you do not know anything about the + * completeness of an image from the updated area. For example, in an + * interlaced image you will need to make several passes before the + * image is done loading. + * + * ## Loading an animation + * + * Loading an animation is almost as easy as loading an image. Once the + * first [signal@GdkPixbuf.PixbufLoader::area-prepared] signal has been + * emitted, you can call [method@GdkPixbuf.PixbufLoader.get_animation] to + * get the [class@GdkPixbuf.PixbufAnimation] instance, and then call + * and [method@GdkPixbuf.PixbufAnimation.get_iter] to get a + * [class@GdkPixbuf.PixbufAnimationIter] to retrieve the pixbuf for the + * desired time stamp. */ public class PixbufLoader : ObjectG { @@ -134,31 +177,34 @@ public class PixbufLoader : ObjectG */ public this() { - auto p = gdk_pixbuf_loader_new(); + auto __p = gdk_pixbuf_loader_new(); - if(p is null) + if(__p is null) { throw new ConstructionException("null returned by new"); } - this(cast(GdkPixbufLoader*) p, true); + this(cast(GdkPixbufLoader*) __p, true); } /** * Informs a pixbuf loader that no further writes with * gdk_pixbuf_loader_write() will occur, so that it can free its - * internal loading structures. Also, tries to parse any data that - * hasn't yet been parsed; if the remaining data is partial or - * corrupt, an error will be returned. If %FALSE is returned, @error - * will be set to an error from the #GDK_PIXBUF_ERROR or #G_FILE_ERROR - * domains. If you're just cancelling a load rather than expecting it - * to be finished, passing %NULL for @error to ignore it is - * reasonable. - * - * Remember that this does not unref the loader, so if you plan not to - * use it anymore, please g_object_unref() it. - * - * Returns: %TRUE if all image data written so far was successfully + * internal loading structures. + * + * This function also tries to parse any data that hasn't yet been parsed; + * if the remaining data is partial or corrupt, an error will be returned. + * + * If `FALSE` is returned, `error` will be set to an error from the + * `GDK_PIXBUF_ERROR` or `G_FILE_ERROR` domains. + * + * If you're just cancelling a load rather than expecting it to be finished, + * passing `NULL` for `error` to ignore it is reasonable. + * + * Remember that this function does not release a reference on the loader, so + * you will need to explicitly release any reference you hold. + * + * Returns: `TRUE` if all image data written so far was successfully * passed out via the update_area signal * * Throws: GException on failure. @@ -167,92 +213,98 @@ public class PixbufLoader : ObjectG { GError* err = null; - auto p = gdk_pixbuf_loader_close(gdkPixbufLoader, &err) != 0; + auto __p = gdk_pixbuf_loader_close(gdkPixbufLoader, &err) != 0; if (err !is null) { throw new GException( new ErrorG(err) ); } - return p; + return __p; } /** * Queries the #GdkPixbufAnimation that a pixbuf loader is currently creating. - * In general it only makes sense to call this function after the "area-prepared" - * signal has been emitted by the loader. If the loader doesn't have enough - * bytes yet (hasn't emitted the "area-prepared" signal) this function will - * return %NULL. * - * Returns: The #GdkPixbufAnimation that the loader is loading, or %NULL if - * not enough data has been read to determine the information. + * In general it only makes sense to call this function after the + * [signal@GdkPixbuf.PixbufLoader::area-prepared] signal has been emitted by + * the loader. + * + * If the loader doesn't have enough bytes yet, and hasn't emitted the `area-prepared` + * signal, this function will return `NULL`. + * + * Returns: The animation that the loader is + * currently loading */ public PixbufAnimation getAnimation() { - auto p = gdk_pixbuf_loader_get_animation(gdkPixbufLoader); + auto __p = gdk_pixbuf_loader_get_animation(gdkPixbufLoader); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(PixbufAnimation)(cast(GdkPixbufAnimation*) p); + return ObjectG.getDObject!(PixbufAnimation)(cast(GdkPixbufAnimation*) __p); } /** * Obtains the available information about the format of the * currently loading image file. * - * Returns: A #GdkPixbufFormat or - * %NULL. The return value is owned by GdkPixbuf and should not be - * freed. + * Returns: A #GdkPixbufFormat * * Since: 2.2 */ public PixbufFormat getFormat() { - auto p = gdk_pixbuf_loader_get_format(gdkPixbufLoader); + auto __p = gdk_pixbuf_loader_get_format(gdkPixbufLoader); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(PixbufFormat)(cast(GdkPixbufFormat*) p); + return ObjectG.getDObject!(PixbufFormat)(cast(GdkPixbufFormat*) __p); } /** * Queries the #GdkPixbuf that a pixbuf loader is currently creating. + * * In general it only makes sense to call this function after the - * "area-prepared" signal has been emitted by the loader; this means - * that enough data has been read to know the size of the image that - * will be allocated. If the loader has not received enough data via - * gdk_pixbuf_loader_write(), then this function returns %NULL. The - * returned pixbuf will be the same in all future calls to the loader, - * so simply calling g_object_ref() should be sufficient to continue - * using it. Additionally, if the loader is an animation, it will - * return the "static image" of the animation - * (see gdk_pixbuf_animation_get_static_image()). - * - * Returns: The #GdkPixbuf that the loader is creating, or %NULL if not - * enough data has been read to determine how to create the image buffer. + * [signal@GdkPixbuf.PixbufLoader::area-prepared] signal has been + * emitted by the loader; this means that enough data has been read + * to know the size of the image that will be allocated. + * + * If the loader has not received enough data via gdk_pixbuf_loader_write(), + * then this function returns `NULL`. + * + * The returned pixbuf will be the same in all future calls to the loader, + * so if you want to keep using it, you should acquire a reference to it. + * + * Additionally, if the loader is an animation, it will return the "static + * image" of the animation (see gdk_pixbuf_animation_get_static_image()). + * + * Returns: The pixbuf that the loader is + * creating */ public Pixbuf getPixbuf() { - auto p = gdk_pixbuf_loader_get_pixbuf(gdkPixbufLoader); + auto __p = gdk_pixbuf_loader_get_pixbuf(gdkPixbufLoader); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Pixbuf)(cast(GdkPixbuf*) p); + return ObjectG.getDObject!(Pixbuf)(cast(GdkPixbuf*) __p); } /** - * Causes the image to be scaled while it is loaded. The desired - * image size can be determined relative to the original size of - * the image by calling gdk_pixbuf_loader_set_size() from a + * Causes the image to be scaled while it is loaded. + * + * The desired image size can be determined relative to the original + * size of the image by calling gdk_pixbuf_loader_set_size() from a * signal handler for the ::size-prepared signal. * * Attempts to set the desired image size are ignored after the @@ -270,18 +322,13 @@ public class PixbufLoader : ObjectG } /** - * This will cause a pixbuf loader to parse the next @count bytes of - * an image. It will return %TRUE if the data was loaded successfully, - * and %FALSE if an error occurred. In the latter case, the loader - * will be closed, and will not accept further writes. If %FALSE is - * returned, @error will be set to an error from the #GDK_PIXBUF_ERROR - * or #G_FILE_ERROR domains. + * Parses the next `count` bytes in the given image buffer. * * Params: * buf = Pointer to image data. * - * Returns: %TRUE if the write was successful, or %FALSE if the loader - * cannot parse the buffer. + * Returns: `TRUE` if the write was successful, or + * `FALSE` if the loader cannot parse the buffer * * Throws: GException on failure. */ @@ -289,31 +336,24 @@ public class PixbufLoader : ObjectG { GError* err = null; - auto p = gdk_pixbuf_loader_write(gdkPixbufLoader, buf.ptr, cast(size_t)buf.length, &err) != 0; + auto __p = gdk_pixbuf_loader_write(gdkPixbufLoader, buf.ptr, cast(size_t)buf.length, &err) != 0; if (err !is null) { throw new GException( new ErrorG(err) ); } - return p; + return __p; } /** - * This will cause a pixbuf loader to parse a buffer inside a #GBytes - * for an image. It will return %TRUE if the data was loaded successfully, - * and %FALSE if an error occurred. In the latter case, the loader - * will be closed, and will not accept further writes. If %FALSE is - * returned, @error will be set to an error from the #GDK_PIXBUF_ERROR - * or #G_FILE_ERROR domains. - * - * See also: gdk_pixbuf_loader_write() + * Parses the next contents of the given image buffer. * * Params: - * buffer = The image data as a #GBytes + * buffer = The image data as a `GBytes` buffer. * - * Returns: %TRUE if the write was successful, or %FALSE if the loader - * cannot parse the buffer. + * Returns: `TRUE` if the write was successful, or `FALSE` if + * the loader cannot parse the buffer * * Since: 2.30 * @@ -323,21 +363,23 @@ public class PixbufLoader : ObjectG { GError* err = null; - auto p = gdk_pixbuf_loader_write_bytes(gdkPixbufLoader, (buffer is null) ? null : buffer.getBytesStruct(), &err) != 0; + auto __p = gdk_pixbuf_loader_write_bytes(gdkPixbufLoader, (buffer is null) ? null : buffer.getBytesStruct(), &err) != 0; if (err !is null) { throw new GException( new ErrorG(err) ); } - return p; + return __p; } /** * This signal is emitted when the pixbuf loader has allocated the - * pixbuf in the desired size. After this signal is emitted, - * applications can call gdk_pixbuf_loader_get_pixbuf() to fetch - * the partially-loaded pixbuf. + * pixbuf in the desired size. + * + * After this signal is emitted, applications can call + * gdk_pixbuf_loader_get_pixbuf() to fetch the partially-loaded + * pixbuf. */ gulong addOnAreaPrepared(void delegate(PixbufLoader) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) { @@ -346,9 +388,12 @@ public class PixbufLoader : ObjectG /** * This signal is emitted when a significant area of the image being - * loaded has been updated. Normally it means that a complete - * scanline has been read in, but it could be a different area as - * well. Applications can use this signal to know when to repaint + * loaded has been updated. + * + * Normally it means that a complete scanline has been read in, but + * it could be a different area as well. + * + * Applications can use this signal to know when to repaint * areas of an image that is being loaded. * * Params: @@ -364,6 +409,7 @@ public class PixbufLoader : ObjectG /** * This signal is emitted when gdk_pixbuf_loader_close() is called. + * * It can be used by different parts of an application to receive * notification when an image loader is closed by the code that * drives it. @@ -376,9 +422,11 @@ public class PixbufLoader : ObjectG /** * This signal is emitted when the pixbuf loader has been fed the * initial amount of data that is required to figure out the size - * of the image that it will create. Applications can call - * gdk_pixbuf_loader_set_size() in response to this signal to set - * the desired size to which the image should be scaled. + * of the image that it will create. + * + * Applications can call gdk_pixbuf_loader_set_size() in response + * to this signal to set the desired size to which the image + * should be scaled. * * Params: * width = the original width of the image diff --git a/generated/gtkd/pango/PgEngineShape.d b/generated/gtkd/gdkpixbuf/PixbufNonAnim.d similarity index 56% rename from generated/gtkd/pango/PgEngineShape.d rename to generated/gtkd/gdkpixbuf/PixbufNonAnim.d index 513bbc724..5379b4876 100644 --- a/generated/gtkd/pango/PgEngineShape.d +++ b/generated/gtkd/gdkpixbuf/PixbufNonAnim.d @@ -22,56 +22,63 @@ // implement new conversion functionalities on the wrap.utils pakage -module pango.PgEngineShape; +module gdkpixbuf.PixbufNonAnim; -public import gtkc.pangotypes; -private import pango.PgEngine; -private import pango.c.functions; -public import pango.c.types; +private import gdkpixbuf.Pixbuf; +private import gdkpixbuf.PixbufAnimation; +private import gdkpixbuf.c.functions; +public import gdkpixbuf.c.types; +private import glib.ConstructionException; +private import gobject.ObjectG; +public import gtkc.gdkpixbuftypes; -/** - * The #PangoEngineShape class is implemented by engines that - * customize the rendering-system dependent part of the - * Pango pipeline for a particular script or language. - * A #PangoEngineShape implementation is then specific to both - * a particular rendering system or group of rendering systems - * and to a particular script. For instance, there is one - * #PangoEngineShape implementation to handle shaping Arabic - * for Fontconfig-based backends. - */ -public class PgEngineShape : PgEngine +/** */ +public class PixbufNonAnim : PixbufAnimation { /** the main Gtk struct */ - protected PangoEngineShape* pangoEngineShape; + protected GdkPixbufNonAnim* gdkPixbufNonAnim; /** Get the main Gtk struct */ - public PangoEngineShape* getPgEngineShapeStruct(bool transferOwnership = false) + public GdkPixbufNonAnim* getPixbufNonAnimStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; - return pangoEngineShape; + return gdkPixbufNonAnim; } /** the main Gtk struct as a void* */ protected override void* getStruct() { - return cast(void*)pangoEngineShape; + return cast(void*)gdkPixbufNonAnim; } /** * Sets our main struct and passes it to the parent class. */ - public this (PangoEngineShape* pangoEngineShape, bool ownedRef = false) + public this (GdkPixbufNonAnim* gdkPixbufNonAnim, bool ownedRef = false) { - this.pangoEngineShape = pangoEngineShape; - super(cast(PangoEngine*)pangoEngineShape, ownedRef); + this.gdkPixbufNonAnim = gdkPixbufNonAnim; + super(cast(GdkPixbufAnimation*)gdkPixbufNonAnim, ownedRef); } /** */ public static GType getType() { - return pango_engine_shape_get_type(); + return gdk_pixbuf_non_anim_get_type(); + } + + /** */ + public this(Pixbuf pixbuf) + { + auto __p = gdk_pixbuf_non_anim_new((pixbuf is null) ? null : pixbuf.getPixbufStruct()); + + if(__p is null) + { + throw new ConstructionException("null returned by new"); + } + + this(cast(GdkPixbufNonAnim*) __p, true); } } diff --git a/generated/gtkd/gdkpixbuf/PixbufSimpleAnimation.d b/generated/gtkd/gdkpixbuf/PixbufSimpleAnimation.d index 36464d1bf..d28d2d8a1 100644 --- a/generated/gtkd/gdkpixbuf/PixbufSimpleAnimation.d +++ b/generated/gtkd/gdkpixbuf/PixbufSimpleAnimation.d @@ -87,14 +87,14 @@ public class PixbufSimpleAnimation : PixbufAnimation */ public this(int width, int height, float rate) { - auto p = gdk_pixbuf_simple_anim_new(width, height, rate); + auto __p = gdk_pixbuf_simple_anim_new(width, height, rate); - if(p is null) + if(__p is null) { throw new ConstructionException("null returned by new"); } - this(cast(GdkPixbufSimpleAnim*) p, true); + this(cast(GdkPixbufSimpleAnim*) __p, true); } /** diff --git a/generated/gtkd/gdkpixbuf/Pixdata.d b/generated/gtkd/gdkpixbuf/Pixdata.d index d4eb080b6..1a0eb1ff3 100644 --- a/generated/gtkd/gdkpixbuf/Pixdata.d +++ b/generated/gtkd/gdkpixbuf/Pixdata.d @@ -37,8 +37,19 @@ private import gtkd.Loader; /** - * A #GdkPixdata contains pixbuf information in a form suitable for - * serialization and streaming. + * A pixel buffer suitable for serialization and streaming. + * + * Using `GdkPixdata`, images can be compiled into an application, + * making it unnecessary to refer to external image files at runtime. + * + * `GdkPixbuf` includes a utility named `gdk-pixbuf-csource`, which + * can be used to convert image files into `GdkPixdata` structures suitable + * for inclusion in C sources. To convert the `GdkPixdata` structures back + * into a `GdkPixbuf`, use `gdk_pixbuf_from_pixdata()`. + * + * Deprecated: `GdkPixdata` should not be used any more. `GResource` + * should be used to save the original compressed images inside the + * program's binary */ public final class Pixdata { @@ -75,10 +86,35 @@ public final class Pixdata sliceFree(gdkPixdata); } + /** + * Converts a `GdkPixbuf` to a `GdkPixdata`. + * + * If `use_rle` is `TRUE`, the pixel data is run-length encoded into + * newly-allocated memory and a pointer to that memory is returned. + * + * Deprecated: Use #GResource instead. + * + * Params: + * pixbuf = the data to fill `pixdata` with. + * useRle = whether to use run-length encoding for the pixel data. + * + * Returns: If `use_rle` is + * `TRUE`, a pointer to the newly-allocated memory for the run-length + * encoded pixel data, otherwise `NULL`. + */ + public ubyte[] fromPixbuf(Pixbuf pixbuf, bool useRle) + { + auto __p = gdk_pixdata_from_pixbuf(gdkPixdata, (pixbuf is null) ? null : pixbuf.getPixbufStruct(), useRle); + + return cast(ubyte[])__p[0 .. getArrayLength(cast(ubyte*)__p)]; + } /** - * magic number. A valid #GdkPixdata structure must have - * #GDK_PIXBUF_MAGIC_NUMBER here. + */ + + /** + * magic number. A valid `GdkPixdata` structure must have + * `GDK_PIXBUF_MAGIC_NUMBER` here */ public @property uint magic() { @@ -93,7 +129,7 @@ public final class Pixdata /** * less than 1 to disable length checks, otherwise - * #GDK_PIXDATA_HEADER_LENGTH + length of @pixel_data. + * `GDK_PIXDATA_HEADER_LENGTH` plus the length of `pixel_data` */ public @property int length() { @@ -108,7 +144,7 @@ public final class Pixdata /** * information about colorspace, sample width and - * encoding, in a #GdkPixdataType. + * encoding, in a `GdkPixdataType` */ public @property uint pixdataType() { @@ -122,7 +158,7 @@ public final class Pixdata } /** - * Distance in bytes between rows. + * Distance in bytes between rows */ public @property uint rowstride() { @@ -136,7 +172,7 @@ public final class Pixdata } /** - * Width of the image in pixels. + * Width of the image in pixels */ public @property uint width() { @@ -150,7 +186,7 @@ public final class Pixdata } /** - * Height of the image in pixels. + * Height of the image in pixels */ public @property uint height() { @@ -166,21 +202,25 @@ public final class Pixdata /** * Deserializes (reconstruct) a #GdkPixdata structure from a byte stream. + * * The byte stream consists of a straightforward writeout of the - * #GdkPixdata fields in network byte order, plus the @pixel_data + * `GdkPixdata` fields in network byte order, plus the `pixel_data` * bytes the structure points to. - * The @pixdata contents are reconstructed byte by byte and are checked - * for validity. This function may fail with %GDK_PIXBUF_ERROR_CORRUPT_IMAGE - * or %GDK_PIXBUF_ERROR_UNKNOWN_TYPE. * - * Deprecated: Use #GResource instead. + * The `pixdata` contents are reconstructed byte by byte and are checked + * for validity. + * + * This function may fail with `GDK_PIXBUF_ERROR_CORRUPT_IMAGE` + * or `GDK_PIXBUF_ERROR_UNKNOWN_TYPE`. + * + * Deprecated: Use `GResource` instead. * * Params: * stream = stream of bytes containing a * serialized #GdkPixdata structure. * - * Returns: Upon successful deserialization %TRUE is returned, - * %FALSE otherwise. + * Returns: Upon successful deserialization `TRUE` is returned, + * `FALSE` otherwise. * * Throws: GException on failure. */ @@ -188,34 +228,14 @@ public final class Pixdata { GError* err = null; - auto p = gdk_pixdata_deserialize(gdkPixdata, cast(uint)stream.length, stream.ptr, &err) != 0; + auto __p = gdk_pixdata_deserialize(gdkPixdata, cast(uint)stream.length, stream.ptr, &err) != 0; if (err !is null) { throw new GException( new ErrorG(err) ); } - return p; - } - - /** - * Converts a #GdkPixbuf to a #GdkPixdata. If @use_rle is %TRUE, the - * pixel data is run-length encoded into newly-allocated memory and a - * pointer to that memory is returned. - * - * Deprecated: Use #GResource instead. - * - * Params: - * pixbuf = the data to fill @pixdata with. - * useRle = whether to use run-length encoding for the pixel data. - * - * Returns: If @use_rle is %TRUE, a pointer to the - * newly-allocated memory for the run-length encoded pixel data, - * otherwise %NULL. - */ - public void* fromPixbuf(Pixbuf pixbuf, bool useRle) - { - return gdk_pixdata_from_pixbuf(gdkPixdata, (pixbuf is null) ? null : pixbuf.getPixbufStruct(), useRle); + return __p; } /** @@ -234,38 +254,36 @@ public final class Pixdata { uint streamLengthP; - auto p = gdk_pixdata_serialize(gdkPixdata, &streamLengthP); + auto __p = gdk_pixdata_serialize(gdkPixdata, &streamLengthP); - return p[0 .. streamLengthP]; + return __p[0 .. streamLengthP]; } /** * Generates C source code suitable for compiling images directly * into programs. * - * gdk-pixbuf ships with a program called - * [gdk-pixbuf-csource][gdk-pixbuf-csource], which offers a command - * line interface to this function. + * GdkPixbuf ships with a program called `gdk-pixbuf-csource`, which offers + * a command line interface to this function. * * Deprecated: Use #GResource instead. * * Params: - * name = used for naming generated data structures or macros. - * dumpType = a #GdkPixdataDumpType determining the kind of C - * source to be generated. + * name = used for naming generated data structures or macros + * dumpType = the kind of C source to be generated * - * Returns: a newly-allocated string containing the C source form - * of @pixdata. + * Returns: a newly-allocated string buffer containing + * the C source form of `pixdata`. */ public StringG toCsource(string name, GdkPixdataDumpType dumpType) { - auto p = gdk_pixdata_to_csource(gdkPixdata, Str.toStringz(name), dumpType); + auto __p = gdk_pixdata_to_csource(gdkPixdata, Str.toStringz(name), dumpType); - if(p is null) + if(__p is null) { return null; } - return new StringG(cast(GString*) p, true); + return new StringG(cast(GString*) __p, true); } } diff --git a/generated/gtkd/gdkpixbuf/c/functions.d b/generated/gtkd/gdkpixbuf/c/functions.d index 1875bf6ed..2a50db715 100644 --- a/generated/gtkd/gdkpixbuf/c/functions.d +++ b/generated/gtkd/gdkpixbuf/c/functions.d @@ -58,6 +58,7 @@ shared static this() Linker.link(gdk_pixbuf_get_file_info_async, "gdk_pixbuf_get_file_info_async", LIBRARY_GDKPIXBUF); Linker.link(gdk_pixbuf_get_file_info_finish, "gdk_pixbuf_get_file_info_finish", LIBRARY_GDKPIXBUF); Linker.link(gdk_pixbuf_get_formats, "gdk_pixbuf_get_formats", LIBRARY_GDKPIXBUF); + Linker.link(gdk_pixbuf_init_modules, "gdk_pixbuf_init_modules", LIBRARY_GDKPIXBUF); Linker.link(gdk_pixbuf_new_from_stream_async, "gdk_pixbuf_new_from_stream_async", LIBRARY_GDKPIXBUF); Linker.link(gdk_pixbuf_new_from_stream_at_scale_async, "gdk_pixbuf_new_from_stream_at_scale_async", LIBRARY_GDKPIXBUF); Linker.link(gdk_pixbuf_save_to_stream_finish, "gdk_pixbuf_save_to_stream_finish", LIBRARY_GDKPIXBUF); @@ -160,6 +161,11 @@ shared static this() Linker.link(gdk_pixbuf_loader_write, "gdk_pixbuf_loader_write", LIBRARY_GDKPIXBUF); Linker.link(gdk_pixbuf_loader_write_bytes, "gdk_pixbuf_loader_write_bytes", LIBRARY_GDKPIXBUF); + // gdkpixbuf.PixbufNonAnim + + Linker.link(gdk_pixbuf_non_anim_get_type, "gdk_pixbuf_non_anim_get_type", LIBRARY_GDKPIXBUF); + Linker.link(gdk_pixbuf_non_anim_new, "gdk_pixbuf_non_anim_new", LIBRARY_GDKPIXBUF); + // gdkpixbuf.PixbufSimpleAnimation Linker.link(gdk_pixbuf_simple_anim_get_type, "gdk_pixbuf_simple_anim_get_type", LIBRARY_GDKPIXBUF); @@ -204,6 +210,7 @@ __gshared extern(C) void function(char* filename, GCancellable* cancellable, GAsyncReadyCallback callback, void* userData) c_gdk_pixbuf_get_file_info_async; GdkPixbufFormat* function(GAsyncResult* asyncResult, int* width, int* height, GError** err) c_gdk_pixbuf_get_file_info_finish; GSList* function() c_gdk_pixbuf_get_formats; + int function(const(char)* path, GError** err) c_gdk_pixbuf_init_modules; void function(GInputStream* stream, GCancellable* cancellable, GAsyncReadyCallback callback, void* userData) c_gdk_pixbuf_new_from_stream_async; void function(GInputStream* stream, int width, int height, int preserveAspectRatio, GCancellable* cancellable, GAsyncReadyCallback callback, void* userData) c_gdk_pixbuf_new_from_stream_at_scale_async; int function(GAsyncResult* asyncResult, GError** err) c_gdk_pixbuf_save_to_stream_finish; @@ -306,6 +313,11 @@ __gshared extern(C) int function(GdkPixbufLoader* loader, char* buf, size_t count, GError** err) c_gdk_pixbuf_loader_write; int function(GdkPixbufLoader* loader, GBytes* buffer, GError** err) c_gdk_pixbuf_loader_write_bytes; + // gdkpixbuf.PixbufNonAnim + + GType function() c_gdk_pixbuf_non_anim_get_type; + GdkPixbufAnimation* function(GdkPixbuf* pixbuf) c_gdk_pixbuf_non_anim_new; + // gdkpixbuf.PixbufSimpleAnimation GType function() c_gdk_pixbuf_simple_anim_get_type; @@ -348,6 +360,7 @@ alias c_gdk_pixbuf_get_file_info gdk_pixbuf_get_file_info; alias c_gdk_pixbuf_get_file_info_async gdk_pixbuf_get_file_info_async; alias c_gdk_pixbuf_get_file_info_finish gdk_pixbuf_get_file_info_finish; alias c_gdk_pixbuf_get_formats gdk_pixbuf_get_formats; +alias c_gdk_pixbuf_init_modules gdk_pixbuf_init_modules; alias c_gdk_pixbuf_new_from_stream_async gdk_pixbuf_new_from_stream_async; alias c_gdk_pixbuf_new_from_stream_at_scale_async gdk_pixbuf_new_from_stream_at_scale_async; alias c_gdk_pixbuf_save_to_stream_finish gdk_pixbuf_save_to_stream_finish; @@ -450,6 +463,11 @@ alias c_gdk_pixbuf_loader_set_size gdk_pixbuf_loader_set_size; alias c_gdk_pixbuf_loader_write gdk_pixbuf_loader_write; alias c_gdk_pixbuf_loader_write_bytes gdk_pixbuf_loader_write_bytes; +// gdkpixbuf.PixbufNonAnim + +alias c_gdk_pixbuf_non_anim_get_type gdk_pixbuf_non_anim_get_type; +alias c_gdk_pixbuf_non_anim_new gdk_pixbuf_non_anim_new; + // gdkpixbuf.PixbufSimpleAnimation alias c_gdk_pixbuf_simple_anim_get_type gdk_pixbuf_simple_anim_get_type; diff --git a/generated/gtkd/gdkpixbuf/c/types.d b/generated/gtkd/gdkpixbuf/c/types.d index d2baed823..455e72cab 100644 --- a/generated/gtkd/gdkpixbuf/c/types.d +++ b/generated/gtkd/gdkpixbuf/c/types.d @@ -28,10 +28,13 @@ public import gio.c.types; public import glib.c.types; public import gobject.c.types; +import core.stdc.stdio : FILE; /** * This enumeration defines the color spaces that are supported by - * the gdk-pixbuf library. Currently only RGB is supported. + * the gdk-pixbuf library. + * + * Currently only RGB is supported. */ public enum GdkColorspace { @@ -43,11 +46,12 @@ public enum GdkColorspace alias GdkColorspace Colorspace; /** - * This enumeration describes the different interpolation modes that - * can be used with the scaling functions. @GDK_INTERP_NEAREST is - * the fastest scaling method, but has horrible quality when - * scaling down. @GDK_INTERP_BILINEAR is the best choice if you - * aren't sure what to choose, it has a good speed/quality balance. + * Interpolation modes for scaling functions. + * + * The `GDK_INTERP_NEAREST` mode is the fastest scaling method, but has + * horrible quality when scaling down; `GDK_INTERP_BILINEAR` is the best + * choice if you aren't sure what to choose, it has a good speed/quality + * balance. * * **Note**: Cubic filtering is missing from the list; hyperbolic * interpolation is just as fast and results in higher quality. @@ -91,14 +95,22 @@ public enum GdkInterpType alias GdkInterpType InterpType; /** - * These values can be passed to - * gdk_pixbuf_xlib_render_to_drawable_alpha() to control how the alpha - * channel of an image should be handled. This function can create a - * bilevel clipping mask (black and white) and use it while painting - * the image. In the future, when the X Window System gets an alpha - * channel extension, it will be possible to do full alpha - * compositing onto arbitrary drawables. For now both cases fall - * back to a bilevel clipping mask. + * Control the alpha channel for drawables. + * + * These values can be passed to gdk_pixbuf_xlib_render_to_drawable_alpha() + * in gdk-pixbuf-xlib to control how the alpha channel of an image should + * be handled. + * + * This function can create a bilevel clipping mask (black and white) and use + * it while painting the image. + * + * In the future, when the X Window System gets an alpha channel extension, + * it will be possible to do full alpha compositing onto arbitrary drawables. + * For now both cases fall back to a bilevel clipping mask. + * + * Deprecated: There is no user of GdkPixbufAlphaMode in GdkPixbuf, + * and the Xlib utility functions have been split out to their own + * library, gdk-pixbuf-xlib */ public enum GdkPixbufAlphaMode { @@ -118,9 +130,10 @@ public enum GdkPixbufAlphaMode alias GdkPixbufAlphaMode PixbufAlphaMode; /** - * An error code in the #GDK_PIXBUF_ERROR domain. Many gdk-pixbuf - * operations can cause errors in this domain, or in the #G_FILE_ERROR - * domain. + * An error code in the `GDK_PIXBUF_ERROR` domain. + * + * Many gdk-pixbuf operations can cause errors in this domain, or in + * the `G_FILE_ERROR` domain. */ public enum GdkPixbufError { @@ -156,8 +169,33 @@ public enum GdkPixbufError } alias GdkPixbufError PixbufError; +/** + * Flags which allow a module to specify further details about the supported + * operations. + * + * Since: 2.2 + */ +public enum GdkPixbufFormatFlags +{ + /** + * the module can write out images in the format. + */ + WRITABLE = 1, + /** + * the image format is scalable + */ + SCALABLE = 2, + /** + * the module is threadsafe. gdk-pixbuf + * ignores modules that are not marked as threadsafe. (Since 2.28). + */ + THREADSAFE = 4, +} +alias GdkPixbufFormatFlags PixbufFormatFlags; + /** * The possible rotations which can be passed to gdk_pixbuf_rotate_simple(). + * * To make them easier to use, their numerical values are the actual degrees. */ public enum GdkPixbufRotation @@ -285,11 +323,136 @@ alias GdkPixdataType PixdataType; struct GdkPixbuf; -struct GdkPixbufAnimation; +struct GdkPixbufAnimation +{ + GObject parentInstance; +} + +/** + * Modules supporting animations must derive a type from + * #GdkPixbufAnimation, providing suitable implementations of the + * virtual functions. + */ +struct GdkPixbufAnimationClass +{ + /** + * the parent class + */ + GObjectClass parentClass; + /** + * + * Params: + * animation = a #GdkPixbufAnimation + * Returns: `TRUE` if the "animation" was really just an image + */ + extern(C) int function(GdkPixbufAnimation* animation) isStaticImage; + /** + * + * Params: + * animation = a #GdkPixbufAnimation + * Returns: unanimated image representing the animation + */ + extern(C) GdkPixbuf* function(GdkPixbufAnimation* animation) getStaticImage; + /** */ + extern(C) void function(GdkPixbufAnimation* animation, int* width, int* height) getSize; + /** + * + * Params: + * animation = a #GdkPixbufAnimation + * startTime = time when the animation starts playing + * Returns: an iterator to move over the animation + */ + extern(C) GdkPixbufAnimationIter* function(GdkPixbufAnimation* animation, GTimeVal* startTime) getIter; +} + +struct GdkPixbufAnimationIter +{ + GObject parentInstance; +} -struct GdkPixbufAnimationIter; +/** + * Modules supporting animations must derive a type from + * #GdkPixbufAnimationIter, providing suitable implementations of the + * virtual functions. + */ +struct GdkPixbufAnimationIterClass +{ + /** + * the parent class + */ + GObjectClass parentClass; + /** + * + * Params: + * iter = an animation iterator + * Returns: delay time in milliseconds (thousandths of a second) + */ + extern(C) int function(GdkPixbufAnimationIter* iter) getDelayTime; + /** + * + * Params: + * iter = an animation iterator + * Returns: the pixbuf to be displayed + */ + extern(C) GdkPixbuf* function(GdkPixbufAnimationIter* iter) getPixbuf; + /** + * + * Params: + * iter = a #GdkPixbufAnimationIter + * Returns: `TRUE` if the frame we're on is partially loaded, or the last frame + */ + extern(C) int function(GdkPixbufAnimationIter* iter) onCurrentlyLoadingFrame; + /** + * + * Params: + * iter = a #GdkPixbufAnimationIter + * currentTime = current time + * Returns: `TRUE` if the image may need updating + */ + extern(C) int function(GdkPixbufAnimationIter* iter, GTimeVal* currentTime) advance; +} -struct GdkPixbufFormat; +struct GdkPixbufFormat +{ + /** + * the name of the image format + */ + char* name; + /** + * the signature of the module + */ + GdkPixbufModulePattern* signature; + /** + * the message domain for the `description` + */ + char* domain; + /** + * a description of the image format + */ + char* description; + /** + * the MIME types for the image format + */ + char** mimeTypes; + /** + * typical filename extensions for the + * image format + */ + char** extensions; + /** + * a combination of `GdkPixbufFormatFlags` + */ + uint flags; + /** + * a boolean determining whether the loader is disabled` + */ + bool disabled; + /** + * a string containing license information, typically set to + * shorthands like "GPL", "LGPL", etc. + */ + char* license; +} struct GdkPixbufLoader { @@ -310,6 +473,171 @@ struct GdkPixbufLoaderClass extern(C) void function(GdkPixbufLoader* loader) closed; } +/** + * A `GdkPixbufModule` contains the necessary functions to load and save + * images in a certain file format. + * + * If `GdkPixbuf` has been compiled with `GModule` support, it can be extended + * by modules which can load (and perhaps also save) new image and animation + * formats. + * + * ## Implementing modules + * + * The `GdkPixbuf` interfaces needed for implementing modules are contained in + * `gdk-pixbuf-io.h` (and `gdk-pixbuf-animation.h` if the module supports + * animations). They are not covered by the same stability guarantees as the + * regular GdkPixbuf API. To underline this fact, they are protected by the + * `GDK_PIXBUF_ENABLE_BACKEND` pre-processor symbol. + * + * Each loadable module must contain a `GdkPixbufModuleFillVtableFunc` function + * named `fill_vtable`, which will get called when the module + * is loaded and must set the function pointers of the `GdkPixbufModule`. + * + * In order to make format-checking work before actually loading the modules + * (which may require calling `dlopen` to load image libraries), modules export + * their signatures (and other information) via the `fill_info` function. An + * external utility, `gdk-pixbuf-query-loaders`, uses this to create a text + * file containing a list of all available loaders and their signatures. + * This file is then read at runtime by `GdkPixbuf` to obtain the list of + * available loaders and their signatures. + * + * Modules may only implement a subset of the functionality available via + * `GdkPixbufModule`. If a particular functionality is not implemented, the + * `fill_vtable` function will simply not set the corresponding + * function pointers of the `GdkPixbufModule` structure. If a module supports + * incremental loading (i.e. provides `begin_load`, `stop_load` and + * `load_increment`), it doesn't have to implement `load`, since `GdkPixbuf` + * can supply a generic `load` implementation wrapping the incremental loading. + * + * ## Installing modules + * + * Installing a module is a two-step process: + * + * - copy the module file(s) to the loader directory (normally + * `$libdir/gdk-pixbuf-2.0/$version/loaders`, unless overridden by the + * environment variable `GDK_PIXBUF_MODULEDIR`) + * - call `gdk-pixbuf-query-loaders` to update the module file (normally + * `$libdir/gdk-pixbuf-2.0/$version/loaders.cache`, unless overridden + * by the environment variable `GDK_PIXBUF_MODULE_FILE`) + */ +struct GdkPixbufModule +{ + /** + * the name of the module, usually the same as the + * usual file extension for images of this type, eg. "xpm", "jpeg" or "png". + */ + char* moduleName; + /** + * the path from which the module is loaded. + */ + char* modulePath; + /** + * the loaded `GModule`. + */ + GModule* module_; + /** + * a `GdkPixbufFormat` holding information about the module. + */ + GdkPixbufFormat* info; + /** + * loads an image from a file. + */ + GdkPixbufModuleLoadFunc load; + /** + * loads an image from data in memory. + */ + GdkPixbufModuleLoadXpmDataFunc loadXpmData; + /** + * begins an incremental load. + */ + GdkPixbufModuleBeginLoadFunc beginLoad; + /** + * stops an incremental load. + */ + GdkPixbufModuleStopLoadFunc stopLoad; + /** + * continues an incremental load. + */ + GdkPixbufModuleIncrementLoadFunc loadIncrement; + /** + * loads an animation from a file. + */ + GdkPixbufModuleLoadAnimationFunc loadAnimation; + /** + * saves a `GdkPixbuf` to a file. + */ + GdkPixbufModuleSaveFunc save; + /** + * saves a `GdkPixbuf` by calling the given `GdkPixbufSaveFunc`. + */ + GdkPixbufModuleSaveCallbackFunc saveToCallback; + /** + * returns whether a save option key is supported by the module + */ + GdkPixbufModuleSaveOptionSupportedFunc isSaveOptionSupported; + /** */ + extern(C) void function() Reserved1; + /** */ + extern(C) void function() Reserved2; + /** */ + extern(C) void function() Reserved3; + /** */ + extern(C) void function() Reserved4; +} + +/** + * The signature prefix for a module. + * + * The signature of a module is a set of prefixes. Prefixes are encoded as + * pairs of ordinary strings, where the second string, called the mask, if + * not `NULL`, must be of the same length as the first one and may contain + * ' ', '!', 'x', 'z', and 'n' to indicate bytes that must be matched, + * not matched, "don't-care"-bytes, zeros and non-zeros, respectively. + * + * Each prefix has an associated integer that describes the relevance of + * the prefix, with 0 meaning a mismatch and 100 a "perfect match". + * + * Starting with gdk-pixbuf 2.8, the first byte of the mask may be '*', + * indicating an unanchored pattern that matches not only at the beginning, + * but also in the middle. Versions prior to 2.8 will interpret the '*' + * like an 'x'. + * + * The signature of a module is stored as an array of + * `GdkPixbufModulePatterns`. The array is terminated by a pattern + * where the `prefix` is `NULL`. + * + * ```c + * GdkPixbufModulePattern *signature[] = { + * { "abcdx", " !x z", 100 }, + * { "bla", NULL, 90 }, + * { NULL, NULL, 0 } + * }; + * ``` + * + * In the example above, the signature matches e.g. "auud\0" with + * relevance 100, and "blau" with relevance 90. + * + * Since: 2.2 + */ +struct GdkPixbufModulePattern +{ + /** + * the prefix for this pattern + */ + char* prefix; + /** + * mask containing bytes which modify how the prefix is matched against + * test data + */ + char* mask; + /** + * relevance of this pattern + */ + int relevance; +} + +struct GdkPixbufNonAnim; + struct GdkPixbufSimpleAnim; struct GdkPixbufSimpleAnimClass; @@ -319,46 +647,47 @@ struct GdkPixbufSimpleAnimIter; struct GdkPixdata { /** - * magic number. A valid #GdkPixdata structure must have - * #GDK_PIXBUF_MAGIC_NUMBER here. + * magic number. A valid `GdkPixdata` structure must have + * `GDK_PIXBUF_MAGIC_NUMBER` here */ uint magic; /** * less than 1 to disable length checks, otherwise - * #GDK_PIXDATA_HEADER_LENGTH + length of @pixel_data. + * `GDK_PIXDATA_HEADER_LENGTH` plus the length of `pixel_data` */ int length; /** * information about colorspace, sample width and - * encoding, in a #GdkPixdataType. + * encoding, in a `GdkPixdataType` */ uint pixdataType; /** - * Distance in bytes between rows. + * Distance in bytes between rows */ uint rowstride; /** - * Width of the image in pixels. + * Width of the image in pixels */ uint width; /** - * Height of the image in pixels. + * Height of the image in pixels */ uint height; /** - * @width x @height pixels, encoded according to @pixdata_type - * and @rowstride. + * `width` x `height` + * pixels, encoded according to `pixdata_type` and `rowstride` */ ubyte* pixelData; } /** * A function of this type is responsible for freeing the pixel array - * of a pixbuf. The gdk_pixbuf_new_from_data() function lets you - * pass in a pre-allocated pixel array so that a pixbuf can be - * created from it; in this case you will need to pass in a function - * of #GdkPixbufDestroyNotify so that the pixel data can be freed - * when the pixbuf is finalized. + * of a pixbuf. + * + * The gdk_pixbuf_new_from_data() function lets you pass in a pre-allocated + * pixel array so that a pixbuf can be created from it; in this case you + * will need to pass in a function of type `GdkPixbufDestroyNotify` so that + * the pixel data can be freed when the pixbuf is finalized. * * Params: * pixels = The pixel array of the pixbuf @@ -368,11 +697,238 @@ struct GdkPixdata public alias extern(C) void function(char* pixels, void* data) GdkPixbufDestroyNotify; /** - * Specifies the type of the function passed to - * gdk_pixbuf_save_to_callback(). It is called once for each block of - * bytes that is "written" by gdk_pixbuf_save_to_callback(). If - * successful it should return %TRUE. If an error occurs it should set - * @error and return %FALSE, in which case gdk_pixbuf_save_to_callback() + * Sets up the image loading state. + * + * The image loader is responsible for storing the given function pointers + * and user data, and call them when needed. + * + * The image loader should set up an internal state object, and return it + * from this function; the state object will then be updated from the + * [callback@GdkPixbuf.PixbufModuleIncrementLoadFunc] callback, and will be freed + * by [callback@GdkPixbuf.PixbufModuleStopLoadFunc] callback. + * + * Params: + * sizeFunc = the function to be called when the size is known + * preparedFunc = the function to be called when the data has been prepared + * updatedFunc = the function to be called when the data has been updated + * userData = the data to be passed to the functions + * + * Returns: the data to be passed to + * [callback@GdkPixbuf.PixbufModuleIncrementLoadFunc] + * and [callback@GdkPixbuf.PixbufModuleStopLoadFunc], or `NULL` in case of error + * + * Throws: GException on failure. + */ +public alias extern(C) void* function(GdkPixbufModuleSizeFunc sizeFunc, GdkPixbufModulePreparedFunc preparedFunc, GdkPixbufModuleUpdatedFunc updatedFunc, void* userData, GError** err) GdkPixbufModuleBeginLoadFunc; + +/** + * Defines the type of the function used to fill a + * #GdkPixbufFormat structure with information about a module. + * + * Params: + * info = a #GdkPixbufFormat. + * + * Since: 2.2 + */ +public alias extern(C) void function(GdkPixbufFormat* info) GdkPixbufModuleFillInfoFunc; + +/** + * Defines the type of the function used to set the vtable of a + * #GdkPixbufModule when it is loaded. + * + * Params: + * module_ = a #GdkPixbufModule. + * + * Since: 2.2 + */ +public alias extern(C) void function(GdkPixbufModule* module_) GdkPixbufModuleFillVtableFunc; + +/** + * Incrementally loads a buffer into the image data. + * + * Params: + * context = the state object created by [callback@GdkPixbuf.PixbufModuleBeginLoadFunc] + * buf = the data to load + * size = the length of the data to load + * + * Returns: `TRUE` if the incremental load was successful + * + * Throws: GException on failure. + */ +public alias extern(C) int function(void* context, char* buf, uint size, GError** err) GdkPixbufModuleIncrementLoadFunc; + +/** + * Loads a file from a standard C file stream into a new `GdkPixbufAnimation`. + * + * In case of error, this function should return `NULL` and set the `error` argument. + * + * Params: + * f = the file stream from which the image should be loaded + * + * Returns: a newly created `GdkPixbufAnimation` for the contents of the file + * + * Throws: GException on failure. + */ +public alias extern(C) GdkPixbufAnimation* function(FILE* f, GError** err) GdkPixbufModuleLoadAnimationFunc; + +/** + * Loads a file from a standard C file stream into a new `GdkPixbuf`. + * + * In case of error, this function should return `NULL` and set the `error` argument. + * + * Params: + * f = the file stream from which the image should be loaded + * + * Returns: a newly created `GdkPixbuf` for the contents of the file + * + * Throws: GException on failure. + */ +public alias extern(C) GdkPixbuf* function(FILE* f, GError** err) GdkPixbufModuleLoadFunc; + +/** + * Loads XPM data into a new `GdkPixbuf`. + * + * Params: + * data = the XPM data + * + * Returns: a newly created `GdkPixbuf` for the XPM data + */ +public alias extern(C) GdkPixbuf* function(char** data) GdkPixbufModuleLoadXpmDataFunc; + +/** + * Defines the type of the function that gets called once the initial + * setup of @pixbuf is done. + * + * #GdkPixbufLoader uses a function of this type to emit the + * "area_prepared" + * signal. + * + * Params: + * pixbuf = the #GdkPixbuf that is currently being loaded. + * anim = if an animation is being loaded, the #GdkPixbufAnimation, else %NULL. + * userData = the loader. + * + * Since: 2.2 + */ +public alias extern(C) void function(GdkPixbuf* pixbuf, GdkPixbufAnimation* anim, void* userData) GdkPixbufModulePreparedFunc; + +/** + * Saves a `GdkPixbuf` by calling the provided function. + * + * The optional `option_keys` and `option_values` arrays contain the keys and + * values (in the same order) for attributes to be saved alongside the image + * data. + * + * Params: + * saveFunc = the function to call when saving + * userData = the data to pass to @save_func + * pixbuf = the `GdkPixbuf` to save + * optionKeys = an array of option names + * optionValues = an array of option values + * + * Returns: `TRUE` on success; in case of failure, `FALSE` is returned and + * the `error` is set + * + * Throws: GException on failure. + */ +public alias extern(C) int function(GdkPixbufSaveFunc saveFunc, void* userData, GdkPixbuf* pixbuf, char** optionKeys, char** optionValues, GError** err) GdkPixbufModuleSaveCallbackFunc; + +/** + * Saves a `GdkPixbuf` into a standard C file stream. + * + * The optional `param_keys` and `param_values` arrays contain the keys and + * values (in the same order) for attributes to be saved alongside the image + * data. + * + * Params: + * f = the file stream into which the image should be saved + * pixbuf = the image to save + * paramKeys = parameter keys to save + * paramValues = parameter values to save + * + * Returns: `TRUE` on success; in case of failure, `FALSE` is returned and + * the `error` is set + * + * Throws: GException on failure. + */ +public alias extern(C) int function(FILE* f, GdkPixbuf* pixbuf, char** paramKeys, char** paramValues, GError** err) GdkPixbufModuleSaveFunc; + +/** + * Checks whether the given `option_key` is supported when saving. + * + * Params: + * optionKey = the option key to check + * + * Returns: `TRUE` if the option is supported + */ +public alias extern(C) int function(const(char)* optionKey) GdkPixbufModuleSaveOptionSupportedFunc; + +/** + * Defines the type of the function that gets called once the size + * of the loaded image is known. + * + * The function is expected to set @width and @height to the desired + * size to which the image should be scaled. If a module has no efficient + * way to achieve the desired scaling during the loading of the image, it may + * either ignore the size request, or only approximate it - gdk-pixbuf will + * then perform the required scaling on the completely loaded image. + * + * If the function sets @width or @height to zero, the module should interpret + * this as a hint that it will be closed soon and shouldn't allocate further + * resources. This convention is used to implement gdk_pixbuf_get_file_info() + * efficiently. + * + * Params: + * width = pointer to a location containing the current image width + * height = pointer to a location containing the current image height + * userData = the loader. + * + * Since: 2.2 + */ +public alias extern(C) void function(int* width, int* height, void* userData) GdkPixbufModuleSizeFunc; + +/** + * Finalizes the image loading state. + * + * This function is called on success and error states. + * + * Params: + * context = the state object created by [callback@GdkPixbuf.PixbufModuleBeginLoadFunc] + * + * Returns: `TRUE` if the loading operation was successful + * + * Throws: GException on failure. + */ +public alias extern(C) int function(void* context, GError** err) GdkPixbufModuleStopLoadFunc; + +/** + * Defines the type of the function that gets called every time a region + * of @pixbuf is updated. + * + * #GdkPixbufLoader uses a function of this type to emit the + * "area_updated" + * signal. + * + * Params: + * pixbuf = the #GdkPixbuf that is currently being loaded. + * x = the X origin of the updated area. + * y = the Y origin of the updated area. + * width = the width of the updated area. + * height = the height of the updated area. + * userData = the loader. + * + * Since: 2.2 + */ +public alias extern(C) void function(GdkPixbuf* pixbuf, int x, int y, int width, int height, void* userData) GdkPixbufModuleUpdatedFunc; + +/** + * Save functions used by [method@GdkPixbuf.Pixbuf.save_to_callback]. + * + * This function is called once for each block of bytes that is "written" + * by `gdk_pixbuf_save_to_callback()`. + * + * If successful it should return `TRUE`; if an error occurs it should set + * `error` and return `FALSE`, in which case `gdk_pixbuf_save_to_callback()` * will fail with the same error. * * Params: @@ -381,15 +937,12 @@ public alias extern(C) void function(char* pixels, void* data) GdkPixbufDestroyN * error = A location to return an error. * data = user data passed to gdk_pixbuf_save_to_callback(). * - * Returns: %TRUE if successful, %FALSE (with @error set) if failed. + * Returns: `TRUE` if successful, `FALSE` otherwise * * Since: 2.4 */ public alias extern(C) int function(char* buf, size_t count, GError** error, void* data) GdkPixbufSaveFunc; -enum PIXBUF_FEATURES_H = 1; -alias GDK_PIXBUF_FEATURES_H = PIXBUF_FEATURES_H; - /** * Major version of gdk-pixbuf library, that is the "0" in * "0.8.2" for example. @@ -401,22 +954,23 @@ alias GDK_PIXBUF_MAJOR = PIXBUF_MAJOR; * Micro version of gdk-pixbuf library, that is the "2" in * "0.8.2" for example. */ -enum PIXBUF_MICRO = 1; +enum PIXBUF_MICRO = 8; alias GDK_PIXBUF_MICRO = PIXBUF_MICRO; /** * Minor version of gdk-pixbuf library, that is the "8" in * "0.8.2" for example. */ -enum PIXBUF_MINOR = 38; +enum PIXBUF_MINOR = 42; alias GDK_PIXBUF_MINOR = PIXBUF_MINOR; /** - * Contains the full version of the gdk-pixbuf header as a string. + * Contains the full version of GdkPixbuf as a string. + * * This is the version being compiled against; contrast with - * #gdk_pixbuf_version. + * `gdk_pixbuf_version`. */ -enum PIXBUF_VERSION = "2.38.1"; +enum PIXBUF_VERSION = "2.42.8"; alias GDK_PIXBUF_VERSION = PIXBUF_VERSION; /** diff --git a/generated/gtkd/gio/ActionGroupIF.d b/generated/gtkd/gio/ActionGroupIF.d index a3593a06e..537908243 100644 --- a/generated/gtkd/gio/ActionGroupIF.d +++ b/generated/gtkd/gio/ActionGroupIF.d @@ -29,6 +29,7 @@ public import gio.c.types; private import glib.Str; private import glib.Variant; private import glib.VariantType; +private import glib.c.functions; private import gobject.Signals; public import gtkc.giotypes; private import std.algorithm; @@ -153,6 +154,33 @@ public interface ActionGroupIF{ * parameters then @parameter must be %NULL. See * g_action_group_get_action_parameter_type(). * + * If the #GActionGroup implementation supports asynchronous remote + * activation over D-Bus, this call may return before the relevant + * D-Bus traffic has been sent, or any replies have been received. In + * order to block on such asynchronous activation calls, + * g_dbus_connection_flush() should be called prior to the code, which + * depends on the result of the action activation. Without flushing + * the D-Bus connection, there is no guarantee that the action would + * have been activated. + * + * The following code which runs in a remote app instance, shows an + * example of a "quit" action being activated on the primary app + * instance over D-Bus. Here g_dbus_connection_flush() is called + * before `exit()`. Without g_dbus_connection_flush(), the "quit" action + * may fail to be activated on the primary instance. + * + * |[ + * // call "quit" action on primary instance + * g_action_group_activate_action (G_ACTION_GROUP (app), "quit", NULL); + * + * // make sure the action is activated now + * g_dbus_connection_flush (...); + * + * g_debug ("application has been terminated. exiting."); + * + * exit (0); + * ]| + * * Params: * actionName = the name of the action to activate * parameter = parameters to the activation diff --git a/generated/gtkd/gio/ActionGroupT.d b/generated/gtkd/gio/ActionGroupT.d index 7f73a6d87..729ca8905 100644 --- a/generated/gtkd/gio/ActionGroupT.d +++ b/generated/gtkd/gio/ActionGroupT.d @@ -29,6 +29,7 @@ public import gio.c.types; public import glib.Str; public import glib.Variant; public import glib.VariantType; +public import glib.c.functions; public import gobject.Signals; public import gtkc.giotypes; public import std.algorithm; @@ -162,6 +163,33 @@ public template ActionGroupT(TStruct) * parameters then @parameter must be %NULL. See * g_action_group_get_action_parameter_type(). * + * If the #GActionGroup implementation supports asynchronous remote + * activation over D-Bus, this call may return before the relevant + * D-Bus traffic has been sent, or any replies have been received. In + * order to block on such asynchronous activation calls, + * g_dbus_connection_flush() should be called prior to the code, which + * depends on the result of the action activation. Without flushing + * the D-Bus connection, there is no guarantee that the action would + * have been activated. + * + * The following code which runs in a remote app instance, shows an + * example of a "quit" action being activated on the primary app + * instance over D-Bus. Here g_dbus_connection_flush() is called + * before `exit()`. Without g_dbus_connection_flush(), the "quit" action + * may fail to be activated on the primary instance. + * + * |[ + * // call "quit" action on primary instance + * g_action_group_activate_action (G_ACTION_GROUP (app), "quit", NULL); + * + * // make sure the action is activated now + * g_dbus_connection_flush (...); + * + * g_debug ("application has been terminated. exiting."); + * + * exit (0); + * ]| + * * Params: * actionName = the name of the action to activate * parameter = parameters to the activation diff --git a/generated/gtkd/gio/ActionIF.d b/generated/gtkd/gio/ActionIF.d index 323b9b959..114077d47 100644 --- a/generated/gtkd/gio/ActionIF.d +++ b/generated/gtkd/gio/ActionIF.d @@ -31,6 +31,7 @@ private import glib.GException; private import glib.Str; private import glib.Variant; private import glib.VariantType; +private import glib.c.functions; public import gtkc.giotypes; diff --git a/generated/gtkd/gio/ActionT.d b/generated/gtkd/gio/ActionT.d index b432d9d0a..a8c1e0cd7 100644 --- a/generated/gtkd/gio/ActionT.d +++ b/generated/gtkd/gio/ActionT.d @@ -31,6 +31,7 @@ public import glib.GException; public import glib.Str; public import glib.Variant; public import glib.VariantType; +public import glib.c.functions; public import gtkc.giotypes; diff --git a/generated/gtkd/gio/AppInfoIF.d b/generated/gtkd/gio/AppInfoIF.d index aee7727a6..a6bff2fd1 100644 --- a/generated/gtkd/gio/AppInfoIF.d +++ b/generated/gtkd/gio/AppInfoIF.d @@ -36,6 +36,7 @@ private import glib.ErrorG; private import glib.GException; private import glib.ListG; private import glib.Str; +private import glib.c.functions; private import gobject.ObjectG; public import gtkc.giotypes; @@ -221,7 +222,8 @@ public interface AppInfoIF{ * Params: * uriScheme = a string containing a URI scheme. * - * Returns: #GAppInfo for given @uri_scheme or %NULL on error. + * Returns: #GAppInfo for given @uri_scheme or + * %NULL on error. */ public static AppInfoIF getDefaultForUriScheme(string uriScheme) { @@ -444,7 +446,7 @@ public interface AppInfoIF{ /** * Checks if two #GAppInfos are equal. * - * Note that the check may not compare each individual + * Note that the check *may not* compare each individual * field, and only does an identity check. In case detecting changes in the * contents is needed, program code must additionally compare relevant fields. * diff --git a/generated/gtkd/gio/AppInfoT.d b/generated/gtkd/gio/AppInfoT.d index 9df24b15e..d6d51aa16 100644 --- a/generated/gtkd/gio/AppInfoT.d +++ b/generated/gtkd/gio/AppInfoT.d @@ -36,6 +36,7 @@ public import glib.ErrorG; public import glib.GException; public import glib.ListG; public import glib.Str; +public import glib.c.functions; public import gobject.ObjectG; public import gtkc.giotypes; @@ -187,7 +188,7 @@ public template AppInfoT(TStruct) /** * Checks if two #GAppInfos are equal. * - * Note that the check may not compare each individual + * Note that the check *may not* compare each individual * field, and only does an identity check. In case detecting changes in the * contents is needed, program code must additionally compare relevant fields. * diff --git a/generated/gtkd/gio/AppLaunchContext.d b/generated/gtkd/gio/AppLaunchContext.d index 27c94dc72..a84f7451c 100644 --- a/generated/gtkd/gio/AppLaunchContext.d +++ b/generated/gtkd/gio/AppLaunchContext.d @@ -32,6 +32,7 @@ private import glib.ConstructionException; private import glib.ListG; private import glib.Str; private import glib.Variant; +private import glib.c.functions; private import gobject.ObjectG; private import gobject.Signals; public import gtkc.giotypes; @@ -199,7 +200,7 @@ public class AppLaunchContext : ObjectG } /** - * The ::launch-failed signal is emitted when a #GAppInfo launch + * The #GAppLaunchContext::launch-failed signal is emitted when a #GAppInfo launch * fails. The startup notification id is provided, so that the launcher * can cancel the startup notification. * @@ -214,11 +215,42 @@ public class AppLaunchContext : ObjectG } /** - * The ::launched signal is emitted when a #GAppInfo is successfully + * The #GAppLaunchContext::launch-started signal is emitted when a #GAppInfo is + * about to be launched. If non-null the @platform_data is an + * GVariant dictionary mapping strings to variants (ie `a{sv}`), which + * contains additional, platform-specific data about this launch. On + * UNIX, at least the `startup-notification-id` keys will be + * present. + * + * The value of the `startup-notification-id` key (type `s`) is a startup + * notification ID corresponding to the format from the [startup-notification + * specification](https://specifications.freedesktop.org/startup-notification-spec/startup-notification-0.1.txt). + * It allows tracking the progress of the launchee through startup. + * + * It is guaranteed that this signal is followed by either a #GAppLaunchContext::launched or + * #GAppLaunchContext::launch-failed signal. + * + * Params: + * info = the #GAppInfo that is about to be launched + * platformData = additional platform-specific data for this launch + * + * Since: 2.72 + */ + gulong addOnLaunchStarted(void delegate(AppInfoIF, Variant, AppLaunchContext) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) + { + return Signals.connect(this, "launch-started", dlg, connectFlags ^ ConnectFlags.SWAPPED); + } + + /** + * The #GAppLaunchContext::launched signal is emitted when a #GAppInfo is successfully * launched. The @platform_data is an GVariant dictionary mapping - * strings to variants (ie a{sv}), which contains additional, + * strings to variants (ie `a{sv}`), which contains additional, * platform-specific data about this launch. On UNIX, at least the - * "pid" and "startup-notification-id" keys will be present. + * `pid` and `startup-notification-id` keys will be present. + * + * Since 2.72 the `pid` may be 0 if the process id wasn't known (for + * example if the process was launched via D-Bus). The `pid` may not be + * set at all in subsequent releases. * * Params: * info = the #GAppInfo that was just launched diff --git a/generated/gtkd/gio/Application.d b/generated/gtkd/gio/Application.d index 9b1955a2d..1cce5f318 100644 --- a/generated/gtkd/gio/Application.d +++ b/generated/gtkd/gio/Application.d @@ -41,6 +41,7 @@ private import glib.GException; private import glib.OptionGroup; private import glib.Str; private import glib.VariantDict; +private import glib.c.functions; private import gobject.ObjectG; private import gobject.Signals; public import gtkc.giotypes; @@ -70,7 +71,7 @@ private import std.algorithm; * arguments are passed through platform communication to the already * running program. The already running instance of the program is * called the "primary instance"; for non-unique applications this is - * the always the current instance. On Linux, the D-Bus session bus + * always the current instance. On Linux, the D-Bus session bus * is used for communication. * * The use of #GApplication differs from some other commonly-used @@ -155,13 +156,13 @@ private import std.algorithm; * respectively. * * For an example of opening files with a GApplication, see - * [gapplication-example-open.c](https://git.gnome.org/browse/glib/tree/gio/tests/gapplication-example-open.c). + * [gapplication-example-open.c](https://gitlab.gnome.org/GNOME/glib/-/blob/HEAD/gio/tests/gapplication-example-open.c). * * For an example of using actions with GApplication, see - * [gapplication-example-actions.c](https://git.gnome.org/browse/glib/tree/gio/tests/gapplication-example-actions.c). + * [gapplication-example-actions.c](https://gitlab.gnome.org/GNOME/glib/-/blob/HEAD/gio/tests/gapplication-example-actions.c). * * For an example of using extra D-Bus hooks with GApplication, see - * [gapplication-example-dbushooks.c](https://git.gnome.org/browse/glib/tree/gio/tests/gapplication-example-dbushooks.c). + * [gapplication-example-dbushooks.c](https://gitlab.gnome.org/GNOME/glib/-/blob/HEAD/gio/tests/gapplication-example-dbushooks.c). * * Since: 2.28 */ @@ -627,7 +628,7 @@ public class Application : ObjectG, ActionGroupIF, ActionMapIF * Gets the application's current busy state, as set through * g_application_mark_busy() or g_application_bind_busy_property(). * - * Returns: %TRUE if @application is currenty marked as busy + * Returns: %TRUE if @application is currently marked as busy * * Since: 2.44 */ @@ -712,6 +713,8 @@ public class Application : ObjectG, ActionGroupIF, ActionMapIF * * To cancel the busy indication, use g_application_unmark_busy(). * + * The application must be registered before calling this function. + * * Since: 2.38 */ public void markBusy() @@ -881,7 +884,7 @@ public class Application : ObjectG, ActionGroupIF, ActionMapIF * and override local_command_line(). In this case, you most likely want * to return %TRUE from your local_command_line() implementation to * suppress the default handling. See - * [gapplication-example-cmdline2.c][gapplication-example-cmdline2] + * [gapplication-example-cmdline2.c][https://gitlab.gnome.org/GNOME/glib/-/blob/HEAD/gio/tests/gapplication-example-cmdline2.c] * for an example. * * If, after the above is done, the use count of the application is zero diff --git a/generated/gtkd/gio/ApplicationCommandLine.d b/generated/gtkd/gio/ApplicationCommandLine.d index e295c9a69..d0bd9f5a9 100644 --- a/generated/gtkd/gio/ApplicationCommandLine.d +++ b/generated/gtkd/gio/ApplicationCommandLine.d @@ -31,6 +31,7 @@ public import gio.c.types; private import glib.Str; private import glib.Variant; private import glib.VariantDict; +private import glib.c.functions; private import gobject.ObjectG; public import gtkc.giotypes; @@ -96,9 +97,9 @@ public import gtkc.giotypes; * } * ]| * The complete example can be found here: - * [gapplication-example-cmdline.c](https://git.gnome.org/browse/glib/tree/gio/tests/gapplication-example-cmdline.c) + * [gapplication-example-cmdline.c](https://gitlab.gnome.org/GNOME/glib/-/blob/HEAD/gio/tests/gapplication-example-cmdline.c) * - * In more complicated cases, the handling of the comandline can be + * In more complicated cases, the handling of the commandline can be * split between the launcher and the primary instance. * |[ * static gboolean @@ -111,6 +112,12 @@ public import gtkc.giotypes; * * argv = *arguments; * + * if (argv[0] == NULL) + * { + * *exit_status = 0; + * return FALSE; + * } + * * i = 1; * while (argv[i]) * { @@ -147,7 +154,7 @@ public import gtkc.giotypes; * instance. * * The complete example can be found here: - * [gapplication-example-cmdline2.c](https://git.gnome.org/browse/glib/tree/gio/tests/gapplication-example-cmdline2.c) + * [gapplication-example-cmdline2.c](https://gitlab.gnome.org/GNOME/glib/-/blob/HEAD/gio/tests/gapplication-example-cmdline2.c) * * If handling the commandline requires a lot of work, it may * be better to defer it. @@ -189,7 +196,7 @@ public import gtkc.giotypes; * hold the application until you are done with the commandline. * * The complete example can be found here: - * [gapplication-example-cmdline3.c](https://git.gnome.org/browse/glib/tree/gio/tests/gapplication-example-cmdline3.c) + * [gapplication-example-cmdline3.c](https://gitlab.gnome.org/GNOME/glib/-/blob/HEAD/gio/tests/gapplication-example-cmdline3.c) */ public class ApplicationCommandLine : ObjectG { @@ -409,7 +416,7 @@ public class ApplicationCommandLine : ObjectG * The #GInputStream can be used to read data passed to the standard * input of the invoking process. * This doesn't work on all platforms. Presently, it is only available - * on UNIX when using a DBus daemon capable of passing file descriptors. + * on UNIX when using a D-Bus daemon capable of passing file descriptors. * If stdin is not available then %NULL will be returned. In the * future, support may be expanded to other platforms. * diff --git a/generated/gtkd/gio/AsyncInitableIF.d b/generated/gtkd/gio/AsyncInitableIF.d index fbe52c0bb..84cffdb92 100644 --- a/generated/gtkd/gio/AsyncInitableIF.d +++ b/generated/gtkd/gio/AsyncInitableIF.d @@ -91,6 +91,7 @@ public import gtkc.giotypes; * GTask *task; * * task = g_task_new (initable, cancellable, callback, user_data); + * g_task_set_name (task, G_STRFUNC); * * switch (self->priv->state) * { diff --git a/generated/gtkd/gio/AsyncInitableT.d b/generated/gtkd/gio/AsyncInitableT.d index 2a50992eb..988228746 100644 --- a/generated/gtkd/gio/AsyncInitableT.d +++ b/generated/gtkd/gio/AsyncInitableT.d @@ -91,6 +91,7 @@ public import gtkc.giotypes; * GTask *task; * * task = g_task_new (initable, cancellable, callback, user_data); + * g_task_set_name (task, G_STRFUNC); * * switch (self->priv->state) * { diff --git a/generated/gtkd/gio/BytesIcon.d b/generated/gtkd/gio/BytesIcon.d index 9ebd4c476..b893c3aad 100644 --- a/generated/gtkd/gio/BytesIcon.d +++ b/generated/gtkd/gio/BytesIcon.d @@ -86,11 +86,14 @@ public class BytesIcon : ObjectG, IconIF, LoadableIconIF /** * Creates a new icon for a bytes. * + * This cannot fail, but loading and interpreting the bytes may fail later on + * (for example, if g_loadable_icon_load() is called) if the image is invalid. + * * Params: * bytes = a #GBytes. * * Returns: a #GIcon for the given - * @bytes, or %NULL on error. + * @bytes. * * Since: 2.38 * @@ -111,7 +114,7 @@ public class BytesIcon : ObjectG, IconIF, LoadableIconIF /** * Gets the #GBytes associated with the given @icon. * - * Returns: a #GBytes, or %NULL. + * Returns: a #GBytes. * * Since: 2.38 */ diff --git a/generated/gtkd/gio/ContentType.d b/generated/gtkd/gio/ContentType.d index ff05449c2..f97a445d3 100644 --- a/generated/gtkd/gio/ContentType.d +++ b/generated/gtkd/gio/ContentType.d @@ -30,6 +30,7 @@ private import gio.c.functions; public import gio.c.types; private import glib.ListG; private import glib.Str; +private import glib.c.functions; private import gobject.ObjectG; public import gtkc.giotypes; @@ -195,7 +196,7 @@ public struct ContentType * on the other argument. * * Params: - * filename = a string, or %NULL + * filename = a path, or %NULL * data = a stream of data, or %NULL * resultUncertain = return location for the certainty * of the result, or %NULL diff --git a/generated/gtkd/gio/Credentials.d b/generated/gtkd/gio/Credentials.d index 84e464aad..dfc77c3ca 100644 --- a/generated/gtkd/gio/Credentials.d +++ b/generated/gtkd/gio/Credentials.d @@ -30,6 +30,7 @@ private import glib.ConstructionException; private import glib.ErrorG; private import glib.GException; private import glib.Str; +private import glib.c.functions; private import gobject.ObjectG; public import gtkc.giotypes; @@ -48,23 +49,30 @@ public import gtkc.giotypes; * #GUnixCredentialsMessage, g_unix_connection_send_credentials() and * g_unix_connection_receive_credentials() for details. * - * On Linux, the native credential type is a struct ucred - see the + * On Linux, the native credential type is a `struct ucred` - see the * unix(7) man page for details. This corresponds to * %G_CREDENTIALS_TYPE_LINUX_UCRED. * + * On Apple operating systems (including iOS, tvOS, and macOS), + * the native credential type is a `struct xucred`. + * This corresponds to %G_CREDENTIALS_TYPE_APPLE_XUCRED. + * * On FreeBSD, Debian GNU/kFreeBSD, and GNU/Hurd, the native - * credential type is a struct cmsgcred. This corresponds + * credential type is a `struct cmsgcred`. This corresponds * to %G_CREDENTIALS_TYPE_FREEBSD_CMSGCRED. * - * On NetBSD, the native credential type is a struct unpcbid. + * On NetBSD, the native credential type is a `struct unpcbid`. * This corresponds to %G_CREDENTIALS_TYPE_NETBSD_UNPCBID. * - * On OpenBSD, the native credential type is a struct sockpeercred. + * On OpenBSD, the native credential type is a `struct sockpeercred`. * This corresponds to %G_CREDENTIALS_TYPE_OPENBSD_SOCKPEERCRED. * * On Solaris (including OpenSolaris and its derivatives), the native - * credential type is a ucred_t. This corresponds to + * credential type is a `ucred_t`. This corresponds to * %G_CREDENTIALS_TYPE_SOLARIS_UCRED. + * + * Since GLib 2.72, on Windows, the native credentials may contain the PID of a + * process. This corresponds to %G_CREDENTIALS_TYPE_WIN32_PID. * * Since: 2.26 */ @@ -136,10 +144,10 @@ public class Credentials : ObjectG * Params: * nativeType = The type of native credentials to get. * - * Returns: The pointer to native credentials or %NULL if the - * operation there is no #GCredentials support for the OS or if - * @native_type isn't supported by the OS. Do not free the returned - * data, it is owned by @credentials. + * Returns: The pointer to native credentials or + * %NULL if there is no #GCredentials support for the OS or if @native_type + * isn't supported by the OS. Do not free the returned data, it is owned + * by @credentials. * * Since: 2.26 */ @@ -156,7 +164,7 @@ public class Credentials : ObjectG * OS or if the native credentials type does not contain information * about the UNIX process ID. * - * Returns: The UNIX process ID, or -1 if @error is set. + * Returns: The UNIX process ID, or `-1` if @error is set. * * Since: 2.36 * @@ -184,7 +192,7 @@ public class Credentials : ObjectG * OS or if the native credentials type does not contain information * about the UNIX user. * - * Returns: The UNIX user identifier or -1 if @error is set. + * Returns: The UNIX user identifier or `-1` if @error is set. * * Since: 2.26 * diff --git a/generated/gtkd/gio/DBusAnnotationInfo.d b/generated/gtkd/gio/DBusAnnotationInfo.d index 11dc11d44..55dd3d31e 100644 --- a/generated/gtkd/gio/DBusAnnotationInfo.d +++ b/generated/gtkd/gio/DBusAnnotationInfo.d @@ -28,6 +28,7 @@ private import gio.c.functions; public import gio.c.types; private import glib.MemorySlice; private import glib.Str; +private import glib.c.functions; private import gobject.ObjectG; public import gtkc.giotypes; private import gtkd.Loader; diff --git a/generated/gtkd/gio/DBusArgInfo.d b/generated/gtkd/gio/DBusArgInfo.d index 502b2def1..bc39fcb54 100644 --- a/generated/gtkd/gio/DBusArgInfo.d +++ b/generated/gtkd/gio/DBusArgInfo.d @@ -29,6 +29,7 @@ private import gio.c.functions; public import gio.c.types; private import glib.MemorySlice; private import glib.Str; +private import glib.c.functions; private import gobject.ObjectG; public import gtkc.giotypes; private import gtkd.Loader; diff --git a/generated/gtkd/gio/DBusAuthObserver.d b/generated/gtkd/gio/DBusAuthObserver.d index c3e6b7277..7ec06f2f0 100644 --- a/generated/gtkd/gio/DBusAuthObserver.d +++ b/generated/gtkd/gio/DBusAuthObserver.d @@ -73,7 +73,9 @@ private import std.algorithm; * connections from any successfully authenticated user (but not from * anonymous connections using the `ANONYMOUS` mechanism). If you only * want to allow D-Bus connections from processes owned by the same uid - * as the server, you would use a signal handler like the following: + * as the server, since GLib 2.68, you should use the + * %G_DBUS_SERVER_FLAGS_AUTHENTICATION_REQUIRE_SAME_USER flag. It’s equivalent + * to the following signal handler: * * |[ * static gboolean diff --git a/generated/gtkd/gio/DBusConnection.d b/generated/gtkd/gio/DBusConnection.d index ce8337b4d..20df602f6 100644 --- a/generated/gtkd/gio/DBusConnection.d +++ b/generated/gtkd/gio/DBusConnection.d @@ -46,6 +46,7 @@ private import glib.GException; private import glib.Str; private import glib.Variant; private import glib.VariantType; +private import glib.c.functions; private import gobject.Closure; private import gobject.ObjectG; private import gobject.Signals; @@ -87,22 +88,22 @@ private import std.algorithm; * ## An example D-Bus server # {#gdbus-server} * * Here is an example for a D-Bus server: - * [gdbus-example-server.c](https://git.gnome.org/browse/glib/tree/gio/tests/gdbus-example-server.c) + * [gdbus-example-server.c](https://gitlab.gnome.org/GNOME/glib/-/blob/HEAD/gio/tests/gdbus-example-server.c) * * ## An example for exporting a subtree # {#gdbus-subtree-server} * * Here is an example for exporting a subtree: - * [gdbus-example-subtree.c](https://git.gnome.org/browse/glib/tree/gio/tests/gdbus-example-subtree.c) + * [gdbus-example-subtree.c](https://gitlab.gnome.org/GNOME/glib/-/blob/HEAD/gio/tests/gdbus-example-subtree.c) * * ## An example for file descriptor passing # {#gdbus-unix-fd-client} * * Here is an example for passing UNIX file descriptors: - * [gdbus-unix-fd-client.c](https://git.gnome.org/browse/glib/tree/gio/tests/gdbus-example-unix-fd-client.c) + * [gdbus-unix-fd-client.c](https://gitlab.gnome.org/GNOME/glib/-/blob/HEAD/gio/tests/gdbus-example-unix-fd-client.c) * * ## An example for exporting a GObject # {#gdbus-export} * * Here is an example for exporting a #GObject: - * [gdbus-example-export.c](https://git.gnome.org/browse/glib/tree/gio/tests/gdbus-example-export.c) + * [gdbus-example-export.c](https://gitlab.gnome.org/GNOME/glib/-/blob/HEAD/gio/tests/gdbus-example-export.c) * * Since: 2.26 */ @@ -197,8 +198,9 @@ public class DBusConnection : ObjectG, AsyncInitableIF, InitableIF * This constructor can only be used to initiate client-side * connections - use g_dbus_connection_new_sync() if you need to act * as the server. In particular, @flags cannot contain the - * %G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_SERVER or - * %G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_ALLOW_ANONYMOUS flags. + * %G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_SERVER, + * %G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_ALLOW_ANONYMOUS or + * %G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_REQUIRE_SAME_USER flags. * * This is a synchronous failable constructor. See * g_dbus_connection_new_for_address() for the asynchronous version. @@ -212,8 +214,8 @@ public class DBusConnection : ObjectG, AsyncInitableIF, InitableIF * observer = a #GDBusAuthObserver or %NULL * cancellable = a #GCancellable or %NULL * - * Returns: a #GDBusConnection or %NULL if @error is set. Free with - * g_object_unref(). + * Returns: a #GDBusConnection or %NULL if @error is set. + * Free with g_object_unref(). * * Since: 2.26 * @@ -263,7 +265,8 @@ public class DBusConnection : ObjectG, AsyncInitableIF, InitableIF * observer = a #GDBusAuthObserver or %NULL * cancellable = a #GCancellable or %NULL * - * Returns: a #GDBusConnection or %NULL if @error is set. Free with g_object_unref(). + * Returns: a #GDBusConnection or %NULL if @error is set. + * Free with g_object_unref(). * * Since: 2.26 * @@ -336,8 +339,9 @@ public class DBusConnection : ObjectG, AsyncInitableIF, InitableIF * This constructor can only be used to initiate client-side * connections - use g_dbus_connection_new() if you need to act as the * server. In particular, @flags cannot contain the - * %G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_SERVER or - * %G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_ALLOW_ANONYMOUS flags. + * %G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_SERVER, + * %G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_ALLOW_ANONYMOUS or + * %G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_REQUIRE_SAME_USER flags. * * When the operation is finished, @callback will be invoked. You can * then call g_dbus_connection_new_for_address_finish() to get the result of @@ -489,8 +493,8 @@ public class DBusConnection : ObjectG, AsyncInitableIF, InitableIF * Params: * res = a #GAsyncResult obtained from the #GAsyncReadyCallback passed to g_dbus_connection_call() * - * Returns: %NULL if @error is set. Otherwise a #GVariant tuple with - * return values. Free with g_variant_unref(). + * Returns: %NULL if @error is set. Otherwise a non-floating + * #GVariant tuple with return values. Free with g_variant_unref(). * * Since: 2.26 * @@ -567,8 +571,8 @@ public class DBusConnection : ObjectG, AsyncInitableIF, InitableIF * timeout or %G_MAXINT for no timeout * cancellable = a #GCancellable or %NULL * - * Returns: %NULL if @error is set. Otherwise a #GVariant tuple with - * return values. Free with g_variant_unref(). + * Returns: %NULL if @error is set. Otherwise a non-floating + * #GVariant tuple with return values. Free with g_variant_unref(). * * Since: 2.26 * @@ -596,6 +600,18 @@ public class DBusConnection : ObjectG, AsyncInitableIF, InitableIF /** * Like g_dbus_connection_call() but also takes a #GUnixFDList object. * + * The file descriptors normally correspond to %G_VARIANT_TYPE_HANDLE + * values in the body of the message. For example, if a message contains + * two file descriptors, @fd_list would have length 2, and + * `g_variant_new_handle (0)` and `g_variant_new_handle (1)` would appear + * somewhere in the body of the message (not necessarily in that order!) + * to represent the file descriptors at indexes 0 and 1 respectively. + * + * When designing D-Bus APIs that are intended to be interoperable, + * please note that non-GDBus implementations of D-Bus can usually only + * access file descriptors if they are referenced in this way by a + * value of type %G_VARIANT_TYPE_HANDLE in the body of the message. + * * This method is only available on UNIX. * * Params: @@ -627,13 +643,24 @@ public class DBusConnection : ObjectG, AsyncInitableIF, InitableIF /** * Finishes an operation started with g_dbus_connection_call_with_unix_fd_list(). * + * The file descriptors normally correspond to %G_VARIANT_TYPE_HANDLE + * values in the body of the message. For example, + * if g_variant_get_handle() returns 5, that is intended to be a reference + * to the file descriptor that can be accessed by + * `g_unix_fd_list_get (*out_fd_list, 5, ...)`. + * + * When designing D-Bus APIs that are intended to be interoperable, + * please note that non-GDBus implementations of D-Bus can usually only + * access file descriptors if they are referenced in this way by a + * value of type %G_VARIANT_TYPE_HANDLE in the body of the message. + * * Params: * outFdList = return location for a #GUnixFDList or %NULL * res = a #GAsyncResult obtained from the #GAsyncReadyCallback passed to * g_dbus_connection_call_with_unix_fd_list() * - * Returns: %NULL if @error is set. Otherwise a #GVariant tuple with - * return values. Free with g_variant_unref(). + * Returns: %NULL if @error is set. Otherwise a non-floating + * #GVariant tuple with return values. Free with g_variant_unref(). * * Since: 2.30 * @@ -663,6 +690,8 @@ public class DBusConnection : ObjectG, AsyncInitableIF, InitableIF /** * Like g_dbus_connection_call_sync() but also takes and returns #GUnixFDList objects. + * See g_dbus_connection_call_with_unix_fd_list() and + * g_dbus_connection_call_with_unix_fd_list_finish() for more details. * * This method is only available on UNIX. * @@ -682,8 +711,8 @@ public class DBusConnection : ObjectG, AsyncInitableIF, InitableIF * outFdList = return location for a #GUnixFDList or %NULL * cancellable = a #GCancellable or %NULL * - * Returns: %NULL if @error is set. Otherwise a #GVariant tuple with - * return values. Free with g_variant_unref(). + * Returns: %NULL if @error is set. Otherwise a non-floating + * #GVariant tuple with return values. Free with g_variant_unref(). * * Since: 2.30 * @@ -1188,7 +1217,7 @@ public class DBusConnection : ObjectG, AsyncInitableIF, InitableIF * #GVariant of incorrect type. * * If an existing callback is already registered at @object_path and - * @interface_name, then @error is set to #G_IO_ERROR_EXISTS. + * @interface_name, then @error is set to %G_IO_ERROR_EXISTS. * * GDBus automatically implements the standard D-Bus interfaces * org.freedesktop.DBus.Properties, org.freedesktop.DBus.Introspectable @@ -1242,7 +1271,7 @@ public class DBusConnection : ObjectG, AsyncInitableIF, InitableIF * getPropertyClosure = #GClosure for getting a property. * setPropertyClosure = #GClosure for setting a property. * - * Returns: 0 if @error is set, otherwise a registration id (never 0) + * Returns: 0 if @error is set, otherwise a registration ID (never 0) * that can be used with g_dbus_connection_unregister_object() . * * Since: 2.46 @@ -1272,7 +1301,7 @@ public class DBusConnection : ObjectG, AsyncInitableIF, InitableIF * * When handling remote calls into any node in the subtree, first the * @enumerate function is used to check if the node exists. If the node exists - * or the #G_DBUS_SUBTREE_FLAGS_DISPATCH_TO_UNENUMERATED_NODES flag is set + * or the %G_DBUS_SUBTREE_FLAGS_DISPATCH_TO_UNENUMERATED_NODES flag is set * the @introspection function is used to check if the node supports the * requested method. If so, the @dispatch function is used to determine * where to dispatch the call. The collected #GDBusInterfaceVTable and @@ -1284,7 +1313,7 @@ public class DBusConnection : ObjectG, AsyncInitableIF, InitableIF * of the thread you are calling this method from. * * If an existing subtree is already registered at @object_path or - * then @error is set to #G_IO_ERROR_EXISTS. + * then @error is set to %G_IO_ERROR_EXISTS. * * Note that it is valid to register regular objects (using * g_dbus_connection_register_object()) in a subtree registered with @@ -1307,8 +1336,8 @@ public class DBusConnection : ObjectG, AsyncInitableIF, InitableIF * userData = data to pass to functions in @vtable * userDataFreeFunc = function to call when the subtree is unregistered * - * Returns: 0 if @error is set, otherwise a subtree registration id (never 0) - * that can be used with g_dbus_connection_unregister_subtree() . + * Returns: 0 if @error is set, otherwise a subtree registration ID (never 0) + * that can be used with g_dbus_connection_unregister_subtree() * * Since: 2.26 * @@ -1356,7 +1385,9 @@ public class DBusConnection : ObjectG, AsyncInitableIF, InitableIF * will be assigned by @connection and set on @message via * g_dbus_message_set_serial(). If @out_serial is not %NULL, then the * serial number used will be written to this location prior to - * submitting the message to the underlying transport. + * submitting the message to the underlying transport. While it has a `volatile` + * qualifier, this is a historical artifact and the argument passed to it should + * not be `volatile`. * * If @connection is closed then the operation will fail with * %G_IO_ERROR_CLOSED. If @message is not well-formed, @@ -1404,7 +1435,9 @@ public class DBusConnection : ObjectG, AsyncInitableIF, InitableIF * will be assigned by @connection and set on @message via * g_dbus_message_set_serial(). If @out_serial is not %NULL, then the * serial number used will be written to this location prior to - * submitting the message to the underlying transport. + * submitting the message to the underlying transport. While it has a `volatile` + * qualifier, this is a historical artifact and the argument passed to it should + * not be `volatile`. * * If @connection is closed then the operation will fail with * %G_IO_ERROR_CLOSED. If @cancellable is canceled, the operation will @@ -1496,7 +1529,9 @@ public class DBusConnection : ObjectG, AsyncInitableIF, InitableIF * will be assigned by @connection and set on @message via * g_dbus_message_set_serial(). If @out_serial is not %NULL, then the * serial number used will be written to this location prior to - * submitting the message to the underlying transport. + * submitting the message to the underlying transport. While it has a `volatile` + * qualifier, this is a historical artifact and the argument passed to it should + * not be `volatile`. * * If @connection is closed then the operation will fail with * %G_IO_ERROR_CLOSED. If @cancellable is canceled, the operation will @@ -1661,6 +1696,9 @@ public class DBusConnection : ObjectG, AsyncInitableIF, InitableIF * g_dbus_connection_signal_subscribe() is called, in order to avoid memory * leaks through callbacks queued on the #GMainContext after it’s stopped being * iterated. + * Alternatively, any idle source with a priority lower than %G_PRIORITY_DEFAULT + * that was scheduled after unsubscription, also indicates that all resources + * of this subscription are released. * * Params: * subscriptionId = a subscription id obtained from @@ -1813,7 +1851,9 @@ public class DBusConnection : ObjectG, AsyncInitableIF, InitableIF * callers of g_bus_get() and g_bus_get_sync() for @bus_type. In the * event that you need a private message bus connection, use * g_dbus_address_get_for_bus_sync() and - * g_dbus_connection_new_for_address(). + * g_dbus_connection_new_for_address() with + * G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_CLIENT and + * G_DBUS_CONNECTION_FLAGS_MESSAGE_BUS_CONNECTION flags. * * Note that the returned #GDBusConnection object will (usually) have * the #GDBusConnection:exit-on-close property set to %TRUE. @@ -1861,7 +1901,9 @@ public class DBusConnection : ObjectG, AsyncInitableIF, InitableIF * callers of g_bus_get() and g_bus_get_sync() for @bus_type. In the * event that you need a private message bus connection, use * g_dbus_address_get_for_bus_sync() and - * g_dbus_connection_new_for_address(). + * g_dbus_connection_new_for_address() with + * G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_CLIENT and + * G_DBUS_CONNECTION_FLAGS_MESSAGE_BUS_CONNECTION flags. * * Note that the returned #GDBusConnection object will (usually) have * the #GDBusConnection:exit-on-close property set to %TRUE. diff --git a/generated/gtkd/gio/DBusError.d b/generated/gtkd/gio/DBusError.d index 25a30f464..920ed0a7a 100644 --- a/generated/gtkd/gio/DBusError.d +++ b/generated/gtkd/gio/DBusError.d @@ -28,6 +28,7 @@ private import gio.c.functions; public import gio.c.types; private import glib.ErrorG; private import glib.Str; +private import glib.c.functions; public import gtkc.giotypes; @@ -51,7 +52,8 @@ public struct DBusError * Params: * error = A #GError. * - * Returns: A D-Bus error name (never %NULL). Free with g_free(). + * Returns: A D-Bus error name (never %NULL). + * Free with g_free(). * * Since: 2.26 */ @@ -74,8 +76,8 @@ public struct DBusError * Params: * error = a #GError * - * Returns: an allocated string or %NULL if the D-Bus error name - * could not be found. Free with g_free(). + * Returns: an allocated string or %NULL if the + * D-Bus error name could not be found. Free with g_free(). * * Since: 2.26 */ @@ -120,7 +122,7 @@ public struct DBusError * such that it can be recovered with g_dbus_error_get_remote_error(). * * Otherwise, a #GError with the error code %G_IO_ERROR_DBUS_ERROR - * in the #G_IO_ERROR error domain is returned. Also, @dbus_error_name is + * in the %G_IO_ERROR error domain is returned. Also, @dbus_error_name is * added to the error message such that it can be recovered with * g_dbus_error_get_remote_error(). * @@ -183,6 +185,9 @@ public struct DBusError /** * Helper function for associating a #GError error domain with D-Bus error names. * + * While @quark_volatile has a `volatile` qualifier, this is a historical + * artifact and the argument passed to it should not be `volatile`. + * * Params: * errorDomainQuarkName = The error domain name. * quarkVolatile = A pointer where to store the #GQuark. diff --git a/generated/gtkd/gio/DBusInterfaceInfo.d b/generated/gtkd/gio/DBusInterfaceInfo.d index 3dd08ce4d..f8837853c 100644 --- a/generated/gtkd/gio/DBusInterfaceInfo.d +++ b/generated/gtkd/gio/DBusInterfaceInfo.d @@ -33,6 +33,7 @@ public import gio.c.types; private import glib.MemorySlice; private import glib.Str; private import glib.StringG; +private import glib.c.functions; private import gobject.ObjectG; public import gtkc.giotypes; private import gtkd.Loader; diff --git a/generated/gtkd/gio/DBusInterfaceSkeleton.d b/generated/gtkd/gio/DBusInterfaceSkeleton.d index 9c9880e91..739478f98 100644 --- a/generated/gtkd/gio/DBusInterfaceSkeleton.d +++ b/generated/gtkd/gio/DBusInterfaceSkeleton.d @@ -36,6 +36,7 @@ private import glib.GException; private import glib.ListG; private import glib.Str; private import glib.Variant; +private import glib.c.functions; private import gobject.ObjectG; private import gobject.Signals; public import gtkc.giotypes; diff --git a/generated/gtkd/gio/DBusMessage.d b/generated/gtkd/gio/DBusMessage.d index 674ee1f51..cb7045f9f 100644 --- a/generated/gtkd/gio/DBusMessage.d +++ b/generated/gtkd/gio/DBusMessage.d @@ -32,6 +32,7 @@ private import glib.ErrorG; private import glib.GException; private import glib.Str; private import glib.Variant; +private import glib.c.functions; private import gobject.ObjectG; public import gtkc.giotypes; @@ -487,6 +488,8 @@ public class DBusMessage : ObjectG /** * Convenience getter for the %G_DBUS_MESSAGE_HEADER_FIELD_SIGNATURE header field. * + * This will always be non-%NULL, but may be an empty string. + * * Returns: The value. * * Since: 2.26 @@ -501,6 +504,12 @@ public class DBusMessage : ObjectG * * This method is only available on UNIX. * + * The file descriptors normally correspond to %G_VARIANT_TYPE_HANDLE + * values in the body of the message. For example, + * if g_variant_get_handle() returns 5, that is intended to be a reference + * to the file descriptor that can be accessed by + * `g_unix_fd_list_get (list, 5, ...)`. + * * Returns: A #GUnixFDList or %NULL if no file descriptors are * associated. Do not free, this object is owned by @message. * @@ -852,6 +861,11 @@ public class DBusMessage : ObjectG * * This method is only available on UNIX. * + * When designing D-Bus APIs that are intended to be interoperable, + * please note that non-GDBus implementations of D-Bus can usually only + * access file descriptors if they are referenced by a value of type + * %G_VARIANT_TYPE_HANDLE in the body of the message. + * * Params: * fdList = A #GUnixFDList or %NULL. * diff --git a/generated/gtkd/gio/DBusMethodInfo.d b/generated/gtkd/gio/DBusMethodInfo.d index 74bc5565a..09c0c197f 100644 --- a/generated/gtkd/gio/DBusMethodInfo.d +++ b/generated/gtkd/gio/DBusMethodInfo.d @@ -30,6 +30,7 @@ private import gio.c.functions; public import gio.c.types; private import glib.MemorySlice; private import glib.Str; +private import glib.c.functions; private import gobject.ObjectG; public import gtkc.giotypes; private import gtkd.Loader; diff --git a/generated/gtkd/gio/DBusMethodInvocation.d b/generated/gtkd/gio/DBusMethodInvocation.d index a29d6710c..88bbf02f3 100644 --- a/generated/gtkd/gio/DBusMethodInvocation.d +++ b/generated/gtkd/gio/DBusMethodInvocation.d @@ -34,6 +34,7 @@ public import gio.c.types; private import glib.ErrorG; private import glib.Str; private import glib.Variant; +private import glib.c.functions; private import gobject.ObjectG; public import gtkc.giotypes; diff --git a/generated/gtkd/gio/DBusNodeInfo.d b/generated/gtkd/gio/DBusNodeInfo.d index 8ad7701bd..61e3bf215 100644 --- a/generated/gtkd/gio/DBusNodeInfo.d +++ b/generated/gtkd/gio/DBusNodeInfo.d @@ -34,6 +34,7 @@ private import glib.GException; private import glib.MemorySlice; private import glib.Str; private import glib.StringG; +private import glib.c.functions; private import gobject.ObjectG; public import gtkc.giotypes; private import gtkd.Loader; diff --git a/generated/gtkd/gio/DBusObjectIF.d b/generated/gtkd/gio/DBusObjectIF.d index dbc5e988d..0da5cbaba 100644 --- a/generated/gtkd/gio/DBusObjectIF.d +++ b/generated/gtkd/gio/DBusObjectIF.d @@ -29,6 +29,7 @@ private import gio.c.functions; public import gio.c.types; private import glib.ListG; private import glib.Str; +private import glib.c.functions; private import gobject.ObjectG; private import gobject.Signals; public import gtkc.giotypes; diff --git a/generated/gtkd/gio/DBusObjectManagerClient.d b/generated/gtkd/gio/DBusObjectManagerClient.d index 60705afce..e871e54dc 100644 --- a/generated/gtkd/gio/DBusObjectManagerClient.d +++ b/generated/gtkd/gio/DBusObjectManagerClient.d @@ -41,6 +41,7 @@ private import glib.ErrorG; private import glib.GException; private import glib.Str; private import glib.Variant; +private import glib.c.functions; private import gobject.ObjectG; private import gobject.Signals; public import gtkc.giotypes; diff --git a/generated/gtkd/gio/DBusObjectManagerIF.d b/generated/gtkd/gio/DBusObjectManagerIF.d index d30f7d92d..3c2db04f1 100644 --- a/generated/gtkd/gio/DBusObjectManagerIF.d +++ b/generated/gtkd/gio/DBusObjectManagerIF.d @@ -30,6 +30,7 @@ private import gio.c.functions; public import gio.c.types; private import glib.ListG; private import glib.Str; +private import glib.c.functions; private import gobject.ObjectG; private import gobject.Signals; public import gtkc.giotypes; @@ -75,7 +76,7 @@ public interface DBusObjectManagerIF{ public DBusInterfaceIF getInterface(string objectPath, string interfaceName); /** - * Gets the #GDBusObjectProxy at @object_path, if any. + * Gets the #GDBusObject at @object_path, if any. * * Params: * objectPath = Object path to look up. diff --git a/generated/gtkd/gio/DBusObjectManagerT.d b/generated/gtkd/gio/DBusObjectManagerT.d index 2f900987a..b97aff3ce 100644 --- a/generated/gtkd/gio/DBusObjectManagerT.d +++ b/generated/gtkd/gio/DBusObjectManagerT.d @@ -30,6 +30,7 @@ public import gio.c.functions; public import gio.c.types; public import glib.ListG; public import glib.Str; +public import glib.c.functions; public import gobject.ObjectG; public import gobject.Signals; public import gtkc.giotypes; @@ -82,7 +83,7 @@ public template DBusObjectManagerT(TStruct) } /** - * Gets the #GDBusObjectProxy at @object_path, if any. + * Gets the #GDBusObject at @object_path, if any. * * Params: * objectPath = Object path to look up. diff --git a/generated/gtkd/gio/DBusObjectT.d b/generated/gtkd/gio/DBusObjectT.d index e8261777f..91b7d6f85 100644 --- a/generated/gtkd/gio/DBusObjectT.d +++ b/generated/gtkd/gio/DBusObjectT.d @@ -29,6 +29,7 @@ public import gio.c.functions; public import gio.c.types; public import glib.ListG; public import glib.Str; +public import glib.c.functions; public import gobject.ObjectG; public import gobject.Signals; public import gtkc.giotypes; diff --git a/generated/gtkd/gio/DBusPropertyInfo.d b/generated/gtkd/gio/DBusPropertyInfo.d index cccb5ad6e..322de1a8a 100644 --- a/generated/gtkd/gio/DBusPropertyInfo.d +++ b/generated/gtkd/gio/DBusPropertyInfo.d @@ -29,6 +29,7 @@ private import gio.c.functions; public import gio.c.types; private import glib.MemorySlice; private import glib.Str; +private import glib.c.functions; private import gobject.ObjectG; public import gtkc.giotypes; private import gtkd.Loader; diff --git a/generated/gtkd/gio/DBusProxy.d b/generated/gtkd/gio/DBusProxy.d index b5797400c..25a1164cf 100644 --- a/generated/gtkd/gio/DBusProxy.d +++ b/generated/gtkd/gio/DBusProxy.d @@ -42,6 +42,7 @@ private import glib.ErrorG; private import glib.GException; private import glib.Str; private import glib.Variant; +private import glib.c.functions; private import gobject.ObjectG; private import gobject.Signals; public import gtkc.giotypes; @@ -71,6 +72,13 @@ private import std.algorithm; * the message bus launching an owner (unless * %G_DBUS_PROXY_FLAGS_DO_NOT_AUTO_START is set). * + * If the proxy is for a stateless D-Bus service, where the name owner may + * be started and stopped between calls, the #GDBusProxy:g-name-owner tracking + * of #GDBusProxy will cause the proxy to drop signal and property changes from + * the service after it has restarted for the first time. When interacting + * with a stateless D-Bus service, do not use #GDBusProxy — use direct D-Bus + * method calls and signal connections. + * * The generic #GDBusProxy::g-properties-changed and * #GDBusProxy::g-signal signals are not very convenient to work with. * Therefore, the recommended way of working with proxies is to subclass @@ -85,7 +93,7 @@ private import std.algorithm; * of the thread where the instance was constructed. * * An example using a proxy for a well-known name can be found in - * [gdbus-example-watch-proxy.c](https://git.gnome.org/browse/glib/tree/gio/tests/gdbus-example-watch-proxy.c) + * [gdbus-example-watch-proxy.c](https://gitlab.gnome.org/GNOME/glib/-/blob/HEAD/gio/tests/gdbus-example-watch-proxy.c) * * Since: 2.26 */ @@ -747,6 +755,10 @@ public class DBusProxy : ObjectG, AsyncInitableIF, DBusInterfaceIF, InitableIF /** * Gets the name that @proxy was constructed for. * + * When connected to a message bus, this will usually be non-%NULL. + * However, it may be %NULL for a proxy that communicates using a peer-to-peer + * pattern. + * * Returns: A string owned by @proxy. Do not free. * * Since: 2.26 @@ -894,6 +906,10 @@ public class DBusProxy : ObjectG, AsyncInitableIF, DBusInterfaceIF, InitableIF /** * Emitted when a signal from the remote object and interface that @proxy is for, has been received. * + * Since 2.72 this signal supports detailed connections. You can connect to + * the detailed signal `g-signal::x` in order to receive callbacks only when + * signal `x` is received from the remote object. + * * Params: * senderName = The sender of the signal or %NULL if the connection is not a bus connection. * signalName = The name of the signal. diff --git a/generated/gtkd/gio/DBusServer.d b/generated/gtkd/gio/DBusServer.d index aec4757cc..64e82ce98 100644 --- a/generated/gtkd/gio/DBusServer.d +++ b/generated/gtkd/gio/DBusServer.d @@ -35,6 +35,7 @@ private import glib.ConstructionException; private import glib.ErrorG; private import glib.GException; private import glib.Str; +private import glib.c.functions; private import gobject.ObjectG; private import gobject.Signals; public import gtkc.giotypes; @@ -51,13 +52,15 @@ private import std.algorithm; * To just export an object on a well-known name on a message bus, such as the * session or system bus, you should instead use g_bus_own_name(). * - * An example of peer-to-peer communication with G-DBus can be found - * in [gdbus-example-peer.c](https://git.gnome.org/browse/glib/tree/gio/tests/gdbus-example-peer.c). + * An example of peer-to-peer communication with GDBus can be found + * in [gdbus-example-peer.c](https://gitlab.gnome.org/GNOME/glib/-/blob/HEAD/gio/tests/gdbus-example-peer.c). * * Note that a minimal #GDBusServer will accept connections from any * peer. In many use-cases it will be necessary to add a #GDBusAuthObserver * that only accepts connections that have successfully authenticated - * as the same user that is running the #GDBusServer. + * as the same user that is running the #GDBusServer. Since GLib 2.68 this can + * be achieved more simply by passing the + * %G_DBUS_SERVER_FLAGS_AUTHENTICATION_REQUIRE_SAME_USER flag to the server. * * Since: 2.26 */ @@ -160,6 +163,8 @@ public class DBusServer : ObjectG, InitableIF * [D-Bus address](https://dbus.freedesktop.org/doc/dbus-specification.html#addresses) * string that can be used by clients to connect to @server. * + * This is valid and non-empty if initializing the #GDBusServer succeeded. + * * Returns: A D-Bus address string. Do not free, the string is owned * by @server. * @@ -183,7 +188,7 @@ public class DBusServer : ObjectG, InitableIF } /** - * Gets the GUID for @server. + * Gets the GUID for @server, as provided to g_dbus_server_new_sync(). * * Returns: A D-Bus GUID. Do not free this string, it is owned by @server. * diff --git a/generated/gtkd/gio/DBusSignalInfo.d b/generated/gtkd/gio/DBusSignalInfo.d index 5e6b5957b..a5e1c31da 100644 --- a/generated/gtkd/gio/DBusSignalInfo.d +++ b/generated/gtkd/gio/DBusSignalInfo.d @@ -30,6 +30,7 @@ private import gio.c.functions; public import gio.c.types; private import glib.MemorySlice; private import glib.Str; +private import glib.c.functions; private import gobject.ObjectG; public import gtkc.giotypes; private import gtkd.Loader; diff --git a/generated/gtkd/gio/DBusUtilities.d b/generated/gtkd/gio/DBusUtilities.d index e739a0820..a89dc7849 100644 --- a/generated/gtkd/gio/DBusUtilities.d +++ b/generated/gtkd/gio/DBusUtilities.d @@ -35,6 +35,7 @@ private import glib.MemorySlice; private import glib.Str; private import glib.Variant; private import glib.VariantType; +private import glib.c.functions; private import gobject.ObjectG; private import gobject.Value; public import gtkc.giotypes; @@ -133,6 +134,9 @@ public struct DBusUtilities /** * Finishes an operation started with g_dbus_address_get_stream(). * + * A server is not required to set a GUID, so @out_guid may be set to %NULL + * even on success. + * * Params: * res = A #GAsyncResult obtained from the GAsyncReadyCallback passed to g_dbus_address_get_stream(). * outGuid = %NULL or return location to store the GUID extracted from @address, if any. @@ -171,6 +175,9 @@ public struct DBusUtilities * of the D-Bus authentication conversation. @address must be in the * [D-Bus address format](https://dbus.freedesktop.org/doc/dbus-specification.html#addresses). * + * A server is not required to set a GUID, so @out_guid may be set to %NULL + * even on success. + * * This is a synchronous failable function. See * g_dbus_address_get_stream() for the asynchronous version. * @@ -211,8 +218,14 @@ public struct DBusUtilities * Generate a D-Bus GUID that can be used with * e.g. g_dbus_connection_new(). * - * See the D-Bus specification regarding what strings are valid D-Bus - * GUID (for example, D-Bus GUIDs are not RFC-4122 compliant). + * See the + * [D-Bus specification](https://dbus.freedesktop.org/doc/dbus-specification.html#uuids) + * regarding what strings are valid D-Bus GUIDs. The specification refers to + * these as ‘UUIDs’ whereas GLib (for historical reasons) refers to them as + * ‘GUIDs’. The terms are interchangeable. + * + * Note that D-Bus GUIDs do not follow + * [RFC 4122](https://datatracker.ietf.org/doc/html/rfc4122). * * Returns: A valid D-Bus GUID. Free with g_free(). * @@ -232,23 +245,23 @@ public struct DBusUtilities * * The conversion is using the following rules: * - * - #G_TYPE_STRING: 's', 'o', 'g' or 'ay' - * - #G_TYPE_STRV: 'as', 'ao' or 'aay' - * - #G_TYPE_BOOLEAN: 'b' - * - #G_TYPE_UCHAR: 'y' - * - #G_TYPE_INT: 'i', 'n' - * - #G_TYPE_UINT: 'u', 'q' - * - #G_TYPE_INT64 'x' - * - #G_TYPE_UINT64: 't' - * - #G_TYPE_DOUBLE: 'd' - * - #G_TYPE_VARIANT: Any #GVariantType - * - * This can fail if e.g. @gvalue is of type #G_TYPE_STRING and @type - * is ['i'][G-VARIANT-TYPE-INT32:CAPS]. It will also fail for any #GType - * (including e.g. #G_TYPE_OBJECT and #G_TYPE_BOXED derived-types) not + * - `G_TYPE_STRING`: 's', 'o', 'g' or 'ay' + * - `G_TYPE_STRV`: 'as', 'ao' or 'aay' + * - `G_TYPE_BOOLEAN`: 'b' + * - `G_TYPE_UCHAR`: 'y' + * - `G_TYPE_INT`: 'i', 'n' + * - `G_TYPE_UINT`: 'u', 'q' + * - `G_TYPE_INT64`: 'x' + * - `G_TYPE_UINT64`: 't' + * - `G_TYPE_DOUBLE`: 'd' + * - `G_TYPE_VARIANT`: Any #GVariantType + * + * This can fail if e.g. @gvalue is of type %G_TYPE_STRING and @type + * is 'i', i.e. %G_VARIANT_TYPE_INT32. It will also fail for any #GType + * (including e.g. %G_TYPE_OBJECT and %G_TYPE_BOXED derived-types) not * in the table above. * - * Note that if @gvalue is of type #G_TYPE_VARIANT and its value is + * Note that if @gvalue is of type %G_TYPE_VARIANT and its value is * %NULL, the empty #GVariant instance (never %NULL) for @type is * returned (e.g. 0 for scalar types, the empty string for string types, * '/' for object path types, the empty array for any array type and so on). @@ -260,9 +273,9 @@ public struct DBusUtilities * gvalue = A #GValue to convert to a #GVariant * type = A #GVariantType * - * Returns: A #GVariant (never floating) of #GVariantType @type holding - * the data from @gvalue or %NULL in case of failure. Free with - * g_variant_unref(). + * Returns: A #GVariant (never floating) of + * #GVariantType @type holding the data from @gvalue or an empty #GVariant + * in case of failure. Free with g_variant_unref(). * * Since: 2.30 */ @@ -329,13 +342,13 @@ public struct DBusUtilities /** * Checks if @string is a D-Bus GUID. * - * See the D-Bus specification regarding what strings are valid D-Bus - * GUID (for example, D-Bus GUIDs are not RFC-4122 compliant). + * See the documentation for g_dbus_generate_guid() for more information about + * the format of a GUID. * * Params: * string_ = The string to check. * - * Returns: %TRUE if @string is a guid, %FALSE otherwise. + * Returns: %TRUE if @string is a GUID, %FALSE otherwise. * * Since: 2.26 */ diff --git a/generated/gtkd/gio/DataInputStream.d b/generated/gtkd/gio/DataInputStream.d index 93fd4d917..af72ff11a 100644 --- a/generated/gtkd/gio/DataInputStream.d +++ b/generated/gtkd/gio/DataInputStream.d @@ -34,6 +34,7 @@ private import glib.ConstructionException; private import glib.ErrorG; private import glib.GException; private import glib.Str; +private import glib.c.functions; private import gobject.ObjectG; public import gtkc.giotypes; diff --git a/generated/gtkd/gio/DebugControllerDBus.d b/generated/gtkd/gio/DebugControllerDBus.d new file mode 100644 index 000000000..db9cd73da --- /dev/null +++ b/generated/gtkd/gio/DebugControllerDBus.d @@ -0,0 +1,291 @@ +/* + * This file is part of gtkD. + * + * gtkD is free software; you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 + * of the License, or (at your option) any later version, with + * some exceptions, please read the COPYING file. + * + * gtkD is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with gtkD; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110, USA + */ + +// generated automatically - do not change +// find conversion definition on APILookup.txt +// implement new conversion functionalities on the wrap.utils pakage + + +module gio.DebugControllerDBus; + +private import gio.Cancellable; +private import gio.DBusConnection; +private import gio.DBusMethodInvocation; +private import gio.DebugControllerIF; +private import gio.DebugControllerT; +private import gio.InitableIF; +private import gio.InitableT; +private import gio.c.functions; +public import gio.c.types; +private import glib.ConstructionException; +private import glib.ErrorG; +private import glib.GException; +private import gobject.ObjectG; +private import gobject.Signals; +public import gtkc.giotypes; +private import std.algorithm; + + +/** + * #GDebugControllerDBus is an implementation of #GDebugController which exposes + * debug settings as a D-Bus object. + * + * It is a #GInitable object, and will register an object at + * `/org/gtk/Debugging` on the bus given as + * #GDebugControllerDBus:connection once it’s initialized. The object will be + * unregistered when the last reference to the #GDebugControllerDBus is dropped. + * + * This D-Bus object can be used by remote processes to enable or disable debug + * output in this process. Remote processes calling + * `org.gtk.Debugging.SetDebugEnabled()` will affect the value of + * #GDebugController:debug-enabled and, by default, g_log_get_debug_enabled(). + * default. + * + * By default, all processes will be able to call `SetDebugEnabled()`. If this + * process is privileged, or might expose sensitive information in its debug + * output, you may want to restrict the ability to enable debug output to + * privileged users or processes. + * + * One option is to install a D-Bus security policy which restricts access to + * `SetDebugEnabled()`, installing something like the following in + * `$datadir/dbus-1/system.d/`: + * |[ + * + * + * + * + * + * + * + * + * + * + * ]| + * + * This will prevent the `SetDebugEnabled()` method from being called by all + * except root. It will not prevent the `DebugEnabled` property from being read, + * as it’s accessed through the `org.freedesktop.DBus.Properties` interface. + * + * Another option is to use polkit to allow or deny requests on a case-by-case + * basis, allowing for the possibility of dynamic authorisation. To do this, + * connect to the #GDebugControllerDBus::authorize signal and query polkit in + * it: + * |[ + * g_autoptr(GError) child_error = NULL; + * g_autoptr(GDBusConnection) connection = g_bus_get_sync (G_BUS_TYPE_SYSTEM, NULL, NULL); + * gulong debug_controller_authorize_id = 0; + * + * // Set up the debug controller. + * debug_controller = G_DEBUG_CONTROLLER (g_debug_controller_dbus_new (priv->connection, NULL, &child_error)); + * if (debug_controller == NULL) + * { + * g_error ("Could not register debug controller on bus: %s"), + * child_error->message); + * } + * + * debug_controller_authorize_id = g_signal_connect (debug_controller, + * "authorize", + * G_CALLBACK (debug_controller_authorize_cb), + * self); + * + * static gboolean + * debug_controller_authorize_cb (GDebugControllerDBus *debug_controller, + * GDBusMethodInvocation *invocation, + * gpointer user_data) + * { + * g_autoptr(PolkitAuthority) authority = NULL; + * g_autoptr(PolkitSubject) subject = NULL; + * g_autoptr(PolkitAuthorizationResult) auth_result = NULL; + * g_autoptr(GError) local_error = NULL; + * GDBusMessage *message; + * GDBusMessageFlags message_flags; + * PolkitCheckAuthorizationFlags flags = POLKIT_CHECK_AUTHORIZATION_FLAGS_NONE; + * + * message = g_dbus_method_invocation_get_message (invocation); + * message_flags = g_dbus_message_get_flags (message); + * + * authority = polkit_authority_get_sync (NULL, &local_error); + * if (authority == NULL) + * { + * g_warning ("Failed to get polkit authority: %s", local_error->message); + * return FALSE; + * } + * + * if (message_flags & G_DBUS_MESSAGE_FLAGS_ALLOW_INTERACTIVE_AUTHORIZATION) + * flags |= POLKIT_CHECK_AUTHORIZATION_FLAGS_ALLOW_USER_INTERACTION; + * + * subject = polkit_system_bus_name_new (g_dbus_method_invocation_get_sender (invocation)); + * + * auth_result = polkit_authority_check_authorization_sync (authority, + * subject, + * "com.example.MyService.set-debug-enabled", + * NULL, + * flags, + * NULL, + * &local_error); + * if (auth_result == NULL) + * { + * g_warning ("Failed to get check polkit authorization: %s", local_error->message); + * return FALSE; + * } + * + * return polkit_authorization_result_get_is_authorized (auth_result); + * } + * ]| + * + * Since: 2.72 + */ +public class DebugControllerDBus : ObjectG, DebugControllerIF, InitableIF +{ + /** the main Gtk struct */ + protected GDebugControllerDBus* gDebugControllerDBus; + + /** Get the main Gtk struct */ + public GDebugControllerDBus* getDebugControllerDBusStruct(bool transferOwnership = false) + { + if (transferOwnership) + ownedRef = false; + return gDebugControllerDBus; + } + + /** the main Gtk struct as a void* */ + protected override void* getStruct() + { + return cast(void*)gDebugControllerDBus; + } + + /** + * Sets our main struct and passes it to the parent class. + */ + public this (GDebugControllerDBus* gDebugControllerDBus, bool ownedRef = false) + { + this.gDebugControllerDBus = gDebugControllerDBus; + super(cast(GObject*)gDebugControllerDBus, ownedRef); + } + + // add the DebugController capabilities + mixin DebugControllerT!(GDebugControllerDBus); + + // add the Initable capabilities + mixin InitableT!(GDebugControllerDBus); + + + /** */ + public static GType getType() + { + return g_debug_controller_dbus_get_type(); + } + + /** + * Create a new #GDebugControllerDBus and synchronously initialize it. + * + * Initializing the object will export the debug object on @connection. The + * object will remain registered until the last reference to the + * #GDebugControllerDBus is dropped. + * + * Initialization may fail if registering the object on @connection fails. + * + * Params: + * connection = a #GDBusConnection to register the debug object on + * cancellable = a #GCancellable, or %NULL + * + * Returns: a new #GDebugControllerDBus, or %NULL + * on failure + * + * Since: 2.72 + * + * Throws: GException on failure. + * Throws: ConstructionException GTK+ fails to create the object. + */ + public this(DBusConnection connection, Cancellable cancellable) + { + GError* err = null; + + auto __p = g_debug_controller_dbus_new((connection is null) ? null : connection.getDBusConnectionStruct(), (cancellable is null) ? null : cancellable.getCancellableStruct(), &err); + + if (err !is null) + { + throw new GException( new ErrorG(err) ); + } + + if(__p is null) + { + throw new ConstructionException("null returned by new"); + } + + this(cast(GDebugControllerDBus*) __p, true); + } + + /** + * Stop the debug controller, unregistering its object from the bus. + * + * Any pending method calls to the object will complete successfully, but new + * ones will return an error. This method will block until all pending + * #GDebugControllerDBus::authorize signals have been handled. This is expected + * to not take long, as it will just be waiting for threads to join. If any + * #GDebugControllerDBus::authorize signal handlers are still executing in other + * threads, this will block until after they have returned. + * + * This method will be called automatically when the final reference to the + * #GDebugControllerDBus is dropped. You may want to call it explicitly to know + * when the controller has been fully removed from the bus, or to break + * reference count cycles. + * + * Calling this method from within a #GDebugControllerDBus::authorize signal + * handler will cause a deadlock and must not be done. + * + * Since: 2.72 + */ + public void stop() + { + g_debug_controller_dbus_stop(gDebugControllerDBus); + } + + /** + * Emitted when a D-Bus peer is trying to change the debug settings and used + * to determine if that is authorized. + * + * This signal is emitted in a dedicated worker thread, so handlers are + * allowed to perform blocking I/O. This means that, for example, it is + * appropriate to call `polkit_authority_check_authorization_sync()` to check + * authorization using polkit. + * + * If %FALSE is returned then no further handlers are run and the request to + * change the debug settings is rejected. + * + * Otherwise, if %TRUE is returned, signal emission continues. If no handlers + * return %FALSE, then the debug settings are allowed to be changed. + * + * Signal handlers must not modify @invocation, or cause it to return a value. + * + * The default class handler just returns %TRUE. + * + * Params: + * invocation = A #GDBusMethodInvocation. + * + * Returns: %TRUE if the call is authorized, %FALSE otherwise. + * + * Since: 2.72 + */ + gulong addOnAuthorize(bool delegate(DBusMethodInvocation, DebugControllerDBus) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) + { + return Signals.connect(this, "authorize", dlg, connectFlags ^ ConnectFlags.SWAPPED); + } +} diff --git a/generated/gtkd/gio/DebugControllerIF.d b/generated/gtkd/gio/DebugControllerIF.d new file mode 100644 index 000000000..6f816f588 --- /dev/null +++ b/generated/gtkd/gio/DebugControllerIF.d @@ -0,0 +1,83 @@ +/* + * This file is part of gtkD. + * + * gtkD is free software; you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 + * of the License, or (at your option) any later version, with + * some exceptions, please read the COPYING file. + * + * gtkD is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with gtkD; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110, USA + */ + +// generated automatically - do not change +// find conversion definition on APILookup.txt +// implement new conversion functionalities on the wrap.utils pakage + + +module gio.DebugControllerIF; + +private import gio.c.functions; +public import gio.c.types; +public import gtkc.giotypes; + + +/** + * #GDebugController is an interface to expose control of debugging features and + * debug output. + * + * It is implemented on Linux using #GDebugControllerDBus, which exposes a D-Bus + * interface to allow authenticated peers to control debug features in this + * process. + * + * Whether debug output is enabled is exposed as + * #GDebugController:debug-enabled. This controls g_log_set_debug_enabled() by + * default. Application code may connect to the #GObject::notify signal for it + * to control other parts of its debug infrastructure as necessary. + * + * If your application or service is using the default GLib log writer function, + * creating one of the built-in implementations of #GDebugController should be + * all that’s needed to dynamically enable or disable debug output. + * + * Since: 2.72 + */ +public interface DebugControllerIF{ + /** Get the main Gtk struct */ + public GDebugController* getDebugControllerStruct(bool transferOwnership = false); + + /** the main Gtk struct as a void* */ + protected void* getStruct(); + + + /** */ + public static GType getType() + { + return g_debug_controller_get_type(); + } + + /** + * Get the value of #GDebugController:debug-enabled. + * + * Returns: %TRUE if debug output should be exposed, %FALSE otherwise + * + * Since: 2.72 + */ + public bool getDebugEnabled(); + + /** + * Set the value of #GDebugController:debug-enabled. + * + * Params: + * debugEnabled = %TRUE if debug output should be exposed, %FALSE otherwise + * + * Since: 2.72 + */ + public void setDebugEnabled(bool debugEnabled); +} diff --git a/generated/gtkd/gio/DebugControllerT.d b/generated/gtkd/gio/DebugControllerT.d new file mode 100644 index 000000000..e060046af --- /dev/null +++ b/generated/gtkd/gio/DebugControllerT.d @@ -0,0 +1,86 @@ +/* + * This file is part of gtkD. + * + * gtkD is free software; you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 + * of the License, or (at your option) any later version, with + * some exceptions, please read the COPYING file. + * + * gtkD is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with gtkD; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110, USA + */ + +// generated automatically - do not change +// find conversion definition on APILookup.txt +// implement new conversion functionalities on the wrap.utils pakage + + +module gio.DebugControllerT; + +public import gio.c.functions; +public import gio.c.types; +public import gtkc.giotypes; + + +/** + * #GDebugController is an interface to expose control of debugging features and + * debug output. + * + * It is implemented on Linux using #GDebugControllerDBus, which exposes a D-Bus + * interface to allow authenticated peers to control debug features in this + * process. + * + * Whether debug output is enabled is exposed as + * #GDebugController:debug-enabled. This controls g_log_set_debug_enabled() by + * default. Application code may connect to the #GObject::notify signal for it + * to control other parts of its debug infrastructure as necessary. + * + * If your application or service is using the default GLib log writer function, + * creating one of the built-in implementations of #GDebugController should be + * all that’s needed to dynamically enable or disable debug output. + * + * Since: 2.72 + */ +public template DebugControllerT(TStruct) +{ + /** Get the main Gtk struct */ + public GDebugController* getDebugControllerStruct(bool transferOwnership = false) + { + if (transferOwnership) + ownedRef = false; + return cast(GDebugController*)getStruct(); + } + + + /** + * Get the value of #GDebugController:debug-enabled. + * + * Returns: %TRUE if debug output should be exposed, %FALSE otherwise + * + * Since: 2.72 + */ + public bool getDebugEnabled() + { + return g_debug_controller_get_debug_enabled(getDebugControllerStruct()) != 0; + } + + /** + * Set the value of #GDebugController:debug-enabled. + * + * Params: + * debugEnabled = %TRUE if debug output should be exposed, %FALSE otherwise + * + * Since: 2.72 + */ + public void setDebugEnabled(bool debugEnabled) + { + g_debug_controller_set_debug_enabled(getDebugControllerStruct(), debugEnabled); + } +} diff --git a/generated/gtkd/gio/DesktopAppInfo.d b/generated/gtkd/gio/DesktopAppInfo.d index 1da2857af..d77e5ddda 100644 --- a/generated/gtkd/gio/DesktopAppInfo.d +++ b/generated/gtkd/gio/DesktopAppInfo.d @@ -35,6 +35,7 @@ private import glib.GException; private import glib.KeyFile; private import glib.ListG; private import glib.Str; +private import glib.c.functions; private import gobject.ObjectG; public import gtkc.giotypes; @@ -202,6 +203,13 @@ public class DesktopAppInfo : ObjectG, AppInfoIF * The algorithm for determining matches is undefined and may change at * any time. * + * None of the search results are subjected to the normal validation + * checks performed by g_desktop_app_info_new() (for example, checking that + * the executable referenced by a result exists), and so it is possible for + * g_desktop_app_info_new() to return %NULL when passed an app ID returned by + * this function. It is expected that calling code will do this when + * subsequently creating a #GDesktopAppInfo for each result. + * * Params: * searchString = the search string to use * @@ -305,7 +313,7 @@ public class DesktopAppInfo : ObjectG, AppInfoIF } /** - * Gets the generic name from the destkop file. + * Gets the generic name from the desktop file. * * Returns: The value of the GenericName key */ @@ -362,7 +370,7 @@ public class DesktopAppInfo : ObjectG, AppInfoIF /** * Gets the value of the NoDisplay key, which helps determine if the * application info should be shown in menus. See - * #G_KEY_FILE_DESKTOP_KEY_NO_DISPLAY and g_app_info_should_show(). + * %G_KEY_FILE_DESKTOP_KEY_NO_DISPLAY and g_app_info_should_show(). * * Returns: The value of the NoDisplay key * diff --git a/generated/gtkd/gio/DesktopAppInfoLookupIF.d b/generated/gtkd/gio/DesktopAppInfoLookupIF.d index f1bade3de..2e05ba506 100644 --- a/generated/gtkd/gio/DesktopAppInfoLookupIF.d +++ b/generated/gtkd/gio/DesktopAppInfoLookupIF.d @@ -69,7 +69,8 @@ public interface DesktopAppInfoLookupIF{ * Params: * uriScheme = a string containing a URI scheme. * - * Returns: #GAppInfo for given @uri_scheme or %NULL on error. + * Returns: #GAppInfo for given @uri_scheme or + * %NULL on error. */ public AppInfoIF getDefaultForUriScheme(string uriScheme); } diff --git a/generated/gtkd/gio/DesktopAppInfoLookupT.d b/generated/gtkd/gio/DesktopAppInfoLookupT.d index d7b397bd0..c0a50f4b4 100644 --- a/generated/gtkd/gio/DesktopAppInfoLookupT.d +++ b/generated/gtkd/gio/DesktopAppInfoLookupT.d @@ -66,7 +66,8 @@ public template DesktopAppInfoLookupT(TStruct) * Params: * uriScheme = a string containing a URI scheme. * - * Returns: #GAppInfo for given @uri_scheme or %NULL on error. + * Returns: #GAppInfo for given @uri_scheme or + * %NULL on error. */ public AppInfoIF getDefaultForUriScheme(string uriScheme) { diff --git a/generated/gtkd/gio/DriveIF.d b/generated/gtkd/gio/DriveIF.d index 2be31895b..a7f24a7fc 100644 --- a/generated/gtkd/gio/DriveIF.d +++ b/generated/gtkd/gio/DriveIF.d @@ -34,6 +34,7 @@ private import glib.ErrorG; private import glib.GException; private import glib.ListG; private import glib.Str; +private import glib.c.functions; private import gobject.ObjectG; private import gobject.Signals; public import gtkc.giotypes; @@ -53,7 +54,7 @@ private import std.algorithm; * * If the #GDrive reports that media isn't automatically detected, one * can poll for media; typically one should not do this periodically - * as a poll for media operation is potententially expensive and may + * as a poll for media operation is potentially expensive and may * spin up the drive creating noise. * * #GDrive supports starting and stopping drives with authentication @@ -210,7 +211,7 @@ public interface DriveIF{ /** * Gets the identifier of the given kind for @drive. The only * identifier currently available is - * #G_DRIVE_IDENTIFIER_KIND_UNIX_DEVICE. + * %G_DRIVE_IDENTIFIER_KIND_UNIX_DEVICE. * * Params: * kind = the kind of identifier to return @@ -284,9 +285,9 @@ public interface DriveIF{ public bool hasVolumes(); /** - * Checks if @drive is capabable of automatically detecting media changes. + * Checks if @drive is capable of automatically detecting media changes. * - * Returns: %TRUE if the @drive is capabable of automatically detecting + * Returns: %TRUE if the @drive is capable of automatically detecting * media changes, %FALSE otherwise. */ public bool isMediaCheckAutomatic(); diff --git a/generated/gtkd/gio/DriveT.d b/generated/gtkd/gio/DriveT.d index fda168f46..27312d64e 100644 --- a/generated/gtkd/gio/DriveT.d +++ b/generated/gtkd/gio/DriveT.d @@ -34,6 +34,7 @@ public import glib.ErrorG; public import glib.GException; public import glib.ListG; public import glib.Str; +public import glib.c.functions; public import gobject.ObjectG; public import gobject.Signals; public import gtkc.giotypes; @@ -53,7 +54,7 @@ public import std.algorithm; * * If the #GDrive reports that media isn't automatically detected, one * can poll for media; typically one should not do this periodically - * as a poll for media operation is potententially expensive and may + * as a poll for media operation is potentially expensive and may * spin up the drive creating noise. * * #GDrive supports starting and stopping drives with authentication @@ -268,7 +269,7 @@ public template DriveT(TStruct) /** * Gets the identifier of the given kind for @drive. The only * identifier currently available is - * #G_DRIVE_IDENTIFIER_KIND_UNIX_DEVICE. + * %G_DRIVE_IDENTIFIER_KIND_UNIX_DEVICE. * * Params: * kind = the kind of identifier to return @@ -386,9 +387,9 @@ public template DriveT(TStruct) } /** - * Checks if @drive is capabable of automatically detecting media changes. + * Checks if @drive is capable of automatically detecting media changes. * - * Returns: %TRUE if the @drive is capabable of automatically detecting + * Returns: %TRUE if the @drive is capable of automatically detecting * media changes, %FALSE otherwise. */ public bool isMediaCheckAutomatic() diff --git a/generated/gtkd/gio/DtlsConnectionIF.d b/generated/gtkd/gio/DtlsConnectionIF.d index 11bc14be4..14c5c5769 100644 --- a/generated/gtkd/gio/DtlsConnectionIF.d +++ b/generated/gtkd/gio/DtlsConnectionIF.d @@ -31,9 +31,12 @@ private import gio.TlsDatabase; private import gio.TlsInteraction; private import gio.c.functions; public import gio.c.types; +private import glib.ByteArray; private import glib.ErrorG; private import glib.GException; +private import glib.MemorySlice; private import glib.Str; +private import glib.c.functions; private import gobject.ObjectG; private import gobject.Signals; public import gtkc.giotypes; @@ -164,6 +167,50 @@ public interface DtlsConnectionIF{ */ public TlsCertificate getCertificate(); + /** + * Query the TLS backend for TLS channel binding data of @type for @conn. + * + * This call retrieves TLS channel binding data as specified in RFC + * [5056](https://tools.ietf.org/html/rfc5056), RFC + * [5929](https://tools.ietf.org/html/rfc5929), and related RFCs. The + * binding data is returned in @data. The @data is resized by the callee + * using #GByteArray buffer management and will be freed when the @data + * is destroyed by g_byte_array_unref(). If @data is %NULL, it will only + * check whether TLS backend is able to fetch the data (e.g. whether @type + * is supported by the TLS backend). It does not guarantee that the data + * will be available though. That could happen if TLS connection does not + * support @type or the binding data is not available yet due to additional + * negotiation or input required. + * + * Params: + * type = #GTlsChannelBindingType type of data to fetch + * data = #GByteArray is + * filled with the binding data, or %NULL + * + * Returns: %TRUE on success, %FALSE otherwise + * + * Since: 2.66 + * + * Throws: GException on failure. + */ + public bool getChannelBindingData(GTlsChannelBindingType type, out ByteArray data); + + /** + * Returns the name of the current DTLS ciphersuite, or %NULL if the + * connection has not handshaked or has been closed. Beware that the TLS + * backend may use any of multiple different naming conventions, because + * OpenSSL and GnuTLS have their own ciphersuite naming conventions that + * are different from each other and different from the standard, IANA- + * registered ciphersuite names. The ciphersuite name is intended to be + * displayed to the user for informative purposes only, and parsing it + * is not recommended. + * + * Returns: The name of the current DTLS ciphersuite, or %NULL + * + * Since: 2.70 + */ + public string getCiphersuiteName(); + /** * Gets the certificate database that @conn uses to verify * peer certificates. See g_dtls_connection_set_database(). @@ -201,8 +248,8 @@ public interface DtlsConnectionIF{ public string getNegotiatedProtocol(); /** - * Gets @conn's peer's certificate after the handshake has completed. - * (It is not set during the emission of + * Gets @conn's peer's certificate after the handshake has completed + * or failed. (It is not set during the emission of * #GDtlsConnection::accept-certificate.) * * Returns: @conn's peer's certificate, or %NULL @@ -213,8 +260,8 @@ public interface DtlsConnectionIF{ /** * Gets the errors associated with validating @conn's peer's - * certificate, after the handshake has completed. (It is not set - * during the emission of #GDtlsConnection::accept-certificate.) + * certificate, after the handshake has completed or failed. (It is + * not set during the emission of #GDtlsConnection::accept-certificate.) * * Returns: @conn's peer's certificate errors * @@ -222,6 +269,18 @@ public interface DtlsConnectionIF{ */ public GTlsCertificateFlags getPeerCertificateErrors(); + /** + * Returns the current DTLS protocol version, which may be + * %G_TLS_PROTOCOL_VERSION_UNKNOWN if the connection has not handshaked, or + * has been closed, or if the TLS backend has implemented a protocol version + * that is not a recognized #GTlsProtocolVersion. + * + * Returns: The current DTLS protocol version + * + * Since: 2.70 + */ + public GTlsProtocolVersion getProtocolVersion(); + /** * Gets @conn rehandshaking mode. See * g_dtls_connection_set_rehandshake_mode() for details. @@ -373,6 +432,9 @@ public interface DtlsConnectionIF{ * client-side connections, unless that bit is not set in * #GDtlsClientConnection:validation-flags). * + * There are nonintuitive security implications when using a non-default + * database. See #GDtlsConnection:database for details. + * * Params: * database = a #GTlsDatabase * @@ -522,6 +584,15 @@ public interface DtlsConnectionIF{ * signal handler. Otherwise, if no handler accepts the certificate, * the handshake will fail with %G_TLS_ERROR_BAD_CERTIFICATE. * + * GLib guarantees that if certificate verification fails, this signal + * will be emitted with at least one error will be set in @errors, but + * it does not guarantee that all possible errors will be set. + * Accordingly, you may not safely decide to ignore any particular + * type of error. For example, it would be incorrect to ignore + * %G_TLS_CERTIFICATE_EXPIRED if you want to allow expired + * certificates, because this could potentially be the only error flag + * set even if other problems exist with the certificate. + * * For a server-side connection, @peer_cert is the certificate * presented by the client, if this was requested via the server's * #GDtlsServerConnection:authentication_mode. On the server side, diff --git a/generated/gtkd/gio/DtlsConnectionT.d b/generated/gtkd/gio/DtlsConnectionT.d index cbc3c8dbc..c22884c7e 100644 --- a/generated/gtkd/gio/DtlsConnectionT.d +++ b/generated/gtkd/gio/DtlsConnectionT.d @@ -31,9 +31,12 @@ public import gio.TlsDatabase; public import gio.TlsInteraction; public import gio.c.functions; public import gio.c.types; +public import glib.ByteArray; public import glib.ErrorG; public import glib.GException; +public import glib.MemorySlice; public import glib.Str; +public import glib.c.functions; public import gobject.ObjectG; public import gobject.Signals; public import gtkc.giotypes; @@ -201,6 +204,71 @@ public template DtlsConnectionT(TStruct) return ObjectG.getDObject!(TlsCertificate)(cast(GTlsCertificate*) __p); } + /** + * Query the TLS backend for TLS channel binding data of @type for @conn. + * + * This call retrieves TLS channel binding data as specified in RFC + * [5056](https://tools.ietf.org/html/rfc5056), RFC + * [5929](https://tools.ietf.org/html/rfc5929), and related RFCs. The + * binding data is returned in @data. The @data is resized by the callee + * using #GByteArray buffer management and will be freed when the @data + * is destroyed by g_byte_array_unref(). If @data is %NULL, it will only + * check whether TLS backend is able to fetch the data (e.g. whether @type + * is supported by the TLS backend). It does not guarantee that the data + * will be available though. That could happen if TLS connection does not + * support @type or the binding data is not available yet due to additional + * negotiation or input required. + * + * Params: + * type = #GTlsChannelBindingType type of data to fetch + * data = #GByteArray is + * filled with the binding data, or %NULL + * + * Returns: %TRUE on success, %FALSE otherwise + * + * Since: 2.66 + * + * Throws: GException on failure. + */ + public bool getChannelBindingData(GTlsChannelBindingType type, out ByteArray data) + { + GByteArray* outdata = sliceNew!GByteArray(); + GError* err = null; + + auto __p = g_dtls_connection_get_channel_binding_data(getDtlsConnectionStruct(), type, outdata, &err) != 0; + + if (err !is null) + { + throw new GException( new ErrorG(err) ); + } + + data = new ByteArray(outdata, true); + + return __p; + } + + /** + * Returns the name of the current DTLS ciphersuite, or %NULL if the + * connection has not handshaked or has been closed. Beware that the TLS + * backend may use any of multiple different naming conventions, because + * OpenSSL and GnuTLS have their own ciphersuite naming conventions that + * are different from each other and different from the standard, IANA- + * registered ciphersuite names. The ciphersuite name is intended to be + * displayed to the user for informative purposes only, and parsing it + * is not recommended. + * + * Returns: The name of the current DTLS ciphersuite, or %NULL + * + * Since: 2.70 + */ + public string getCiphersuiteName() + { + auto retStr = g_dtls_connection_get_ciphersuite_name(getDtlsConnectionStruct()); + + scope(exit) Str.freeString(retStr); + return Str.toString(retStr); + } + /** * Gets the certificate database that @conn uses to verify * peer certificates. See g_dtls_connection_set_database(). @@ -261,8 +329,8 @@ public template DtlsConnectionT(TStruct) } /** - * Gets @conn's peer's certificate after the handshake has completed. - * (It is not set during the emission of + * Gets @conn's peer's certificate after the handshake has completed + * or failed. (It is not set during the emission of * #GDtlsConnection::accept-certificate.) * * Returns: @conn's peer's certificate, or %NULL @@ -283,8 +351,8 @@ public template DtlsConnectionT(TStruct) /** * Gets the errors associated with validating @conn's peer's - * certificate, after the handshake has completed. (It is not set - * during the emission of #GDtlsConnection::accept-certificate.) + * certificate, after the handshake has completed or failed. (It is + * not set during the emission of #GDtlsConnection::accept-certificate.) * * Returns: @conn's peer's certificate errors * @@ -295,6 +363,21 @@ public template DtlsConnectionT(TStruct) return g_dtls_connection_get_peer_certificate_errors(getDtlsConnectionStruct()); } + /** + * Returns the current DTLS protocol version, which may be + * %G_TLS_PROTOCOL_VERSION_UNKNOWN if the connection has not handshaked, or + * has been closed, or if the TLS backend has implemented a protocol version + * that is not a recognized #GTlsProtocolVersion. + * + * Returns: The current DTLS protocol version + * + * Since: 2.70 + */ + public GTlsProtocolVersion getProtocolVersion() + { + return g_dtls_connection_get_protocol_version(getDtlsConnectionStruct()); + } + /** * Gets @conn rehandshaking mode. See * g_dtls_connection_set_rehandshake_mode() for details. @@ -485,6 +568,9 @@ public template DtlsConnectionT(TStruct) * client-side connections, unless that bit is not set in * #GDtlsClientConnection:validation-flags). * + * There are nonintuitive security implications when using a non-default + * database. See #GDtlsConnection:database for details. + * * Params: * database = a #GTlsDatabase * @@ -673,6 +759,15 @@ public template DtlsConnectionT(TStruct) * signal handler. Otherwise, if no handler accepts the certificate, * the handshake will fail with %G_TLS_ERROR_BAD_CERTIFICATE. * + * GLib guarantees that if certificate verification fails, this signal + * will be emitted with at least one error will be set in @errors, but + * it does not guarantee that all possible errors will be set. + * Accordingly, you may not safely decide to ignore any particular + * type of error. For example, it would be incorrect to ignore + * %G_TLS_CERTIFICATE_EXPIRED if you want to allow expired + * certificates, because this could potentially be the only error flag + * set even if other problems exist with the certificate. + * * For a server-side connection, @peer_cert is the certificate * presented by the client, if this was requested via the server's * #GDtlsServerConnection:authentication_mode. On the server side, diff --git a/generated/gtkd/gio/FileAttributeMatcher.d b/generated/gtkd/gio/FileAttributeMatcher.d index 7e082dd5a..2e7dca0b5 100644 --- a/generated/gtkd/gio/FileAttributeMatcher.d +++ b/generated/gtkd/gio/FileAttributeMatcher.d @@ -28,6 +28,7 @@ private import gio.c.functions; public import gio.c.types; private import glib.ConstructionException; private import glib.Str; +private import glib.c.functions; private import gobject.ObjectG; public import gtkc.giotypes; private import gtkd.Loader; @@ -140,7 +141,7 @@ public class FileAttributeMatcher /** * Gets the next matched attribute from a #GFileAttributeMatcher. * - * Returns: a string containing the next attribute or %NULL if + * Returns: a string containing the next attribute or, %NULL if * no more attribute exist. */ public string enumerateNext() diff --git a/generated/gtkd/gio/FileEnumerator.d b/generated/gtkd/gio/FileEnumerator.d index 1c0bf411f..c1b7f7658 100644 --- a/generated/gtkd/gio/FileEnumerator.d +++ b/generated/gtkd/gio/FileEnumerator.d @@ -186,6 +186,9 @@ public class FileEnumerator : ObjectG * directory of @enumerator. This function is primarily intended to be used * inside loops with g_file_enumerator_next_file(). * + * To use this, %G_FILE_ATTRIBUTE_STANDARD_NAME must have been listed in the + * attributes list used when creating the #GFileEnumerator. + * * This is a convenience method that's equivalent to: * |[ * gchar *name = g_file_info_get_name (info); diff --git a/generated/gtkd/gio/FileIF.d b/generated/gtkd/gio/FileIF.d index efdc8cccb..8fb06f44c 100644 --- a/generated/gtkd/gio/FileIF.d +++ b/generated/gtkd/gio/FileIF.d @@ -44,6 +44,7 @@ private import glib.ConstructionException; private import glib.ErrorG; private import glib.GException; private import glib.Str; +private import glib.c.functions; private import gobject.ObjectG; public import gtkc.giotypes; @@ -173,7 +174,7 @@ public interface FileIF{ * If the file doesn't already exist it is created. * * By default files created are generally readable by everyone, - * but if you pass #G_FILE_CREATE_PRIVATE in @flags the file + * but if you pass %G_FILE_CREATE_PRIVATE in @flags the file * will be made readable only to the current user, to the level that * is supported on the target filesystem. * @@ -235,18 +236,43 @@ public interface FileIF{ */ public FileOutputStream appendToFinish(AsyncResultIF res); + /** + * Prepares the file attribute query string for copying to @file. + * + * This function prepares an attribute query string to be + * passed to g_file_query_info() to get a list of attributes + * normally copied with the file (see g_file_copy_attributes() + * for the detailed description). This function is used by the + * implementation of g_file_copy_attributes() and is useful + * when one needs to query and set the attributes in two + * stages (e.g., for recursive move of a directory). + * + * Params: + * flags = a set of #GFileCopyFlags + * cancellable = optional #GCancellable object, + * %NULL to ignore + * + * Returns: an attribute query string for g_file_query_info(), + * or %NULL if an error occurs. + * + * Since: 2.68 + * + * Throws: GException on failure. + */ + public string buildAttributeListForCopy(GFileCopyFlags flags, Cancellable cancellable); + /** * Copies the file @source to the location specified by @destination. * Can not handle recursive copies of directories. * - * If the flag #G_FILE_COPY_OVERWRITE is specified an already + * If the flag %G_FILE_COPY_OVERWRITE is specified an already * existing @destination file is overwritten. * - * If the flag #G_FILE_COPY_NOFOLLOW_SYMLINKS is specified then symlinks + * If the flag %G_FILE_COPY_NOFOLLOW_SYMLINKS is specified then symlinks * will be copied as symlinks, otherwise the target of the * @source symlink will be copied. * - * If the flag #G_FILE_COPY_ALL_METADATA is specified then all the metadata + * If the flag %G_FILE_COPY_ALL_METADATA is specified then all the metadata * that is possible to copy is copied, not just the default subset (which, * for instance, does not include the owner, see #GFileInfo). * @@ -263,7 +289,7 @@ public interface FileIF{ * If the @source file does not exist, then the %G_IO_ERROR_NOT_FOUND error * is returned, independent on the status of the @destination. * - * If #G_FILE_COPY_OVERWRITE is not specified and the target exists, then + * If %G_FILE_COPY_OVERWRITE is not specified and the target exists, then * the error %G_IO_ERROR_EXISTS is returned. * * If trying to overwrite a file over a directory, the %G_IO_ERROR_IS_DIRECTORY @@ -271,7 +297,7 @@ public interface FileIF{ * %G_IO_ERROR_WOULD_MERGE error is returned. * * If the source is a directory and the target does not exist, or - * #G_FILE_COPY_OVERWRITE is specified and the target is a file, then the + * %G_FILE_COPY_OVERWRITE is specified and the target is a file, then the * %G_IO_ERROR_WOULD_RECURSE error is returned. * * If you are interested in copying the #GFile object itself (not the on-disk @@ -324,7 +350,7 @@ public interface FileIF{ * Normally only a subset of the file attributes are copied, * those that are copies in a normal file copy operation * (which for instance does not include e.g. owner). However - * if #G_FILE_COPY_ALL_METADATA is specified in @flags, then + * if %G_FILE_COPY_ALL_METADATA is specified in @flags, then * all the metadata that is possible to copy is copied. This * is useful when implementing move by copy + delete source. * @@ -358,7 +384,7 @@ public interface FileIF{ * The file must not already exist. * * By default files created are generally readable by everyone, - * but if you pass #G_FILE_CREATE_PRIVATE in @flags the file + * but if you pass %G_FILE_CREATE_PRIVATE in @flags the file * will be made readable only to the current user, to the level * that is supported on the target filesystem. * @@ -428,7 +454,7 @@ public interface FileIF{ * writing to it. The file must not already exist. * * By default files created are generally readable by everyone, - * but if you pass #G_FILE_CREATE_PRIVATE in @flags the file + * but if you pass %G_FILE_CREATE_PRIVATE in @flags the file * will be made readable only to the current user, to the level * that is supported on the target filesystem. * @@ -508,6 +534,21 @@ public interface FileIF{ * Deletes a file. If the @file is a directory, it will only be * deleted if it is empty. This has the same semantics as g_unlink(). * + * If @file doesn’t exist, %G_IO_ERROR_NOT_FOUND will be returned. This allows + * for deletion to be implemented avoiding + * [time-of-check to time-of-use races](https://en.wikipedia.org/wiki/Time-of-check_to_time-of-use): + * |[ + * g_autoptr(GError) local_error = NULL; + * if (!g_file_delete (my_file, my_cancellable, &local_error) && + * !g_error_matches (local_error, G_IO_ERROR, G_IO_ERROR_NOT_FOUND)) + * { + * // deletion failed for some reason other than the file not existing: + * // so report the error + * g_warning ("Failed to delete %s: %s", + * g_file_peek_path (my_file), local_error->message); + * } + * ]| + * * If @cancellable is not %NULL, then the operation can be cancelled by * triggering the cancellable object from another thread. If the operation * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. @@ -663,7 +704,9 @@ public interface FileIF{ * "standard::*" means all attributes in the standard namespace. * An example attribute query be "standard::*,owner::user". * The standard attributes are available as defines, like - * #G_FILE_ATTRIBUTE_STANDARD_NAME. + * %G_FILE_ATTRIBUTE_STANDARD_NAME. %G_FILE_ATTRIBUTE_STANDARD_NAME should + * always be specified if you plan to call g_file_enumerator_get_child() or + * g_file_enumerator_iterate() on the returned enumerator. * * If @cancellable is not %NULL, then the operation can be cancelled * by triggering the cancellable object from another thread. If the @@ -925,7 +968,8 @@ public interface FileIF{ * * This call does no blocking I/O. * - * Returns: a string containing the #GFile's URI. + * Returns: a string containing the #GFile's URI. If the #GFile was constructed + * with an invalid URI, an invalid URI is returned. * The returned string should be freed with g_free() * when no longer needed. */ @@ -939,11 +983,14 @@ public interface FileIF{ * ]| * Common schemes include "file", "http", "ftp", etc. * + * The scheme can be different from the one used to construct the #GFile, + * in that it might be replaced with one that is logically equivalent to the #GFile. + * * This call does no blocking I/O. * * Returns: a string containing the URI scheme for the given - * #GFile. The returned string should be freed with g_free() - * when no longer needed. + * #GFile or %NULL if the #GFile was constructed with an invalid URI. The + * returned string should be freed with g_free() when no longer needed. */ public string getUriScheme(); @@ -1558,7 +1605,7 @@ public interface FileIF{ * implementation may support moving directories (for instance on moves * inside the same filesystem), but the fallback code does not. * - * If the flag #G_FILE_COPY_OVERWRITE is specified an already + * If the flag %G_FILE_COPY_OVERWRITE is specified an already * existing @destination file is overwritten. * * If @cancellable is not %NULL, then the operation can be cancelled by @@ -1574,7 +1621,7 @@ public interface FileIF{ * If the @source file does not exist, then the %G_IO_ERROR_NOT_FOUND * error is returned, independent on the status of the @destination. * - * If #G_FILE_COPY_OVERWRITE is not specified and the target exists, + * If %G_FILE_COPY_OVERWRITE is not specified and the target exists, * then the error %G_IO_ERROR_EXISTS is returned. * * If trying to overwrite a file over a directory, the %G_IO_ERROR_IS_DIRECTORY @@ -1582,7 +1629,7 @@ public interface FileIF{ * %G_IO_ERROR_WOULD_MERGE error is returned. * * If the source is a directory and the target does not exist, or - * #G_FILE_COPY_OVERWRITE is specified and the target is a file, then + * %G_FILE_COPY_OVERWRITE is specified and the target is a file, then * the %G_IO_ERROR_WOULD_RECURSE error may be returned (if the native * move operation isn't available). * @@ -1602,6 +1649,50 @@ public interface FileIF{ */ public bool move(FileIF destination, GFileCopyFlags flags, Cancellable cancellable, GFileProgressCallback progressCallback, void* progressCallbackData); + /** + * Asynchronously moves a file @source to the location of @destination. For details of the behaviour, see g_file_move(). + * + * If @progress_callback is not %NULL, then that function that will be called + * just like in g_file_move(). The callback will run in the default main context + * of the thread calling g_file_move_async() — the same context as @callback is + * run in. + * + * When the operation is finished, @callback will be called. You can then call + * g_file_move_finish() to get the result of the operation. + * + * Params: + * destination = #GFile pointing to the destination location + * flags = set of #GFileCopyFlags + * ioPriority = the [I/O priority][io-priority] of the request + * cancellable = optional #GCancellable object, + * %NULL to ignore + * progressCallback = #GFileProgressCallback + * function for updates + * progressCallbackData = gpointer to user data for + * the callback function + * callback = a #GAsyncReadyCallback to call + * when the request is satisfied + * userData = the data to pass to callback function + * + * Since: 2.72 + */ + public void moveAsync(FileIF destination, GFileCopyFlags flags, int ioPriority, Cancellable cancellable, GFileProgressCallback progressCallback, void* progressCallbackData, GAsyncReadyCallback callback, void* userData); + + /** + * Finishes an asynchronous file movement, started with + * g_file_move_async(). + * + * Params: + * result = a #GAsyncResult + * + * Returns: %TRUE on successful file move, %FALSE otherwise. + * + * Since: 2.72 + * + * Throws: GException on failure. + */ + public bool moveFinish(AsyncResultIF result); + /** * Opens an existing file for reading and writing. The result is * a #GFileIOStream that can be used to read and write the contents @@ -1687,7 +1778,7 @@ public interface FileIF{ public string peekPath(); /** - * Polls a file of type #G_FILE_TYPE_MOUNTABLE. + * Polls a file of type %G_FILE_TYPE_MOUNTABLE. * * If @cancellable is not %NULL, then the operation can be cancelled by * triggering the cancellable object from another thread. If the operation @@ -1818,7 +1909,7 @@ public interface FileIF{ * cancellable = optional #GCancellable object, * %NULL to ignore * - * Returns: The #GFileType of the file and #G_FILE_TYPE_UNKNOWN + * Returns: The #GFileType of the file and %G_FILE_TYPE_UNKNOWN * if the file does not exist * * Since: 2.18 @@ -1839,9 +1930,9 @@ public interface FileIF{ * attributes, and a wildcard like "filesystem::*" means all attributes * in the filesystem namespace. The standard namespace for filesystem * attributes is "filesystem". Common attributes of interest are - * #G_FILE_ATTRIBUTE_FILESYSTEM_SIZE (the total size of the filesystem - * in bytes), #G_FILE_ATTRIBUTE_FILESYSTEM_FREE (number of bytes available), - * and #G_FILE_ATTRIBUTE_FILESYSTEM_TYPE (type of the filesystem). + * %G_FILE_ATTRIBUTE_FILESYSTEM_SIZE (the total size of the filesystem + * in bytes), %G_FILE_ATTRIBUTE_FILESYSTEM_FREE (number of bytes available), + * and %G_FILE_ATTRIBUTE_FILESYSTEM_TYPE (type of the filesystem). * * If @cancellable is not %NULL, then the operation can be cancelled * by triggering the cancellable object from another thread. If the @@ -1917,7 +2008,7 @@ public interface FileIF{ * "standard::*" means all attributes in the standard namespace. * An example attribute query be "standard::*,owner::user". * The standard attributes are available as defines, like - * #G_FILE_ATTRIBUTE_STANDARD_NAME. + * %G_FILE_ATTRIBUTE_STANDARD_NAME. * * If @cancellable is not %NULL, then the operation can be cancelled * by triggering the cancellable object from another thread. If the @@ -1926,7 +2017,7 @@ public interface FileIF{ * * For symlinks, normally the information about the target of the * symlink is returned, rather than information about the symlink - * itself. However if you pass #G_FILE_QUERY_INFO_NOFOLLOW_SYMLINKS + * itself. However if you pass %G_FILE_QUERY_INFO_NOFOLLOW_SYMLINKS * in @flags the information about the symlink itself will be returned. * Also, for symlinks that point to non-existing files the information * about the symlink itself will be returned. @@ -2100,7 +2191,7 @@ public interface FileIF{ * the destination when the stream is closed. * * By default files created are generally readable by everyone, - * but if you pass #G_FILE_CREATE_PRIVATE in @flags the file + * but if you pass %G_FILE_CREATE_PRIVATE in @flags the file * will be made readable only to the current user, to the level that * is supported on the target filesystem. * @@ -2371,12 +2462,13 @@ public interface FileIF{ * * This call does no blocking I/O. * + * If the @relative_path is an absolute path name, the resolution + * is done absolutely (without taking @file path as base). + * * Params: * relativePath = a given relative path string * - * Returns: #GFile to the resolved path. - * %NULL if @relative_path is %NULL or if @file is invalid. - * Free the returned object with g_object_unref(). + * Returns: a #GFile for the resolved path. */ public FileIF resolveRelativePath(string relativePath); @@ -2603,7 +2695,7 @@ public interface FileIF{ * for the target filesystem if possible and the @file is renamed to this. * * If you want to implement a rename operation in the user interface the - * edit name (#G_FILE_ATTRIBUTE_STANDARD_EDIT_NAME) should be used as the + * edit name (%G_FILE_ATTRIBUTE_STANDARD_EDIT_NAME) should be used as the * initial value in the rename widget, and then the result after editing * should be passed to g_file_set_display_name(). * @@ -2662,7 +2754,7 @@ public interface FileIF{ public FileIF setDisplayNameFinish(AsyncResultIF res); /** - * Starts a file of type #G_FILE_TYPE_MOUNTABLE. + * Starts a file of type %G_FILE_TYPE_MOUNTABLE. * Using @start_operation, you can request callbacks when, for instance, * passwords are needed during authentication. * @@ -2704,7 +2796,7 @@ public interface FileIF{ public bool startMountableFinish(AsyncResultIF result); /** - * Stops a file of type #G_FILE_TYPE_MOUNTABLE. + * Stops a file of type %G_FILE_TYPE_MOUNTABLE. * * If @cancellable is not %NULL, then the operation can be cancelled by * triggering the cancellable object from another thread. If the operation @@ -2762,7 +2854,9 @@ public interface FileIF{ * Sends @file to the "Trashcan", if possible. This is similar to * deleting it, but the user can recover it before emptying the trashcan. * Not all file systems support trashing, so this call can return the - * %G_IO_ERROR_NOT_SUPPORTED error. + * %G_IO_ERROR_NOT_SUPPORTED error. Since GLib 2.66, the `x-gvfs-notrash` unix + * mount option can be used to disable g_file_trash() support for certain + * mounts, the %G_IO_ERROR_NOT_SUPPORTED error will be returned in that case. * * If @cancellable is not %NULL, then the operation can be cancelled by * triggering the cancellable object from another thread. If the operation @@ -2851,7 +2945,7 @@ public interface FileIF{ public bool unmountMountableFinish(AsyncResultIF result); /** - * Unmounts a file of type #G_FILE_TYPE_MOUNTABLE. + * Unmounts a file of type %G_FILE_TYPE_MOUNTABLE. * * If @cancellable is not %NULL, then the operation can be cancelled by * triggering the cancellable object from another thread. If the operation diff --git a/generated/gtkd/gio/FileIOStream.d b/generated/gtkd/gio/FileIOStream.d index d61764c02..7b8efc4cc 100644 --- a/generated/gtkd/gio/FileIOStream.d +++ b/generated/gtkd/gio/FileIOStream.d @@ -35,6 +35,7 @@ public import gio.c.types; private import glib.ErrorG; private import glib.GException; private import glib.Str; +private import glib.c.functions; private import gobject.ObjectG; public import gtkc.giotypes; diff --git a/generated/gtkd/gio/FileIcon.d b/generated/gtkd/gio/FileIcon.d index 5721f9508..62770a299 100644 --- a/generated/gtkd/gio/FileIcon.d +++ b/generated/gtkd/gio/FileIcon.d @@ -107,7 +107,7 @@ public class FileIcon : ObjectG, IconIF, LoadableIconIF /** * Gets the #GFile associated with the given @icon. * - * Returns: a #GFile, or %NULL. + * Returns: a #GFile. */ public FileIF getFile() { diff --git a/generated/gtkd/gio/FileInfo.d b/generated/gtkd/gio/FileInfo.d index 65e9fc164..ba1af774f 100644 --- a/generated/gtkd/gio/FileInfo.d +++ b/generated/gtkd/gio/FileInfo.d @@ -33,6 +33,7 @@ private import glib.DateTime; private import glib.MemorySlice; private import glib.Str; private import glib.TimeVal; +private import glib.c.functions; private import gobject.ObjectG; public import gtkc.giotypes; @@ -60,6 +61,11 @@ public import gtkc.giotypes; * g_file_query_writable_namespaces() to discover the settable attributes * of a particular file at runtime. * + * The direct accessors, such as g_file_info_get_name(), are slightly more + * optimized than the generic attribute accessors, such as + * g_file_info_get_attribute_byte_string().This optimization will matter + * only if calling the API in a tight loop. + * * #GFileAttributeMatcher allows for searching through a #GFileInfo for * attributes. */ @@ -155,7 +161,31 @@ public class FileInfo : ObjectG } /** - * Gets the value of a attribute, formated as a string. + * Gets the access time of the current @info and returns it as a + * #GDateTime. + * + * This requires the %G_FILE_ATTRIBUTE_TIME_ACCESS attribute. If + * %G_FILE_ATTRIBUTE_TIME_ACCESS_USEC is provided, the resulting #GDateTime + * will have microsecond precision. + * + * Returns: access time, or %NULL if unknown + * + * Since: 2.70 + */ + public DateTime getAccessDateTime() + { + auto __p = g_file_info_get_access_date_time(gFileInfo); + + if(__p is null) + { + return null; + } + + return new DateTime(cast(GDateTime*) __p, true); + } + + /** + * Gets the value of a attribute, formatted as a string. * This escapes things as needed to make the string valid * UTF-8. * @@ -258,8 +288,8 @@ public class FileInfo : ObjectG * Params: * attribute = a file attribute key. * - * Returns: a #GObject associated with the given @attribute, or - * %NULL otherwise. + * Returns: a #GObject associated with the given @attribute, + * or %NULL otherwise. */ public ObjectG getAttributeObject(string attribute) { @@ -294,8 +324,8 @@ public class FileInfo : ObjectG * Params: * attribute = a file attribute key. * - * Returns: the contents of the @attribute value as a UTF-8 string, or - * %NULL otherwise. + * Returns: the contents of the @attribute value as a UTF-8 string, + * or %NULL otherwise. */ public string getAttributeString(string attribute) { @@ -309,8 +339,8 @@ public class FileInfo : ObjectG * Params: * attribute = a file attribute key. * - * Returns: the contents of the @attribute value as a stringv, or - * %NULL otherwise. Do not free. These returned strings are UTF-8. + * Returns: the contents of the @attribute value as a stringv, + * or %NULL otherwise. Do not free. These returned strings are UTF-8. * * Since: 2.22 */ @@ -366,13 +396,38 @@ public class FileInfo : ObjectG /** * Gets the file's content type. * - * Returns: a string containing the file's content type. + * Returns: a string containing the file's content type, + * or %NULL if unknown. */ public string getContentType() { return Str.toString(g_file_info_get_content_type(gFileInfo)); } + /** + * Gets the creation time of the current @info and returns it as a + * #GDateTime. + * + * This requires the %G_FILE_ATTRIBUTE_TIME_CREATED attribute. If + * %G_FILE_ATTRIBUTE_TIME_CREATED_USEC is provided, the resulting #GDateTime + * will have microsecond precision. + * + * Returns: creation time, or %NULL if unknown + * + * Since: 2.70 + */ + public DateTime getCreationDateTime() + { + auto __p = g_file_info_get_creation_date_time(gFileInfo); + + if(__p is null) + { + return null; + } + + return new DateTime(cast(GDateTime*) __p, true); + } + /** * Returns the #GDateTime representing the deletion date of the file, as * available in G_FILE_ATTRIBUTE_TRASH_DELETION_DATE. If the @@ -395,7 +450,7 @@ public class FileInfo : ObjectG } /** - * Gets a display name for a file. + * Gets a display name for a file. This is guaranteed to always be set. * * Returns: a string containing the display name. */ @@ -527,7 +582,7 @@ public class FileInfo : ObjectG } /** - * Gets the name for a file. + * Gets the name for a file. This is guaranteed to always be set. * * Returns: a string containing the file name. */ @@ -537,9 +592,11 @@ public class FileInfo : ObjectG } /** - * Gets the file's size. + * Gets the file's size (in bytes). The size is retrieved through the value of + * the %G_FILE_ATTRIBUTE_STANDARD_SIZE attribute and is converted + * from #guint64 to #goffset before returning the result. * - * Returns: a #goffset containing the file's size. + * Returns: a #goffset containing the file's size (in bytes). */ public long getSize() { @@ -647,6 +704,21 @@ public class FileInfo : ObjectG g_file_info_remove_attribute(gFileInfo, Str.toStringz(attribute)); } + /** + * Sets the %G_FILE_ATTRIBUTE_TIME_ACCESS and + * %G_FILE_ATTRIBUTE_TIME_ACCESS_USEC attributes in the file info to the + * given date/time value. + * + * Params: + * atime = a #GDateTime. + * + * Since: 2.70 + */ + public void setAccessDateTime(DateTime atime) + { + g_file_info_set_access_date_time(gFileInfo, (atime is null) ? null : atime.getDateTimeStruct()); + } + /** * Sets the @attribute to contain the given value, if possible. To unset the * attribute, use %G_FILE_ATTRIBUTE_TYPE_INVALID for @type. @@ -825,6 +897,21 @@ public class FileInfo : ObjectG g_file_info_set_content_type(gFileInfo, Str.toStringz(contentType)); } + /** + * Sets the %G_FILE_ATTRIBUTE_TIME_CREATED and + * %G_FILE_ATTRIBUTE_TIME_CREATED_USEC attributes in the file info to the + * given date/time value. + * + * Params: + * creationTime = a #GDateTime. + * + * Since: 2.70 + */ + public void setCreationDateTime(DateTime creationTime) + { + g_file_info_set_creation_date_time(gFileInfo, (creationTime is null) ? null : creationTime.getDateTimeStruct()); + } + /** * Sets the display name for the current #GFileInfo. * See %G_FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME. diff --git a/generated/gtkd/gio/FileMonitor.d b/generated/gtkd/gio/FileMonitor.d index 9645ec5c0..c5d95eb9a 100644 --- a/generated/gtkd/gio/FileMonitor.d +++ b/generated/gtkd/gio/FileMonitor.d @@ -161,7 +161,7 @@ public class FileMonitor : ObjectG * that the %G_FILE_MONITOR_WATCH_MOVES flag is not in use. * * If using the deprecated flag %G_FILE_MONITOR_SEND_MOVED flag and @event_type is - * #G_FILE_MONITOR_EVENT_MOVED, @file will be set to a #GFile containing the + * %G_FILE_MONITOR_EVENT_MOVED, @file will be set to a #GFile containing the * old path, and @other_file will be set to a #GFile containing the new path. * * In all the other cases, @other_file will be set to #NULL. diff --git a/generated/gtkd/gio/FileOutputStream.d b/generated/gtkd/gio/FileOutputStream.d index f20eb9322..27af3a4af 100644 --- a/generated/gtkd/gio/FileOutputStream.d +++ b/generated/gtkd/gio/FileOutputStream.d @@ -35,6 +35,7 @@ public import gio.c.types; private import glib.ErrorG; private import glib.GException; private import glib.Str; +private import glib.c.functions; private import gobject.ObjectG; public import gtkc.giotypes; diff --git a/generated/gtkd/gio/FileT.d b/generated/gtkd/gio/FileT.d index 332791d86..c25979c57 100644 --- a/generated/gtkd/gio/FileT.d +++ b/generated/gtkd/gio/FileT.d @@ -44,6 +44,7 @@ public import glib.ConstructionException; public import glib.ErrorG; public import glib.GException; public import glib.Str; +public import glib.c.functions; public import gobject.ObjectG; public import gtkc.giotypes; @@ -147,7 +148,7 @@ public template FileT(TStruct) * If the file doesn't already exist it is created. * * By default files created are generally readable by everyone, - * but if you pass #G_FILE_CREATE_PRIVATE in @flags the file + * but if you pass %G_FILE_CREATE_PRIVATE in @flags the file * will be made readable only to the current user, to the level that * is supported on the target filesystem. * @@ -246,18 +247,56 @@ public template FileT(TStruct) return ObjectG.getDObject!(FileOutputStream)(cast(GFileOutputStream*) __p, true); } + /** + * Prepares the file attribute query string for copying to @file. + * + * This function prepares an attribute query string to be + * passed to g_file_query_info() to get a list of attributes + * normally copied with the file (see g_file_copy_attributes() + * for the detailed description). This function is used by the + * implementation of g_file_copy_attributes() and is useful + * when one needs to query and set the attributes in two + * stages (e.g., for recursive move of a directory). + * + * Params: + * flags = a set of #GFileCopyFlags + * cancellable = optional #GCancellable object, + * %NULL to ignore + * + * Returns: an attribute query string for g_file_query_info(), + * or %NULL if an error occurs. + * + * Since: 2.68 + * + * Throws: GException on failure. + */ + public string buildAttributeListForCopy(GFileCopyFlags flags, Cancellable cancellable) + { + GError* err = null; + + auto retStr = g_file_build_attribute_list_for_copy(getFileStruct(), flags, (cancellable is null) ? null : cancellable.getCancellableStruct(), &err); + + if (err !is null) + { + throw new GException( new ErrorG(err) ); + } + + scope(exit) Str.freeString(retStr); + return Str.toString(retStr); + } + /** * Copies the file @source to the location specified by @destination. * Can not handle recursive copies of directories. * - * If the flag #G_FILE_COPY_OVERWRITE is specified an already + * If the flag %G_FILE_COPY_OVERWRITE is specified an already * existing @destination file is overwritten. * - * If the flag #G_FILE_COPY_NOFOLLOW_SYMLINKS is specified then symlinks + * If the flag %G_FILE_COPY_NOFOLLOW_SYMLINKS is specified then symlinks * will be copied as symlinks, otherwise the target of the * @source symlink will be copied. * - * If the flag #G_FILE_COPY_ALL_METADATA is specified then all the metadata + * If the flag %G_FILE_COPY_ALL_METADATA is specified then all the metadata * that is possible to copy is copied, not just the default subset (which, * for instance, does not include the owner, see #GFileInfo). * @@ -274,7 +313,7 @@ public template FileT(TStruct) * If the @source file does not exist, then the %G_IO_ERROR_NOT_FOUND error * is returned, independent on the status of the @destination. * - * If #G_FILE_COPY_OVERWRITE is not specified and the target exists, then + * If %G_FILE_COPY_OVERWRITE is not specified and the target exists, then * the error %G_IO_ERROR_EXISTS is returned. * * If trying to overwrite a file over a directory, the %G_IO_ERROR_IS_DIRECTORY @@ -282,7 +321,7 @@ public template FileT(TStruct) * %G_IO_ERROR_WOULD_MERGE error is returned. * * If the source is a directory and the target does not exist, or - * #G_FILE_COPY_OVERWRITE is specified and the target is a file, then the + * %G_FILE_COPY_OVERWRITE is specified and the target is a file, then the * %G_IO_ERROR_WOULD_RECURSE error is returned. * * If you are interested in copying the #GFile object itself (not the on-disk @@ -350,7 +389,7 @@ public template FileT(TStruct) * Normally only a subset of the file attributes are copied, * those that are copies in a normal file copy operation * (which for instance does not include e.g. owner). However - * if #G_FILE_COPY_ALL_METADATA is specified in @flags, then + * if %G_FILE_COPY_ALL_METADATA is specified in @flags, then * all the metadata that is possible to copy is copied. This * is useful when implementing move by copy + delete source. * @@ -408,7 +447,7 @@ public template FileT(TStruct) * The file must not already exist. * * By default files created are generally readable by everyone, - * but if you pass #G_FILE_CREATE_PRIVATE in @flags the file + * but if you pass %G_FILE_CREATE_PRIVATE in @flags the file * will be made readable only to the current user, to the level * that is supported on the target filesystem. * @@ -515,7 +554,7 @@ public template FileT(TStruct) * writing to it. The file must not already exist. * * By default files created are generally readable by everyone, - * but if you pass #G_FILE_CREATE_PRIVATE in @flags the file + * but if you pass %G_FILE_CREATE_PRIVATE in @flags the file * will be made readable only to the current user, to the level * that is supported on the target filesystem. * @@ -632,6 +671,21 @@ public template FileT(TStruct) * Deletes a file. If the @file is a directory, it will only be * deleted if it is empty. This has the same semantics as g_unlink(). * + * If @file doesn’t exist, %G_IO_ERROR_NOT_FOUND will be returned. This allows + * for deletion to be implemented avoiding + * [time-of-check to time-of-use races](https://en.wikipedia.org/wiki/Time-of-check_to_time-of-use): + * |[ + * g_autoptr(GError) local_error = NULL; + * if (!g_file_delete (my_file, my_cancellable, &local_error) && + * !g_error_matches (local_error, G_IO_ERROR, G_IO_ERROR_NOT_FOUND)) + * { + * // deletion failed for some reason other than the file not existing: + * // so report the error + * g_warning ("Failed to delete %s: %s", + * g_file_peek_path (my_file), local_error->message); + * } + * ]| + * * If @cancellable is not %NULL, then the operation can be cancelled by * triggering the cancellable object from another thread. If the operation * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. @@ -854,7 +908,9 @@ public template FileT(TStruct) * "standard::*" means all attributes in the standard namespace. * An example attribute query be "standard::*,owner::user". * The standard attributes are available as defines, like - * #G_FILE_ATTRIBUTE_STANDARD_NAME. + * %G_FILE_ATTRIBUTE_STANDARD_NAME. %G_FILE_ATTRIBUTE_STANDARD_NAME should + * always be specified if you plan to call g_file_enumerator_get_child() or + * g_file_enumerator_iterate() on the returned enumerator. * * If @cancellable is not %NULL, then the operation can be cancelled * by triggering the cancellable object from another thread. If the @@ -1254,7 +1310,8 @@ public template FileT(TStruct) * * This call does no blocking I/O. * - * Returns: a string containing the #GFile's URI. + * Returns: a string containing the #GFile's URI. If the #GFile was constructed + * with an invalid URI, an invalid URI is returned. * The returned string should be freed with g_free() * when no longer needed. */ @@ -1274,11 +1331,14 @@ public template FileT(TStruct) * ]| * Common schemes include "file", "http", "ftp", etc. * + * The scheme can be different from the one used to construct the #GFile, + * in that it might be replaced with one that is logically equivalent to the #GFile. + * * This call does no blocking I/O. * * Returns: a string containing the URI scheme for the given - * #GFile. The returned string should be freed with g_free() - * when no longer needed. + * #GFile or %NULL if the #GFile was constructed with an invalid URI. The + * returned string should be freed with g_free() when no longer needed. */ public string getUriScheme() { @@ -2181,7 +2241,7 @@ public template FileT(TStruct) * implementation may support moving directories (for instance on moves * inside the same filesystem), but the fallback code does not. * - * If the flag #G_FILE_COPY_OVERWRITE is specified an already + * If the flag %G_FILE_COPY_OVERWRITE is specified an already * existing @destination file is overwritten. * * If @cancellable is not %NULL, then the operation can be cancelled by @@ -2197,7 +2257,7 @@ public template FileT(TStruct) * If the @source file does not exist, then the %G_IO_ERROR_NOT_FOUND * error is returned, independent on the status of the @destination. * - * If #G_FILE_COPY_OVERWRITE is not specified and the target exists, + * If %G_FILE_COPY_OVERWRITE is not specified and the target exists, * then the error %G_IO_ERROR_EXISTS is returned. * * If trying to overwrite a file over a directory, the %G_IO_ERROR_IS_DIRECTORY @@ -2205,7 +2265,7 @@ public template FileT(TStruct) * %G_IO_ERROR_WOULD_MERGE error is returned. * * If the source is a directory and the target does not exist, or - * #G_FILE_COPY_OVERWRITE is specified and the target is a file, then + * %G_FILE_COPY_OVERWRITE is specified and the target is a file, then * the %G_IO_ERROR_WOULD_RECURSE error may be returned (if the native * move operation isn't available). * @@ -2237,6 +2297,65 @@ public template FileT(TStruct) return __p; } + /** + * Asynchronously moves a file @source to the location of @destination. For details of the behaviour, see g_file_move(). + * + * If @progress_callback is not %NULL, then that function that will be called + * just like in g_file_move(). The callback will run in the default main context + * of the thread calling g_file_move_async() — the same context as @callback is + * run in. + * + * When the operation is finished, @callback will be called. You can then call + * g_file_move_finish() to get the result of the operation. + * + * Params: + * destination = #GFile pointing to the destination location + * flags = set of #GFileCopyFlags + * ioPriority = the [I/O priority][io-priority] of the request + * cancellable = optional #GCancellable object, + * %NULL to ignore + * progressCallback = #GFileProgressCallback + * function for updates + * progressCallbackData = gpointer to user data for + * the callback function + * callback = a #GAsyncReadyCallback to call + * when the request is satisfied + * userData = the data to pass to callback function + * + * Since: 2.72 + */ + public void moveAsync(FileIF destination, GFileCopyFlags flags, int ioPriority, Cancellable cancellable, GFileProgressCallback progressCallback, void* progressCallbackData, GAsyncReadyCallback callback, void* userData) + { + g_file_move_async(getFileStruct(), (destination is null) ? null : destination.getFileStruct(), flags, ioPriority, (cancellable is null) ? null : cancellable.getCancellableStruct(), progressCallback, progressCallbackData, callback, userData); + } + + /** + * Finishes an asynchronous file movement, started with + * g_file_move_async(). + * + * Params: + * result = a #GAsyncResult + * + * Returns: %TRUE on successful file move, %FALSE otherwise. + * + * Since: 2.72 + * + * Throws: GException on failure. + */ + public bool moveFinish(AsyncResultIF result) + { + GError* err = null; + + auto __p = g_file_move_finish(getFileStruct(), (result is null) ? null : result.getAsyncResultStruct(), &err) != 0; + + if (err !is null) + { + throw new GException( new ErrorG(err) ); + } + + return __p; + } + /** * Opens an existing file for reading and writing. The result is * a #GFileIOStream that can be used to read and write the contents @@ -2362,7 +2481,7 @@ public template FileT(TStruct) } /** - * Polls a file of type #G_FILE_TYPE_MOUNTABLE. + * Polls a file of type %G_FILE_TYPE_MOUNTABLE. * * If @cancellable is not %NULL, then the operation can be cancelled by * triggering the cancellable object from another thread. If the operation @@ -2548,7 +2667,7 @@ public template FileT(TStruct) * cancellable = optional #GCancellable object, * %NULL to ignore * - * Returns: The #GFileType of the file and #G_FILE_TYPE_UNKNOWN + * Returns: The #GFileType of the file and %G_FILE_TYPE_UNKNOWN * if the file does not exist * * Since: 2.18 @@ -2572,9 +2691,9 @@ public template FileT(TStruct) * attributes, and a wildcard like "filesystem::*" means all attributes * in the filesystem namespace. The standard namespace for filesystem * attributes is "filesystem". Common attributes of interest are - * #G_FILE_ATTRIBUTE_FILESYSTEM_SIZE (the total size of the filesystem - * in bytes), #G_FILE_ATTRIBUTE_FILESYSTEM_FREE (number of bytes available), - * and #G_FILE_ATTRIBUTE_FILESYSTEM_TYPE (type of the filesystem). + * %G_FILE_ATTRIBUTE_FILESYSTEM_SIZE (the total size of the filesystem + * in bytes), %G_FILE_ATTRIBUTE_FILESYSTEM_FREE (number of bytes available), + * and %G_FILE_ATTRIBUTE_FILESYSTEM_TYPE (type of the filesystem). * * If @cancellable is not %NULL, then the operation can be cancelled * by triggering the cancellable object from another thread. If the @@ -2687,7 +2806,7 @@ public template FileT(TStruct) * "standard::*" means all attributes in the standard namespace. * An example attribute query be "standard::*,owner::user". * The standard attributes are available as defines, like - * #G_FILE_ATTRIBUTE_STANDARD_NAME. + * %G_FILE_ATTRIBUTE_STANDARD_NAME. * * If @cancellable is not %NULL, then the operation can be cancelled * by triggering the cancellable object from another thread. If the @@ -2696,7 +2815,7 @@ public template FileT(TStruct) * * For symlinks, normally the information about the target of the * symlink is returned, rather than information about the symlink - * itself. However if you pass #G_FILE_QUERY_INFO_NOFOLLOW_SYMLINKS + * itself. However if you pass %G_FILE_QUERY_INFO_NOFOLLOW_SYMLINKS * in @flags the information about the symlink itself will be returned. * Also, for symlinks that point to non-existing files the information * about the symlink itself will be returned. @@ -2978,7 +3097,7 @@ public template FileT(TStruct) * the destination when the stream is closed. * * By default files created are generally readable by everyone, - * but if you pass #G_FILE_CREATE_PRIVATE in @flags the file + * but if you pass %G_FILE_CREATE_PRIVATE in @flags the file * will be made readable only to the current user, to the level that * is supported on the target filesystem. * @@ -3359,12 +3478,13 @@ public template FileT(TStruct) * * This call does no blocking I/O. * + * If the @relative_path is an absolute path name, the resolution + * is done absolutely (without taking @file path as base). + * * Params: * relativePath = a given relative path string * - * Returns: #GFile to the resolved path. - * %NULL if @relative_path is %NULL or if @file is invalid. - * Free the returned object with g_object_unref(). + * Returns: a #GFile for the resolved path. */ public FileIF resolveRelativePath(string relativePath) { @@ -3715,7 +3835,7 @@ public template FileT(TStruct) * for the target filesystem if possible and the @file is renamed to this. * * If you want to implement a rename operation in the user interface the - * edit name (#G_FILE_ATTRIBUTE_STANDARD_EDIT_NAME) should be used as the + * edit name (%G_FILE_ATTRIBUTE_STANDARD_EDIT_NAME) should be used as the * initial value in the rename widget, and then the result after editing * should be passed to g_file_set_display_name(). * @@ -3811,7 +3931,7 @@ public template FileT(TStruct) } /** - * Starts a file of type #G_FILE_TYPE_MOUNTABLE. + * Starts a file of type %G_FILE_TYPE_MOUNTABLE. * Using @start_operation, you can request callbacks when, for instance, * passwords are needed during authentication. * @@ -3868,7 +3988,7 @@ public template FileT(TStruct) } /** - * Stops a file of type #G_FILE_TYPE_MOUNTABLE. + * Stops a file of type %G_FILE_TYPE_MOUNTABLE. * * If @cancellable is not %NULL, then the operation can be cancelled by * triggering the cancellable object from another thread. If the operation @@ -3944,7 +4064,9 @@ public template FileT(TStruct) * Sends @file to the "Trashcan", if possible. This is similar to * deleting it, but the user can recover it before emptying the trashcan. * Not all file systems support trashing, so this call can return the - * %G_IO_ERROR_NOT_SUPPORTED error. + * %G_IO_ERROR_NOT_SUPPORTED error. Since GLib 2.66, the `x-gvfs-notrash` unix + * mount option can be used to disable g_file_trash() support for certain + * mounts, the %G_IO_ERROR_NOT_SUPPORTED error will be returned in that case. * * If @cancellable is not %NULL, then the operation can be cancelled by * triggering the cancellable object from another thread. If the operation @@ -4075,7 +4197,7 @@ public template FileT(TStruct) } /** - * Unmounts a file of type #G_FILE_TYPE_MOUNTABLE. + * Unmounts a file of type %G_FILE_TYPE_MOUNTABLE. * * If @cancellable is not %NULL, then the operation can be cancelled by * triggering the cancellable object from another thread. If the operation diff --git a/generated/gtkd/gio/FilenameCompleter.d b/generated/gtkd/gio/FilenameCompleter.d index e5c083a1f..b7b63c8a1 100644 --- a/generated/gtkd/gio/FilenameCompleter.d +++ b/generated/gtkd/gio/FilenameCompleter.d @@ -28,6 +28,7 @@ private import gio.c.functions; public import gio.c.types; private import glib.ConstructionException; private import glib.Str; +private import glib.c.functions; private import gobject.ObjectG; private import gobject.Signals; public import gtkc.giotypes; @@ -99,9 +100,9 @@ public class FilenameCompleter : ObjectG * Params: * initialText = text to be completed. * - * Returns: a completed string, or %NULL if no completion exists. - * This string is not owned by GIO, so remember to g_free() it - * when finished. + * Returns: a completed string, or %NULL if no + * completion exists. This string is not owned by GIO, so remember to g_free() + * it when finished. */ public string getCompletionSuffix(string initialText) { diff --git a/generated/gtkd/gio/IOExtension.d b/generated/gtkd/gio/IOExtension.d index feaba5816..ca6597cde 100644 --- a/generated/gtkd/gio/IOExtension.d +++ b/generated/gtkd/gio/IOExtension.d @@ -27,6 +27,7 @@ module gio.IOExtension; private import gio.c.functions; public import gio.c.types; private import glib.Str; +private import glib.c.functions; private import gobject.ObjectG; private import gobject.TypeClass; public import gtkc.giotypes; diff --git a/generated/gtkd/gio/IOExtensionPoint.d b/generated/gtkd/gio/IOExtensionPoint.d index 119b10aa0..6f8f35191 100644 --- a/generated/gtkd/gio/IOExtensionPoint.d +++ b/generated/gtkd/gio/IOExtensionPoint.d @@ -112,7 +112,7 @@ public class IOExtensionPoint * Gets the required type for @extension_point. * * Returns: the #GType that all implementations must have, - * or #G_TYPE_INVALID if the extension point has no required type + * or %G_TYPE_INVALID if the extension point has no required type */ public GType getRequiredType() { diff --git a/generated/gtkd/gio/IOModule.d b/generated/gtkd/gio/IOModule.d index d88ba940a..6e42ddebf 100644 --- a/generated/gtkd/gio/IOModule.d +++ b/generated/gtkd/gio/IOModule.d @@ -170,7 +170,7 @@ public class IOModule : TypeModule * * This may not actually load and initialize all the types in each * module, some modules may be lazily loaded and initialized when - * an extension point it implementes is used with e.g. + * an extension point it implements is used with e.g. * g_io_extension_point_get_extensions() or * g_io_extension_point_get_extension_by_name(). * @@ -194,7 +194,7 @@ public class IOModule : TypeModule * * This may not actually load and initialize all the types in each * module, some modules may be lazily loaded and initialized when - * an extension point it implementes is used with e.g. + * an extension point it implements is used with e.g. * g_io_extension_point_get_extensions() or * g_io_extension_point_get_extension_by_name(). * diff --git a/generated/gtkd/gio/IOStream.d b/generated/gtkd/gio/IOStream.d index 13476efe4..ae958fe57 100644 --- a/generated/gtkd/gio/IOStream.d +++ b/generated/gtkd/gio/IOStream.d @@ -358,7 +358,7 @@ public class IOStream : ObjectG } /** - * Asyncronously splice the output stream of @stream1 to the input stream of + * Asynchronously splice the output stream of @stream1 to the input stream of * @stream2, and splice the output stream of @stream2 to the input stream of * @stream1. * diff --git a/generated/gtkd/gio/IconIF.d b/generated/gtkd/gio/IconIF.d index 1c178a9c7..081680c01 100644 --- a/generated/gtkd/gio/IconIF.d +++ b/generated/gtkd/gio/IconIF.d @@ -32,6 +32,7 @@ private import glib.ErrorG; private import glib.GException; private import glib.Str; private import glib.Variant; +private import glib.c.functions; private import gobject.ObjectG; public import gtkc.giotypes; @@ -133,7 +134,7 @@ public interface IconIF{ * makes sense to transfer the #GVariant between processes on the same machine, * (as opposed to over the network), and within the same file system namespace. * - * Returns: a #GVariant, or %NULL when serialization fails. + * Returns: a #GVariant, or %NULL when serialization fails. The #GVariant will not be floating. * * Since: 2.38 */ diff --git a/generated/gtkd/gio/IconT.d b/generated/gtkd/gio/IconT.d index fc78353a8..ab76eab4e 100644 --- a/generated/gtkd/gio/IconT.d +++ b/generated/gtkd/gio/IconT.d @@ -32,6 +32,7 @@ public import glib.ErrorG; public import glib.GException; public import glib.Str; public import glib.Variant; +public import glib.c.functions; public import gobject.ObjectG; public import gtkc.giotypes; @@ -97,7 +98,7 @@ public template IconT(TStruct) * makes sense to transfer the #GVariant between processes on the same machine, * (as opposed to over the network), and within the same file system namespace. * - * Returns: a #GVariant, or %NULL when serialization fails. + * Returns: a #GVariant, or %NULL when serialization fails. The #GVariant will not be floating. * * Since: 2.38 */ diff --git a/generated/gtkd/gio/InetAddress.d b/generated/gtkd/gio/InetAddress.d index cffb1c718..a3aa76327 100644 --- a/generated/gtkd/gio/InetAddress.d +++ b/generated/gtkd/gio/InetAddress.d @@ -28,6 +28,7 @@ private import gio.c.functions; public import gio.c.types; private import glib.ConstructionException; private import glib.Str; +private import glib.c.functions; private import gobject.ObjectG; public import gtkc.giotypes; @@ -147,8 +148,8 @@ public class InetAddress : ObjectG * Params: * string_ = a string representation of an IP address * - * Returns: a new #GInetAddress corresponding to @string, or %NULL if - * @string could not be parsed. + * Returns: a new #GInetAddress corresponding + * to @string, or %NULL if @string could not be parsed. * Free the returned object with g_object_unref(). * * Since: 2.22 diff --git a/generated/gtkd/gio/InetAddressMask.d b/generated/gtkd/gio/InetAddressMask.d index a154b78af..f7e950027 100644 --- a/generated/gtkd/gio/InetAddressMask.d +++ b/generated/gtkd/gio/InetAddressMask.d @@ -33,6 +33,7 @@ private import glib.ConstructionException; private import glib.ErrorG; private import glib.GException; private import glib.Str; +private import glib.c.functions; private import gobject.ObjectG; public import gtkc.giotypes; diff --git a/generated/gtkd/gio/InetSocketAddress.d b/generated/gtkd/gio/InetSocketAddress.d index 1a7cc3b43..a70676f71 100644 --- a/generated/gtkd/gio/InetSocketAddress.d +++ b/generated/gtkd/gio/InetSocketAddress.d @@ -108,8 +108,8 @@ public class InetSocketAddress : SocketAddress * address = the string form of an IP address * port = a port number * - * Returns: a new #GInetSocketAddress, or %NULL if @address cannot be - * parsed. + * Returns: a new #GInetSocketAddress, + * or %NULL if @address cannot be parsed. * * Since: 2.40 * diff --git a/generated/gtkd/gio/InitableIF.d b/generated/gtkd/gio/InitableIF.d index f53664235..2d5487928 100644 --- a/generated/gtkd/gio/InitableIF.d +++ b/generated/gtkd/gio/InitableIF.d @@ -57,7 +57,7 @@ public import gtkc.giotypes; * unreferenced). * * For bindings in languages where the native constructor supports - * exceptions the binding could check for objects implemention %GInitable + * exceptions the binding could check for objects implementing %GInitable * during normal construction and automatically initialize them, throwing * an exception on failure. * diff --git a/generated/gtkd/gio/InitableT.d b/generated/gtkd/gio/InitableT.d index b2cba6262..a9f9e6fca 100644 --- a/generated/gtkd/gio/InitableT.d +++ b/generated/gtkd/gio/InitableT.d @@ -57,7 +57,7 @@ public import gtkc.giotypes; * unreferenced). * * For bindings in languages where the native constructor supports - * exceptions the binding could check for objects implemention %GInitable + * exceptions the binding could check for objects implementing %GInitable * during normal construction and automatically initialize them, throwing * an exception on failure. * diff --git a/generated/gtkd/gio/InputStream.d b/generated/gtkd/gio/InputStream.d index a2c8ca3ef..6d19a65e8 100644 --- a/generated/gtkd/gio/InputStream.d +++ b/generated/gtkd/gio/InputStream.d @@ -237,7 +237,7 @@ public class InputStream : ObjectG */ public ptrdiff_t read(out ubyte[] buffer, Cancellable cancellable) { - ubyte* outbuffer = null; + ubyte* outbuffer; GError* err = null; auto __p = g_input_stream_read(gInputStream, cast(void*)&outbuffer, cast(size_t)buffer.length, (cancellable is null) ? null : cancellable.getCancellableStruct(), &err); @@ -284,7 +284,7 @@ public class InputStream : ObjectG */ public bool readAll(out ubyte[] buffer, out size_t bytesRead, Cancellable cancellable) { - ubyte* outbuffer = null; + ubyte* outbuffer; GError* err = null; auto __p = g_input_stream_read_all(gInputStream, cast(void*)&outbuffer, cast(size_t)buffer.length, &bytesRead, (cancellable is null) ? null : cancellable.getCancellableStruct(), &err) != 0; @@ -322,7 +322,7 @@ public class InputStream : ObjectG */ public void readAllAsync(out ubyte[] buffer, int ioPriority, Cancellable cancellable, GAsyncReadyCallback callback, void* userData) { - ubyte* outbuffer = null; + ubyte* outbuffer; g_input_stream_read_all_async(gInputStream, cast(void*)&outbuffer, cast(size_t)buffer.length, ioPriority, (cancellable is null) ? null : cancellable.getCancellableStruct(), callback, userData); @@ -399,7 +399,7 @@ public class InputStream : ObjectG */ public void readAsync(out ubyte[] buffer, int ioPriority, Cancellable cancellable, GAsyncReadyCallback callback, void* userData) { - ubyte* outbuffer = null; + ubyte* outbuffer; g_input_stream_read_async(gInputStream, cast(void*)&outbuffer, cast(size_t)buffer.length, ioPriority, (cancellable is null) ? null : cancellable.getCancellableStruct(), callback, userData); diff --git a/generated/gtkd/gio/ListModelIF.d b/generated/gtkd/gio/ListModelIF.d index b1a83b397..dede6afc4 100644 --- a/generated/gtkd/gio/ListModelIF.d +++ b/generated/gtkd/gio/ListModelIF.d @@ -71,7 +71,7 @@ private import std.algorithm; * it are gone. * * On the other side, a consumer is expected only to hold references on - * objects that are currently "user visible", in order to faciliate the + * objects that are currently "user visible", in order to facilitate the * maximum level of laziness in the implementation of the list and to * reduce the required number of signal connections at a given time. * @@ -96,11 +96,15 @@ public interface ListModelIF{ } /** - * Get the item at @position. If @position is greater than the number of - * items in @list, %NULL is returned. + * Get the item at @position. + * + * If @position is greater than the number of items in @list, %NULL is + * returned. * * %NULL is never returned for an index that is smaller than the length - * of the list. See g_list_model_get_n_items(). + * of the list. + * + * See also: g_list_model_get_n_items() * * Params: * position = the position of the item to fetch @@ -112,9 +116,11 @@ public interface ListModelIF{ public void* getItem(uint position); /** - * Gets the type of the items in @list. All items returned from - * g_list_model_get_type() are of that type or a subtype, or are an - * implementation of that interface. + * Gets the type of the items in @list. + * + * All items returned from g_list_model_get_item() are of the type + * returned by this function, or a subtype, or if the type is an + * interface, they are an implementation of that interface. * * The item type of a #GListModel can not change during the life of the * model. @@ -139,11 +145,18 @@ public interface ListModelIF{ public uint getNItems(); /** - * Get the item at @position. If @position is greater than the number of - * items in @list, %NULL is returned. + * Get the item at @position. + * + * If @position is greater than the number of items in @list, %NULL is + * returned. * * %NULL is never returned for an index that is smaller than the length - * of the list. See g_list_model_get_n_items(). + * of the list. + * + * This function is meant to be used by language bindings in place + * of g_list_model_get_item(). + * + * See also: g_list_model_get_n_items() * * Params: * position = the position of the item to fetch @@ -190,7 +203,7 @@ public interface ListModelIF{ * from @list. At @position, @removed items were removed and @added * items were added in their place. * - * Note: If @removed != @added, the positions of all later items + * Note: If `removed != added`, the positions of all later items * in the model change. * * Params: diff --git a/generated/gtkd/gio/ListModelT.d b/generated/gtkd/gio/ListModelT.d index 499e87b8f..e2e712a26 100644 --- a/generated/gtkd/gio/ListModelT.d +++ b/generated/gtkd/gio/ListModelT.d @@ -71,7 +71,7 @@ public import std.algorithm; * it are gone. * * On the other side, a consumer is expected only to hold references on - * objects that are currently "user visible", in order to faciliate the + * objects that are currently "user visible", in order to facilitate the * maximum level of laziness in the implementation of the list and to * reduce the required number of signal connections at a given time. * @@ -93,11 +93,15 @@ public template ListModelT(TStruct) /** - * Get the item at @position. If @position is greater than the number of - * items in @list, %NULL is returned. + * Get the item at @position. + * + * If @position is greater than the number of items in @list, %NULL is + * returned. * * %NULL is never returned for an index that is smaller than the length - * of the list. See g_list_model_get_n_items(). + * of the list. + * + * See also: g_list_model_get_n_items() * * Params: * position = the position of the item to fetch @@ -112,9 +116,11 @@ public template ListModelT(TStruct) } /** - * Gets the type of the items in @list. All items returned from - * g_list_model_get_type() are of that type or a subtype, or are an - * implementation of that interface. + * Gets the type of the items in @list. + * + * All items returned from g_list_model_get_item() are of the type + * returned by this function, or a subtype, or if the type is an + * interface, they are an implementation of that interface. * * The item type of a #GListModel can not change during the life of the * model. @@ -145,11 +151,18 @@ public template ListModelT(TStruct) } /** - * Get the item at @position. If @position is greater than the number of - * items in @list, %NULL is returned. + * Get the item at @position. + * + * If @position is greater than the number of items in @list, %NULL is + * returned. * * %NULL is never returned for an index that is smaller than the length - * of the list. See g_list_model_get_n_items(). + * of the list. + * + * This function is meant to be used by language bindings in place + * of g_list_model_get_item(). + * + * See also: g_list_model_get_n_items() * * Params: * position = the position of the item to fetch @@ -209,7 +222,7 @@ public template ListModelT(TStruct) * from @list. At @position, @removed items were removed and @added * items were added in their place. * - * Note: If @removed != @added, the positions of all later items + * Note: If `removed != added`, the positions of all later items * in the model change. * * Params: diff --git a/generated/gtkd/gio/LoadableIconIF.d b/generated/gtkd/gio/LoadableIconIF.d index 4cf1568b4..0393591c4 100644 --- a/generated/gtkd/gio/LoadableIconIF.d +++ b/generated/gtkd/gio/LoadableIconIF.d @@ -32,6 +32,7 @@ public import gio.c.types; private import glib.ErrorG; private import glib.GException; private import glib.Str; +private import glib.c.functions; private import gobject.ObjectG; public import gtkc.giotypes; diff --git a/generated/gtkd/gio/LoadableIconT.d b/generated/gtkd/gio/LoadableIconT.d index ceefb1a44..4688a954f 100644 --- a/generated/gtkd/gio/LoadableIconT.d +++ b/generated/gtkd/gio/LoadableIconT.d @@ -32,6 +32,7 @@ public import gio.c.types; public import glib.ErrorG; public import glib.GException; public import glib.Str; +public import glib.c.functions; public import gobject.ObjectG; public import gtkc.giotypes; diff --git a/generated/gtkd/gio/MemoryMonitorIF.d b/generated/gtkd/gio/MemoryMonitorIF.d index 48a33752e..441eed8e7 100644 --- a/generated/gtkd/gio/MemoryMonitorIF.d +++ b/generated/gtkd/gio/MemoryMonitorIF.d @@ -42,11 +42,19 @@ private import std.algorithm; * There is also an implementation for use inside Flatpak sandboxes. * * Possible actions to take when the signal is received are: + * * - Free caches * - Save files that haven't been looked at in a while to disk, ready to be reopened when needed * - Run a garbage collection cycle * - Try and compress fragmented allocations * - Exit on idle if the process has no reason to stay around + * - Call [`malloc_trim(3)`](man:malloc_trim) to return cached heap pages to + * the kernel (if supported by your libc) + * + * Note that some actions may not always improve system performance, and so + * should be profiled for your application. `malloc_trim()`, for example, may + * make future heap allocations slower (due to releasing cached heap pages back + * to the kernel). * * See #GMemoryMonitorWarningLevel for details on the various warning levels. * diff --git a/generated/gtkd/gio/MemoryMonitorT.d b/generated/gtkd/gio/MemoryMonitorT.d index 3efbbe1e6..1413d8e5e 100644 --- a/generated/gtkd/gio/MemoryMonitorT.d +++ b/generated/gtkd/gio/MemoryMonitorT.d @@ -42,11 +42,19 @@ public import std.algorithm; * There is also an implementation for use inside Flatpak sandboxes. * * Possible actions to take when the signal is received are: + * * - Free caches * - Save files that haven't been looked at in a while to disk, ready to be reopened when needed * - Run a garbage collection cycle * - Try and compress fragmented allocations * - Exit on idle if the process has no reason to stay around + * - Call [`malloc_trim(3)`](man:malloc_trim) to return cached heap pages to + * the kernel (if supported by your libc) + * + * Note that some actions may not always improve system performance, and so + * should be profiled for your application. `malloc_trim()`, for example, may + * make future heap allocations slower (due to releasing cached heap pages back + * to the kernel). * * See #GMemoryMonitorWarningLevel for details on the various warning levels. * diff --git a/generated/gtkd/gio/MenuAttributeIter.d b/generated/gtkd/gio/MenuAttributeIter.d index 2b637a31f..5ebddbb3c 100644 --- a/generated/gtkd/gio/MenuAttributeIter.d +++ b/generated/gtkd/gio/MenuAttributeIter.d @@ -28,6 +28,7 @@ private import gio.c.functions; public import gio.c.types; private import glib.Str; private import glib.Variant; +private import glib.c.functions; private import gobject.ObjectG; public import gtkc.giotypes; diff --git a/generated/gtkd/gio/MenuLinkIter.d b/generated/gtkd/gio/MenuLinkIter.d index 7cf9ddb2a..de01f17a2 100644 --- a/generated/gtkd/gio/MenuLinkIter.d +++ b/generated/gtkd/gio/MenuLinkIter.d @@ -28,6 +28,7 @@ private import gio.MenuModel; private import gio.c.functions; public import gio.c.types; private import glib.Str; +private import glib.c.functions; private import gobject.ObjectG; public import gtkc.giotypes; diff --git a/generated/gtkd/gio/MenuModel.d b/generated/gtkd/gio/MenuModel.d index bfef5b278..4544e9fa0 100644 --- a/generated/gtkd/gio/MenuModel.d +++ b/generated/gtkd/gio/MenuModel.d @@ -359,7 +359,7 @@ public class MenuModel : ObjectG } /** - * Emitted when a change has occured to the menu. + * Emitted when a change has occurred to the menu. * * The only changes that can occur to a menu is that items are removed * or added. Items may not change (except by being removed and added diff --git a/generated/gtkd/gio/MountIF.d b/generated/gtkd/gio/MountIF.d index bf08cfa15..72484718e 100644 --- a/generated/gtkd/gio/MountIF.d +++ b/generated/gtkd/gio/MountIF.d @@ -36,6 +36,7 @@ public import gio.c.types; private import glib.ErrorG; private import glib.GException; private import glib.Str; +private import glib.c.functions; private import gobject.ObjectG; private import gobject.Signals; public import gtkc.giotypes; diff --git a/generated/gtkd/gio/MountOperation.d b/generated/gtkd/gio/MountOperation.d index 75673a574..5f501ff90 100644 --- a/generated/gtkd/gio/MountOperation.d +++ b/generated/gtkd/gio/MountOperation.d @@ -29,6 +29,7 @@ public import gio.c.types; private import glib.ArrayG; private import glib.ConstructionException; private import glib.Str; +private import glib.c.functions; private import gobject.ObjectG; private import gobject.Signals; public import gtkc.giotypes; @@ -434,7 +435,7 @@ public class MountOperation : ObjectG * primary text in a #GtkMessageDialog. * * Params: - * message = string containing a mesage to display to the user + * message = string containing a message to display to the user * timeLeft = the estimated time left before the operation completes, * in microseconds, or -1 * bytesLeft = the amount of bytes to be written before the operation diff --git a/generated/gtkd/gio/MountT.d b/generated/gtkd/gio/MountT.d index 16bb4e629..580295c9f 100644 --- a/generated/gtkd/gio/MountT.d +++ b/generated/gtkd/gio/MountT.d @@ -36,6 +36,7 @@ public import gio.c.types; public import glib.ErrorG; public import glib.GException; public import glib.Str; +public import glib.c.functions; public import gobject.ObjectG; public import gobject.Signals; public import gtkc.giotypes; diff --git a/generated/gtkd/gio/NetworkAddress.d b/generated/gtkd/gio/NetworkAddress.d index 39134e7a0..4ba44b5aa 100644 --- a/generated/gtkd/gio/NetworkAddress.d +++ b/generated/gtkd/gio/NetworkAddress.d @@ -32,6 +32,7 @@ private import glib.ConstructionException; private import glib.ErrorG; private import glib.GException; private import glib.Str; +private import glib.c.functions; private import gobject.ObjectG; public import gtkc.giotypes; diff --git a/generated/gtkd/gio/NetworkMonitorIF.d b/generated/gtkd/gio/NetworkMonitorIF.d index d63986f22..227613ea6 100644 --- a/generated/gtkd/gio/NetworkMonitorIF.d +++ b/generated/gtkd/gio/NetworkMonitorIF.d @@ -65,7 +65,8 @@ public interface NetworkMonitorIF{ /** * Gets the default #GNetworkMonitor for the system. * - * Returns: a #GNetworkMonitor + * Returns: a #GNetworkMonitor, which will be + * a dummy object if no network monitor is available * * Since: 2.32 */ diff --git a/generated/gtkd/gio/NetworkService.d b/generated/gtkd/gio/NetworkService.d index bcc738cd1..eda171aaa 100644 --- a/generated/gtkd/gio/NetworkService.d +++ b/generated/gtkd/gio/NetworkService.d @@ -30,6 +30,7 @@ private import gio.c.functions; public import gio.c.types; private import glib.ConstructionException; private import glib.Str; +private import glib.c.functions; private import gobject.ObjectG; public import gtkc.giotypes; @@ -137,7 +138,7 @@ public class NetworkService : ObjectG, SocketConnectableIF } /** - * Get's the URI scheme used to resolve proxies. By default, the service name + * Gets the URI scheme used to resolve proxies. By default, the service name * is used as scheme. * * Returns: @srv's scheme name diff --git a/generated/gtkd/gio/Notification.d b/generated/gtkd/gio/Notification.d index 3079b8075..cb4c93878 100644 --- a/generated/gtkd/gio/Notification.d +++ b/generated/gtkd/gio/Notification.d @@ -48,6 +48,29 @@ public import gtkc.giotypes; * not running, applications using #GNotification should be able to be * started as a D-Bus service, using #GApplication. * + * In order for #GNotification to work, the application must have installed + * a `.desktop` file. For example: + * |[ + * [Desktop Entry] + * Name=Test Application + * Comment=Description of what Test Application does + * Exec=gnome-test-application + * Icon=org.gnome.TestApplication + * Terminal=false + * Type=Application + * Categories=GNOME;GTK;TestApplication Category; + * StartupNotify=true + * DBusActivatable=true + * X-GNOME-UsesNotifications=true + * ]| + * + * The `X-GNOME-UsesNotifications` key indicates to GNOME Control Center + * that this application uses notifications, so it can be listed in the + * Control Center’s ‘Notifications’ panel. + * + * The `.desktop` file must be named as `org.gnome.TestApplication.desktop`, + * where `org.gnome.TestApplication` is the ID passed to g_application_new(). + * * User interaction with a notification (either the default action, or * buttons) must be associated with actions on the application (ie: * "app." actions). It is not possible to route user interaction @@ -176,6 +199,24 @@ public class Notification : ObjectG g_notification_set_body(gNotification, Str.toStringz(body_)); } + /** + * Sets the type of @notification to @category. Categories have a main + * type like `email`, `im` or `device` and can have a detail separated + * by a `.`, e.g. `im.received` or `email.arrived`. Setting the category + * helps the notification server to select proper feedback to the user. + * + * Standard categories are [listed in the specification](https://specifications.freedesktop.org/notification-spec/latest/ar01s06.html). + * + * Params: + * category = the category for @notification, or %NULL for no category + * + * Since: 2.70 + */ + public void setCategory(string category) + { + g_notification_set_category(gNotification, Str.toStringz(category)); + } + /** * Sets the default action of @notification to @detailed_action. This * action is activated when the notification is clicked on. diff --git a/generated/gtkd/gio/PollableInputStreamIF.d b/generated/gtkd/gio/PollableInputStreamIF.d index fec1a9acf..f10f6c27e 100644 --- a/generated/gtkd/gio/PollableInputStreamIF.d +++ b/generated/gtkd/gio/PollableInputStreamIF.d @@ -122,8 +122,8 @@ public interface PollableInputStreamIF{ * to having been cancelled. * * Params: - * buffer = a buffer to - * read data into (which should be at least @count bytes long). + * buffer = a + * buffer to read data into (which should be at least @count bytes long). * cancellable = a #GCancellable, or %NULL * * Returns: the number of bytes read, or -1 on error (including @@ -131,5 +131,5 @@ public interface PollableInputStreamIF{ * * Throws: GException on failure. */ - public ptrdiff_t readNonblocking(ubyte[] buffer, Cancellable cancellable); + public ptrdiff_t readNonblocking(out ubyte[] buffer, Cancellable cancellable); } diff --git a/generated/gtkd/gio/PollableInputStreamT.d b/generated/gtkd/gio/PollableInputStreamT.d index 7f24afdb9..f13436adf 100644 --- a/generated/gtkd/gio/PollableInputStreamT.d +++ b/generated/gtkd/gio/PollableInputStreamT.d @@ -135,8 +135,8 @@ public template PollableInputStreamT(TStruct) * to having been cancelled. * * Params: - * buffer = a buffer to - * read data into (which should be at least @count bytes long). + * buffer = a + * buffer to read data into (which should be at least @count bytes long). * cancellable = a #GCancellable, or %NULL * * Returns: the number of bytes read, or -1 on error (including @@ -144,17 +144,20 @@ public template PollableInputStreamT(TStruct) * * Throws: GException on failure. */ - public ptrdiff_t readNonblocking(ubyte[] buffer, Cancellable cancellable) + public ptrdiff_t readNonblocking(out ubyte[] buffer, Cancellable cancellable) { + ubyte* outbuffer; GError* err = null; - auto __p = g_pollable_input_stream_read_nonblocking(getPollableInputStreamStruct(), buffer.ptr, cast(size_t)buffer.length, (cancellable is null) ? null : cancellable.getCancellableStruct(), &err); + auto __p = g_pollable_input_stream_read_nonblocking(getPollableInputStreamStruct(), cast(void*)&outbuffer, cast(size_t)buffer.length, (cancellable is null) ? null : cancellable.getCancellableStruct(), &err); if (err !is null) { throw new GException( new ErrorG(err) ); } + buffer = outbuffer[0 .. cast(size_t)buffer.length]; + return __p; } } diff --git a/generated/gtkd/gio/PowerProfileMonitorIF.d b/generated/gtkd/gio/PowerProfileMonitorIF.d new file mode 100644 index 000000000..4d417ce05 --- /dev/null +++ b/generated/gtkd/gio/PowerProfileMonitorIF.d @@ -0,0 +1,105 @@ +/* + * This file is part of gtkD. + * + * gtkD is free software; you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 + * of the License, or (at your option) any later version, with + * some exceptions, please read the COPYING file. + * + * gtkD is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with gtkD; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110, USA + */ + +// generated automatically - do not change +// find conversion definition on APILookup.txt +// implement new conversion functionalities on the wrap.utils pakage + + +module gio.PowerProfileMonitorIF; + +private import gio.PowerProfileMonitorIF; +private import gio.c.functions; +public import gio.c.types; +private import gobject.ObjectG; +public import gtkc.giotypes; + + +/** + * #GPowerProfileMonitor makes it possible for applications as well as OS components + * to monitor system power profiles and act upon them. It currently only exports + * whether the system is in “Power Saver” mode (known as “Low Power” mode on + * some systems). + * + * When in “Low Power” mode, it is recommended that applications: + * - disabling automatic downloads + * - reduce the rate of refresh from online sources such as calendar or + * email synchronisation + * - if the application has expensive visual effects, reduce them + * + * It is also likely that OS components providing services to applications will + * lower their own background activity, for the sake of the system. + * + * There are a variety of tools that exist for power consumption analysis, but those + * usually depend on the OS and hardware used. On Linux, one could use `upower` to + * monitor the battery discharge rate, `powertop` to check on the background activity + * or activity at all), `sysprof` to inspect CPU usage, and `intel_gpu_time` to + * profile GPU usage. + * + * Don't forget to disconnect the #GPowerProfileMonitor::notify::power-saver-enabled + * signal, and unref the #GPowerProfileMonitor itself when exiting. + * + * Since: 2.70 + */ +public interface PowerProfileMonitorIF{ + /** Get the main Gtk struct */ + public GPowerProfileMonitor* getPowerProfileMonitorStruct(bool transferOwnership = false); + + /** the main Gtk struct as a void* */ + protected void* getStruct(); + + + /** */ + public static GType getType() + { + return g_power_profile_monitor_get_type(); + } + + /** + * Gets a reference to the default #GPowerProfileMonitor for the system. + * + * Returns: a new reference to the default #GPowerProfileMonitor + * + * Since: 2.70 + */ + public static PowerProfileMonitorIF dupDefault() + { + auto __p = g_power_profile_monitor_dup_default(); + + if(__p is null) + { + return null; + } + + return ObjectG.getDObject!(PowerProfileMonitorIF)(cast(GPowerProfileMonitor*) __p, true); + } + + /** + * Gets whether the system is in “Power Saver” mode. + * + * You are expected to listen to the + * #GPowerProfileMonitor::notify::power-saver-enabled signal to know when the profile has + * changed. + * + * Returns: Whether the system is in “Power Saver” mode. + * + * Since: 2.70 + */ + public bool getPowerSaverEnabled(); +} diff --git a/generated/gtkd/gio/PowerProfileMonitorT.d b/generated/gtkd/gio/PowerProfileMonitorT.d new file mode 100644 index 000000000..9be3834f7 --- /dev/null +++ b/generated/gtkd/gio/PowerProfileMonitorT.d @@ -0,0 +1,86 @@ +/* + * This file is part of gtkD. + * + * gtkD is free software; you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 + * of the License, or (at your option) any later version, with + * some exceptions, please read the COPYING file. + * + * gtkD is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with gtkD; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110, USA + */ + +// generated automatically - do not change +// find conversion definition on APILookup.txt +// implement new conversion functionalities on the wrap.utils pakage + + +module gio.PowerProfileMonitorT; + +public import gio.PowerProfileMonitorIF; +public import gio.c.functions; +public import gio.c.types; +public import gobject.ObjectG; +public import gtkc.giotypes; + + +/** + * #GPowerProfileMonitor makes it possible for applications as well as OS components + * to monitor system power profiles and act upon them. It currently only exports + * whether the system is in “Power Saver” mode (known as “Low Power” mode on + * some systems). + * + * When in “Low Power” mode, it is recommended that applications: + * - disabling automatic downloads + * - reduce the rate of refresh from online sources such as calendar or + * email synchronisation + * - if the application has expensive visual effects, reduce them + * + * It is also likely that OS components providing services to applications will + * lower their own background activity, for the sake of the system. + * + * There are a variety of tools that exist for power consumption analysis, but those + * usually depend on the OS and hardware used. On Linux, one could use `upower` to + * monitor the battery discharge rate, `powertop` to check on the background activity + * or activity at all), `sysprof` to inspect CPU usage, and `intel_gpu_time` to + * profile GPU usage. + * + * Don't forget to disconnect the #GPowerProfileMonitor::notify::power-saver-enabled + * signal, and unref the #GPowerProfileMonitor itself when exiting. + * + * Since: 2.70 + */ +public template PowerProfileMonitorT(TStruct) +{ + /** Get the main Gtk struct */ + public GPowerProfileMonitor* getPowerProfileMonitorStruct(bool transferOwnership = false) + { + if (transferOwnership) + ownedRef = false; + return cast(GPowerProfileMonitor*)getStruct(); + } + + + /** + * Gets whether the system is in “Power Saver” mode. + * + * You are expected to listen to the + * #GPowerProfileMonitor::notify::power-saver-enabled signal to know when the profile has + * changed. + * + * Returns: Whether the system is in “Power Saver” mode. + * + * Since: 2.70 + */ + public bool getPowerSaverEnabled() + { + return g_power_profile_monitor_get_power_saver_enabled(getPowerProfileMonitorStruct()) != 0; + } +} diff --git a/generated/gtkd/gio/ProxyAddress.d b/generated/gtkd/gio/ProxyAddress.d index 8610450f2..476ff7438 100644 --- a/generated/gtkd/gio/ProxyAddress.d +++ b/generated/gtkd/gio/ProxyAddress.d @@ -31,6 +31,7 @@ private import gio.c.functions; public import gio.c.types; private import glib.ConstructionException; private import glib.Str; +private import glib.c.functions; private import gobject.ObjectG; public import gtkc.giotypes; diff --git a/generated/gtkd/gio/ProxyResolverIF.d b/generated/gtkd/gio/ProxyResolverIF.d index 700e42559..e01997d11 100644 --- a/generated/gtkd/gio/ProxyResolverIF.d +++ b/generated/gtkd/gio/ProxyResolverIF.d @@ -32,6 +32,7 @@ public import gio.c.types; private import glib.ErrorG; private import glib.GException; private import glib.Str; +private import glib.c.functions; private import gobject.ObjectG; public import gtkc.giotypes; @@ -64,7 +65,8 @@ public interface ProxyResolverIF{ /** * Gets the default #GProxyResolver for the system. * - * Returns: the default #GProxyResolver. + * Returns: the default #GProxyResolver, which + * will be a dummy object if no proxy resolver is available * * Since: 2.26 */ diff --git a/generated/gtkd/gio/ProxyResolverT.d b/generated/gtkd/gio/ProxyResolverT.d index 883ce0648..269e1d2d4 100644 --- a/generated/gtkd/gio/ProxyResolverT.d +++ b/generated/gtkd/gio/ProxyResolverT.d @@ -32,6 +32,7 @@ public import gio.c.types; public import glib.ErrorG; public import glib.GException; public import glib.Str; +public import glib.c.functions; public import gobject.ObjectG; public import gtkc.giotypes; diff --git a/generated/gtkd/gio/Resolver.d b/generated/gtkd/gio/Resolver.d index 44cf78a96..9eab23758 100644 --- a/generated/gtkd/gio/Resolver.d +++ b/generated/gtkd/gio/Resolver.d @@ -33,6 +33,7 @@ private import glib.ErrorG; private import glib.GException; private import glib.ListG; private import glib.Str; +private import glib.c.functions; private import gobject.ObjectG; private import gobject.Signals; public import gtkc.giotypes; @@ -342,7 +343,7 @@ public class Resolver : ObjectG /** * This differs from g_resolver_lookup_by_name() in that you can modify * the lookup behavior with @flags. For example this can be used to limit - * results with #G_RESOLVER_NAME_LOOKUP_FLAGS_IPV4_ONLY. + * results with %G_RESOLVER_NAME_LOOKUP_FLAGS_IPV4_ONLY. * * Params: * hostname = the hostname to look up diff --git a/generated/gtkd/gio/Resource.d b/generated/gtkd/gio/Resource.d index 0a8f982d3..c77c73928 100644 --- a/generated/gtkd/gio/Resource.d +++ b/generated/gtkd/gio/Resource.d @@ -32,6 +32,7 @@ private import glib.ConstructionException; private import glib.ErrorG; private import glib.GException; private import glib.Str; +private import glib.c.functions; private import gobject.ObjectG; public import gtkc.giotypes; private import gtkd.Loader; @@ -66,12 +67,23 @@ private import gtkd.Loader; * the xmllint executable, or xmllint must be in the `PATH`; otherwise * the preprocessing step is skipped. * - * `to-pixdata` which will use the gdk-pixbuf-pixdata command to convert - * images to the GdkPixdata format, which allows you to create pixbufs directly using the data inside - * the resource file, rather than an (uncompressed) copy of it. For this, the gdk-pixbuf-pixdata - * program must be in the PATH, or the `GDK_PIXBUF_PIXDATA` environment variable must be - * set to the full path to the gdk-pixbuf-pixdata executable; otherwise the resource compiler will - * abort. + * `to-pixdata` (deprecated since gdk-pixbuf 2.32) which will use the + * `gdk-pixbuf-pixdata` command to convert images to the #GdkPixdata format, + * which allows you to create pixbufs directly using the data inside the + * resource file, rather than an (uncompressed) copy of it. For this, the + * `gdk-pixbuf-pixdata` program must be in the `PATH`, or the + * `GDK_PIXBUF_PIXDATA` environment variable must be set to the full path to the + * `gdk-pixbuf-pixdata` executable; otherwise the resource compiler will abort. + * `to-pixdata` has been deprecated since gdk-pixbuf 2.32, as #GResource + * supports embedding modern image formats just as well. Instead of using it, + * embed a PNG or SVG file in your #GResource. + * + * `json-stripblanks` which will use the `json-glib-format` command to strip + * ignorable whitespace from the JSON file. For this to work, the + * `JSON_GLIB_FORMAT` environment variable must be set to the full path to the + * `json-glib-format` executable, or it must be in the `PATH`; + * otherwise the preprocessing step is skipped. In addition, at least version + * 1.6 of `json-glib-format` is required. * * Resource files will be exported in the GResource namespace using the * combination of the given `prefix` and the filename from the `file` element. @@ -142,7 +154,7 @@ private import gtkd.Loader; * replace resources in the program or library, without recompiling, for debugging or quick hacking and testing * purposes. Since GLib 2.50, it is possible to use the `G_RESOURCE_OVERLAYS` environment variable to selectively overlay * resources with replacements from the filesystem. It is a %G_SEARCHPATH_SEPARATOR-separated list of substitutions to perform - * during resource lookups. + * during resource lookups. It is ignored when running in a setuid process. * * A substitution has the form * diff --git a/generated/gtkd/gio/SeekableIF.d b/generated/gtkd/gio/SeekableIF.d index ee23b9c91..befcf555c 100644 --- a/generated/gtkd/gio/SeekableIF.d +++ b/generated/gtkd/gio/SeekableIF.d @@ -109,14 +109,15 @@ public interface SeekableIF{ /** * Tells the current position within the stream. * - * Returns: the offset from the beginning of the buffer. + * Returns: the (positive or zero) offset from the beginning of the + * buffer, zero if the target is not seekable. */ public long tell(); /** * Sets the length of the stream to @offset. If the stream was previously * larger than @offset, the extra data is discarded. If the stream was - * previouly shorter than @offset, it is extended with NUL ('\0') bytes. + * previously shorter than @offset, it is extended with NUL ('\0') bytes. * * If @cancellable is not %NULL, then the operation can be cancelled by * triggering the cancellable object from another thread. If the operation diff --git a/generated/gtkd/gio/SeekableT.d b/generated/gtkd/gio/SeekableT.d index f162f2ba6..e120dbfb5 100644 --- a/generated/gtkd/gio/SeekableT.d +++ b/generated/gtkd/gio/SeekableT.d @@ -124,7 +124,8 @@ public template SeekableT(TStruct) /** * Tells the current position within the stream. * - * Returns: the offset from the beginning of the buffer. + * Returns: the (positive or zero) offset from the beginning of the + * buffer, zero if the target is not seekable. */ public long tell() { @@ -134,7 +135,7 @@ public template SeekableT(TStruct) /** * Sets the length of the stream to @offset. If the stream was previously * larger than @offset, the extra data is discarded. If the stream was - * previouly shorter than @offset, it is extended with NUL ('\0') bytes. + * previously shorter than @offset, it is extended with NUL ('\0') bytes. * * If @cancellable is not %NULL, then the operation can be cancelled by * triggering the cancellable object from another thread. If the operation diff --git a/generated/gtkd/gio/Settings.d b/generated/gtkd/gio/Settings.d index 13ff03495..b92f4b12c 100644 --- a/generated/gtkd/gio/Settings.d +++ b/generated/gtkd/gio/Settings.d @@ -32,6 +32,7 @@ public import gio.c.types; private import glib.ConstructionException; private import glib.Str; private import glib.Variant; +private import glib.c.functions; private import gobject.ObjectG; private import gobject.Signals; public import gtkc.giotypes; @@ -121,7 +122,7 @@ private import std.algorithm; * utility. The input is a schema description in an XML format. * * A DTD for the gschema XML format can be found here: - * [gschema.dtd](https://git.gnome.org/browse/glib/tree/gio/gschema.dtd) + * [gschema.dtd](https://gitlab.gnome.org/GNOME/glib/-/blob/HEAD/gio/gschema.dtd) * * The [glib-compile-schemas][glib-compile-schemas] tool expects schema * files to have the extension `.gschema.xml`. @@ -248,7 +249,7 @@ private import std.algorithm; * looks for a boolean property with the name "sensitivity" and * automatically binds it to the writability of the bound setting. * If this 'magic' gets in the way, it can be suppressed with the - * #G_SETTINGS_BIND_NO_SENSITIVITY flag. + * %G_SETTINGS_BIND_NO_SENSITIVITY flag. * * ## Relocatable schemas # {#gsettings-relocatable} * @@ -366,6 +367,12 @@ public class Settings : ObjectG * Creates a new #GSettings object with the schema specified by * @schema_id. * + * It is an error for the schema to not exist: schemas are an + * essential part of a program, as they provide type information. + * If schemas need to be dynamically loaded (for example, from an + * optional runtime dependency), g_settings_schema_source_lookup() + * can be used to test for their existence before loading them. + * * Signals on the newly created #GSettings object will be dispatched * via the thread-default #GMainContext in effect at the time of the * call to g_settings_new(). The new #GSettings will hold a reference @@ -544,9 +551,9 @@ public class Settings : ObjectG * * Deprecated: Use g_settings_schema_source_list_schemas() instead * - * Returns: a list of relocatable - * #GSettings schemas that are available, in no defined order. The list must - * not be modified or freed. + * Returns: a list of + * relocatable #GSettings schemas that are available, in no defined order. + * The list must not be modified or freed. * * Since: 2.28 */ @@ -563,9 +570,9 @@ public class Settings : ObjectG * a particular schema, use g_settings_schema_source_lookup() instead * of your whole loop. * - * Returns: a list of #GSettings - * schemas that are available, in no defined order. The list must not be - * modified or freed. + * Returns: a list of + * #GSettings schemas that are available, in no defined order. The list + * must not be modified or freed. * * Since: 2.26 */ @@ -791,7 +798,10 @@ public class Settings : ObjectG * @settings. * * The schema for the child settings object must have been declared - * in the schema of @settings using a element. + * in the schema of @settings using a `` element. + * + * The created child settings object will inherit the #GSettings:delay-apply + * mode from @settings. * * Params: * name = the name of the child schema @@ -1223,8 +1233,8 @@ public class Settings : ObjectG * You should free the return value with g_strfreev() when you are done * with it. * - * Returns: a list of the children on - * @settings, in no defined order + * Returns: a list of the children + * on @settings, in no defined order */ public string[] listChildren() { @@ -1246,8 +1256,8 @@ public class Settings : ObjectG * * Deprecated: Use g_settings_schema_list_keys() instead. * - * Returns: a list of the keys on - * @settings, in no defined order + * Returns: a list + * of the keys on @settings, in no defined order */ public string[] listKeys() { diff --git a/generated/gtkd/gio/SettingsBackend.d b/generated/gtkd/gio/SettingsBackend.d index 4b5f9bdf5..5785b6ee9 100644 --- a/generated/gtkd/gio/SettingsBackend.d +++ b/generated/gtkd/gio/SettingsBackend.d @@ -29,6 +29,7 @@ public import gio.c.types; private import glib.BBTree; private import glib.Str; private import glib.Variant; +private import glib.c.functions; private import gobject.ObjectG; public import gtkc.giotypes; @@ -38,7 +39,7 @@ public import gtkc.giotypes; * non-strictly-typed data that is stored in a hierarchy. To implement * an alternative storage backend for #GSettings, you need to implement * the #GSettingsBackend interface and then make it implement the - * extension point #G_SETTINGS_BACKEND_EXTENSION_POINT_NAME. + * extension point %G_SETTINGS_BACKEND_EXTENSION_POINT_NAME. * * The interface defines methods for reading and writing values, a * method for determining if writing of certain values will fail @@ -137,7 +138,9 @@ public class SettingsBackend : ObjectG * * The user gets a reference to the backend. * - * Returns: the default #GSettingsBackend + * Returns: the default #GSettingsBackend, + * which will be a dummy (memory) settings backend if no other settings + * backend is available. * * Since: 2.28 */ diff --git a/generated/gtkd/gio/SettingsSchema.d b/generated/gtkd/gio/SettingsSchema.d index 2dcef0015..ebe9a7e0b 100644 --- a/generated/gtkd/gio/SettingsSchema.d +++ b/generated/gtkd/gio/SettingsSchema.d @@ -28,6 +28,7 @@ private import gio.SettingsSchemaKey; private import gio.c.functions; public import gio.c.types; private import glib.Str; +private import glib.c.functions; private import gobject.ObjectG; public import gtkc.giotypes; private import gtkd.Loader; @@ -245,8 +246,8 @@ public class SettingsSchema * You should free the return value with g_strfreev() when you are done * with it. * - * Returns: a list of the children on - * @settings, in no defined order + * Returns: a list of + * the children on @settings, in no defined order * * Since: 2.44 */ @@ -265,8 +266,8 @@ public class SettingsSchema * (since you should already know what keys are in your schema). This * function is intended for introspection reasons. * - * Returns: a list of the keys on - * @schema, in no defined order + * Returns: a list + * of the keys on @schema, in no defined order * * Since: 2.46 */ diff --git a/generated/gtkd/gio/SettingsSchemaKey.d b/generated/gtkd/gio/SettingsSchemaKey.d index b876c862b..c5907ed1b 100644 --- a/generated/gtkd/gio/SettingsSchemaKey.d +++ b/generated/gtkd/gio/SettingsSchemaKey.d @@ -29,6 +29,7 @@ public import gio.c.types; private import glib.Str; private import glib.Variant; private import glib.VariantType; +private import glib.c.functions; private import gobject.ObjectG; public import gtkc.giotypes; private import gtkd.Loader; @@ -237,10 +238,10 @@ public class SettingsSchemaKey } /** - * Checks if the given @value is of the correct type and within the + * Checks if the given @value is within the * permitted range for @key. * - * It is a programmer error if @value is not of the correct type -- you + * It is a programmer error if @value is not of the correct type — you * must check for this first. * * Params: diff --git a/generated/gtkd/gio/SimpleAsyncResult.d b/generated/gtkd/gio/SimpleAsyncResult.d index a1281f24a..01130f572 100644 --- a/generated/gtkd/gio/SimpleAsyncResult.d +++ b/generated/gtkd/gio/SimpleAsyncResult.d @@ -500,7 +500,7 @@ public class SimpleAsyncResult : ObjectG, AsyncResultIF * Deprecated: Use #GTask and g_task_return_error() instead. * * Params: - * domain = a #GQuark (usually #G_IO_ERROR). + * domain = a #GQuark (usually %G_IO_ERROR). * code = an error code. * format = a formatted error reporting string. * args = va_list of arguments. diff --git a/generated/gtkd/gio/Socket.d b/generated/gtkd/gio/Socket.d index 8a9ee00e3..2719b0a67 100644 --- a/generated/gtkd/gio/Socket.d +++ b/generated/gtkd/gio/Socket.d @@ -679,6 +679,7 @@ public class Socket : ObjectG, DatagramBasedIF, InitableIF * - OpenBSD since GLib 2.30 * - Solaris, Illumos and OpenSolaris since GLib 2.40 * - NetBSD since GLib 2.42 + * - macOS, tvOS, iOS since GLib 2.66 * * Other ways to obtain credentials from a foreign peer includes the * #GUnixCredentialsMessage type and @@ -1186,8 +1187,7 @@ public class Socket : ObjectG, DatagramBasedIF, InitableIF * On error -1 is returned and @error is set accordingly. * * Params: - * buffer = a buffer to - * read data into (which should be at least @size bytes long). + * buffer = a buffer to read data into (which should be at least @size bytes long). * cancellable = a %GCancellable or %NULL * * Returns: Number of bytes read, or 0 if the connection was closed by @@ -1223,8 +1223,7 @@ public class Socket : ObjectG, DatagramBasedIF, InitableIF * Params: * address = a pointer to a #GSocketAddress * pointer, or %NULL - * buffer = a buffer to - * read data into (which should be at least @size bytes long). + * buffer = a buffer to read data into (which should be at least @size bytes long). * cancellable = a %GCancellable or %NULL * * Returns: Number of bytes read, or 0 if the connection was closed by @@ -1442,8 +1441,7 @@ public class Socket : ObjectG, DatagramBasedIF, InitableIF * the @blocking argument rather than by @socket's properties. * * Params: - * buffer = a buffer to - * read data into (which should be at least @size bytes long). + * buffer = a buffer to read data into (which should be at least @size bytes long). * blocking = whether to do blocking or non-blocking I/O * cancellable = a %GCancellable or %NULL * @@ -1454,11 +1452,11 @@ public class Socket : ObjectG, DatagramBasedIF, InitableIF * * Throws: GException on failure. */ - public ptrdiff_t receiveWithBlocking(string buffer, bool blocking, Cancellable cancellable) + public ptrdiff_t receiveWithBlocking(out char[] buffer, bool blocking, Cancellable cancellable) { GError* err = null; - auto __p = g_socket_receive_with_blocking(gSocket, Str.toStringz(buffer), cast(size_t)buffer.length, blocking, (cancellable is null) ? null : cancellable.getCancellableStruct(), &err); + auto __p = g_socket_receive_with_blocking(gSocket, buffer.ptr, cast(size_t)buffer.length, blocking, (cancellable is null) ? null : cancellable.getCancellableStruct(), &err); if (err !is null) { @@ -1547,6 +1545,11 @@ public class Socket : ObjectG, DatagramBasedIF, InitableIF * notified of a %G_IO_OUT condition. (On Windows in particular, this is * very common due to the way the underlying APIs work.) * + * The sum of the sizes of each #GOutputVector in vectors must not be + * greater than %G_MAXSSIZE. If the message can be larger than this, + * then it is mandatory to use the g_socket_send_message_with_timeout() + * function. + * * On error -1 is returned and @error is set accordingly. * * Params: diff --git a/generated/gtkd/gio/SocketAddressEnumerator.d b/generated/gtkd/gio/SocketAddressEnumerator.d index e101d6cc5..3af3b22de 100644 --- a/generated/gtkd/gio/SocketAddressEnumerator.d +++ b/generated/gtkd/gio/SocketAddressEnumerator.d @@ -47,7 +47,7 @@ public import gtkc.giotypes; * g_socket_address_enumerator_next_finish() should be used where possible. * * Each #GSocketAddressEnumerator can only be enumerated once. Once - * g_socket_address_enumerator_next() has returned %NULL (and no error), further + * g_socket_address_enumerator_next() has returned %NULL, further * enumeration with that #GSocketAddressEnumerator is not possible, and it can * be unreffed. */ diff --git a/generated/gtkd/gio/SocketClient.d b/generated/gtkd/gio/SocketClient.d index 14ebe7e1e..e693c7203 100644 --- a/generated/gtkd/gio/SocketClient.d +++ b/generated/gtkd/gio/SocketClient.d @@ -198,6 +198,15 @@ public class SocketClient : ObjectG /** * This is the asynchronous version of g_socket_client_connect(). * + * You may wish to prefer the asynchronous version even in synchronous + * command line programs because, since 2.60, it implements + * [RFC 8305](https://tools.ietf.org/html/rfc8305) "Happy Eyeballs" + * recommendations to work around long connection timeouts in networks + * where IPv6 is broken by performing an IPv4 connection simultaneously + * without waiting for IPv6 to time out, which is not supported by the + * synchronous call. (This is not an API guarantee, and may change in + * the future.) + * * When the operation is finished @callback will be * called. You can then call g_socket_client_connect_finish() to get * the result of the operation. @@ -686,6 +695,12 @@ public class SocketClient : ObjectG * Gets the TLS validation flags used creating TLS connections via * @client. * + * This function does not work as originally designed and is impossible + * to use correctly. See #GSocketClient:tls-validation-flags for more + * information. + * + * Deprecated: Do not attempt to ignore validation errors. + * * Returns: the TLS validation flags * * Since: 2.28 @@ -860,6 +875,12 @@ public class SocketClient : ObjectG * Sets the TLS validation flags used when creating TLS connections * via @client. The default value is %G_TLS_CERTIFICATE_VALIDATE_ALL. * + * This function does not work as originally designed and is impossible + * to use correctly. See #GSocketClient:tls-validation-flags for more + * information. + * + * Deprecated: Do not attempt to ignore validation errors. + * * Params: * flags = the validation flags * @@ -915,7 +936,7 @@ public class SocketClient : ObjectG * multiple times (or not at all) for a given connectable (in * particular, if @client ends up attempting to connect to more than * one address). However, if @client emits the #GSocketClient::event - * signal at all for a given connectable, that it will always emit + * signal at all for a given connectable, then it will always emit * it with %G_SOCKET_CLIENT_COMPLETE when it is done. * * Note that there may be additional #GSocketClientEvent values in diff --git a/generated/gtkd/gio/SocketConnectableIF.d b/generated/gtkd/gio/SocketConnectableIF.d index 8f7dbba81..16d060b0d 100644 --- a/generated/gtkd/gio/SocketConnectableIF.d +++ b/generated/gtkd/gio/SocketConnectableIF.d @@ -28,6 +28,7 @@ private import gio.SocketAddressEnumerator; private import gio.c.functions; public import gio.c.types; private import glib.Str; +private import glib.c.functions; private import gobject.ObjectG; public import gtkc.giotypes; diff --git a/generated/gtkd/gio/SocketConnectableT.d b/generated/gtkd/gio/SocketConnectableT.d index 5a6ec4ca2..54ba8efe5 100644 --- a/generated/gtkd/gio/SocketConnectableT.d +++ b/generated/gtkd/gio/SocketConnectableT.d @@ -28,6 +28,7 @@ public import gio.SocketAddressEnumerator; public import gio.c.functions; public import gio.c.types; public import glib.Str; +public import glib.c.functions; public import gobject.ObjectG; public import gtkc.giotypes; diff --git a/generated/gtkd/gio/SocketListener.d b/generated/gtkd/gio/SocketListener.d index 909919c4a..8f3983fd6 100644 --- a/generated/gtkd/gio/SocketListener.d +++ b/generated/gtkd/gio/SocketListener.d @@ -165,7 +165,7 @@ public class SocketListener : ObjectG * This is the asynchronous version of g_socket_listener_accept(). * * When the operation is finished @callback will be - * called. You can then call g_socket_listener_accept_socket() + * called. You can then call g_socket_listener_accept_finish() * to get the result of the operation. * * Params: diff --git a/generated/gtkd/gio/SrvTarget.d b/generated/gtkd/gio/SrvTarget.d index 3c6c5e23d..1cc33fc60 100644 --- a/generated/gtkd/gio/SrvTarget.d +++ b/generated/gtkd/gio/SrvTarget.d @@ -29,6 +29,7 @@ public import gio.c.types; private import glib.ConstructionException; private import glib.ListG; private import glib.Str; +private import glib.c.functions; private import gobject.ObjectG; public import gtkc.giotypes; private import gtkd.Loader; diff --git a/generated/gtkd/gio/Subprocess.d b/generated/gtkd/gio/Subprocess.d index a42a9dcf7..57af3000e 100644 --- a/generated/gtkd/gio/Subprocess.d +++ b/generated/gtkd/gio/Subprocess.d @@ -37,6 +37,7 @@ private import glib.ConstructionException; private import glib.ErrorG; private import glib.GException; private import glib.Str; +private import glib.c.functions; private import gobject.ObjectG; public import gtkc.giotypes; @@ -82,7 +83,10 @@ public import gtkc.giotypes; * As a matter of principle, #GSubprocess has no API that accepts * shell-style space-separated strings. It will, however, match the * typical shell behaviour of searching the PATH for executables that do - * not contain a directory separator in their name. + * not contain a directory separator in their name. By default, the `PATH` + * of the current process is used. You can specify + * %G_SUBPROCESS_FLAGS_SEARCH_PATH_FROM_ENVP to use the `PATH` of the + * launcher environment instead. * * #GSubprocess attempts to have a very simple API for most uses (ie: * spawning a subprocess with arguments and support for most typical @@ -459,7 +463,7 @@ public class Subprocess : ObjectG, InitableIF * * This value has no particular meaning, but it can be used with the * macros defined by the system headers such as WIFEXITED. It can also - * be used with g_spawn_check_exit_status(). + * be used with g_spawn_check_wait_status(). * * It is more likely that you want to use g_subprocess_get_if_exited() * followed by g_subprocess_get_exit_status(). @@ -480,8 +484,8 @@ public class Subprocess : ObjectG, InitableIF * Gets the #GInputStream from which to read the stderr output of * @subprocess. * - * The process must have been created with - * %G_SUBPROCESS_FLAGS_STDERR_PIPE. + * The process must have been created with %G_SUBPROCESS_FLAGS_STDERR_PIPE, + * otherwise %NULL will be returned. * * Returns: the stderr pipe * @@ -503,8 +507,8 @@ public class Subprocess : ObjectG, InitableIF * Gets the #GOutputStream that you can write to in order to give data * to the stdin of @subprocess. * - * The process must have been created with - * %G_SUBPROCESS_FLAGS_STDIN_PIPE. + * The process must have been created with %G_SUBPROCESS_FLAGS_STDIN_PIPE and + * not %G_SUBPROCESS_FLAGS_STDIN_INHERIT, otherwise %NULL will be returned. * * Returns: the stdout pipe * @@ -526,8 +530,8 @@ public class Subprocess : ObjectG, InitableIF * Gets the #GInputStream from which to read the stdout output of * @subprocess. * - * The process must have been created with - * %G_SUBPROCESS_FLAGS_STDOUT_PIPE. + * The process must have been created with %G_SUBPROCESS_FLAGS_STDOUT_PIPE, + * otherwise %NULL will be returned. * * Returns: the stdout pipe * @@ -653,7 +657,7 @@ public class Subprocess : ObjectG, InitableIF } /** - * Combines g_subprocess_wait() with g_spawn_check_exit_status(). + * Combines g_subprocess_wait() with g_spawn_check_wait_status(). * * Params: * cancellable = a #GCancellable @@ -680,7 +684,7 @@ public class Subprocess : ObjectG, InitableIF } /** - * Combines g_subprocess_wait_async() with g_spawn_check_exit_status(). + * Combines g_subprocess_wait_async() with g_spawn_check_wait_status(). * * This is the asynchronous version of g_subprocess_wait_check(). * diff --git a/generated/gtkd/gio/SubprocessLauncher.d b/generated/gtkd/gio/SubprocessLauncher.d index 4194d1ef4..c62be62a6 100644 --- a/generated/gtkd/gio/SubprocessLauncher.d +++ b/generated/gtkd/gio/SubprocessLauncher.d @@ -31,6 +31,7 @@ private import glib.ConstructionException; private import glib.ErrorG; private import glib.GException; private import glib.Str; +private import glib.c.functions; private import gobject.ObjectG; public import gtkc.giotypes; @@ -108,6 +109,25 @@ public class SubprocessLauncher : ObjectG this(cast(GSubprocessLauncher*) __p, true); } + /** + * Closes all the file descriptors previously passed to the object with + * g_subprocess_launcher_take_fd(), g_subprocess_launcher_take_stderr_fd(), etc. + * + * After calling this method, any subsequent calls to g_subprocess_launcher_spawn() or g_subprocess_launcher_spawnv() will + * return %G_IO_ERROR_CLOSED. This method is idempotent if + * called more than once. + * + * This function is called automatically when the #GSubprocessLauncher + * is disposed, but is provided separately so that garbage collected + * language bindings can call it earlier to guarantee when FDs are closed. + * + * Since: 2.68 + */ + public void close() + { + g_subprocess_launcher_close(gSubprocessLauncher); + } + /** * Returns the value of the environment variable @variable in the * environment of processes launched from this launcher. @@ -349,16 +369,16 @@ public class SubprocessLauncher : ObjectG /** * Transfer an arbitrary file descriptor from parent process to the - * child. This function takes "ownership" of the fd; it will be closed + * child. This function takes ownership of the @source_fd; it will be closed * in the parent when @self is freed. * * By default, all file descriptors from the parent will be closed. - * This function allows you to create (for example) a custom pipe() or - * socketpair() before launching the process, and choose the target + * This function allows you to create (for example) a custom `pipe()` or + * `socketpair()` before launching the process, and choose the target * descriptor in the child. * * An example use case is GNUPG, which has a command line argument - * --passphrase-fd providing a file descriptor number where it expects + * `--passphrase-fd` providing a file descriptor number where it expects * the passphrase to be written. * * Params: diff --git a/generated/gtkd/gio/Task.d b/generated/gtkd/gio/Task.d index 470fa94ac..2f740376c 100644 --- a/generated/gtkd/gio/Task.d +++ b/generated/gtkd/gio/Task.d @@ -36,6 +36,7 @@ private import glib.MainContext; private import glib.MemorySlice; private import glib.Source; private import glib.Str; +private import glib.c.functions; private import gobject.ObjectG; private import gobject.Value; public import gtkc.giotypes; @@ -63,6 +64,10 @@ public import gtkc.giotypes; * use g_task_propagate_pointer() or the like to extract the * return value. * + * Using #GTask requires the thread-default #GMainContext from when the + * #GTask was constructed to be running at least until the task has completed + * and its data has been freed. + * * Here is an example for using GTask as a GAsyncResult: * |[ * typedef struct { @@ -1075,7 +1080,7 @@ public class Task : ObjectG, AsyncResultIF /** * Sets @task's result to @result (by copying it) and completes the task. * - * If @result is %NULL then a #GValue of type #G_TYPE_POINTER + * If @result is %NULL then a #GValue of type %G_TYPE_POINTER * with a value of %NULL will be used for the result. * * This is a very generic low-level method intended primarily for use @@ -1103,9 +1108,9 @@ public class Task : ObjectG, AsyncResultIF * * Although GLib currently rate-limits the tasks queued via * g_task_run_in_thread(), you should not assume that it will always - * do this. If you have a very large number of tasks to run, but don't - * want them to all run at once, you should only queue a limited - * number of them at a time. + * do this. If you have a very large number of tasks to run (several tens of + * tasks), but don't want them to all run at once, you should only queue a + * limited number of them (around ten) at a time. * * Params: * taskFunc = a #GTaskThreadFunc @@ -1181,7 +1186,8 @@ public class Task : ObjectG, AsyncResultIF * name of the #GSource used for idle completion of the task. * * This function may only be called before the @task is first used in a thread - * other than the one it was constructed in. + * other than the one it was constructed in. It is called automatically by + * g_task_set_source_tag() if not called already. * * Params: * name = a human readable name for the task, or %NULL to unset it @@ -1223,7 +1229,7 @@ public class Task : ObjectG, AsyncResultIF * g_task_return_error_if_cancelled() and then returned. * * This allows you to create a cancellable wrapper around an - * uninterruptable function. The #GTaskThreadFunc just needs to be + * uninterruptible function. The #GTaskThreadFunc just needs to be * careful that it does not modify any externally-visible state after * it has been cancelled. To do that, the thread should call * g_task_set_return_on_cancel() again to (atomically) set @@ -1258,13 +1264,19 @@ public class Task : ObjectG, AsyncResultIF } /** - * Sets @task's source tag. You can use this to tag a task return + * Sets @task's source tag. + * + * You can use this to tag a task return * value with a particular pointer (usually a pointer to the function * doing the tagging) and then later check it using * g_task_get_source_tag() (or g_async_result_is_tagged()) in the * task's "finish" function, to figure out if the response came from a * particular place. * + * A macro wrapper around this function will automatically set the + * task’s name to the string form of @source_tag if it’s not already + * set, for convenience. + * * Params: * sourceTag = an opaque pointer indicating the source of this task * diff --git a/generated/gtkd/gio/TcpWrapperConnection.d b/generated/gtkd/gio/TcpWrapperConnection.d index a33f491d0..bd7d43818 100644 --- a/generated/gtkd/gio/TcpWrapperConnection.d +++ b/generated/gtkd/gio/TcpWrapperConnection.d @@ -105,7 +105,7 @@ public class TcpWrapperConnection : TcpConnection } /** - * Get's @conn's base #GIOStream + * Gets @conn's base #GIOStream * * Returns: @conn's base #GIOStream */ diff --git a/generated/gtkd/gio/TestDBus.d b/generated/gtkd/gio/TestDBus.d index 9c19e369b..b203f5507 100644 --- a/generated/gtkd/gio/TestDBus.d +++ b/generated/gtkd/gio/TestDBus.d @@ -28,6 +28,7 @@ private import gio.c.functions; public import gio.c.types; private import glib.ConstructionException; private import glib.Str; +private import glib.c.functions; private import gobject.ObjectG; public import gtkc.giotypes; @@ -77,7 +78,7 @@ public import gtkc.giotypes; * * An example of a test fixture for D-Bus services can be found * here: - * [gdbus-test-fixture.c](https://git.gnome.org/browse/glib/tree/gio/tests/gdbus-test-fixture.c) + * [gdbus-test-fixture.c](https://gitlab.gnome.org/GNOME/glib/-/blob/HEAD/gio/tests/gdbus-test-fixture.c) * * Note that these examples only deal with isolating the D-Bus aspect of your * service. To successfully run isolated unit tests on your service you may need diff --git a/generated/gtkd/gio/ThemedIcon.d b/generated/gtkd/gio/ThemedIcon.d index 15c325076..a4bde7bb0 100644 --- a/generated/gtkd/gio/ThemedIcon.d +++ b/generated/gtkd/gio/ThemedIcon.d @@ -30,6 +30,7 @@ private import gio.c.functions; public import gio.c.types; private import glib.ConstructionException; private import glib.Str; +private import glib.c.functions; private import gobject.ObjectG; public import gtkc.giotypes; diff --git a/generated/gtkd/gio/TlsBackendIF.d b/generated/gtkd/gio/TlsBackendIF.d index 1ff6d9299..0d4ed62a8 100644 --- a/generated/gtkd/gio/TlsBackendIF.d +++ b/generated/gtkd/gio/TlsBackendIF.d @@ -54,7 +54,8 @@ public interface TlsBackendIF{ /** * Gets the default #GTlsBackend for the system. * - * Returns: a #GTlsBackend + * Returns: a #GTlsBackend, which will be a + * dummy object if no TLS backend is available * * Since: 2.28 */ diff --git a/generated/gtkd/gio/TlsCertificate.d b/generated/gtkd/gio/TlsCertificate.d index c9a347b97..0c59b53f2 100644 --- a/generated/gtkd/gio/TlsCertificate.d +++ b/generated/gtkd/gio/TlsCertificate.d @@ -28,10 +28,13 @@ private import gio.SocketConnectableIF; private import gio.c.functions; public import gio.c.types; private import glib.ConstructionException; +private import glib.DateTime; private import glib.ErrorG; private import glib.GException; private import glib.ListG; +private import glib.PtrArray; private import glib.Str; +private import glib.c.functions; private import gobject.ObjectG; public import gtkc.giotypes; @@ -81,22 +84,18 @@ public class TlsCertificate : ObjectG } /** - * Creates a #GTlsCertificate from the PEM-encoded data in @file. The - * returned certificate will be the first certificate found in @file. As - * of GLib 2.44, if @file contains more certificates it will try to load - * a certificate chain. All certificates will be verified in the order - * found (top-level certificate should be the last one in the file) and - * the #GTlsCertificate:issuer property of each certificate will be set - * accordingly if the verification succeeds. If any certificate in the - * chain cannot be verified, the first certificate in the file will - * still be returned. + * Creates a #GTlsCertificate from the data in @file. + * + * As of 2.72, if the filename ends in `.p12` or `.pfx` the data is loaded by + * g_tls_certificate_new_from_pkcs12() otherwise it is loaded by + * g_tls_certificate_new_from_pem(). See those functions for + * exact details. * * If @file cannot be read or parsed, the function will return %NULL and - * set @error. Otherwise, this behaves like - * g_tls_certificate_new_from_pem(). + * set @error. * * Params: - * file = file containing a PEM-encoded certificate to import + * file = file containing a certificate to import * * Returns: the new certificate, or %NULL on error * @@ -218,6 +217,55 @@ public class TlsCertificate : ObjectG this(cast(GTlsCertificate*) __p, true); } + /** + * Creates a #GTlsCertificate from the data in @data. It must contain + * a certificate and matching private key. + * + * If extra certificates are included they will be verified as a chain + * and the #GTlsCertificate:issuer property will be set. + * All other data will be ignored. + * + * You can pass as single password for all of the data which will be + * used both for the PKCS #12 container as well as encrypted + * private keys. If decryption fails it will error with + * %G_TLS_ERROR_BAD_CERTIFICATE_PASSWORD. + * + * This constructor requires support in the current #GTlsBackend. + * If support is missing it will error with + * %G_IO_ERROR_NOT_SUPPORTED. + * + * Other parsing failures will error with %G_TLS_ERROR_BAD_CERTIFICATE. + * + * Params: + * data = DER-encoded PKCS #12 format certificate data + * password = optional password for encrypted certificate data + * + * Returns: the new certificate, or %NULL if @data is invalid + * + * Since: 2.72 + * + * Throws: GException on failure. + * Throws: ConstructionException GTK+ fails to create the object. + */ + public this(ubyte[] data, string password) + { + GError* err = null; + + auto __p = g_tls_certificate_new_from_pkcs12(data.ptr, cast(size_t)data.length, Str.toStringz(password), &err); + + if (err !is null) + { + throw new GException( new ErrorG(err) ); + } + + if(__p is null) + { + throw new ConstructionException("null returned by new_from_pkcs12"); + } + + this(cast(GTlsCertificate*) __p, true); + } + /** * Creates one or more #GTlsCertificates from the PEM-encoded * data in @file. If @file cannot be read or parsed, the function will @@ -255,6 +303,46 @@ public class TlsCertificate : ObjectG return new ListG(cast(GList*) __p, true); } + /** + * Gets the value of #GTlsCertificate:dns-names. + * + * Returns: A #GPtrArray of + * #GBytes elements, or %NULL if it's not available. + * + * Since: 2.70 + */ + public PtrArray getDnsNames() + { + auto __p = g_tls_certificate_get_dns_names(gTlsCertificate); + + if(__p is null) + { + return null; + } + + return new PtrArray(cast(GPtrArray*) __p); + } + + /** + * Gets the value of #GTlsCertificate:ip-addresses. + * + * Returns: A #GPtrArray + * of #GInetAddress elements, or %NULL if it's not available. + * + * Since: 2.70 + */ + public PtrArray getIpAddresses() + { + auto __p = g_tls_certificate_get_ip_addresses(gTlsCertificate); + + if(__p is null) + { + return null; + } + + return new PtrArray(cast(GPtrArray*) __p); + } + /** * Gets the #GTlsCertificate representing @cert's issuer, if known * @@ -276,6 +364,74 @@ public class TlsCertificate : ObjectG return ObjectG.getDObject!(TlsCertificate)(cast(GTlsCertificate*) __p); } + /** + * Returns the issuer name from the certificate. + * + * Returns: The issuer name, or %NULL if it's not available. + * + * Since: 2.70 + */ + public string getIssuerName() + { + auto retStr = g_tls_certificate_get_issuer_name(gTlsCertificate); + + scope(exit) Str.freeString(retStr); + return Str.toString(retStr); + } + + /** + * Returns the time at which the certificate became or will become invalid. + * + * Returns: The not-valid-after date, or %NULL if it's not available. + * + * Since: 2.70 + */ + public DateTime getNotValidAfter() + { + auto __p = g_tls_certificate_get_not_valid_after(gTlsCertificate); + + if(__p is null) + { + return null; + } + + return new DateTime(cast(GDateTime*) __p, true); + } + + /** + * Returns the time at which the certificate became or will become valid. + * + * Returns: The not-valid-before date, or %NULL if it's not available. + * + * Since: 2.70 + */ + public DateTime getNotValidBefore() + { + auto __p = g_tls_certificate_get_not_valid_before(gTlsCertificate); + + if(__p is null) + { + return null; + } + + return new DateTime(cast(GDateTime*) __p, true); + } + + /** + * Returns the subject name from the certificate. + * + * Returns: The subject name, or %NULL if it's not available. + * + * Since: 2.70 + */ + public string getSubjectName() + { + auto retStr = g_tls_certificate_get_subject_name(gTlsCertificate); + + scope(exit) Str.freeString(retStr); + return Str.toString(retStr); + } + /** * Check if two #GTlsCertificate objects represent the same certificate. * The raw DER byte data of the two certificates are checked for equality. @@ -313,8 +469,20 @@ public class TlsCertificate : ObjectG * @trusted_ca is %NULL, that bit will never be set in the return * value. * - * (All other #GTlsCertificateFlags values will always be set or unset - * as appropriate.) + * GLib guarantees that if certificate verification fails, at least one + * error will be set in the return value, but it does not guarantee + * that all possible errors will be set. Accordingly, you may not safely + * decide to ignore any particular type of error. For example, it would + * be incorrect to mask %G_TLS_CERTIFICATE_EXPIRED if you want to allow + * expired certificates, because this could potentially be the only + * error flag set even if other problems exist with the certificate. + * + * Because TLS session context is not used, #GTlsCertificate may not + * perform as many checks on the certificates as #GTlsConnection would. + * For example, certificate constraints may not be honored, and + * revocation checks may not be performed. The best way to verify TLS + * certificates used by a TLS connection is to let #GTlsConnection + * handle the verification. * * Params: * identity = the expected peer identity diff --git a/generated/gtkd/gio/TlsClientConnectionIF.d b/generated/gtkd/gio/TlsClientConnectionIF.d index 09841cfef..43e106b3d 100644 --- a/generated/gtkd/gio/TlsClientConnectionIF.d +++ b/generated/gtkd/gio/TlsClientConnectionIF.d @@ -136,6 +136,12 @@ public interface TlsClientConnectionIF{ /** * Gets @conn's validation flags * + * This function does not work as originally designed and is impossible + * to use correctly. See #GTlsClientConnection:validation-flags for more + * information. + * + * Deprecated: Do not attempt to ignore validation errors. + * * Returns: the validation flags * * Since: 2.28 @@ -181,6 +187,12 @@ public interface TlsClientConnectionIF{ * checks performed when validating a server certificate. By default, * %G_TLS_CERTIFICATE_VALIDATE_ALL is used. * + * This function does not work as originally designed and is impossible + * to use correctly. See #GTlsClientConnection:validation-flags for more + * information. + * + * Deprecated: Do not attempt to ignore validation errors. + * * Params: * flags = the #GTlsCertificateFlags to use * diff --git a/generated/gtkd/gio/TlsClientConnectionT.d b/generated/gtkd/gio/TlsClientConnectionT.d index f155cf96f..6874761dc 100644 --- a/generated/gtkd/gio/TlsClientConnectionT.d +++ b/generated/gtkd/gio/TlsClientConnectionT.d @@ -159,6 +159,12 @@ public template TlsClientConnectionT(TStruct) /** * Gets @conn's validation flags * + * This function does not work as originally designed and is impossible + * to use correctly. See #GTlsClientConnection:validation-flags for more + * information. + * + * Deprecated: Do not attempt to ignore validation errors. + * * Returns: the validation flags * * Since: 2.28 @@ -213,6 +219,12 @@ public template TlsClientConnectionT(TStruct) * checks performed when validating a server certificate. By default, * %G_TLS_CERTIFICATE_VALIDATE_ALL is used. * + * This function does not work as originally designed and is impossible + * to use correctly. See #GTlsClientConnection:validation-flags for more + * information. + * + * Deprecated: Do not attempt to ignore validation errors. + * * Params: * flags = the #GTlsCertificateFlags to use * diff --git a/generated/gtkd/gio/TlsConnection.d b/generated/gtkd/gio/TlsConnection.d index c46910923..780545180 100644 --- a/generated/gtkd/gio/TlsConnection.d +++ b/generated/gtkd/gio/TlsConnection.d @@ -32,9 +32,12 @@ private import gio.TlsDatabase; private import gio.TlsInteraction; private import gio.c.functions; public import gio.c.types; +private import glib.ByteArray; private import glib.ErrorG; private import glib.GException; +private import glib.MemorySlice; private import glib.Str; +private import glib.c.functions; private import gobject.ObjectG; private import gobject.Signals; public import gtkc.giotypes; @@ -124,6 +127,71 @@ public class TlsConnection : IOStream return ObjectG.getDObject!(TlsCertificate)(cast(GTlsCertificate*) __p); } + /** + * Query the TLS backend for TLS channel binding data of @type for @conn. + * + * This call retrieves TLS channel binding data as specified in RFC + * [5056](https://tools.ietf.org/html/rfc5056), RFC + * [5929](https://tools.ietf.org/html/rfc5929), and related RFCs. The + * binding data is returned in @data. The @data is resized by the callee + * using #GByteArray buffer management and will be freed when the @data + * is destroyed by g_byte_array_unref(). If @data is %NULL, it will only + * check whether TLS backend is able to fetch the data (e.g. whether @type + * is supported by the TLS backend). It does not guarantee that the data + * will be available though. That could happen if TLS connection does not + * support @type or the binding data is not available yet due to additional + * negotiation or input required. + * + * Params: + * type = #GTlsChannelBindingType type of data to fetch + * data = #GByteArray is + * filled with the binding data, or %NULL + * + * Returns: %TRUE on success, %FALSE otherwise + * + * Since: 2.66 + * + * Throws: GException on failure. + */ + public bool getChannelBindingData(GTlsChannelBindingType type, out ByteArray data) + { + GByteArray* outdata = sliceNew!GByteArray(); + GError* err = null; + + auto __p = g_tls_connection_get_channel_binding_data(gTlsConnection, type, outdata, &err) != 0; + + if (err !is null) + { + throw new GException( new ErrorG(err) ); + } + + data = new ByteArray(outdata, true); + + return __p; + } + + /** + * Returns the name of the current TLS ciphersuite, or %NULL if the + * connection has not handshaked or has been closed. Beware that the TLS + * backend may use any of multiple different naming conventions, because + * OpenSSL and GnuTLS have their own ciphersuite naming conventions that + * are different from each other and different from the standard, IANA- + * registered ciphersuite names. The ciphersuite name is intended to be + * displayed to the user for informative purposes only, and parsing it + * is not recommended. + * + * Returns: The name of the current TLS ciphersuite, or %NULL + * + * Since: 2.70 + */ + public string getCiphersuiteName() + { + auto retStr = g_tls_connection_get_ciphersuite_name(gTlsConnection); + + scope(exit) Str.freeString(retStr); + return Str.toString(retStr); + } + /** * Gets the certificate database that @conn uses to verify * peer certificates. See g_tls_connection_set_database(). @@ -184,8 +252,8 @@ public class TlsConnection : IOStream } /** - * Gets @conn's peer's certificate after the handshake has completed. - * (It is not set during the emission of + * Gets @conn's peer's certificate after the handshake has completed + * or failed. (It is not set during the emission of * #GTlsConnection::accept-certificate.) * * Returns: @conn's peer's certificate, or %NULL @@ -206,8 +274,10 @@ public class TlsConnection : IOStream /** * Gets the errors associated with validating @conn's peer's - * certificate, after the handshake has completed. (It is not set - * during the emission of #GTlsConnection::accept-certificate.) + * certificate, after the handshake has completed or failed. (It is + * not set during the emission of #GTlsConnection::accept-certificate.) + * + * See #GTlsConnection:peer-certificate-errors for more information. * * Returns: @conn's peer's certificate errors * @@ -218,6 +288,21 @@ public class TlsConnection : IOStream return g_tls_connection_get_peer_certificate_errors(gTlsConnection); } + /** + * Returns the current TLS protocol version, which may be + * %G_TLS_PROTOCOL_VERSION_UNKNOWN if the connection has not handshaked, or + * has been closed, or if the TLS backend has implemented a protocol version + * that is not a recognized #GTlsProtocolVersion. + * + * Returns: The current TLS protocol version + * + * Since: 2.70 + */ + public GTlsProtocolVersion getProtocolVersion() + { + return g_tls_connection_get_protocol_version(gTlsConnection); + } + /** * Gets @conn rehandshaking mode. See * g_tls_connection_set_rehandshake_mode() for details. @@ -427,6 +512,9 @@ public class TlsConnection : IOStream * client-side connections, unless that bit is not set in * #GTlsClientConnection:validation-flags). * + * There are nonintuitive security implications when using a non-default + * database. See #GDtlsConnection:database for details. + * * Params: * database = a #GTlsDatabase * @@ -546,6 +634,15 @@ public class TlsConnection : IOStream * signal handler. Otherwise, if no handler accepts the certificate, * the handshake will fail with %G_TLS_ERROR_BAD_CERTIFICATE. * + * GLib guarantees that if certificate verification fails, this signal + * will be emitted with at least one error will be set in @errors, but + * it does not guarantee that all possible errors will be set. + * Accordingly, you may not safely decide to ignore any particular + * type of error. For example, it would be incorrect to ignore + * %G_TLS_CERTIFICATE_EXPIRED if you want to allow expired + * certificates, because this could potentially be the only error flag + * set even if other problems exist with the certificate. + * * For a server-side connection, @peer_cert is the certificate * presented by the client, if this was requested via the server's * #GTlsServerConnection:authentication_mode. On the server side, diff --git a/generated/gtkd/gio/TlsDatabase.d b/generated/gtkd/gio/TlsDatabase.d index 1b604c2df..390cf2976 100644 --- a/generated/gtkd/gio/TlsDatabase.d +++ b/generated/gtkd/gio/TlsDatabase.d @@ -36,6 +36,7 @@ private import glib.ErrorG; private import glib.GException; private import glib.ListG; private import glib.Str; +private import glib.c.functions; private import gobject.ObjectG; public import gtkc.giotypes; @@ -216,14 +217,26 @@ public class TlsDatabase : ObjectG } /** - * Look up the issuer of @certificate in the database. - * - * The #GTlsCertificate:issuer property - * of @certificate is not modified, and the two certificates are not hooked - * into a chain. - * - * This function can block, use g_tls_database_lookup_certificate_issuer_async() to perform - * the lookup operation asynchronously. + * Look up the issuer of @certificate in the database. The + * #GTlsCertificate:issuer property of @certificate is not modified, and + * the two certificates are not hooked into a chain. + * + * This function can block. Use g_tls_database_lookup_certificate_issuer_async() + * to perform the lookup operation asynchronously. + * + * Beware this function cannot be used to build certification paths. The + * issuer certificate returned by this function may not be the same as + * the certificate that would actually be used to construct a valid + * certification path during certificate verification. + * [RFC 4158](https://datatracker.ietf.org/doc/html/rfc4158) explains + * why an issuer certificate cannot be naively assumed to be part of the + * the certification path (though GLib's TLS backends may not follow the + * path building strategies outlined in this RFC). Due to the complexity + * of certification path building, GLib does not provide any way to know + * which certification path will actually be used when verifying a TLS + * certificate. Accordingly, this function cannot be used to make + * security-related decisions. Only GLib itself should make security + * decisions about TLS certificates. * * Params: * certificate = a #GTlsCertificate @@ -404,39 +417,66 @@ public class TlsDatabase : ObjectG } /** - * Determines the validity of a certificate chain after looking up and - * adding any missing certificates to the chain. + * Determines the validity of a certificate chain, outside the context + * of a TLS session. * * @chain is a chain of #GTlsCertificate objects each pointing to the next - * certificate in the chain by its #GTlsCertificate:issuer property. The chain may initially - * consist of one or more certificates. After the verification process is - * complete, @chain may be modified by adding missing certificates, or removing - * extra certificates. If a certificate anchor was found, then it is added to - * the @chain. + * certificate in the chain by its #GTlsCertificate:issuer property. * * @purpose describes the purpose (or usage) for which the certificate - * is being used. Typically @purpose will be set to #G_TLS_DATABASE_PURPOSE_AUTHENTICATE_SERVER + * is being used. Typically @purpose will be set to %G_TLS_DATABASE_PURPOSE_AUTHENTICATE_SERVER * which means that the certificate is being used to authenticate a server * (and we are acting as the client). * - * The @identity is used to check for pinned certificates (trust exceptions) - * in the database. These will override the normal verification process on a - * host by host basis. + * The @identity is used to ensure the server certificate is valid for + * the expected peer identity. If the identity does not match the + * certificate, %G_TLS_CERTIFICATE_BAD_IDENTITY will be set in the + * return value. If @identity is %NULL, that bit will never be set in + * the return value. The peer identity may also be used to check for + * pinned certificates (trust exceptions) in the database. These may + * override the normal verification process on a host-by-host basis. * * Currently there are no @flags, and %G_TLS_DATABASE_VERIFY_NONE should be * used. * * If @chain is found to be valid, then the return value will be 0. If - * @chain is found to be invalid, then the return value will indicate - * the problems found. If the function is unable to determine whether - * @chain is valid or not (eg, because @cancellable is triggered - * before it completes) then the return value will be - * %G_TLS_CERTIFICATE_GENERIC_ERROR and @error will be set - * accordingly. @error is not set when @chain is successfully analyzed - * but found to be invalid. - * - * This function can block, use g_tls_database_verify_chain_async() to perform - * the verification operation asynchronously. + * @chain is found to be invalid, then the return value will indicate at + * least one problem found. If the function is unable to determine + * whether @chain is valid (for example, because @cancellable is + * triggered before it completes) then the return value will be + * %G_TLS_CERTIFICATE_GENERIC_ERROR and @error will be set accordingly. + * @error is not set when @chain is successfully analyzed but found to + * be invalid. + * + * GLib guarantees that if certificate verification fails, at least one + * error will be set in the return value, but it does not guarantee + * that all possible errors will be set. Accordingly, you may not safely + * decide to ignore any particular type of error. For example, it would + * be incorrect to mask %G_TLS_CERTIFICATE_EXPIRED if you want to allow + * expired certificates, because this could potentially be the only + * error flag set even if other problems exist with the certificate. + * + * Prior to GLib 2.48, GLib's default TLS backend modified @chain to + * represent the certification path built by #GTlsDatabase during + * certificate verification by adjusting the #GTlsCertificate:issuer + * property of each certificate in @chain. Since GLib 2.48, this no + * longer occurs, so you cannot rely on #GTlsCertificate:issuer to + * represent the actual certification path used during certificate + * verification. + * + * Because TLS session context is not used, #GTlsDatabase may not + * perform as many checks on the certificates as #GTlsConnection would. + * For example, certificate constraints may not be honored, and + * revocation checks may not be performed. The best way to verify TLS + * certificates used by a TLS connection is to let #GTlsConnection + * handle the verification. + * + * The TLS backend may attempt to look up and add missing certificates + * to the chain. This may involve HTTP requests to download missing + * certificates. + * + * This function can block. Use g_tls_database_verify_chain_async() to + * perform the verification operation asynchronously. * * Params: * chain = a #GTlsCertificate chain diff --git a/generated/gtkd/gio/TlsPassword.d b/generated/gtkd/gio/TlsPassword.d index 336bb30d1..267579b6a 100644 --- a/generated/gtkd/gio/TlsPassword.d +++ b/generated/gtkd/gio/TlsPassword.d @@ -28,6 +28,7 @@ private import gio.c.functions; public import gio.c.types; private import glib.ConstructionException; private import glib.Str; +private import glib.c.functions; private import gobject.ObjectG; public import gtkc.giotypes; diff --git a/generated/gtkd/gio/UnixConnection.d b/generated/gtkd/gio/UnixConnection.d index 3460bdcd9..59f064635 100644 --- a/generated/gtkd/gio/UnixConnection.d +++ b/generated/gtkd/gio/UnixConnection.d @@ -43,9 +43,12 @@ public import gtkc.giotypes; * It contains functions to do some of the UNIX socket specific * functionality like passing file descriptors. * - * Note that `` belongs to the UNIX-specific - * GIO interfaces, thus you have to use the `gio-unix-2.0.pc` - * pkg-config file when using it. + * Since GLib 2.72, #GUnixConnection is available on all platforms. It requires + * underlying system support (such as Windows 10 with `AF_UNIX`) at run time. + * + * Before GLib 2.72, `` belonged to the UNIX-specific GIO + * interfaces, thus you had to use the `gio-unix-2.0.pc` pkg-config file when + * using it. This is no longer necessary since GLib 2.72. * * Since: 2.22 */ diff --git a/generated/gtkd/gio/UnixCredentialsMessage.d b/generated/gtkd/gio/UnixCredentialsMessage.d index 06cd2f2b3..9e329b26f 100644 --- a/generated/gtkd/gio/UnixCredentialsMessage.d +++ b/generated/gtkd/gio/UnixCredentialsMessage.d @@ -45,6 +45,14 @@ public import gtkc.giotypes; * g_unix_connection_receive_credentials(). To receive credentials of * a foreign process connected to a socket, use * g_socket_get_credentials(). + * + * Since GLib 2.72, #GUnixCredentialMessage is available on all platforms. It + * requires underlying system support (such as Windows 10 with `AF_UNIX`) at run + * time. + * + * Before GLib 2.72, `` belonged to the UNIX-specific + * GIO interfaces, thus you had to use the `gio-unix-2.0.pc` pkg-config file + * when using it. This is no longer necessary since GLib 2.72. * * Since: 2.26 */ diff --git a/generated/gtkd/gio/UnixMountEntry.d b/generated/gtkd/gio/UnixMountEntry.d index 0868c73d4..cc29343c3 100644 --- a/generated/gtkd/gio/UnixMountEntry.d +++ b/generated/gtkd/gio/UnixMountEntry.d @@ -29,6 +29,7 @@ private import gio.c.functions; public import gio.c.types; private import glib.ListG; private import glib.Str; +private import glib.c.functions; private import gobject.ObjectG; public import gtkc.giotypes; @@ -98,6 +99,8 @@ public class UnixMountEntry * If more mounts have the same mount path, the last matching mount * is returned. * + * This will return %NULL if there is no mount point at @mount_path. + * * Params: * mountPath = path for a possible unix mount. * timeRead = guint64 to contain a timestamp. @@ -363,6 +366,9 @@ public class UnixMountEntry * If more mounts have the same mount path, the last matching mount * is returned. * + * This will return %NULL if looking up the mount entry fails, if + * @file_path doesn’t exist or there is an I/O error. + * * Params: * filePath = file path on some unix mount. * timeRead = guint64 to contain a timestamp. diff --git a/generated/gtkd/gio/UnixMountPoint.d b/generated/gtkd/gio/UnixMountPoint.d index 728f5a6c4..ad0e963f9 100644 --- a/generated/gtkd/gio/UnixMountPoint.d +++ b/generated/gtkd/gio/UnixMountPoint.d @@ -28,6 +28,7 @@ private import gio.IconIF; private import gio.c.functions; public import gio.c.types; private import glib.Str; +private import glib.c.functions; private import gobject.ObjectG; public import gtkc.giotypes; private import gtkd.Loader; @@ -253,4 +254,33 @@ public class UnixMountPoint { return g_unix_mount_point_is_user_mountable(gUnixMountPoint) != 0; } + + /** + * Gets a #GUnixMountPoint for a given mount path. If @time_read is set, it + * will be filled with a unix timestamp for checking if the mount points have + * changed since with g_unix_mount_points_changed_since(). + * + * If more mount points have the same mount path, the last matching mount point + * is returned. + * + * Params: + * mountPath = path for a possible unix mount point. + * timeRead = guint64 to contain a timestamp. + * + * Returns: a #GUnixMountPoint, or %NULL if no match + * is found. + * + * Since: 2.66 + */ + public static UnixMountPoint at(string mountPath, out ulong timeRead) + { + auto __p = g_unix_mount_point_at(Str.toStringz(mountPath), &timeRead); + + if(__p is null) + { + return null; + } + + return ObjectG.getDObject!(UnixMountPoint)(cast(GUnixMountPoint*) __p, true); + } } diff --git a/generated/gtkd/gio/UnixSocketAddress.d b/generated/gtkd/gio/UnixSocketAddress.d index 98f5d39cd..c08f6dfbd 100644 --- a/generated/gtkd/gio/UnixSocketAddress.d +++ b/generated/gtkd/gio/UnixSocketAddress.d @@ -29,6 +29,7 @@ private import gio.c.functions; public import gio.c.types; private import glib.ConstructionException; private import glib.Str; +private import glib.c.functions; private import gobject.ObjectG; public import gtkc.giotypes; @@ -45,9 +46,13 @@ public import gtkc.giotypes; * errors. You can use g_unix_socket_address_abstract_names_supported() * to see if abstract names are supported. * - * Note that `` belongs to the UNIX-specific GIO - * interfaces, thus you have to use the `gio-unix-2.0.pc` pkg-config file - * when using it. + * Since GLib 2.72, #GUnixSocketAddress is available on all platforms. It + * requires underlying system support (such as Windows 10 with `AF_UNIX`) at + * run time. + * + * Before GLib 2.72, `` belonged to the UNIX-specific + * GIO interfaces, thus you had to use the `gio-unix-2.0.pc` pkg-config file + * when using it. This is no longer necessary since GLib 2.72. */ public class UnixSocketAddress : SocketAddress { diff --git a/generated/gtkd/gio/Vfs.d b/generated/gtkd/gio/Vfs.d index b72fe5aa5..2b87c18bc 100644 --- a/generated/gtkd/gio/Vfs.d +++ b/generated/gtkd/gio/Vfs.d @@ -28,6 +28,7 @@ private import gio.FileIF; private import gio.c.functions; public import gio.c.types; private import glib.Str; +private import glib.c.functions; private import gobject.ObjectG; public import gtkc.giotypes; @@ -73,7 +74,8 @@ public class Vfs : ObjectG /** * Gets the default #GVfs for the system. * - * Returns: a #GVfs. + * Returns: a #GVfs, which will be the local + * file system #GVfs if no other implementation is available. */ public static Vfs getDefault() { diff --git a/generated/gtkd/gio/VolumeIF.d b/generated/gtkd/gio/VolumeIF.d index 358e66eb1..82bc89044 100644 --- a/generated/gtkd/gio/VolumeIF.d +++ b/generated/gtkd/gio/VolumeIF.d @@ -36,6 +36,7 @@ public import gio.c.types; private import glib.ErrorG; private import glib.GException; private import glib.Str; +private import glib.c.functions; private import gobject.ObjectG; private import gobject.Signals; public import gtkc.giotypes; @@ -75,13 +76,13 @@ private import std.algorithm; * different kinds of identifiers, such as Hal UDIs, filesystem labels, * traditional Unix devices (e.g. `/dev/sda2`), UUIDs. GIO uses predefined * strings as names for the different kinds of identifiers: - * #G_VOLUME_IDENTIFIER_KIND_UUID, #G_VOLUME_IDENTIFIER_KIND_LABEL, etc. + * %G_VOLUME_IDENTIFIER_KIND_UUID, %G_VOLUME_IDENTIFIER_KIND_LABEL, etc. * Use g_volume_get_identifier() to obtain an identifier for a volume. * * - * Note that #G_VOLUME_IDENTIFIER_KIND_HAL_UDI will only be available + * Note that %G_VOLUME_IDENTIFIER_KIND_HAL_UDI will only be available * when the gvfs hal volume monitor is in use. Other volume monitors - * will generally be able to provide the #G_VOLUME_IDENTIFIER_KIND_UNIX_DEVICE + * will generally be able to provide the %G_VOLUME_IDENTIFIER_KIND_UNIX_DEVICE * identifier, which can be used to obtain a hal device by means of * libhal_manager_find_device_string_match(). */ diff --git a/generated/gtkd/gio/VolumeT.d b/generated/gtkd/gio/VolumeT.d index a4cb0aed3..fa85967b3 100644 --- a/generated/gtkd/gio/VolumeT.d +++ b/generated/gtkd/gio/VolumeT.d @@ -36,6 +36,7 @@ public import gio.c.types; public import glib.ErrorG; public import glib.GException; public import glib.Str; +public import glib.c.functions; public import gobject.ObjectG; public import gobject.Signals; public import gtkc.giotypes; @@ -75,13 +76,13 @@ public import std.algorithm; * different kinds of identifiers, such as Hal UDIs, filesystem labels, * traditional Unix devices (e.g. `/dev/sda2`), UUIDs. GIO uses predefined * strings as names for the different kinds of identifiers: - * #G_VOLUME_IDENTIFIER_KIND_UUID, #G_VOLUME_IDENTIFIER_KIND_LABEL, etc. + * %G_VOLUME_IDENTIFIER_KIND_UUID, %G_VOLUME_IDENTIFIER_KIND_LABEL, etc. * Use g_volume_get_identifier() to obtain an identifier for a volume. * * - * Note that #G_VOLUME_IDENTIFIER_KIND_HAL_UDI will only be available + * Note that %G_VOLUME_IDENTIFIER_KIND_HAL_UDI will only be available * when the gvfs hal volume monitor is in use. Other volume monitors - * will generally be able to provide the #G_VOLUME_IDENTIFIER_KIND_UNIX_DEVICE + * will generally be able to provide the %G_VOLUME_IDENTIFIER_KIND_UNIX_DEVICE * identifier, which can be used to obtain a hal device by means of * libhal_manager_find_device_string_match(). */ diff --git a/generated/gtkd/gio/ZlibCompressor.d b/generated/gtkd/gio/ZlibCompressor.d index 7aa6bcb1a..7bc6fafb8 100644 --- a/generated/gtkd/gio/ZlibCompressor.d +++ b/generated/gtkd/gio/ZlibCompressor.d @@ -35,7 +35,8 @@ public import gtkc.giotypes; /** - * Zlib decompression + * #GZlibCompressor is an implementation of #GConverter that + * compresses data using zlib. */ public class ZlibCompressor : ObjectG, ConverterIF { diff --git a/generated/gtkd/gio/ZlibDecompressor.d b/generated/gtkd/gio/ZlibDecompressor.d index b87438ef2..d4d5f4278 100644 --- a/generated/gtkd/gio/ZlibDecompressor.d +++ b/generated/gtkd/gio/ZlibDecompressor.d @@ -35,7 +35,8 @@ public import gtkc.giotypes; /** - * Zlib decompression + * #GZlibDecompressor is an implementation of #GConverter that + * decompresses data compressed with zlib. */ public class ZlibDecompressor : ObjectG, ConverterIF { diff --git a/generated/gtkd/gio/c/functions.d b/generated/gtkd/gio/c/functions.d index 8612f2d9d..2f92e45c1 100644 --- a/generated/gtkd/gio/c/functions.d +++ b/generated/gtkd/gio/c/functions.d @@ -667,6 +667,18 @@ shared static this() Linker.link(g_datagram_based_receive_messages, "g_datagram_based_receive_messages", LIBRARY_GIO); Linker.link(g_datagram_based_send_messages, "g_datagram_based_send_messages", LIBRARY_GIO); + // gio.DebugController + + Linker.link(g_debug_controller_get_type, "g_debug_controller_get_type", LIBRARY_GIO); + Linker.link(g_debug_controller_get_debug_enabled, "g_debug_controller_get_debug_enabled", LIBRARY_GIO); + Linker.link(g_debug_controller_set_debug_enabled, "g_debug_controller_set_debug_enabled", LIBRARY_GIO); + + // gio.DebugControllerDBus + + Linker.link(g_debug_controller_dbus_get_type, "g_debug_controller_dbus_get_type", LIBRARY_GIO); + Linker.link(g_debug_controller_dbus_new, "g_debug_controller_dbus_new", LIBRARY_GIO); + Linker.link(g_debug_controller_dbus_stop, "g_debug_controller_dbus_stop", LIBRARY_GIO); + // gio.DesktopAppInfo Linker.link(g_desktop_app_info_get_type, "g_desktop_app_info_get_type", LIBRARY_GIO); @@ -750,11 +762,14 @@ shared static this() Linker.link(g_dtls_connection_close_finish, "g_dtls_connection_close_finish", LIBRARY_GIO); Linker.link(g_dtls_connection_emit_accept_certificate, "g_dtls_connection_emit_accept_certificate", LIBRARY_GIO); Linker.link(g_dtls_connection_get_certificate, "g_dtls_connection_get_certificate", LIBRARY_GIO); + Linker.link(g_dtls_connection_get_channel_binding_data, "g_dtls_connection_get_channel_binding_data", LIBRARY_GIO); + Linker.link(g_dtls_connection_get_ciphersuite_name, "g_dtls_connection_get_ciphersuite_name", LIBRARY_GIO); Linker.link(g_dtls_connection_get_database, "g_dtls_connection_get_database", LIBRARY_GIO); Linker.link(g_dtls_connection_get_interaction, "g_dtls_connection_get_interaction", LIBRARY_GIO); Linker.link(g_dtls_connection_get_negotiated_protocol, "g_dtls_connection_get_negotiated_protocol", LIBRARY_GIO); Linker.link(g_dtls_connection_get_peer_certificate, "g_dtls_connection_get_peer_certificate", LIBRARY_GIO); Linker.link(g_dtls_connection_get_peer_certificate_errors, "g_dtls_connection_get_peer_certificate_errors", LIBRARY_GIO); + Linker.link(g_dtls_connection_get_protocol_version, "g_dtls_connection_get_protocol_version", LIBRARY_GIO); Linker.link(g_dtls_connection_get_rehandshake_mode, "g_dtls_connection_get_rehandshake_mode", LIBRARY_GIO); Linker.link(g_dtls_connection_get_require_close_notify, "g_dtls_connection_get_require_close_notify", LIBRARY_GIO); Linker.link(g_dtls_connection_handshake, "g_dtls_connection_handshake", LIBRARY_GIO); @@ -805,6 +820,7 @@ shared static this() Linker.link(g_file_append_to, "g_file_append_to", LIBRARY_GIO); Linker.link(g_file_append_to_async, "g_file_append_to_async", LIBRARY_GIO); Linker.link(g_file_append_to_finish, "g_file_append_to_finish", LIBRARY_GIO); + Linker.link(g_file_build_attribute_list_for_copy, "g_file_build_attribute_list_for_copy", LIBRARY_GIO); Linker.link(g_file_copy, "g_file_copy", LIBRARY_GIO); Linker.link(g_file_copy_async, "g_file_copy_async", LIBRARY_GIO); Linker.link(g_file_copy_attributes, "g_file_copy_attributes", LIBRARY_GIO); @@ -868,6 +884,8 @@ shared static this() Linker.link(g_file_mount_mountable, "g_file_mount_mountable", LIBRARY_GIO); Linker.link(g_file_mount_mountable_finish, "g_file_mount_mountable_finish", LIBRARY_GIO); Linker.link(g_file_move, "g_file_move", LIBRARY_GIO); + Linker.link(g_file_move_async, "g_file_move_async", LIBRARY_GIO); + Linker.link(g_file_move_finish, "g_file_move_finish", LIBRARY_GIO); Linker.link(g_file_open_readwrite, "g_file_open_readwrite", LIBRARY_GIO); Linker.link(g_file_open_readwrite_async, "g_file_open_readwrite_async", LIBRARY_GIO); Linker.link(g_file_open_readwrite_finish, "g_file_open_readwrite_finish", LIBRARY_GIO); @@ -992,6 +1010,7 @@ shared static this() Linker.link(g_file_info_clear_status, "g_file_info_clear_status", LIBRARY_GIO); Linker.link(g_file_info_copy_into, "g_file_info_copy_into", LIBRARY_GIO); Linker.link(g_file_info_dup, "g_file_info_dup", LIBRARY_GIO); + Linker.link(g_file_info_get_access_date_time, "g_file_info_get_access_date_time", LIBRARY_GIO); Linker.link(g_file_info_get_attribute_as_string, "g_file_info_get_attribute_as_string", LIBRARY_GIO); Linker.link(g_file_info_get_attribute_boolean, "g_file_info_get_attribute_boolean", LIBRARY_GIO); Linker.link(g_file_info_get_attribute_byte_string, "g_file_info_get_attribute_byte_string", LIBRARY_GIO); @@ -1006,6 +1025,7 @@ shared static this() Linker.link(g_file_info_get_attribute_uint32, "g_file_info_get_attribute_uint32", LIBRARY_GIO); Linker.link(g_file_info_get_attribute_uint64, "g_file_info_get_attribute_uint64", LIBRARY_GIO); Linker.link(g_file_info_get_content_type, "g_file_info_get_content_type", LIBRARY_GIO); + Linker.link(g_file_info_get_creation_date_time, "g_file_info_get_creation_date_time", LIBRARY_GIO); Linker.link(g_file_info_get_deletion_date, "g_file_info_get_deletion_date", LIBRARY_GIO); Linker.link(g_file_info_get_display_name, "g_file_info_get_display_name", LIBRARY_GIO); Linker.link(g_file_info_get_edit_name, "g_file_info_get_edit_name", LIBRARY_GIO); @@ -1026,6 +1046,7 @@ shared static this() Linker.link(g_file_info_has_namespace, "g_file_info_has_namespace", LIBRARY_GIO); Linker.link(g_file_info_list_attributes, "g_file_info_list_attributes", LIBRARY_GIO); Linker.link(g_file_info_remove_attribute, "g_file_info_remove_attribute", LIBRARY_GIO); + Linker.link(g_file_info_set_access_date_time, "g_file_info_set_access_date_time", LIBRARY_GIO); Linker.link(g_file_info_set_attribute, "g_file_info_set_attribute", LIBRARY_GIO); Linker.link(g_file_info_set_attribute_boolean, "g_file_info_set_attribute_boolean", LIBRARY_GIO); Linker.link(g_file_info_set_attribute_byte_string, "g_file_info_set_attribute_byte_string", LIBRARY_GIO); @@ -1039,6 +1060,7 @@ shared static this() Linker.link(g_file_info_set_attribute_uint32, "g_file_info_set_attribute_uint32", LIBRARY_GIO); Linker.link(g_file_info_set_attribute_uint64, "g_file_info_set_attribute_uint64", LIBRARY_GIO); Linker.link(g_file_info_set_content_type, "g_file_info_set_content_type", LIBRARY_GIO); + Linker.link(g_file_info_set_creation_date_time, "g_file_info_set_creation_date_time", LIBRARY_GIO); Linker.link(g_file_info_set_display_name, "g_file_info_set_display_name", LIBRARY_GIO); Linker.link(g_file_info_set_edit_name, "g_file_info_set_edit_name", LIBRARY_GIO); Linker.link(g_file_info_set_file_type, "g_file_info_set_file_type", LIBRARY_GIO); @@ -1467,6 +1489,7 @@ shared static this() Linker.link(g_notification_add_button_with_target, "g_notification_add_button_with_target", LIBRARY_GIO); Linker.link(g_notification_add_button_with_target_value, "g_notification_add_button_with_target_value", LIBRARY_GIO); Linker.link(g_notification_set_body, "g_notification_set_body", LIBRARY_GIO); + Linker.link(g_notification_set_category, "g_notification_set_category", LIBRARY_GIO); Linker.link(g_notification_set_default_action, "g_notification_set_default_action", LIBRARY_GIO); Linker.link(g_notification_set_default_action_and_target, "g_notification_set_default_action_and_target", LIBRARY_GIO); Linker.link(g_notification_set_default_action_and_target_value, "g_notification_set_default_action_and_target_value", LIBRARY_GIO); @@ -1541,6 +1564,12 @@ shared static this() Linker.link(g_pollable_output_stream_write_nonblocking, "g_pollable_output_stream_write_nonblocking", LIBRARY_GIO); Linker.link(g_pollable_output_stream_writev_nonblocking, "g_pollable_output_stream_writev_nonblocking", LIBRARY_GIO); + // gio.PowerProfileMonitor + + Linker.link(g_power_profile_monitor_get_type, "g_power_profile_monitor_get_type", LIBRARY_GIO); + Linker.link(g_power_profile_monitor_dup_default, "g_power_profile_monitor_dup_default", LIBRARY_GIO); + Linker.link(g_power_profile_monitor_get_power_saver_enabled, "g_power_profile_monitor_get_power_saver_enabled", LIBRARY_GIO); + // gio.PropertyAction Linker.link(g_property_action_get_type, "g_property_action_get_type", LIBRARY_GIO); @@ -2025,6 +2054,7 @@ shared static this() Linker.link(g_subprocess_launcher_get_type, "g_subprocess_launcher_get_type", LIBRARY_GIO); Linker.link(g_subprocess_launcher_new, "g_subprocess_launcher_new", LIBRARY_GIO); + Linker.link(g_subprocess_launcher_close, "g_subprocess_launcher_close", LIBRARY_GIO); Linker.link(g_subprocess_launcher_getenv, "g_subprocess_launcher_getenv", LIBRARY_GIO); Linker.link(g_subprocess_launcher_set_child_setup, "g_subprocess_launcher_set_child_setup", LIBRARY_GIO); Linker.link(g_subprocess_launcher_set_cwd, "g_subprocess_launcher_set_cwd", LIBRARY_GIO); @@ -2139,10 +2169,19 @@ shared static this() Linker.link(g_tls_certificate_get_type, "g_tls_certificate_get_type", LIBRARY_GIO); Linker.link(g_tls_certificate_new_from_file, "g_tls_certificate_new_from_file", LIBRARY_GIO); + Linker.link(g_tls_certificate_new_from_file_with_password, "g_tls_certificate_new_from_file_with_password", LIBRARY_GIO); Linker.link(g_tls_certificate_new_from_files, "g_tls_certificate_new_from_files", LIBRARY_GIO); Linker.link(g_tls_certificate_new_from_pem, "g_tls_certificate_new_from_pem", LIBRARY_GIO); + Linker.link(g_tls_certificate_new_from_pkcs11_uris, "g_tls_certificate_new_from_pkcs11_uris", LIBRARY_GIO); + Linker.link(g_tls_certificate_new_from_pkcs12, "g_tls_certificate_new_from_pkcs12", LIBRARY_GIO); Linker.link(g_tls_certificate_list_new_from_file, "g_tls_certificate_list_new_from_file", LIBRARY_GIO); + Linker.link(g_tls_certificate_get_dns_names, "g_tls_certificate_get_dns_names", LIBRARY_GIO); + Linker.link(g_tls_certificate_get_ip_addresses, "g_tls_certificate_get_ip_addresses", LIBRARY_GIO); Linker.link(g_tls_certificate_get_issuer, "g_tls_certificate_get_issuer", LIBRARY_GIO); + Linker.link(g_tls_certificate_get_issuer_name, "g_tls_certificate_get_issuer_name", LIBRARY_GIO); + Linker.link(g_tls_certificate_get_not_valid_after, "g_tls_certificate_get_not_valid_after", LIBRARY_GIO); + Linker.link(g_tls_certificate_get_not_valid_before, "g_tls_certificate_get_not_valid_before", LIBRARY_GIO); + Linker.link(g_tls_certificate_get_subject_name, "g_tls_certificate_get_subject_name", LIBRARY_GIO); Linker.link(g_tls_certificate_is_same, "g_tls_certificate_is_same", LIBRARY_GIO); Linker.link(g_tls_certificate_verify, "g_tls_certificate_verify", LIBRARY_GIO); @@ -2164,11 +2203,14 @@ shared static this() Linker.link(g_tls_connection_get_type, "g_tls_connection_get_type", LIBRARY_GIO); Linker.link(g_tls_connection_emit_accept_certificate, "g_tls_connection_emit_accept_certificate", LIBRARY_GIO); Linker.link(g_tls_connection_get_certificate, "g_tls_connection_get_certificate", LIBRARY_GIO); + Linker.link(g_tls_connection_get_channel_binding_data, "g_tls_connection_get_channel_binding_data", LIBRARY_GIO); + Linker.link(g_tls_connection_get_ciphersuite_name, "g_tls_connection_get_ciphersuite_name", LIBRARY_GIO); Linker.link(g_tls_connection_get_database, "g_tls_connection_get_database", LIBRARY_GIO); Linker.link(g_tls_connection_get_interaction, "g_tls_connection_get_interaction", LIBRARY_GIO); Linker.link(g_tls_connection_get_negotiated_protocol, "g_tls_connection_get_negotiated_protocol", LIBRARY_GIO); Linker.link(g_tls_connection_get_peer_certificate, "g_tls_connection_get_peer_certificate", LIBRARY_GIO); Linker.link(g_tls_connection_get_peer_certificate_errors, "g_tls_connection_get_peer_certificate_errors", LIBRARY_GIO); + Linker.link(g_tls_connection_get_protocol_version, "g_tls_connection_get_protocol_version", LIBRARY_GIO); Linker.link(g_tls_connection_get_rehandshake_mode, "g_tls_connection_get_rehandshake_mode", LIBRARY_GIO); Linker.link(g_tls_connection_get_require_close_notify, "g_tls_connection_get_require_close_notify", LIBRARY_GIO); Linker.link(g_tls_connection_get_use_system_certdb, "g_tls_connection_get_use_system_certdb", LIBRARY_GIO); @@ -2334,6 +2376,7 @@ shared static this() Linker.link(g_unix_mount_point_is_loopback, "g_unix_mount_point_is_loopback", LIBRARY_GIO); Linker.link(g_unix_mount_point_is_readonly, "g_unix_mount_point_is_readonly", LIBRARY_GIO); Linker.link(g_unix_mount_point_is_user_mountable, "g_unix_mount_point_is_user_mountable", LIBRARY_GIO); + Linker.link(g_unix_mount_point_at, "g_unix_mount_point_at", LIBRARY_GIO); // gio.UnixOutputStream @@ -3124,6 +3167,18 @@ __gshared extern(C) int function(GDatagramBased* datagramBased, GInputMessage* messages, uint numMessages, int flags, long timeout, GCancellable* cancellable, GError** err) c_g_datagram_based_receive_messages; int function(GDatagramBased* datagramBased, GOutputMessage* messages, uint numMessages, int flags, long timeout, GCancellable* cancellable, GError** err) c_g_datagram_based_send_messages; + // gio.DebugController + + GType function() c_g_debug_controller_get_type; + int function(GDebugController* self) c_g_debug_controller_get_debug_enabled; + void function(GDebugController* self, int debugEnabled) c_g_debug_controller_set_debug_enabled; + + // gio.DebugControllerDBus + + GType function() c_g_debug_controller_dbus_get_type; + GDebugControllerDBus* function(GDBusConnection* connection, GCancellable* cancellable, GError** err) c_g_debug_controller_dbus_new; + void function(GDebugControllerDBus* self) c_g_debug_controller_dbus_stop; + // gio.DesktopAppInfo GType function() c_g_desktop_app_info_get_type; @@ -3207,11 +3262,14 @@ __gshared extern(C) int function(GDtlsConnection* conn, GAsyncResult* result, GError** err) c_g_dtls_connection_close_finish; int function(GDtlsConnection* conn, GTlsCertificate* peerCert, GTlsCertificateFlags errors) c_g_dtls_connection_emit_accept_certificate; GTlsCertificate* function(GDtlsConnection* conn) c_g_dtls_connection_get_certificate; + int function(GDtlsConnection* conn, GTlsChannelBindingType type, GByteArray* data, GError** err) c_g_dtls_connection_get_channel_binding_data; + char* function(GDtlsConnection* conn) c_g_dtls_connection_get_ciphersuite_name; GTlsDatabase* function(GDtlsConnection* conn) c_g_dtls_connection_get_database; GTlsInteraction* function(GDtlsConnection* conn) c_g_dtls_connection_get_interaction; const(char)* function(GDtlsConnection* conn) c_g_dtls_connection_get_negotiated_protocol; GTlsCertificate* function(GDtlsConnection* conn) c_g_dtls_connection_get_peer_certificate; GTlsCertificateFlags function(GDtlsConnection* conn) c_g_dtls_connection_get_peer_certificate_errors; + GTlsProtocolVersion function(GDtlsConnection* conn) c_g_dtls_connection_get_protocol_version; GTlsRehandshakeMode function(GDtlsConnection* conn) c_g_dtls_connection_get_rehandshake_mode; int function(GDtlsConnection* conn) c_g_dtls_connection_get_require_close_notify; int function(GDtlsConnection* conn, GCancellable* cancellable, GError** err) c_g_dtls_connection_handshake; @@ -3262,6 +3320,7 @@ __gshared extern(C) GFileOutputStream* function(GFile* file, GFileCreateFlags flags, GCancellable* cancellable, GError** err) c_g_file_append_to; void function(GFile* file, GFileCreateFlags flags, int ioPriority, GCancellable* cancellable, GAsyncReadyCallback callback, void* userData) c_g_file_append_to_async; GFileOutputStream* function(GFile* file, GAsyncResult* res, GError** err) c_g_file_append_to_finish; + char* function(GFile* file, GFileCopyFlags flags, GCancellable* cancellable, GError** err) c_g_file_build_attribute_list_for_copy; int function(GFile* source, GFile* destination, GFileCopyFlags flags, GCancellable* cancellable, GFileProgressCallback progressCallback, void* progressCallbackData, GError** err) c_g_file_copy; void function(GFile* source, GFile* destination, GFileCopyFlags flags, int ioPriority, GCancellable* cancellable, GFileProgressCallback progressCallback, void* progressCallbackData, GAsyncReadyCallback callback, void* userData) c_g_file_copy_async; int function(GFile* source, GFile* destination, GFileCopyFlags flags, GCancellable* cancellable, GError** err) c_g_file_copy_attributes; @@ -3325,6 +3384,8 @@ __gshared extern(C) void function(GFile* file, GMountMountFlags flags, GMountOperation* mountOperation, GCancellable* cancellable, GAsyncReadyCallback callback, void* userData) c_g_file_mount_mountable; GFile* function(GFile* file, GAsyncResult* result, GError** err) c_g_file_mount_mountable_finish; int function(GFile* source, GFile* destination, GFileCopyFlags flags, GCancellable* cancellable, GFileProgressCallback progressCallback, void* progressCallbackData, GError** err) c_g_file_move; + void function(GFile* source, GFile* destination, GFileCopyFlags flags, int ioPriority, GCancellable* cancellable, GFileProgressCallback progressCallback, void* progressCallbackData, GAsyncReadyCallback callback, void* userData) c_g_file_move_async; + int function(GFile* file, GAsyncResult* result, GError** err) c_g_file_move_finish; GFileIOStream* function(GFile* file, GCancellable* cancellable, GError** err) c_g_file_open_readwrite; void function(GFile* file, int ioPriority, GCancellable* cancellable, GAsyncReadyCallback callback, void* userData) c_g_file_open_readwrite_async; GFileIOStream* function(GFile* file, GAsyncResult* res, GError** err) c_g_file_open_readwrite_finish; @@ -3449,6 +3510,7 @@ __gshared extern(C) void function(GFileInfo* info) c_g_file_info_clear_status; void function(GFileInfo* srcInfo, GFileInfo* destInfo) c_g_file_info_copy_into; GFileInfo* function(GFileInfo* other) c_g_file_info_dup; + GDateTime* function(GFileInfo* info) c_g_file_info_get_access_date_time; char* function(GFileInfo* info, const(char)* attribute) c_g_file_info_get_attribute_as_string; int function(GFileInfo* info, const(char)* attribute) c_g_file_info_get_attribute_boolean; const(char)* function(GFileInfo* info, const(char)* attribute) c_g_file_info_get_attribute_byte_string; @@ -3463,6 +3525,7 @@ __gshared extern(C) uint function(GFileInfo* info, const(char)* attribute) c_g_file_info_get_attribute_uint32; ulong function(GFileInfo* info, const(char)* attribute) c_g_file_info_get_attribute_uint64; const(char)* function(GFileInfo* info) c_g_file_info_get_content_type; + GDateTime* function(GFileInfo* info) c_g_file_info_get_creation_date_time; GDateTime* function(GFileInfo* info) c_g_file_info_get_deletion_date; const(char)* function(GFileInfo* info) c_g_file_info_get_display_name; const(char)* function(GFileInfo* info) c_g_file_info_get_edit_name; @@ -3483,6 +3546,7 @@ __gshared extern(C) int function(GFileInfo* info, const(char)* nameSpace) c_g_file_info_has_namespace; char** function(GFileInfo* info, const(char)* nameSpace) c_g_file_info_list_attributes; void function(GFileInfo* info, const(char)* attribute) c_g_file_info_remove_attribute; + void function(GFileInfo* info, GDateTime* atime) c_g_file_info_set_access_date_time; void function(GFileInfo* info, const(char)* attribute, GFileAttributeType type, void* valueP) c_g_file_info_set_attribute; void function(GFileInfo* info, const(char)* attribute, int attrValue) c_g_file_info_set_attribute_boolean; void function(GFileInfo* info, const(char)* attribute, const(char)* attrValue) c_g_file_info_set_attribute_byte_string; @@ -3496,6 +3560,7 @@ __gshared extern(C) void function(GFileInfo* info, const(char)* attribute, uint attrValue) c_g_file_info_set_attribute_uint32; void function(GFileInfo* info, const(char)* attribute, ulong attrValue) c_g_file_info_set_attribute_uint64; void function(GFileInfo* info, const(char)* contentType) c_g_file_info_set_content_type; + void function(GFileInfo* info, GDateTime* creationTime) c_g_file_info_set_creation_date_time; void function(GFileInfo* info, const(char)* displayName) c_g_file_info_set_display_name; void function(GFileInfo* info, const(char)* editName) c_g_file_info_set_edit_name; void function(GFileInfo* info, GFileType type) c_g_file_info_set_file_type; @@ -3924,6 +3989,7 @@ __gshared extern(C) void function(GNotification* notification, const(char)* label, const(char)* action, const(char)* targetFormat, ... ) c_g_notification_add_button_with_target; void function(GNotification* notification, const(char)* label, const(char)* action, GVariant* target) c_g_notification_add_button_with_target_value; void function(GNotification* notification, const(char)* body_) c_g_notification_set_body; + void function(GNotification* notification, const(char)* category) c_g_notification_set_category; void function(GNotification* notification, const(char)* detailedAction) c_g_notification_set_default_action; void function(GNotification* notification, const(char)* action, const(char)* targetFormat, ... ) c_g_notification_set_default_action_and_target; void function(GNotification* notification, const(char)* action, GVariant* target) c_g_notification_set_default_action_and_target_value; @@ -3998,6 +4064,12 @@ __gshared extern(C) ptrdiff_t function(GPollableOutputStream* stream, void* buffer, size_t count, GCancellable* cancellable, GError** err) c_g_pollable_output_stream_write_nonblocking; GPollableReturn function(GPollableOutputStream* stream, GOutputVector* vectors, size_t nVectors, size_t* bytesWritten, GCancellable* cancellable, GError** err) c_g_pollable_output_stream_writev_nonblocking; + // gio.PowerProfileMonitor + + GType function() c_g_power_profile_monitor_get_type; + GPowerProfileMonitor* function() c_g_power_profile_monitor_dup_default; + int function(GPowerProfileMonitor* monitor) c_g_power_profile_monitor_get_power_saver_enabled; + // gio.PropertyAction GType function() c_g_property_action_get_type; @@ -4482,6 +4554,7 @@ __gshared extern(C) GType function() c_g_subprocess_launcher_get_type; GSubprocessLauncher* function(GSubprocessFlags flags) c_g_subprocess_launcher_new; + void function(GSubprocessLauncher* self) c_g_subprocess_launcher_close; char* function(GSubprocessLauncher* self, char* variable) c_g_subprocess_launcher_getenv; void function(GSubprocessLauncher* self, GSpawnChildSetupFunc childSetup, void* userData, GDestroyNotify destroyNotify) c_g_subprocess_launcher_set_child_setup; void function(GSubprocessLauncher* self, char* cwd) c_g_subprocess_launcher_set_cwd; @@ -4596,10 +4669,19 @@ __gshared extern(C) GType function() c_g_tls_certificate_get_type; GTlsCertificate* function(char* file, GError** err) c_g_tls_certificate_new_from_file; + GTlsCertificate* function(char* file, const(char)* password, GError** err) c_g_tls_certificate_new_from_file_with_password; GTlsCertificate* function(char* certFile, char* keyFile, GError** err) c_g_tls_certificate_new_from_files; GTlsCertificate* function(const(char)* data, ptrdiff_t length, GError** err) c_g_tls_certificate_new_from_pem; + GTlsCertificate* function(const(char)* pkcs11Uri, const(char)* privateKeyPkcs11Uri, GError** err) c_g_tls_certificate_new_from_pkcs11_uris; + GTlsCertificate* function(ubyte* data, size_t length, const(char)* password, GError** err) c_g_tls_certificate_new_from_pkcs12; GList* function(char* file, GError** err) c_g_tls_certificate_list_new_from_file; + GPtrArray* function(GTlsCertificate* cert) c_g_tls_certificate_get_dns_names; + GPtrArray* function(GTlsCertificate* cert) c_g_tls_certificate_get_ip_addresses; GTlsCertificate* function(GTlsCertificate* cert) c_g_tls_certificate_get_issuer; + char* function(GTlsCertificate* cert) c_g_tls_certificate_get_issuer_name; + GDateTime* function(GTlsCertificate* cert) c_g_tls_certificate_get_not_valid_after; + GDateTime* function(GTlsCertificate* cert) c_g_tls_certificate_get_not_valid_before; + char* function(GTlsCertificate* cert) c_g_tls_certificate_get_subject_name; int function(GTlsCertificate* certOne, GTlsCertificate* certTwo) c_g_tls_certificate_is_same; GTlsCertificateFlags function(GTlsCertificate* cert, GSocketConnectable* identity, GTlsCertificate* trustedCa) c_g_tls_certificate_verify; @@ -4621,11 +4703,14 @@ __gshared extern(C) GType function() c_g_tls_connection_get_type; int function(GTlsConnection* conn, GTlsCertificate* peerCert, GTlsCertificateFlags errors) c_g_tls_connection_emit_accept_certificate; GTlsCertificate* function(GTlsConnection* conn) c_g_tls_connection_get_certificate; + int function(GTlsConnection* conn, GTlsChannelBindingType type, GByteArray* data, GError** err) c_g_tls_connection_get_channel_binding_data; + char* function(GTlsConnection* conn) c_g_tls_connection_get_ciphersuite_name; GTlsDatabase* function(GTlsConnection* conn) c_g_tls_connection_get_database; GTlsInteraction* function(GTlsConnection* conn) c_g_tls_connection_get_interaction; const(char)* function(GTlsConnection* conn) c_g_tls_connection_get_negotiated_protocol; GTlsCertificate* function(GTlsConnection* conn) c_g_tls_connection_get_peer_certificate; GTlsCertificateFlags function(GTlsConnection* conn) c_g_tls_connection_get_peer_certificate_errors; + GTlsProtocolVersion function(GTlsConnection* conn) c_g_tls_connection_get_protocol_version; GTlsRehandshakeMode function(GTlsConnection* conn) c_g_tls_connection_get_rehandshake_mode; int function(GTlsConnection* conn) c_g_tls_connection_get_require_close_notify; int function(GTlsConnection* conn) c_g_tls_connection_get_use_system_certdb; @@ -4791,6 +4876,7 @@ __gshared extern(C) int function(GUnixMountPoint* mountPoint) c_g_unix_mount_point_is_loopback; int function(GUnixMountPoint* mountPoint) c_g_unix_mount_point_is_readonly; int function(GUnixMountPoint* mountPoint) c_g_unix_mount_point_is_user_mountable; + GUnixMountPoint* function(char* mountPath, ulong* timeRead) c_g_unix_mount_point_at; // gio.UnixOutputStream @@ -4903,7 +4989,7 @@ __gshared extern(C) GIcon* function(const(char)* type) c_g_content_type_get_icon; char* function(const(char)* type) c_g_content_type_get_mime_type; GIcon* function(const(char)* type) c_g_content_type_get_symbolic_icon; - char* function(const(char)* filename, char* data, size_t dataSize, int* resultUncertain) c_g_content_type_guess; + char* function(char* filename, char* data, size_t dataSize, int* resultUncertain) c_g_content_type_guess; char** function(GFile* root) c_g_content_type_guess_for_tree; int function(const(char)* type, const(char)* supertype) c_g_content_type_is_a; int function(const(char)* type) c_g_content_type_is_unknown; @@ -5579,6 +5665,18 @@ alias c_g_datagram_based_create_source g_datagram_based_create_source; alias c_g_datagram_based_receive_messages g_datagram_based_receive_messages; alias c_g_datagram_based_send_messages g_datagram_based_send_messages; +// gio.DebugController + +alias c_g_debug_controller_get_type g_debug_controller_get_type; +alias c_g_debug_controller_get_debug_enabled g_debug_controller_get_debug_enabled; +alias c_g_debug_controller_set_debug_enabled g_debug_controller_set_debug_enabled; + +// gio.DebugControllerDBus + +alias c_g_debug_controller_dbus_get_type g_debug_controller_dbus_get_type; +alias c_g_debug_controller_dbus_new g_debug_controller_dbus_new; +alias c_g_debug_controller_dbus_stop g_debug_controller_dbus_stop; + // gio.DesktopAppInfo alias c_g_desktop_app_info_get_type g_desktop_app_info_get_type; @@ -5662,11 +5760,14 @@ alias c_g_dtls_connection_close_async g_dtls_connection_close_async; alias c_g_dtls_connection_close_finish g_dtls_connection_close_finish; alias c_g_dtls_connection_emit_accept_certificate g_dtls_connection_emit_accept_certificate; alias c_g_dtls_connection_get_certificate g_dtls_connection_get_certificate; +alias c_g_dtls_connection_get_channel_binding_data g_dtls_connection_get_channel_binding_data; +alias c_g_dtls_connection_get_ciphersuite_name g_dtls_connection_get_ciphersuite_name; alias c_g_dtls_connection_get_database g_dtls_connection_get_database; alias c_g_dtls_connection_get_interaction g_dtls_connection_get_interaction; alias c_g_dtls_connection_get_negotiated_protocol g_dtls_connection_get_negotiated_protocol; alias c_g_dtls_connection_get_peer_certificate g_dtls_connection_get_peer_certificate; alias c_g_dtls_connection_get_peer_certificate_errors g_dtls_connection_get_peer_certificate_errors; +alias c_g_dtls_connection_get_protocol_version g_dtls_connection_get_protocol_version; alias c_g_dtls_connection_get_rehandshake_mode g_dtls_connection_get_rehandshake_mode; alias c_g_dtls_connection_get_require_close_notify g_dtls_connection_get_require_close_notify; alias c_g_dtls_connection_handshake g_dtls_connection_handshake; @@ -5717,6 +5818,7 @@ alias c_g_file_parse_name g_file_parse_name; alias c_g_file_append_to g_file_append_to; alias c_g_file_append_to_async g_file_append_to_async; alias c_g_file_append_to_finish g_file_append_to_finish; +alias c_g_file_build_attribute_list_for_copy g_file_build_attribute_list_for_copy; alias c_g_file_copy g_file_copy; alias c_g_file_copy_async g_file_copy_async; alias c_g_file_copy_attributes g_file_copy_attributes; @@ -5780,6 +5882,8 @@ alias c_g_file_mount_enclosing_volume_finish g_file_mount_enclosing_volume_finis alias c_g_file_mount_mountable g_file_mount_mountable; alias c_g_file_mount_mountable_finish g_file_mount_mountable_finish; alias c_g_file_move g_file_move; +alias c_g_file_move_async g_file_move_async; +alias c_g_file_move_finish g_file_move_finish; alias c_g_file_open_readwrite g_file_open_readwrite; alias c_g_file_open_readwrite_async g_file_open_readwrite_async; alias c_g_file_open_readwrite_finish g_file_open_readwrite_finish; @@ -5904,6 +6008,7 @@ alias c_g_file_info_new g_file_info_new; alias c_g_file_info_clear_status g_file_info_clear_status; alias c_g_file_info_copy_into g_file_info_copy_into; alias c_g_file_info_dup g_file_info_dup; +alias c_g_file_info_get_access_date_time g_file_info_get_access_date_time; alias c_g_file_info_get_attribute_as_string g_file_info_get_attribute_as_string; alias c_g_file_info_get_attribute_boolean g_file_info_get_attribute_boolean; alias c_g_file_info_get_attribute_byte_string g_file_info_get_attribute_byte_string; @@ -5918,6 +6023,7 @@ alias c_g_file_info_get_attribute_type g_file_info_get_attribute_type; alias c_g_file_info_get_attribute_uint32 g_file_info_get_attribute_uint32; alias c_g_file_info_get_attribute_uint64 g_file_info_get_attribute_uint64; alias c_g_file_info_get_content_type g_file_info_get_content_type; +alias c_g_file_info_get_creation_date_time g_file_info_get_creation_date_time; alias c_g_file_info_get_deletion_date g_file_info_get_deletion_date; alias c_g_file_info_get_display_name g_file_info_get_display_name; alias c_g_file_info_get_edit_name g_file_info_get_edit_name; @@ -5938,6 +6044,7 @@ alias c_g_file_info_has_attribute g_file_info_has_attribute; alias c_g_file_info_has_namespace g_file_info_has_namespace; alias c_g_file_info_list_attributes g_file_info_list_attributes; alias c_g_file_info_remove_attribute g_file_info_remove_attribute; +alias c_g_file_info_set_access_date_time g_file_info_set_access_date_time; alias c_g_file_info_set_attribute g_file_info_set_attribute; alias c_g_file_info_set_attribute_boolean g_file_info_set_attribute_boolean; alias c_g_file_info_set_attribute_byte_string g_file_info_set_attribute_byte_string; @@ -5951,6 +6058,7 @@ alias c_g_file_info_set_attribute_stringv g_file_info_set_attribute_stringv; alias c_g_file_info_set_attribute_uint32 g_file_info_set_attribute_uint32; alias c_g_file_info_set_attribute_uint64 g_file_info_set_attribute_uint64; alias c_g_file_info_set_content_type g_file_info_set_content_type; +alias c_g_file_info_set_creation_date_time g_file_info_set_creation_date_time; alias c_g_file_info_set_display_name g_file_info_set_display_name; alias c_g_file_info_set_edit_name g_file_info_set_edit_name; alias c_g_file_info_set_file_type g_file_info_set_file_type; @@ -6379,6 +6487,7 @@ alias c_g_notification_add_button g_notification_add_button; alias c_g_notification_add_button_with_target g_notification_add_button_with_target; alias c_g_notification_add_button_with_target_value g_notification_add_button_with_target_value; alias c_g_notification_set_body g_notification_set_body; +alias c_g_notification_set_category g_notification_set_category; alias c_g_notification_set_default_action g_notification_set_default_action; alias c_g_notification_set_default_action_and_target g_notification_set_default_action_and_target; alias c_g_notification_set_default_action_and_target_value g_notification_set_default_action_and_target_value; @@ -6453,6 +6562,12 @@ alias c_g_pollable_output_stream_is_writable g_pollable_output_stream_is_writabl alias c_g_pollable_output_stream_write_nonblocking g_pollable_output_stream_write_nonblocking; alias c_g_pollable_output_stream_writev_nonblocking g_pollable_output_stream_writev_nonblocking; +// gio.PowerProfileMonitor + +alias c_g_power_profile_monitor_get_type g_power_profile_monitor_get_type; +alias c_g_power_profile_monitor_dup_default g_power_profile_monitor_dup_default; +alias c_g_power_profile_monitor_get_power_saver_enabled g_power_profile_monitor_get_power_saver_enabled; + // gio.PropertyAction alias c_g_property_action_get_type g_property_action_get_type; @@ -6937,6 +7052,7 @@ alias c_g_subprocess_wait_finish g_subprocess_wait_finish; alias c_g_subprocess_launcher_get_type g_subprocess_launcher_get_type; alias c_g_subprocess_launcher_new g_subprocess_launcher_new; +alias c_g_subprocess_launcher_close g_subprocess_launcher_close; alias c_g_subprocess_launcher_getenv g_subprocess_launcher_getenv; alias c_g_subprocess_launcher_set_child_setup g_subprocess_launcher_set_child_setup; alias c_g_subprocess_launcher_set_cwd g_subprocess_launcher_set_cwd; @@ -7051,10 +7167,19 @@ alias c_g_tls_backend_supports_tls g_tls_backend_supports_tls; alias c_g_tls_certificate_get_type g_tls_certificate_get_type; alias c_g_tls_certificate_new_from_file g_tls_certificate_new_from_file; +alias c_g_tls_certificate_new_from_file_with_password g_tls_certificate_new_from_file_with_password; alias c_g_tls_certificate_new_from_files g_tls_certificate_new_from_files; alias c_g_tls_certificate_new_from_pem g_tls_certificate_new_from_pem; +alias c_g_tls_certificate_new_from_pkcs11_uris g_tls_certificate_new_from_pkcs11_uris; +alias c_g_tls_certificate_new_from_pkcs12 g_tls_certificate_new_from_pkcs12; alias c_g_tls_certificate_list_new_from_file g_tls_certificate_list_new_from_file; +alias c_g_tls_certificate_get_dns_names g_tls_certificate_get_dns_names; +alias c_g_tls_certificate_get_ip_addresses g_tls_certificate_get_ip_addresses; alias c_g_tls_certificate_get_issuer g_tls_certificate_get_issuer; +alias c_g_tls_certificate_get_issuer_name g_tls_certificate_get_issuer_name; +alias c_g_tls_certificate_get_not_valid_after g_tls_certificate_get_not_valid_after; +alias c_g_tls_certificate_get_not_valid_before g_tls_certificate_get_not_valid_before; +alias c_g_tls_certificate_get_subject_name g_tls_certificate_get_subject_name; alias c_g_tls_certificate_is_same g_tls_certificate_is_same; alias c_g_tls_certificate_verify g_tls_certificate_verify; @@ -7076,11 +7201,14 @@ alias c_g_tls_client_connection_set_validation_flags g_tls_client_connection_set alias c_g_tls_connection_get_type g_tls_connection_get_type; alias c_g_tls_connection_emit_accept_certificate g_tls_connection_emit_accept_certificate; alias c_g_tls_connection_get_certificate g_tls_connection_get_certificate; +alias c_g_tls_connection_get_channel_binding_data g_tls_connection_get_channel_binding_data; +alias c_g_tls_connection_get_ciphersuite_name g_tls_connection_get_ciphersuite_name; alias c_g_tls_connection_get_database g_tls_connection_get_database; alias c_g_tls_connection_get_interaction g_tls_connection_get_interaction; alias c_g_tls_connection_get_negotiated_protocol g_tls_connection_get_negotiated_protocol; alias c_g_tls_connection_get_peer_certificate g_tls_connection_get_peer_certificate; alias c_g_tls_connection_get_peer_certificate_errors g_tls_connection_get_peer_certificate_errors; +alias c_g_tls_connection_get_protocol_version g_tls_connection_get_protocol_version; alias c_g_tls_connection_get_rehandshake_mode g_tls_connection_get_rehandshake_mode; alias c_g_tls_connection_get_require_close_notify g_tls_connection_get_require_close_notify; alias c_g_tls_connection_get_use_system_certdb g_tls_connection_get_use_system_certdb; @@ -7246,6 +7374,7 @@ alias c_g_unix_mount_point_guess_symbolic_icon g_unix_mount_point_guess_symbolic alias c_g_unix_mount_point_is_loopback g_unix_mount_point_is_loopback; alias c_g_unix_mount_point_is_readonly g_unix_mount_point_is_readonly; alias c_g_unix_mount_point_is_user_mountable g_unix_mount_point_is_user_mountable; +alias c_g_unix_mount_point_at g_unix_mount_point_at; // gio.UnixOutputStream diff --git a/generated/gtkd/gio/c/types.d b/generated/gtkd/gio/c/types.d index 9965d1e21..0283e5d17 100644 --- a/generated/gtkd/gio/c/types.d +++ b/generated/gtkd/gio/c/types.d @@ -180,7 +180,7 @@ public enum GBusNameOwnerFlags ALLOW_REPLACEMENT = 1, /** * If another message bus connection owns the name and have - * specified #G_BUS_NAME_OWNER_FLAGS_ALLOW_REPLACEMENT, then take the name from the other connection. + * specified %G_BUS_NAME_OWNER_FLAGS_ALLOW_REPLACEMENT, then take the name from the other connection. */ REPLACE = 2, /** @@ -297,25 +297,33 @@ public enum GCredentialsType */ INVALID = 0, /** - * The native credentials type is a struct ucred. + * The native credentials type is a `struct ucred`. */ LINUX_UCRED = 1, /** - * The native credentials type is a struct cmsgcred. + * The native credentials type is a `struct cmsgcred`. */ FREEBSD_CMSGCRED = 2, /** - * The native credentials type is a struct sockpeercred. Added in 2.30. + * The native credentials type is a `struct sockpeercred`. Added in 2.30. */ OPENBSD_SOCKPEERCRED = 3, /** - * The native credentials type is a ucred_t. Added in 2.40. + * The native credentials type is a `ucred_t`. Added in 2.40. */ SOLARIS_UCRED = 4, /** - * The native credentials type is a struct unpcbid. + * The native credentials type is a `struct unpcbid`. Added in 2.42. */ NETBSD_UNPCBID = 5, + /** + * The native credentials type is a `struct xucred`. Added in 2.66. + */ + APPLE_XUCRED = 6, + /** + * The native credentials type is a PID `DWORD`. Added in 2.72. + */ + WIN32_PID = 7, } alias GCredentialsType CredentialsType; @@ -398,6 +406,11 @@ public enum GDBusConnectionFlags * delayed until g_dbus_connection_start_message_processing() is called. */ DELAY_MESSAGE_PROCESSING = 16, + /** + * When authenticating + * as a server, require the UID of the peer to be the same as the UID of the server. (Since: 2.68) + */ + AUTHENTICATION_REQUIRE_SAME_USER = 32, } alias GDBusConnectionFlags DBusConnectionFlags; @@ -828,6 +841,12 @@ public enum GDBusProxyFlags * and only if %G_DBUS_PROXY_FLAGS_DO_NOT_AUTO_START is not also specified. */ DO_NOT_AUTO_START_AT_CONSTRUCTION = 16, + /** + * Don't actually send the AddMatch D-Bus + * call for this signal subscription. This gives you more control + * over which match rules you add (but you must add them manually). (Since: 2.72) + */ + NO_MATCH_RULE = 32, } alias GDBusProxyFlags DBusProxyFlags; @@ -873,6 +892,11 @@ public enum GDBusServerFlags * authentication method. */ AUTHENTICATION_ALLOW_ANONYMOUS = 2, + /** + * Require the UID of the + * peer to be the same as the UID of the server when authenticating. (Since: 2.68) + */ + AUTHENTICATION_REQUIRE_SAME_USER = 4, } alias GDBusServerFlags DBusServerFlags; @@ -1097,7 +1121,7 @@ alias GFileAttributeStatus FileAttributeStatus; public enum GFileAttributeType { /** - * indicates an invalid or uninitalized type. + * indicates an invalid or uninitialized type. */ INVALID = 0, /** @@ -1197,7 +1221,9 @@ public enum GFileCreateFlags * rather than a "save new version of" replace operation. * You can think of it as "unlink destination" before * writing to it, although the implementation may not - * be exactly like that. Since 2.20 + * be exactly like that. This flag can only be used with + * g_file_replace() and its variants, including g_file_replace_contents(). + * Since 2.20 */ REPLACE_DESTINATION = 2, } @@ -1397,7 +1423,7 @@ alias GFileType FileType; /** * Indicates a hint from the file system whether files should be * previewed in a file manager. Returned as the value of the key - * #G_FILE_ATTRIBUTE_FILESYSTEM_USE_PREVIEW. + * %G_FILE_ATTRIBUTE_FILESYSTEM_USE_PREVIEW. */ public enum GFilesystemPreviewType { @@ -1431,7 +1457,7 @@ alias GFilesystemPreviewType FilesystemPreviewType; * } * ]| * but should instead treat all unrecognized error codes the same as - * #G_IO_ERROR_FAILED. + * %G_IO_ERROR_FAILED. * * See also #GPollableReturn for a cheaper way of returning * %G_IO_ERROR_WOULD_BLOCK to callers without allocating a #GError. @@ -2108,7 +2134,7 @@ public enum GSettingsBindFlags */ NO_SENSITIVITY = 4, /** - * When set in addition to #G_SETTINGS_BIND_GET, set the #GObject property + * When set in addition to %G_SETTINGS_BIND_GET, set the #GObject property * value initially from the setting, but do not listen for changes of the setting */ GET_NO_CHANGES = 8, @@ -2398,6 +2424,12 @@ public enum GSubprocessFlags * over the "standard" file descriptors (stdin, stdout, stderr). */ INHERIT_FDS = 128, + /** + * if path searching is + * needed when spawning the subprocess, use the `PATH` in the launcher + * environment. (Since: 2.72) + */ + SEARCH_PATH_FROM_ENVP = 256, } alias GSubprocessFlags SubprocessFlags; @@ -2439,10 +2471,16 @@ alias GTlsAuthenticationMode TlsAuthenticationMode; /** * A set of flags describing TLS certification validation. This can be - * used to set which validation steps to perform (eg, with - * g_tls_client_connection_set_validation_flags()), or to describe why - * a particular certificate was rejected (eg, in - * #GTlsConnection::accept-certificate). + * used to describe why a particular certificate was rejected (for + * example, in #GTlsConnection::accept-certificate). + * + * GLib guarantees that if certificate verification fails, at least one + * flag will be set, but it does not guarantee that all possible flags + * will be set. Accordingly, you may not safely decide to ignore any + * particular type of error. For example, it would be incorrect to mask + * %G_TLS_CERTIFICATE_EXPIRED if you want to allow expired certificates, + * because this could potentially be the only error flag set even if + * other problems exist with the certificate. * * Since: 2.28 */ @@ -2506,6 +2544,71 @@ public enum GTlsCertificateRequestFlags } alias GTlsCertificateRequestFlags TlsCertificateRequestFlags; +/** + * An error code used with %G_TLS_CHANNEL_BINDING_ERROR in a #GError to + * indicate a TLS channel binding retrieval error. + * + * Since: 2.66 + */ +public enum GTlsChannelBindingError +{ + /** + * Either entire binding + * retrieval facility or specific binding type is not implemented in the + * TLS backend. + */ + NOT_IMPLEMENTED = 0, + /** + * The handshake is not yet + * complete on the connection which is a strong requirement for any existing + * binding type. + */ + INVALID_STATE = 1, + /** + * Handshake is complete but + * binding data is not available. That normally indicates the TLS + * implementation failed to provide the binding data. For example, some + * implementations do not provide a peer certificate for resumed connections. + */ + NOT_AVAILABLE = 2, + /** + * Binding type is not supported + * on the current connection. This error could be triggered when requesting + * `tls-server-end-point` binding data for a certificate which has no hash + * function or uses multiple hash functions. + */ + NOT_SUPPORTED = 3, + /** + * Any other backend error + * preventing binding data retrieval. + */ + GENERAL_ERROR = 4, +} +alias GTlsChannelBindingError TlsChannelBindingError; + +/** + * The type of TLS channel binding data to retrieve from #GTlsConnection + * or #GDtlsConnection, as documented by RFC 5929. The + * [`tls-unique-for-telnet`](https://tools.ietf.org/html/rfc5929#section-5) + * binding type is not currently implemented. + * + * Since: 2.66 + */ +public enum GTlsChannelBindingType +{ + /** + * [`tls-unique`](https://tools.ietf.org/html/rfc5929#section-3) binding + * type + */ + UNIQUE = 0, + /** + * [`tls-server-end-point`](https://tools.ietf.org/html/rfc5929#section-4) + * binding type + */ + SERVER_END_POINT = 1, +} +alias GTlsChannelBindingType TlsChannelBindingType; + /** * Flags for g_tls_database_lookup_certificate_for_handle(), * g_tls_database_lookup_certificate_issuer(), @@ -2590,6 +2693,11 @@ public enum GTlsError * downgrade attack. Since: 2.60 */ INAPPROPRIATE_FALLBACK = 7, + /** + * The certificate failed + * to load because a password was incorrect. Since: 2.72 + */ + BAD_CERTIFICATE_PASSWORD = 8, } alias GTlsError TlsError; @@ -2644,9 +2752,74 @@ public enum GTlsPasswordFlags * this password right. */ FINAL_TRY = 8, + /** + * For PKCS #11, the user PIN is required. + * Since: 2.70. + */ + PKCS11_USER = 16, + /** + * For PKCS #11, the security officer + * PIN is required. Since: 2.70. + */ + PKCS11_SECURITY_OFFICER = 32, + /** + * For PKCS #11, the context-specific + * PIN is required. Since: 2.70. + */ + PKCS11_CONTEXT_SPECIFIC = 64, } alias GTlsPasswordFlags TlsPasswordFlags; +/** + * The TLS or DTLS protocol version used by a #GTlsConnection or + * #GDtlsConnection. The integer values of these versions are sequential + * to ensure newer known protocol versions compare greater than older + * known versions. Any known DTLS protocol version will compare greater + * than any SSL or TLS protocol version. The protocol version may be + * %G_TLS_PROTOCOL_VERSION_UNKNOWN if the TLS backend supports a newer + * protocol version that GLib does not yet know about. This means that + * it's possible for an unknown DTLS protocol version to compare less + * than the TLS protocol versions. + * + * Since: 2.70 + */ +public enum GTlsProtocolVersion +{ + /** + * No protocol version or unknown protocol version + */ + UNKNOWN = 0, + /** + * SSL 3.0, which is insecure and should not be used + */ + SSL_3_0 = 1, + /** + * TLS 1.0, which is insecure and should not be used + */ + TLS_1_0 = 2, + /** + * TLS 1.1, which is insecure and should not be used + */ + TLS_1_1 = 3, + /** + * TLS 1.2, defined by [RFC 5246](https://datatracker.ietf.org/doc/html/rfc5246) + */ + TLS_1_2 = 4, + /** + * TLS 1.3, defined by [RFC 8446](https://datatracker.ietf.org/doc/html/rfc8446) + */ + TLS_1_3 = 5, + /** + * DTLS 1.0, which is insecure and should not be used + */ + DTLS_1_0 = 201, + /** + * DTLS 1.2, defined by [RFC 6347](https://datatracker.ietf.org/doc/html/rfc6347) + */ + DTLS_1_2 = 202, +} +alias GTlsProtocolVersion TlsProtocolVersion; + /** * When to allow rehandshaking. See * g_tls_connection_set_rehandshake_mode(). @@ -3002,8 +3175,14 @@ struct GAppInfoIface * application @appinfo, or %NULL if none. */ extern(C) const(char)* function(GAppInfo* appinfo) getDescription; - /** */ - extern(C) const(char)* function(GAppInfo* appinfo) getExecutable; + /** + * + * Params: + * appinfo = a #GAppInfo + * Returns: a string containing the @appinfo's application + * binaries name + */ + extern(C) char* function(GAppInfo* appinfo) getExecutable; /** * * Params: @@ -3118,8 +3297,14 @@ struct GAppInfoIface * Returns: %TRUE if @appinfo has been deleted */ extern(C) int function(GAppInfo* appinfo) doDelete; - /** */ - extern(C) const(char)* function(GAppInfo* appinfo) getCommandline; + /** + * + * Params: + * appinfo = a #GAppInfo + * Returns: a string containing the @appinfo's commandline, + * or %NULL if this information is not available + */ + extern(C) char* function(GAppInfo* appinfo) getCommandline; /** * * Params: @@ -3194,13 +3379,13 @@ struct GAppLaunchContextClass /** */ extern(C) void function(GAppLaunchContext* context, GAppInfo* info, GVariant* platformData) launched; /** */ + extern(C) void function(GAppLaunchContext* context, GAppInfo* info, GVariant* platformData) launchStarted; + /** */ extern(C) void function() GReserved1; /** */ extern(C) void function() GReserved2; /** */ extern(C) void function() GReserved3; - /** */ - extern(C) void function() GReserved4; } struct GAppLaunchContextPrivate; @@ -4265,6 +4450,42 @@ struct GDatagramBasedInterface extern(C) int function(GDatagramBased* datagramBased, GIOCondition condition, long timeout, GCancellable* cancellable, GError** err) conditionWait; } +struct GDebugController; + +struct GDebugControllerDBus +{ + GObject parentInstance; +} + +/** + * The virtual function table for #GDebugControllerDBus. + * + * Since: 2.72 + */ +struct GDebugControllerDBusClass +{ + /** + * The parent class. + */ + GObjectClass parentClass; + /** */ + extern(C) int function(GDebugControllerDBus* controller, GDBusMethodInvocation* invocation) authorize; + void*[12] padding; +} + +/** + * The virtual function table for #GDebugController. + * + * Since: 2.72 + */ +struct GDebugControllerInterface +{ + /** + * The parent interface. + */ + GTypeInterface gIface; +} + struct GDesktopAppInfo; struct GDesktopAppInfoClass @@ -4286,7 +4507,8 @@ struct GDesktopAppInfoLookupIface * Params: * lookup = a #GDesktopAppInfoLookup * uriScheme = a string containing a URI scheme. - * Returns: #GAppInfo for given @uri_scheme or %NULL on error. + * Returns: #GAppInfo for given @uri_scheme or + * %NULL on error. */ extern(C) GAppInfo* function(GDesktopAppInfoLookup* lookup, const(char)* uriScheme) getDefaultForUriScheme; } @@ -4356,7 +4578,7 @@ struct GDriveIface * * Params: * drive = a #GDrive. - * Returns: %TRUE if the @drive is capabable of automatically detecting + * Returns: %TRUE if the @drive is capable of automatically detecting * media changes, %FALSE otherwise. */ extern(C) int function(GDrive* drive) isMediaCheckAutomatic; @@ -4599,6 +4821,8 @@ struct GDtlsConnectionInterface * Returns: the negotiated protocol, or %NULL */ extern(C) const(char)* function(GDtlsConnection* conn) getNegotiatedProtocol; + /** */ + extern(C) int function(GDtlsConnection* conn, GTlsChannelBindingType type, GByteArray* data, GError** err) getBindingData; } struct GDtlsServerConnection; @@ -4879,19 +5103,34 @@ struct GFileIface * Params: * file = input #GFile * Returns: a string containing the URI scheme for the given - * #GFile. The returned string should be freed with g_free() - * when no longer needed. + * #GFile or %NULL if the #GFile was constructed with an invalid URI. The + * returned string should be freed with g_free() when no longer needed. */ extern(C) char* function(GFile* file) getUriScheme; - /** */ + /** + * + * Params: + * file = input #GFile + * Returns: string containing the #GFile's + * base name, or %NULL if given #GFile is invalid. The returned string + * should be freed with g_free() when no longer needed. + */ extern(C) char* function(GFile* file) getBasename; - /** */ + /** + * + * Params: + * file = input #GFile + * Returns: string containing the #GFile's path, + * or %NULL if no such path exists. The returned string should be freed + * with g_free() when no longer needed. + */ extern(C) char* function(GFile* file) getPath; /** * * Params: * file = input #GFile - * Returns: a string containing the #GFile's URI. + * Returns: a string containing the #GFile's URI. If the #GFile was constructed + * with an invalid URI, an invalid URI is returned. * The returned string should be freed with g_free() * when no longer needed. */ @@ -4923,16 +5162,23 @@ struct GFileIface * %FALSE otherwise. */ extern(C) int function(GFile* prefix, GFile* file) prefixMatches; - /** */ + /** + * + * Params: + * parent = input #GFile + * descendant = input #GFile + * Returns: string with the relative path from + * @descendant to @parent, or %NULL if @descendant doesn't have @parent as + * prefix. The returned string should be freed with g_free() when + * no longer needed. + */ extern(C) char* function(GFile* parent, GFile* descendant) getRelativePath; /** * * Params: * file = input #GFile * relativePath = a given relative path string - * Returns: #GFile to the resolved path. - * %NULL if @relative_path is %NULL or if @file is invalid. - * Free the returned object with g_object_unref(). + * Returns: a #GFile for the resolved path. */ extern(C) GFile* function(GFile* file, char* relativePath) resolveRelativePath; /** @@ -5398,9 +5644,17 @@ struct GFileIface */ extern(C) int function(GFile* source, GFile* destination, GFileCopyFlags flags, GCancellable* cancellable, GFileProgressCallback progressCallback, void* progressCallbackData, GError** err) move; /** */ - extern(C) void function() MoveAsync; - /** */ - extern(C) void function() MoveFinish; + extern(C) void function(GFile* source, GFile* destination, GFileCopyFlags flags, int ioPriority, GCancellable* cancellable, GFileProgressCallback progressCallback, void* progressCallbackData, GAsyncReadyCallback callback, void* userData) moveAsync; + /** + * + * Params: + * file = input source #GFile + * result = a #GAsyncResult + * Returns: %TRUE on successful file move, %FALSE otherwise. + * + * Throws: GException on failure. + */ + extern(C) int function(GFile* file, GAsyncResult* result, GError** err) moveFinish; /** */ extern(C) void function(GFile* file, GMountMountFlags flags, GMountOperation* mountOperation, GCancellable* cancellable, GAsyncReadyCallback callback, void* userData) mountMountable; /** @@ -5986,7 +6240,7 @@ struct GIconIface * * Params: * icon = a #GIcon - * Returns: a #GVariant, or %NULL when serialization fails. + * Returns: a #GVariant, or %NULL when serialization fails. The #GVariant will not be floating. */ extern(C) GVariant* function(GIcon* icon) serialize; } @@ -7142,8 +7396,8 @@ struct GPollableInputStreamInterface * * Params: * stream = a #GPollableInputStream - * buffer = a buffer to - * read data into (which should be at least @count bytes long). + * buffer = a + * buffer to read data into (which should be at least @count bytes long). * count = the number of bytes you want to read * Returns: the number of bytes read, or -1 on error (including * %G_IO_ERROR_WOULD_BLOCK). @@ -7237,6 +7491,21 @@ struct GPollableOutputStreamInterface extern(C) GPollableReturn function(GPollableOutputStream* stream, GOutputVector* vectors, size_t nVectors, size_t* bytesWritten, GError** err) writevNonblocking; } +struct GPowerProfileMonitor; + +/** + * The virtual function table for #GPowerProfileMonitor. + * + * Since: 2.70 + */ +struct GPowerProfileMonitorInterface +{ + /** + * The parent interface. + */ + GTypeInterface gIface; +} + struct GPropertyAction; struct GProxy; @@ -7558,7 +7827,8 @@ struct GSeekableIface * * Params: * seekable = a #GSeekable. - * Returns: the offset from the beginning of the buffer. + * Returns: the (positive or zero) offset from the beginning of the + * buffer, zero if the target is not seekable. */ extern(C) long function(GSeekable* seekable) tell; /** @@ -8186,8 +8456,16 @@ struct GTlsConnection GTlsConnectionPrivate* priv; } +/** + * The class structure for the #GTlsConnection type. + * + * Since: 2.28 + */ struct GTlsConnectionClass { + /** + * The parent class. + */ GIOStreamClass parentClass; /** */ extern(C) int function(GTlsConnection* connection, GTlsCertificate* peerCert, GTlsCertificateFlags errors) acceptCertificate; @@ -8214,7 +8492,16 @@ struct GTlsConnectionClass * Throws: GException on failure. */ extern(C) int function(GTlsConnection* conn, GAsyncResult* result, GError** err) handshakeFinish; - void*[8] padding; + /** */ + extern(C) int function(GTlsConnection* conn, GTlsChannelBindingType type, GByteArray* data, GError** err) getBindingData; + /** + * + * Params: + * conn = a #GTlsConnection + * Returns: the negotiated protocol, or %NULL + */ + extern(C) const(char)* function(GTlsConnection* conn) getNegotiatedProtocol; + void*[6] padding; } struct GTlsConnectionPrivate; @@ -8468,7 +8755,6 @@ struct GTlsPasswordClass * * Params: * password = a #GTlsPassword object - * length = location to place the length of the password. * Returns: The password value (owned by the password object). */ extern(C) char* function(GTlsPassword* password, size_t* length) getValue; @@ -8995,6 +9281,10 @@ struct GZlibDecompressorClass * #GAsyncReadyCallback must likewise call it asynchronously in a * later iteration of the main context. * + * The asynchronous operation is guaranteed to have held a reference to + * @source_object from the time when the `*_async()` function was called, until + * after this callback returns. + * * Params: * sourceObject = the object the asynchronous operation was started with. * res = a #GAsyncResult. @@ -9243,7 +9533,8 @@ public alias extern(C) GType function(GDBusObjectManagerClient* manager, const(c * * Params: * connection = A #GDBusConnection. - * senderName = The unique bus name of the sender of the signal. + * senderName = The unique bus name of the sender of the signal, + * or %NULL on a peer-to-peer D-Bus connection. * objectPath = The object path that the signal was emitted on. * interfaceName = The name of the interface. * signalName = The name of the signal. @@ -9284,7 +9575,7 @@ public alias extern(C) GDBusInterfaceVTable* function(GDBusConnection* connectio * specified (ie: to verify that the object path is valid). * * Hierarchies are not supported; the items that you return should not - * contain the '/' character. + * contain the `/` character. * * The return value will be freed with g_strfreev(). * @@ -9596,6 +9887,42 @@ public alias extern(C) void function(GTask* task, void* sourceObject, void* task */ public alias extern(C) GFile* function(GVfs* vfs, const(char)* identifier, void* userData) GVfsFileLookupFunc; +/** + * The value returned by handlers of the signals generated by + * the `gdbus-codegen` tool to indicate that a method call has been + * handled by an implementation. It is equal to %TRUE, but using + * this macro is sometimes more readable. + * + * In code that needs to be backwards-compatible with older GLib, + * use %TRUE instead, often written like this: + * + * |[ + * g_dbus_method_invocation_return_error (invocation, ...); + * return TRUE; // handled + * ]| + */ +enum DBUS_METHOD_INVOCATION_HANDLED = true; +alias G_DBUS_METHOD_INVOCATION_HANDLED = DBUS_METHOD_INVOCATION_HANDLED; + +/** + * The value returned by handlers of the signals generated by + * the `gdbus-codegen` tool to indicate that a method call has not been + * handled by an implementation. It is equal to %FALSE, but using + * this macro is sometimes more readable. + * + * In code that needs to be backwards-compatible with older GLib, + * use %FALSE instead. + */ +enum DBUS_METHOD_INVOCATION_UNHANDLED = false; +alias G_DBUS_METHOD_INVOCATION_UNHANDLED = DBUS_METHOD_INVOCATION_UNHANDLED; + +/** + * Extension point for debug control functionality. + * See [Extending GIO][extending-gio]. + */ +enum DEBUG_CONTROLLER_EXTENSION_POINT_NAME = "gio-debug-controller"; +alias G_DEBUG_CONTROLLER_EXTENSION_POINT_NAME = DEBUG_CONTROLLER_EXTENSION_POINT_NAME; + /** * Extension point for default handler to URI association. See * [Extending GIO][extending-gio]. @@ -9614,7 +9941,9 @@ alias G_DRIVE_IDENTIFIER_KIND_UNIX_DEVICE = DRIVE_IDENTIFIER_KIND_UNIX_DEVICE; /** * A key in the "access" namespace for checking deletion privileges. + * * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN. + * * This attribute will be %TRUE if the user is able to delete the file. */ enum FILE_ATTRIBUTE_ACCESS_CAN_DELETE = "access::can-delete"; @@ -9622,7 +9951,9 @@ alias G_FILE_ATTRIBUTE_ACCESS_CAN_DELETE = FILE_ATTRIBUTE_ACCESS_CAN_DELETE; /** * A key in the "access" namespace for getting execution privileges. + * * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN. + * * This attribute will be %TRUE if the user is able to execute the file. */ enum FILE_ATTRIBUTE_ACCESS_CAN_EXECUTE = "access::can-execute"; @@ -9630,7 +9961,9 @@ alias G_FILE_ATTRIBUTE_ACCESS_CAN_EXECUTE = FILE_ATTRIBUTE_ACCESS_CAN_EXECUTE; /** * A key in the "access" namespace for getting read privileges. + * * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN. + * * This attribute will be %TRUE if the user is able to read the file. */ enum FILE_ATTRIBUTE_ACCESS_CAN_READ = "access::can-read"; @@ -9638,7 +9971,9 @@ alias G_FILE_ATTRIBUTE_ACCESS_CAN_READ = FILE_ATTRIBUTE_ACCESS_CAN_READ; /** * A key in the "access" namespace for checking renaming privileges. + * * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN. + * * This attribute will be %TRUE if the user is able to rename the file. */ enum FILE_ATTRIBUTE_ACCESS_CAN_RENAME = "access::can-rename"; @@ -9646,7 +9981,9 @@ alias G_FILE_ATTRIBUTE_ACCESS_CAN_RENAME = FILE_ATTRIBUTE_ACCESS_CAN_RENAME; /** * A key in the "access" namespace for checking trashing privileges. + * * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN. + * * This attribute will be %TRUE if the user is able to move the file to * the trash. */ @@ -9655,7 +9992,9 @@ alias G_FILE_ATTRIBUTE_ACCESS_CAN_TRASH = FILE_ATTRIBUTE_ACCESS_CAN_TRASH; /** * A key in the "access" namespace for getting write privileges. + * * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN. + * * This attribute will be %TRUE if the user is able to write to the file. */ enum FILE_ATTRIBUTE_ACCESS_CAN_WRITE = "access::can-write"; @@ -9663,9 +10002,13 @@ alias G_FILE_ATTRIBUTE_ACCESS_CAN_WRITE = FILE_ATTRIBUTE_ACCESS_CAN_WRITE; /** * A key in the "dos" namespace for checking if the file's archive flag - * is set. This attribute is %TRUE if the archive flag is set. This attribute - * is only available for DOS file systems. Corresponding #GFileAttributeType - * is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN. + * is set. + * + * This attribute is %TRUE if the archive flag is set. + * + * This attribute is only available for DOS file systems. + * + * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN. */ enum FILE_ATTRIBUTE_DOS_IS_ARCHIVE = "dos::is-archive"; alias G_FILE_ATTRIBUTE_DOS_IS_ARCHIVE = FILE_ATTRIBUTE_DOS_IS_ARCHIVE; @@ -9673,9 +10016,12 @@ alias G_FILE_ATTRIBUTE_DOS_IS_ARCHIVE = FILE_ATTRIBUTE_DOS_IS_ARCHIVE; /** * A key in the "dos" namespace for checking if the file is a NTFS mount point * (a volume mount or a junction point). + * * This attribute is %TRUE if file is a reparse point of type * [IO_REPARSE_TAG_MOUNT_POINT](https://msdn.microsoft.com/en-us/library/dd541667.aspx). + * * This attribute is only available for DOS file systems. + * * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN. */ enum FILE_ATTRIBUTE_DOS_IS_MOUNTPOINT = "dos::is-mountpoint"; @@ -9683,42 +10029,54 @@ alias G_FILE_ATTRIBUTE_DOS_IS_MOUNTPOINT = FILE_ATTRIBUTE_DOS_IS_MOUNTPOINT; /** * A key in the "dos" namespace for checking if the file's backup flag - * is set. This attribute is %TRUE if the backup flag is set. This attribute - * is only available for DOS file systems. Corresponding #GFileAttributeType - * is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN. + * is set. + * + * This attribute is %TRUE if the backup flag is set. + * + * This attribute is only available for DOS file systems. + * + * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN. */ enum FILE_ATTRIBUTE_DOS_IS_SYSTEM = "dos::is-system"; alias G_FILE_ATTRIBUTE_DOS_IS_SYSTEM = FILE_ATTRIBUTE_DOS_IS_SYSTEM; /** * A key in the "dos" namespace for getting the file NTFS reparse tag. + * * This value is 0 for files that are not reparse points. + * * See the [Reparse Tags](https://msdn.microsoft.com/en-us/library/dd541667.aspx) - * page for possible reparse tag values. Corresponding #GFileAttributeType - * is %G_FILE_ATTRIBUTE_TYPE_UINT32. + * page for possible reparse tag values. + * + * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT32. */ enum FILE_ATTRIBUTE_DOS_REPARSE_POINT_TAG = "dos::reparse-point-tag"; alias G_FILE_ATTRIBUTE_DOS_REPARSE_POINT_TAG = FILE_ATTRIBUTE_DOS_REPARSE_POINT_TAG; /** * A key in the "etag" namespace for getting the value of the file's - * entity tag. Corresponding #GFileAttributeType is - * %G_FILE_ATTRIBUTE_TYPE_STRING. + * entity tag. + * + * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING. */ enum FILE_ATTRIBUTE_ETAG_VALUE = "etag::value"; alias G_FILE_ATTRIBUTE_ETAG_VALUE = FILE_ATTRIBUTE_ETAG_VALUE; /** - * A key in the "filesystem" namespace for getting the number of bytes of free space left on the - * file system. Corresponding #GFileAttributeType is - * %G_FILE_ATTRIBUTE_TYPE_UINT64. + * A key in the "filesystem" namespace for getting the number of bytes + * of free space left on the file system. + * + * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT64. */ enum FILE_ATTRIBUTE_FILESYSTEM_FREE = "filesystem::free"; alias G_FILE_ATTRIBUTE_FILESYSTEM_FREE = FILE_ATTRIBUTE_FILESYSTEM_FREE; /** * A key in the "filesystem" namespace for checking if the file system - * is read only. Is set to %TRUE if the file system is read only. + * is read only. + * + * Is set to %TRUE if the file system is read only. + * * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN. */ enum FILE_ATTRIBUTE_FILESYSTEM_READONLY = "filesystem::readonly"; @@ -9726,31 +10084,37 @@ alias G_FILE_ATTRIBUTE_FILESYSTEM_READONLY = FILE_ATTRIBUTE_FILESYSTEM_READONLY; /** * A key in the "filesystem" namespace for checking if the file system - * is remote. Is set to %TRUE if the file system is remote. + * is remote. + * + * Is set to %TRUE if the file system is remote. + * * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN. */ enum FILE_ATTRIBUTE_FILESYSTEM_REMOTE = "filesystem::remote"; alias G_FILE_ATTRIBUTE_FILESYSTEM_REMOTE = FILE_ATTRIBUTE_FILESYSTEM_REMOTE; /** - * A key in the "filesystem" namespace for getting the total size (in bytes) of the file system, - * used in g_file_query_filesystem_info(). Corresponding #GFileAttributeType - * is %G_FILE_ATTRIBUTE_TYPE_UINT64. + * A key in the "filesystem" namespace for getting the total size (in + * bytes) of the file system, used in g_file_query_filesystem_info(). + * + * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT64. */ enum FILE_ATTRIBUTE_FILESYSTEM_SIZE = "filesystem::size"; alias G_FILE_ATTRIBUTE_FILESYSTEM_SIZE = FILE_ATTRIBUTE_FILESYSTEM_SIZE; /** * A key in the "filesystem" namespace for getting the file system's type. + * * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING. */ enum FILE_ATTRIBUTE_FILESYSTEM_TYPE = "filesystem::type"; alias G_FILE_ATTRIBUTE_FILESYSTEM_TYPE = FILE_ATTRIBUTE_FILESYSTEM_TYPE; /** - * A key in the "filesystem" namespace for getting the number of bytes of used on the - * file system. Corresponding #GFileAttributeType is - * %G_FILE_ATTRIBUTE_TYPE_UINT64. + * A key in the "filesystem" namespace for getting the number of bytes + * used by data on the file system. + * + * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT64. */ enum FILE_ATTRIBUTE_FILESYSTEM_USED = "filesystem::used"; alias G_FILE_ATTRIBUTE_FILESYSTEM_USED = FILE_ATTRIBUTE_FILESYSTEM_USED; @@ -9758,23 +10122,27 @@ alias G_FILE_ATTRIBUTE_FILESYSTEM_USED = FILE_ATTRIBUTE_FILESYSTEM_USED; /** * A key in the "filesystem" namespace for hinting a file manager * application whether it should preview (e.g. thumbnail) files on the - * file system. The value for this key contain a - * #GFilesystemPreviewType. + * file system. + * + * The value for this key contain a #GFilesystemPreviewType. */ enum FILE_ATTRIBUTE_FILESYSTEM_USE_PREVIEW = "filesystem::use-preview"; alias G_FILE_ATTRIBUTE_FILESYSTEM_USE_PREVIEW = FILE_ATTRIBUTE_FILESYSTEM_USE_PREVIEW; /** * A key in the "gvfs" namespace that gets the name of the current - * GVFS backend in use. Corresponding #GFileAttributeType is - * %G_FILE_ATTRIBUTE_TYPE_STRING. + * GVFS backend in use. + * + * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING. */ enum FILE_ATTRIBUTE_GVFS_BACKEND = "gvfs::backend"; alias G_FILE_ATTRIBUTE_GVFS_BACKEND = FILE_ATTRIBUTE_GVFS_BACKEND; /** * A key in the "id" namespace for getting a file identifier. + * * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING. + * * An example use would be during listing files, to avoid recursive * directory scanning. */ @@ -9783,7 +10151,9 @@ alias G_FILE_ATTRIBUTE_ID_FILE = FILE_ATTRIBUTE_ID_FILE; /** * A key in the "id" namespace for getting the file system identifier. + * * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING. + * * An example use would be during drag and drop to see if the source * and target are on the same filesystem (default to move) or not (default * to copy). @@ -9792,50 +10162,63 @@ enum FILE_ATTRIBUTE_ID_FILESYSTEM = "id::filesystem"; alias G_FILE_ATTRIBUTE_ID_FILESYSTEM = FILE_ATTRIBUTE_ID_FILESYSTEM; /** - * A key in the "mountable" namespace for checking if a file (of type G_FILE_TYPE_MOUNTABLE) can be ejected. + * A key in the "mountable" namespace for checking if a file (of + * type G_FILE_TYPE_MOUNTABLE) can be ejected. + * * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN. */ enum FILE_ATTRIBUTE_MOUNTABLE_CAN_EJECT = "mountable::can-eject"; alias G_FILE_ATTRIBUTE_MOUNTABLE_CAN_EJECT = FILE_ATTRIBUTE_MOUNTABLE_CAN_EJECT; /** - * A key in the "mountable" namespace for checking if a file (of type G_FILE_TYPE_MOUNTABLE) is mountable. + * A key in the "mountable" namespace for checking if a file (of + * type G_FILE_TYPE_MOUNTABLE) is mountable. + * * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN. */ enum FILE_ATTRIBUTE_MOUNTABLE_CAN_MOUNT = "mountable::can-mount"; alias G_FILE_ATTRIBUTE_MOUNTABLE_CAN_MOUNT = FILE_ATTRIBUTE_MOUNTABLE_CAN_MOUNT; /** - * A key in the "mountable" namespace for checking if a file (of type G_FILE_TYPE_MOUNTABLE) can be polled. + * A key in the "mountable" namespace for checking if a file (of + * type G_FILE_TYPE_MOUNTABLE) can be polled. + * * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN. */ enum FILE_ATTRIBUTE_MOUNTABLE_CAN_POLL = "mountable::can-poll"; alias G_FILE_ATTRIBUTE_MOUNTABLE_CAN_POLL = FILE_ATTRIBUTE_MOUNTABLE_CAN_POLL; /** - * A key in the "mountable" namespace for checking if a file (of type G_FILE_TYPE_MOUNTABLE) can be started. + * A key in the "mountable" namespace for checking if a file (of + * type G_FILE_TYPE_MOUNTABLE) can be started. + * * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN. */ enum FILE_ATTRIBUTE_MOUNTABLE_CAN_START = "mountable::can-start"; alias G_FILE_ATTRIBUTE_MOUNTABLE_CAN_START = FILE_ATTRIBUTE_MOUNTABLE_CAN_START; /** - * A key in the "mountable" namespace for checking if a file (of type G_FILE_TYPE_MOUNTABLE) can be started - * degraded. + * A key in the "mountable" namespace for checking if a file (of + * type G_FILE_TYPE_MOUNTABLE) can be started degraded. + * * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN. */ enum FILE_ATTRIBUTE_MOUNTABLE_CAN_START_DEGRADED = "mountable::can-start-degraded"; alias G_FILE_ATTRIBUTE_MOUNTABLE_CAN_START_DEGRADED = FILE_ATTRIBUTE_MOUNTABLE_CAN_START_DEGRADED; /** - * A key in the "mountable" namespace for checking if a file (of type G_FILE_TYPE_MOUNTABLE) can be stopped. + * A key in the "mountable" namespace for checking if a file (of + * type G_FILE_TYPE_MOUNTABLE) can be stopped. + * * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN. */ enum FILE_ATTRIBUTE_MOUNTABLE_CAN_STOP = "mountable::can-stop"; alias G_FILE_ATTRIBUTE_MOUNTABLE_CAN_STOP = FILE_ATTRIBUTE_MOUNTABLE_CAN_STOP; /** - * A key in the "mountable" namespace for checking if a file (of type G_FILE_TYPE_MOUNTABLE) is unmountable. + * A key in the "mountable" namespace for checking if a file (of + * type G_FILE_TYPE_MOUNTABLE) is unmountable. + * * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN. */ enum FILE_ATTRIBUTE_MOUNTABLE_CAN_UNMOUNT = "mountable::can-unmount"; @@ -9843,14 +10226,17 @@ alias G_FILE_ATTRIBUTE_MOUNTABLE_CAN_UNMOUNT = FILE_ATTRIBUTE_MOUNTABLE_CAN_UNMO /** * A key in the "mountable" namespace for getting the HAL UDI for the mountable - * file. Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING. + * file. + * + * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING. */ enum FILE_ATTRIBUTE_MOUNTABLE_HAL_UDI = "mountable::hal-udi"; alias G_FILE_ATTRIBUTE_MOUNTABLE_HAL_UDI = FILE_ATTRIBUTE_MOUNTABLE_HAL_UDI; /** - * A key in the "mountable" namespace for checking if a file (of type G_FILE_TYPE_MOUNTABLE) - * is automatically polled for media. + * A key in the "mountable" namespace for checking if a file (of + * type G_FILE_TYPE_MOUNTABLE) is automatically polled for media. + * * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN. */ enum FILE_ATTRIBUTE_MOUNTABLE_IS_MEDIA_CHECK_AUTOMATIC = "mountable::is-media-check-automatic"; @@ -9858,6 +10244,7 @@ alias G_FILE_ATTRIBUTE_MOUNTABLE_IS_MEDIA_CHECK_AUTOMATIC = FILE_ATTRIBUTE_MOUNT /** * A key in the "mountable" namespace for getting the #GDriveStartStopType. + * * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT32. */ enum FILE_ATTRIBUTE_MOUNTABLE_START_STOP_TYPE = "mountable::start-stop-type"; @@ -9865,6 +10252,7 @@ alias G_FILE_ATTRIBUTE_MOUNTABLE_START_STOP_TYPE = FILE_ATTRIBUTE_MOUNTABLE_STAR /** * A key in the "mountable" namespace for getting the unix device. + * * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT32. */ enum FILE_ATTRIBUTE_MOUNTABLE_UNIX_DEVICE = "mountable::unix-device"; @@ -9872,6 +10260,7 @@ alias G_FILE_ATTRIBUTE_MOUNTABLE_UNIX_DEVICE = FILE_ATTRIBUTE_MOUNTABLE_UNIX_DEV /** * A key in the "mountable" namespace for getting the unix device file. + * * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING. */ enum FILE_ATTRIBUTE_MOUNTABLE_UNIX_DEVICE_FILE = "mountable::unix-device-file"; @@ -9879,6 +10268,7 @@ alias G_FILE_ATTRIBUTE_MOUNTABLE_UNIX_DEVICE_FILE = FILE_ATTRIBUTE_MOUNTABLE_UNI /** * A key in the "owner" namespace for getting the file owner's group. + * * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING. */ enum FILE_ATTRIBUTE_OWNER_GROUP = "owner::group"; @@ -9886,52 +10276,63 @@ alias G_FILE_ATTRIBUTE_OWNER_GROUP = FILE_ATTRIBUTE_OWNER_GROUP; /** * A key in the "owner" namespace for getting the user name of the - * file's owner. Corresponding #GFileAttributeType is - * %G_FILE_ATTRIBUTE_TYPE_STRING. + * file's owner. + * + * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING. */ enum FILE_ATTRIBUTE_OWNER_USER = "owner::user"; alias G_FILE_ATTRIBUTE_OWNER_USER = FILE_ATTRIBUTE_OWNER_USER; /** * A key in the "owner" namespace for getting the real name of the - * user that owns the file. Corresponding #GFileAttributeType is - * %G_FILE_ATTRIBUTE_TYPE_STRING. + * user that owns the file. + * + * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING. */ enum FILE_ATTRIBUTE_OWNER_USER_REAL = "owner::user-real"; alias G_FILE_ATTRIBUTE_OWNER_USER_REAL = FILE_ATTRIBUTE_OWNER_USER_REAL; /** * A key in the "preview" namespace for getting a #GIcon that can be - * used to get preview of the file. For example, it may be a low - * resolution thumbnail without metadata. Corresponding - * #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_OBJECT. The value - * for this key should contain a #GIcon. + * used to get preview of the file. + * + * For example, it may be a low resolution thumbnail without metadata. + * + * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_OBJECT. + * + * The value for this key should contain a #GIcon. */ enum FILE_ATTRIBUTE_PREVIEW_ICON = "preview::icon"; alias G_FILE_ATTRIBUTE_PREVIEW_ICON = FILE_ATTRIBUTE_PREVIEW_ICON; /** * A key in the "recent" namespace for getting time, when the metadata for the - * file in `recent:///` was last changed. Corresponding #GFileAttributeType is - * %G_FILE_ATTRIBUTE_TYPE_INT64. + * file in `recent:///` was last changed. + * + * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_INT64. */ enum FILE_ATTRIBUTE_RECENT_MODIFIED = "recent::modified"; alias G_FILE_ATTRIBUTE_RECENT_MODIFIED = FILE_ATTRIBUTE_RECENT_MODIFIED; /** * A key in the "selinux" namespace for getting the file's SELinux - * context. Corresponding #GFileAttributeType is - * %G_FILE_ATTRIBUTE_TYPE_STRING. Note that this attribute is only - * available if GLib has been built with SELinux support. + * context. + * + * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING. + * + * Note that this attribute is only available if GLib has been built + * with SELinux support. */ enum FILE_ATTRIBUTE_SELINUX_CONTEXT = "selinux::context"; alias G_FILE_ATTRIBUTE_SELINUX_CONTEXT = FILE_ATTRIBUTE_SELINUX_CONTEXT; /** * A key in the "standard" namespace for getting the amount of disk space - * that is consumed by the file (in bytes). This will generally be larger - * than the file size (due to block size overhead) but can occasionally be - * smaller (for example, for sparse files). + * that is consumed by the file (in bytes). + * + * This will generally be larger than the file size (due to block size + * overhead) but can occasionally be smaller (for example, for sparse files). + * * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT64. */ enum FILE_ATTRIBUTE_STANDARD_ALLOCATED_SIZE = "standard::allocated-size"; @@ -9939,7 +10340,9 @@ alias G_FILE_ATTRIBUTE_STANDARD_ALLOCATED_SIZE = FILE_ATTRIBUTE_STANDARD_ALLOCAT /** * A key in the "standard" namespace for getting the content type of the file. + * * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING. + * * The value for this key should contain a valid content type. */ enum FILE_ATTRIBUTE_STANDARD_CONTENT_TYPE = "standard::content-type"; @@ -9947,6 +10350,7 @@ alias G_FILE_ATTRIBUTE_STANDARD_CONTENT_TYPE = FILE_ATTRIBUTE_STANDARD_CONTENT_T /** * A key in the "standard" namespace for getting the copy name of the file. + * * The copy name is an optional version of the name. If available it's always * in UTF8, and corresponds directly to the original filename (only transcoded to * UTF8). This is useful if you want to copy the file to another filesystem that @@ -9960,8 +10364,9 @@ alias G_FILE_ATTRIBUTE_STANDARD_COPY_NAME = FILE_ATTRIBUTE_STANDARD_COPY_NAME; /** * A key in the "standard" namespace for getting the description of the file. + * * The description is a utf8 string that describes the file, generally containing - * the filename, but can also contain furter information. Example descriptions + * the filename, but can also contain further information. Example descriptions * could be "filename (on hostname)" for a remote file or "filename (in trash)" * for a file in the trash. This is useful for instance as the window title * when displaying a directory or for a bookmarks menu. @@ -9973,8 +10378,10 @@ alias G_FILE_ATTRIBUTE_STANDARD_DESCRIPTION = FILE_ATTRIBUTE_STANDARD_DESCRIPTIO /** * A key in the "standard" namespace for getting the display name of the file. - * A display name is guaranteed to be in UTF8 and can thus be displayed in - * the UI. + * + * A display name is guaranteed to be in UTF-8 and can thus be displayed in + * the UI. It is guaranteed to be set on every file. + * * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING. */ enum FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME = "standard::display-name"; @@ -9982,6 +10389,7 @@ alias G_FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME = FILE_ATTRIBUTE_STANDARD_DISPLAY_N /** * A key in the "standard" namespace for edit name of the file. + * * An edit name is similar to the display name, but it is meant to be * used when you want to rename the file in the UI. The display name * might contain information you don't want in the new filename (such as @@ -9994,9 +10402,11 @@ alias G_FILE_ATTRIBUTE_STANDARD_EDIT_NAME = FILE_ATTRIBUTE_STANDARD_EDIT_NAME; /** * A key in the "standard" namespace for getting the fast content type. + * * The fast content type isn't as reliable as the regular one, as it * only uses the filename to guess it, but it is faster to calculate than the * regular content type. + * * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING. */ enum FILE_ATTRIBUTE_STANDARD_FAST_CONTENT_TYPE = "standard::fast-content-type"; @@ -10004,7 +10414,9 @@ alias G_FILE_ATTRIBUTE_STANDARD_FAST_CONTENT_TYPE = FILE_ATTRIBUTE_STANDARD_FAST /** * A key in the "standard" namespace for getting the icon for the file. + * * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_OBJECT. + * * The value for this key should contain a #GIcon. */ enum FILE_ATTRIBUTE_STANDARD_ICON = "standard::icon"; @@ -10012,6 +10424,7 @@ alias G_FILE_ATTRIBUTE_STANDARD_ICON = FILE_ATTRIBUTE_STANDARD_ICON; /** * A key in the "standard" namespace for checking if a file is a backup file. + * * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN. */ enum FILE_ATTRIBUTE_STANDARD_IS_BACKUP = "standard::is-backup"; @@ -10019,6 +10432,7 @@ alias G_FILE_ATTRIBUTE_STANDARD_IS_BACKUP = FILE_ATTRIBUTE_STANDARD_IS_BACKUP; /** * A key in the "standard" namespace for checking if a file is hidden. + * * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN. */ enum FILE_ATTRIBUTE_STANDARD_IS_HIDDEN = "standard::is-hidden"; @@ -10028,7 +10442,9 @@ alias G_FILE_ATTRIBUTE_STANDARD_IS_HIDDEN = FILE_ATTRIBUTE_STANDARD_IS_HIDDEN; * A key in the "standard" namespace for checking if the file is a symlink. * Typically the actual type is something else, if we followed the symlink * to get the type. + * * On Windows NTFS mountpoints are considered to be symlinks as well. + * * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN. */ enum FILE_ATTRIBUTE_STANDARD_IS_SYMLINK = "standard::is-symlink"; @@ -10036,6 +10452,7 @@ alias G_FILE_ATTRIBUTE_STANDARD_IS_SYMLINK = FILE_ATTRIBUTE_STANDARD_IS_SYMLINK; /** * A key in the "standard" namespace for checking if a file is virtual. + * * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN. */ enum FILE_ATTRIBUTE_STANDARD_IS_VIRTUAL = "standard::is-virtual"; @@ -10045,7 +10462,7 @@ alias G_FILE_ATTRIBUTE_STANDARD_IS_VIRTUAL = FILE_ATTRIBUTE_STANDARD_IS_VIRTUAL; * A key in the "standard" namespace for checking if a file is * volatile. This is meant for opaque, non-POSIX-like backends to * indicate that the URI is not persistent. Applications should look - * at #G_FILE_ATTRIBUTE_STANDARD_SYMLINK_TARGET for the persistent URI. + * at %G_FILE_ATTRIBUTE_STANDARD_SYMLINK_TARGET for the persistent URI. * * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN. */ @@ -10054,10 +10471,14 @@ alias G_FILE_ATTRIBUTE_STANDARD_IS_VOLATILE = FILE_ATTRIBUTE_STANDARD_IS_VOLATIL /** * A key in the "standard" namespace for getting the name of the file. + * * The name is the on-disk filename which may not be in any known encoding, - * and can thus not be generally displayed as is. - * Use #G_FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME if you need to display the + * and can thus not be generally displayed as is. It is guaranteed to be set on + * every file. + * + * Use %G_FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME if you need to display the * name in a user interface. + * * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BYTE_STRING. */ enum FILE_ATTRIBUTE_STANDARD_NAME = "standard::name"; @@ -10065,6 +10486,7 @@ alias G_FILE_ATTRIBUTE_STANDARD_NAME = FILE_ATTRIBUTE_STANDARD_NAME; /** * A key in the "standard" namespace for getting the file's size (in bytes). + * * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT64. */ enum FILE_ATTRIBUTE_STANDARD_SIZE = "standard::size"; @@ -10072,7 +10494,9 @@ alias G_FILE_ATTRIBUTE_STANDARD_SIZE = FILE_ATTRIBUTE_STANDARD_SIZE; /** * A key in the "standard" namespace for setting the sort order of a file. + * * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_INT32. + * * An example use would be in file managers, which would use this key * to set the order files are displayed. Files with smaller sort order * should be sorted first, and files without sort order as if sort order @@ -10083,7 +10507,9 @@ alias G_FILE_ATTRIBUTE_STANDARD_SORT_ORDER = FILE_ATTRIBUTE_STANDARD_SORT_ORDER; /** * A key in the "standard" namespace for getting the symbolic icon for the file. + * * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_OBJECT. + * * The value for this key should contain a #GIcon. */ enum FILE_ATTRIBUTE_STANDARD_SYMBOLIC_ICON = "standard::symbolic-icon"; @@ -10091,8 +10517,9 @@ alias G_FILE_ATTRIBUTE_STANDARD_SYMBOLIC_ICON = FILE_ATTRIBUTE_STANDARD_SYMBOLIC /** * A key in the "standard" namespace for getting the symlink target, if the file - * is a symlink. Corresponding #GFileAttributeType is - * %G_FILE_ATTRIBUTE_TYPE_BYTE_STRING. + * is a symlink. + * + * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BYTE_STRING. */ enum FILE_ATTRIBUTE_STANDARD_SYMLINK_TARGET = "standard::symlink-target"; alias G_FILE_ATTRIBUTE_STANDARD_SYMLINK_TARGET = FILE_ATTRIBUTE_STANDARD_SYMLINK_TARGET; @@ -10100,6 +10527,7 @@ alias G_FILE_ATTRIBUTE_STANDARD_SYMLINK_TARGET = FILE_ATTRIBUTE_STANDARD_SYMLINK /** * A key in the "standard" namespace for getting the target URI for the file, in * the case of %G_FILE_TYPE_SHORTCUT or %G_FILE_TYPE_MOUNTABLE files. + * * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING. */ enum FILE_ATTRIBUTE_STANDARD_TARGET_URI = "standard::target-uri"; @@ -10107,7 +10535,9 @@ alias G_FILE_ATTRIBUTE_STANDARD_TARGET_URI = FILE_ATTRIBUTE_STANDARD_TARGET_URI; /** * A key in the "standard" namespace for storing file types. + * * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT32. + * * The value for this key should contain a #GFileType. */ enum FILE_ATTRIBUTE_STANDARD_TYPE = "standard::type"; @@ -10115,14 +10545,17 @@ alias G_FILE_ATTRIBUTE_STANDARD_TYPE = FILE_ATTRIBUTE_STANDARD_TYPE; /** * A key in the "thumbnail" namespace for checking if thumbnailing failed. - * This attribute is %TRUE if thumbnailing failed. Corresponding - * #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN. + * + * This attribute is %TRUE if thumbnailing failed. + * + * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN. */ enum FILE_ATTRIBUTE_THUMBNAILING_FAILED = "thumbnail::failed"; alias G_FILE_ATTRIBUTE_THUMBNAILING_FAILED = FILE_ATTRIBUTE_THUMBNAILING_FAILED; /** * A key in the "thumbnail" namespace for checking whether the thumbnail is outdated. + * * This attribute is %TRUE if the thumbnail is up-to-date with the file it represents, * and %FALSE if the file has been modified since the thumbnail was generated. * @@ -10136,35 +10569,42 @@ alias G_FILE_ATTRIBUTE_THUMBNAIL_IS_VALID = FILE_ATTRIBUTE_THUMBNAIL_IS_VALID; /** * A key in the "thumbnail" namespace for getting the path to the thumbnail - * image. Corresponding #GFileAttributeType is - * %G_FILE_ATTRIBUTE_TYPE_BYTE_STRING. + * image. + * + * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BYTE_STRING. */ enum FILE_ATTRIBUTE_THUMBNAIL_PATH = "thumbnail::path"; alias G_FILE_ATTRIBUTE_THUMBNAIL_PATH = FILE_ATTRIBUTE_THUMBNAIL_PATH; /** * A key in the "time" namespace for getting the time the file was last - * accessed. Corresponding #GFileAttributeType is - * %G_FILE_ATTRIBUTE_TYPE_UINT64, and contains the time since the - * file was last accessed, in seconds since the UNIX epoch. + * accessed. + * + * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT64, and + * contains the time since the file was last accessed, in seconds since the + * UNIX epoch. */ enum FILE_ATTRIBUTE_TIME_ACCESS = "time::access"; alias G_FILE_ATTRIBUTE_TIME_ACCESS = FILE_ATTRIBUTE_TIME_ACCESS; /** * A key in the "time" namespace for getting the microseconds of the time - * the file was last accessed. This should be used in conjunction with - * #G_FILE_ATTRIBUTE_TIME_ACCESS. Corresponding #GFileAttributeType is - * %G_FILE_ATTRIBUTE_TYPE_UINT32. + * the file was last accessed. + * + * This should be used in conjunction with %G_FILE_ATTRIBUTE_TIME_ACCESS. + * + * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT32. */ enum FILE_ATTRIBUTE_TIME_ACCESS_USEC = "time::access-usec"; alias G_FILE_ATTRIBUTE_TIME_ACCESS_USEC = FILE_ATTRIBUTE_TIME_ACCESS_USEC; /** * A key in the "time" namespace for getting the time the file was last - * changed. Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT64, - * and contains the time since the file was last changed, in seconds since the - * UNIX epoch. + * changed. + * + * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT64, + * and contains the time since the file was last changed, in seconds since + * the UNIX epoch. * * This corresponds to the traditional UNIX ctime. */ @@ -10173,80 +10613,96 @@ alias G_FILE_ATTRIBUTE_TIME_CHANGED = FILE_ATTRIBUTE_TIME_CHANGED; /** * A key in the "time" namespace for getting the microseconds of the time - * the file was last changed. This should be used in conjunction with - * #G_FILE_ATTRIBUTE_TIME_CHANGED. Corresponding #GFileAttributeType is - * %G_FILE_ATTRIBUTE_TYPE_UINT32. + * the file was last changed. + * + * This should be used in conjunction with %G_FILE_ATTRIBUTE_TIME_CHANGED. + * + * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT32. */ enum FILE_ATTRIBUTE_TIME_CHANGED_USEC = "time::changed-usec"; alias G_FILE_ATTRIBUTE_TIME_CHANGED_USEC = FILE_ATTRIBUTE_TIME_CHANGED_USEC; /** * A key in the "time" namespace for getting the time the file was created. + * * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT64, * and contains the time since the file was created, in seconds since the UNIX * epoch. * - * This corresponds to the NTFS ctime. + * This may correspond to Linux `stx_btime`, FreeBSD `st_birthtim`, NetBSD + * `st_birthtime` or NTFS `ctime`. */ enum FILE_ATTRIBUTE_TIME_CREATED = "time::created"; alias G_FILE_ATTRIBUTE_TIME_CREATED = FILE_ATTRIBUTE_TIME_CREATED; /** * A key in the "time" namespace for getting the microseconds of the time - * the file was created. This should be used in conjunction with - * #G_FILE_ATTRIBUTE_TIME_CREATED. Corresponding #GFileAttributeType is - * %G_FILE_ATTRIBUTE_TYPE_UINT32. + * the file was created. + * + * This should be used in conjunction with %G_FILE_ATTRIBUTE_TIME_CREATED. + * + * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT32. */ enum FILE_ATTRIBUTE_TIME_CREATED_USEC = "time::created-usec"; alias G_FILE_ATTRIBUTE_TIME_CREATED_USEC = FILE_ATTRIBUTE_TIME_CREATED_USEC; /** * A key in the "time" namespace for getting the time the file was last - * modified. Corresponding #GFileAttributeType is - * %G_FILE_ATTRIBUTE_TYPE_UINT64, and contains the time since the - * file was modified, in seconds since the UNIX epoch. + * modified. + * + * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT64, and + * contains the time since the file was modified, in seconds since the UNIX + * epoch. */ enum FILE_ATTRIBUTE_TIME_MODIFIED = "time::modified"; alias G_FILE_ATTRIBUTE_TIME_MODIFIED = FILE_ATTRIBUTE_TIME_MODIFIED; /** * A key in the "time" namespace for getting the microseconds of the time - * the file was last modified. This should be used in conjunction with - * #G_FILE_ATTRIBUTE_TIME_MODIFIED. Corresponding #GFileAttributeType is - * %G_FILE_ATTRIBUTE_TYPE_UINT32. + * the file was last modified. + * + * This should be used in conjunction with %G_FILE_ATTRIBUTE_TIME_MODIFIED. + * + * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT32. */ enum FILE_ATTRIBUTE_TIME_MODIFIED_USEC = "time::modified-usec"; alias G_FILE_ATTRIBUTE_TIME_MODIFIED_USEC = FILE_ATTRIBUTE_TIME_MODIFIED_USEC; /** - * A key in the "trash" namespace. When requested against - * items in `trash:///`, will return the date and time when the file - * was trashed. The format of the returned string is YYYY-MM-DDThh:mm:ss. + * A key in the "trash" namespace for getting the deletion date and time + * of a file inside the `trash:///` folder. + * + * The format of the returned string is `YYYY-MM-DDThh:mm:ss`. + * * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING. */ enum FILE_ATTRIBUTE_TRASH_DELETION_DATE = "trash::deletion-date"; alias G_FILE_ATTRIBUTE_TRASH_DELETION_DATE = FILE_ATTRIBUTE_TRASH_DELETION_DATE; /** - * A key in the "trash" namespace. When requested against - * `trash:///` returns the number of (toplevel) items in the trash folder. + * A key in the "trash" namespace for getting the number of (toplevel) items + * that are present in the `trash:///` folder. + * * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT32. */ enum FILE_ATTRIBUTE_TRASH_ITEM_COUNT = "trash::item-count"; alias G_FILE_ATTRIBUTE_TRASH_ITEM_COUNT = FILE_ATTRIBUTE_TRASH_ITEM_COUNT; /** - * A key in the "trash" namespace. When requested against - * items in `trash:///`, will return the original path to the file before it - * was trashed. Corresponding #GFileAttributeType is - * %G_FILE_ATTRIBUTE_TYPE_BYTE_STRING. + * A key in the "trash" namespace for getting the original path of a file + * inside the `trash:///` folder before it was trashed. + * + * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BYTE_STRING. */ enum FILE_ATTRIBUTE_TRASH_ORIG_PATH = "trash::orig-path"; alias G_FILE_ATTRIBUTE_TRASH_ORIG_PATH = FILE_ATTRIBUTE_TRASH_ORIG_PATH; /** * A key in the "unix" namespace for getting the number of blocks allocated - * for the file. This attribute is only available for UNIX file systems. + * for the file. + * + * This attribute is only available for UNIX file systems. + * * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT64. */ enum FILE_ATTRIBUTE_UNIX_BLOCKS = "unix::blocks"; @@ -10254,7 +10710,10 @@ alias G_FILE_ATTRIBUTE_UNIX_BLOCKS = FILE_ATTRIBUTE_UNIX_BLOCKS; /** * A key in the "unix" namespace for getting the block size for the file - * system. This attribute is only available for UNIX file systems. + * system. + * + * This attribute is only available for UNIX file systems. + * * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT32. */ enum FILE_ATTRIBUTE_UNIX_BLOCK_SIZE = "unix::block-size"; @@ -10262,16 +10721,20 @@ alias G_FILE_ATTRIBUTE_UNIX_BLOCK_SIZE = FILE_ATTRIBUTE_UNIX_BLOCK_SIZE; /** * A key in the "unix" namespace for getting the device id of the device the - * file is located on (see stat() documentation). This attribute is only - * available for UNIX file systems. Corresponding #GFileAttributeType is - * %G_FILE_ATTRIBUTE_TYPE_UINT32. + * file is located on (see stat() documentation). + * + * This attribute is only available for UNIX file systems. + * + * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT32. */ enum FILE_ATTRIBUTE_UNIX_DEVICE = "unix::device"; alias G_FILE_ATTRIBUTE_UNIX_DEVICE = FILE_ATTRIBUTE_UNIX_DEVICE; /** * A key in the "unix" namespace for getting the group ID for the file. + * * This attribute is only available for UNIX file systems. + * * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT32. */ enum FILE_ATTRIBUTE_UNIX_GID = "unix::gid"; @@ -10279,17 +10742,24 @@ alias G_FILE_ATTRIBUTE_UNIX_GID = FILE_ATTRIBUTE_UNIX_GID; /** * A key in the "unix" namespace for getting the inode of the file. - * This attribute is only available for UNIX file systems. Corresponding - * #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT64. + * + * This attribute is only available for UNIX file systems. + * + * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT64. */ enum FILE_ATTRIBUTE_UNIX_INODE = "unix::inode"; alias G_FILE_ATTRIBUTE_UNIX_INODE = FILE_ATTRIBUTE_UNIX_INODE; /** * A key in the "unix" namespace for checking if the file represents a - * UNIX mount point. This attribute is %TRUE if the file is a UNIX mount - * point. Since 2.58, `/` is considered to be a mount point. + * UNIX mount point. + * + * This attribute is %TRUE if the file is a UNIX mount point. + * + * Since 2.58, `/` is considered to be a mount point. + * * This attribute is only available for UNIX file systems. + * * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN. */ enum FILE_ATTRIBUTE_UNIX_IS_MOUNTPOINT = "unix::is-mountpoint"; @@ -10297,10 +10767,14 @@ alias G_FILE_ATTRIBUTE_UNIX_IS_MOUNTPOINT = FILE_ATTRIBUTE_UNIX_IS_MOUNTPOINT; /** * A key in the "unix" namespace for getting the mode of the file - * (e.g. whether the file is a regular file, symlink, etc). See the - * documentation for `lstat()`: this attribute is equivalent to the `st_mode` - * member of `struct stat`, and includes both the file type and permissions. + * (e.g. whether the file is a regular file, symlink, etc). + * + * See the documentation for `lstat()`: this attribute is equivalent to + * the `st_mode` member of `struct stat`, and includes both the file type + * and permissions. + * * This attribute is only available for UNIX file systems. + * * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT32. */ enum FILE_ATTRIBUTE_UNIX_MODE = "unix::mode"; @@ -10308,25 +10782,35 @@ alias G_FILE_ATTRIBUTE_UNIX_MODE = FILE_ATTRIBUTE_UNIX_MODE; /** * A key in the "unix" namespace for getting the number of hard links - * for a file. See lstat() documentation. This attribute is only available - * for UNIX file systems. Corresponding #GFileAttributeType is - * %G_FILE_ATTRIBUTE_TYPE_UINT32. + * for a file. + * + * See the documentation for `lstat()`. + * + * This attribute is only available for UNIX file systems. + * + * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT32. */ enum FILE_ATTRIBUTE_UNIX_NLINK = "unix::nlink"; alias G_FILE_ATTRIBUTE_UNIX_NLINK = FILE_ATTRIBUTE_UNIX_NLINK; /** * A key in the "unix" namespace for getting the device ID for the file - * (if it is a special file). See lstat() documentation. This attribute - * is only available for UNIX file systems. Corresponding #GFileAttributeType - * is %G_FILE_ATTRIBUTE_TYPE_UINT32. + * (if it is a special file). + * + * See the documentation for `lstat()`. + * + * This attribute is only available for UNIX file systems. + * + * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT32. */ enum FILE_ATTRIBUTE_UNIX_RDEV = "unix::rdev"; alias G_FILE_ATTRIBUTE_UNIX_RDEV = FILE_ATTRIBUTE_UNIX_RDEV; /** * A key in the "unix" namespace for getting the user ID for the file. + * * This attribute is only available for UNIX file systems. + * * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT32. */ enum FILE_ATTRIBUTE_UNIX_UID = "unix::uid"; @@ -10412,6 +10896,13 @@ alias G_NATIVE_VOLUME_MONITOR_EXTENSION_POINT_NAME = NATIVE_VOLUME_MONITOR_EXTEN enum NETWORK_MONITOR_EXTENSION_POINT_NAME = "gio-network-monitor"; alias G_NETWORK_MONITOR_EXTENSION_POINT_NAME = NETWORK_MONITOR_EXTENSION_POINT_NAME; +/** + * Extension point for power profile usage monitoring functionality. + * See [Extending GIO][extending-gio]. + */ +enum POWER_PROFILE_MONITOR_EXTENSION_POINT_NAME = "gio-power-profile-monitor"; +alias G_POWER_PROFILE_MONITOR_EXTENSION_POINT_NAME = POWER_PROFILE_MONITOR_EXTENSION_POINT_NAME; + /** * Extension point for proxy functionality. * See [Extending GIO][extending-gio]. diff --git a/generated/gtkd/glib/ArrayG.d b/generated/gtkd/glib/ArrayG.d index d0bc2641f..4517a8527 100644 --- a/generated/gtkd/glib/ArrayG.d +++ b/generated/gtkd/glib/ArrayG.d @@ -198,6 +198,10 @@ public class ArrayG * will be initialised to zero if the array was configured to clear elements; * otherwise their values will be undefined. * + * If @index_ is less than the array’s current length, new entries will be + * inserted into the array, and the existing entries above @index_ will be moved + * upwards. + * * @data may be %NULL if (and only if) @len is zero. If @len is zero, this * function is a no-op. * @@ -375,6 +379,27 @@ public class ArrayG * functions, @clear_func is expected to clear the contents of * the array element it is given, but not free the element itself. * + * |[ + * typedef struct + * { + * gchar *str; + * GObject *obj; + * } ArrayElement; + * + * static void + * array_element_clear (ArrayElement *element) + * { + * g_clear_pointer (&element->str, g_free); + * g_clear_object (&element->obj); + * } + * + * // main code + * GArray *garray = g_array_new (FALSE, FALSE, sizeof (ArrayElement)); + * g_array_set_clear_func (garray, (GDestroyNotify) array_element_clear); + * // assign data to the structure + * g_array_free (garray, TRUE); + * ]| + * * Params: * clearFunc = a function to clear an element of @array * diff --git a/generated/gtkd/glib/AsyncQueue.d b/generated/gtkd/glib/AsyncQueue.d index c0b2db58e..5af577367 100644 --- a/generated/gtkd/glib/AsyncQueue.d +++ b/generated/gtkd/glib/AsyncQueue.d @@ -33,9 +33,9 @@ private import gtkd.Loader; /** - * The GAsyncQueue struct is an opaque data structure which represents - * an asynchronous queue. It should only be accessed through the - * g_async_queue_* functions. + * An opaque data structure which represents an asynchronous queue. + * + * It should only be accessed through the `g_async_queue_*` functions. */ public class AsyncQueue { diff --git a/generated/gtkd/glib/Atomic.d b/generated/gtkd/glib/Atomic.d index da37ff4f0..9326ec2e4 100644 --- a/generated/gtkd/glib/Atomic.d +++ b/generated/gtkd/glib/Atomic.d @@ -44,6 +44,9 @@ public struct Atomic * Before version 2.30, this function did not return a value * (but g_atomic_int_exchange_and_add() did, and had the same meaning). * + * While @atomic has a `volatile` qualifier, this is a historical artifact and + * the pointer passed to it should not be `volatile`. + * * Params: * atomic = a pointer to a #gint or #guint * val = the value to add @@ -66,6 +69,9 @@ public struct Atomic * Think of this operation as an atomic version of * `{ tmp = *atomic; *atomic &= val; return tmp; }`. * + * While @atomic has a `volatile` qualifier, this is a historical artifact and + * the pointer passed to it should not be `volatile`. + * * Params: * atomic = a pointer to a #gint or #guint * val = the value to 'and' @@ -90,6 +96,9 @@ public struct Atomic * * This call acts as a full compiler and hardware memory barrier. * + * While @atomic has a `volatile` qualifier, this is a historical artifact and + * the pointer passed to it should not be `volatile`. + * * Params: * atomic = a pointer to a #gint or #guint * oldval = the value to compare with @@ -112,6 +121,9 @@ public struct Atomic * * This call acts as a full compiler and hardware memory barrier. * + * While @atomic has a `volatile` qualifier, this is a historical artifact and + * the pointer passed to it should not be `volatile`. + * * Params: * atomic = a pointer to a #gint or #guint * @@ -150,6 +162,9 @@ public struct Atomic * This call acts as a full compiler and hardware * memory barrier (before the get). * + * While @atomic has a `volatile` qualifier, this is a historical artifact and + * the pointer passed to it should not be `volatile`. + * * Params: * atomic = a pointer to a #gint or #guint * @@ -169,6 +184,9 @@ public struct Atomic * * This call acts as a full compiler and hardware memory barrier. * + * While @atomic has a `volatile` qualifier, this is a historical artifact and + * the pointer passed to it should not be `volatile`. + * * Params: * atomic = a pointer to a #gint or #guint * @@ -188,6 +206,9 @@ public struct Atomic * * This call acts as a full compiler and hardware memory barrier. * + * While @atomic has a `volatile` qualifier, this is a historical artifact and + * the pointer passed to it should not be `volatile`. + * * Params: * atomic = a pointer to a #gint or #guint * val = the value to 'or' @@ -207,6 +228,9 @@ public struct Atomic * This call acts as a full compiler and hardware * memory barrier (after the set). * + * While @atomic has a `volatile` qualifier, this is a historical artifact and + * the pointer passed to it should not be `volatile`. + * * Params: * atomic = a pointer to a #gint or #guint * newval = a new value to store @@ -227,6 +251,9 @@ public struct Atomic * * This call acts as a full compiler and hardware memory barrier. * + * While @atomic has a `volatile` qualifier, this is a historical artifact and + * the pointer passed to it should not be `volatile`. + * * Params: * atomic = a pointer to a #gint or #guint * val = the value to 'xor' @@ -248,6 +275,9 @@ public struct Atomic * * This call acts as a full compiler and hardware memory barrier. * + * While @atomic has a `volatile` qualifier, this is a historical artifact and + * the pointer passed to it should not be `volatile`. + * * Params: * atomic = a pointer to a #gpointer-sized value * val = the value to add @@ -270,6 +300,9 @@ public struct Atomic * * This call acts as a full compiler and hardware memory barrier. * + * While @atomic has a `volatile` qualifier, this is a historical artifact and + * the pointer passed to it should not be `volatile`. + * * Params: * atomic = a pointer to a #gpointer-sized value * val = the value to 'and' @@ -294,6 +327,9 @@ public struct Atomic * * This call acts as a full compiler and hardware memory barrier. * + * While @atomic has a `volatile` qualifier, this is a historical artifact and + * the pointer passed to it should not be `volatile`. + * * Params: * atomic = a pointer to a #gpointer-sized value * oldval = the value to compare with @@ -314,6 +350,9 @@ public struct Atomic * This call acts as a full compiler and hardware * memory barrier (before the get). * + * While @atomic has a `volatile` qualifier, this is a historical artifact and + * the pointer passed to it should not be `volatile`. + * * Params: * atomic = a pointer to a #gpointer-sized value * @@ -335,6 +374,9 @@ public struct Atomic * * This call acts as a full compiler and hardware memory barrier. * + * While @atomic has a `volatile` qualifier, this is a historical artifact and + * the pointer passed to it should not be `volatile`. + * * Params: * atomic = a pointer to a #gpointer-sized value * val = the value to 'or' @@ -354,6 +396,9 @@ public struct Atomic * This call acts as a full compiler and hardware * memory barrier (after the set). * + * While @atomic has a `volatile` qualifier, this is a historical artifact and + * the pointer passed to it should not be `volatile`. + * * Params: * atomic = a pointer to a #gpointer-sized value * newval = a new value to store @@ -374,6 +419,9 @@ public struct Atomic * * This call acts as a full compiler and hardware memory barrier. * + * While @atomic has a `volatile` qualifier, this is a historical artifact and + * the pointer passed to it should not be `volatile`. + * * Params: * atomic = a pointer to a #gpointer-sized value * val = the value to 'xor' diff --git a/generated/gtkd/glib/BBTree.d b/generated/gtkd/glib/BBTree.d index ff2e0da70..6441a276b 100644 --- a/generated/gtkd/glib/BBTree.d +++ b/generated/gtkd/glib/BBTree.d @@ -25,6 +25,7 @@ module glib.BBTree; private import glib.ConstructionException; +private import glib.TreeNode; private import glib.c.functions; public import glib.c.types; public import gtkc.glibtypes; @@ -72,6 +73,87 @@ public class BBTree } + /** + * Creates a new #GTree. + * + * Params: + * keyCompareFunc = the function used to order the nodes in the #GTree. + * It should return values similar to the standard strcmp() function - + * 0 if the two arguments are equal, a negative value if the first argument + * comes before the second, or a positive value if the first argument comes + * after the second. + * + * Returns: a newly allocated #GTree + * + * Throws: ConstructionException GTK+ fails to create the object. + */ + public this(GCompareFunc keyCompareFunc) + { + auto __p = g_tree_new(keyCompareFunc); + + if(__p is null) + { + throw new ConstructionException("null returned by new"); + } + + this(cast(GTree*) __p); + } + + /** + * Creates a new #GTree like g_tree_new() and allows to specify functions + * to free the memory allocated for the key and value that get called when + * removing the entry from the #GTree. + * + * Params: + * keyCompareFunc = qsort()-style comparison function + * keyCompareData = data to pass to comparison function + * keyDestroyFunc = a function to free the memory allocated for the key + * used when removing the entry from the #GTree or %NULL if you don't + * want to supply such a function + * valueDestroyFunc = a function to free the memory allocated for the + * value used when removing the entry from the #GTree or %NULL if you + * don't want to supply such a function + * + * Returns: a newly allocated #GTree + * + * Throws: ConstructionException GTK+ fails to create the object. + */ + public this(GCompareDataFunc keyCompareFunc, void* keyCompareData, GDestroyNotify keyDestroyFunc, GDestroyNotify valueDestroyFunc) + { + auto __p = g_tree_new_full(keyCompareFunc, keyCompareData, keyDestroyFunc, valueDestroyFunc); + + if(__p is null) + { + throw new ConstructionException("null returned by new_full"); + } + + this(cast(GTree*) __p); + } + + /** + * Creates a new #GTree with a comparison function that accepts user data. + * See g_tree_new() for more details. + * + * Params: + * keyCompareFunc = qsort()-style comparison function + * keyCompareData = data to pass to comparison function + * + * Returns: a newly allocated #GTree + * + * Throws: ConstructionException GTK+ fails to create the object. + */ + public this(GCompareDataFunc keyCompareFunc, void* keyCompareData) + { + auto __p = g_tree_new_with_data(keyCompareFunc, keyCompareData); + + if(__p is null) + { + throw new ConstructionException("null returned by new_with_data"); + } + + this(cast(GTree*) __p); + } + /** * Removes all keys and values from the #GTree and decreases its * reference count by one. If keys and/or values are dynamically @@ -106,6 +188,28 @@ public class BBTree g_tree_foreach(gTree, func, userData); } + /** + * Calls the given function for each of the nodes in the #GTree. + * The function is passed the pointer to the particular node, and the given + * @data parameter. The tree traversal happens in-order. + * + * The tree may not be modified while iterating over it (you can't + * add/remove items). To remove all items matching a predicate, you need + * to add each item to a list in your #GTraverseFunc as you walk over + * the tree, then walk the list and remove each item. + * + * Params: + * func = the function to call for each node visited. + * If this function returns %TRUE, the traversal is stopped. + * userData = user data to pass to the function + * + * Since: 2.68 + */ + public void foreachNode(GTraverseNodeFunc func, void* userData) + { + g_tree_foreach_node(gTree, func, userData); + } + /** * Gets the height of a #GTree. * @@ -120,6 +224,21 @@ public class BBTree return g_tree_height(gTree); } + /** + * Inserts a key/value pair into a #GTree. + * + * Inserts a new key and value into a #GTree as g_tree_insert_node() does, + * only this function does not return the inserted or set node. + * + * Params: + * key = the key to insert + * value = the value corresponding to the key + */ + public void insert(void* key, void* value) + { + g_tree_insert(gTree, key, value); + } + /** * Inserts a key/value pair into a #GTree. * @@ -131,14 +250,28 @@ public class BBTree * * The tree is automatically 'balanced' as new key/value pairs are added, * so that the distance from the root to every leaf is as small as possible. + * The cost of maintaining a balanced tree while inserting new key/value + * result in a O(n log(n)) operation where most of the other operations + * are O(log(n)). * * Params: * key = the key to insert * value = the value corresponding to the key + * + * Returns: the inserted (or set) node. + * + * Since: 2.68 */ - public void insert(void* key, void* value) + public TreeNode insertNode(void* key, void* value) { - g_tree_insert(gTree, key, value); + auto __p = g_tree_insert_node(gTree, key, value); + + if(__p is null) + { + return null; + } + + return new TreeNode(cast(GTreeNode*) __p); } /** @@ -175,6 +308,60 @@ public class BBTree return g_tree_lookup_extended(gTree, lookupKey, &origKey, &value) != 0; } + /** + * Gets the tree node corresponding to the given key. Since a #GTree is + * automatically balanced as key/value pairs are added, key lookup + * is O(log n) (where n is the number of key/value pairs in the tree). + * + * Params: + * key = the key to look up + * + * Returns: the tree node corresponding to + * the key, or %NULL if the key was not found + * + * Since: 2.68 + */ + public TreeNode lookupNode(void* key) + { + auto __p = g_tree_lookup_node(gTree, key); + + if(__p is null) + { + return null; + } + + return new TreeNode(cast(GTreeNode*) __p); + } + + /** + * Gets the lower bound node corresponding to the given key, + * or %NULL if the tree is empty or all the nodes in the tree + * have keys that are strictly lower than the searched key. + * + * The lower bound is the first node that has its key greater + * than or equal to the searched key. + * + * Params: + * key = the key to calculate the lower bound for + * + * Returns: the tree node corresponding to + * the lower bound, or %NULL if the tree is empty or has only + * keys strictly lower than the searched key. + * + * Since: 2.68 + */ + public TreeNode lowerBound(void* key) + { + auto __p = g_tree_lower_bound(gTree, key); + + if(__p is null) + { + return null; + } + + return new TreeNode(cast(GTreeNode*) __p); + } + /** * Gets the number of nodes in a #GTree. * @@ -185,6 +372,46 @@ public class BBTree return g_tree_nnodes(gTree); } + /** + * Returns the first in-order node of the tree, or %NULL + * for an empty tree. + * + * Returns: the first node in the tree + * + * Since: 2.68 + */ + public TreeNode nodeFirst() + { + auto __p = g_tree_node_first(gTree); + + if(__p is null) + { + return null; + } + + return new TreeNode(cast(GTreeNode*) __p); + } + + /** + * Returns the last in-order node of the tree, or %NULL + * for an empty tree. + * + * Returns: the last node in the tree + * + * Since: 2.68 + */ + public TreeNode nodeLast() + { + auto __p = g_tree_node_last(gTree); + + if(__p is null) + { + return null; + } + + return new TreeNode(cast(GTreeNode*) __p); + } + alias doref = ref_; /** * Increments the reference count of @tree by one. @@ -204,7 +431,7 @@ public class BBTree return null; } - return new BBTree(cast(GTree*) __p); + return new BBTree(cast(GTree*) __p, true); } /** @@ -215,6 +442,10 @@ public class BBTree * make sure that any dynamically allocated values are freed yourself. * If the key does not exist in the #GTree, the function does nothing. * + * The cost of maintaining a balanced tree while removing a key/value + * result in a O(n log(n)) operation where most of the other operations + * are O(log(n)). + * * Params: * key = the key to remove * @@ -227,7 +458,31 @@ public class BBTree } /** - * Inserts a new key and value into a #GTree similar to g_tree_insert(). + * Removes all nodes from a #GTree and destroys their keys and values, + * then resets the #GTree’s root to %NULL. + * + * Since: 2.70 + */ + public void removeAll() + { + g_tree_remove_all(gTree); + } + + /** + * Inserts a new key and value into a #GTree as g_tree_replace_node() does, + * only this function does not return the inserted or set node. + * + * Params: + * key = the key to insert + * value = the value corresponding to the key + */ + public void replace(void* key, void* value) + { + g_tree_replace(gTree, key, value); + } + + /** + * Inserts a new key and value into a #GTree similar to g_tree_insert_node(). * The difference is that if the key already exists in the #GTree, it gets * replaced by the new key. If you supplied a @value_destroy_func when * creating the #GTree, the old value is freed using that function. If you @@ -240,10 +495,21 @@ public class BBTree * Params: * key = the key to insert * value = the value corresponding to the key + * + * Returns: the inserted (or set) node. + * + * Since: 2.68 */ - public void replace(void* key, void* value) + public TreeNode replaceNode(void* key, void* value) { - g_tree_replace(gTree, key, value); + auto __p = g_tree_replace_node(gTree, key, value); + + if(__p is null) + { + return null; + } + + return new TreeNode(cast(GTreeNode*) __p); } /** @@ -269,6 +535,38 @@ public class BBTree return g_tree_search(gTree, searchFunc, userData); } + /** + * Searches a #GTree using @search_func. + * + * The @search_func is called with a pointer to the key of a key/value + * pair in the tree, and the passed in @user_data. If @search_func returns + * 0 for a key/value pair, then the corresponding node is returned as + * the result of g_tree_search(). If @search_func returns -1, searching + * will proceed among the key/value pairs that have a smaller key; if + * @search_func returns 1, searching will proceed among the key/value + * pairs that have a larger key. + * + * Params: + * searchFunc = a function used to search the #GTree + * userData = the data passed as the second argument to @search_func + * + * Returns: the node corresponding to the + * found key, or %NULL if the key was not found + * + * Since: 2.68 + */ + public TreeNode searchNode(GCompareFunc searchFunc, void* userData) + { + auto __p = g_tree_search_node(gTree, searchFunc, userData); + + if(__p is null) + { + return null; + } + + return new TreeNode(cast(GTreeNode*) __p); + } + /** * Removes a key and its associated value from a #GTree without calling * the key and value destroy functions. @@ -322,83 +620,31 @@ public class BBTree } /** - * Creates a new #GTree. + * Gets the upper bound node corresponding to the given key, + * or %NULL if the tree is empty or all the nodes in the tree + * have keys that are lower than or equal to the searched key. * - * Params: - * keyCompareFunc = the function used to order the nodes in the #GTree. - * It should return values similar to the standard strcmp() function - - * 0 if the two arguments are equal, a negative value if the first argument - * comes before the second, or a positive value if the first argument comes - * after the second. - * - * Returns: a newly allocated #GTree - * - * Throws: ConstructionException GTK+ fails to create the object. - */ - public this(GCompareFunc keyCompareFunc) - { - auto __p = g_tree_new(keyCompareFunc); - - if(__p is null) - { - throw new ConstructionException("null returned by new"); - } - - this(cast(GTree*) __p); - } - - /** - * Creates a new #GTree like g_tree_new() and allows to specify functions - * to free the memory allocated for the key and value that get called when - * removing the entry from the #GTree. + * The upper bound is the first node that has its key strictly greater + * than the searched key. * * Params: - * keyCompareFunc = qsort()-style comparison function - * keyCompareData = data to pass to comparison function - * keyDestroyFunc = a function to free the memory allocated for the key - * used when removing the entry from the #GTree or %NULL if you don't - * want to supply such a function - * valueDestroyFunc = a function to free the memory allocated for the - * value used when removing the entry from the #GTree or %NULL if you - * don't want to supply such a function + * key = the key to calculate the upper bound for * - * Returns: a newly allocated #GTree + * Returns: the tree node corresponding to the + * upper bound, or %NULL if the tree is empty or has only keys + * lower than or equal to the searched key. * - * Throws: ConstructionException GTK+ fails to create the object. + * Since: 2.68 */ - public this(GCompareDataFunc keyCompareFunc, void* keyCompareData, GDestroyNotify keyDestroyFunc, GDestroyNotify valueDestroyFunc) + public TreeNode upperBound(void* key) { - auto __p = g_tree_new_full(keyCompareFunc, keyCompareData, keyDestroyFunc, valueDestroyFunc); + auto __p = g_tree_upper_bound(gTree, key); if(__p is null) { - throw new ConstructionException("null returned by new_full"); - } - - this(cast(GTree*) __p); - } - - /** - * Creates a new #GTree with a comparison function that accepts user data. - * See g_tree_new() for more details. - * - * Params: - * keyCompareFunc = qsort()-style comparison function - * keyCompareData = data to pass to comparison function - * - * Returns: a newly allocated #GTree - * - * Throws: ConstructionException GTK+ fails to create the object. - */ - public this(GCompareDataFunc keyCompareFunc, void* keyCompareData) - { - auto __p = g_tree_new_with_data(keyCompareFunc, keyCompareData); - - if(__p is null) - { - throw new ConstructionException("null returned by new_with_data"); + return null; } - this(cast(GTree*) __p); + return new TreeNode(cast(GTreeNode*) __p); } } diff --git a/generated/gtkd/glib/BookmarkFile.d b/generated/gtkd/glib/BookmarkFile.d index b6a9c0d06..861058fdf 100644 --- a/generated/gtkd/glib/BookmarkFile.d +++ b/generated/gtkd/glib/BookmarkFile.d @@ -25,6 +25,7 @@ module glib.BookmarkFile; private import glib.ConstructionException; +private import glib.DateTime; private import glib.ErrorG; private import glib.GException; private import glib.Str; @@ -35,8 +36,7 @@ private import gtkd.Loader; /** - * The `GBookmarkFile` structure contains only - * private data and should not be directly accessed. + * An opaque data structure representing a set of bookmarks. */ public class BookmarkFile { @@ -143,7 +143,10 @@ public class BookmarkFile * Gets the time the bookmark for @uri was added to @bookmark * * In the event the URI cannot be found, -1 is returned and - * @error is set to #G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND. + * @error is set to %G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND. + * + * Deprecated: Use g_bookmark_file_get_added_date_time() instead, as + * `time_t` is deprecated due to the year 2038 problem. * * Params: * uri = a valid URI @@ -168,21 +171,58 @@ public class BookmarkFile return __p; } + /** + * Gets the time the bookmark for @uri was added to @bookmark + * + * In the event the URI cannot be found, %NULL is returned and + * @error is set to %G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND. + * + * Params: + * uri = a valid URI + * + * Returns: a #GDateTime + * + * Since: 2.66 + * + * Throws: GException on failure. + */ + public DateTime getAddedDateTime(string uri) + { + GError* err = null; + + auto __p = g_bookmark_file_get_added_date_time(gBookmarkFile, Str.toStringz(uri), &err); + + if (err !is null) + { + throw new GException( new ErrorG(err) ); + } + + if(__p is null) + { + return null; + } + + return new DateTime(cast(GDateTime*) __p); + } + /** * Gets the registration information of @app_name for the bookmark for - * @uri. See g_bookmark_file_set_app_info() for more information about + * @uri. See g_bookmark_file_set_application_info() for more information about * the returned data. * * The string returned in @app_exec must be freed. * * In the event the URI cannot be found, %FALSE is returned and - * @error is set to #G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND. In the + * @error is set to %G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND. In the * event that no application with name @app_name has registered a bookmark * for @uri, %FALSE is returned and error is set to - * #G_BOOKMARK_FILE_ERROR_APP_NOT_REGISTERED. In the event that unquoting - * the command line fails, an error of the #G_SHELL_ERROR domain is + * %G_BOOKMARK_FILE_ERROR_APP_NOT_REGISTERED. In the event that unquoting + * the command line fails, an error of the %G_SHELL_ERROR domain is * set and %FALSE is returned. * + * Deprecated: Use g_bookmark_file_get_application_info() instead, as + * `time_t` is deprecated due to the year 2038 problem. + * * Params: * uri = a valid URI * name = an application's name @@ -213,12 +253,59 @@ public class BookmarkFile return __p; } + /** + * Gets the registration information of @app_name for the bookmark for + * @uri. See g_bookmark_file_set_application_info() for more information about + * the returned data. + * + * The string returned in @app_exec must be freed. + * + * In the event the URI cannot be found, %FALSE is returned and + * @error is set to %G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND. In the + * event that no application with name @app_name has registered a bookmark + * for @uri, %FALSE is returned and error is set to + * %G_BOOKMARK_FILE_ERROR_APP_NOT_REGISTERED. In the event that unquoting + * the command line fails, an error of the %G_SHELL_ERROR domain is + * set and %FALSE is returned. + * + * Params: + * uri = a valid URI + * name = an application's name + * exec = return location for the command line of the application, or %NULL + * count = return location for the registration count, or %NULL + * stamp = return location for the last registration time, or %NULL + * + * Returns: %TRUE on success. + * + * Since: 2.66 + * + * Throws: GException on failure. + */ + public bool getApplicationInfo(string uri, string name, out string exec, out uint count, out DateTime stamp) + { + char* outexec = null; + GDateTime* outstamp = null; + GError* err = null; + + auto __p = g_bookmark_file_get_application_info(gBookmarkFile, Str.toStringz(uri), Str.toStringz(name), &outexec, &count, &outstamp, &err) != 0; + + if (err !is null) + { + throw new GException( new ErrorG(err) ); + } + + exec = Str.toString(outexec); + stamp = new DateTime(outstamp); + + return __p; + } + /** * Retrieves the names of the applications that have registered the * bookmark for @uri. * * In the event the URI cannot be found, %NULL is returned and - * @error is set to #G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND. + * @error is set to %G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND. * * Params: * uri = a valid URI @@ -250,7 +337,7 @@ public class BookmarkFile * Retrieves the description of the bookmark for @uri. * * In the event the URI cannot be found, %NULL is returned and - * @error is set to #G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND. + * @error is set to %G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND. * * Params: * uri = a valid URI @@ -281,7 +368,7 @@ public class BookmarkFile * Retrieves the list of group names of the bookmark for @uri. * * In the event the URI cannot be found, %NULL is returned and - * @error is set to #G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND. + * @error is set to %G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND. * * The returned array is %NULL terminated, so @length may optionally * be %NULL. @@ -316,7 +403,7 @@ public class BookmarkFile * Gets the icon of the bookmark for @uri. * * In the event the URI cannot be found, %FALSE is returned and - * @error is set to #G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND. + * @error is set to %G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND. * * Params: * uri = a valid URI @@ -353,9 +440,9 @@ public class BookmarkFile * Gets whether the private flag of the bookmark for @uri is set. * * In the event the URI cannot be found, %FALSE is returned and - * @error is set to #G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND. In the + * @error is set to %G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND. In the * event that the private flag cannot be found, %FALSE is returned and - * @error is set to #G_BOOKMARK_FILE_ERROR_INVALID_VALUE. + * @error is set to %G_BOOKMARK_FILE_ERROR_INVALID_VALUE. * * Params: * uri = a valid URI @@ -384,9 +471,9 @@ public class BookmarkFile * Retrieves the MIME type of the resource pointed by @uri. * * In the event the URI cannot be found, %NULL is returned and - * @error is set to #G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND. In the + * @error is set to %G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND. In the * event that the MIME type cannot be found, %NULL is returned and - * @error is set to #G_BOOKMARK_FILE_ERROR_INVALID_VALUE. + * @error is set to %G_BOOKMARK_FILE_ERROR_INVALID_VALUE. * * Params: * uri = a valid URI @@ -417,7 +504,10 @@ public class BookmarkFile * Gets the time when the bookmark for @uri was last modified. * * In the event the URI cannot be found, -1 is returned and - * @error is set to #G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND. + * @error is set to %G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND. + * + * Deprecated: Use g_bookmark_file_get_modified_date_time() instead, as + * `time_t` is deprecated due to the year 2038 problem. * * Params: * uri = a valid URI @@ -442,6 +532,40 @@ public class BookmarkFile return __p; } + /** + * Gets the time when the bookmark for @uri was last modified. + * + * In the event the URI cannot be found, %NULL is returned and + * @error is set to %G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND. + * + * Params: + * uri = a valid URI + * + * Returns: a #GDateTime + * + * Since: 2.66 + * + * Throws: GException on failure. + */ + public DateTime getModifiedDateTime(string uri) + { + GError* err = null; + + auto __p = g_bookmark_file_get_modified_date_time(gBookmarkFile, Str.toStringz(uri), &err); + + if (err !is null) + { + throw new GException( new ErrorG(err) ); + } + + if(__p is null) + { + return null; + } + + return new DateTime(cast(GDateTime*) __p); + } + /** * Gets the number of bookmarks inside @bookmark. * @@ -460,7 +584,7 @@ public class BookmarkFile * If @uri is %NULL, the title of @bookmark is returned. * * In the event the URI cannot be found, %NULL is returned and - * @error is set to #G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND. + * @error is set to %G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND. * * Params: * uri = a valid URI or %NULL @@ -511,7 +635,10 @@ public class BookmarkFile * Gets the time the bookmark for @uri was last visited. * * In the event the URI cannot be found, -1 is returned and - * @error is set to #G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND. + * @error is set to %G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND. + * + * Deprecated: Use g_bookmark_file_get_visited_date_time() instead, as + * `time_t` is deprecated due to the year 2038 problem. * * Params: * uri = a valid URI @@ -536,12 +663,46 @@ public class BookmarkFile return __p; } + /** + * Gets the time the bookmark for @uri was last visited. + * + * In the event the URI cannot be found, %NULL is returned and + * @error is set to %G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND. + * + * Params: + * uri = a valid URI + * + * Returns: a #GDateTime + * + * Since: 2.66 + * + * Throws: GException on failure. + */ + public DateTime getVisitedDateTime(string uri) + { + GError* err = null; + + auto __p = g_bookmark_file_get_visited_date_time(gBookmarkFile, Str.toStringz(uri), &err); + + if (err !is null) + { + throw new GException( new ErrorG(err) ); + } + + if(__p is null) + { + return null; + } + + return new DateTime(cast(GDateTime*) __p); + } + /** * Checks whether the bookmark for @uri inside @bookmark has been * registered by application @name. * * In the event the URI cannot be found, %FALSE is returned and - * @error is set to #G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND. + * @error is set to %G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND. * * Params: * uri = a valid URI @@ -572,7 +733,7 @@ public class BookmarkFile * the bookmark for @uri belongs to. * * In the event the URI cannot be found, %FALSE is returned and - * @error is set to #G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND. + * @error is set to %G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND. * * Params: * uri = a valid URI @@ -712,7 +873,7 @@ public class BookmarkFile * %NULL, then the bookmark is removed. * * In the event the URI cannot be found, %FALSE is returned and - * @error is set to #G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND. + * @error is set to %G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND. * * Params: * oldUri = a valid URI @@ -743,10 +904,10 @@ public class BookmarkFile * that have registered a bookmark for @uri inside @bookmark. * * In the event the URI cannot be found, %FALSE is returned and - * @error is set to #G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND. + * @error is set to %G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND. * In the event that no application with name @app_name has registered * a bookmark for @uri, %FALSE is returned and error is set to - * #G_BOOKMARK_FILE_ERROR_APP_NOT_REGISTERED. + * %G_BOOKMARK_FILE_ERROR_APP_NOT_REGISTERED. * * Params: * uri = a valid URI @@ -777,9 +938,9 @@ public class BookmarkFile * for @uri belongs to. * * In the event the URI cannot be found, %FALSE is returned and - * @error is set to #G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND. + * @error is set to %G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND. * In the event no group was defined, %FALSE is returned and - * @error is set to #G_BOOKMARK_FILE_ERROR_INVALID_VALUE. + * @error is set to %G_BOOKMARK_FILE_ERROR_INVALID_VALUE. * * Params: * uri = a valid URI @@ -836,6 +997,9 @@ public class BookmarkFile * * If no bookmark for @uri is found then it is created. * + * Deprecated: Use g_bookmark_file_set_added_date_time() instead, as + * `time_t` is deprecated due to the year 2038 problem. + * * Params: * uri = a valid URI * added = a timestamp or -1 to use the current time @@ -847,6 +1011,22 @@ public class BookmarkFile g_bookmark_file_set_added(gBookmarkFile, Str.toStringz(uri), added); } + /** + * Sets the time the bookmark for @uri was added into @bookmark. + * + * If no bookmark for @uri is found then it is created. + * + * Params: + * uri = a valid URI + * added = a #GDateTime + * + * Since: 2.66 + */ + public void setAddedDateTime(string uri, DateTime added) + { + g_bookmark_file_set_added_date_time(gBookmarkFile, Str.toStringz(uri), (added is null) ? null : added.getDateTimeStruct()); + } + /** * Sets the meta-data of application @name inside the list of * applications that have registered a bookmark for @uri inside @@ -861,7 +1041,7 @@ public class BookmarkFile * be expanded as the local file name retrieved from the bookmark's * URI; "\%u", which will be expanded as the bookmark's URI. * The expansion is done automatically when retrieving the stored - * command line using the g_bookmark_file_get_app_info() function. + * command line using the g_bookmark_file_get_application_info() function. * @count is the number of times the application has registered the * bookmark; if is < 0, the current registration count will be increased * by one, if is 0, the application with @name will be removed from @@ -871,12 +1051,15 @@ public class BookmarkFile * * If you try to remove an application by setting its registration count to * zero, and no bookmark for @uri is found, %FALSE is returned and - * @error is set to #G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND; similarly, + * @error is set to %G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND; similarly, * in the event that no application @name has registered a bookmark * for @uri, %FALSE is returned and error is set to - * #G_BOOKMARK_FILE_ERROR_APP_NOT_REGISTERED. Otherwise, if no bookmark + * %G_BOOKMARK_FILE_ERROR_APP_NOT_REGISTERED. Otherwise, if no bookmark * for @uri is found, one is created. * + * Deprecated: Use g_bookmark_file_set_application_info() instead, as + * `time_t` is deprecated due to the year 2038 problem. + * * Params: * uri = a valid URI * name = an application's name @@ -905,6 +1088,64 @@ public class BookmarkFile return __p; } + /** + * Sets the meta-data of application @name inside the list of + * applications that have registered a bookmark for @uri inside + * @bookmark. + * + * You should rarely use this function; use g_bookmark_file_add_application() + * and g_bookmark_file_remove_application() instead. + * + * @name can be any UTF-8 encoded string used to identify an + * application. + * @exec can have one of these two modifiers: "\%f", which will + * be expanded as the local file name retrieved from the bookmark's + * URI; "\%u", which will be expanded as the bookmark's URI. + * The expansion is done automatically when retrieving the stored + * command line using the g_bookmark_file_get_application_info() function. + * @count is the number of times the application has registered the + * bookmark; if is < 0, the current registration count will be increased + * by one, if is 0, the application with @name will be removed from + * the list of registered applications. + * @stamp is the Unix time of the last registration. + * + * If you try to remove an application by setting its registration count to + * zero, and no bookmark for @uri is found, %FALSE is returned and + * @error is set to %G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND; similarly, + * in the event that no application @name has registered a bookmark + * for @uri, %FALSE is returned and error is set to + * %G_BOOKMARK_FILE_ERROR_APP_NOT_REGISTERED. Otherwise, if no bookmark + * for @uri is found, one is created. + * + * Params: + * uri = a valid URI + * name = an application's name + * exec = an application's command line + * count = the number of registrations done for this application + * stamp = the time of the last registration for this application, + * which may be %NULL if @count is 0 + * + * Returns: %TRUE if the application's meta-data was successfully + * changed. + * + * Since: 2.66 + * + * Throws: GException on failure. + */ + public bool setApplicationInfo(string uri, string name, string exec, int count, DateTime stamp) + { + GError* err = null; + + auto __p = g_bookmark_file_set_application_info(gBookmarkFile, Str.toStringz(uri), Str.toStringz(name), Str.toStringz(exec), count, (stamp is null) ? null : stamp.getDateTimeStruct(), &err) != 0; + + if (err !is null) + { + throw new GException( new ErrorG(err) ); + } + + return __p; + } + /** * Sets @description as the description of the bookmark for @uri. * @@ -1000,7 +1241,10 @@ public class BookmarkFile * The "modified" time should only be set when the bookmark's meta-data * was actually changed. Every function of #GBookmarkFile that * modifies a bookmark also changes the modification time, except for - * g_bookmark_file_set_visited(). + * g_bookmark_file_set_visited_date_time(). + * + * Deprecated: Use g_bookmark_file_set_modified_date_time() instead, as + * `time_t` is deprecated due to the year 2038 problem. * * Params: * uri = a valid URI @@ -1013,6 +1257,27 @@ public class BookmarkFile g_bookmark_file_set_modified(gBookmarkFile, Str.toStringz(uri), modified); } + /** + * Sets the last time the bookmark for @uri was last modified. + * + * If no bookmark for @uri is found then it is created. + * + * The "modified" time should only be set when the bookmark's meta-data + * was actually changed. Every function of #GBookmarkFile that + * modifies a bookmark also changes the modification time, except for + * g_bookmark_file_set_visited_date_time(). + * + * Params: + * uri = a valid URI + * modified = a #GDateTime + * + * Since: 2.66 + */ + public void setModifiedDateTime(string uri, DateTime modified) + { + g_bookmark_file_set_modified_date_time(gBookmarkFile, Str.toStringz(uri), (modified is null) ? null : modified.getDateTimeStruct()); + } + /** * Sets @title as the title of the bookmark for @uri inside the * bookmark file @bookmark. @@ -1038,11 +1303,14 @@ public class BookmarkFile * If no bookmark for @uri is found then it is created. * * The "visited" time should only be set if the bookmark was launched, - * either using the command line retrieved by g_bookmark_file_get_app_info() + * either using the command line retrieved by g_bookmark_file_get_application_info() * or by the default application for the bookmark's MIME type, retrieved * using g_bookmark_file_get_mime_type(). Changing the "visited" time * does not affect the "modified" time. * + * Deprecated: Use g_bookmark_file_set_visited_date_time() instead, as + * `time_t` is deprecated due to the year 2038 problem. + * * Params: * uri = a valid URI * visited = a timestamp or -1 to use the current time @@ -1054,6 +1322,28 @@ public class BookmarkFile g_bookmark_file_set_visited(gBookmarkFile, Str.toStringz(uri), visited); } + /** + * Sets the time the bookmark for @uri was last visited. + * + * If no bookmark for @uri is found then it is created. + * + * The "visited" time should only be set if the bookmark was launched, + * either using the command line retrieved by g_bookmark_file_get_application_info() + * or by the default application for the bookmark's MIME type, retrieved + * using g_bookmark_file_get_mime_type(). Changing the "visited" time + * does not affect the "modified" time. + * + * Params: + * uri = a valid URI + * visited = a #GDateTime + * + * Since: 2.66 + */ + public void setVisitedDateTime(string uri, DateTime visited) + { + g_bookmark_file_set_visited_date_time(gBookmarkFile, Str.toStringz(uri), (visited is null) ? null : visited.getDateTimeStruct()); + } + /** * This function outputs @bookmark as a string. * diff --git a/generated/gtkd/glib/ByteArray.d b/generated/gtkd/glib/ByteArray.d index 241810e6c..fcf789ab1 100644 --- a/generated/gtkd/glib/ByteArray.d +++ b/generated/gtkd/glib/ByteArray.d @@ -153,6 +153,10 @@ public class ByteArray * Create byte array containing the data. The data will be owned by the array * and will be freed with g_free(), i.e. it could be allocated using g_strdup(). * + * Do not use it if @len is greater than %G_MAXUINT. #GByteArray + * stores the length of its data in #guint, which may be shorter than + * #gsize. + * * Params: * data = byte data for the array * diff --git a/generated/gtkd/glib/Bytes.d b/generated/gtkd/glib/Bytes.d index 04a02b7d2..7a2dcfc1f 100644 --- a/generated/gtkd/glib/Bytes.d +++ b/generated/gtkd/glib/Bytes.d @@ -222,6 +222,42 @@ public class Bytes return cast(ubyte[])__p[0 .. size]; } + /** + * Gets a pointer to a region in @bytes. + * + * The region starts at @offset many bytes from the start of the data + * and contains @n_elements many elements of @element_size size. + * + * @n_elements may be zero, but @element_size must always be non-zero. + * Ideally, @element_size is a static constant (eg: sizeof a struct). + * + * This function does careful bounds checking (including checking for + * arithmetic overflows) and returns a non-%NULL pointer if the + * specified region lies entirely within the @bytes. If the region is + * in some way out of range, or if an overflow has occurred, then %NULL + * is returned. + * + * Note: it is possible to have a valid zero-size region. In this case, + * the returned pointer will be equal to the base pointer of the data of + * @bytes, plus @offset. This will be non-%NULL except for the case + * where @bytes itself was a zero-sized region. Since it is unlikely + * that you will be using this function to check for a zero-sized region + * in a zero-sized @bytes, %NULL effectively always means "error". + * + * Params: + * elementSize = a non-zero element size + * offset = an offset to the start of the region within the @bytes + * nElements = the number of elements in the region + * + * Returns: the requested region, or %NULL in case of an error + * + * Since: 2.70 + */ + public void* getRegion(size_t elementSize, size_t offset, size_t nElements) + { + return g_bytes_get_region(gBytes, elementSize, offset, nElements); + } + /** * Get the size of the byte data in the #GBytes. * @@ -324,6 +360,10 @@ public class Bytes * g_bytes_new(), g_bytes_new_take() or g_byte_array_free_to_bytes(). In all * other cases the data is copied. * + * Do not use it if @bytes contains more than %G_MAXUINT + * bytes. #GByteArray stores the length of its data in #guint, which + * may be shorter than #gsize, that @bytes is using. + * * Returns: a new mutable #GByteArray containing the same byte data * * Since: 2.32 diff --git a/generated/gtkd/glib/CharacterSet.d b/generated/gtkd/glib/CharacterSet.d index 10e08cb07..90d58aadc 100644 --- a/generated/gtkd/glib/CharacterSet.d +++ b/generated/gtkd/glib/CharacterSet.d @@ -61,7 +61,7 @@ public struct CharacterSet * Even if the conversion was successful, this may be * less than @len if there were partial characters * at the end of the input. If the error - * #G_CONVERT_ERROR_ILLEGAL_SEQUENCE occurs, the value + * %G_CONVERT_ERROR_ILLEGAL_SEQUENCE occurs, the value * stored will be the byte offset after the last valid * input sequence. * @@ -178,7 +178,7 @@ public struct CharacterSet * Even if the conversion was successful, this may be * less than @len if there were partial characters * at the end of the input. If the error - * #G_CONVERT_ERROR_ILLEGAL_SEQUENCE occurs, the value + * %G_CONVERT_ERROR_ILLEGAL_SEQUENCE occurs, the value * stored will be the byte offset after the last valid * input sequence. * diff --git a/generated/gtkd/glib/Checksum.d b/generated/gtkd/glib/Checksum.d index 74fb1ff4f..13dd0caa2 100644 --- a/generated/gtkd/glib/Checksum.d +++ b/generated/gtkd/glib/Checksum.d @@ -35,6 +35,7 @@ private import gtkd.Loader; /** * An opaque structure representing a checksumming operation. + * * To create a new GChecksum, use g_checksum_new(). To free * a GChecksum, use g_checksum_free(). * @@ -143,8 +144,8 @@ public class Checksum * g_checksum_get_string() or g_checksum_get_digest(), the copied * checksum will be closed as well. * - * Returns: the copy of the passed #GChecksum. Use g_checksum_free() - * when finished using it. + * Returns: the copy of the passed #GChecksum. Use + * g_checksum_free() when finished using it. * * Since: 2.16 */ @@ -242,8 +243,10 @@ public class Checksum * checksumType = a #GChecksumType * data = binary blob to compute the digest of * - * Returns: the digest of the binary data as a string in hexadecimal. - * The returned string should be freed with g_free() when done using it. + * Returns: the digest of the binary data as a + * string in hexadecimal, or %NULL if g_checksum_new() fails for + * @checksum_type. The returned string should be freed with g_free() when + * done using it. * * Since: 2.34 */ @@ -266,8 +269,10 @@ public class Checksum * checksumType = a #GChecksumType * data = binary blob to compute the digest of * - * Returns: the digest of the binary data as a string in hexadecimal. - * The returned string should be freed with g_free() when done using it. + * Returns: the digest of the binary data as a + * string in hexadecimal, or %NULL if g_checksum_new() fails for + * @checksum_type. The returned string should be freed with g_free() when + * done using it. * * Since: 2.16 */ @@ -289,7 +294,8 @@ public class Checksum * str = the string to compute the checksum of * length = the length of the string, or -1 if the string is null-terminated. * - * Returns: the checksum as a hexadecimal string. The returned string + * Returns: the checksum as a hexadecimal string, + * or %NULL if g_checksum_new() fails for @checksum_type. The returned string * should be freed with g_free() when done using it. * * Since: 2.16 diff --git a/generated/gtkd/glib/Child.d b/generated/gtkd/glib/Child.d index 81b498763..c83cb58ac 100644 --- a/generated/gtkd/glib/Child.d +++ b/generated/gtkd/glib/Child.d @@ -36,10 +36,10 @@ public struct Child /** * Sets a function to be called when the child indicated by @pid - * exits, at a default priority, #G_PRIORITY_DEFAULT. + * exits, at a default priority, %G_PRIORITY_DEFAULT. * * If you obtain @pid from g_spawn_async() or g_spawn_async_with_pipes() - * you will need to pass #G_SPAWN_DO_NOT_REAP_CHILD as flag to + * you will need to pass %G_SPAWN_DO_NOT_REAP_CHILD as flag to * the spawn function for the child watching to work. * * Note that on platforms where #GPid must be explicitly closed @@ -58,8 +58,8 @@ public struct Child * * Params: * pid = process id to watch. On POSIX the positive pid of a child - * process. On Windows a handle for a process (which doesn't have to be - * a child). + * process. On Windows a handle for a process (which doesn't have + * to be a child). * function_ = function to call * data = data to pass to @function * @@ -77,10 +77,10 @@ public struct Child * exits, at the priority @priority. * * If you obtain @pid from g_spawn_async() or g_spawn_async_with_pipes() - * you will need to pass #G_SPAWN_DO_NOT_REAP_CHILD as flag to + * you will need to pass %G_SPAWN_DO_NOT_REAP_CHILD as flag to * the spawn function for the child watching to work. * - * In many programs, you will want to call g_spawn_check_exit_status() + * In many programs, you will want to call g_spawn_check_wait_status() * in the callback to determine whether or not the child exited * successfully. * @@ -100,7 +100,7 @@ public struct Child * * Params: * priority = the priority of the idle source. Typically this will be in the - * range between #G_PRIORITY_DEFAULT_IDLE and #G_PRIORITY_HIGH_IDLE. + * range between %G_PRIORITY_DEFAULT_IDLE and %G_PRIORITY_HIGH_IDLE. * pid = process to watch. On POSIX the positive pid of a child process. On * Windows a handle for a process (which doesn't have to be a child). * function_ = function to call @@ -141,7 +141,7 @@ public struct Child * * the application must not wait for @pid to exit by any other * mechanism, including `waitpid(pid, ...)` or a second child-watch * source for the same @pid - * * the application must not ignore SIGCHILD + * * the application must not ignore `SIGCHLD` * * If any of those conditions are not met, this and related APIs will * not work correctly. This can often be diagnosed via a GLib warning diff --git a/generated/gtkd/glib/DataList.d b/generated/gtkd/glib/DataList.d index 588709f38..29fbf2924 100644 --- a/generated/gtkd/glib/DataList.d +++ b/generated/gtkd/glib/DataList.d @@ -176,7 +176,7 @@ public struct DataList * If the previous value was replaced then ownership of the * old value (@oldval) is passed to the caller, including * the registered destroy notify for it (passed out in @old_destroy). - * Its up to the caller to free this as he wishes, which may + * Its up to the caller to free this as they wish, which may * or may not include using @old_destroy as sometimes replacement * should not destroy the object in the normal way. * diff --git a/generated/gtkd/glib/Date.d b/generated/gtkd/glib/Date.d index c8add5624..353682806 100644 --- a/generated/gtkd/glib/Date.d +++ b/generated/gtkd/glib/Date.d @@ -38,12 +38,12 @@ private import gtkd.Loader; * Represents a day between January 1, Year 1 and a few thousand years in * the future. None of its members should be accessed directly. * - * If the #GDate-struct is obtained from g_date_new(), it will be safe + * If the `GDate` is obtained from g_date_new(), it will be safe * to mutate but invalid and thus not safe for calendrical computations. * * If it's declared on the stack, it will contain garbage so must be * initialized with g_date_clear(). g_date_clear() makes the date invalid - * but sane. An invalid date doesn't represent a day, it's "empty." A date + * but safe. An invalid date doesn't represent a day, it's "empty." A date * becomes valid after you set it to a Julian day or you set a day, month, * and year. */ @@ -171,7 +171,7 @@ public final class Date /** * Allocates a #GDate and initializes - * it to a sane state. The new date will + * it to a safe state. The new date will * be cleared (as if you'd called g_date_clear()) but invalid (it won't * represent an existing day). Free the return value with g_date_free(). * @@ -192,16 +192,19 @@ public final class Date } /** - * Like g_date_new(), but also sets the value of the date. Assuming the - * day-month-year triplet you pass in represents an existing day, the - * returned date will be valid. + * Create a new #GDate representing the given day-month-year triplet. + * + * The triplet you pass in must represent a valid date. Use g_date_valid_dmy() + * if needed to validate it. The returned #GDate is guaranteed to be non-%NULL + * and valid. * * Params: * day = day of the month * month = month of the year * year = year * - * Returns: a newly-allocated #GDate initialized with @day, @month, and @year + * Returns: a newly-allocated #GDate + * initialized with @day, @month, and @year * * Throws: ConstructionException GTK+ fails to create the object. */ @@ -218,14 +221,17 @@ public final class Date } /** - * Like g_date_new(), but also sets the value of the date. Assuming the - * Julian day number you pass in is valid (greater than 0, less than an - * unreasonably large number), the returned date will be valid. + * Create a new #GDate representing the given Julian date. + * + * The @julian_day you pass in must be valid. Use g_date_valid_julian() if + * needed to validate it. The returned #GDate is guaranteed to be non-%NULL and + * valid. * * Params: * julianDay = days since January 1, Year 1 * - * Returns: a newly-allocated #GDate initialized with @julian_day + * Returns: a newly-allocated #GDate initialized + * with @julian_day * * Throws: ConstructionException GTK+ fails to create the object. */ @@ -300,7 +306,7 @@ public final class Date } /** - * Initializes one or more #GDate structs to a sane but invalid + * Initializes one or more #GDate structs to a safe but invalid * state. The cleared dates will not represent an existing date, but will * not contain garbage. Useful to init a date declared on the stack. * Validity can be tested with g_date_valid(). @@ -693,7 +699,7 @@ public final class Date /** * Fills in the date-related bits of a struct tm using the @date value. - * Initializes the non-date parts with something sane but meaningless. + * Initializes the non-date parts with something safe but meaningless. * * Params: * tm = struct tm to fill diff --git a/generated/gtkd/glib/DateTime.d b/generated/gtkd/glib/DateTime.d index a4f9029f7..effc026ad 100644 --- a/generated/gtkd/glib/DateTime.d +++ b/generated/gtkd/glib/DateTime.d @@ -35,8 +35,7 @@ private import gtkd.Loader; /** - * `GDateTime` is an opaque structure whose members - * cannot be accessed directly. + * An opaque structure that represents a date and time, including a time zone. * * Since: 2.26 */ @@ -160,7 +159,7 @@ public class DateTime if ( date is null ) return false; - return equal(this, date) != 0; + return g_date_time_compare(gDateTime, date.getDateTimeStruct()) != 0; } /** */ @@ -171,7 +170,7 @@ public class DateTime if ( date is null ) return int.min; - return compare(this, date); + return g_date_time_compare(gDateTime, date.getDateTimeStruct()); } /** */ @@ -332,9 +331,8 @@ public class DateTime * time zone @tz. The time is as accurate as the system allows, to a * maximum accuracy of 1 microsecond. * - * This function will always succeed unless the system clock is set to - * truly insane values (or unless GLib is still being used after the - * year 9999). + * This function will always succeed unless GLib is still being used after the + * year 9999. * * You should release the return value by calling g_date_time_unref() * when you are done with it. @@ -366,8 +364,8 @@ public class DateTime * Params: * timespan = a #GTimeSpan * - * Returns: the newly created #GDateTime which should be freed with - * g_date_time_unref(). + * Returns: the newly created #GDateTime which + * should be freed with g_date_time_unref(), or %NULL * * Since: 2.26 */ @@ -390,8 +388,8 @@ public class DateTime * Params: * days = the number of days * - * Returns: the newly created #GDateTime which should be freed with - * g_date_time_unref(). + * Returns: the newly created #GDateTime which + * should be freed with g_date_time_unref(), or %NULL * * Since: 2.26 */ @@ -419,8 +417,8 @@ public class DateTime * minutes = the number of minutes to add * seconds = the number of seconds to add * - * Returns: the newly created #GDateTime that should be freed with - * g_date_time_unref(). + * Returns: the newly created #GDateTime which + * should be freed with g_date_time_unref(), or %NULL * * Since: 2.26 */ @@ -443,8 +441,8 @@ public class DateTime * Params: * hours = the number of hours to add * - * Returns: the newly created #GDateTime which should be freed with - * g_date_time_unref(). + * Returns: the newly created #GDateTime which + * should be freed with g_date_time_unref(), or %NULL * * Since: 2.26 */ @@ -467,8 +465,8 @@ public class DateTime * Params: * minutes = the number of minutes to add * - * Returns: the newly created #GDateTime which should be freed with - * g_date_time_unref(). + * Returns: the newly created #GDateTime which + * should be freed with g_date_time_unref(), or %NULL * * Since: 2.26 */ @@ -496,8 +494,8 @@ public class DateTime * Params: * months = the number of months * - * Returns: the newly created #GDateTime which should be freed with - * g_date_time_unref(). + * Returns: the newly created #GDateTime which + * should be freed with g_date_time_unref(), or %NULL * * Since: 2.26 */ @@ -520,8 +518,8 @@ public class DateTime * Params: * seconds = the number of seconds to add * - * Returns: the newly created #GDateTime which should be freed with - * g_date_time_unref(). + * Returns: the newly created #GDateTime which + * should be freed with g_date_time_unref(), or %NULL * * Since: 2.26 */ @@ -544,8 +542,8 @@ public class DateTime * Params: * weeks = the number of weeks * - * Returns: the newly created #GDateTime which should be freed with - * g_date_time_unref(). + * Returns: the newly created #GDateTime which + * should be freed with g_date_time_unref(), or %NULL * * Since: 2.26 */ @@ -571,8 +569,8 @@ public class DateTime * Params: * years = the number of years * - * Returns: the newly created #GDateTime which should be freed with - * g_date_time_unref(). + * Returns: the newly created #GDateTime which + * should be freed with g_date_time_unref(), or %NULL * * Since: 2.26 */ @@ -588,6 +586,23 @@ public class DateTime return new DateTime(cast(GDateTime*) __p, true); } + /** + * A comparison function for #GDateTimes that is suitable + * as a #GCompareFunc. Both #GDateTimes must be non-%NULL. + * + * Params: + * dt2 = second #GDateTime to compare + * + * Returns: -1, 0 or 1 if @dt1 is less than, equal to or greater + * than @dt2. + * + * Since: 2.26 + */ + public int compare(DateTime dt2) + { + return g_date_time_compare(gDateTime, (dt2 is null) ? null : dt2.getDateTimeStruct()); + } + /** * Calculates the difference in time between @end and @begin. The * #GTimeSpan that is returned is effectively @end - @begin (ie: @@ -606,6 +621,24 @@ public class DateTime return g_date_time_difference(gDateTime, (begin is null) ? null : begin.getDateTimeStruct()); } + /** + * Checks to see if @dt1 and @dt2 are equal. + * + * Equal here means that they represent the same moment after converting + * them to the same time zone. + * + * Params: + * dt2 = a #GDateTime + * + * Returns: %TRUE if @dt1 and @dt2 are equal + * + * Since: 2.26 + */ + public bool equal(DateTime dt2) + { + return g_date_time_equal(gDateTime, (dt2 is null) ? null : dt2.getDateTimeStruct()) != 0; + } + /** * Creates a newly allocated string representing the requested @format. * @@ -613,7 +646,7 @@ public class DateTime * strftime() format language as specified by C99. The \%D, \%U and \%W * conversions are not supported, nor is the 'E' modifier. The GNU * extensions \%k, \%l, \%s and \%P are supported, however, as are the - * '0', '_' and '-' modifiers. + * '0', '_' and '-' modifiers. The Python extension \%f is also supported. * * In contrast to strftime(), this function always produces a UTF-8 * string, regardless of the current locale. Note that the rendering of @@ -645,12 +678,17 @@ public class DateTime * single digits are preceded by a blank * - \%m: the month as a decimal number (range 01 to 12) * - \%M: the minute as a decimal number (range 00 to 59) + * - \%f: the microsecond as a decimal number (range 000000 to 999999) * - \%p: either "AM" or "PM" according to the given time value, or the * corresponding strings for the current locale. Noon is treated as - * "PM" and midnight as "AM". + * "PM" and midnight as "AM". Use of this format specifier is discouraged, as + * many locales have no concept of AM/PM formatting. Use \%c or \%X instead. * - \%P: like \%p but lowercase: "am" or "pm" or a corresponding string for - * the current locale - * - \%r: the time in a.m. or p.m. notation + * the current locale. Use of this format specifier is discouraged, as + * many locales have no concept of AM/PM formatting. Use \%c or \%X instead. + * - \%r: the time in a.m. or p.m. notation. Use of this format specifier is + * discouraged, as many locales have no concept of AM/PM formatting. Use \%c + * or \%X instead. * - \%R: the time in 24-hour notation (\%H:\%M) * - \%s: the number of seconds since the Epoch, that is, since 1970-01-01 * 00:00:00 UTC @@ -706,10 +744,10 @@ public class DateTime * format = a valid UTF-8 string, containing the format for the * #GDateTime * - * Returns: a newly allocated string formatted to the requested format - * or %NULL in the case that there was an error (such as a format specifier - * not being supported in the current locale). The string - * should be freed with g_free(). + * Returns: a newly allocated string formatted to + * the requested format or %NULL in the case that there was an error (such + * as a format specifier not being supported in the current locale). The + * string should be freed with g_free(). * * Since: 2.26 */ @@ -726,8 +764,10 @@ public class DateTime * including the date, time and time zone, and return that as a UTF-8 encoded * string. * - * Returns: a newly allocated string formatted in ISO 8601 format - * or %NULL in the case that there was an error. The string + * Since GLib 2.66, this will output to sub-second precision if needed. + * + * Returns: a newly allocated string formatted in + * ISO 8601 format or %NULL in the case that there was an error. The string * should be freed with g_free(). * * Since: 2.62 @@ -1046,7 +1086,8 @@ public class DateTime * This call is equivalent to calling g_date_time_to_timezone() with the * time zone returned by g_time_zone_new_local(). * - * Returns: the newly created #GDateTime + * Returns: the newly created #GDateTime which + * should be freed with g_date_time_unref(), or %NULL * * Since: 2.26 */ @@ -1100,13 +1141,11 @@ public class DateTime * example, converting 0001-01-01 00:00:00 UTC to a time zone west of * Greenwich will fail (due to the year 0 being out of range). * - * You should release the return value by calling g_date_time_unref() - * when you are done with it. - * * Params: * tz = the new #GTimeZone * - * Returns: a new #GDateTime, or %NULL + * Returns: the newly created #GDateTime which + * should be freed with g_date_time_unref(), or %NULL * * Since: 2.26 */ @@ -1145,7 +1184,8 @@ public class DateTime * This call is equivalent to calling g_date_time_to_timezone() with the * time zone returned by g_time_zone_new_utc(). * - * Returns: the newly created #GDateTime + * Returns: the newly created #GDateTime which + * should be freed with g_date_time_unref(), or %NULL * * Since: 2.26 */ @@ -1173,41 +1213,4 @@ public class DateTime { g_date_time_unref(gDateTime); } - - /** - * A comparison function for #GDateTimes that is suitable - * as a #GCompareFunc. Both #GDateTimes must be non-%NULL. - * - * Params: - * dt1 = first #GDateTime to compare - * dt2 = second #GDateTime to compare - * - * Returns: -1, 0 or 1 if @dt1 is less than, equal to or greater - * than @dt2. - * - * Since: 2.26 - */ - public static int compare(DateTime dt1, DateTime dt2) - { - return g_date_time_compare((dt1 is null) ? null : dt1.getDateTimeStruct(), (dt2 is null) ? null : dt2.getDateTimeStruct()); - } - - /** - * Checks to see if @dt1 and @dt2 are equal. - * - * Equal here means that they represent the same moment after converting - * them to the same time zone. - * - * Params: - * dt1 = a #GDateTime - * dt2 = a #GDateTime - * - * Returns: %TRUE if @dt1 and @dt2 are equal - * - * Since: 2.26 - */ - public static bool equal(DateTime dt1, DateTime dt2) - { - return g_date_time_equal((dt1 is null) ? null : dt1.getDateTimeStruct(), (dt2 is null) ? null : dt2.getDateTimeStruct()) != 0; - } } diff --git a/generated/gtkd/glib/ErrorG.d b/generated/gtkd/glib/ErrorG.d index faafe9d0f..e1a5df7ed 100644 --- a/generated/gtkd/glib/ErrorG.d +++ b/generated/gtkd/glib/ErrorG.d @@ -176,6 +176,62 @@ public class ErrorG return g_error_matches(gError, domain, code) != 0; } + /** + * This function registers an extended #GError domain. + * @error_type_name will be duplicated. Otherwise does the same as + * g_error_domain_register_static(). + * + * Params: + * errorTypeName = string to create a #GQuark from + * errorTypePrivateSize = size of the private error data in bytes + * errorTypeInit = function initializing fields of the private error data + * errorTypeCopy = function copying fields of the private error data + * errorTypeClear = function freeing fields of the private error data + * + * Returns: #GQuark representing the error domain + * + * Since: 2.68 + */ + public static GQuark domainRegister(string errorTypeName, size_t errorTypePrivateSize, GErrorInitFunc errorTypeInit, GErrorCopyFunc errorTypeCopy, GErrorClearFunc errorTypeClear) + { + return g_error_domain_register(Str.toStringz(errorTypeName), errorTypePrivateSize, errorTypeInit, errorTypeCopy, errorTypeClear); + } + + /** + * This function registers an extended #GError domain. + * + * @error_type_name should not be freed. @error_type_private_size must + * be greater than 0. + * + * @error_type_init receives an initialized #GError and should then initialize + * the private data. + * + * @error_type_copy is a function that receives both original and a copy + * #GError and should copy the fields of the private error data. The standard + * #GError fields are already handled. + * + * @error_type_clear receives the pointer to the error, and it should free the + * fields of the private error data. It should not free the struct itself though. + * + * Normally, it is better to use G_DEFINE_EXTENDED_ERROR(), as it + * already takes care of passing valid information to this function. + * + * Params: + * errorTypeName = static string to create a #GQuark from + * errorTypePrivateSize = size of the private error data in bytes + * errorTypeInit = function initializing fields of the private error data + * errorTypeCopy = function copying fields of the private error data + * errorTypeClear = function freeing fields of the private error data + * + * Returns: #GQuark representing the error domain + * + * Since: 2.68 + */ + public static GQuark domainRegisterStatic(string errorTypeName, size_t errorTypePrivateSize, GErrorInitFunc errorTypeInit, GErrorCopyFunc errorTypeCopy, GErrorClearFunc errorTypeClear) + { + return g_error_domain_register_static(Str.toStringz(errorTypeName), errorTypePrivateSize, errorTypeInit, errorTypeCopy, errorTypeClear); + } + /** * If @dest is %NULL, free @src; otherwise, moves @src into *@dest. * The error variable @dest points to must be %NULL. diff --git a/generated/gtkd/glib/FileUtils.d b/generated/gtkd/glib/FileUtils.d index 7e7fcea96..6ffa2aa0c 100644 --- a/generated/gtkd/glib/FileUtils.d +++ b/generated/gtkd/glib/FileUtils.d @@ -119,8 +119,9 @@ public struct FileUtils /** * Gets a #GFileError constant based on the passed-in @err_no. + * * For example, if you pass in `EEXIST` this function returns - * #G_FILE_ERROR_EXIST. Unlike `errno` values, you can portably + * %G_FILE_ERROR_EXIST. Unlike `errno` values, you can portably * assume that all #GFileError values will exist. * * Normally a #GFileError value goes into a #GError returned @@ -130,7 +131,7 @@ public struct FileUtils * Params: * errNo = an "errno" value * - * Returns: #GFileError corresponding to the given @errno + * Returns: #GFileError corresponding to the given @err_no */ public static GFileError fileErrorFromErrno(int errNo) { @@ -151,7 +152,7 @@ public struct FileUtils * contents and @length to the length of the file contents in bytes. The string * stored in @contents will be nul-terminated, so for text files you can pass * %NULL for the @length argument. If the call was not successful, it returns - * %FALSE and sets @error. The error domain is #G_FILE_ERROR. Possible error + * %FALSE and sets @error. The error domain is %G_FILE_ERROR. Possible error * codes are those in the #GFileError enumeration. In the error case, * @contents is set to %NULL and @length is set to zero. * @@ -238,8 +239,8 @@ public struct FileUtils * Params: * filename = the symbolic link * - * Returns: A newly-allocated string with the contents of - * the symbolic link, or %NULL if an error occurred. + * Returns: A newly-allocated string with + * the contents of the symbolic link, or %NULL if an error occurred. * * Since: 2.4 * @@ -261,42 +262,10 @@ public struct FileUtils } /** - * Writes all of @contents to a file named @filename, with good error checking. - * If a file called @filename already exists it will be overwritten. - * - * This write is atomic in the sense that it is first written to a temporary - * file which is then renamed to the final name. Notes: - * - * - On UNIX, if @filename already exists hard links to @filename will break. - * Also since the file is recreated, existing permissions, access control - * lists, metadata etc. may be lost. If @filename is a symbolic link, - * the link itself will be replaced, not the linked file. - * - * - On UNIX, if @filename already exists and is non-empty, and if the system - * supports it (via a journalling filesystem or equivalent), the fsync() - * call (or equivalent) will be used to ensure atomic replacement: @filename - * will contain either its old contents or @contents, even in the face of - * system power loss, the disk being unsafely removed, etc. - * - * - On UNIX, if @filename does not already exist or is empty, there is a - * possibility that system power loss etc. after calling this function will - * leave @filename empty or full of NUL bytes, depending on the underlying - * filesystem. - * - * - On Windows renaming a file will not remove an existing file with the - * new name, so on Windows there is a race condition between the existing - * file being removed and the temporary file being renamed. - * - * - On Windows there is no way to remove a file that is open to some - * process, or mapped into memory. Thus, this function will fail if - * @filename already exists and is open. - * - * If the call was successful, it returns %TRUE. If the call was not successful, - * it returns %FALSE and sets @error. The error domain is #G_FILE_ERROR. - * Possible error codes are those in the #GFileError enumeration. - * - * Note that the name for the temporary file is constructed by appending up - * to 7 characters to @filename. + * Writes all of @contents to a file named @filename. This is a convenience + * wrapper around calling g_file_set_contents_full() with `flags` set to + * `G_FILE_SET_CONTENTS_CONSISTENT | G_FILE_SET_CONTENTS_ONLY_EXISTING` and + * `mode` set to `0666`. * * Params: * filename = name of a file to write @contents to, in the GLib file name diff --git a/generated/gtkd/glib/HashTable.d b/generated/gtkd/glib/HashTable.d index 2f886ada1..c962793d0 100644 --- a/generated/gtkd/glib/HashTable.d +++ b/generated/gtkd/glib/HashTable.d @@ -446,6 +446,34 @@ public class HashTable this(cast(GHashTable*) __p); } + /** + * Creates a new #GHashTable like g_hash_table_new_full() with a reference + * count of 1. + * + * It inherits the hash function, the key equal function, the key destroy function, + * as well as the value destroy function, from @other_hash_table. + * + * The returned hash table will be empty; it will not contain the keys + * or values from @other_hash_table. + * + * Returns: a new #GHashTable + * + * Since: 2.72 + * + * Throws: ConstructionException GTK+ fails to create the object. + */ + public this(HashTable otherHashTable) + { + auto __p = g_hash_table_new_similar((otherHashTable is null) ? null : otherHashTable.getHashTableStruct()); + + if(__p is null) + { + throw new ConstructionException("null returned by new_similar"); + } + + this(cast(GHashTable*) __p); + } + alias doref = ref_; /** * Atomically increments the reference count of @hash_table by one. diff --git a/generated/gtkd/glib/Hostname.d b/generated/gtkd/glib/Hostname.d index 2a7aa3db0..848c84cf8 100644 --- a/generated/gtkd/glib/Hostname.d +++ b/generated/gtkd/glib/Hostname.d @@ -61,6 +61,8 @@ public struct Hostname * Tests if @hostname is the string form of an IPv4 or IPv6 address. * (Eg, "192.168.0.1".) * + * Since 2.66, IPv6 addresses with a zone-id are accepted (RFC6874). + * * Params: * hostname = a hostname (or IP address in string form) * @@ -102,8 +104,8 @@ public struct Hostname * Params: * hostname = a valid UTF-8 or ASCII hostname * - * Returns: an ASCII hostname, which must be freed, or %NULL if - * @hostname is in some way invalid. + * Returns: an ASCII hostname, which must be freed, + * or %NULL if @hostname is in some way invalid. * * Since: 2.22 */ @@ -127,8 +129,8 @@ public struct Hostname * Params: * hostname = a valid UTF-8 or ASCII hostname * - * Returns: a UTF-8 hostname, which must be freed, or %NULL if - * @hostname is in some way invalid. + * Returns: a UTF-8 hostname, which must be freed, + * or %NULL if @hostname is in some way invalid. * * Since: 2.22 */ diff --git a/generated/gtkd/glib/IOChannel.d b/generated/gtkd/glib/IOChannel.d index 876810593..97bb41d56 100644 --- a/generated/gtkd/glib/IOChannel.d +++ b/generated/gtkd/glib/IOChannel.d @@ -172,8 +172,8 @@ public class IOChannel * Flushes the write buffer for the GIOChannel. * * Returns: the status of the operation: One of - * #G_IO_STATUS_NORMAL, #G_IO_STATUS_AGAIN, or - * #G_IO_STATUS_ERROR. + * %G_IO_STATUS_NORMAL, %G_IO_STATUS_AGAIN, or + * %G_IO_STATUS_ERROR. * * Throws: GException on failure. */ @@ -868,7 +868,7 @@ public class IOChannel /** * Creates a #GSource that's dispatched when @condition is met for the - * given @channel. For example, if condition is #G_IO_IN, the source will + * given @channel. For example, if condition is %G_IO_IN, the source will * be dispatched when there's data available for reading. * * The callback function invoked by the #GSource should be added with diff --git a/generated/gtkd/glib/Idle.d b/generated/gtkd/glib/Idle.d index 3021b96a3..74fe726da 100644 --- a/generated/gtkd/glib/Idle.d +++ b/generated/gtkd/glib/Idle.d @@ -145,7 +145,7 @@ public class Idle /** * Adds a function to be called whenever there are no higher priority * events pending to the default main loop. The function is given the - * default idle priority, #G_PRIORITY_DEFAULT_IDLE. If the function + * default idle priority, %G_PRIORITY_DEFAULT_IDLE. If the function * returns %FALSE it is automatically removed from the list of event * sources and will not be called again. * @@ -171,7 +171,9 @@ public class Idle /** * Adds a function to be called whenever there are no higher priority - * events pending. If the function returns %FALSE it is automatically + * events pending. + * + * If the function returns %G_SOURCE_REMOVE or %FALSE it is automatically * removed from the list of event sources and will not be called again. * * See [memory management of sources][mainloop-memory-management] for details @@ -185,7 +187,7 @@ public class Idle * * Params: * priority = the priority of the idle source. Typically this will be in the - * range between #G_PRIORITY_DEFAULT_IDLE and #G_PRIORITY_HIGH_IDLE. + * range between %G_PRIORITY_DEFAULT_IDLE and %G_PRIORITY_HIGH_IDLE. * function_ = function to call * data = data to pass to @function * notify = function to call when the idle is removed, or %NULL diff --git a/generated/gtkd/glib/KeyFile.d b/generated/gtkd/glib/KeyFile.d index ad523f968..6e30aa87c 100644 --- a/generated/gtkd/glib/KeyFile.d +++ b/generated/gtkd/glib/KeyFile.d @@ -117,9 +117,9 @@ public class KeyFile * boolean. * * If @key cannot be found then %FALSE is returned and @error is set - * to #G_KEY_FILE_ERROR_KEY_NOT_FOUND. Likewise, if the value + * to %G_KEY_FILE_ERROR_KEY_NOT_FOUND. Likewise, if the value * associated with @key cannot be interpreted as a boolean then %FALSE - * is returned and @error is set to #G_KEY_FILE_ERROR_INVALID_VALUE. + * is returned and @error is set to %G_KEY_FILE_ERROR_INVALID_VALUE. * * Params: * groupName = a group name @@ -151,9 +151,9 @@ public class KeyFile * booleans. * * If @key cannot be found then %NULL is returned and @error is set to - * #G_KEY_FILE_ERROR_KEY_NOT_FOUND. Likewise, if the values associated + * %G_KEY_FILE_ERROR_KEY_NOT_FOUND. Likewise, if the values associated * with @key cannot be interpreted as booleans then %NULL is returned - * and @error is set to #G_KEY_FILE_ERROR_INVALID_VALUE. + * and @error is set to %G_KEY_FILE_ERROR_INVALID_VALUE. * * Params: * groupName = a group name @@ -227,9 +227,9 @@ public class KeyFile * double. If @group_name is %NULL, the start_group is used. * * If @key cannot be found then 0.0 is returned and @error is set to - * #G_KEY_FILE_ERROR_KEY_NOT_FOUND. Likewise, if the value associated + * %G_KEY_FILE_ERROR_KEY_NOT_FOUND. Likewise, if the value associated * with @key cannot be interpreted as a double then 0.0 is returned - * and @error is set to #G_KEY_FILE_ERROR_INVALID_VALUE. + * and @error is set to %G_KEY_FILE_ERROR_INVALID_VALUE. * * Params: * groupName = a group name @@ -261,9 +261,9 @@ public class KeyFile * doubles. * * If @key cannot be found then %NULL is returned and @error is set to - * #G_KEY_FILE_ERROR_KEY_NOT_FOUND. Likewise, if the values associated + * %G_KEY_FILE_ERROR_KEY_NOT_FOUND. Likewise, if the values associated * with @key cannot be interpreted as doubles then %NULL is returned - * and @error is set to #G_KEY_FILE_ERROR_INVALID_VALUE. + * and @error is set to %G_KEY_FILE_ERROR_INVALID_VALUE. * * Params: * groupName = a group name @@ -348,10 +348,10 @@ public class KeyFile * integer. * * If @key cannot be found then 0 is returned and @error is set to - * #G_KEY_FILE_ERROR_KEY_NOT_FOUND. Likewise, if the value associated + * %G_KEY_FILE_ERROR_KEY_NOT_FOUND. Likewise, if the value associated * with @key cannot be interpreted as an integer, or is out of range * for a #gint, then 0 is returned - * and @error is set to #G_KEY_FILE_ERROR_INVALID_VALUE. + * and @error is set to %G_KEY_FILE_ERROR_INVALID_VALUE. * * Params: * groupName = a group name @@ -383,10 +383,10 @@ public class KeyFile * integers. * * If @key cannot be found then %NULL is returned and @error is set to - * #G_KEY_FILE_ERROR_KEY_NOT_FOUND. Likewise, if the values associated + * %G_KEY_FILE_ERROR_KEY_NOT_FOUND. Likewise, if the values associated * with @key cannot be interpreted as integers, or are out of range for * #gint, then %NULL is returned - * and @error is set to #G_KEY_FILE_ERROR_INVALID_VALUE. + * and @error is set to %G_KEY_FILE_ERROR_INVALID_VALUE. * * Params: * groupName = a group name @@ -420,7 +420,7 @@ public class KeyFile * returned keys will be %NULL-terminated, so @length may * optionally be %NULL. In the event that the @group_name cannot * be found, %NULL is returned and @error is set to - * #G_KEY_FILE_ERROR_GROUP_NOT_FOUND. + * %G_KEY_FILE_ERROR_GROUP_NOT_FOUND. * * Params: * groupName = a group name @@ -487,7 +487,7 @@ public class KeyFile * %G_KEY_FILE_KEEP_TRANSLATIONS in order to load strings for all locales. * * If @key cannot be found then %NULL is returned and @error is set - * to #G_KEY_FILE_ERROR_KEY_NOT_FOUND. If the value associated + * to %G_KEY_FILE_ERROR_KEY_NOT_FOUND. If the value associated * with @key cannot be interpreted or no suitable translation can * be found then the untranslated value is returned. * @@ -528,7 +528,7 @@ public class KeyFile * %G_KEY_FILE_KEEP_TRANSLATIONS in order to load strings for all locales. * * If @key cannot be found then %NULL is returned and @error is set - * to #G_KEY_FILE_ERROR_KEY_NOT_FOUND. If the values associated + * to %G_KEY_FILE_ERROR_KEY_NOT_FOUND. If the values associated * with @key cannot be interpreted or no suitable translations * can be found then the untranslated values are returned. The * returned array is %NULL-terminated, so @length may optionally @@ -584,9 +584,9 @@ public class KeyFile * like \s. * * In the event the key cannot be found, %NULL is returned and - * @error is set to #G_KEY_FILE_ERROR_KEY_NOT_FOUND. In the + * @error is set to %G_KEY_FILE_ERROR_KEY_NOT_FOUND. In the * event that the @group_name cannot be found, %NULL is returned - * and @error is set to #G_KEY_FILE_ERROR_GROUP_NOT_FOUND. + * and @error is set to %G_KEY_FILE_ERROR_GROUP_NOT_FOUND. * * Params: * groupName = a group name @@ -618,9 +618,9 @@ public class KeyFile * Returns the values associated with @key under @group_name. * * In the event the key cannot be found, %NULL is returned and - * @error is set to #G_KEY_FILE_ERROR_KEY_NOT_FOUND. In the + * @error is set to %G_KEY_FILE_ERROR_KEY_NOT_FOUND. In the * event that the @group_name cannot be found, %NULL is returned - * and @error is set to #G_KEY_FILE_ERROR_GROUP_NOT_FOUND. + * and @error is set to %G_KEY_FILE_ERROR_GROUP_NOT_FOUND. * * Params: * groupName = a group name @@ -684,9 +684,9 @@ public class KeyFile * Use g_key_file_get_string() to retrieve an unescaped UTF-8 string. * * In the event the key cannot be found, %NULL is returned and - * @error is set to #G_KEY_FILE_ERROR_KEY_NOT_FOUND. In the + * @error is set to %G_KEY_FILE_ERROR_KEY_NOT_FOUND. In the * event that the @group_name cannot be found, %NULL is returned - * and @error is set to #G_KEY_FILE_ERROR_GROUP_NOT_FOUND. + * and @error is set to %G_KEY_FILE_ERROR_GROUP_NOT_FOUND. * * Params: * groupName = a group name @@ -836,7 +836,7 @@ public class KeyFile * of the file, or %NULL * flags = flags from #GKeyFileFlags * - * Returns: %TRUE if a key file could be loaded, %FALSE othewise + * Returns: %TRUE if a key file could be loaded, %FALSE otherwise * * Since: 2.6 * @@ -1040,7 +1040,9 @@ public class KeyFile /** * Writes the contents of @key_file to @filename using - * g_file_set_contents(). + * g_file_set_contents(). If you need stricter guarantees about durability of + * the written file than are provided by g_file_set_contents(), use + * g_file_set_contents_full() with the return value of g_key_file_to_data(). * * This function can fail for any of the reasons that * g_file_set_contents() may fail. diff --git a/generated/gtkd/glib/MainContext.d b/generated/gtkd/glib/MainContext.d index 0af3f30f7..98c59ddcd 100644 --- a/generated/gtkd/glib/MainContext.d +++ b/generated/gtkd/glib/MainContext.d @@ -93,6 +93,31 @@ public class MainContext this(cast(GMainContext*) __p); } + /** + * Creates a new #GMainContext structure. + * + * Params: + * flags = a bitwise-OR combination of #GMainContextFlags flags that can only be + * set at creation time. + * + * Returns: the new #GMainContext + * + * Since: 2.72 + * + * Throws: ConstructionException GTK+ fails to create the object. + */ + public this(GMainContextFlags flags) + { + auto __p = g_main_context_new_with_flags(flags); + + if(__p is null) + { + throw new ConstructionException("null returned by new_with_flags"); + } + + this(cast(GMainContext*) __p); + } + /** * Tries to become the owner of the specified context. * If some other thread is the owner of the context, @@ -131,7 +156,10 @@ public class MainContext } /** - * Passes the results of polling back to the main loop. + * Passes the results of polling back to the main loop. You should be + * careful to pass @fds and its length @n_fds as received from + * g_main_context_query(), as this functions relies on assumptions + * on how @fds is filled. * * You must have successfully acquired the context with * g_main_context_acquire() before you may call this function. @@ -260,7 +288,7 @@ public class MainContext * * In any other case, an idle source is created to call @function and * that source is attached to @context (presumably to be run in another - * thread). The idle source is attached with #G_PRIORITY_DEFAULT + * thread). The idle source is attached with %G_PRIORITY_DEFAULT * priority. If you want a different priority, use * g_main_context_invoke_full(). * @@ -430,7 +458,10 @@ public class MainContext } /** - * Determines information necessary to poll this main loop. + * Determines information necessary to poll this main loop. You should + * be careful to pass the resulting @fds array and its length @n_fds + * as is when calling g_main_context_check(), as this function relies + * on assumptions made when the array is filled. * * You must have successfully acquired the context with * g_main_context_acquire() before you may call this function. @@ -553,7 +584,7 @@ public class MainContext * * |[ * #define NUM_TASKS 10 - * static volatile gint tasks_remaining = NUM_TASKS; + * static gint tasks_remaining = NUM_TASKS; // (atomic) * ... * * while (g_atomic_int_get (&tasks_remaining) != 0) diff --git a/generated/gtkd/glib/MappedFile.d b/generated/gtkd/glib/MappedFile.d index fd8d7ff69..d4fddfcaa 100644 --- a/generated/gtkd/glib/MappedFile.d +++ b/generated/gtkd/glib/MappedFile.d @@ -92,7 +92,7 @@ public class MappedFile * If @filename is the name of an empty, regular file, the function * will successfully return an empty #GMappedFile. In other cases of * size 0 (e.g. device files such as /dev/null), @error will be set - * to the #GFileError value #G_FILE_ERROR_INVAL. + * to the #GFileError value %G_FILE_ERROR_INVAL. * * Params: * filename = The path of the file to load, in the GLib diff --git a/generated/gtkd/glib/MatchInfo.d b/generated/gtkd/glib/MatchInfo.d index a24f58c4f..d4a78d8bb 100644 --- a/generated/gtkd/glib/MatchInfo.d +++ b/generated/gtkd/glib/MatchInfo.d @@ -80,7 +80,7 @@ public class MatchInfo * match done with @string against @regex and have the same syntax used by * g_regex_replace(). * - * The @string_to_expand must be UTF-8 encoded even if #G_REGEX_RAW was + * The @string_to_expand must be UTF-8 encoded even if %G_REGEX_RAW was * passed to g_regex_new(). * * The backreferences are extracted from the string passed to the match @@ -348,19 +348,19 @@ public class MatchInfo * able to raise an error as soon as a mistake is made. * * GRegex supports the concept of partial matching by means of the - * #G_REGEX_MATCH_PARTIAL_SOFT and #G_REGEX_MATCH_PARTIAL_HARD flags. + * %G_REGEX_MATCH_PARTIAL_SOFT and %G_REGEX_MATCH_PARTIAL_HARD flags. * When they are used, the return code for * g_regex_match() or g_regex_match_full() is, as usual, %TRUE * for a complete match, %FALSE otherwise. But, when these functions * return %FALSE, you can check if the match was partial calling * g_match_info_is_partial_match(). * - * The difference between #G_REGEX_MATCH_PARTIAL_SOFT and - * #G_REGEX_MATCH_PARTIAL_HARD is that when a partial match is encountered - * with #G_REGEX_MATCH_PARTIAL_SOFT, matching continues to search for a - * possible complete match, while with #G_REGEX_MATCH_PARTIAL_HARD matching + * The difference between %G_REGEX_MATCH_PARTIAL_SOFT and + * %G_REGEX_MATCH_PARTIAL_HARD is that when a partial match is encountered + * with %G_REGEX_MATCH_PARTIAL_SOFT, matching continues to search for a + * possible complete match, while with %G_REGEX_MATCH_PARTIAL_HARD matching * stops at the partial match. - * When both #G_REGEX_MATCH_PARTIAL_SOFT and #G_REGEX_MATCH_PARTIAL_HARD + * When both %G_REGEX_MATCH_PARTIAL_SOFT and %G_REGEX_MATCH_PARTIAL_HARD * are set, the latter takes precedence. * * There were formerly some restrictions on the pattern for partial matching. diff --git a/generated/gtkd/glib/Memory.d b/generated/gtkd/glib/Memory.d index d2d7df9bc..16a6806da 100644 --- a/generated/gtkd/glib/Memory.d +++ b/generated/gtkd/glib/Memory.d @@ -187,6 +187,10 @@ public struct Memory * Allocates @byte_size bytes of memory, and copies @byte_size bytes into it * from @mem. If @mem is %NULL it returns %NULL. * + * Deprecated: Use g_memdup2() instead, as it accepts a #gsize argument + * for @byte_size, avoiding the possibility of overflow in a #gsize → #guint + * conversion + * * Params: * mem = the memory to copy. * byteSize = the number of bytes to copy. diff --git a/generated/gtkd/glib/MemorySlice.d b/generated/gtkd/glib/MemorySlice.d index 02aaa03b3..944bb4308 100644 --- a/generated/gtkd/glib/MemorySlice.d +++ b/generated/gtkd/glib/MemorySlice.d @@ -64,11 +64,13 @@ public void sliceFree(T)(T* memBlock) /** * Allocates a block of memory from the slice allocator. + * * The block address handed out can be expected to be aligned - * to at least 1 * sizeof (void*), - * though in general slices are 2 * sizeof (void*) bytes aligned, - * if a malloc() fallback implementation is used instead, - * the alignment may be reduced in a libc dependent fashion. + * to at least `1 * sizeof (void*)`, though in general slices + * are `2 * sizeof (void*)` bytes aligned; if a `malloc()` + * fallback implementation is used instead, the alignment may + * be reduced in a libc dependent fashion. + * * Note that the underlying slice allocation mechanism can * be changed with the [`G_SLICE=always-malloc`][G_SLICE] * environment variable. @@ -76,8 +78,8 @@ public void sliceFree(T)(T* memBlock) * Params: * blockSize = the number of bytes to allocate * - * Returns: a pointer to the allocated memory block, which will be %NULL if and - * only if @mem_size is 0 + * Returns: a pointer to the allocated memory block, which will + * be %NULL if and only if @mem_size is 0 * * Since: 2.10 */ diff --git a/generated/gtkd/glib/MessageLog.d b/generated/gtkd/glib/MessageLog.d index 92f07739e..b7490ceb3 100644 --- a/generated/gtkd/glib/MessageLog.d +++ b/generated/gtkd/glib/MessageLog.d @@ -48,7 +48,7 @@ public struct MessageLog * * - `G_MESSAGES_PREFIXED`: A :-separated list of log levels for which * messages should be prefixed by the program name and PID of the - * aplication. + * application. * * - `G_MESSAGES_DEBUG`: A space-separated list of log domains for * which debug and informational messages are printed. By default @@ -56,7 +56,8 @@ public struct MessageLog * * stderr is used for levels %G_LOG_LEVEL_ERROR, %G_LOG_LEVEL_CRITICAL, * %G_LOG_LEVEL_WARNING and %G_LOG_LEVEL_MESSAGE. stdout is used for - * the rest. + * the rest, unless stderr was requested by + * g_log_writer_default_set_use_stderr(). * * This has no effect if structured logging is enabled; see * [Using Structured Logging][using-structured-logging]. @@ -168,31 +169,35 @@ public struct MessageLog /** * Sets the log handler for a domain and a set of log levels. + * * To handle fatal and recursive messages the @log_levels parameter - * must be combined with the #G_LOG_FLAG_FATAL and #G_LOG_FLAG_RECURSION + * must be combined with the %G_LOG_FLAG_FATAL and %G_LOG_FLAG_RECURSION * bit flags. * - * Note that since the #G_LOG_LEVEL_ERROR log level is always fatal, if + * Note that since the %G_LOG_LEVEL_ERROR log level is always fatal, if * you want to set a handler for this log level you must combine it with - * #G_LOG_FLAG_FATAL. + * %G_LOG_FLAG_FATAL. * * This has no effect if structured logging is enabled; see * [Using Structured Logging][using-structured-logging]. * * Here is an example for adding a log handler for all warning messages * in the default domain: + * * |[ * g_log_set_handler (NULL, G_LOG_LEVEL_WARNING | G_LOG_FLAG_FATAL * | G_LOG_FLAG_RECURSION, my_log_handler, NULL); * ]| * * This example adds a log handler for all critical messages from GTK+: + * * |[ * g_log_set_handler ("Gtk", G_LOG_LEVEL_CRITICAL | G_LOG_FLAG_FATAL * | G_LOG_FLAG_RECURSION, my_log_handler, NULL); * ]| * * This example adds a log handler for all messages from GLib: + * * |[ * g_log_set_handler ("GLib", G_LOG_LEVEL_MASK | G_LOG_FLAG_FATAL * | G_LOG_FLAG_RECURSION, my_log_handler, NULL); @@ -203,8 +208,8 @@ public struct MessageLog * application domain * logLevels = the log levels to apply the log handler for. * To handle fatal and recursive messages as well, combine - * the log levels with the #G_LOG_FLAG_FATAL and - * #G_LOG_FLAG_RECURSION bit flags. + * the log levels with the %G_LOG_FLAG_FATAL and + * %G_LOG_FLAG_RECURSION bit flags. * logFunc = the log handler function * userData = data passed to the log handler * @@ -226,8 +231,8 @@ public struct MessageLog * application domain * logLevels = the log levels to apply the log handler for. * To handle fatal and recursive messages as well, combine - * the log levels with the #G_LOG_FLAG_FATAL and - * #G_LOG_FLAG_RECURSION bit flags. + * the log levels with the %G_LOG_FLAG_FATAL and + * %G_LOG_FLAG_RECURSION bit flags. * logFunc = the log handler function * userData = data passed to the log handler * destroy = destroy notify for @user_data, or %NULL diff --git a/generated/gtkd/glib/Module.d b/generated/gtkd/glib/Module.d index a9bbbf9da..6d06f7d72 100644 --- a/generated/gtkd/glib/Module.d +++ b/generated/gtkd/glib/Module.d @@ -24,6 +24,8 @@ module glib.Module; +private import glib.ErrorG; +private import glib.GException; private import glib.Str; private import glib.c.functions; public import glib.c.types; @@ -98,7 +100,7 @@ public class Module /** * Gets a symbol pointer from a module, such as one exported - * by #G_MODULE_EXPORT. Note that a valid symbol can be %NULL. + * by %G_MODULE_EXPORT. Note that a valid symbol can be %NULL. * * Params: * symbolName = the name of the symbol to find @@ -153,17 +155,46 @@ public class Module return Str.toString(g_module_error()); } + /** */ + public static GQuark errorQuark() + { + return g_module_error_quark(); + } + + /** + * A thin wrapper function around g_module_open_full() + * + * Params: + * fileName = the name of the file containing the module, or %NULL + * to obtain a #GModule representing the main program itself + * flags = the flags used for opening the module. This can be the + * logical OR of any of the #GModuleFlags. + * + * Returns: a #GModule on success, or %NULL on failure + */ + public static Module open(string fileName, GModuleFlags flags) + { + auto __p = g_module_open(Str.toStringz(fileName), flags); + + if(__p is null) + { + return null; + } + + return new Module(cast(GModule*) __p); + } + /** * Opens a module. If the module has already been opened, * its reference count is incremented. * - * First of all g_module_open() tries to open @file_name as a module. + * First of all g_module_open_full() tries to open @file_name as a module. * If that fails and @file_name has the ".la"-suffix (and is a libtool * archive) it tries to open the corresponding module. If that fails * and it doesn't have the proper module suffix for the platform - * (#G_MODULE_SUFFIX), this suffix will be appended and the corresponding + * (%G_MODULE_SUFFIX), this suffix will be appended and the corresponding * module will be opened. If that fails and @file_name doesn't have the - * ".la"-suffix, this suffix is appended and g_module_open() tries to open + * ".la"-suffix, this suffix is appended and g_module_open_full() tries to open * the corresponding module. If eventually that fails as well, %NULL is * returned. * @@ -174,10 +205,21 @@ public class Module * logical OR of any of the #GModuleFlags * * Returns: a #GModule on success, or %NULL on failure + * + * Since: 2.70 + * + * Throws: GException on failure. */ - public static Module open(string fileName, GModuleFlags flags) + public static Module openFull(string fileName, GModuleFlags flags) { - auto __p = g_module_open(Str.toStringz(fileName), flags); + GError* err = null; + + auto __p = g_module_open_full(Str.toStringz(fileName), flags, &err); + + if (err !is null) + { + throw new GException( new ErrorG(err) ); + } if(__p is null) { diff --git a/generated/gtkd/glib/Once.d b/generated/gtkd/glib/Once.d index 2e4f431f0..4321dcbe3 100644 --- a/generated/gtkd/glib/Once.d +++ b/generated/gtkd/glib/Once.d @@ -133,6 +133,9 @@ public final class Once * // use initialization_value here * ]| * + * While @location has a `volatile` qualifier, this is a historical artifact and + * the pointer passed to it should not be `volatile`. + * * Params: * location = location of a static initializable variable * containing 0 @@ -154,6 +157,9 @@ public final class Once * releases concurrent threads blocking in g_once_init_enter() on this * initialization variable. * + * While @location has a `volatile` qualifier, this is a historical artifact and + * the pointer passed to it should not be `volatile`. + * * Params: * location = location of a static initializable variable * containing 0 diff --git a/generated/gtkd/glib/OptionContext.d b/generated/gtkd/glib/OptionContext.d index 4ee6d5fcb..9050715a6 100644 --- a/generated/gtkd/glib/OptionContext.d +++ b/generated/gtkd/glib/OptionContext.d @@ -502,7 +502,7 @@ public class OptionContext * The @parameter_string can serve multiple purposes. It can be used * to add descriptions for "rest" arguments, which are not parsed by * the #GOptionContext, typically something like "FILES" or - * "FILE1 FILE2...". If you are using #G_OPTION_REMAINING for + * "FILE1 FILE2...". If you are using %G_OPTION_REMAINING for * collecting "rest" arguments, GLib handles this automatically by * using the @arg_description of the corresponding #GOptionEntry in * the usage summary. diff --git a/generated/gtkd/glib/Pattern.d b/generated/gtkd/glib/Pattern.d index 3313fc6d2..cfa4f2d83 100644 --- a/generated/gtkd/glib/Pattern.d +++ b/generated/gtkd/glib/Pattern.d @@ -72,6 +72,47 @@ public class Pattern } + /** + * Compiles a pattern to a #GPatternSpec. + * + * Params: + * pattern = a zero-terminated UTF-8 encoded string + * + * Returns: a newly-allocated #GPatternSpec + * + * Throws: ConstructionException GTK+ fails to create the object. + */ + public this(string pattern) + { + auto __p = g_pattern_spec_new(Str.toStringz(pattern)); + + if(__p is null) + { + throw new ConstructionException("null returned by new"); + } + + this(cast(GPatternSpec*) __p); + } + + /** + * Copies @pspec in a new #GPatternSpec. + * + * Returns: a copy of @pspec. + * + * Since: 2.70 + */ + public Pattern copy() + { + auto __p = g_pattern_spec_copy(gPatternSpec); + + if(__p is null) + { + return null; + } + + return new Pattern(cast(GPatternSpec*) __p, true); + } + /** * Compares two compiled pattern specs and returns whether they will * match the same set of strings. @@ -96,25 +137,54 @@ public class Pattern } /** - * Compiles a pattern to a #GPatternSpec. + * Matches a string against a compiled pattern. Passing the correct + * length of the string given is mandatory. The reversed string can be + * omitted by passing %NULL, this is more efficient if the reversed + * version of the string to be matched is not at hand, as + * g_pattern_match() will only construct it if the compiled pattern + * requires reverse matches. + * + * Note that, if the user code will (possibly) match a string against a + * multitude of patterns containing wildcards, chances are high that + * some patterns will require a reversed string. In this case, it's + * more efficient to provide the reversed string to avoid multiple + * constructions thereof in the various calls to g_pattern_match(). + * + * Note also that the reverse of a UTF-8 encoded string can in general + * not be obtained by g_strreverse(). This works only if the string + * does not contain any multibyte characters. GLib offers the + * g_utf8_strreverse() function to reverse UTF-8 encoded strings. * * Params: - * pattern = a zero-terminated UTF-8 encoded string + * stringLength = the length of @string (in bytes, i.e. strlen(), + * not g_utf8_strlen()) + * string_ = the UTF-8 encoded string to match + * stringReversed = the reverse of @string or %NULL * - * Returns: a newly-allocated #GPatternSpec + * Returns: %TRUE if @string matches @pspec * - * Throws: ConstructionException GTK+ fails to create the object. + * Since: 2.70 */ - public this(string pattern) + public bool match(size_t stringLength, string string_, string stringReversed) { - auto __p = g_pattern_spec_new(Str.toStringz(pattern)); - - if(__p is null) - { - throw new ConstructionException("null returned by new"); - } + return g_pattern_spec_match(gPatternSpec, stringLength, Str.toStringz(string_), Str.toStringz(stringReversed)) != 0; + } - this(cast(GPatternSpec*) __p); + /** + * Matches a string against a compiled pattern. If the string is to be + * matched against more than one pattern, consider using + * g_pattern_match() instead while supplying the reversed string. + * + * Params: + * string_ = the UTF-8 encoded string to match + * + * Returns: %TRUE if @string matches @pspec + * + * Since: 2.70 + */ + public bool matchString(string string_) + { + return g_pattern_spec_match_string(gPatternSpec, Str.toStringz(string_)) != 0; } /** @@ -136,6 +206,8 @@ public class Pattern * does not contain any multibyte characters. GLib offers the * g_utf8_strreverse() function to reverse UTF-8 encoded strings. * + * Deprecated: Use g_pattern_spec_match() instead + * * Params: * pspec = a #GPatternSpec * stringLength = the length of @string (in bytes, i.e. strlen(), @@ -172,6 +244,8 @@ public class Pattern * matched against more than one pattern, consider using * g_pattern_match() instead while supplying the reversed string. * + * Deprecated: Use g_pattern_spec_match_string() instead + * * Params: * pspec = a #GPatternSpec * string_ = the UTF-8 encoded string to match diff --git a/generated/gtkd/glib/PtrArray.d b/generated/gtkd/glib/PtrArray.d index de9b51029..a43096432 100644 --- a/generated/gtkd/glib/PtrArray.d +++ b/generated/gtkd/glib/PtrArray.d @@ -263,8 +263,8 @@ public class PtrArray * Params: * freeSeg = if %TRUE the actual pointer array is freed as well * - * Returns: the pointer array if @free_seg is %FALSE, otherwise %NULL. - * The pointer array should be freed using g_free(). + * Returns: the pointer array if @free_seg is + * %FALSE, otherwise %NULL. The pointer array should be freed using g_free(). */ public void** free(bool freeSeg) { diff --git a/generated/gtkd/glib/QueueG.d b/generated/gtkd/glib/QueueG.d index 1136216b8..692495e71 100644 --- a/generated/gtkd/glib/QueueG.d +++ b/generated/gtkd/glib/QueueG.d @@ -264,7 +264,7 @@ public class QueueG /** * A statically-allocated #GQueue must be initialized with this function * before it can be used. Alternatively you can initialize it with - * #G_QUEUE_INIT. It is not necessary to initialize queues created with + * %G_QUEUE_INIT. It is not necessary to initialize queues created with * g_queue_new(). * * Since: 2.14 diff --git a/generated/gtkd/glib/RWLock.d b/generated/gtkd/glib/RWLock.d index c253e152e..efb93827b 100644 --- a/generated/gtkd/glib/RWLock.d +++ b/generated/gtkd/glib/RWLock.d @@ -177,13 +177,19 @@ public class RWLock /** * Obtain a read lock on @rw_lock. If another thread currently holds - * the write lock on @rw_lock, the current thread will block. If another thread - * does not hold the write lock, but is waiting for it, it is implementation - * defined whether the reader or writer will block. Read locks can be taken + * the write lock on @rw_lock, the current thread will block until the + * write lock was (held and) released. If another thread does not hold + * the write lock, but is waiting for it, it is implementation defined + * whether the reader or writer will block. Read locks can be taken * recursively. * - * It is implementation-defined how many threads are allowed to - * hold read locks on the same lock simultaneously. If the limit is hit, + * Calling g_rw_lock_reader_lock() while the current thread already + * owns a write lock leads to undefined behaviour. Read locks however + * can be taken recursively, in which case you need to make sure to + * call g_rw_lock_reader_unlock() the same amount of times. + * + * It is implementation-defined how many read locks are allowed to be + * held on the same lock simultaneously. If the limit is hit, * or if a deadlock is detected, a critical warning will be emitted. * * Since: 2.32 @@ -221,10 +227,13 @@ public class RWLock } /** - * Obtain a write lock on @rw_lock. If any thread already holds + * Obtain a write lock on @rw_lock. If another thread currently holds * a read or write lock on @rw_lock, the current thread will block * until all other threads have dropped their locks on @rw_lock. * + * Calling g_rw_lock_writer_lock() while the current thread already + * owns a read or write lock on @rw_lock leads to undefined behaviour. + * * Since: 2.32 */ public void writerLock() @@ -233,8 +242,9 @@ public class RWLock } /** - * Tries to obtain a write lock on @rw_lock. If any other thread holds - * a read or write lock on @rw_lock, it immediately returns %FALSE. + * Tries to obtain a write lock on @rw_lock. If another thread + * currently holds a read or write lock on @rw_lock, it immediately + * returns %FALSE. * Otherwise it locks @rw_lock and returns %TRUE. * * Returns: %TRUE if @rw_lock could be locked diff --git a/generated/gtkd/glib/Regex.d b/generated/gtkd/glib/Regex.d index 17b318620..06e1f3359 100644 --- a/generated/gtkd/glib/Regex.d +++ b/generated/gtkd/glib/Regex.d @@ -41,7 +41,7 @@ private import gtkd.Loader; * Perl regular expression. * * Some functions accept a @start_position argument, setting it differs - * from just passing over a shortened string and setting #G_REGEX_MATCH_NOTBOL + * from just passing over a shortened string and setting %G_REGEX_MATCH_NOTBOL * in the case of a pattern that begins with any kind of lookbehind assertion. * For example, consider the pattern "\Biss\B" which finds occurrences of "iss" * in the middle of words. ("\B" matches only if the current position in the @@ -53,11 +53,11 @@ private import gtkd.Loader; * it is able to look behind the starting point to discover that it is * preceded by a letter. * - * Note that, unless you set the #G_REGEX_RAW flag, all the strings passed + * Note that, unless you set the %G_REGEX_RAW flag, all the strings passed * to these functions must be encoded in UTF-8. The lengths and the positions * inside the strings are in bytes and not in characters, so, for instance, * "\xc3\xa0" (i.e. "à") is two bytes long but it is treated as a - * single character. If you set #G_REGEX_RAW the strings can be non-valid + * single character. If you set %G_REGEX_RAW the strings can be non-valid * UTF-8 strings and a byte is treated as a character, so "\xc3\xa0" is two * bytes and two characters long. * @@ -72,11 +72,11 @@ private import gtkd.Loader; * The behaviour of the dot, circumflex, and dollar metacharacters are * affected by newline characters, the default is to recognize any newline * character (the same characters recognized by "\R"). This can be changed - * with #G_REGEX_NEWLINE_CR, #G_REGEX_NEWLINE_LF and #G_REGEX_NEWLINE_CRLF - * compile options, and with #G_REGEX_MATCH_NEWLINE_ANY, - * #G_REGEX_MATCH_NEWLINE_CR, #G_REGEX_MATCH_NEWLINE_LF and - * #G_REGEX_MATCH_NEWLINE_CRLF match options. These settings are also - * relevant when compiling a pattern if #G_REGEX_EXTENDED is set, and an + * with %G_REGEX_NEWLINE_CR, %G_REGEX_NEWLINE_LF and %G_REGEX_NEWLINE_CRLF + * compile options, and with %G_REGEX_MATCH_NEWLINE_ANY, + * %G_REGEX_MATCH_NEWLINE_CR, %G_REGEX_MATCH_NEWLINE_LF and + * %G_REGEX_MATCH_NEWLINE_CRLF match options. These settings are also + * relevant when compiling a pattern if %G_REGEX_EXTENDED is set, and an * unescaped "#" outside a character class is encountered. This indicates * a comment that lasts until after the next newline. * @@ -149,7 +149,7 @@ public class Regex * compileOptions = compile options for the regular expression, or 0 * matchOptions = match options for the regular expression, or 0 * - * Returns: a #GRegex structure or %NULL if an error occured. Call + * Returns: a #GRegex structure or %NULL if an error occurred. Call * g_regex_unref() when you are done with it * * Since: 2.14 @@ -410,7 +410,7 @@ public class Regex * is not able to capture substrings, so backreferences do not work. * * Setting @start_position differs from just passing over a shortened - * string and setting #G_REGEX_MATCH_NOTBOL in the case of a pattern + * string and setting %G_REGEX_MATCH_NOTBOL in the case of a pattern * that begins with any kind of lookbehind assertion, such as "\b". * * Unless %G_REGEX_RAW is specified in the options, @string must be valid UTF-8. @@ -462,7 +462,7 @@ public class Regex * flexibility in reusing #GRegex structures. * * Setting @start_position differs from just passing over a shortened - * string and setting #G_REGEX_MATCH_NOTBOL in the case of a pattern + * string and setting %G_REGEX_MATCH_NOTBOL in the case of a pattern * that begins with any kind of lookbehind assertion, such as "\b". * * Unless %G_REGEX_RAW is specified in the options, @string must be valid UTF-8. @@ -578,12 +578,12 @@ public class Regex * * If you do not need to use backreferences use g_regex_replace_literal(). * - * The @replacement string must be UTF-8 encoded even if #G_REGEX_RAW was - * passed to g_regex_new(). If you want to use not UTF-8 encoded stings + * The @replacement string must be UTF-8 encoded even if %G_REGEX_RAW was + * passed to g_regex_new(). If you want to use not UTF-8 encoded strings * you can use g_regex_replace_literal(). * * Setting @start_position differs from just passing over a shortened - * string and setting #G_REGEX_MATCH_NOTBOL in the case of a pattern that + * string and setting %G_REGEX_MATCH_NOTBOL in the case of a pattern that * begins with any kind of lookbehind assertion, such as "\b". * * Params: @@ -618,7 +618,7 @@ public class Regex * @eval for that occurrence. * * Setting @start_position differs from just passing over a shortened - * string and setting #G_REGEX_MATCH_NOTBOL in the case of a pattern + * string and setting %G_REGEX_MATCH_NOTBOL in the case of a pattern * that begins with any kind of lookbehind assertion, such as "\b". * * The following example uses g_regex_replace_eval() to replace multiple @@ -694,7 +694,7 @@ public class Regex * include backreferences use g_regex_replace(). * * Setting @start_position differs from just passing over a - * shortened string and setting #G_REGEX_MATCH_NOTBOL in the + * shortened string and setting %G_REGEX_MATCH_NOTBOL in the * case of a pattern that begins with any kind of lookbehind * assertion, such as "\b". * @@ -781,7 +781,7 @@ public class Regex * "a", "b" and "c". * * Setting @start_position differs from just passing over a shortened - * string and setting #G_REGEX_MATCH_NOTBOL in the case of a pattern + * string and setting %G_REGEX_MATCH_NOTBOL in the case of a pattern * that begins with any kind of lookbehind assertion, such as "\b". * * Params: diff --git a/generated/gtkd/glib/Sequence.d b/generated/gtkd/glib/Sequence.d index e5d623582..ac54c14c1 100644 --- a/generated/gtkd/glib/Sequence.d +++ b/generated/gtkd/glib/Sequence.d @@ -185,9 +185,9 @@ public class Sequence } /** - * Returns the length of @seq. Note that this method is O(h) where `h' is the - * height of the tree. It is thus more efficient to use g_sequence_is_empty() - * when comparing the length to zero. + * Returns the positive length (>= 0) of @seq. Note that this method is + * O(h) where `h' is the height of the tree. It is thus more efficient + * to use g_sequence_is_empty() when comparing the length to zero. * * Returns: the length of @seq * diff --git a/generated/gtkd/glib/ShellUtils.d b/generated/gtkd/glib/ShellUtils.d index bc17d2536..6e4a4acaf 100644 --- a/generated/gtkd/glib/ShellUtils.d +++ b/generated/gtkd/glib/ShellUtils.d @@ -46,12 +46,21 @@ public struct ShellUtils * Parses a command line into an argument vector, in much the same way * the shell would, but without many of the expansions the shell would * perform (variable expansion, globs, operators, filename expansion, - * etc. are not supported). The results are defined to be the same as - * those you would get from a UNIX98 /bin/sh, as long as the input - * contains none of the unsupported shell expansions. If the input - * does contain such expansions, they are passed through - * literally. Possible errors are those from the #G_SHELL_ERROR - * domain. Free the returned vector with g_strfreev(). + * etc. are not supported). + * + * The results are defined to be the same as those you would get from + * a UNIX98 `/bin/sh`, as long as the input contains none of the + * unsupported shell expansions. If the input does contain such expansions, + * they are passed through literally. + * + * Possible errors are those from the %G_SHELL_ERROR domain. + * + * In particular, if @command_line is an empty string (or a string containing + * only whitespace), %G_SHELL_ERROR_EMPTY_STRING will be returned. It’s + * guaranteed that @argvp will be a non-empty array if this function returns + * successfully. + * + * Free the returned vector with g_strfreev(). * * Params: * commandLine = command line to parse @@ -81,10 +90,14 @@ public struct ShellUtils /** * Quotes a string so that the shell (/bin/sh) will interpret the - * quoted string to mean @unquoted_string. If you pass a filename to - * the shell, for example, you should first quote it with this - * function. The return value must be freed with g_free(). The - * quoting style used is undefined (single or double quotes may be + * quoted string to mean @unquoted_string. + * + * If you pass a filename to the shell, for example, you should first + * quote it with this function. + * + * The return value must be freed with g_free(). + * + * The quoting style used is undefined (single or double quotes may be * used). * * Params: @@ -101,27 +114,33 @@ public struct ShellUtils } /** - * Unquotes a string as the shell (/bin/sh) would. Only handles - * quotes; if a string contains file globs, arithmetic operators, - * variables, backticks, redirections, or other special-to-the-shell - * features, the result will be different from the result a real shell - * would produce (the variables, backticks, etc. will be passed - * through literally instead of being expanded). This function is - * guaranteed to succeed if applied to the result of + * Unquotes a string as the shell (/bin/sh) would. + * + * This function only handles quotes; if a string contains file globs, + * arithmetic operators, variables, backticks, redirections, or other + * special-to-the-shell features, the result will be different from the + * result a real shell would produce (the variables, backticks, etc. + * will be passed through literally instead of being expanded). + * + * This function is guaranteed to succeed if applied to the result of * g_shell_quote(). If it fails, it returns %NULL and sets the - * error. The @quoted_string need not actually contain quoted or - * escaped text; g_shell_unquote() simply goes through the string and - * unquotes/unescapes anything that the shell would. Both single and - * double quotes are handled, as are escapes including escaped - * newlines. The return value must be freed with g_free(). Possible - * errors are in the #G_SHELL_ERROR domain. + * error. + * + * The @quoted_string need not actually contain quoted or escaped text; + * g_shell_unquote() simply goes through the string and unquotes/unescapes + * anything that the shell would. Both single and double quotes are + * handled, as are escapes including escaped newlines. + * + * The return value must be freed with g_free(). + * + * Possible errors are in the %G_SHELL_ERROR domain. * * Shell quoting rules are a bit strange. Single quotes preserve the * literal string exactly. escape sequences are not allowed; not even - * \' - if you want a ' in the quoted text, you have to do something - * like 'foo'\''bar'. Double quotes allow $, `, ", \, and newline to - * be escaped with backslash. Otherwise double quotes preserve things - * literally. + * `\'` - if you want a `'` in the quoted text, you have to do something + * like `'foo'\''bar'`. Double quotes allow `$`, ```, `"`, `\`, and + * newline to be escaped with backslash. Otherwise double quotes + * preserve things literally. * * Params: * quotedString = shell-quoted string diff --git a/generated/gtkd/glib/Source.d b/generated/gtkd/glib/Source.d index e55dade9e..aef5c770d 100644 --- a/generated/gtkd/glib/Source.d +++ b/generated/gtkd/glib/Source.d @@ -214,6 +214,10 @@ public class Source * * This function is safe to call from any thread, regardless of which thread * the #GMainContext is running in. + * + * If the source is currently attached to a #GMainContext, destroying it + * will effectively unset the callback similar to calling g_source_set_callback(). + * This can mean, that the data's #GDestroyNotify gets called right away. */ public void destroy() { @@ -357,10 +361,10 @@ public class Source * { * SomeWidget *self = data; * - * GDK_THREADS_ENTER (); + * g_mutex_lock (&self->idle_id_mutex); * // do stuff with self * self->idle_id = 0; - * GDK_THREADS_LEAVE (); + * g_mutex_unlock (&self->idle_id_mutex); * * return G_SOURCE_REMOVE; * } @@ -368,7 +372,17 @@ public class Source * static void * some_widget_do_stuff_later (SomeWidget *self) * { + * g_mutex_lock (&self->idle_id_mutex); * self->idle_id = g_idle_add (idle_callback, self); + * g_mutex_unlock (&self->idle_id_mutex); + * } + * + * static void + * some_widget_init (SomeWidget *self) + * { + * g_mutex_init (&self->idle_id_mutex); + * + * // ... * } * * static void @@ -379,6 +393,8 @@ public class Source * if (self->idle_id) * g_source_remove (self->idle_id); * + * g_mutex_clear (&self->idle_id_mutex); + * * G_OBJECT_CLASS (parent_class)->finalize (object); * } * ]| @@ -395,12 +411,12 @@ public class Source * { * SomeWidget *self = data; * - * GDK_THREADS_ENTER (); + * g_mutex_lock (&self->idle_id_mutex); * if (!g_source_is_destroyed (g_main_current_source ())) * { * // do stuff with self * } - * GDK_THREADS_LEAVE (); + * g_mutex_unlock (&self->idle_id_mutex); * * return FALSE; * } @@ -560,6 +576,9 @@ public class Source * been attached to a context. The changes will take effect for the next time * the source is dispatched after this call returns. * + * Note that g_source_destroy() for a currently attached source has the effect + * of also unsetting the callback. + * * Params: * func = a callback function * data = the data to pass to callback function @@ -666,6 +685,8 @@ public class Source * the value, and changing the value will free it while the other thread * may be attempting to use it. * + * Also see g_source_set_static_name(). + * * Params: * name = debug name for the source * @@ -729,6 +750,21 @@ public class Source g_source_set_ready_time(gSource, readyTime); } + /** + * A variant of g_source_set_name() that does not + * duplicate the @name, and can only be used with + * string literals. + * + * Params: + * name = debug name for the source + * + * Since: 2.70 + */ + public void setStaticName(string name) + { + g_source_set_static_name(gSource, Str.toStringz(name)); + } + /** * Decreases the reference count of a source by one. If the * resulting reference count is zero the source and associated @@ -763,7 +799,7 @@ public class Source * Params: * tag = the ID of the source to remove. * - * Returns: For historical reasons, this function always returns %TRUE + * Returns: %TRUE if the source was found and removed. */ public static bool remove(uint tag) { diff --git a/generated/gtkd/glib/Spawn.d b/generated/gtkd/glib/Spawn.d index b34ee7490..804d35842 100644 --- a/generated/gtkd/glib/Spawn.d +++ b/generated/gtkd/glib/Spawn.d @@ -341,13 +341,15 @@ public class Spawn */ /** + * Executes a child program asynchronously. + * * See g_spawn_async_with_pipes() for a full description; this function * simply calls the g_spawn_async_with_pipes() without any pipes. * * You should call g_spawn_close_pid() on the returned child process * reference when you don't need it any more. * - * If you are writing a GTK+ application, and the program you are spawning is a + * If you are writing a GTK application, and the program you are spawning is a * graphical application too, then to ensure that the spawned program opens its * windows on the right screen, you may want to use #GdkAppLaunchContext, * #GAppLaunchContext, or set the %DISPLAY environment variable. @@ -385,45 +387,19 @@ public class Spawn } /** - * Set @error if @exit_status indicates the child exited abnormally - * (e.g. with a nonzero exit code, or via a fatal signal). - * - * The g_spawn_sync() and g_child_watch_add() family of APIs return an - * exit status for subprocesses encoded in a platform-specific way. - * On Unix, this is guaranteed to be in the same format waitpid() returns, - * and on Windows it is guaranteed to be the result of GetExitCodeProcess(). - * - * Prior to the introduction of this function in GLib 2.34, interpreting - * @exit_status required use of platform-specific APIs, which is problematic - * for software using GLib as a cross-platform layer. - * - * Additionally, many programs simply want to determine whether or not - * the child exited successfully, and either propagate a #GError or - * print a message to standard error. In that common case, this function - * can be used. Note that the error message in @error will contain - * human-readable information about the exit status. - * - * The @domain and @code of @error have special semantics in the case - * where the process has an "exit code", as opposed to being killed by - * a signal. On Unix, this happens if WIFEXITED() would be true of - * @exit_status. On Windows, it is always the case. - * - * The special semantics are that the actual exit code will be the - * code set in @error, and the domain will be %G_SPAWN_EXIT_ERROR. - * This allows you to differentiate between different exit codes. - * - * If the process was terminated by some means other than an exit - * status, the domain will be %G_SPAWN_ERROR, and the code will be - * %G_SPAWN_ERROR_FAILED. - * - * This function just offers convenience; you can of course also check - * the available platform via a macro such as %G_OS_UNIX, and use - * WIFEXITED() and WEXITSTATUS() on @exit_status directly. Do not attempt - * to scan or parse the error message string; it may be translated and/or - * change in future versions of GLib. + * An old name for g_spawn_check_wait_status(), deprecated because its + * name is misleading. + * + * Despite the name of the function, @wait_status must be the wait status + * as returned by g_spawn_sync(), g_subprocess_get_status(), `waitpid()`, + * etc. On Unix platforms, it is incorrect for it to be the exit status + * as passed to `exit()` or returned by g_subprocess_get_exit_status() or + * `WEXITSTATUS()`. + * + * Deprecated: Use g_spawn_check_wait_status() instead, and check whether your code is conflating wait and exit statuses. * * Params: - * exitStatus = An exit code as returned from g_spawn_sync() + * waitStatus = A status as returned from g_spawn_sync() * * Returns: %TRUE if child exited successfully, %FALSE otherwise (and * @error will be set) @@ -432,11 +408,11 @@ public class Spawn * * Throws: GException on failure. */ - public static bool checkExitStatus(int exitStatus) + public static bool checkExitStatus(int waitStatus) { GError* err = null; - auto __p = g_spawn_check_exit_status(exitStatus, &err) != 0; + auto __p = g_spawn_check_exit_status(waitStatus, &err) != 0; if (err !is null) { @@ -462,8 +438,9 @@ public class Spawn /** * A simple version of g_spawn_async() that parses a command line with - * g_shell_parse_argv() and passes it to g_spawn_async(). Runs a - * command line in the background. Unlike g_spawn_async(), the + * g_shell_parse_argv() and passes it to g_spawn_async(). + * + * Runs a command line in the background. Unlike g_spawn_async(), the * %G_SPAWN_SEARCH_PATH flag is enabled, other flags are not. Note * that %G_SPAWN_SEARCH_PATH can have security implications, so * consider using g_spawn_async() directly if appropriate. Possible @@ -494,17 +471,24 @@ public class Spawn /** * A simple version of g_spawn_sync() with little-used parameters - * removed, taking a command line instead of an argument vector. See - * g_spawn_sync() for full details. @command_line will be parsed by - * g_shell_parse_argv(). Unlike g_spawn_sync(), the %G_SPAWN_SEARCH_PATH flag - * is enabled. Note that %G_SPAWN_SEARCH_PATH can have security - * implications, so consider using g_spawn_sync() directly if - * appropriate. Possible errors are those from g_spawn_sync() and those + * removed, taking a command line instead of an argument vector. + * + * See g_spawn_sync() for full details. + * + * The @command_line argument will be parsed by g_shell_parse_argv(). + * + * Unlike g_spawn_sync(), the %G_SPAWN_SEARCH_PATH flag is enabled. + * Note that %G_SPAWN_SEARCH_PATH can have security implications, so + * consider using g_spawn_sync() directly if appropriate. + * + * Possible errors are those from g_spawn_sync() and those * from g_shell_parse_argv(). * - * If @exit_status is non-%NULL, the platform-specific exit status of + * If @wait_status is non-%NULL, the platform-specific status of * the child is stored there; see the documentation of - * g_spawn_check_exit_status() for how to use and interpret this. + * g_spawn_check_wait_status() for how to use and interpret this. + * On Unix platforms, note that it is usually not equal + * to the integer passed to `exit()` or returned from `main()`. * * On Windows, please note the implications of g_shell_parse_argv() * parsing @command_line. Parsing is done according to Unix shell rules, not @@ -520,19 +504,19 @@ public class Spawn * commandLine = a command line * standardOutput = return location for child output * standardError = return location for child errors - * exitStatus = return location for child exit status, as returned by waitpid() + * waitStatus = return location for child wait status, as returned by waitpid() * * Returns: %TRUE on success, %FALSE if an error was set * * Throws: GException on failure. */ - public static bool commandLineSync(string commandLine, out string standardOutput, out string standardError, out int exitStatus) + public static bool commandLineSync(string commandLine, out string standardOutput, out string standardError, out int waitStatus) { char* outstandardOutput = null; char* outstandardError = null; GError* err = null; - auto __p = g_spawn_command_line_sync(Str.toStringz(commandLine), &outstandardOutput, &outstandardError, &exitStatus, &err) != 0; + auto __p = g_spawn_command_line_sync(Str.toStringz(commandLine), &outstandardOutput, &outstandardError, &waitStatus, &err) != 0; if (err !is null) { @@ -559,20 +543,24 @@ public class Spawn /** * Executes a child synchronously (waits for the child to exit before returning). + * * All output from the child is stored in @standard_output and @standard_error, * if those parameters are non-%NULL. Note that you must set the * %G_SPAWN_STDOUT_TO_DEV_NULL and %G_SPAWN_STDERR_TO_DEV_NULL flags when * passing %NULL for @standard_output and @standard_error. * - * If @exit_status is non-%NULL, the platform-specific exit status of + * If @wait_status is non-%NULL, the platform-specific status of * the child is stored there; see the documentation of - * g_spawn_check_exit_status() for how to use and interpret this. + * g_spawn_check_wait_status() for how to use and interpret this. + * On Unix platforms, note that it is usually not equal + * to the integer passed to `exit()` or returned from `main()`. + * * Note that it is invalid to pass %G_SPAWN_DO_NOT_REAP_CHILD in * @flags, and on POSIX platforms, the same restrictions as for * g_child_watch_source_new() apply. * * If an error occurs, no data is returned in @standard_output, - * @standard_error, or @exit_status. + * @standard_error, or @wait_status. * * This function calls g_spawn_async_with_pipes() internally; see that * function for full details on the other parameters and details on @@ -581,26 +569,26 @@ public class Spawn * Params: * workingDirectory = child's current working * directory, or %NULL to inherit parent's - * argv = child's argument vector + * argv = child's argument vector, which must be non-empty and %NULL-terminated * envp = child's environment, or %NULL to inherit parent's * flags = flags from #GSpawnFlags * childSetup = function to run in the child just before exec() * userData = user data for @child_setup * standardOutput = return location for child output, or %NULL * standardError = return location for child error messages, or %NULL - * exitStatus = return location for child exit status, as returned by waitpid(), or %NULL + * waitStatus = return location for child wait status, as returned by waitpid(), or %NULL * * Returns: %TRUE on success, %FALSE if an error was set * * Throws: GException on failure. */ - public static bool sync(string workingDirectory, string[] argv, string[] envp, GSpawnFlags flags, GSpawnChildSetupFunc childSetup, void* userData, out string standardOutput, out string standardError, out int exitStatus) + public static bool sync(string workingDirectory, string[] argv, string[] envp, GSpawnFlags flags, GSpawnChildSetupFunc childSetup, void* userData, out string standardOutput, out string standardError, out int waitStatus) { char* outstandardOutput = null; char* outstandardError = null; GError* err = null; - auto __p = g_spawn_sync(Str.toStringz(workingDirectory), Str.toStringzArray(argv), Str.toStringzArray(envp), flags, childSetup, userData, &outstandardOutput, &outstandardError, &exitStatus, &err) != 0; + auto __p = g_spawn_sync(Str.toStringz(workingDirectory), Str.toStringzArray(argv), Str.toStringzArray(envp), flags, childSetup, userData, &outstandardOutput, &outstandardError, &waitStatus, &err) != 0; if (err !is null) { @@ -614,36 +602,23 @@ public class Spawn } /** - * Identical to g_spawn_async_with_pipes() but instead of - * creating pipes for the stdin/stdout/stderr, you can pass existing - * file descriptors into this function through the @stdin_fd, - * @stdout_fd and @stderr_fd parameters. The following @flags - * also have their behaviour slightly tweaked as a result: - * - * %G_SPAWN_STDOUT_TO_DEV_NULL means that the child's standard output - * will be discarded, instead of going to the same location as the parent's - * standard output. If you use this flag, @standard_output must be -1. - * %G_SPAWN_STDERR_TO_DEV_NULL means that the child's standard error - * will be discarded, instead of going to the same location as the parent's - * standard error. If you use this flag, @standard_error must be -1. - * %G_SPAWN_CHILD_INHERITS_STDIN means that the child will inherit the parent's - * standard input (by default, the child's standard input is attached to - * /dev/null). If you use this flag, @standard_input must be -1. - * - * It is valid to pass the same fd in multiple parameters (e.g. you can pass - * a single fd for both stdout and stderr). + * Executes a child program asynchronously. + * + * Identical to g_spawn_async_with_pipes_and_fds() but with `n_fds` set to zero, + * so no FD assignments are used. * * Params: * workingDirectory = child's current working directory, or %NULL to inherit parent's, in the GLib file name encoding - * argv = child's argument vector, in the GLib file name encoding + * argv = child's argument vector, in the GLib file name encoding; + * it must be non-empty and %NULL-terminated * envp = child's environment, or %NULL to inherit parent's, in the GLib file name encoding * flags = flags from #GSpawnFlags * childSetup = function to run in the child just before exec() * userData = user data for @child_setup * childPid = return location for child process ID, or %NULL - * stdinFd = file descriptor to use for child's stdin, or -1 - * stdoutFd = file descriptor to use for child's stdout, or -1 - * stderrFd = file descriptor to use for child's stderr, or -1 + * stdinFd = file descriptor to use for child's stdin, or `-1` + * stdoutFd = file descriptor to use for child's stdout, or `-1` + * stderrFd = file descriptor to use for child's stderr, or `-1` * * Returns: %TRUE on success, %FALSE if an error was set * diff --git a/generated/gtkd/glib/Str.d b/generated/gtkd/glib/Str.d index 402b08f46..cb28663eb 100644 --- a/generated/gtkd/glib/Str.d +++ b/generated/gtkd/glib/Str.d @@ -214,7 +214,7 @@ public struct Str * the string back using g_ascii_strtod() gives the same machine-number * (on machines with IEEE compatible 64bit doubles). It is * guaranteed that the size of the resulting string will never - * be larger than @G_ASCII_DTOSTR_BUF_SIZE bytes, including the terminating + * be larger than %G_ASCII_DTOSTR_BUF_SIZE bytes, including the terminating * nul character, which is always added. * * Params: @@ -238,6 +238,9 @@ public struct Str * a printf()-style format string. Allowed conversion * specifiers are 'e', 'E', 'f', 'F', 'g' and 'G'. * + * The @format must just be a single format specifier + * starting with `%`, expecting a #gdouble argument. + * * The returned buffer is guaranteed to be nul-terminated. * * If you just want to want to serialize the value into a @@ -247,7 +250,7 @@ public struct Str * buffer = A buffer to place the resulting string in * bufLen = The length of the buffer. * format = The printf()-style format to use for the - * code to use for converting. + * code to use for converting * d = The #gdouble to convert * * Returns: The pointer to the buffer with the converted string. @@ -311,7 +314,9 @@ public struct Str /** * Compare @s1 and @s2, ignoring the case of ASCII characters and any - * characters after the first @n in each string. + * characters after the first @n in each string. If either string is + * less than @n bytes long, comparison will stop at the first nul byte + * encountered. * * Unlike the BSD strcasecmp() function, this only recognizes standard * ASCII letters and ignores the locale, treating all non-ASCII @@ -527,7 +532,7 @@ public struct Str } /** - * Determines the numeric value of a character as a hexidecimal + * Determines the numeric value of a character as a hexadecimal * digit. Differs from g_unichar_xdigit_value() because it takes * a char, so there's no worry about sign extension if characters * are signed. @@ -742,14 +747,17 @@ public struct Str /** * For each character in @string, if the character is not in @valid_chars, - * replaces the character with @substitutor. Modifies @string in place, - * and return @string itself, not a copy. The return value is to allow - * nesting such as + * replaces the character with @substitutor. + * + * Modifies @string in place, and return @string itself, not a copy. The + * return value is to allow nesting such as: + * * |[ * g_ascii_strup (g_strcanon (str, "abc", '?')) * ]| * - * In order to modify a copy, you may use `g_strdup()`: + * In order to modify a copy, you may use g_strdup(): + * * |[ * reformatted = g_strcanon (g_strdup (const_str), "abc", '?'); * ... @@ -761,7 +769,7 @@ public struct Str * validChars = bytes permitted in @string * substitutor = replacement character for disallowed bytes * - * Returns: @string + * Returns: the modified @string */ public static string strcanon(string string_, string validChars, char substitutor) { @@ -878,15 +886,19 @@ public struct Str /** * Converts any delimiter characters in @string to @new_delimiter. + * * Any characters in @string which are found in @delimiters are * changed to the @new_delimiter character. Modifies @string in place, - * and returns @string itself, not a copy. The return value is to - * allow nesting such as + * and returns @string itself, not a copy. + * + * The return value is to allow nesting such as: + * * |[ * g_ascii_strup (g_strdelimit (str, "abc", '?')) * ]| * - * In order to modify a copy, you may use `g_strdup()`: + * In order to modify a copy, you may use g_strdup(): + * * |[ * reformatted = g_strdelimit (g_strdup (const_str), "abc", '?'); * ... @@ -896,10 +908,10 @@ public struct Str * Params: * string_ = the string to convert * delimiters = a string containing the current delimiters, - * or %NULL to use the standard delimiters defined in #G_STR_DELIMITERS + * or %NULL to use the standard delimiters defined in %G_STR_DELIMITERS * newDelimiter = the new delimiter character * - * Returns: @string + * Returns: the modified @string */ public static string strdelimit(string string_, string delimiters, char newDelimiter) { @@ -1269,7 +1281,8 @@ public struct Str * * Params: * haystack = a nul-terminated string - * haystackLen = the maximum length of @haystack + * haystackLen = the maximum length of @haystack in bytes. A length of -1 + * can be used to mean "search the entire string", like g_strrstr(). * needle = the nul-terminated string to search for * * Returns: a pointer to the found occurrence, or @@ -1358,7 +1371,8 @@ public struct Str * Params: * string_ = The string to be tokenized * delimiters = A nul-terminated string containing bytes that are used - * to split the string. + * to split the string (it can accept an empty string, which will result + * in no string splitting). * maxTokens = The maximum number of tokens to split @string into. * If this is less than 1, the string is split completely * @@ -1378,10 +1392,9 @@ public struct Str * to @haystack_len. * * Params: - * haystack = a string - * haystackLen = the maximum length of @haystack. Note that -1 is - * a valid length, if @haystack is nul-terminated, meaning it will - * search through the whole string. + * haystack = a nul-terminated string + * haystackLen = the maximum length of @haystack in bytes. A length of -1 + * can be used to mean "search the entire string", like `strstr()`. * needle = the string to search for * * Returns: a pointer to the found occurrence, or @@ -1498,12 +1511,13 @@ public struct Str * `glib/gprintf.h` must be explicitly included in order to use this function. * * Params: - * string_ = the return location for the newly-allocated string. + * string_ = the return location for the newly-allocated string, + * which will be %NULL if (and only if) this function fails * format = a standard printf() format string, but notice * [string precision pitfalls][string-precision] * args = the list of arguments to insert in the output. * - * Returns: the number of bytes printed. + * Returns: the number of bytes printed, or `-1` on failure * * Since: 2.4 */ @@ -1556,7 +1570,7 @@ public struct Str * n = the maximum number of bytes to produce (including the * terminating nul character). * format = a standard printf() format string, but notice - * string precision pitfalls][string-precision] + * [string precision pitfalls][string-precision] * args = the list of arguments to insert in the output. * * Returns: the number of bytes which would be produced if the buffer diff --git a/generated/gtkd/glib/StringG.d b/generated/gtkd/glib/StringG.d index 104b99e57..8380c9a4d 100644 --- a/generated/gtkd/glib/StringG.d +++ b/generated/gtkd/glib/StringG.d @@ -25,6 +25,7 @@ module glib.StringG; private import glib.Bytes; +private import glib.ConstructionException; private import glib.Str; private import glib.c.functions; public import glib.c.types; @@ -64,6 +65,83 @@ public class StringG } + /** + * Creates a new #GString, initialized with the given string. + * + * Params: + * init = the initial text to copy into the string, or %NULL to + * start with an empty string + * + * Returns: the new #GString + * + * Throws: ConstructionException GTK+ fails to create the object. + */ + public this(string init) + { + auto __p = g_string_new(Str.toStringz(init)); + + if(__p is null) + { + throw new ConstructionException("null returned by new"); + } + + this(cast(GString*) __p); + } + + /** + * Creates a new #GString with @len bytes of the @init buffer. + * Because a length is provided, @init need not be nul-terminated, + * and can contain embedded nul bytes. + * + * Since this function does not stop at nul bytes, it is the caller's + * responsibility to ensure that @init has at least @len addressable + * bytes. + * + * Params: + * init = initial contents of the string + * len = length of @init to use + * + * Returns: a new #GString + * + * Throws: ConstructionException GTK+ fails to create the object. + */ + public this(string init, ptrdiff_t len) + { + auto __p = g_string_new_len(Str.toStringz(init), len); + + if(__p is null) + { + throw new ConstructionException("null returned by new_len"); + } + + this(cast(GString*) __p); + } + + /** + * Creates a new #GString, with enough space for @dfl_size + * bytes. This is useful if you are going to add a lot of + * text to the string and don't want it to be reallocated + * too often. + * + * Params: + * dflSize = the default size of the space allocated to hold the string + * + * Returns: the new #GString + * + * Throws: ConstructionException GTK+ fails to create the object. + */ + public this(size_t dflSize) + { + auto __p = g_string_sized_new(dflSize); + + if(__p is null) + { + throw new ConstructionException("null returned by sized_new"); + } + + this(cast(GString*) __p); + } + /** * Adds a string onto the end of a #GString, expanding * it if necessary. @@ -157,7 +235,7 @@ public class StringG } /** - * Appends @unescaped to @string, escaped any characters that + * Appends @unescaped to @string, escaping any characters that * are reserved in URIs using URI-style escape sequences. * * Params: @@ -613,6 +691,32 @@ public class StringG return new StringG(cast(GString*) __p); } + /** + * Replaces the string @find with the string @replace in a #GString up to + * @limit times. If the number of instances of @find in the #GString is + * less than @limit, all instances are replaced. If @limit is `0`, + * all instances of @find are replaced. + * + * If @find is the empty string, since versions 2.69.1 and 2.68.4 the + * replacement will be inserted no more than once per possible position + * (beginning of string, end of string and between characters). This did + * not work correctly in earlier versions. + * + * Params: + * find = the string to find in @string + * replace = the string to insert in place of @find + * limit = the maximum instances of @find to replace with @replace, or `0` for + * no limit + * + * Returns: the number of find and replace operations performed. + * + * Since: 2.68 + */ + public uint replace(string find, string replace, uint limit) + { + return g_string_replace(gString, Str.toStringz(find), Str.toStringz(replace), limit); + } + /** * Sets the length of a #GString. If the length is less than * the current length, the string will be truncated. If the @@ -693,76 +797,4 @@ public class StringG { g_string_vprintf(gString, Str.toStringz(format), args); } - - /** - * Creates a new #GString, initialized with the given string. - * - * Params: - * init = the initial text to copy into the string, or %NULL to - * start with an empty string - * - * Returns: the new #GString - */ - public static StringG stringNew(string init) - { - auto __p = g_string_new(Str.toStringz(init)); - - if(__p is null) - { - return null; - } - - return new StringG(cast(GString*) __p, true); - } - - /** - * Creates a new #GString with @len bytes of the @init buffer. - * Because a length is provided, @init need not be nul-terminated, - * and can contain embedded nul bytes. - * - * Since this function does not stop at nul bytes, it is the caller's - * responsibility to ensure that @init has at least @len addressable - * bytes. - * - * Params: - * init = initial contents of the string - * len = length of @init to use - * - * Returns: a new #GString - */ - public static StringG stringNewLen(string init, ptrdiff_t len) - { - auto __p = g_string_new_len(Str.toStringz(init), len); - - if(__p is null) - { - return null; - } - - return new StringG(cast(GString*) __p, true); - } - - /** - * Creates a new #GString, with enough space for @dfl_size - * bytes. This is useful if you are going to add a lot of - * text to the string and don't want it to be reallocated - * too often. - * - * Params: - * dflSize = the default size of the space allocated to - * hold the string - * - * Returns: the new #GString - */ - public static StringG stringSizedNew(size_t dflSize) - { - auto __p = g_string_sized_new(dflSize); - - if(__p is null) - { - return null; - } - - return new StringG(cast(GString*) __p, true); - } } diff --git a/generated/gtkd/glib/StrvBuilder.d b/generated/gtkd/glib/StrvBuilder.d new file mode 100644 index 000000000..9a93b8fce --- /dev/null +++ b/generated/gtkd/glib/StrvBuilder.d @@ -0,0 +1,184 @@ +/* + * This file is part of gtkD. + * + * gtkD is free software; you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 + * of the License, or (at your option) any later version, with + * some exceptions, please read the COPYING file. + * + * gtkD is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with gtkD; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110, USA + */ + +// generated automatically - do not change +// find conversion definition on APILookup.txt +// implement new conversion functionalities on the wrap.utils pakage + + +module glib.StrvBuilder; + +private import glib.ConstructionException; +private import glib.Str; +private import glib.c.functions; +public import glib.c.types; +public import gtkc.glibtypes; +private import gtkd.Loader; + + +/** + * #GStrvBuilder is a method of easily building dynamically sized + * NULL-terminated string arrays. + * + * The following example shows how to build a two element array: + * + * |[ + * g_autoptr(GStrvBuilder) builder = g_strv_builder_new (); + * g_strv_builder_add (builder, "hello"); + * g_strv_builder_add (builder, "world"); + * g_auto(GStrv) array = g_strv_builder_end (builder); + * ]| + * + * Since: 2.68 + */ +public class StrvBuilder +{ + /** the main Gtk struct */ + protected GStrvBuilder* gStrvBuilder; + protected bool ownedRef; + + /** Get the main Gtk struct */ + public GStrvBuilder* getStrvBuilderStruct(bool transferOwnership = false) + { + if (transferOwnership) + ownedRef = false; + return gStrvBuilder; + } + + /** the main Gtk struct as a void* */ + protected void* getStruct() + { + return cast(void*)gStrvBuilder; + } + + /** + * Sets our main struct and passes it to the parent class. + */ + public this (GStrvBuilder* gStrvBuilder, bool ownedRef = false) + { + this.gStrvBuilder = gStrvBuilder; + this.ownedRef = ownedRef; + } + + ~this () + { + if ( Linker.isLoaded(LIBRARY_GLIB) && ownedRef ) + g_strv_builder_unref(gStrvBuilder); + } + + + /** + * Add a string to the end of the array. + * + * Since 2.68 + * + * Params: + * value = a string. + */ + public void add(string value) + { + g_strv_builder_add(gStrvBuilder, Str.toStringz(value)); + } + + /** + * Appends all the strings in the given vector to the builder. + * + * Since 2.70 + * + * Params: + * value = the vector of strings to add + */ + public void addv(string[] value) + { + g_strv_builder_addv(gStrvBuilder, Str.toStringzArray(value)); + } + + /** + * Ends the builder process and returns the constructed NULL-terminated string + * array. The returned value should be freed with g_strfreev() when no longer + * needed. + * + * Returns: the constructed string array. + * + * Since 2.68 + */ + public string[] end() + { + auto retStr = g_strv_builder_end(gStrvBuilder); + + scope(exit) Str.freeStringArray(retStr); + return Str.toStringArray(retStr); + } + + alias doref = ref_; + /** + * Atomically increments the reference count of @builder by one. + * This function is thread-safe and may be called from any thread. + * + * Returns: The passed in #GStrvBuilder + * + * Since: 2.68 + */ + public StrvBuilder ref_() + { + auto __p = g_strv_builder_ref(gStrvBuilder); + + if(__p is null) + { + return null; + } + + return new StrvBuilder(cast(GStrvBuilder*) __p, true); + } + + /** + * Decreases the reference count on @builder. + * + * In the event that there are no more references, releases all memory + * associated with the #GStrvBuilder. + * + * Since: 2.68 + */ + public void unref() + { + g_strv_builder_unref(gStrvBuilder); + } + + /** + * Creates a new #GStrvBuilder with a reference count of 1. + * Use g_strv_builder_unref() on the returned value when no longer needed. + * + * Returns: the new #GStrvBuilder + * + * Since: 2.68 + * + * Throws: ConstructionException GTK+ fails to create the object. + */ + public this() + { + auto __p = g_strv_builder_new(); + + if(__p is null) + { + throw new ConstructionException("null returned by new"); + } + + this(cast(GStrvBuilder*) __p); + } +} diff --git a/generated/gtkd/glib/TestCase.d b/generated/gtkd/glib/TestCase.d new file mode 100644 index 000000000..758cb84e4 --- /dev/null +++ b/generated/gtkd/glib/TestCase.d @@ -0,0 +1,82 @@ +/* + * This file is part of gtkD. + * + * gtkD is free software; you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 + * of the License, or (at your option) any later version, with + * some exceptions, please read the COPYING file. + * + * gtkD is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with gtkD; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110, USA + */ + +// generated automatically - do not change +// find conversion definition on APILookup.txt +// implement new conversion functionalities on the wrap.utils pakage + + +module glib.TestCase; + +private import glib.c.functions; +public import glib.c.types; +public import gtkc.glibtypes; +private import gtkd.Loader; + + +/** + * An opaque structure representing a test case. + */ +public class TestCase +{ + /** the main Gtk struct */ + protected GTestCase* gTestCase; + protected bool ownedRef; + + /** Get the main Gtk struct */ + public GTestCase* getTestCaseStruct(bool transferOwnership = false) + { + if (transferOwnership) + ownedRef = false; + return gTestCase; + } + + /** the main Gtk struct as a void* */ + protected void* getStruct() + { + return cast(void*)gTestCase; + } + + /** + * Sets our main struct and passes it to the parent class. + */ + public this (GTestCase* gTestCase, bool ownedRef = false) + { + this.gTestCase = gTestCase; + this.ownedRef = ownedRef; + } + + ~this () + { + if ( Linker.isLoaded(LIBRARY_GLIB) && ownedRef ) + g_test_case_free(gTestCase); + } + + + /** + * Free the @test_case. + * + * Since: 2.70 + */ + public void free() + { + g_test_case_free(gTestCase); + ownedRef = false; + } +} diff --git a/generated/gtkd/glib/TestSuite.d b/generated/gtkd/glib/TestSuite.d index 9221cbc06..6e74135e3 100644 --- a/generated/gtkd/glib/TestSuite.d +++ b/generated/gtkd/glib/TestSuite.d @@ -24,9 +24,11 @@ module glib.TestSuite; +private import glib.TestCase; private import glib.c.functions; public import glib.c.types; public import gtkc.glibtypes; +private import gtkd.Loader; /** @@ -61,6 +63,12 @@ public class TestSuite this.ownedRef = ownedRef; } + ~this () + { + if ( Linker.isLoaded(LIBRARY_GLIB) && ownedRef ) + g_test_suite_free(gTestSuite); + } + /** * Adds @test_case to @suite. @@ -70,9 +78,9 @@ public class TestSuite * * Since: 2.16 */ - public void add(GTestCase* testCase) + public void add(TestCase testCase) { - g_test_suite_add(gTestSuite, testCase); + g_test_suite_add(gTestSuite, (testCase is null) ? null : testCase.getTestCaseStruct()); } /** @@ -87,4 +95,15 @@ public class TestSuite { g_test_suite_add_suite(gTestSuite, (nestedsuite is null) ? null : nestedsuite.getTestSuiteStruct()); } + + /** + * Free the @suite and all nested #GTestSuites. + * + * Since: 2.70 + */ + public void free() + { + g_test_suite_free(gTestSuite); + ownedRef = false; + } } diff --git a/generated/gtkd/glib/Thread.d b/generated/gtkd/glib/Thread.d index 983a8e1ee..0c6724f58 100644 --- a/generated/gtkd/glib/Thread.d +++ b/generated/gtkd/glib/Thread.d @@ -234,7 +234,7 @@ public class Thread return null; } - return new Thread(cast(GThread*) __p, true); + return new Thread(cast(GThread*) __p); } /** @@ -261,7 +261,8 @@ public class Thread * * This function accesses @address atomically. All other accesses to * @address must be atomic in order for this function to work - * reliably. + * reliably. While @address has a `volatile` qualifier, this is a historical + * artifact and the argument passed to it should not be `volatile`. * * Params: * address = a pointer to an integer @@ -286,7 +287,8 @@ public class Thread * * This function accesses @address atomically. All other accesses to * @address must be atomic in order for this function to work - * reliably. + * reliably. While @address has a `volatile` qualifier, this is a historical + * artifact and the argument passed to it should not be `volatile`. * * Params: * address = a pointer to an integer @@ -308,7 +310,8 @@ public class Thread * * This function accesses @address atomically. All other accesses to * @address must be atomic in order for this function to work - * reliably. + * reliably. While @address has a `volatile` qualifier, this is a historical + * artifact and the argument passed to it should not be `volatile`. * * Params: * address = a pointer to an integer @@ -343,6 +346,9 @@ public class Thread * For portability reasons, you may only lock on the bottom 32 bits of * the pointer. * + * While @address has a `volatile` qualifier, this is a historical + * artifact and the argument passed to it should not be `volatile`. + * * Params: * address = a pointer to a #gpointer-sized value * lockBit = a bit value between 0 and 31 @@ -355,12 +361,15 @@ public class Thread } /** - * This is equivalent to g_bit_trylock, but working on pointers (or + * This is equivalent to g_bit_trylock(), but working on pointers (or * other pointer-sized values). * * For portability reasons, you may only lock on the bottom 32 bits of * the pointer. * + * While @address has a `volatile` qualifier, this is a historical + * artifact and the argument passed to it should not be `volatile`. + * * Params: * address = a pointer to a #gpointer-sized value * lockBit = a bit value between 0 and 31 @@ -381,6 +390,9 @@ public class Thread * For portability reasons, you may only lock on the bottom 32 bits of * the pointer. * + * While @address has a `volatile` qualifier, this is a historical + * artifact and the argument passed to it should not be `volatile`. + * * Params: * address = a pointer to a #gpointer-sized value * lockBit = a bit value between 0 and 31 diff --git a/generated/gtkd/glib/ThreadPool.d b/generated/gtkd/glib/ThreadPool.d index 4399e91db..dc0cbb5c7 100644 --- a/generated/gtkd/glib/ThreadPool.d +++ b/generated/gtkd/glib/ThreadPool.d @@ -126,10 +126,10 @@ public final class ThreadPool * processing a task. Instead at least all still running threads * can finish their tasks before the @pool is freed. * - * If @wait_ is %TRUE, the functions does not return before all + * If @wait_ is %TRUE, this function does not return before all * tasks to be processed (dependent on @immediate, whether all * or only the currently running) are ready. - * Otherwise the function returns immediately. + * Otherwise this function returns immediately. * * After calling this function @pool must not be used anymore. * @@ -346,6 +346,10 @@ public final class ThreadPool * with the two arguments. The first one is the parameter to * g_thread_pool_push() and the second one is @user_data. * + * Pass g_get_num_processors() to @max_threads to create as many threads as + * there are logical processors on the system. This will not pin each thread to + * a specific processor. + * * The parameter @exclusive determines whether the thread pool owns * all threads exclusive or shares them with other thread pools. * If @exclusive is %TRUE, @max_threads threads are started @@ -396,6 +400,48 @@ public final class ThreadPool this(cast(GThreadPool*) __p); } + /** + * This function creates a new thread pool similar to g_thread_pool_new() + * but allowing @item_free_func to be specified to free the data passed + * to g_thread_pool_push() in the case that the #GThreadPool is stopped + * and freed before all tasks have been executed. + * + * Params: + * func = a function to execute in the threads of the new thread pool + * userData = user data that is handed over to @func every time it + * is called + * itemFreeFunc = used to pass as a free function to + * g_async_queue_new_full() + * maxThreads = the maximal number of threads to execute concurrently + * in the new thread pool, `-1` means no limit + * exclusive = should this thread pool be exclusive? + * + * Returns: the new #GThreadPool + * + * Since: 2.70 + * + * Throws: GException on failure. + * Throws: ConstructionException GTK+ fails to create the object. + */ + public this(GFunc func, void* userData, GDestroyNotify itemFreeFunc, int maxThreads, bool exclusive) + { + GError* err = null; + + auto __p = g_thread_pool_new_full(func, userData, itemFreeFunc, maxThreads, exclusive, &err); + + if (err !is null) + { + throw new GException( new ErrorG(err) ); + } + + if(__p is null) + { + throw new ConstructionException("null returned by new_full"); + } + + this(cast(GThreadPool*) __p); + } + /** * This function will set the maximum @interval that a thread * waiting in the pool for new tasks can be idle for before diff --git a/generated/gtkd/glib/TimeVal.d b/generated/gtkd/glib/TimeVal.d index 2731f168c..3b69b6a75 100644 --- a/generated/gtkd/glib/TimeVal.d +++ b/generated/gtkd/glib/TimeVal.d @@ -34,7 +34,8 @@ private import gtkd.Loader; /** * Represents a precise time, with seconds and microseconds. - * Similar to the struct timeval returned by the gettimeofday() + * + * Similar to the struct timeval returned by the `gettimeofday()` * UNIX system call. * * GLib is attempting to unify around the use of 64-bit integers to @@ -278,7 +279,7 @@ public final class TimeVal * Pauses the current thread for the given number of microseconds. * * There are 1 million microseconds per second (represented by the - * #G_USEC_PER_SEC macro). g_usleep() may have limited precision, + * %G_USEC_PER_SEC macro). g_usleep() may have limited precision, * depending on hardware and operating system; don't rely on the exact * length of the sleep. * diff --git a/generated/gtkd/glib/TimeZone.d b/generated/gtkd/glib/TimeZone.d index 14ceb9a20..5dc3f5be8 100644 --- a/generated/gtkd/glib/TimeZone.d +++ b/generated/gtkd/glib/TimeZone.d @@ -75,70 +75,15 @@ public class TimeZone /** - * Creates a #GTimeZone corresponding to @identifier. - * - * @identifier can either be an RFC3339/ISO 8601 time offset or - * something that would pass as a valid value for the `TZ` environment - * variable (including %NULL). - * - * In Windows, @identifier can also be the unlocalized name of a time - * zone for standard time, for example "Pacific Standard Time". - * - * Valid RFC3339 time offsets are `"Z"` (for UTC) or - * `"±hh:mm"`. ISO 8601 additionally specifies - * `"±hhmm"` and `"±hh"`. Offsets are - * time values to be added to Coordinated Universal Time (UTC) to get - * the local time. - * - * In UNIX, the `TZ` environment variable typically corresponds - * to the name of a file in the zoneinfo database, an absolute path to a file - * somewhere else, or a string in - * "std offset [dst [offset],start[/time],end[/time]]" (POSIX) format. - * There are no spaces in the specification. The name of standard - * and daylight savings time zone must be three or more alphabetic - * characters. Offsets are time values to be added to local time to - * get Coordinated Universal Time (UTC) and should be - * `"[±]hh[[:]mm[:ss]]"`. Dates are either - * `"Jn"` (Julian day with n between 1 and 365, leap - * years not counted), `"n"` (zero-based Julian day - * with n between 0 and 365) or `"Mm.w.d"` (day d - * (0 <= d <= 6) of week w (1 <= w <= 5) of month m (1 <= m <= 12), day - * 0 is a Sunday). Times are in local wall clock time, the default is - * 02:00:00. - * - * In Windows, the "tzn[+|–]hh[:mm[:ss]][dzn]" format is used, but also - * accepts POSIX format. The Windows format uses US rules for all time - * zones; daylight savings time is 60 minutes behind the standard time - * with date and time of change taken from Pacific Standard Time. - * Offsets are time values to be added to the local time to get - * Coordinated Universal Time (UTC). - * - * g_time_zone_new_local() calls this function with the value of the - * `TZ` environment variable. This function itself is independent of - * the value of `TZ`, but if @identifier is %NULL then `/etc/localtime` - * will be consulted to discover the correct time zone on UNIX and the - * registry will be consulted or GetTimeZoneInformation() will be used - * to get the local time zone on Windows. - * - * If intervals are not available, only time zone rules from `TZ` - * environment variable or other means, then they will be computed - * from year 1900 to 2037. If the maximum year for the rules is - * available and it is greater than 2037, then it will followed - * instead. - * - * See - * [RFC3339 §5.6](http://tools.ietf.org/html/rfc3339#section-5.6) - * for a precise definition of valid RFC3339 time offsets - * (the `time-offset` expansion) and ISO 8601 for the - * full list of valid time offsets. See - * [The GNU C Library manual](http://www.gnu.org/s/libc/manual/html_node/TZ-Variable.html) - * for an explanation of the possible - * values of the `TZ` environment variable. See - * [Microsoft Time Zone Index Values](http://msdn.microsoft.com/en-us/library/ms912391%28v=winembedded.11%29.aspx) - * for the list of time zones on Windows. - * - * You should release the return value by calling g_time_zone_unref() - * when you are done with it. + * A version of g_time_zone_new_identifier() which returns the UTC time zone + * if @identifier could not be parsed or loaded. + * + * If you need to check whether @identifier was loaded successfully, use + * g_time_zone_new_identifier(). + * + * Deprecated: Use g_time_zone_new_identifier() instead, as it provides + * error reporting. Change your code to handle a potentially %NULL return + * value. * * Params: * identifier = a timezone identifier diff --git a/generated/gtkd/glib/Timeout.d b/generated/gtkd/glib/Timeout.d index 210027b26..2148696ee 100644 --- a/generated/gtkd/glib/Timeout.d +++ b/generated/gtkd/glib/Timeout.d @@ -205,10 +205,12 @@ public class Timeout /** * Sets a function to be called at regular intervals, with the default - * priority, #G_PRIORITY_DEFAULT. The function is called repeatedly - * until it returns %FALSE, at which point the timeout is automatically - * destroyed and the function will not be called again. The first call - * to the function will be at the end of the first @interval. + * priority, %G_PRIORITY_DEFAULT. + * + * The given @function is called repeatedly until it returns %G_SOURCE_REMOVE + * or %FALSE, at which point the timeout is automatically destroyed and the + * function will not be called again. The first call to the function will be + * at the end of the first @interval. * * Note that timeout functions may be delayed, due to the processing of other * event sources. Thus they should not be relied on for precise timing. @@ -276,7 +278,7 @@ public class Timeout * * Params: * priority = the priority of the timeout source. Typically this will be in - * the range between #G_PRIORITY_DEFAULT and #G_PRIORITY_HIGH. + * the range between %G_PRIORITY_DEFAULT and %G_PRIORITY_HIGH. * interval = the time between calls to the function, in milliseconds * (1/1000ths of a second) * function_ = function to call @@ -292,8 +294,10 @@ public class Timeout /** * Sets a function to be called at regular intervals with the default - * priority, #G_PRIORITY_DEFAULT. The function is called repeatedly until - * it returns %FALSE, at which point the timeout is automatically destroyed + * priority, %G_PRIORITY_DEFAULT. + * + * The function is called repeatedly until it returns %G_SOURCE_REMOVE + * or %FALSE, at which point the timeout is automatically destroyed * and the function will not be called again. * * This internally creates a main loop source using @@ -329,17 +333,18 @@ public class Timeout /** * Sets a function to be called at regular intervals, with @priority. - * The function is called repeatedly until it returns %FALSE, at which - * point the timeout is automatically destroyed and the function will - * not be called again. + * + * The function is called repeatedly until it returns %G_SOURCE_REMOVE + * or %FALSE, at which point the timeout is automatically destroyed and + * the function will not be called again. * * Unlike g_timeout_add(), this function operates at whole second granularity. * The initial starting point of the timer is determined by the implementation * and the implementation is expected to group multiple timers together so that - * they fire all at the same time. - * To allow this grouping, the @interval to the first timer is rounded - * and can deviate up to one second from the specified interval. - * Subsequent timer iterations will generally run at the specified interval. + * they fire all at the same time. To allow this grouping, the @interval to the + * first timer is rounded and can deviate up to one second from the specified + * interval. Subsequent timer iterations will generally run at the specified + * interval. * * Note that timeout functions may be delayed, due to the processing of other * event sources. Thus they should not be relied on for precise timing. @@ -369,7 +374,7 @@ public class Timeout * * Params: * priority = the priority of the timeout source. Typically this will be in - * the range between #G_PRIORITY_DEFAULT and #G_PRIORITY_HIGH. + * the range between %G_PRIORITY_DEFAULT and %G_PRIORITY_HIGH. * interval = the time between calls to the function, in seconds * function_ = function to call * data = data to pass to @function diff --git a/generated/gtkd/glib/TreeNode.d b/generated/gtkd/glib/TreeNode.d new file mode 100644 index 000000000..7f9b4a261 --- /dev/null +++ b/generated/gtkd/glib/TreeNode.d @@ -0,0 +1,130 @@ +/* + * This file is part of gtkD. + * + * gtkD is free software; you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 + * of the License, or (at your option) any later version, with + * some exceptions, please read the COPYING file. + * + * gtkD is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with gtkD; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110, USA + */ + +// generated automatically - do not change +// find conversion definition on APILookup.txt +// implement new conversion functionalities on the wrap.utils pakage + + +module glib.TreeNode; + +private import glib.c.functions; +public import glib.c.types; +public import gtkc.glibtypes; + + +/** + * An opaque type which identifies a specific node in a #GTree. + * + * Since: 2.68 + */ +public class TreeNode +{ + /** the main Gtk struct */ + protected GTreeNode* gTreeNode; + protected bool ownedRef; + + /** Get the main Gtk struct */ + public GTreeNode* getTreeNodeStruct(bool transferOwnership = false) + { + if (transferOwnership) + ownedRef = false; + return gTreeNode; + } + + /** the main Gtk struct as a void* */ + protected void* getStruct() + { + return cast(void*)gTreeNode; + } + + /** + * Sets our main struct and passes it to the parent class. + */ + public this (GTreeNode* gTreeNode, bool ownedRef = false) + { + this.gTreeNode = gTreeNode; + this.ownedRef = ownedRef; + } + + + /** + * Gets the key stored at a particular tree node. + * + * Returns: the key at the node. + * + * Since: 2.68 + */ + public void* key() + { + return g_tree_node_key(gTreeNode); + } + + /** + * Returns the next in-order node of the tree, or %NULL + * if the passed node was already the last one. + * + * Returns: the next node in the tree + * + * Since: 2.68 + */ + public TreeNode next() + { + auto __p = g_tree_node_next(gTreeNode); + + if(__p is null) + { + return null; + } + + return new TreeNode(cast(GTreeNode*) __p); + } + + /** + * Returns the previous in-order node of the tree, or %NULL + * if the passed node was already the first one. + * + * Returns: the previous node in the tree + * + * Since: 2.68 + */ + public TreeNode previous() + { + auto __p = g_tree_node_previous(gTreeNode); + + if(__p is null) + { + return null; + } + + return new TreeNode(cast(GTreeNode*) __p); + } + + /** + * Gets the value stored at a particular tree node. + * + * Returns: the value at the node. + * + * Since: 2.68 + */ + public void* value() + { + return g_tree_node_value(gTreeNode); + } +} diff --git a/generated/gtkd/glib/URI.d b/generated/gtkd/glib/URI.d index 1a9e4f7ab..6a0dfdf05 100644 --- a/generated/gtkd/glib/URI.d +++ b/generated/gtkd/glib/URI.d @@ -98,134 +98,4 @@ public struct URI scope(exit) Str.freeString(retStr); return Str.toString(retStr); } - - /** - * Escapes a string for use in a URI. - * - * Normally all characters that are not "unreserved" (i.e. ASCII alphanumerical - * characters plus dash, dot, underscore and tilde) are escaped. - * But if you specify characters in @reserved_chars_allowed they are not - * escaped. This is useful for the "reserved" characters in the URI - * specification, since those are allowed unescaped in some portions of - * a URI. - * - * Params: - * unescaped = the unescaped input string. - * reservedCharsAllowed = a string of reserved characters that - * are allowed to be used, or %NULL. - * allowUtf8 = %TRUE if the result can include UTF-8 characters. - * - * Returns: an escaped version of @unescaped. The returned string should be - * freed when no longer needed. - * - * Since: 2.16 - */ - public static string uriEscapeString(string unescaped, string reservedCharsAllowed, bool allowUtf8) - { - auto retStr = g_uri_escape_string(Str.toStringz(unescaped), Str.toStringz(reservedCharsAllowed), allowUtf8); - - scope(exit) Str.freeString(retStr); - return Str.toString(retStr); - } - - /** - * Splits an URI list conforming to the text/uri-list - * mime type defined in RFC 2483 into individual URIs, - * discarding any comments. The URIs are not validated. - * - * Params: - * uriList = an URI list - * - * Returns: a newly allocated %NULL-terminated list - * of strings holding the individual URIs. The array should be freed - * with g_strfreev(). - * - * Since: 2.6 - */ - public static string[] uriListExtractUris(string uriList) - { - auto retStr = g_uri_list_extract_uris(Str.toStringz(uriList)); - - scope(exit) Str.freeStringArray(retStr); - return Str.toStringArray(retStr); - } - - /** - * Gets the scheme portion of a URI string. RFC 3986 decodes the scheme as: - * |[ - * URI = scheme ":" hier-part [ "?" query ] [ "#" fragment ] - * ]| - * Common schemes include "file", "http", "svn+ssh", etc. - * - * Params: - * uri = a valid URI. - * - * Returns: The "Scheme" component of the URI, or %NULL on error. - * The returned string should be freed when no longer needed. - * - * Since: 2.16 - */ - public static string uriParseScheme(string uri) - { - auto retStr = g_uri_parse_scheme(Str.toStringz(uri)); - - scope(exit) Str.freeString(retStr); - return Str.toString(retStr); - } - - /** - * Unescapes a segment of an escaped string. - * - * If any of the characters in @illegal_characters or the character zero appears - * as an escaped character in @escaped_string then that is an error and %NULL - * will be returned. This is useful it you want to avoid for instance having a - * slash being expanded in an escaped path element, which might confuse pathname - * handling. - * - * Params: - * escapedString = A string, may be %NULL - * escapedStringEnd = Pointer to end of @escaped_string, may be %NULL - * illegalCharacters = An optional string of illegal characters not to be allowed, may be %NULL - * - * Returns: an unescaped version of @escaped_string or %NULL on error. - * The returned string should be freed when no longer needed. As a - * special case if %NULL is given for @escaped_string, this function - * will return %NULL. - * - * Since: 2.16 - */ - public static string uriUnescapeSegment(string escapedString, string escapedStringEnd, string illegalCharacters) - { - auto retStr = g_uri_unescape_segment(Str.toStringz(escapedString), Str.toStringz(escapedStringEnd), Str.toStringz(illegalCharacters)); - - scope(exit) Str.freeString(retStr); - return Str.toString(retStr); - } - - /** - * Unescapes a whole escaped string. - * - * If any of the characters in @illegal_characters or the character zero appears - * as an escaped character in @escaped_string then that is an error and %NULL - * will be returned. This is useful it you want to avoid for instance having a - * slash being expanded in an escaped path element, which might confuse pathname - * handling. - * - * Params: - * escapedString = an escaped string to be unescaped. - * illegalCharacters = a string of illegal characters not to be - * allowed, or %NULL. - * - * Returns: an unescaped version of @escaped_string. The returned string - * should be freed when no longer needed. - * - * Since: 2.16 - */ - public static string uriUnescapeString(string escapedString, string illegalCharacters) - { - auto retStr = g_uri_unescape_string(Str.toStringz(escapedString), Str.toStringz(illegalCharacters)); - - scope(exit) Str.freeString(retStr); - return Str.toString(retStr); - } } diff --git a/generated/gtkd/glib/Unicode.d b/generated/gtkd/glib/Unicode.d index de5ba7bd5..9e77fa6e7 100644 --- a/generated/gtkd/glib/Unicode.d +++ b/generated/gtkd/glib/Unicode.d @@ -556,7 +556,7 @@ public struct Unicode } /** - * Determines if a character is a hexidecimal digit. + * Determines if a character is a hexadecimal digit. * * Params: * c = a Unicode character. @@ -681,7 +681,7 @@ public struct Unicode } /** - * Determines the numeric value of a character as a hexidecimal + * Determines the numeric value of a character as a hexadecimal * digit. * * Params: @@ -821,13 +821,13 @@ public struct Unicode * Note that the input is expected to be already in native endianness, * an initial byte-order-mark character is not handled specially. * g_convert() can be used to convert a byte buffer of UTF-16 data of - * ambiguous endianess. + * ambiguous endianness. * * Further note that this function does not validate the result * string; it may e.g. include embedded NUL characters. The only * validation done by this function is to ensure that the input can * be correctly interpreted as UTF-16, i.e. it doesn't contain - * things unpaired surrogates. + * unpaired surrogates or partial character sequences. * * Params: * str = a UTF-16 encoded string @@ -837,9 +837,10 @@ public struct Unicode * words read, or %NULL. If %NULL, then %G_CONVERT_ERROR_PARTIAL_INPUT will * be returned in case @str contains a trailing partial character. If * an error occurs then the index of the invalid input is stored here. + * It’s guaranteed to be non-negative. * itemsWritten = location to store number * of bytes written, or %NULL. The value stored here does not include the - * trailing 0 byte. + * trailing 0 byte. It’s guaranteed to be non-negative. * * Returns: a pointer to a newly allocated UTF-8 string. * This value must be freed with g_free(). If an error occurs, @@ -898,6 +899,10 @@ public struct Unicode * compare the keys with strcmp() when sorting instead of sorting * the original strings. * + * If the two strings are not comparable due to being in different collation + * sequences, the result is undefined. This can happen if the strings are in + * different language scripts, for example. + * * Params: * str1 = a UTF-8 encoded string * str2 = a UTF-8 encoded string @@ -1318,10 +1323,14 @@ public struct Unicode * Copies a substring out of a UTF-8 encoded string. * The substring will contain @end_pos - @start_pos characters. * + * Since GLib 2.72, `-1` can be passed to @end_pos to indicate the + * end of the string. + * * Params: * str = a UTF-8 encoded string * startPos = a character offset within @str - * endPos = another character offset within @str + * endPos = another character offset within @str, + * or `-1` to indicate the end of the string * * Returns: a newly allocated copy of the requested * substring. Free with g_free() when no longer needed. diff --git a/generated/gtkd/glib/UnixUtils.d b/generated/gtkd/glib/UnixUtils.d index b078e1728..48f02f713 100644 --- a/generated/gtkd/glib/UnixUtils.d +++ b/generated/gtkd/glib/UnixUtils.d @@ -212,7 +212,7 @@ public struct UnixUtils * * Params: * priority = the priority of the signal source. Typically this will be in - * the range between #G_PRIORITY_DEFAULT and #G_PRIORITY_HIGH. + * the range between %G_PRIORITY_DEFAULT and %G_PRIORITY_HIGH. * signum = Signal number * handler = Callback * userData = Data for @handler diff --git a/generated/gtkd/glib/UriParamsIter.d b/generated/gtkd/glib/UriParamsIter.d new file mode 100644 index 000000000..e5e77d2c3 --- /dev/null +++ b/generated/gtkd/glib/UriParamsIter.d @@ -0,0 +1,173 @@ +/* + * This file is part of gtkD. + * + * gtkD is free software; you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 + * of the License, or (at your option) any later version, with + * some exceptions, please read the COPYING file. + * + * gtkD is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with gtkD; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110, USA + */ + +// generated automatically - do not change +// find conversion definition on APILookup.txt +// implement new conversion functionalities on the wrap.utils pakage + + +module glib.UriParamsIter; + +private import glib.ErrorG; +private import glib.GException; +private import glib.Str; +private import glib.c.functions; +public import glib.c.types; +public import gtkc.glibtypes; + + +/** + * Many URI schemes include one or more attribute/value pairs as part of the URI + * value. For example `scheme://server/path?query=string&is=there` has two + * attributes – `query=string` and `is=there` – in its query part. + * + * A #GUriParamsIter structure represents an iterator that can be used to + * iterate over the attribute/value pairs of a URI query string. #GUriParamsIter + * structures are typically allocated on the stack and then initialized with + * g_uri_params_iter_init(). See the documentation for g_uri_params_iter_init() + * for a usage example. + * + * Since: 2.66 + */ +public class UriParamsIter +{ + /** the main Gtk struct */ + protected GUriParamsIter* gUriParamsIter; + protected bool ownedRef; + + /** Get the main Gtk struct */ + public GUriParamsIter* getUriParamsIterStruct(bool transferOwnership = false) + { + if (transferOwnership) + ownedRef = false; + return gUriParamsIter; + } + + /** the main Gtk struct as a void* */ + protected void* getStruct() + { + return cast(void*)gUriParamsIter; + } + + /** + * Sets our main struct and passes it to the parent class. + */ + public this (GUriParamsIter* gUriParamsIter, bool ownedRef = false) + { + this.gUriParamsIter = gUriParamsIter; + this.ownedRef = ownedRef; + } + + + /** + * Initializes an attribute/value pair iterator. + * + * The iterator keeps pointers to the @params and @separators arguments, those + * variables must thus outlive the iterator and not be modified during the + * iteration. + * + * If %G_URI_PARAMS_WWW_FORM is passed in @flags, `+` characters in the param + * string will be replaced with spaces in the output. For example, `foo=bar+baz` + * will give attribute `foo` with value `bar baz`. This is commonly used on the + * web (the `https` and `http` schemes only), but is deprecated in favour of + * the equivalent of encoding spaces as `%20`. + * + * Unlike with g_uri_parse_params(), %G_URI_PARAMS_CASE_INSENSITIVE has no + * effect if passed to @flags for g_uri_params_iter_init(). The caller is + * responsible for doing their own case-insensitive comparisons. + * + * |[ + * GUriParamsIter iter; + * GError *error = NULL; + * gchar *unowned_attr, *unowned_value; + * + * g_uri_params_iter_init (&iter, "foo=bar&baz=bar&Foo=frob&baz=bar2", -1, "&", G_URI_PARAMS_NONE); + * while (g_uri_params_iter_next (&iter, &unowned_attr, &unowned_value, &error)) + * { + * g_autofree gchar *attr = g_steal_pointer (&unowned_attr); + * g_autofree gchar *value = g_steal_pointer (&unowned_value); + * // do something with attr and value; this code will be called 4 times + * // for the params string in this example: once with attr=foo and value=bar, + * // then with baz/bar, then Foo/frob, then baz/bar2. + * } + * if (error) + * // handle parsing error + * ]| + * + * Params: + * params = a `%`-encoded string containing `attribute=value` + * parameters + * length = the length of @params, or `-1` if it is nul-terminated + * separators = the separator byte character set between parameters. (usually + * `&`, but sometimes `;` or both `&;`). Note that this function works on + * bytes not characters, so it can't be used to delimit UTF-8 strings for + * anything but ASCII characters. You may pass an empty set, in which case + * no splitting will occur. + * flags = flags to modify the way the parameters are handled. + * + * Since: 2.66 + */ + public void init(string params, ptrdiff_t length, string separators, GUriParamsFlags flags) + { + g_uri_params_iter_init(gUriParamsIter, Str.toStringz(params), length, Str.toStringz(separators), flags); + } + + /** + * Advances @iter and retrieves the next attribute/value. %FALSE is returned if + * an error has occurred (in which case @error is set), or if the end of the + * iteration is reached (in which case @attribute and @value are set to %NULL + * and the iterator becomes invalid). If %TRUE is returned, + * g_uri_params_iter_next() may be called again to receive another + * attribute/value pair. + * + * Note that the same @attribute may be returned multiple times, since URIs + * allow repeated attributes. + * + * Params: + * attribute = on return, contains + * the attribute, or %NULL. + * value = on return, contains + * the value, or %NULL. + * + * Returns: %FALSE if the end of the parameters has been reached or an error was + * encountered. %TRUE otherwise. + * + * Since: 2.66 + * + * Throws: GException on failure. + */ + public bool next(out string attribute, out string value) + { + char* outattribute = null; + char* outvalue = null; + GError* err = null; + + auto __p = g_uri_params_iter_next(gUriParamsIter, &outattribute, &outvalue, &err) != 0; + + if (err !is null) + { + throw new GException( new ErrorG(err) ); + } + + attribute = Str.toString(outattribute); + value = Str.toString(outvalue); + + return __p; + } +} diff --git a/generated/gtkd/glib/Util.d b/generated/gtkd/glib/Util.d index 2b21125d6..2dc871175 100644 --- a/generated/gtkd/glib/Util.d +++ b/generated/gtkd/glib/Util.d @@ -538,9 +538,12 @@ public struct Util * This folder is used for application data * that is not user specific. For example, an application can store * a spell-check dictionary, a database of clip art, or a log file in the - * CSIDL_COMMON_APPDATA folder. This information will not roam and is available + * FOLDERID_ProgramData folder. This information will not roam and is available * to anyone using the computer. * + * The return value is cached and modifying it at runtime is not supported, as + * it’s not thread-safe to modify environment variables at runtime. + * * Returns: a %NULL-terminated array of strings owned by GLib that must not be * modified or freed. * @@ -565,8 +568,8 @@ public struct Util * the first elements in the list are the Application Data * and Documents folders for All Users. (These can be determined only * on Windows 2000 or later and are not present in the list on other - * Windows versions.) See documentation for CSIDL_COMMON_APPDATA and - * CSIDL_COMMON_DOCUMENTS. + * Windows versions.) See documentation for FOLDERID_ProgramData and + * FOLDERID_PublicDocuments. * * Then follows the "share" subfolder in the installation folder for * the package containing the DLL that calls this function, if it can @@ -584,6 +587,9 @@ public struct Util * Note that on Windows the returned list can vary depending on where * this function is called. * + * The return value is cached and modifying it at runtime is not supported, as + * it’s not thread-safe to modify environment variables at runtime. + * * Returns: a %NULL-terminated array of strings owned by GLib that must not be * modified or freed. * @@ -630,7 +636,10 @@ public struct Util * If `XDG_CACHE_HOME` is undefined, the directory that serves as a common * repository for temporary Internet files is used instead. A typical path is * `C:\Documents and Settings\username\Local Settings\Temporary Internet Files`. - * See the [documentation for `CSIDL_INTERNET_CACHE`](https://msdn.microsoft.com/en-us/library/windows/desktop/bb762494%28v=vs.85%29.aspx#csidl_internet_cache). + * See the [documentation for `FOLDERID_InternetCache`](https://docs.microsoft.com/en-us/windows/win32/shell/knownfolderid). + * + * The return value is cached and modifying it at runtime is not supported, as + * it’s not thread-safe to modify environment variables at runtime. * * Returns: a string owned by GLib that * must not be modified or freed. @@ -654,10 +663,13 @@ public struct Util * On Windows it follows XDG Base Directory Specification if `XDG_CONFIG_HOME` is defined. * If `XDG_CONFIG_HOME` is undefined, the folder to use for local (as opposed * to roaming) application data is used instead. See the - * [documentation for `CSIDL_LOCAL_APPDATA`](https://msdn.microsoft.com/en-us/library/windows/desktop/bb762494%28v=vs.85%29.aspx#csidl_local_appdata). + * [documentation for `FOLDERID_LocalAppData`](https://docs.microsoft.com/en-us/windows/win32/shell/knownfolderid). * Note that in this case on Windows it will be the same * as what g_get_user_data_dir() returns. * + * The return value is cached and modifying it at runtime is not supported, as + * it’s not thread-safe to modify environment variables at runtime. + * * Returns: a string owned by GLib that * must not be modified or freed. * @@ -680,10 +692,13 @@ public struct Util * On Windows it follows XDG Base Directory Specification if `XDG_DATA_HOME` * is defined. If `XDG_DATA_HOME` is undefined, the folder to use for local (as * opposed to roaming) application data is used instead. See the - * [documentation for `CSIDL_LOCAL_APPDATA`](https://msdn.microsoft.com/en-us/library/windows/desktop/bb762494%28v=vs.85%29.aspx#csidl_local_appdata). + * [documentation for `FOLDERID_LocalAppData`](https://docs.microsoft.com/en-us/windows/win32/shell/knownfolderid). * Note that in this case on Windows it will be the same * as what g_get_user_config_dir() returns. * + * The return value is cached and modifying it at runtime is not supported, as + * it’s not thread-safe to modify environment variables at runtime. + * * Returns: a string owned by GLib that must * not be modified or freed. * @@ -719,6 +734,9 @@ public struct Util * In the case that this variable is not set, we return the value of * g_get_user_cache_dir(), after verifying that it exists. * + * The return value is cached and modifying it at runtime is not supported, as + * it’s not thread-safe to modify environment variables at runtime. + * * Returns: a string owned by GLib that must not be * modified or freed. * @@ -744,9 +762,9 @@ public struct Util * Params: * directory = the logical id of special directory * - * Returns: the path to the specified special directory, or - * %NULL if the logical id was not found. The returned string is owned by - * GLib and should not be modified or freed. + * Returns: the path to the specified special + * directory, or %NULL if the logical id was not found. The returned string is + * owned by GLib and should not be modified or freed. * * Since: 2.14 */ @@ -849,8 +867,8 @@ public struct Util * Params: * fileName = the name of the file * - * Returns: a newly allocated string containing the last - * component of the filename + * Returns: a newly allocated string + * containing the last component of the filename */ public static string pathGetBasename(string fileName) { @@ -1001,7 +1019,9 @@ public struct Util * #GtkApplication::startup handler. The program name is found by * taking the last component of @argv[0]. * - * Note that for thread-safety reasons this function can only be called once. + * Since GLib 2.72, this function can be called multiple times + * and is fully thread safe. Prior to GLib 2.72, this function + * could only be called once per process. * * Params: * prgname = the name of the program. diff --git a/generated/gtkd/glib/Variant.d b/generated/gtkd/glib/Variant.d index 2e16daac9..49015363b 100644 --- a/generated/gtkd/glib/Variant.d +++ b/generated/gtkd/glib/Variant.d @@ -48,7 +48,7 @@ private import gtkd.Loader; * its type nor its content can be modified further. * * GVariant is useful whenever data needs to be serialized, for example when - * sending method parameters in DBus, or when saving settings using GSettings. + * sending method parameters in D-Bus, or when saving settings using GSettings. * * When creating a new #GVariant, you pass the data you want to store in it * along with a string representing the type of data you wish to pass to it. @@ -83,19 +83,19 @@ private import gtkd.Loader; * concurrently accessed in any way from any number of threads without * problems. * - * #GVariant is heavily optimised for dealing with data in serialised + * #GVariant is heavily optimised for dealing with data in serialized * form. It works particularly well with data located in memory-mapped - * files. It can perform nearly all deserialisation operations in a + * files. It can perform nearly all deserialization operations in a * small constant time, usually touching only a single memory page. - * Serialised #GVariant data can also be sent over the network. + * Serialized #GVariant data can also be sent over the network. * * #GVariant is largely compatible with D-Bus. Almost all types of * #GVariant instances can be sent over D-Bus. See #GVariantType for - * exceptions. (However, #GVariant's serialisation format is not the same - * as the serialisation format of a D-Bus message body: use #GDBusMessage, + * exceptions. (However, #GVariant's serialization format is not the same + * as the serialization format of a D-Bus message body: use #GDBusMessage, * in the gio library, for those.) * - * For space-efficiency, the #GVariant serialisation format does not + * For space-efficiency, the #GVariant serialization format does not * automatically include the variant's length, type or endianness, * which must either be implied from context (such as knowledge that a * particular file format always contains a little-endian @@ -125,14 +125,14 @@ private import gtkd.Loader; * in the future. * * The memory allocated by #GVariant can be grouped into 4 broad - * purposes: memory for serialised data, memory for the type + * purposes: memory for serialized data, memory for the type * information cache, buffer management memory and memory for the * #GVariant structure itself. * - * ## Serialised Data Memory + * ## Serialized Data Memory * * This is the memory that is used for storing GVariant data in - * serialised form. This is what would be sent over the network or + * serialized form. This is what would be sent over the network or * what would end up on disk, not counting any indicator of the * endianness, or of the length or type of the top-level variant. * @@ -166,7 +166,7 @@ private import gtkd.Loader; * * As an example, consider a dictionary mapping strings to variants. * In the case that the dictionary is empty, 0 bytes are required for - * the serialisation. + * the serialization. * * If we add an item "width" that maps to the int32 value of 500 then * we will use 4 byte to store the int32 (so 6 for the variant @@ -192,7 +192,7 @@ private import gtkd.Loader; * * For each GVariant type that currently exists in the program a type * information structure is kept in the type information cache. The - * type information structure is required for rapid deserialisation. + * type information structure is required for rapid deserialization. * * Continuing with the above example, if a #GVariant exists with the * type "a{sv}" then a type information struct will exist for @@ -237,14 +237,14 @@ private import gtkd.Loader; * ## Buffer Management Memory * * #GVariant uses an internal buffer management structure to deal - * with the various different possible sources of serialised data + * with the various different possible sources of serialized data * that it uses. The buffer is responsible for ensuring that the * correct call is made when the data is no longer in use by * #GVariant. This may involve a g_free() or a g_slice_free() or * even g_mapped_file_unref(). * * One buffer management structure is used for each chunk of - * serialised data. The size of the buffer management structure + * serialized data. The size of the buffer management structure * is 4 * (void *). On 32-bit systems, that's 16 bytes. * * ## GVariant structure @@ -254,7 +254,7 @@ private import gtkd.Loader; * * #GVariant structures only exist if they are explicitly created * with API calls. For example, if a #GVariant is constructed out of - * serialised data for the example given above (with the dictionary) + * serialized data for the example given above (with the dictionary) * then although there are 9 individual values that comprise the * entire dictionary (two keys, two values, two variants containing * the values, two dictionary entries, plus the dictionary itself), @@ -264,8 +264,8 @@ private import gtkd.Loader; * If calls are made to start accessing the other values then * #GVariant instances will exist for those values only for as long * as they are in use (ie: until you call g_variant_unref()). The - * type information is shared. The serialised data and the buffer - * management structure for that serialised data is shared by the + * type information is shared. The serialized data and the buffer + * management structure for that serialized data is shared by the * child. * * ## Summary @@ -273,12 +273,12 @@ private import gtkd.Loader; * To put the entire example together, for our dictionary mapping * strings to variants (with two entries, as given above), we are * using 91 bytes of memory for type information, 29 bytes of memory - * for the serialised data, 16 bytes for buffer management and 24 + * for the serialized data, 16 bytes for buffer management and 24 * bytes for the #GVariant instance, or a total of 160 bytes, plus * malloc overhead. If we were to use g_variant_get_child_value() to * access the two dictionary entries, we would use an additional 48 * bytes. If we were to have other dictionaries of the same type, we - * would use more memory for the serialised data and buffer + * would use more memory for the serialized data and buffer * management for those dictionaries, but the type information would * be shared. * @@ -582,7 +582,7 @@ public class Variant * @element_size must be the size of a single element in the array. * For example, if calling this function for an array of 32-bit integers, * you might say sizeof(gint32). This value isn't used except for the purpose - * of a double-check that the form of the serialised data matches the caller's + * of a double-check that the form of the serialized data matches the caller's * expectation. * * @n_elements must be the length of the @elements array. @@ -612,8 +612,8 @@ public class Variant } /** - * Constructs a new serialised-mode #GVariant instance. This is the - * inner interface for creation of new serialised values that gets + * Constructs a new serialized-mode #GVariant instance. This is the + * inner interface for creation of new serialized values that gets * called from various functions in gvariant.c. * * A reference is taken on @bytes. @@ -646,7 +646,7 @@ public class Variant } /** - * Creates a new #GVariant instance from serialised data. + * Creates a new #GVariant instance from serialized data. * * @type is the type of #GVariant instance that will be constructed. * The interpretation of @data depends on knowing the type. @@ -656,8 +656,8 @@ public class Variant * @user_data. If the contents of @data change before that time then * the result is undefined. * - * If @data is trusted to be serialised data in normal form then - * @trusted should be %TRUE. This applies to serialised data created + * If @data is trusted to be serialized data in normal form then + * @trusted should be %TRUE. This applies to serialized data created * within this process or read from a trusted location on the disk (such * as a file installed in /usr/lib alongside your application). You * should set trusted to %FALSE if @data is read from the network, a @@ -678,7 +678,7 @@ public class Variant * * Params: * type = a definite #GVariantType - * data = the serialised data + * data = the serialized data * trusted = %TRUE if @data is definitely in normal form * notify = function to call when @data is no longer needed * userData = data for @notify @@ -1427,7 +1427,10 @@ public class Variant { size_t length; - return Str.toStringArray(g_variant_get_bytestring_array(gVariant, &length)); + auto retStr = g_variant_get_bytestring_array(gVariant, &length); + + scope(exit) g_free(retStr); + return Str.toStringArray(retStr, length); } /** @@ -1442,6 +1445,12 @@ public class Variant * The returned value is never floating. You should free it with * g_variant_unref() when you're done with it. * + * Note that values borrowed from the returned child are not guaranteed to + * still be valid after the child is freed even if you still hold a reference + * to @value, if @value has not been serialized at the time this function is + * called. To avoid this, you can serialize @value by calling + * g_variant_get_data() and optionally ignoring the return value. + * * There may be implementation specific restrictions on deeply nested values, * which would result in the unit tuple being returned as the child value, * instead of further nested children. #GVariant is guaranteed to handle @@ -1469,33 +1478,33 @@ public class Variant } /** - * Returns a pointer to the serialised form of a #GVariant instance. + * Returns a pointer to the serialized form of a #GVariant instance. * The returned data may not be in fully-normalised form if read from an * untrusted source. The returned data must not be freed; it remains * valid for as long as @value exists. * - * If @value is a fixed-sized value that was deserialised from a - * corrupted serialised container then %NULL may be returned. In this + * If @value is a fixed-sized value that was deserialized from a + * corrupted serialized container then %NULL may be returned. In this * case, the proper thing to do is typically to use the appropriate * number of nul bytes in place of @value. If @value is not fixed-sized * then %NULL is never returned. * - * In the case that @value is already in serialised form, this function - * is O(1). If the value is not already in serialised form, - * serialisation occurs implicitly and is approximately O(n) in the size + * In the case that @value is already in serialized form, this function + * is O(1). If the value is not already in serialized form, + * serialization occurs implicitly and is approximately O(n) in the size * of the result. * - * To deserialise the data returned by this function, in addition to the - * serialised data, you must know the type of the #GVariant, and (if the + * To deserialize the data returned by this function, in addition to the + * serialized data, you must know the type of the #GVariant, and (if the * machine might be different) the endianness of the machine that stored * it. As a result, file formats or network messages that incorporate - * serialised #GVariants must include this information either + * serialized #GVariants must include this information either * implicitly (for instance "the file always contains a * %G_VARIANT_TYPE_VARIANT and it is always in little-endian order") or * explicitly (by storing the type and/or endianness in addition to the - * serialised data). + * serialized data). * - * Returns: the serialised form of @value, or %NULL + * Returns: the serialized form of @value, or %NULL * * Since: 2.24 */ @@ -1505,7 +1514,7 @@ public class Variant } /** - * Returns a pointer to the serialised form of a #GVariant instance. + * Returns a pointer to the serialized form of a #GVariant instance. * The semantics of this function are exactly the same as * g_variant_get_data(), except that the returned #GBytes holds * a reference to the variant data. @@ -1542,7 +1551,7 @@ public class Variant } /** - * Provides access to the serialised data for an array of fixed-sized + * Provides access to the serialized data for an array of fixed-sized * items. * * @value must be an array with fixed-sized elements. Numeric types are @@ -1550,7 +1559,7 @@ public class Variant * * @element_size must be the size of a single element in the array, * as given by the section on - * [serialized data memory][gvariant-serialised-data-memory]. + * [serialized data memory][gvariant-serialized-data-memory]. * * In particular, arrays of these fixed-sized types can be interpreted * as an array of the given C type, with @element_size set to the size @@ -1563,7 +1572,7 @@ public class Variant * * For example, if calling this function for an array of 32-bit integers, * you might say `sizeof(gint32)`. This value isn't used except for the purpose - * of a double-check that the form of the serialised data matches the caller's + * of a double-check that the form of the serialized data matches the caller's * expectation. * * @n_elements, which must be non-%NULL, is set equal to the number of @@ -1685,7 +1694,7 @@ public class Variant * #GVariant is created with the same value as @value. * * It makes sense to call this function if you've received #GVariant - * data from untrusted sources and you want to ensure your serialised + * data from untrusted sources and you want to ensure your serialized * output is definitely in normal form. * * If @value is already in normal form, a new reference will be returned @@ -1731,7 +1740,10 @@ public class Variant { size_t length; - return Str.toStringArray(g_variant_get_objv(gVariant, &length)); + auto retStr = g_variant_get_objv(gVariant, &length); + + scope(exit) g_free(retStr); + return Str.toStringArray(retStr, length); } /** @@ -1741,13 +1753,13 @@ public class Variant * If @value has a fixed-sized type then this function always returned * that fixed size. * - * In the case that @value is already in serialised form or the size has + * In the case that @value is already in serialized form or the size has * already been calculated (ie: this function has been called before) * then this function is O(1). Otherwise, the size is calculated, an * operation which is approximately O(n) in the number of values * involved. * - * Returns: the serialised size of @value + * Returns: the serialized size of @value * * Since: 2.24 */ @@ -1761,11 +1773,15 @@ public class Variant * type. This includes the types %G_VARIANT_TYPE_STRING, * %G_VARIANT_TYPE_OBJECT_PATH and %G_VARIANT_TYPE_SIGNATURE. * - * The string will always be UTF-8 encoded, and will never be %NULL. + * The string will always be UTF-8 encoded, will never be %NULL, and will never + * contain nul bytes. * * If @length is non-%NULL then the length of the string (in bytes) is * returned there. For trusted values, this information is already - * known. For untrusted values, a strlen() will be performed. + * known. Untrusted values will be validated and, if valid, a strlen() will be + * performed. If invalid, a default value will be returned — for + * %G_VARIANT_TYPE_OBJECT_PATH, this is `"/"`, and for other types it is the + * empty string. * * It is an error to call this function with a @value of any type * other than those three. @@ -1805,7 +1821,10 @@ public class Variant { size_t length; - return Str.toStringArray(g_variant_get_strv(gVariant, &length)); + auto retStr = g_variant_get_strv(gVariant, &length); + + scope(exit) g_free(retStr); + return Str.toStringArray(retStr, length); } /** @@ -2004,7 +2023,7 @@ public class Variant * Checks if @value is in normal form. * * The main reason to do this is to detect if a given chunk of - * serialised data is in normal form: load the data into a #GVariant + * serialized data is in normal form: load the data into a #GVariant * using g_variant_new_from_data() and then use this function to * check. * @@ -2242,21 +2261,21 @@ public class Variant } /** - * Stores the serialised form of @value at @data. @data should be + * Stores the serialized form of @value at @data. @data should be * large enough. See g_variant_get_size(). * * The stored data is in machine native byte order but may not be in * fully-normalised form if read from an untrusted source. See * g_variant_get_normal_form() for a solution. * - * As with g_variant_get_data(), to be able to deserialise the - * serialised variant successfully, its type and (if the destination + * As with g_variant_get_data(), to be able to deserialize the + * serialized variant successfully, its type and (if the destination * machine might be different) its endianness must also be available. * * This function is approximately O(n) in the size of @data. * * Params: - * data = the location to store the serialised data at + * data = the location to store the serialized data at * * Since: 2.24 */ @@ -2286,7 +2305,7 @@ public class Variant * * Using this function on the return value of the user's callback allows * the user to do whichever is more convenient for them. The caller - * will alway receives exactly one full reference to the value: either + * will always receives exactly one full reference to the value: either * the one that was returned in the first place, or a floating reference * that has been converted to a full reference. * diff --git a/generated/gtkd/glib/VariantIter.d b/generated/gtkd/glib/VariantIter.d index 2696dbcc0..c94a28e6b 100644 --- a/generated/gtkd/glib/VariantIter.d +++ b/generated/gtkd/glib/VariantIter.d @@ -82,7 +82,7 @@ public class VariantIter * need it. * * A reference is taken to the container that @iter is iterating over - * and will be releated only when g_variant_iter_free() is called. + * and will be related only when g_variant_iter_free() is called. * * Returns: a new heap-allocated #GVariantIter * diff --git a/generated/gtkd/glib/VariantType.d b/generated/gtkd/glib/VariantType.d index daa8d4bf4..2d67b6b3b 100644 --- a/generated/gtkd/glib/VariantType.d +++ b/generated/gtkd/glib/VariantType.d @@ -60,7 +60,7 @@ private import gtkd.Loader; * * Just as in D-Bus, GVariant types are described with strings ("type * strings"). Subject to the differences mentioned above, these strings - * are of the same form as those found in DBus. Note, however: D-Bus + * are of the same form as those found in D-Bus. Note, however: D-Bus * always works in terms of messages and therefore individual type * strings appear nowhere in its interface. Instead, "signatures" * are a concatenation of the strings of the type of each argument in a diff --git a/generated/gtkd/glib/Version.d b/generated/gtkd/glib/Version.d index 4cb977fd9..b314becb0 100644 --- a/generated/gtkd/glib/Version.d +++ b/generated/gtkd/glib/Version.d @@ -36,18 +36,19 @@ public struct Version /** * Checks that the GLib library in use is compatible with the - * given version. Generally you would pass in the constants - * #GLIB_MAJOR_VERSION, #GLIB_MINOR_VERSION, #GLIB_MICRO_VERSION - * as the three arguments to this function; that produces - * a check that the library in use is compatible with - * the version of GLib the application or module was compiled - * against. + * given version. + * + * Generally you would pass in the constants %GLIB_MAJOR_VERSION, + * %GLIB_MINOR_VERSION, %GLIB_MICRO_VERSION as the three arguments + * to this function; that produces a check that the library in use + * is compatible with the version of GLib the application or module + * was compiled against. * * Compatibility is defined by two things: first the version * of the running library is newer than the version - * @required_major.required_minor.@required_micro. Second + * `@required_major.required_minor.@required_micro`. Second * the running library must be binary compatible with the - * version @required_major.required_minor.@required_micro + * version `@required_major.@required_minor.@required_micro` * (same major version.) * * Params: @@ -55,10 +56,10 @@ public struct Version * requiredMinor = the required minor version * requiredMicro = the required micro version * - * Returns: %NULL if the GLib library is compatible with the - * given version, or a string describing the version mismatch. - * The returned string is owned by GLib and must not be modified - * or freed. + * Returns: %NULL if the GLib library is + * compatible with the given version, or a string describing the + * version mismatch. The returned string is owned by GLib and must + * not be modified or freed. * * Since: 2.6 */ diff --git a/generated/gtkd/glib/c/functions.d b/generated/gtkd/glib/c/functions.d index 256819d81..e9a66b4e9 100644 --- a/generated/gtkd/glib/c/functions.d +++ b/generated/gtkd/glib/c/functions.d @@ -97,7 +97,9 @@ shared static this() Linker.link(g_bookmark_file_add_group, "g_bookmark_file_add_group", LIBRARY_GLIB); Linker.link(g_bookmark_file_free, "g_bookmark_file_free", LIBRARY_GLIB); Linker.link(g_bookmark_file_get_added, "g_bookmark_file_get_added", LIBRARY_GLIB); + Linker.link(g_bookmark_file_get_added_date_time, "g_bookmark_file_get_added_date_time", LIBRARY_GLIB); Linker.link(g_bookmark_file_get_app_info, "g_bookmark_file_get_app_info", LIBRARY_GLIB); + Linker.link(g_bookmark_file_get_application_info, "g_bookmark_file_get_application_info", LIBRARY_GLIB); Linker.link(g_bookmark_file_get_applications, "g_bookmark_file_get_applications", LIBRARY_GLIB); Linker.link(g_bookmark_file_get_description, "g_bookmark_file_get_description", LIBRARY_GLIB); Linker.link(g_bookmark_file_get_groups, "g_bookmark_file_get_groups", LIBRARY_GLIB); @@ -105,10 +107,12 @@ shared static this() Linker.link(g_bookmark_file_get_is_private, "g_bookmark_file_get_is_private", LIBRARY_GLIB); Linker.link(g_bookmark_file_get_mime_type, "g_bookmark_file_get_mime_type", LIBRARY_GLIB); Linker.link(g_bookmark_file_get_modified, "g_bookmark_file_get_modified", LIBRARY_GLIB); + Linker.link(g_bookmark_file_get_modified_date_time, "g_bookmark_file_get_modified_date_time", LIBRARY_GLIB); Linker.link(g_bookmark_file_get_size, "g_bookmark_file_get_size", LIBRARY_GLIB); Linker.link(g_bookmark_file_get_title, "g_bookmark_file_get_title", LIBRARY_GLIB); Linker.link(g_bookmark_file_get_uris, "g_bookmark_file_get_uris", LIBRARY_GLIB); Linker.link(g_bookmark_file_get_visited, "g_bookmark_file_get_visited", LIBRARY_GLIB); + Linker.link(g_bookmark_file_get_visited_date_time, "g_bookmark_file_get_visited_date_time", LIBRARY_GLIB); Linker.link(g_bookmark_file_has_application, "g_bookmark_file_has_application", LIBRARY_GLIB); Linker.link(g_bookmark_file_has_group, "g_bookmark_file_has_group", LIBRARY_GLIB); Linker.link(g_bookmark_file_has_item, "g_bookmark_file_has_item", LIBRARY_GLIB); @@ -120,15 +124,19 @@ shared static this() Linker.link(g_bookmark_file_remove_group, "g_bookmark_file_remove_group", LIBRARY_GLIB); Linker.link(g_bookmark_file_remove_item, "g_bookmark_file_remove_item", LIBRARY_GLIB); Linker.link(g_bookmark_file_set_added, "g_bookmark_file_set_added", LIBRARY_GLIB); + Linker.link(g_bookmark_file_set_added_date_time, "g_bookmark_file_set_added_date_time", LIBRARY_GLIB); Linker.link(g_bookmark_file_set_app_info, "g_bookmark_file_set_app_info", LIBRARY_GLIB); + Linker.link(g_bookmark_file_set_application_info, "g_bookmark_file_set_application_info", LIBRARY_GLIB); Linker.link(g_bookmark_file_set_description, "g_bookmark_file_set_description", LIBRARY_GLIB); Linker.link(g_bookmark_file_set_groups, "g_bookmark_file_set_groups", LIBRARY_GLIB); Linker.link(g_bookmark_file_set_icon, "g_bookmark_file_set_icon", LIBRARY_GLIB); Linker.link(g_bookmark_file_set_is_private, "g_bookmark_file_set_is_private", LIBRARY_GLIB); Linker.link(g_bookmark_file_set_mime_type, "g_bookmark_file_set_mime_type", LIBRARY_GLIB); Linker.link(g_bookmark_file_set_modified, "g_bookmark_file_set_modified", LIBRARY_GLIB); + Linker.link(g_bookmark_file_set_modified_date_time, "g_bookmark_file_set_modified_date_time", LIBRARY_GLIB); Linker.link(g_bookmark_file_set_title, "g_bookmark_file_set_title", LIBRARY_GLIB); Linker.link(g_bookmark_file_set_visited, "g_bookmark_file_set_visited", LIBRARY_GLIB); + Linker.link(g_bookmark_file_set_visited_date_time, "g_bookmark_file_set_visited_date_time", LIBRARY_GLIB); Linker.link(g_bookmark_file_to_data, "g_bookmark_file_to_data", LIBRARY_GLIB); Linker.link(g_bookmark_file_to_file, "g_bookmark_file_to_file", LIBRARY_GLIB); Linker.link(g_bookmark_file_error_quark, "g_bookmark_file_error_quark", LIBRARY_GLIB); @@ -162,6 +170,7 @@ shared static this() Linker.link(g_bytes_compare, "g_bytes_compare", LIBRARY_GLIB); Linker.link(g_bytes_equal, "g_bytes_equal", LIBRARY_GLIB); Linker.link(g_bytes_get_data, "g_bytes_get_data", LIBRARY_GLIB); + Linker.link(g_bytes_get_region, "g_bytes_get_region", LIBRARY_GLIB); Linker.link(g_bytes_get_size, "g_bytes_get_size", LIBRARY_GLIB); Linker.link(g_bytes_hash, "g_bytes_hash", LIBRARY_GLIB); Linker.link(g_bytes_new_from_bytes, "g_bytes_new_from_bytes", LIBRARY_GLIB); @@ -267,7 +276,9 @@ shared static this() Linker.link(g_date_time_add_seconds, "g_date_time_add_seconds", LIBRARY_GLIB); Linker.link(g_date_time_add_weeks, "g_date_time_add_weeks", LIBRARY_GLIB); Linker.link(g_date_time_add_years, "g_date_time_add_years", LIBRARY_GLIB); + Linker.link(g_date_time_compare, "g_date_time_compare", LIBRARY_GLIB); Linker.link(g_date_time_difference, "g_date_time_difference", LIBRARY_GLIB); + Linker.link(g_date_time_equal, "g_date_time_equal", LIBRARY_GLIB); Linker.link(g_date_time_format, "g_date_time_format", LIBRARY_GLIB); Linker.link(g_date_time_format_iso8601, "g_date_time_format_iso8601", LIBRARY_GLIB); Linker.link(g_date_time_get_day_of_month, "g_date_time_get_day_of_month", LIBRARY_GLIB); @@ -286,6 +297,7 @@ shared static this() Linker.link(g_date_time_get_week_of_year, "g_date_time_get_week_of_year", LIBRARY_GLIB); Linker.link(g_date_time_get_year, "g_date_time_get_year", LIBRARY_GLIB); Linker.link(g_date_time_get_ymd, "g_date_time_get_ymd", LIBRARY_GLIB); + Linker.link(g_date_time_hash, "g_date_time_hash", LIBRARY_GLIB); Linker.link(g_date_time_is_daylight_savings, "g_date_time_is_daylight_savings", LIBRARY_GLIB); Linker.link(g_date_time_ref, "g_date_time_ref", LIBRARY_GLIB); Linker.link(g_date_time_to_local, "g_date_time_to_local", LIBRARY_GLIB); @@ -294,9 +306,6 @@ shared static this() Linker.link(g_date_time_to_unix, "g_date_time_to_unix", LIBRARY_GLIB); Linker.link(g_date_time_to_utc, "g_date_time_to_utc", LIBRARY_GLIB); Linker.link(g_date_time_unref, "g_date_time_unref", LIBRARY_GLIB); - Linker.link(g_date_time_compare, "g_date_time_compare", LIBRARY_GLIB); - Linker.link(g_date_time_equal, "g_date_time_equal", LIBRARY_GLIB); - Linker.link(g_date_time_hash, "g_date_time_hash", LIBRARY_GLIB); // glib.Directory @@ -314,6 +323,8 @@ shared static this() Linker.link(g_error_copy, "g_error_copy", LIBRARY_GLIB); Linker.link(g_error_free, "g_error_free", LIBRARY_GLIB); Linker.link(g_error_matches, "g_error_matches", LIBRARY_GLIB); + Linker.link(g_error_domain_register, "g_error_domain_register", LIBRARY_GLIB); + Linker.link(g_error_domain_register_static, "g_error_domain_register_static", LIBRARY_GLIB); Linker.link(g_propagate_error, "g_propagate_error", LIBRARY_GLIB); Linker.link(g_set_error_literal, "g_set_error_literal", LIBRARY_GLIB); Linker.link(g_prefix_error, "g_prefix_error", LIBRARY_GLIB); @@ -337,6 +348,7 @@ shared static this() Linker.link(g_hash_table_lookup_extended, "g_hash_table_lookup_extended", LIBRARY_GLIB); Linker.link(g_hash_table_new, "g_hash_table_new", LIBRARY_GLIB); Linker.link(g_hash_table_new_full, "g_hash_table_new_full", LIBRARY_GLIB); + Linker.link(g_hash_table_new_similar, "g_hash_table_new_similar", LIBRARY_GLIB); Linker.link(g_hash_table_ref, "g_hash_table_ref", LIBRARY_GLIB); Linker.link(g_hash_table_remove, "g_hash_table_remove", LIBRARY_GLIB); Linker.link(g_hash_table_remove_all, "g_hash_table_remove_all", LIBRARY_GLIB); @@ -547,6 +559,7 @@ shared static this() // glib.MainContext Linker.link(g_main_context_new, "g_main_context_new", LIBRARY_GLIB); + Linker.link(g_main_context_new_with_flags, "g_main_context_new_with_flags", LIBRARY_GLIB); Linker.link(g_main_context_acquire, "g_main_context_acquire", LIBRARY_GLIB); Linker.link(g_main_context_add_poll, "g_main_context_add_poll", LIBRARY_GLIB); Linker.link(g_main_context_check, "g_main_context_check", LIBRARY_GLIB); @@ -719,9 +732,12 @@ shared static this() // glib.Pattern + Linker.link(g_pattern_spec_new, "g_pattern_spec_new", LIBRARY_GLIB); + Linker.link(g_pattern_spec_copy, "g_pattern_spec_copy", LIBRARY_GLIB); Linker.link(g_pattern_spec_equal, "g_pattern_spec_equal", LIBRARY_GLIB); Linker.link(g_pattern_spec_free, "g_pattern_spec_free", LIBRARY_GLIB); - Linker.link(g_pattern_spec_new, "g_pattern_spec_new", LIBRARY_GLIB); + Linker.link(g_pattern_spec_match, "g_pattern_spec_match", LIBRARY_GLIB); + Linker.link(g_pattern_spec_match_string, "g_pattern_spec_match_string", LIBRARY_GLIB); Linker.link(g_pattern_match, "g_pattern_match", LIBRARY_GLIB); Linker.link(g_pattern_match_simple, "g_pattern_match_simple", LIBRARY_GLIB); Linker.link(g_pattern_match_string, "g_pattern_match_string", LIBRARY_GLIB); @@ -1007,6 +1023,7 @@ shared static this() Linker.link(g_source_set_name, "g_source_set_name", LIBRARY_GLIB); Linker.link(g_source_set_priority, "g_source_set_priority", LIBRARY_GLIB); Linker.link(g_source_set_ready_time, "g_source_set_ready_time", LIBRARY_GLIB); + Linker.link(g_source_set_static_name, "g_source_set_static_name", LIBRARY_GLIB); Linker.link(g_source_unref, "g_source_unref", LIBRARY_GLIB); Linker.link(g_source_remove, "g_source_remove", LIBRARY_GLIB); Linker.link(g_source_remove_by_funcs_user_data, "g_source_remove_by_funcs_user_data", LIBRARY_GLIB); @@ -1015,6 +1032,9 @@ shared static this() // glib.StringG + Linker.link(g_string_new, "g_string_new", LIBRARY_GLIB); + Linker.link(g_string_new_len, "g_string_new_len", LIBRARY_GLIB); + Linker.link(g_string_sized_new, "g_string_sized_new", LIBRARY_GLIB); Linker.link(g_string_append, "g_string_append", LIBRARY_GLIB); Linker.link(g_string_append_c, "g_string_append_c", LIBRARY_GLIB); Linker.link(g_string_append_len, "g_string_append_len", LIBRARY_GLIB); @@ -1042,13 +1062,11 @@ shared static this() Linker.link(g_string_prepend_len, "g_string_prepend_len", LIBRARY_GLIB); Linker.link(g_string_prepend_unichar, "g_string_prepend_unichar", LIBRARY_GLIB); Linker.link(g_string_printf, "g_string_printf", LIBRARY_GLIB); + Linker.link(g_string_replace, "g_string_replace", LIBRARY_GLIB); Linker.link(g_string_set_size, "g_string_set_size", LIBRARY_GLIB); Linker.link(g_string_truncate, "g_string_truncate", LIBRARY_GLIB); Linker.link(g_string_up, "g_string_up", LIBRARY_GLIB); Linker.link(g_string_vprintf, "g_string_vprintf", LIBRARY_GLIB); - Linker.link(g_string_new, "g_string_new", LIBRARY_GLIB); - Linker.link(g_string_new_len, "g_string_new_len", LIBRARY_GLIB); - Linker.link(g_string_sized_new, "g_string_sized_new", LIBRARY_GLIB); // glib.StringChunk @@ -1059,6 +1077,20 @@ shared static this() Linker.link(g_string_chunk_insert_len, "g_string_chunk_insert_len", LIBRARY_GLIB); Linker.link(g_string_chunk_new, "g_string_chunk_new", LIBRARY_GLIB); + // glib.StrvBuilder + + Linker.link(g_strv_builder_add, "g_strv_builder_add", LIBRARY_GLIB); + Linker.link(g_strv_builder_add_many, "g_strv_builder_add_many", LIBRARY_GLIB); + Linker.link(g_strv_builder_addv, "g_strv_builder_addv", LIBRARY_GLIB); + Linker.link(g_strv_builder_end, "g_strv_builder_end", LIBRARY_GLIB); + Linker.link(g_strv_builder_ref, "g_strv_builder_ref", LIBRARY_GLIB); + Linker.link(g_strv_builder_unref, "g_strv_builder_unref", LIBRARY_GLIB); + Linker.link(g_strv_builder_new, "g_strv_builder_new", LIBRARY_GLIB); + + // glib.TestCase + + Linker.link(g_test_case_free, "g_test_case_free", LIBRARY_GLIB); + // glib.TestLogBuffer Linker.link(g_test_log_buffer_free, "g_test_log_buffer_free", LIBRARY_GLIB); @@ -1074,6 +1106,7 @@ shared static this() Linker.link(g_test_suite_add, "g_test_suite_add", LIBRARY_GLIB); Linker.link(g_test_suite_add_suite, "g_test_suite_add_suite", LIBRARY_GLIB); + Linker.link(g_test_suite_free, "g_test_suite_free", LIBRARY_GLIB); // glib.Thread @@ -1108,6 +1141,7 @@ shared static this() Linker.link(g_thread_pool_get_max_unused_threads, "g_thread_pool_get_max_unused_threads", LIBRARY_GLIB); Linker.link(g_thread_pool_get_num_unused_threads, "g_thread_pool_get_num_unused_threads", LIBRARY_GLIB); Linker.link(g_thread_pool_new, "g_thread_pool_new", LIBRARY_GLIB); + Linker.link(g_thread_pool_new_full, "g_thread_pool_new_full", LIBRARY_GLIB); Linker.link(g_thread_pool_set_max_idle_time, "g_thread_pool_set_max_idle_time", LIBRARY_GLIB); Linker.link(g_thread_pool_set_max_unused_threads, "g_thread_pool_set_max_unused_threads", LIBRARY_GLIB); Linker.link(g_thread_pool_stop_unused_threads, "g_thread_pool_stop_unused_threads", LIBRARY_GLIB); @@ -1125,6 +1159,7 @@ shared static this() // glib.TimeZone Linker.link(g_time_zone_new, "g_time_zone_new", LIBRARY_GLIB); + Linker.link(g_time_zone_new_identifier, "g_time_zone_new_identifier", LIBRARY_GLIB); Linker.link(g_time_zone_new_local, "g_time_zone_new_local", LIBRARY_GLIB); Linker.link(g_time_zone_new_offset, "g_time_zone_new_offset", LIBRARY_GLIB); Linker.link(g_time_zone_new_utc, "g_time_zone_new_utc", LIBRARY_GLIB); @@ -1157,23 +1192,84 @@ shared static this() // glib.BBTree + Linker.link(g_tree_new, "g_tree_new", LIBRARY_GLIB); + Linker.link(g_tree_new_full, "g_tree_new_full", LIBRARY_GLIB); + Linker.link(g_tree_new_with_data, "g_tree_new_with_data", LIBRARY_GLIB); Linker.link(g_tree_destroy, "g_tree_destroy", LIBRARY_GLIB); Linker.link(g_tree_foreach, "g_tree_foreach", LIBRARY_GLIB); + Linker.link(g_tree_foreach_node, "g_tree_foreach_node", LIBRARY_GLIB); Linker.link(g_tree_height, "g_tree_height", LIBRARY_GLIB); Linker.link(g_tree_insert, "g_tree_insert", LIBRARY_GLIB); + Linker.link(g_tree_insert_node, "g_tree_insert_node", LIBRARY_GLIB); Linker.link(g_tree_lookup, "g_tree_lookup", LIBRARY_GLIB); Linker.link(g_tree_lookup_extended, "g_tree_lookup_extended", LIBRARY_GLIB); + Linker.link(g_tree_lookup_node, "g_tree_lookup_node", LIBRARY_GLIB); + Linker.link(g_tree_lower_bound, "g_tree_lower_bound", LIBRARY_GLIB); Linker.link(g_tree_nnodes, "g_tree_nnodes", LIBRARY_GLIB); + Linker.link(g_tree_node_first, "g_tree_node_first", LIBRARY_GLIB); + Linker.link(g_tree_node_last, "g_tree_node_last", LIBRARY_GLIB); Linker.link(g_tree_ref, "g_tree_ref", LIBRARY_GLIB); Linker.link(g_tree_remove, "g_tree_remove", LIBRARY_GLIB); + Linker.link(g_tree_remove_all, "g_tree_remove_all", LIBRARY_GLIB); Linker.link(g_tree_replace, "g_tree_replace", LIBRARY_GLIB); + Linker.link(g_tree_replace_node, "g_tree_replace_node", LIBRARY_GLIB); Linker.link(g_tree_search, "g_tree_search", LIBRARY_GLIB); + Linker.link(g_tree_search_node, "g_tree_search_node", LIBRARY_GLIB); Linker.link(g_tree_steal, "g_tree_steal", LIBRARY_GLIB); Linker.link(g_tree_traverse, "g_tree_traverse", LIBRARY_GLIB); Linker.link(g_tree_unref, "g_tree_unref", LIBRARY_GLIB); - Linker.link(g_tree_new, "g_tree_new", LIBRARY_GLIB); - Linker.link(g_tree_new_full, "g_tree_new_full", LIBRARY_GLIB); - Linker.link(g_tree_new_with_data, "g_tree_new_with_data", LIBRARY_GLIB); + Linker.link(g_tree_upper_bound, "g_tree_upper_bound", LIBRARY_GLIB); + + // glib.TreeNode + + Linker.link(g_tree_node_key, "g_tree_node_key", LIBRARY_GLIB); + Linker.link(g_tree_node_next, "g_tree_node_next", LIBRARY_GLIB); + Linker.link(g_tree_node_previous, "g_tree_node_previous", LIBRARY_GLIB); + Linker.link(g_tree_node_value, "g_tree_node_value", LIBRARY_GLIB); + + // glib.URI + + Linker.link(g_uri_get_auth_params, "g_uri_get_auth_params", LIBRARY_GLIB); + Linker.link(g_uri_get_flags, "g_uri_get_flags", LIBRARY_GLIB); + Linker.link(g_uri_get_fragment, "g_uri_get_fragment", LIBRARY_GLIB); + Linker.link(g_uri_get_host, "g_uri_get_host", LIBRARY_GLIB); + Linker.link(g_uri_get_password, "g_uri_get_password", LIBRARY_GLIB); + Linker.link(g_uri_get_path, "g_uri_get_path", LIBRARY_GLIB); + Linker.link(g_uri_get_port, "g_uri_get_port", LIBRARY_GLIB); + Linker.link(g_uri_get_query, "g_uri_get_query", LIBRARY_GLIB); + Linker.link(g_uri_get_scheme, "g_uri_get_scheme", LIBRARY_GLIB); + Linker.link(g_uri_get_user, "g_uri_get_user", LIBRARY_GLIB); + Linker.link(g_uri_get_userinfo, "g_uri_get_userinfo", LIBRARY_GLIB); + Linker.link(g_uri_parse_relative, "g_uri_parse_relative", LIBRARY_GLIB); + Linker.link(g_uri_ref, "g_uri_ref", LIBRARY_GLIB); + Linker.link(g_uri_to_string, "g_uri_to_string", LIBRARY_GLIB); + Linker.link(g_uri_to_string_partial, "g_uri_to_string_partial", LIBRARY_GLIB); + Linker.link(g_uri_unref, "g_uri_unref", LIBRARY_GLIB); + Linker.link(g_uri_build, "g_uri_build", LIBRARY_GLIB); + Linker.link(g_uri_build_with_user, "g_uri_build_with_user", LIBRARY_GLIB); + Linker.link(g_uri_error_quark, "g_uri_error_quark", LIBRARY_GLIB); + Linker.link(g_uri_escape_bytes, "g_uri_escape_bytes", LIBRARY_GLIB); + Linker.link(g_uri_escape_string, "g_uri_escape_string", LIBRARY_GLIB); + Linker.link(g_uri_is_valid, "g_uri_is_valid", LIBRARY_GLIB); + Linker.link(g_uri_join, "g_uri_join", LIBRARY_GLIB); + Linker.link(g_uri_join_with_user, "g_uri_join_with_user", LIBRARY_GLIB); + Linker.link(g_uri_list_extract_uris, "g_uri_list_extract_uris", LIBRARY_GLIB); + Linker.link(g_uri_parse, "g_uri_parse", LIBRARY_GLIB); + Linker.link(g_uri_parse_params, "g_uri_parse_params", LIBRARY_GLIB); + Linker.link(g_uri_parse_scheme, "g_uri_parse_scheme", LIBRARY_GLIB); + Linker.link(g_uri_peek_scheme, "g_uri_peek_scheme", LIBRARY_GLIB); + Linker.link(g_uri_resolve_relative, "g_uri_resolve_relative", LIBRARY_GLIB); + Linker.link(g_uri_split, "g_uri_split", LIBRARY_GLIB); + Linker.link(g_uri_split_network, "g_uri_split_network", LIBRARY_GLIB); + Linker.link(g_uri_split_with_user, "g_uri_split_with_user", LIBRARY_GLIB); + Linker.link(g_uri_unescape_bytes, "g_uri_unescape_bytes", LIBRARY_GLIB); + Linker.link(g_uri_unescape_segment, "g_uri_unescape_segment", LIBRARY_GLIB); + Linker.link(g_uri_unescape_string, "g_uri_unescape_string", LIBRARY_GLIB); + + // glib.UriParamsIter + + Linker.link(g_uri_params_iter_init, "g_uri_params_iter_init", LIBRARY_GLIB); + Linker.link(g_uri_params_iter_next, "g_uri_params_iter_next", LIBRARY_GLIB); // glib.Variant @@ -1350,7 +1446,9 @@ shared static this() Linker.link(g_module_symbol, "g_module_symbol", LIBRARY_GLIB); Linker.link(g_module_build_path, "g_module_build_path", LIBRARY_GLIB); Linker.link(g_module_error, "g_module_error", LIBRARY_GLIB); + Linker.link(g_module_error_quark, "g_module_error_quark", LIBRARY_GLIB); Linker.link(g_module_open, "g_module_open", LIBRARY_GLIB); + Linker.link(g_module_open_full, "g_module_open_full", LIBRARY_GLIB); Linker.link(g_module_supported, "g_module_supported", LIBRARY_GLIB); // glib.Base64 @@ -1773,11 +1871,6 @@ shared static this() Linker.link(g_filename_from_uri, "g_filename_from_uri", LIBRARY_GLIB); Linker.link(g_filename_to_uri, "g_filename_to_uri", LIBRARY_GLIB); - Linker.link(g_uri_escape_string, "g_uri_escape_string", LIBRARY_GLIB); - Linker.link(g_uri_list_extract_uris, "g_uri_list_extract_uris", LIBRARY_GLIB); - Linker.link(g_uri_parse_scheme, "g_uri_parse_scheme", LIBRARY_GLIB); - Linker.link(g_uri_unescape_segment, "g_uri_unescape_segment", LIBRARY_GLIB); - Linker.link(g_uri_unescape_string, "g_uri_unescape_string", LIBRARY_GLIB); // glib.Uuid @@ -1857,7 +1950,9 @@ __gshared extern(C) void function(GBookmarkFile* bookmark, const(char)* uri, const(char)* group) c_g_bookmark_file_add_group; void function(GBookmarkFile* bookmark) c_g_bookmark_file_free; uint function(GBookmarkFile* bookmark, const(char)* uri, GError** err) c_g_bookmark_file_get_added; + GDateTime* function(GBookmarkFile* bookmark, const(char)* uri, GError** err) c_g_bookmark_file_get_added_date_time; int function(GBookmarkFile* bookmark, const(char)* uri, const(char)* name, char** exec, uint* count, uint* stamp, GError** err) c_g_bookmark_file_get_app_info; + int function(GBookmarkFile* bookmark, const(char)* uri, const(char)* name, char** exec, uint* count, GDateTime** stamp, GError** err) c_g_bookmark_file_get_application_info; char** function(GBookmarkFile* bookmark, const(char)* uri, size_t* length, GError** err) c_g_bookmark_file_get_applications; char* function(GBookmarkFile* bookmark, const(char)* uri, GError** err) c_g_bookmark_file_get_description; char** function(GBookmarkFile* bookmark, const(char)* uri, size_t* length, GError** err) c_g_bookmark_file_get_groups; @@ -1865,10 +1960,12 @@ __gshared extern(C) int function(GBookmarkFile* bookmark, const(char)* uri, GError** err) c_g_bookmark_file_get_is_private; char* function(GBookmarkFile* bookmark, const(char)* uri, GError** err) c_g_bookmark_file_get_mime_type; uint function(GBookmarkFile* bookmark, const(char)* uri, GError** err) c_g_bookmark_file_get_modified; + GDateTime* function(GBookmarkFile* bookmark, const(char)* uri, GError** err) c_g_bookmark_file_get_modified_date_time; int function(GBookmarkFile* bookmark) c_g_bookmark_file_get_size; char* function(GBookmarkFile* bookmark, const(char)* uri, GError** err) c_g_bookmark_file_get_title; char** function(GBookmarkFile* bookmark, size_t* length) c_g_bookmark_file_get_uris; uint function(GBookmarkFile* bookmark, const(char)* uri, GError** err) c_g_bookmark_file_get_visited; + GDateTime* function(GBookmarkFile* bookmark, const(char)* uri, GError** err) c_g_bookmark_file_get_visited_date_time; int function(GBookmarkFile* bookmark, const(char)* uri, const(char)* name, GError** err) c_g_bookmark_file_has_application; int function(GBookmarkFile* bookmark, const(char)* uri, const(char)* group, GError** err) c_g_bookmark_file_has_group; int function(GBookmarkFile* bookmark, const(char)* uri) c_g_bookmark_file_has_item; @@ -1880,15 +1977,19 @@ __gshared extern(C) int function(GBookmarkFile* bookmark, const(char)* uri, const(char)* group, GError** err) c_g_bookmark_file_remove_group; int function(GBookmarkFile* bookmark, const(char)* uri, GError** err) c_g_bookmark_file_remove_item; void function(GBookmarkFile* bookmark, const(char)* uri, uint added) c_g_bookmark_file_set_added; + void function(GBookmarkFile* bookmark, const(char)* uri, GDateTime* added) c_g_bookmark_file_set_added_date_time; int function(GBookmarkFile* bookmark, const(char)* uri, const(char)* name, const(char)* exec, int count, uint stamp, GError** err) c_g_bookmark_file_set_app_info; + int function(GBookmarkFile* bookmark, const(char)* uri, const(char)* name, const(char)* exec, int count, GDateTime* stamp, GError** err) c_g_bookmark_file_set_application_info; void function(GBookmarkFile* bookmark, const(char)* uri, const(char)* description) c_g_bookmark_file_set_description; void function(GBookmarkFile* bookmark, const(char)* uri, char** groups, size_t length) c_g_bookmark_file_set_groups; void function(GBookmarkFile* bookmark, const(char)* uri, const(char)* href, const(char)* mimeType) c_g_bookmark_file_set_icon; void function(GBookmarkFile* bookmark, const(char)* uri, int isPrivate) c_g_bookmark_file_set_is_private; void function(GBookmarkFile* bookmark, const(char)* uri, const(char)* mimeType) c_g_bookmark_file_set_mime_type; void function(GBookmarkFile* bookmark, const(char)* uri, uint modified) c_g_bookmark_file_set_modified; + void function(GBookmarkFile* bookmark, const(char)* uri, GDateTime* modified) c_g_bookmark_file_set_modified_date_time; void function(GBookmarkFile* bookmark, const(char)* uri, const(char)* title) c_g_bookmark_file_set_title; void function(GBookmarkFile* bookmark, const(char)* uri, uint visited) c_g_bookmark_file_set_visited; + void function(GBookmarkFile* bookmark, const(char)* uri, GDateTime* visited) c_g_bookmark_file_set_visited_date_time; char* function(GBookmarkFile* bookmark, size_t* length, GError** err) c_g_bookmark_file_to_data; int function(GBookmarkFile* bookmark, char* filename, GError** err) c_g_bookmark_file_to_file; GQuark function() c_g_bookmark_file_error_quark; @@ -1922,6 +2023,7 @@ __gshared extern(C) int function(void* bytes1, void* bytes2) c_g_bytes_compare; int function(void* bytes1, void* bytes2) c_g_bytes_equal; void* function(GBytes* bytes, size_t* size) c_g_bytes_get_data; + void* function(GBytes* bytes, size_t elementSize, size_t offset, size_t nElements) c_g_bytes_get_region; size_t function(GBytes* bytes) c_g_bytes_get_size; uint function(void* bytes) c_g_bytes_hash; GBytes* function(GBytes* bytes, size_t offset, size_t length) c_g_bytes_new_from_bytes; @@ -2027,7 +2129,9 @@ __gshared extern(C) GDateTime* function(GDateTime* datetime, double seconds) c_g_date_time_add_seconds; GDateTime* function(GDateTime* datetime, int weeks) c_g_date_time_add_weeks; GDateTime* function(GDateTime* datetime, int years) c_g_date_time_add_years; + int function(void* dt1, void* dt2) c_g_date_time_compare; GTimeSpan function(GDateTime* end, GDateTime* begin) c_g_date_time_difference; + int function(void* dt1, void* dt2) c_g_date_time_equal; char* function(GDateTime* datetime, const(char)* format) c_g_date_time_format; char* function(GDateTime* datetime) c_g_date_time_format_iso8601; int function(GDateTime* datetime) c_g_date_time_get_day_of_month; @@ -2046,6 +2150,7 @@ __gshared extern(C) int function(GDateTime* datetime) c_g_date_time_get_week_of_year; int function(GDateTime* datetime) c_g_date_time_get_year; void function(GDateTime* datetime, int* year, int* month, int* day) c_g_date_time_get_ymd; + uint function(void* datetime) c_g_date_time_hash; int function(GDateTime* datetime) c_g_date_time_is_daylight_savings; GDateTime* function(GDateTime* datetime) c_g_date_time_ref; GDateTime* function(GDateTime* datetime) c_g_date_time_to_local; @@ -2054,9 +2159,6 @@ __gshared extern(C) long function(GDateTime* datetime) c_g_date_time_to_unix; GDateTime* function(GDateTime* datetime) c_g_date_time_to_utc; void function(GDateTime* datetime) c_g_date_time_unref; - int function(void* dt1, void* dt2) c_g_date_time_compare; - int function(void* dt1, void* dt2) c_g_date_time_equal; - uint function(void* datetime) c_g_date_time_hash; // glib.Directory @@ -2074,6 +2176,8 @@ __gshared extern(C) GError* function(GError* error) c_g_error_copy; void function(GError* error) c_g_error_free; int function(GError* error, GQuark domain, int code) c_g_error_matches; + GQuark function(const(char)* errorTypeName, size_t errorTypePrivateSize, GErrorInitFunc errorTypeInit, GErrorCopyFunc errorTypeCopy, GErrorClearFunc errorTypeClear) c_g_error_domain_register; + GQuark function(const(char)* errorTypeName, size_t errorTypePrivateSize, GErrorInitFunc errorTypeInit, GErrorCopyFunc errorTypeCopy, GErrorClearFunc errorTypeClear) c_g_error_domain_register_static; void function(GError** dest, GError* src) c_g_propagate_error; void function(GError** err, GQuark domain, int code, const(char)* message) c_g_set_error_literal; void function(GError** err, const(char)* format, ... ) c_g_prefix_error; @@ -2097,6 +2201,7 @@ __gshared extern(C) int function(GHashTable* hashTable, void* lookupKey, void** origKey, void** value) c_g_hash_table_lookup_extended; GHashTable* function(GHashFunc hashFunc, GEqualFunc keyEqualFunc) c_g_hash_table_new; GHashTable* function(GHashFunc hashFunc, GEqualFunc keyEqualFunc, GDestroyNotify keyDestroyFunc, GDestroyNotify valueDestroyFunc) c_g_hash_table_new_full; + GHashTable* function(GHashTable* otherHashTable) c_g_hash_table_new_similar; GHashTable* function(GHashTable* hashTable) c_g_hash_table_ref; int function(GHashTable* hashTable, void* key) c_g_hash_table_remove; void function(GHashTable* hashTable) c_g_hash_table_remove_all; @@ -2307,6 +2412,7 @@ __gshared extern(C) // glib.MainContext GMainContext* function() c_g_main_context_new; + GMainContext* function(GMainContextFlags flags) c_g_main_context_new_with_flags; int function(GMainContext* context) c_g_main_context_acquire; void function(GMainContext* context, GPollFD* fd, int priority) c_g_main_context_add_poll; int function(GMainContext* context, int maxPriority, GPollFD* fds, int nFds) c_g_main_context_check; @@ -2479,9 +2585,12 @@ __gshared extern(C) // glib.Pattern + GPatternSpec* function(const(char)* pattern) c_g_pattern_spec_new; + GPatternSpec* function(GPatternSpec* pspec) c_g_pattern_spec_copy; int function(GPatternSpec* pspec1, GPatternSpec* pspec2) c_g_pattern_spec_equal; void function(GPatternSpec* pspec) c_g_pattern_spec_free; - GPatternSpec* function(const(char)* pattern) c_g_pattern_spec_new; + int function(GPatternSpec* pspec, size_t stringLength, const(char)* string_, const(char)* stringReversed) c_g_pattern_spec_match; + int function(GPatternSpec* pspec, const(char)* string_) c_g_pattern_spec_match_string; int function(GPatternSpec* pspec, uint stringLength, const(char)* string_, const(char)* stringReversed) c_g_pattern_match; int function(const(char)* pattern, const(char)* string_) c_g_pattern_match_simple; int function(GPatternSpec* pspec, const(char)* string_) c_g_pattern_match_string; @@ -2767,6 +2876,7 @@ __gshared extern(C) void function(GSource* source, const(char)* name) c_g_source_set_name; void function(GSource* source, int priority) c_g_source_set_priority; void function(GSource* source, long readyTime) c_g_source_set_ready_time; + void function(GSource* source, const(char)* name) c_g_source_set_static_name; void function(GSource* source) c_g_source_unref; int function(uint tag) c_g_source_remove; int function(GSourceFuncs* funcs, void* userData) c_g_source_remove_by_funcs_user_data; @@ -2775,6 +2885,9 @@ __gshared extern(C) // glib.StringG + GString* function(const(char)* init) c_g_string_new; + GString* function(const(char)* init, ptrdiff_t len) c_g_string_new_len; + GString* function(size_t dflSize) c_g_string_sized_new; GString* function(GString* string_, const(char)* val) c_g_string_append; GString* function(GString* string_, char c) c_g_string_append_c; GString* function(GString* string_, const(char)* val, ptrdiff_t len) c_g_string_append_len; @@ -2802,13 +2915,11 @@ __gshared extern(C) GString* function(GString* string_, const(char)* val, ptrdiff_t len) c_g_string_prepend_len; GString* function(GString* string_, dchar wc) c_g_string_prepend_unichar; void function(GString* string_, const(char)* format, ... ) c_g_string_printf; + uint function(GString* string_, const(char)* find, const(char)* replace, uint limit) c_g_string_replace; GString* function(GString* string_, size_t len) c_g_string_set_size; GString* function(GString* string_, size_t len) c_g_string_truncate; GString* function(GString* string_) c_g_string_up; void function(GString* string_, const(char)* format, void* args) c_g_string_vprintf; - GString* function(const(char)* init) c_g_string_new; - GString* function(const(char)* init, ptrdiff_t len) c_g_string_new_len; - GString* function(size_t dflSize) c_g_string_sized_new; // glib.StringChunk @@ -2819,6 +2930,20 @@ __gshared extern(C) char* function(GStringChunk* chunk, const(char)* string_, ptrdiff_t len) c_g_string_chunk_insert_len; GStringChunk* function(size_t size) c_g_string_chunk_new; + // glib.StrvBuilder + + void function(GStrvBuilder* builder, const(char)* value) c_g_strv_builder_add; + void function(GStrvBuilder* builder, ... ) c_g_strv_builder_add_many; + void function(GStrvBuilder* builder, char** value) c_g_strv_builder_addv; + GStrv function(GStrvBuilder* builder) c_g_strv_builder_end; + GStrvBuilder* function(GStrvBuilder* builder) c_g_strv_builder_ref; + void function(GStrvBuilder* builder) c_g_strv_builder_unref; + GStrvBuilder* function() c_g_strv_builder_new; + + // glib.TestCase + + void function(GTestCase* testCase) c_g_test_case_free; + // glib.TestLogBuffer void function(GTestLogBuffer* tbuffer) c_g_test_log_buffer_free; @@ -2834,6 +2959,7 @@ __gshared extern(C) void function(GTestSuite* suite, GTestCase* testCase) c_g_test_suite_add; void function(GTestSuite* suite, GTestSuite* nestedsuite) c_g_test_suite_add_suite; + void function(GTestSuite* suite) c_g_test_suite_free; // glib.Thread @@ -2868,6 +2994,7 @@ __gshared extern(C) int function() c_g_thread_pool_get_max_unused_threads; uint function() c_g_thread_pool_get_num_unused_threads; GThreadPool* function(GFunc func, void* userData, int maxThreads, int exclusive, GError** err) c_g_thread_pool_new; + GThreadPool* function(GFunc func, void* userData, GDestroyNotify itemFreeFunc, int maxThreads, int exclusive, GError** err) c_g_thread_pool_new_full; void function(uint interval) c_g_thread_pool_set_max_idle_time; void function(int maxThreads) c_g_thread_pool_set_max_unused_threads; void function() c_g_thread_pool_stop_unused_threads; @@ -2885,6 +3012,7 @@ __gshared extern(C) // glib.TimeZone GTimeZone* function(const(char)* identifier) c_g_time_zone_new; + GTimeZone* function(const(char)* identifier) c_g_time_zone_new_identifier; GTimeZone* function() c_g_time_zone_new_local; GTimeZone* function(int seconds) c_g_time_zone_new_offset; GTimeZone* function() c_g_time_zone_new_utc; @@ -2917,23 +3045,84 @@ __gshared extern(C) // glib.BBTree + GTree* function(GCompareFunc keyCompareFunc) c_g_tree_new; + GTree* function(GCompareDataFunc keyCompareFunc, void* keyCompareData, GDestroyNotify keyDestroyFunc, GDestroyNotify valueDestroyFunc) c_g_tree_new_full; + GTree* function(GCompareDataFunc keyCompareFunc, void* keyCompareData) c_g_tree_new_with_data; void function(GTree* tree) c_g_tree_destroy; void function(GTree* tree, GTraverseFunc func, void* userData) c_g_tree_foreach; + void function(GTree* tree, GTraverseNodeFunc func, void* userData) c_g_tree_foreach_node; int function(GTree* tree) c_g_tree_height; void function(GTree* tree, void* key, void* value) c_g_tree_insert; + GTreeNode* function(GTree* tree, void* key, void* value) c_g_tree_insert_node; void* function(GTree* tree, void* key) c_g_tree_lookup; int function(GTree* tree, void* lookupKey, void** origKey, void** value) c_g_tree_lookup_extended; + GTreeNode* function(GTree* tree, void* key) c_g_tree_lookup_node; + GTreeNode* function(GTree* tree, void* key) c_g_tree_lower_bound; int function(GTree* tree) c_g_tree_nnodes; + GTreeNode* function(GTree* tree) c_g_tree_node_first; + GTreeNode* function(GTree* tree) c_g_tree_node_last; GTree* function(GTree* tree) c_g_tree_ref; int function(GTree* tree, void* key) c_g_tree_remove; + void function(GTree* tree) c_g_tree_remove_all; void function(GTree* tree, void* key, void* value) c_g_tree_replace; + GTreeNode* function(GTree* tree, void* key, void* value) c_g_tree_replace_node; void* function(GTree* tree, GCompareFunc searchFunc, void* userData) c_g_tree_search; + GTreeNode* function(GTree* tree, GCompareFunc searchFunc, void* userData) c_g_tree_search_node; int function(GTree* tree, void* key) c_g_tree_steal; void function(GTree* tree, GTraverseFunc traverseFunc, GTraverseType traverseType, void* userData) c_g_tree_traverse; void function(GTree* tree) c_g_tree_unref; - GTree* function(GCompareFunc keyCompareFunc) c_g_tree_new; - GTree* function(GCompareDataFunc keyCompareFunc, void* keyCompareData, GDestroyNotify keyDestroyFunc, GDestroyNotify valueDestroyFunc) c_g_tree_new_full; - GTree* function(GCompareDataFunc keyCompareFunc, void* keyCompareData) c_g_tree_new_with_data; + GTreeNode* function(GTree* tree, void* key) c_g_tree_upper_bound; + + // glib.TreeNode + + void* function(GTreeNode* node) c_g_tree_node_key; + GTreeNode* function(GTreeNode* node) c_g_tree_node_next; + GTreeNode* function(GTreeNode* node) c_g_tree_node_previous; + void* function(GTreeNode* node) c_g_tree_node_value; + + // glib.URI + + const(char)* function(GUri* uri) c_g_uri_get_auth_params; + GUriFlags function(GUri* uri) c_g_uri_get_flags; + const(char)* function(GUri* uri) c_g_uri_get_fragment; + const(char)* function(GUri* uri) c_g_uri_get_host; + const(char)* function(GUri* uri) c_g_uri_get_password; + const(char)* function(GUri* uri) c_g_uri_get_path; + int function(GUri* uri) c_g_uri_get_port; + const(char)* function(GUri* uri) c_g_uri_get_query; + const(char)* function(GUri* uri) c_g_uri_get_scheme; + const(char)* function(GUri* uri) c_g_uri_get_user; + const(char)* function(GUri* uri) c_g_uri_get_userinfo; + GUri* function(GUri* baseUri, const(char)* uriRef, GUriFlags flags, GError** err) c_g_uri_parse_relative; + GUri* function(GUri* uri) c_g_uri_ref; + char* function(GUri* uri) c_g_uri_to_string; + char* function(GUri* uri, GUriHideFlags flags) c_g_uri_to_string_partial; + void function(GUri* uri) c_g_uri_unref; + GUri* function(GUriFlags flags, const(char)* scheme, const(char)* userinfo, const(char)* host, int port, const(char)* path, const(char)* query, const(char)* fragment) c_g_uri_build; + GUri* function(GUriFlags flags, const(char)* scheme, const(char)* user, const(char)* password, const(char)* authParams, const(char)* host, int port, const(char)* path, const(char)* query, const(char)* fragment) c_g_uri_build_with_user; + GQuark function() c_g_uri_error_quark; + char* function(ubyte* unescaped, size_t length, const(char)* reservedCharsAllowed) c_g_uri_escape_bytes; + char* function(const(char)* unescaped, const(char)* reservedCharsAllowed, int allowUtf8) c_g_uri_escape_string; + int function(const(char)* uriString, GUriFlags flags, GError** err) c_g_uri_is_valid; + char* function(GUriFlags flags, const(char)* scheme, const(char)* userinfo, const(char)* host, int port, const(char)* path, const(char)* query, const(char)* fragment) c_g_uri_join; + char* function(GUriFlags flags, const(char)* scheme, const(char)* user, const(char)* password, const(char)* authParams, const(char)* host, int port, const(char)* path, const(char)* query, const(char)* fragment) c_g_uri_join_with_user; + char** function(const(char)* uriList) c_g_uri_list_extract_uris; + GUri* function(const(char)* uriString, GUriFlags flags, GError** err) c_g_uri_parse; + GHashTable* function(const(char)* params, ptrdiff_t length, const(char)* separators, GUriParamsFlags flags, GError** err) c_g_uri_parse_params; + char* function(const(char)* uri) c_g_uri_parse_scheme; + const(char)* function(const(char)* uri) c_g_uri_peek_scheme; + char* function(const(char)* baseUriString, const(char)* uriRef, GUriFlags flags, GError** err) c_g_uri_resolve_relative; + int function(const(char)* uriRef, GUriFlags flags, char** scheme, char** userinfo, char** host, int* port, char** path, char** query, char** fragment, GError** err) c_g_uri_split; + int function(const(char)* uriString, GUriFlags flags, char** scheme, char** host, int* port, GError** err) c_g_uri_split_network; + int function(const(char)* uriRef, GUriFlags flags, char** scheme, char** user, char** password, char** authParams, char** host, int* port, char** path, char** query, char** fragment, GError** err) c_g_uri_split_with_user; + GBytes* function(const(char)* escapedString, ptrdiff_t length, const(char)* illegalCharacters, GError** err) c_g_uri_unescape_bytes; + char* function(const(char)* escapedString, const(char)* escapedStringEnd, const(char)* illegalCharacters) c_g_uri_unescape_segment; + char* function(const(char)* escapedString, const(char)* illegalCharacters) c_g_uri_unescape_string; + + // glib.UriParamsIter + + void function(GUriParamsIter* iter, const(char)* params, ptrdiff_t length, const(char)* separators, GUriParamsFlags flags) c_g_uri_params_iter_init; + int function(GUriParamsIter* iter, char** attribute, char** value, GError** err) c_g_uri_params_iter_next; // glib.Variant @@ -3110,7 +3299,9 @@ __gshared extern(C) int function(GModule* module_, const(char)* symbolName, void** symbol) c_g_module_symbol; char* function(const(char)* directory, const(char)* moduleName) c_g_module_build_path; const(char)* function() c_g_module_error; + GQuark function() c_g_module_error_quark; GModule* function(const(char)* fileName, GModuleFlags flags) c_g_module_open; + GModule* function(const(char)* fileName, GModuleFlags flags, GError** err) c_g_module_open_full; int function() c_g_module_supported; // glib.Base64 @@ -3144,13 +3335,13 @@ __gshared extern(C) int function(char* workingDirectory, char** argv, char** envp, GSpawnFlags flags, GSpawnChildSetupFunc childSetup, void* userData, GPid* childPid, GError** err) c_g_spawn_async; int function(char* workingDirectory, char** argv, char** envp, GSpawnFlags flags, GSpawnChildSetupFunc childSetup, void* userData, GPid* childPid, int* standardInput, int* standardOutput, int* standardError, GError** err) c_g_spawn_async_with_pipes; - int function(int exitStatus, GError** err) c_g_spawn_check_exit_status; + int function(int waitStatus, GError** err) c_g_spawn_check_exit_status; void function(GPid pid) c_g_spawn_close_pid; int function(char* commandLine, GError** err) c_g_spawn_command_line_async; - int function(char* commandLine, char** standardOutput, char** standardError, int* exitStatus, GError** err) c_g_spawn_command_line_sync; + int function(char* commandLine, char** standardOutput, char** standardError, int* waitStatus, GError** err) c_g_spawn_command_line_sync; GQuark function() c_g_spawn_error_quark; GQuark function() c_g_spawn_exit_error_quark; - int function(char* workingDirectory, char** argv, char** envp, GSpawnFlags flags, GSpawnChildSetupFunc childSetup, void* userData, char** standardOutput, char** standardError, int* exitStatus, GError** err) c_g_spawn_sync; + int function(char* workingDirectory, char** argv, char** envp, GSpawnFlags flags, GSpawnChildSetupFunc childSetup, void* userData, char** standardOutput, char** standardError, int* waitStatus, GError** err) c_g_spawn_sync; int function(char* workingDirectory, char** argv, char** envp, GSpawnFlags flags, GSpawnChildSetupFunc childSetup, void* userData, GPid* childPid, int stdinFd, int stdoutFd, int stderrFd, GError** err) c_g_spawn_async_with_fds; // glib.Str @@ -3533,11 +3724,6 @@ __gshared extern(C) char* function(const(char)* uri, char** hostname, GError** err) c_g_filename_from_uri; char* function(char* filename, const(char)* hostname, GError** err) c_g_filename_to_uri; - char* function(const(char)* unescaped, const(char)* reservedCharsAllowed, int allowUtf8) c_g_uri_escape_string; - char** function(const(char)* uriList) c_g_uri_list_extract_uris; - char* function(const(char)* uri) c_g_uri_parse_scheme; - char* function(const(char)* escapedString, const(char)* escapedStringEnd, const(char)* illegalCharacters) c_g_uri_unescape_segment; - char* function(const(char)* escapedString, const(char)* illegalCharacters) c_g_uri_unescape_string; // glib.Uuid @@ -3609,7 +3795,9 @@ alias c_g_bookmark_file_add_application g_bookmark_file_add_application; alias c_g_bookmark_file_add_group g_bookmark_file_add_group; alias c_g_bookmark_file_free g_bookmark_file_free; alias c_g_bookmark_file_get_added g_bookmark_file_get_added; +alias c_g_bookmark_file_get_added_date_time g_bookmark_file_get_added_date_time; alias c_g_bookmark_file_get_app_info g_bookmark_file_get_app_info; +alias c_g_bookmark_file_get_application_info g_bookmark_file_get_application_info; alias c_g_bookmark_file_get_applications g_bookmark_file_get_applications; alias c_g_bookmark_file_get_description g_bookmark_file_get_description; alias c_g_bookmark_file_get_groups g_bookmark_file_get_groups; @@ -3617,10 +3805,12 @@ alias c_g_bookmark_file_get_icon g_bookmark_file_get_icon; alias c_g_bookmark_file_get_is_private g_bookmark_file_get_is_private; alias c_g_bookmark_file_get_mime_type g_bookmark_file_get_mime_type; alias c_g_bookmark_file_get_modified g_bookmark_file_get_modified; +alias c_g_bookmark_file_get_modified_date_time g_bookmark_file_get_modified_date_time; alias c_g_bookmark_file_get_size g_bookmark_file_get_size; alias c_g_bookmark_file_get_title g_bookmark_file_get_title; alias c_g_bookmark_file_get_uris g_bookmark_file_get_uris; alias c_g_bookmark_file_get_visited g_bookmark_file_get_visited; +alias c_g_bookmark_file_get_visited_date_time g_bookmark_file_get_visited_date_time; alias c_g_bookmark_file_has_application g_bookmark_file_has_application; alias c_g_bookmark_file_has_group g_bookmark_file_has_group; alias c_g_bookmark_file_has_item g_bookmark_file_has_item; @@ -3632,15 +3822,19 @@ alias c_g_bookmark_file_remove_application g_bookmark_file_remove_application; alias c_g_bookmark_file_remove_group g_bookmark_file_remove_group; alias c_g_bookmark_file_remove_item g_bookmark_file_remove_item; alias c_g_bookmark_file_set_added g_bookmark_file_set_added; +alias c_g_bookmark_file_set_added_date_time g_bookmark_file_set_added_date_time; alias c_g_bookmark_file_set_app_info g_bookmark_file_set_app_info; +alias c_g_bookmark_file_set_application_info g_bookmark_file_set_application_info; alias c_g_bookmark_file_set_description g_bookmark_file_set_description; alias c_g_bookmark_file_set_groups g_bookmark_file_set_groups; alias c_g_bookmark_file_set_icon g_bookmark_file_set_icon; alias c_g_bookmark_file_set_is_private g_bookmark_file_set_is_private; alias c_g_bookmark_file_set_mime_type g_bookmark_file_set_mime_type; alias c_g_bookmark_file_set_modified g_bookmark_file_set_modified; +alias c_g_bookmark_file_set_modified_date_time g_bookmark_file_set_modified_date_time; alias c_g_bookmark_file_set_title g_bookmark_file_set_title; alias c_g_bookmark_file_set_visited g_bookmark_file_set_visited; +alias c_g_bookmark_file_set_visited_date_time g_bookmark_file_set_visited_date_time; alias c_g_bookmark_file_to_data g_bookmark_file_to_data; alias c_g_bookmark_file_to_file g_bookmark_file_to_file; alias c_g_bookmark_file_error_quark g_bookmark_file_error_quark; @@ -3674,6 +3868,7 @@ alias c_g_bytes_new_with_free_func g_bytes_new_with_free_func; alias c_g_bytes_compare g_bytes_compare; alias c_g_bytes_equal g_bytes_equal; alias c_g_bytes_get_data g_bytes_get_data; +alias c_g_bytes_get_region g_bytes_get_region; alias c_g_bytes_get_size g_bytes_get_size; alias c_g_bytes_hash g_bytes_hash; alias c_g_bytes_new_from_bytes g_bytes_new_from_bytes; @@ -3779,7 +3974,9 @@ alias c_g_date_time_add_months g_date_time_add_months; alias c_g_date_time_add_seconds g_date_time_add_seconds; alias c_g_date_time_add_weeks g_date_time_add_weeks; alias c_g_date_time_add_years g_date_time_add_years; +alias c_g_date_time_compare g_date_time_compare; alias c_g_date_time_difference g_date_time_difference; +alias c_g_date_time_equal g_date_time_equal; alias c_g_date_time_format g_date_time_format; alias c_g_date_time_format_iso8601 g_date_time_format_iso8601; alias c_g_date_time_get_day_of_month g_date_time_get_day_of_month; @@ -3798,6 +3995,7 @@ alias c_g_date_time_get_week_numbering_year g_date_time_get_week_numbering_year; alias c_g_date_time_get_week_of_year g_date_time_get_week_of_year; alias c_g_date_time_get_year g_date_time_get_year; alias c_g_date_time_get_ymd g_date_time_get_ymd; +alias c_g_date_time_hash g_date_time_hash; alias c_g_date_time_is_daylight_savings g_date_time_is_daylight_savings; alias c_g_date_time_ref g_date_time_ref; alias c_g_date_time_to_local g_date_time_to_local; @@ -3806,9 +4004,6 @@ alias c_g_date_time_to_timezone g_date_time_to_timezone; alias c_g_date_time_to_unix g_date_time_to_unix; alias c_g_date_time_to_utc g_date_time_to_utc; alias c_g_date_time_unref g_date_time_unref; -alias c_g_date_time_compare g_date_time_compare; -alias c_g_date_time_equal g_date_time_equal; -alias c_g_date_time_hash g_date_time_hash; // glib.Directory @@ -3826,6 +4021,8 @@ alias c_g_error_new_valist g_error_new_valist; alias c_g_error_copy g_error_copy; alias c_g_error_free g_error_free; alias c_g_error_matches g_error_matches; +alias c_g_error_domain_register g_error_domain_register; +alias c_g_error_domain_register_static g_error_domain_register_static; alias c_g_propagate_error g_propagate_error; alias c_g_set_error_literal g_set_error_literal; alias c_g_prefix_error g_prefix_error; @@ -3849,6 +4046,7 @@ alias c_g_hash_table_lookup g_hash_table_lookup; alias c_g_hash_table_lookup_extended g_hash_table_lookup_extended; alias c_g_hash_table_new g_hash_table_new; alias c_g_hash_table_new_full g_hash_table_new_full; +alias c_g_hash_table_new_similar g_hash_table_new_similar; alias c_g_hash_table_ref g_hash_table_ref; alias c_g_hash_table_remove g_hash_table_remove; alias c_g_hash_table_remove_all g_hash_table_remove_all; @@ -4059,6 +4257,7 @@ alias c_g_clear_list g_clear_list; // glib.MainContext alias c_g_main_context_new g_main_context_new; +alias c_g_main_context_new_with_flags g_main_context_new_with_flags; alias c_g_main_context_acquire g_main_context_acquire; alias c_g_main_context_add_poll g_main_context_add_poll; alias c_g_main_context_check g_main_context_check; @@ -4231,9 +4430,12 @@ alias c_g_option_group_unref g_option_group_unref; // glib.Pattern +alias c_g_pattern_spec_new g_pattern_spec_new; +alias c_g_pattern_spec_copy g_pattern_spec_copy; alias c_g_pattern_spec_equal g_pattern_spec_equal; alias c_g_pattern_spec_free g_pattern_spec_free; -alias c_g_pattern_spec_new g_pattern_spec_new; +alias c_g_pattern_spec_match g_pattern_spec_match; +alias c_g_pattern_spec_match_string g_pattern_spec_match_string; alias c_g_pattern_match g_pattern_match; alias c_g_pattern_match_simple g_pattern_match_simple; alias c_g_pattern_match_string g_pattern_match_string; @@ -4519,6 +4721,7 @@ alias c_g_source_set_funcs g_source_set_funcs; alias c_g_source_set_name g_source_set_name; alias c_g_source_set_priority g_source_set_priority; alias c_g_source_set_ready_time g_source_set_ready_time; +alias c_g_source_set_static_name g_source_set_static_name; alias c_g_source_unref g_source_unref; alias c_g_source_remove g_source_remove; alias c_g_source_remove_by_funcs_user_data g_source_remove_by_funcs_user_data; @@ -4527,6 +4730,9 @@ alias c_g_source_set_name_by_id g_source_set_name_by_id; // glib.StringG +alias c_g_string_new g_string_new; +alias c_g_string_new_len g_string_new_len; +alias c_g_string_sized_new g_string_sized_new; alias c_g_string_append g_string_append; alias c_g_string_append_c g_string_append_c; alias c_g_string_append_len g_string_append_len; @@ -4554,13 +4760,11 @@ alias c_g_string_prepend_c g_string_prepend_c; alias c_g_string_prepend_len g_string_prepend_len; alias c_g_string_prepend_unichar g_string_prepend_unichar; alias c_g_string_printf g_string_printf; +alias c_g_string_replace g_string_replace; alias c_g_string_set_size g_string_set_size; alias c_g_string_truncate g_string_truncate; alias c_g_string_up g_string_up; alias c_g_string_vprintf g_string_vprintf; -alias c_g_string_new g_string_new; -alias c_g_string_new_len g_string_new_len; -alias c_g_string_sized_new g_string_sized_new; // glib.StringChunk @@ -4571,6 +4775,20 @@ alias c_g_string_chunk_insert_const g_string_chunk_insert_const; alias c_g_string_chunk_insert_len g_string_chunk_insert_len; alias c_g_string_chunk_new g_string_chunk_new; +// glib.StrvBuilder + +alias c_g_strv_builder_add g_strv_builder_add; +alias c_g_strv_builder_add_many g_strv_builder_add_many; +alias c_g_strv_builder_addv g_strv_builder_addv; +alias c_g_strv_builder_end g_strv_builder_end; +alias c_g_strv_builder_ref g_strv_builder_ref; +alias c_g_strv_builder_unref g_strv_builder_unref; +alias c_g_strv_builder_new g_strv_builder_new; + +// glib.TestCase + +alias c_g_test_case_free g_test_case_free; + // glib.TestLogBuffer alias c_g_test_log_buffer_free g_test_log_buffer_free; @@ -4586,6 +4804,7 @@ alias c_g_test_log_msg_free g_test_log_msg_free; alias c_g_test_suite_add g_test_suite_add; alias c_g_test_suite_add_suite g_test_suite_add_suite; +alias c_g_test_suite_free g_test_suite_free; // glib.Thread @@ -4620,6 +4839,7 @@ alias c_g_thread_pool_get_max_idle_time g_thread_pool_get_max_idle_time; alias c_g_thread_pool_get_max_unused_threads g_thread_pool_get_max_unused_threads; alias c_g_thread_pool_get_num_unused_threads g_thread_pool_get_num_unused_threads; alias c_g_thread_pool_new g_thread_pool_new; +alias c_g_thread_pool_new_full g_thread_pool_new_full; alias c_g_thread_pool_set_max_idle_time g_thread_pool_set_max_idle_time; alias c_g_thread_pool_set_max_unused_threads g_thread_pool_set_max_unused_threads; alias c_g_thread_pool_stop_unused_threads g_thread_pool_stop_unused_threads; @@ -4637,6 +4857,7 @@ alias c_g_usleep g_usleep; // glib.TimeZone alias c_g_time_zone_new g_time_zone_new; +alias c_g_time_zone_new_identifier g_time_zone_new_identifier; alias c_g_time_zone_new_local g_time_zone_new_local; alias c_g_time_zone_new_offset g_time_zone_new_offset; alias c_g_time_zone_new_utc g_time_zone_new_utc; @@ -4669,23 +4890,84 @@ alias c_g_trash_stack_push g_trash_stack_push; // glib.BBTree +alias c_g_tree_new g_tree_new; +alias c_g_tree_new_full g_tree_new_full; +alias c_g_tree_new_with_data g_tree_new_with_data; alias c_g_tree_destroy g_tree_destroy; alias c_g_tree_foreach g_tree_foreach; +alias c_g_tree_foreach_node g_tree_foreach_node; alias c_g_tree_height g_tree_height; alias c_g_tree_insert g_tree_insert; +alias c_g_tree_insert_node g_tree_insert_node; alias c_g_tree_lookup g_tree_lookup; alias c_g_tree_lookup_extended g_tree_lookup_extended; +alias c_g_tree_lookup_node g_tree_lookup_node; +alias c_g_tree_lower_bound g_tree_lower_bound; alias c_g_tree_nnodes g_tree_nnodes; +alias c_g_tree_node_first g_tree_node_first; +alias c_g_tree_node_last g_tree_node_last; alias c_g_tree_ref g_tree_ref; alias c_g_tree_remove g_tree_remove; +alias c_g_tree_remove_all g_tree_remove_all; alias c_g_tree_replace g_tree_replace; +alias c_g_tree_replace_node g_tree_replace_node; alias c_g_tree_search g_tree_search; +alias c_g_tree_search_node g_tree_search_node; alias c_g_tree_steal g_tree_steal; alias c_g_tree_traverse g_tree_traverse; alias c_g_tree_unref g_tree_unref; -alias c_g_tree_new g_tree_new; -alias c_g_tree_new_full g_tree_new_full; -alias c_g_tree_new_with_data g_tree_new_with_data; +alias c_g_tree_upper_bound g_tree_upper_bound; + +// glib.TreeNode + +alias c_g_tree_node_key g_tree_node_key; +alias c_g_tree_node_next g_tree_node_next; +alias c_g_tree_node_previous g_tree_node_previous; +alias c_g_tree_node_value g_tree_node_value; + +// glib.URI + +alias c_g_uri_get_auth_params g_uri_get_auth_params; +alias c_g_uri_get_flags g_uri_get_flags; +alias c_g_uri_get_fragment g_uri_get_fragment; +alias c_g_uri_get_host g_uri_get_host; +alias c_g_uri_get_password g_uri_get_password; +alias c_g_uri_get_path g_uri_get_path; +alias c_g_uri_get_port g_uri_get_port; +alias c_g_uri_get_query g_uri_get_query; +alias c_g_uri_get_scheme g_uri_get_scheme; +alias c_g_uri_get_user g_uri_get_user; +alias c_g_uri_get_userinfo g_uri_get_userinfo; +alias c_g_uri_parse_relative g_uri_parse_relative; +alias c_g_uri_ref g_uri_ref; +alias c_g_uri_to_string g_uri_to_string; +alias c_g_uri_to_string_partial g_uri_to_string_partial; +alias c_g_uri_unref g_uri_unref; +alias c_g_uri_build g_uri_build; +alias c_g_uri_build_with_user g_uri_build_with_user; +alias c_g_uri_error_quark g_uri_error_quark; +alias c_g_uri_escape_bytes g_uri_escape_bytes; +alias c_g_uri_escape_string g_uri_escape_string; +alias c_g_uri_is_valid g_uri_is_valid; +alias c_g_uri_join g_uri_join; +alias c_g_uri_join_with_user g_uri_join_with_user; +alias c_g_uri_list_extract_uris g_uri_list_extract_uris; +alias c_g_uri_parse g_uri_parse; +alias c_g_uri_parse_params g_uri_parse_params; +alias c_g_uri_parse_scheme g_uri_parse_scheme; +alias c_g_uri_peek_scheme g_uri_peek_scheme; +alias c_g_uri_resolve_relative g_uri_resolve_relative; +alias c_g_uri_split g_uri_split; +alias c_g_uri_split_network g_uri_split_network; +alias c_g_uri_split_with_user g_uri_split_with_user; +alias c_g_uri_unescape_bytes g_uri_unescape_bytes; +alias c_g_uri_unescape_segment g_uri_unescape_segment; +alias c_g_uri_unescape_string g_uri_unescape_string; + +// glib.UriParamsIter + +alias c_g_uri_params_iter_init g_uri_params_iter_init; +alias c_g_uri_params_iter_next g_uri_params_iter_next; // glib.Variant @@ -4862,7 +5144,9 @@ alias c_g_module_name g_module_name; alias c_g_module_symbol g_module_symbol; alias c_g_module_build_path g_module_build_path; alias c_g_module_error g_module_error; +alias c_g_module_error_quark g_module_error_quark; alias c_g_module_open g_module_open; +alias c_g_module_open_full g_module_open_full; alias c_g_module_supported g_module_supported; // glib.Base64 @@ -5285,11 +5569,6 @@ alias c_g_unix_signal_source_new g_unix_signal_source_new; alias c_g_filename_from_uri g_filename_from_uri; alias c_g_filename_to_uri g_filename_to_uri; -alias c_g_uri_escape_string g_uri_escape_string; -alias c_g_uri_list_extract_uris g_uri_list_extract_uris; -alias c_g_uri_parse_scheme g_uri_parse_scheme; -alias c_g_uri_unescape_segment g_uri_unescape_segment; -alias c_g_uri_unescape_string g_uri_unescape_string; // glib.Uuid diff --git a/generated/gtkd/glib/c/types.d b/generated/gtkd/glib/c/types.d index 36373d040..0cfd93ad7 100644 --- a/generated/gtkd/glib/c/types.d +++ b/generated/gtkd/glib/c/types.d @@ -103,14 +103,19 @@ alias void* GIConv; /** * Integer representing a day of the month; between 1 and 31. - * #G_DATE_BAD_DAY represents an invalid day of the month. + * + * The %G_DATE_BAD_DAY value represents an invalid day of the month. */ public alias ubyte GDateDay; /** - * Integer representing a year; #G_DATE_BAD_YEAR is the invalid - * value. The year must be 1 or higher; negative (BC) years are not - * allowed. The year is represented with four digits. + * Integer type representing a year. + * + * The %G_DATE_BAD_YEAR value is the invalid value. The year + * must be 1 or higher; negative ([BCE](https://en.wikipedia.org/wiki/Common_Era)) + * years are not allowed. + * + * The year is represented with four digits. */ public alias ushort GDateYear; @@ -176,7 +181,9 @@ public alias char** GStrv; /** * Simply a replacement for `time_t`. It has been deprecated * since it is not equivalent to `time_t` on 64-bit platforms - * with a 64-bit `time_t`. Unrelated to #GTimer. + * with a 64-bit `time_t`. + * + * Unrelated to #GTimer. * * Note that #GTime is defined to always be a 32-bit integer, * unlike `time_t` which may be 64-bit on some systems. Therefore, @@ -185,6 +192,7 @@ public alias char** GStrv; * function. * * Instead, do the following: + * * |[ * time_t ttime; * GTime gtime; @@ -372,8 +380,8 @@ public enum GDateDMY alias GDateDMY DateDMY; /** - * Enumeration representing a month; values are #G_DATE_JANUARY, - * #G_DATE_FEBRUARY, etc. #G_DATE_BAD_MONTH is the invalid value. + * Enumeration representing a month; values are %G_DATE_JANUARY, + * %G_DATE_FEBRUARY, etc. %G_DATE_BAD_MONTH is the invalid value. */ public enum GDateMonth { @@ -433,8 +441,8 @@ public enum GDateMonth alias GDateMonth DateMonth; /** - * Enumeration representing a day of the week; #G_DATE_MONDAY, - * #G_DATE_TUESDAY, etc. #G_DATE_BAD_WEEKDAY is an invalid weekday. + * Enumeration representing a day of the week; %G_DATE_MONDAY, + * %G_DATE_TUESDAY, etc. %G_DATE_BAD_WEEKDAY is an invalid weekday. */ public enum GDateWeekday { @@ -675,6 +683,45 @@ public enum GFileError } alias GFileError FileError; +/** + * Flags to pass to g_file_set_contents_full() to affect its safety and + * performance. + * + * Since: 2.66 + */ +public enum GFileSetContentsFlags +{ + /** + * No guarantees about file consistency or durability. + * The most dangerous setting, which is slightly faster than other settings. + */ + NONE = 0, + /** + * Guarantee file consistency: after a crash, + * either the old version of the file or the new version of the file will be + * available, but not a mixture. On Unix systems this equates to an `fsync()` + * on the file and use of an atomic `rename()` of the new version of the file + * over the old. + */ + CONSISTENT = 1, + /** + * Guarantee file durability: after a crash, the + * new version of the file will be available. On Unix systems this equates to + * an `fsync()` on the file (if %G_FILE_SET_CONTENTS_CONSISTENT is unset), or + * the effects of %G_FILE_SET_CONTENTS_CONSISTENT plus an `fsync()` on the + * directory containing the file after calling `rename()`. + */ + DURABLE = 2, + /** + * Only apply consistency and durability + * guarantees if the file already exists. This may speed up file operations + * if the file doesn’t currently exist, but may result in a corrupted version + * of the new file if the system crashes while writing it. + */ + ONLY_EXISTING = 4, +} +alias GFileSetContentsFlags FileSetContentsFlags; + /** * A test to perform on a file using g_file_test(). */ @@ -917,7 +964,7 @@ public enum GIOFlags alias GIOFlags IOFlags; /** - * Stati returned by most of the #GIOFuncs functions. + * Statuses returned by most of the #GIOFuncs functions. */ public enum GIOStatus { @@ -1073,6 +1120,28 @@ public enum GLogWriterOutput } alias GLogWriterOutput LogWriterOutput; +/** + * Flags to pass to g_main_context_new_with_flags() which affect the behaviour + * of a #GMainContext. + * + * Since: 2.72 + */ +public enum GMainContextFlags +{ + /** + * Default behaviour. + */ + NONE = 0, + /** + * Assume that polling for events will + * free the thread to process other jobs. That's useful if you're using + * `g_main_context_{prepare,query,check,dispatch}` to integrate GMainContext in + * other event loops. + */ + OWNERLESS_POLLING = 1, +} +alias GMainContextFlags MainContextFlags; + /** * A mixed enumerated type and flags field. You must specify one type * (string, strdup, boolean, tristate). Additionally, you may optionally @@ -1443,8 +1512,8 @@ public enum GRegexCompileFlags * newlines). The "start of line" metacharacter ("^") matches only * at the start of the string, while the "end of line" metacharacter * ("$") matches only at the end of the string, or before a terminating - * newline (unless #G_REGEX_DOLLAR_ENDONLY is set). When - * #G_REGEX_MULTILINE is set, the "start of line" and "end of line" + * newline (unless %G_REGEX_DOLLAR_ENDONLY is set). When + * %G_REGEX_MULTILINE is set, the "start of line" and "end of line" * constructs match immediately following or immediately before any * newline in the string, respectively, as well as at the very start * and end. This can be changed within a pattern by a "(?m)" option @@ -1479,7 +1548,7 @@ public enum GRegexCompileFlags * matches only at the end of the string. Without this option, a * dollar also matches immediately before the final character if * it is a newline (but not before any other newlines). This option - * is ignored if #G_REGEX_MULTILINE is set. + * is ignored if %G_REGEX_MULTILINE is set. */ DOLLAR_ENDONLY = 32, /** @@ -1856,7 +1925,7 @@ public enum GRegexMatchFlags /** * Specifies that first character of the string is * not the beginning of a line, so the circumflex metacharacter should - * not match before it. Setting this without #G_REGEX_MULTILINE (at + * not match before it. Setting this without %G_REGEX_MULTILINE (at * compile time) causes circumflex never to match. This option affects * only the behaviour of the circumflex metacharacter, it does not * affect "\A". @@ -1866,7 +1935,7 @@ public enum GRegexMatchFlags * Specifies that the end of the subject string is * not the end of a line, so the dollar metacharacter should not match * it nor (except in multiline mode) a newline immediately before it. - * Setting this without #G_REGEX_MULTILINE (at compile time) causes + * Setting this without %G_REGEX_MULTILINE (at compile time) causes * dollar never to match. This option affects only the behaviour of * the dollar metacharacter, it does not affect "\Z" or "\z". */ @@ -1933,18 +2002,18 @@ public enum GRegexMatchFlags */ BSR_ANY = 16777216, /** - * An alias for #G_REGEX_MATCH_PARTIAL. Since: 2.34 + * An alias for %G_REGEX_MATCH_PARTIAL. Since: 2.34 */ PARTIAL_SOFT = 32768, /** * Turns on the partial matching feature. In contrast to - * to #G_REGEX_MATCH_PARTIAL_SOFT, this stops matching as soon as a partial match + * to %G_REGEX_MATCH_PARTIAL_SOFT, this stops matching as soon as a partial match * is found, without continuing to search for a possible complete match. See * g_match_info_is_partial_match() for more information. Since: 2.34 */ PARTIAL_HARD = 134217728, /** - * Like #G_REGEX_MATCH_NOTEMPTY, but only applied to + * Like %G_REGEX_MATCH_NOTEMPTY, but only applied to * the start of the matched string. For anchored * patterns this can only happen for pattern containing "\K". Since: 2.34 */ @@ -2141,7 +2210,7 @@ public enum GSpawnFlags */ FILE_AND_ARGV_ZERO = 64, /** - * if `argv[0]` is not an abolute path, + * if `argv[0]` is not an absolute path, * it will be looked for in the `PATH` from the passed child environment. * Since: 2.34 */ @@ -2456,7 +2525,7 @@ public enum GTraverseFlags alias GTraverseFlags TraverseFlags; /** - * Specifies the type of traveral performed by g_tree_traverse(), + * Specifies the type of traversal performed by g_tree_traverse(), * g_node_traverse() and g_node_find(). The different orders are * illustrated here: * - In order: A, B, C, D, E, F, G, H, I @@ -2652,9 +2721,13 @@ public enum GUnicodeBreakType */ HANGUL_LVT_SYLLABLE = 35, /** - * Closing Parenthesis (CP). Since 2.28 + * Closing Parenthesis (CP). Since 2.28. Deprecated: 2.70: Use %G_UNICODE_BREAK_CLOSE_PARENTHESIS instead. */ CLOSE_PARANTHESIS = 36, + /** + * Closing Parenthesis (CP). Since 2.70 + */ + CLOSE_PARENTHESIS = 36, /** * Conditional Japanese Starter (CJ). Since: 2.32 */ @@ -3311,6 +3384,46 @@ public enum GUnicodeScript * Wcho. Since: 2.62 */ WANCHO = 152, + /** + * Chorasmian. Since: 2.66 + */ + CHORASMIAN = 153, + /** + * Dives Akuru. Since: 2.66 + */ + DIVES_AKURU = 154, + /** + * Khitan small script. Since: 2.66 + */ + KHITAN_SMALL_SCRIPT = 155, + /** + * Yezidi. Since: 2.66 + */ + YEZIDI = 156, + /** + * Cypro-Minoan. Since: 2.72 + */ + CYPRO_MINOAN = 157, + /** + * Old Uyghur. Since: 2.72 + */ + OLD_UYGHUR = 158, + /** + * Tangsa. Since: 2.72 + */ + TANGSA = 159, + /** + * Toto. Since: 2.72 + */ + TOTO = 160, + /** + * Vithkuqi. Since: 2.72 + */ + VITHKUQI = 161, + /** + * Mathematical notation. Since: 2.72 + */ + MATH = 162, } alias GUnicodeScript UnicodeScript; @@ -3444,6 +3557,196 @@ public enum GUnicodeType } alias GUnicodeType UnicodeType; +/** + * Error codes returned by #GUri methods. + * + * Since: 2.66 + */ +public enum GUriError +{ + /** + * Generic error if no more specific error is available. + * See the error message for details. + */ + FAILED = 0, + /** + * The scheme of a URI could not be parsed. + */ + BAD_SCHEME = 1, + /** + * The user/userinfo of a URI could not be parsed. + */ + BAD_USER = 2, + /** + * The password of a URI could not be parsed. + */ + BAD_PASSWORD = 3, + /** + * The authentication parameters of a URI could not be parsed. + */ + BAD_AUTH_PARAMS = 4, + /** + * The host of a URI could not be parsed. + */ + BAD_HOST = 5, + /** + * The port of a URI could not be parsed. + */ + BAD_PORT = 6, + /** + * The path of a URI could not be parsed. + */ + BAD_PATH = 7, + /** + * The query of a URI could not be parsed. + */ + BAD_QUERY = 8, + /** + * The fragment of a URI could not be parsed. + */ + BAD_FRAGMENT = 9, +} +alias GUriError UriError; + +/** + * Flags that describe a URI. + * + * When parsing a URI, if you need to choose different flags based on + * the type of URI, you can use g_uri_peek_scheme() on the URI string + * to check the scheme first, and use that to decide what flags to + * parse it with. + * + * Since: 2.66 + */ +public enum GUriFlags +{ + /** + * No flags set. + */ + NONE = 0, + /** + * Parse the URI more relaxedly than the + * [RFC 3986](https://tools.ietf.org/html/rfc3986) grammar specifies, + * fixing up or ignoring common mistakes in URIs coming from external + * sources. This is also needed for some obscure URI schemes where `;` + * separates the host from the path. Don’t use this flag unless you need to. + */ + PARSE_RELAXED = 1, + /** + * The userinfo field may contain a password, + * which will be separated from the username by `:`. + */ + HAS_PASSWORD = 2, + /** + * The userinfo may contain additional + * authentication-related parameters, which will be separated from + * the username and/or password by `;`. + */ + HAS_AUTH_PARAMS = 4, + /** + * When parsing a URI, this indicates that `%`-encoded + * characters in the userinfo, path, query, and fragment fields + * should not be decoded. (And likewise the host field if + * %G_URI_FLAGS_NON_DNS is also set.) When building a URI, it indicates + * that you have already `%`-encoded the components, and so #GUri + * should not do any encoding itself. + */ + ENCODED = 8, + /** + * The host component should not be assumed to be a + * DNS hostname or IP address (for example, for `smb` URIs with NetBIOS + * hostnames). + */ + NON_DNS = 16, + /** + * Same as %G_URI_FLAGS_ENCODED, for the query + * field only. + */ + ENCODED_QUERY = 32, + /** + * Same as %G_URI_FLAGS_ENCODED, for the path only. + */ + ENCODED_PATH = 64, + /** + * Same as %G_URI_FLAGS_ENCODED, for the + * fragment only. + */ + ENCODED_FRAGMENT = 128, + /** + * A scheme-based normalization will be applied. + * For example, when parsing an HTTP URI changing omitted path to `/` and + * omitted port to `80`; and when building a URI, changing empty path to `/` + * and default port `80`). This only supports a subset of known schemes. (Since: 2.68) + */ + SCHEME_NORMALIZE = 256, +} +alias GUriFlags UriFlags; + +/** + * Flags describing what parts of the URI to hide in + * g_uri_to_string_partial(). Note that %G_URI_HIDE_PASSWORD and + * %G_URI_HIDE_AUTH_PARAMS will only work if the #GUri was parsed with + * the corresponding flags. + * + * Since: 2.66 + */ +public enum GUriHideFlags +{ + /** + * No flags set. + */ + NONE = 0, + /** + * Hide the userinfo. + */ + USERINFO = 1, + /** + * Hide the password. + */ + PASSWORD = 2, + /** + * Hide the auth_params. + */ + AUTH_PARAMS = 4, + /** + * Hide the query. + */ + QUERY = 8, + /** + * Hide the fragment. + */ + FRAGMENT = 16, +} +alias GUriHideFlags UriHideFlags; + +/** + * Flags modifying the way parameters are handled by g_uri_parse_params() and + * #GUriParamsIter. + * + * Since: 2.66 + */ +public enum GUriParamsFlags +{ + /** + * No flags set. + */ + NONE = 0, + /** + * Parameter names are case insensitive. + */ + CASE_INSENSITIVE = 1, + /** + * Replace `+` with space character. Only useful for + * URLs on the web, using the `https` or `http` schemas. + */ + WWW_FORM = 2, + /** + * See %G_URI_FLAGS_PARSE_RELAXED. + */ + PARSE_RELAXED = 4, +} +alias GUriParamsFlags UriParamsFlags; + /** * These are logical ids for special directories which are defined * depending on the platform used. You should use g_get_user_special_dir() @@ -3664,6 +3967,24 @@ public enum GVariantParseError } alias GVariantParseError VariantParseError; +/** + * Errors returned by g_module_open_full(). + * + * Since: 2.70 + */ +public enum GModuleError +{ + /** + * there was an error loading or opening a module file + */ + FAILED = 0, + /** + * a module returned an error from its `g_module_check_init()` function + */ + CHECK_FAILED = 1, +} +alias GModuleError ModuleError; + /** * Flags passed to g_module_open(). * Note that these flags are not supported on all platforms. @@ -3738,9 +4059,9 @@ struct GCond } /** - * The #GData struct is an opaque data structure to represent a - * [Keyed Data List][glib-Keyed-Data-Lists]. It should only be - * accessed via the following functions. + * An opaque data structure that represents a keyed data list. + * + * See also: [Keyed data lists][glib-Keyed-Data-Lists]. */ struct GData; @@ -3809,7 +4130,7 @@ struct GDoubleIEEE754 struct GError { /** - * error domain, e.g. #G_FILE_ERROR + * error domain, e.g. %G_FILE_ERROR */ GQuark domain; /** @@ -4399,14 +4720,14 @@ struct GScannerConfig char* csetSkipCharacters; /** * specifies the characters which can start - * identifiers (the default is #G_CSET_a_2_z, "_", and #G_CSET_A_2_Z). + * identifiers (the default is %G_CSET_a_2_z, "_", and %G_CSET_A_2_Z). */ char* csetIdentifierFirst; /** * specifies the characters which can be used * in identifiers, after the first character (the default is - * #G_CSET_a_2_z, "_0123456789", #G_CSET_A_2_Z, #G_CSET_LATINS, - * #G_CSET_LATINC). + * %G_CSET_a_2_z, "_0123456789", %G_CSET_A_2_Z, %G_CSET_LATINS, + * %G_CSET_LATINC). */ char* csetIdentifierNth; /** @@ -4548,9 +4869,8 @@ struct GString struct GStringChunk; -/** - * An opaque structure representing a test case. - */ +struct GStrvBuilder; + struct GTestCase; struct GTestConfig @@ -4690,6 +5010,18 @@ struct GTrashStack struct GTree; +struct GTreeNode; + +struct GUri; + +struct GUriParamsIter +{ + int dummy0; + void* dummy1; + void* dummy2; + ubyte[256] dummy3; +} + struct GVariant; struct GVariantBuilder @@ -4735,16 +5067,20 @@ struct GModule; /** * Prototype of a #GChildWatchSource callback, called when a child - * process has exited. To interpret @status, see the documentation - * for g_spawn_check_exit_status(). + * process has exited. + * + * To interpret @wait_status, see the documentation + * for g_spawn_check_wait_status(). In particular, + * on Unix platforms, note that it is usually not equal + * to the integer passed to `exit()` or returned from `main()`. * * Params: * pid = the process id of the child process - * status = Status information about the child process, encoded + * waitStatus = Status information about the child process, encoded * in a platform-specific manner * userData = user data passed to g_child_watch_add() */ -public alias extern(C) void function(GPid pid, int status, void* userData) GChildWatchFunc; +public alias extern(C) void function(GPid pid, int waitStatus, void* userData) GChildWatchFunc; /** * Specifies the type of function passed to g_clear_handle_id(). @@ -4854,6 +5190,55 @@ public alias extern(C) void* function(void* data, void* userData) GDuplicateFunc */ public alias extern(C) int function(void* a, void* b) GEqualFunc; +/** + * Specifies the type of function which is called when an extended + * error instance is freed. It is passed the error pointer about to be + * freed, and should free the error's private data fields. + * + * Normally, it is better to use G_DEFINE_EXTENDED_ERROR(), as it + * already takes care of getting the private data from @error. + * + * Params: + * error = extended error to clear + * + * Since: 2.68 + */ +public alias extern(C) void function(GError* error) GErrorClearFunc; + +/** + * Specifies the type of function which is called when an extended + * error instance is copied. It is passed the pointer to the + * destination error and source error, and should copy only the fields + * of the private data from @src_error to @dest_error. + * + * Normally, it is better to use G_DEFINE_EXTENDED_ERROR(), as it + * already takes care of getting the private data from @src_error and + * @dest_error. + * + * Params: + * srcError = source extended error + * destError = destination extended error + * + * Since: 2.68 + */ +public alias extern(C) void function(GError* srcError, GError* destError) GErrorCopyFunc; + +/** + * Specifies the type of function which is called just after an + * extended error instance is created and its fields filled. It should + * only initialize the fields in the private data, which can be + * received with the generated `*_get_private()` function. + * + * Normally, it is better to use G_DEFINE_EXTENDED_ERROR(), as it + * already takes care of getting the private data from @error. + * + * Params: + * error = extended error + * + * Since: 2.68 + */ +public alias extern(C) void function(GError* error) GErrorInitFunc; + /** * Declares a type of function which takes an arbitrary * data pointer argument and has no return value. It is @@ -4927,7 +5312,7 @@ public alias extern(C) int function(void* key, void* value, void* userData) GHRF * a more secure hash function when using a GHashTable with keys * that originate in untrusted data (such as HTTP requests). * Using g_str_hash() in that situation might make your application - * vulerable to + * vulnerable to * [Algorithmic Complexity Attacks](https://lwn.net/Articles/474912/). * * The key to choosing a good hash is unpredictability. Even @@ -5255,8 +5640,8 @@ public alias extern(C) void function() GSourceDummyMarshal; * userData = data passed to the function, set when the source was * created with one of the above functions * - * Returns: %FALSE if the source should be removed. #G_SOURCE_CONTINUE and - * #G_SOURCE_REMOVE are more memorable names for the return value. + * Returns: %FALSE if the source should be removed. %G_SOURCE_CONTINUE and + * %G_SOURCE_REMOVE are more memorable names for the return value. */ public alias extern(C) int function(void* userData) GSourceFunc; @@ -5390,6 +5775,22 @@ public alias extern(C) const(char)* function(const(char)* str, void* data) GTran */ public alias extern(C) int function(void* key, void* value, void* data) GTraverseFunc; +/** + * Specifies the type of function passed to g_tree_foreach_node(). It is + * passed each node, together with the @user_data parameter passed to + * g_tree_foreach_node(). If the function returns %TRUE, the traversal is + * stopped. + * + * Params: + * node = a #GTreeNode + * data = user data passed to g_tree_foreach_node() + * + * Returns: %TRUE to stop the traversal + * + * Since: 2.68 + */ +public alias extern(C) int function(GTreeNode* node, void* data) GTraverseNodeFunc; + /** * The type of functions to be called when a UNIX fd watch source * triggers. @@ -5455,7 +5856,7 @@ alias G_ASCII_DTOSTR_BUF_SIZE = ASCII_DTOSTR_BUF_SIZE; /** * Specifies one of the possible types of byte order. - * See #G_BYTE_ORDER. + * See %G_BYTE_ORDER. */ enum BIG_ENDIAN = 4321; alias G_BIG_ENDIAN = BIG_ENDIAN; @@ -5545,7 +5946,7 @@ alias G_GINT16_MODIFIER = GINT16_MODIFIER; /** * This is the platform dependent conversion specifier for scanning - * and printing values of type #gint32. See also #G_GINT16_FORMAT. + * and printing values of type #gint32. See also %G_GINT16_FORMAT. */ enum GINT32_FORMAT = "i"; alias G_GINT32_FORMAT = GINT32_FORMAT; @@ -5553,14 +5954,14 @@ alias G_GINT32_FORMAT = GINT32_FORMAT; /** * The platform dependent length modifier for conversion specifiers * for scanning and printing values of type #gint32 or #guint32. It - * is a string literal. See also #G_GINT16_MODIFIER. + * is a string literal. See also %G_GINT16_MODIFIER. */ enum GINT32_MODIFIER = ""; alias G_GINT32_MODIFIER = GINT32_MODIFIER; /** * This is the platform dependent conversion specifier for scanning - * and printing values of type #gint64. See also #G_GINT16_FORMAT. + * and printing values of type #gint64. See also %G_GINT16_FORMAT. * * Some platforms do not support scanning and printing 64-bit integers, * even though the types are supported. On such platforms %G_GINT64_FORMAT @@ -5619,7 +6020,7 @@ alias G_GNUC_PRETTY_FUNCTION = GNUC_PRETTY_FUNCTION; /** * This is the platform dependent conversion specifier for scanning - * and printing values of type #gsize. See also #G_GINT16_FORMAT. + * and printing values of type #gsize. See also %G_GINT16_FORMAT. */ enum GSIZE_FORMAT = "lu"; alias G_GSIZE_FORMAT = GSIZE_FORMAT; @@ -5634,7 +6035,7 @@ alias G_GSIZE_MODIFIER = GSIZE_MODIFIER; /** * This is the platform dependent conversion specifier for scanning - * and printing values of type #gssize. See also #G_GINT16_FORMAT. + * and printing values of type #gssize. See also %G_GINT16_FORMAT. */ enum GSSIZE_FORMAT = "li"; alias G_GSSIZE_FORMAT = GSSIZE_FORMAT; @@ -5649,21 +6050,21 @@ alias G_GSSIZE_MODIFIER = GSSIZE_MODIFIER; /** * This is the platform dependent conversion specifier for scanning - * and printing values of type #guint16. See also #G_GINT16_FORMAT + * and printing values of type #guint16. See also %G_GINT16_FORMAT */ enum GUINT16_FORMAT = "hu"; alias G_GUINT16_FORMAT = GUINT16_FORMAT; /** * This is the platform dependent conversion specifier for scanning - * and printing values of type #guint32. See also #G_GINT16_FORMAT. + * and printing values of type #guint32. See also %G_GINT16_FORMAT. */ enum GUINT32_FORMAT = "u"; alias G_GUINT32_FORMAT = GUINT32_FORMAT; /** * This is the platform dependent conversion specifier for scanning - * and printing values of type #guint64. See also #G_GINT16_FORMAT. + * and printing values of type #guint64. See also %G_GINT16_FORMAT. * * Some platforms do not support scanning and printing 64-bit integers, * even though the types are supported. On such platforms %G_GUINT64_FORMAT @@ -5731,14 +6132,14 @@ enum KEY_FILE_DESKTOP_GROUP = "Desktop Entry"; alias G_KEY_FILE_DESKTOP_GROUP = KEY_FILE_DESKTOP_GROUP; /** - * A key under #G_KEY_FILE_DESKTOP_GROUP, whose value is a string list + * A key under %G_KEY_FILE_DESKTOP_GROUP, whose value is a string list * giving the available application actions. */ enum KEY_FILE_DESKTOP_KEY_ACTIONS = "Actions"; alias G_KEY_FILE_DESKTOP_KEY_ACTIONS = KEY_FILE_DESKTOP_KEY_ACTIONS; /** - * A key under #G_KEY_FILE_DESKTOP_GROUP, whose value is a list + * A key under %G_KEY_FILE_DESKTOP_GROUP, whose value is a list * of strings giving the categories in which the desktop entry * should be shown in a menu. */ @@ -5746,21 +6147,21 @@ enum KEY_FILE_DESKTOP_KEY_CATEGORIES = "Categories"; alias G_KEY_FILE_DESKTOP_KEY_CATEGORIES = KEY_FILE_DESKTOP_KEY_CATEGORIES; /** - * A key under #G_KEY_FILE_DESKTOP_GROUP, whose value is a localized + * A key under %G_KEY_FILE_DESKTOP_GROUP, whose value is a localized * string giving the tooltip for the desktop entry. */ enum KEY_FILE_DESKTOP_KEY_COMMENT = "Comment"; alias G_KEY_FILE_DESKTOP_KEY_COMMENT = KEY_FILE_DESKTOP_KEY_COMMENT; /** - * A key under #G_KEY_FILE_DESKTOP_GROUP, whose value is a boolean set to true - * if the application is D-Bus activatable. + * A key under %G_KEY_FILE_DESKTOP_GROUP, whose value is a boolean + * set to true if the application is D-Bus activatable. */ enum KEY_FILE_DESKTOP_KEY_DBUS_ACTIVATABLE = "DBusActivatable"; alias G_KEY_FILE_DESKTOP_KEY_DBUS_ACTIVATABLE = KEY_FILE_DESKTOP_KEY_DBUS_ACTIVATABLE; /** - * A key under #G_KEY_FILE_DESKTOP_GROUP, whose value is a string + * A key under %G_KEY_FILE_DESKTOP_GROUP, whose value is a string * giving the command line to execute. It is only valid for desktop * entries with the `Application` type. */ @@ -5768,21 +6169,21 @@ enum KEY_FILE_DESKTOP_KEY_EXEC = "Exec"; alias G_KEY_FILE_DESKTOP_KEY_EXEC = KEY_FILE_DESKTOP_KEY_EXEC; /** - * A key under #G_KEY_FILE_DESKTOP_GROUP, whose value is a localized + * A key under %G_KEY_FILE_DESKTOP_GROUP, whose value is a localized * string giving the generic name of the desktop entry. */ enum KEY_FILE_DESKTOP_KEY_GENERIC_NAME = "GenericName"; alias G_KEY_FILE_DESKTOP_KEY_GENERIC_NAME = KEY_FILE_DESKTOP_KEY_GENERIC_NAME; /** - * A key under #G_KEY_FILE_DESKTOP_GROUP, whose value is a boolean + * A key under %G_KEY_FILE_DESKTOP_GROUP, whose value is a boolean * stating whether the desktop entry has been deleted by the user. */ enum KEY_FILE_DESKTOP_KEY_HIDDEN = "Hidden"; alias G_KEY_FILE_DESKTOP_KEY_HIDDEN = KEY_FILE_DESKTOP_KEY_HIDDEN; /** - * A key under #G_KEY_FILE_DESKTOP_GROUP, whose value is a localized + * A key under %G_KEY_FILE_DESKTOP_GROUP, whose value is a localized * string giving the name of the icon to be displayed for the desktop * entry. */ @@ -5790,21 +6191,21 @@ enum KEY_FILE_DESKTOP_KEY_ICON = "Icon"; alias G_KEY_FILE_DESKTOP_KEY_ICON = KEY_FILE_DESKTOP_KEY_ICON; /** - * A key under #G_KEY_FILE_DESKTOP_GROUP, whose value is a list + * A key under %G_KEY_FILE_DESKTOP_GROUP, whose value is a list * of strings giving the MIME types supported by this desktop entry. */ enum KEY_FILE_DESKTOP_KEY_MIME_TYPE = "MimeType"; alias G_KEY_FILE_DESKTOP_KEY_MIME_TYPE = KEY_FILE_DESKTOP_KEY_MIME_TYPE; /** - * A key under #G_KEY_FILE_DESKTOP_GROUP, whose value is a localized + * A key under %G_KEY_FILE_DESKTOP_GROUP, whose value is a localized * string giving the specific name of the desktop entry. */ enum KEY_FILE_DESKTOP_KEY_NAME = "Name"; alias G_KEY_FILE_DESKTOP_KEY_NAME = KEY_FILE_DESKTOP_KEY_NAME; /** - * A key under #G_KEY_FILE_DESKTOP_GROUP, whose value is a list of + * A key under %G_KEY_FILE_DESKTOP_GROUP, whose value is a list of * strings identifying the environments that should not display the * desktop entry. */ @@ -5812,14 +6213,14 @@ enum KEY_FILE_DESKTOP_KEY_NOT_SHOW_IN = "NotShowIn"; alias G_KEY_FILE_DESKTOP_KEY_NOT_SHOW_IN = KEY_FILE_DESKTOP_KEY_NOT_SHOW_IN; /** - * A key under #G_KEY_FILE_DESKTOP_GROUP, whose value is a boolean + * A key under %G_KEY_FILE_DESKTOP_GROUP, whose value is a boolean * stating whether the desktop entry should be shown in menus. */ enum KEY_FILE_DESKTOP_KEY_NO_DISPLAY = "NoDisplay"; alias G_KEY_FILE_DESKTOP_KEY_NO_DISPLAY = KEY_FILE_DESKTOP_KEY_NO_DISPLAY; /** - * A key under #G_KEY_FILE_DESKTOP_GROUP, whose value is a list of + * A key under %G_KEY_FILE_DESKTOP_GROUP, whose value is a list of * strings identifying the environments that should display the * desktop entry. */ @@ -5827,7 +6228,7 @@ enum KEY_FILE_DESKTOP_KEY_ONLY_SHOW_IN = "OnlyShowIn"; alias G_KEY_FILE_DESKTOP_KEY_ONLY_SHOW_IN = KEY_FILE_DESKTOP_KEY_ONLY_SHOW_IN; /** - * A key under #G_KEY_FILE_DESKTOP_GROUP, whose value is a string + * A key under %G_KEY_FILE_DESKTOP_GROUP, whose value is a string * containing the working directory to run the program in. It is only * valid for desktop entries with the `Application` type. */ @@ -5835,7 +6236,7 @@ enum KEY_FILE_DESKTOP_KEY_PATH = "Path"; alias G_KEY_FILE_DESKTOP_KEY_PATH = KEY_FILE_DESKTOP_KEY_PATH; /** - * A key under #G_KEY_FILE_DESKTOP_GROUP, whose value is a boolean + * A key under %G_KEY_FILE_DESKTOP_GROUP, whose value is a boolean * stating whether the application supports the * [Startup Notification Protocol Specification](http://www.freedesktop.org/Standards/startup-notification-spec). */ @@ -5843,7 +6244,7 @@ enum KEY_FILE_DESKTOP_KEY_STARTUP_NOTIFY = "StartupNotify"; alias G_KEY_FILE_DESKTOP_KEY_STARTUP_NOTIFY = KEY_FILE_DESKTOP_KEY_STARTUP_NOTIFY; /** - * A key under #G_KEY_FILE_DESKTOP_GROUP, whose value is string + * A key under %G_KEY_FILE_DESKTOP_GROUP, whose value is string * identifying the WM class or name hint of a window that the application * will create, which can be used to emulate Startup Notification with * older applications. @@ -5852,16 +6253,16 @@ enum KEY_FILE_DESKTOP_KEY_STARTUP_WM_CLASS = "StartupWMClass"; alias G_KEY_FILE_DESKTOP_KEY_STARTUP_WM_CLASS = KEY_FILE_DESKTOP_KEY_STARTUP_WM_CLASS; /** - * A key under #G_KEY_FILE_DESKTOP_GROUP, whose value is a boolean + * A key under %G_KEY_FILE_DESKTOP_GROUP, whose value is a boolean * stating whether the program should be run in a terminal window. - * It is only valid for desktop entries with the - * `Application` type. + * + * It is only valid for desktop entries with the `Application` type. */ enum KEY_FILE_DESKTOP_KEY_TERMINAL = "Terminal"; alias G_KEY_FILE_DESKTOP_KEY_TERMINAL = KEY_FILE_DESKTOP_KEY_TERMINAL; /** - * A key under #G_KEY_FILE_DESKTOP_GROUP, whose value is a string + * A key under %G_KEY_FILE_DESKTOP_GROUP, whose value is a string * giving the file name of a binary on disk used to determine if the * program is actually installed. It is only valid for desktop entries * with the `Application` type. @@ -5870,17 +6271,18 @@ enum KEY_FILE_DESKTOP_KEY_TRY_EXEC = "TryExec"; alias G_KEY_FILE_DESKTOP_KEY_TRY_EXEC = KEY_FILE_DESKTOP_KEY_TRY_EXEC; /** - * A key under #G_KEY_FILE_DESKTOP_GROUP, whose value is a string - * giving the type of the desktop entry. Usually - * #G_KEY_FILE_DESKTOP_TYPE_APPLICATION, - * #G_KEY_FILE_DESKTOP_TYPE_LINK, or - * #G_KEY_FILE_DESKTOP_TYPE_DIRECTORY. + * A key under %G_KEY_FILE_DESKTOP_GROUP, whose value is a string + * giving the type of the desktop entry. + * + * Usually %G_KEY_FILE_DESKTOP_TYPE_APPLICATION, + * %G_KEY_FILE_DESKTOP_TYPE_LINK, or + * %G_KEY_FILE_DESKTOP_TYPE_DIRECTORY. */ enum KEY_FILE_DESKTOP_KEY_TYPE = "Type"; alias G_KEY_FILE_DESKTOP_KEY_TYPE = KEY_FILE_DESKTOP_KEY_TYPE; /** - * A key under #G_KEY_FILE_DESKTOP_GROUP, whose value is a string + * A key under %G_KEY_FILE_DESKTOP_GROUP, whose value is a string * giving the URL to access. It is only valid for desktop entries * with the `Link` type. */ @@ -5888,7 +6290,7 @@ enum KEY_FILE_DESKTOP_KEY_URL = "URL"; alias G_KEY_FILE_DESKTOP_KEY_URL = KEY_FILE_DESKTOP_KEY_URL; /** - * A key under #G_KEY_FILE_DESKTOP_GROUP, whose value is a string + * A key under %G_KEY_FILE_DESKTOP_GROUP, whose value is a string * giving the version of the Desktop Entry Specification used for * the desktop entry file. */ @@ -5896,21 +6298,21 @@ enum KEY_FILE_DESKTOP_KEY_VERSION = "Version"; alias G_KEY_FILE_DESKTOP_KEY_VERSION = KEY_FILE_DESKTOP_KEY_VERSION; /** - * The value of the #G_KEY_FILE_DESKTOP_KEY_TYPE, key for desktop + * The value of the %G_KEY_FILE_DESKTOP_KEY_TYPE, key for desktop * entries representing applications. */ enum KEY_FILE_DESKTOP_TYPE_APPLICATION = "Application"; alias G_KEY_FILE_DESKTOP_TYPE_APPLICATION = KEY_FILE_DESKTOP_TYPE_APPLICATION; /** - * The value of the #G_KEY_FILE_DESKTOP_KEY_TYPE, key for desktop + * The value of the %G_KEY_FILE_DESKTOP_KEY_TYPE, key for desktop * entries representing directories. */ enum KEY_FILE_DESKTOP_TYPE_DIRECTORY = "Directory"; alias G_KEY_FILE_DESKTOP_TYPE_DIRECTORY = KEY_FILE_DESKTOP_TYPE_DIRECTORY; /** - * The value of the #G_KEY_FILE_DESKTOP_KEY_TYPE, key for desktop + * The value of the %G_KEY_FILE_DESKTOP_KEY_TYPE, key for desktop * entries representing links to documents. */ enum KEY_FILE_DESKTOP_TYPE_LINK = "Link"; @@ -5918,7 +6320,7 @@ alias G_KEY_FILE_DESKTOP_TYPE_LINK = KEY_FILE_DESKTOP_TYPE_LINK; /** * Specifies one of the possible types of byte order. - * See #G_BYTE_ORDER. + * See %G_BYTE_ORDER. */ enum LITTLE_ENDIAN = 1234; alias G_LITTLE_ENDIAN = LITTLE_ENDIAN; @@ -6066,7 +6468,7 @@ alias G_MININT8 = MININT8; * application compile time, rather than from the library * linked against at application run time. */ -enum MINOR_VERSION = 64; +enum MINOR_VERSION = 72; alias GLIB_MINOR_VERSION = MINOR_VERSION; enum MODULE_SUFFIX = "so"; @@ -6080,7 +6482,7 @@ alias G_MODULE_SUFFIX = MODULE_SUFFIX; * or %G_OPTION_ARG_FILENAME_ARRAY. * * - * Using #G_OPTION_REMAINING instead of simply scanning `argv` + * Using %G_OPTION_REMAINING instead of simply scanning `argv` * for leftover arguments has the advantage that GOption takes care of * necessary encoding conversions for strings or filenames. */ @@ -6089,7 +6491,7 @@ alias G_OPTION_REMAINING = OPTION_REMAINING; /** * Specifies one of the possible types of byte order - * (currently unused). See #G_BYTE_ORDER. + * (currently unused). See %G_BYTE_ORDER. */ enum PDP_ENDIAN = 3412; alias G_PDP_ENDIAN = PDP_ENDIAN; @@ -6138,8 +6540,8 @@ alias G_PRIORITY_HIGH = PRIORITY_HIGH; /** * Use this for high priority idle functions. * - * GTK+ uses #G_PRIORITY_HIGH_IDLE + 10 for resizing operations, - * and #G_PRIORITY_HIGH_IDLE + 20 for redrawing operations. (This is + * GTK+ uses %G_PRIORITY_HIGH_IDLE + 10 for resizing operations, + * and %G_PRIORITY_HIGH_IDLE + 20 for redrawing operations. (This is * done to ensure that any pending resizes are processed before any * pending redraws, so that widgets are not redrawn twice unnecessarily.) */ @@ -6222,6 +6624,7 @@ alias GLIB_SYSDEF_MSG_PEEK = SYSDEF_MSG_PEEK; * - g_get_user_config_dir() * - g_get_system_data_dirs() * - g_get_user_data_dir() + * - g_get_user_state_dir() * - g_get_user_runtime_dir() * * The subdirectories may not be created by the test harness; as with normal @@ -6271,13 +6674,15 @@ enum UNICHAR_MAX_DECOMPOSITION_LENGTH = 18; alias G_UNICHAR_MAX_DECOMPOSITION_LENGTH = UNICHAR_MAX_DECOMPOSITION_LENGTH; /** - * Generic delimiters characters as defined in RFC 3986. Includes ":/?#[]@". + * Generic delimiters characters as defined in + * [RFC 3986](https://tools.ietf.org/html/rfc3986). Includes `:/?#[]@`. */ enum URI_RESERVED_CHARS_GENERIC_DELIMITERS = ":/?#[]@"; alias G_URI_RESERVED_CHARS_GENERIC_DELIMITERS = URI_RESERVED_CHARS_GENERIC_DELIMITERS; /** - * Subcomponent delimiter characters as defined in RFC 3986. Includes "!$&'()*+,;=". + * Subcomponent delimiter characters as defined in + * [RFC 3986](https://tools.ietf.org/html/rfc3986). Includes `!$&'()*+,;=`. */ enum URI_RESERVED_CHARS_SUBCOMPONENT_DELIMITERS = "!$&'()*+,;="; alias G_URI_RESERVED_CHARS_SUBCOMPONENT_DELIMITERS = URI_RESERVED_CHARS_SUBCOMPONENT_DELIMITERS; @@ -6294,3 +6699,6 @@ alias G_VA_COPY_AS_ARRAY = VA_COPY_AS_ARRAY; enum WIN32_MSG_HANDLE = 19981206; alias G_WIN32_MSG_HANDLE = WIN32_MSG_HANDLE; + +enum macro__has_attribute___noreturn__ = 0; +alias g_macro__has_attribute___noreturn__ = macro__has_attribute___noreturn__; diff --git a/generated/gtkd/gobject/Binding.d b/generated/gtkd/gobject/Binding.d index d871cb3ef..17b729832 100644 --- a/generated/gtkd/gobject/Binding.d +++ b/generated/gtkd/gobject/Binding.d @@ -25,6 +25,7 @@ module gobject.Binding; private import glib.Str; +private import glib.c.functions; private import gobject.ObjectG; private import gobject.c.functions; public import gobject.c.types; @@ -34,9 +35,10 @@ public import gtkc.gobjecttypes; /** * #GBinding is the representation of a binding between a property on a * #GObject instance (or source) and another property on another #GObject - * instance (or target). Whenever the source property changes, the same - * value is applied to the target property; for instance, the following - * binding: + * instance (or target). + * + * Whenever the source property changes, the same value is applied to the + * target property; for instance, the following binding: * * |[ * g_object_bind_property (object1, "property-a", @@ -147,6 +149,54 @@ public class Binding : ObjectG return g_binding_get_type(); } + /** + * Retrieves the #GObject instance used as the source of the binding. + * + * A #GBinding can outlive the source #GObject as the binding does not hold a + * strong reference to the source. If the source is destroyed before the + * binding then this function will return %NULL. + * + * Returns: the source #GObject, or %NULL if the + * source does not exist any more. + * + * Since: 2.68 + */ + public ObjectG dupSource() + { + auto __p = g_binding_dup_source(gBinding); + + if(__p is null) + { + return null; + } + + return ObjectG.getDObject!(ObjectG)(cast(GObject*) __p, true); + } + + /** + * Retrieves the #GObject instance used as the target of the binding. + * + * A #GBinding can outlive the target #GObject as the binding does not hold a + * strong reference to the target. If the target is destroyed before the + * binding then this function will return %NULL. + * + * Returns: the target #GObject, or %NULL if the + * target does not exist any more. + * + * Since: 2.68 + */ + public ObjectG dupTarget() + { + auto __p = g_binding_dup_target(gBinding); + + if(__p is null) + { + return null; + } + + return ObjectG.getDObject!(ObjectG)(cast(GObject*) __p, true); + } + /** * Retrieves the flags passed when constructing the #GBinding. * @@ -162,7 +212,19 @@ public class Binding : ObjectG /** * Retrieves the #GObject instance used as the source of the binding. * - * Returns: the source #GObject + * A #GBinding can outlive the source #GObject as the binding does not hold a + * strong reference to the source. If the source is destroyed before the + * binding then this function will return %NULL. + * + * Use g_binding_dup_source() if the source or binding are used from different + * threads as otherwise the pointer returned from this function might become + * invalid if the source is finalized from another thread in the meantime. + * + * Deprecated: Use g_binding_dup_source() for a safer version of this + * function. + * + * Returns: the source #GObject, or %NULL if the + * source does not exist any more. * * Since: 2.26 */ @@ -194,7 +256,19 @@ public class Binding : ObjectG /** * Retrieves the #GObject instance used as the target of the binding. * - * Returns: the target #GObject + * A #GBinding can outlive the target #GObject as the binding does not hold a + * strong reference to the target. If the target is destroyed before the + * binding then this function will return %NULL. + * + * Use g_binding_dup_target() if the target or binding are used from different + * threads as otherwise the pointer returned from this function might become + * invalid if the target is finalized from another thread in the meantime. + * + * Deprecated: Use g_binding_dup_target() for a safer version of this + * function. + * + * Returns: the target #GObject, or %NULL if the + * target does not exist any more. * * Since: 2.26 */ @@ -228,9 +302,13 @@ public class Binding : ObjectG * property expressed by @binding. * * This function will release the reference that is being held on - * the @binding instance; if you want to hold on to the #GBinding instance - * after calling g_binding_unbind(), you will need to hold a reference - * to it. + * the @binding instance if the binding is still bound; if you want to hold on + * to the #GBinding instance after calling g_binding_unbind(), you will need + * to hold a reference to it. + * + * Note however that this function does not take ownership of @binding, it + * only unrefs the reference that was initially created by + * g_object_bind_property() and is owned by the binding. * * Since: 2.38 */ diff --git a/generated/gtkd/gobject/BindingGroup.d b/generated/gtkd/gobject/BindingGroup.d new file mode 100644 index 000000000..66c1816d1 --- /dev/null +++ b/generated/gtkd/gobject/BindingGroup.d @@ -0,0 +1,220 @@ +/* + * This file is part of gtkD. + * + * gtkD is free software; you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 + * of the License, or (at your option) any later version, with + * some exceptions, please read the COPYING file. + * + * gtkD is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with gtkD; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110, USA + */ + +// generated automatically - do not change +// find conversion definition on APILookup.txt +// implement new conversion functionalities on the wrap.utils pakage + + +module gobject.BindingGroup; + +private import glib.ConstructionException; +private import glib.Str; +private import gobject.Closure; +private import gobject.ObjectG; +private import gobject.c.functions; +public import gobject.c.types; +public import gtkc.gobjecttypes; + + +/** + * The #GBindingGroup can be used to bind multiple properties + * from an object collectively. + * + * Use the various methods to bind properties from a single source + * object to multiple destination objects. Properties can be bound + * bidirectionally and are connected when the source object is set + * with g_binding_group_set_source(). + * + * Since: 2.72 + */ +public class BindingGroup : ObjectG +{ + /** the main Gtk struct */ + protected GBindingGroup* gBindingGroup; + + /** Get the main Gtk struct */ + public GBindingGroup* getBindingGroupStruct(bool transferOwnership = false) + { + if (transferOwnership) + ownedRef = false; + return gBindingGroup; + } + + /** the main Gtk struct as a void* */ + protected override void* getStruct() + { + return cast(void*)gBindingGroup; + } + + /** + * Sets our main struct and passes it to the parent class. + */ + public this (GBindingGroup* gBindingGroup, bool ownedRef = false) + { + this.gBindingGroup = gBindingGroup; + super(cast(GObject*)gBindingGroup, ownedRef); + } + + + /** */ + public static GType getType() + { + return g_binding_group_get_type(); + } + + /** + * Creates a new #GBindingGroup. + * + * Returns: a new #GBindingGroup + * + * Since: 2.72 + * + * Throws: ConstructionException GTK+ fails to create the object. + */ + public this() + { + auto __p = g_binding_group_new(); + + if(__p is null) + { + throw new ConstructionException("null returned by new"); + } + + this(cast(GBindingGroup*) __p, true); + } + + /** + * Creates a binding between @source_property on the source object + * and @target_property on @target. Whenever the @source_property + * is changed the @target_property is updated using the same value. + * The binding flag %G_BINDING_SYNC_CREATE is automatically specified. + * + * See g_object_bind_property() for more information. + * + * Params: + * sourceProperty = the property on the source to bind + * target = the target #GObject + * targetProperty = the property on @target to bind + * flags = the flags used to create the #GBinding + * + * Since: 2.72 + */ + public void bind(string sourceProperty, ObjectG target, string targetProperty, GBindingFlags flags) + { + g_binding_group_bind(gBindingGroup, Str.toStringz(sourceProperty), (target is null) ? null : target.getObjectGStruct(), Str.toStringz(targetProperty), flags); + } + + /** + * Creates a binding between @source_property on the source object and + * @target_property on @target, allowing you to set the transformation + * functions to be used by the binding. The binding flag + * %G_BINDING_SYNC_CREATE is automatically specified. + * + * See g_object_bind_property_full() for more information. + * + * Params: + * sourceProperty = the property on the source to bind + * target = the target #GObject + * targetProperty = the property on @target to bind + * flags = the flags used to create the #GBinding + * transformTo = the transformation function + * from the source object to the @target, or %NULL to use the default + * transformFrom = the transformation function + * from the @target to the source object, or %NULL to use the default + * userData = custom data to be passed to the transformation + * functions, or %NULL + * userDataDestroy = function to be called when disposing the binding, + * to free the resources used by the transformation functions + * + * Since: 2.72 + */ + public void bindFull(string sourceProperty, ObjectG target, string targetProperty, GBindingFlags flags, GBindingTransformFunc transformTo, GBindingTransformFunc transformFrom, void* userData, GDestroyNotify userDataDestroy) + { + g_binding_group_bind_full(gBindingGroup, Str.toStringz(sourceProperty), (target is null) ? null : target.getObjectGStruct(), Str.toStringz(targetProperty), flags, transformTo, transformFrom, userData, userDataDestroy); + } + + /** + * Creates a binding between @source_property on the source object and + * @target_property on @target, allowing you to set the transformation + * functions to be used by the binding. The binding flag + * %G_BINDING_SYNC_CREATE is automatically specified. + * + * This function is the language bindings friendly version of + * g_binding_group_bind_property_full(), using #GClosures + * instead of function pointers. + * + * See g_object_bind_property_with_closures() for more information. + * + * Params: + * sourceProperty = the property on the source to bind + * target = the target #GObject + * targetProperty = the property on @target to bind + * flags = the flags used to create the #GBinding + * transformTo = a #GClosure wrapping the + * transformation function from the source object to the @target, + * or %NULL to use the default + * transformFrom = a #GClosure wrapping the + * transformation function from the @target to the source object, + * or %NULL to use the default + * + * Since: 2.72 + */ + public void bindWithClosures(string sourceProperty, ObjectG target, string targetProperty, GBindingFlags flags, Closure transformTo, Closure transformFrom) + { + g_binding_group_bind_with_closures(gBindingGroup, Str.toStringz(sourceProperty), (target is null) ? null : target.getObjectGStruct(), Str.toStringz(targetProperty), flags, (transformTo is null) ? null : transformTo.getClosureStruct(), (transformFrom is null) ? null : transformFrom.getClosureStruct()); + } + + /** + * Gets the source object used for binding properties. + * + * Returns: a #GObject or %NULL. + * + * Since: 2.72 + */ + public ObjectG dupSource() + { + auto __p = g_binding_group_dup_source(gBindingGroup); + + if(__p is null) + { + return null; + } + + return ObjectG.getDObject!(ObjectG)(cast(GObject*) __p); + } + + /** + * Sets @source as the source object used for creating property + * bindings. If there is already a source object all bindings from it + * will be removed. + * + * Note that all properties that have been bound must exist on @source. + * + * Params: + * source = the source #GObject, + * or %NULL to clear it + * + * Since: 2.72 + */ + public void setSource(ObjectG source) + { + g_binding_group_set_source(gBindingGroup, (source is null) ? null : source.getObjectGStruct()); + } +} diff --git a/generated/gtkd/gobject/Boxed.d b/generated/gtkd/gobject/Boxed.d index b27c59166..a217c07e5 100644 --- a/generated/gtkd/gobject/Boxed.d +++ b/generated/gtkd/gobject/Boxed.d @@ -63,8 +63,14 @@ public struct Boxed /** * This function creates a new %G_TYPE_BOXED derived type id for a new - * boxed type with name @name. Boxed type handling functions have to be - * provided to copy and free opaque boxed structures of this type. + * boxed type with name @name. + * + * Boxed type handling functions have to be provided to copy and free + * opaque boxed structures of this type. + * + * For the general case, it is recommended to use G_DEFINE_BOXED_TYPE() + * instead of calling g_boxed_type_register_static() directly. The macro + * will create the appropriate `*_get_type()` function for the boxed type. * * Params: * name = Name of the new boxed type. diff --git a/generated/gtkd/gobject/Closure.d b/generated/gtkd/gobject/Closure.d index c30b2b23c..a99652285 100644 --- a/generated/gtkd/gobject/Closure.d +++ b/generated/gtkd/gobject/Closure.d @@ -35,8 +35,9 @@ private import gtkd.Loader; /** - * A #GClosure represents a callback supplied by the programmer. It - * will generally comprise a function of some kind and a marshaller + * A #GClosure represents a callback supplied by the programmer. + * + * It will generally comprise a function of some kind and a marshaller * used to call it. It is the responsibility of the marshaller to * convert the arguments for the invocation from #GValues into * a suitable form, perform the callback on the converted arguments, @@ -151,8 +152,9 @@ public class Closure /** * Allocates a struct of the given size and initializes the initial - * part as a #GClosure. This function is mainly useful when - * implementing new types of closures. + * part as a #GClosure. + * + * This function is mainly useful when implementing new types of closures: * * |[ * typedef struct _MyClosure MyClosure; @@ -210,11 +212,12 @@ public class Closure /** * Registers a finalization notifier which will be called when the - * reference count of @closure goes down to 0. Multiple finalization - * notifiers on a single closure are invoked in unspecified order. If - * a single call to g_closure_unref() results in the closure being - * both invalidated and finalized, then the invalidate notifiers will - * be run before the finalize notifiers. + * reference count of @closure goes down to 0. + * + * Multiple finalization notifiers on a single closure are invoked in + * unspecified order. If a single call to g_closure_unref() results in + * the closure being both invalidated and finalized, then the invalidate + * notifiers will be run before the finalize notifiers. * * Params: * notifyData = data to pass to @notify_func @@ -227,9 +230,10 @@ public class Closure /** * Registers an invalidation notifier which will be called when the - * @closure is invalidated with g_closure_invalidate(). Invalidation - * notifiers are invoked before finalization notifiers, in an - * unspecified order. + * @closure is invalidated with g_closure_invalidate(). + * + * Invalidation notifiers are invoked before finalization notifiers, + * in an unspecified order. * * Params: * notifyData = data to pass to @notify_func @@ -242,9 +246,11 @@ public class Closure /** * Adds a pair of notifiers which get invoked before and after the - * closure callback, respectively. This is typically used to protect - * the extra arguments for the duration of the callback. See - * g_object_watch_closure() for an example of marshal guards. + * closure callback, respectively. + * + * This is typically used to protect the extra arguments for the + * duration of the callback. See g_object_watch_closure() for an + * example of marshal guards. * * Params: * preMarshalData = data to pass @@ -263,7 +269,9 @@ public class Closure * Sets a flag on the closure to indicate that its calling * environment has become invalid, and thus causes any future * invocations of g_closure_invoke() on this @closure to be - * ignored. Also, invalidation notifiers installed on the closure will + * ignored. + * + * Also, invalidation notifiers installed on the closure will * be called at this point. Note that unless you are holding a * reference to the closure yourself, the invalidation notifiers may * unref the closure and cause it to be destroyed, so if you need to @@ -352,13 +360,17 @@ public class Closure } /** - * Sets the marshaller of @closure. The `marshal_data` - * of @marshal provides a way for a meta marshaller to provide additional - * information to the marshaller. (See g_closure_set_meta_marshal().) For - * GObject's C predefined marshallers (the g_cclosure_marshal_*() + * Sets the marshaller of @closure. + * + * The `marshal_data` of @marshal provides a way for a meta marshaller to + * provide additional information to the marshaller. + * + * For GObject's C predefined marshallers (the `g_cclosure_marshal_*()` * functions), what it provides is a callback function to use instead of * @closure->callback. * + * See also: g_closure_set_meta_marshal() + * * Params: * marshal = a #GClosureMarshal function */ @@ -368,12 +380,15 @@ public class Closure } /** - * Sets the meta marshaller of @closure. A meta marshaller wraps - * @closure->marshal and modifies the way it is called in some - * fashion. The most common use of this facility is for C callbacks. + * Sets the meta marshaller of @closure. + * + * A meta marshaller wraps the @closure's marshal and modifies the way + * it is called in some fashion. The most common use of this facility + * is for C callbacks. + * * The same marshallers (generated by [glib-genmarshal][glib-genmarshal]), * are used everywhere, but the way that we get the callback function - * differs. In most cases we want to use @closure->callback, but in + * differs. In most cases we want to use the @closure's callback, but in * other cases we want to use some different technique to retrieve the * callback function. * @@ -394,27 +409,34 @@ public class Closure } /** - * Takes over the initial ownership of a closure. Each closure is - * initially created in a "floating" state, which means that the initial - * reference count is not owned by any caller. g_closure_sink() checks - * to see if the object is still floating, and if so, unsets the - * floating state and decreases the reference count. If the closure - * is not floating, g_closure_sink() does nothing. The reason for the - * existence of the floating state is to prevent cumbersome code - * sequences like: + * Takes over the initial ownership of a closure. + * + * Each closure is initially created in a "floating" state, which means + * that the initial reference count is not owned by any caller. + * + * This function checks to see if the object is still floating, and if so, + * unsets the floating state and decreases the reference count. If the + * closure is not floating, g_closure_sink() does nothing. + * + * The reason for the existence of the floating state is to prevent + * cumbersome code sequences like: + * * |[ * closure = g_cclosure_new (cb_func, cb_data); * g_source_set_closure (source, closure); * g_closure_unref (closure); // GObject doesn't really need this * ]| + * * Because g_source_set_closure() (and similar functions) take ownership of the * initial reference count, if it is unowned, we instead can write: + * * |[ * g_source_set_closure (source, g_cclosure_new (cb_func, cb_data)); * ]| * - * Generally, this function is used together with g_closure_ref(). Ane example + * Generally, this function is used together with g_closure_ref(). An example * of storing a closure for later notification looks like: + * * |[ * static GClosure *notify_closure = NULL; * void @@ -442,8 +464,10 @@ public class Closure /** * Decrements the reference count of a closure after it was previously - * incremented by the same caller. If no other callers are using the - * closure, then the closure will be destroyed and freed. + * incremented by the same caller. + * + * If no other callers are using the closure, then the closure will be + * destroyed and freed. */ public void unref() { diff --git a/generated/gtkd/gobject/Enums.d b/generated/gtkd/gobject/Enums.d index 458872470..8ffc969c3 100644 --- a/generated/gtkd/gobject/Enums.d +++ b/generated/gtkd/gobject/Enums.d @@ -25,6 +25,7 @@ module gobject.Enums; private import glib.Str; +private import glib.c.functions; private import gobject.c.functions; public import gobject.c.types; public import gtkc.gobjecttypes; diff --git a/generated/gtkd/gobject/ObjectG.d b/generated/gtkd/gobject/ObjectG.d index 49209bb42..4c934699a 100644 --- a/generated/gtkd/gobject/ObjectG.d +++ b/generated/gtkd/gobject/ObjectG.d @@ -44,8 +44,18 @@ private import std.traits; /** - * All the fields in the GObject structure are private - * to the #GObject implementation and should never be accessed directly. + * The base object type. + * + * All the fields in the `GObject` structure are private to the implementation + * and should never be accessed directly. + * + * Since GLib 2.72, all #GObjects are guaranteed to be aligned to at least the + * alignment of the largest basic GLib type (typically this is #guint64 or + * #gdouble). If you need larger alignment for an element in a #GObject, you + * should allocate it on the heap (aligned), or arrange for your #GObject to be + * appropriately padded. This guarantee applies to the #GObject (or derived) + * struct, the #GObjectClass (or derived) struct, and any private data allocated + * by G_ADD_PRIVATE(). */ public class ObjectG { @@ -389,7 +399,7 @@ public class ObjectG /** * Creates a new instance of a #GObject subtype and sets its properties. * - * Construction parameters (see #G_PARAM_CONSTRUCT, #G_PARAM_CONSTRUCT_ONLY) + * Construction parameters (see %G_PARAM_CONSTRUCT, %G_PARAM_CONSTRUCT_ONLY) * which are not explicitly specified are set to their default values. * * Params: @@ -455,7 +465,7 @@ public class ObjectG /** * Creates a new instance of a #GObject subtype and sets its properties. * - * Construction parameters (see #G_PARAM_CONSTRUCT, #G_PARAM_CONSTRUCT_ONLY) + * Construction parameters (see %G_PARAM_CONSTRUCT, %G_PARAM_CONSTRUCT_ONLY) * which are not explicitly specified are set to their default values. * * Deprecated: Use g_object_new_with_properties() instead. @@ -652,10 +662,12 @@ public class ObjectG /** * Creates a binding between @source_property on @source and @target_property - * on @target. Whenever the @source_property is changed the @target_property is + * on @target. + * + * Whenever the @source_property is changed the @target_property is * updated using the same value. For instance: * - * |[ + * |[ * g_object_bind_property (action, "active", widget, "sensitive", 0); * ]| * @@ -672,6 +684,13 @@ public class ObjectG * @source and the @target you can just call g_object_unref() on the returned * #GBinding instance. * + * Removing the binding by calling g_object_unref() on it must only be done if + * the binding, @source and @target are only used from a single thread and it + * is clear that both @source and @target outlive the binding. Especially it + * is not safe to rely on this if the binding, @source or @target can be + * finalized from different threads. Keep another reference to the binding and + * use g_binding_unbind() instead to be on the safe side. + * * A #GObject can have multiple bindings. * * Params: @@ -1128,7 +1147,8 @@ public class ObjectG * notify = a function to call when this reference is the * last reference to the object, or is no longer * the last reference. - * data = data to pass to @notify + * data = data to pass to @notify, or %NULL to + * match any toggle refs with the @notify argument. * * Since: 2.8 */ @@ -1281,7 +1301,7 @@ public class ObjectG /** * This sets an opaque, named pointer on an object. - * The name is specified through a #GQuark (retrived e.g. via + * The name is specified through a #GQuark (retrieved e.g. via * g_quark_from_static_string()), and the pointer * can be gotten back from the @object with g_object_get_qdata() * until the @object is finalized. @@ -1381,7 +1401,7 @@ public class ObjectG * { * // the quark, naming the object data * GQuark quark_string_list = g_quark_from_static_string ("my-string-list"); - * // retrive the old string list + * // retrieve the old string list * GList *list = g_object_steal_qdata (object, quark_string_list); * * // prepend new string @@ -1414,6 +1434,59 @@ public class ObjectG return g_object_steal_qdata(gObject, quark); } + /** + * If @object is floating, sink it. Otherwise, do nothing. + * + * In other words, this function will convert a floating reference (if + * present) into a full reference. + * + * Typically you want to use g_object_ref_sink() in order to + * automatically do the correct thing with respect to floating or + * non-floating references, but there is one specific scenario where + * this function is helpful. + * + * The situation where this function is helpful is when creating an API + * that allows the user to provide a callback function that returns a + * GObject. We certainly want to allow the user the flexibility to + * return a non-floating reference from this callback (for the case + * where the object that is being returned already exists). + * + * At the same time, the API style of some popular GObject-based + * libraries (such as Gtk) make it likely that for newly-created GObject + * instances, the user can be saved some typing if they are allowed to + * return a floating reference. + * + * Using this function on the return value of the user's callback allows + * the user to do whichever is more convenient for them. The caller will + * alway receives exactly one full reference to the value: either the + * one that was returned in the first place, or a floating reference + * that has been converted to a full reference. + * + * This function has an odd interaction when combined with + * g_object_ref_sink() running at the same time in another thread on + * the same #GObject instance. If g_object_ref_sink() runs first then + * the result will be that the floating reference is converted to a hard + * reference. If g_object_take_ref() runs first then the result will be + * that the floating reference is converted to a hard reference and an + * additional reference on top of that one is added. It is best to avoid + * this situation. + * + * Returns: @object + * + * Since: 2.70 + */ + public ObjectG takeRef() + { + auto __p = g_object_take_ref(gObject); + + if(__p is null) + { + return null; + } + + return ObjectG.getDObject!(ObjectG)(cast(GObject*) __p, true); + } + /** * Reverts the effect of a previous call to * g_object_freeze_notify(). The freeze count is decreased on @object @@ -1465,7 +1538,7 @@ public class ObjectG /** * Adds a weak reference callback to an object. Weak references are - * used for notification when an object is finalized. They are called + * used for notification when an object is disposed. They are called * "weak references" because they allow you to safely hold a pointer * to an object without calling g_object_ref() (g_object_ref() adds a * strong reference, that is, forces the object to stay alive). diff --git a/generated/gtkd/gobject/ParamSpec.d b/generated/gtkd/gobject/ParamSpec.d index 11031d3ea..b39b0a1ee 100644 --- a/generated/gtkd/gobject/ParamSpec.d +++ b/generated/gtkd/gobject/ParamSpec.d @@ -25,6 +25,7 @@ module gobject.ParamSpec; private import glib.Str; +private import glib.c.functions; private import gobject.ObjectG; private import gobject.Value; private import gobject.c.functions; @@ -39,8 +40,8 @@ private import gtkd.Loader; * * ## Parameter names # {#canonical-parameter-names} * - * A property name consists of segments consisting of ASCII letters and - * digits, separated by either the `-` or `_` character. The first + * A property name consists of one or more segments consisting of ASCII letters + * and digits, separated by either the `-` or `_` character. The first * character of a property name must be a letter. These are the same rules as * for signal naming (see g_signal_new()). * @@ -98,13 +99,14 @@ public class ParamSpec * e.g. a tooltip. The @nick and @blurb should ideally be localized. * * Params: - * paramType = the #GType for the property; must be derived from #G_TYPE_PARAM + * paramType = the #GType for the property; must be derived from %G_TYPE_PARAM * name = the canonical name of the property * nick = the nickname of the property * blurb = a short description of the property * flags = a combination of #GParamFlags * - * Returns: a newly allocated #GParamSpec instance + * Returns: (transfer floating): a newly allocated + * #GParamSpec instance, which is initially floating */ public static ParamSpec internal(GType paramType, string name, string nick, string blurb, GParamFlags flags) { @@ -118,6 +120,26 @@ public class ParamSpec return ObjectG.getDObject!(ParamSpec)(cast(GParamSpec*) __p); } + /** + * Validate a property name for a #GParamSpec. This can be useful for + * dynamically-generated properties which need to be validated at run-time + * before actually trying to create them. + * + * See [canonical parameter names][canonical-parameter-names] for details of + * the rules for valid names. + * + * Params: + * name = the canonical name of the property + * + * Returns: %TRUE if @name is a valid property name, %FALSE otherwise. + * + * Since: 2.66 + */ + public static bool isValidName(string name) + { + return g_param_spec_is_valid_name(Str.toStringz(name)) != 0; + } + /** * Get the short description of a #GParamSpec. * @@ -238,7 +260,7 @@ public class ParamSpec return null; } - return ObjectG.getDObject!(ParamSpec)(cast(GParamSpec*) __p); + return ObjectG.getDObject!(ParamSpec)(cast(GParamSpec*) __p, true); } /** @@ -257,7 +279,7 @@ public class ParamSpec return null; } - return ObjectG.getDObject!(ParamSpec)(cast(GParamSpec*) __p); + return ObjectG.getDObject!(ParamSpec)(cast(GParamSpec*) __p, true); } /** @@ -334,10 +356,12 @@ public class ParamSpec } /** - * Registers @name as the name of a new static type derived from - * #G_TYPE_PARAM. The type system uses the information contained in - * the #GParamSpecTypeInfo structure pointed to by @info to manage the - * #GParamSpec type and its instances. + * Registers @name as the name of a new static type derived + * from %G_TYPE_PARAM. + * + * The type system uses the information contained in the #GParamSpecTypeInfo + * structure pointed to by @info to manage the #GParamSpec type and its + * instances. * * Params: * name = 0-terminated string used as the name of the new #GParamSpec type. @@ -361,7 +385,7 @@ public class ParamSpec * * Params: * pspec = a valid #GParamSpec - * srcValue = souce #GValue + * srcValue = source #GValue * destValue = destination #GValue of correct type for @pspec * strictValidation = %TRUE requires @dest_value to conform to @pspec * without modifications diff --git a/generated/gtkd/gobject/ParamSpecPool.d b/generated/gtkd/gobject/ParamSpecPool.d index b19d97703..8bd32facc 100644 --- a/generated/gtkd/gobject/ParamSpecPool.d +++ b/generated/gtkd/gobject/ParamSpecPool.d @@ -36,9 +36,10 @@ public import gtkc.gobjecttypes; /** * A #GParamSpecPool maintains a collection of #GParamSpecs which can be - * quickly accessed by owner and name. The implementation of the #GObject property - * system uses such a pool to store the #GParamSpecs of the properties all object - * types. + * quickly accessed by owner and name. + * + * The implementation of the #GObject property system uses such a pool to + * store the #GParamSpecs of the properties all object types. */ public class ParamSpecPool { diff --git a/generated/gtkd/gobject/SignalGroup.d b/generated/gtkd/gobject/SignalGroup.d new file mode 100644 index 000000000..3820e9880 --- /dev/null +++ b/generated/gtkd/gobject/SignalGroup.d @@ -0,0 +1,313 @@ +/* + * This file is part of gtkD. + * + * gtkD is free software; you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 3 + * of the License, or (at your option) any later version, with + * some exceptions, please read the COPYING file. + * + * gtkD is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with gtkD; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110, USA + */ + +// generated automatically - do not change +// find conversion definition on APILookup.txt +// implement new conversion functionalities on the wrap.utils pakage + + +module gobject.SignalGroup; + +private import glib.ConstructionException; +private import glib.Str; +private import gobject.ObjectG; +private import gobject.Signals; +private import gobject.c.functions; +public import gobject.c.types; +public import gtkc.gobjecttypes; +private import std.algorithm; + + +/** + * #GSignalGroup manages to simplify the process of connecting + * many signals to a #GObject as a group. As such there is no API + * to disconnect a signal from the group. + * + * In particular, this allows you to: + * + * - Change the target instance, which automatically causes disconnection + * of the signals from the old instance and connecting to the new instance. + * - Block and unblock signals as a group + * - Ensuring that blocked state transfers across target instances. + * + * One place you might want to use such a structure is with #GtkTextView and + * #GtkTextBuffer. Often times, you'll need to connect to many signals on + * #GtkTextBuffer from a #GtkTextView subclass. This allows you to create a + * signal group during instance construction, simply bind the + * #GtkTextView:buffer property to #GSignalGroup:target and connect + * all the signals you need. When the #GtkTextView:buffer property changes + * all of the signals will be transitioned correctly. + * + * Since: 2.72 + */ +public class SignalGroup : ObjectG +{ + /** the main Gtk struct */ + protected GSignalGroup* gSignalGroup; + + /** Get the main Gtk struct */ + public GSignalGroup* getSignalGroupStruct(bool transferOwnership = false) + { + if (transferOwnership) + ownedRef = false; + return gSignalGroup; + } + + /** the main Gtk struct as a void* */ + protected override void* getStruct() + { + return cast(void*)gSignalGroup; + } + + /** + * Sets our main struct and passes it to the parent class. + */ + public this (GSignalGroup* gSignalGroup, bool ownedRef = false) + { + this.gSignalGroup = gSignalGroup; + super(cast(GObject*)gSignalGroup, ownedRef); + } + + + /** */ + public static GType getType() + { + return g_signal_group_get_type(); + } + + /** + * Creates a new #GSignalGroup for target instances of @target_type. + * + * Params: + * targetType = the #GType of the target instance. + * + * Returns: a new #GSignalGroup + * + * Since: 2.72 + * + * Throws: ConstructionException GTK+ fails to create the object. + */ + public this(GType targetType) + { + auto __p = g_signal_group_new(targetType); + + if(__p is null) + { + throw new ConstructionException("null returned by new"); + } + + this(cast(GSignalGroup*) __p, true); + } + + /** + * Blocks all signal handlers managed by @self so they will not + * be called during any signal emissions. Must be unblocked exactly + * the same number of times it has been blocked to become active again. + * + * This blocked state will be kept across changes of the target instance. + * + * Since: 2.72 + */ + public void block() + { + g_signal_group_block(gSignalGroup); + } + + /** + * Connects @c_handler to the signal @detailed_signal + * on the target instance of @self. + * + * You cannot connect a signal handler after #GSignalGroup:target has been set. + * + * Params: + * detailedSignal = a string of the form "signal-name::detail" + * cHandler = the #GCallback to connect + * data = the data to pass to @c_handler calls + * + * Since: 2.72 + */ + public void connect(string detailedSignal, GCallback cHandler, void* data) + { + g_signal_group_connect(gSignalGroup, Str.toStringz(detailedSignal), cHandler, data); + } + + /** + * Connects @c_handler to the signal @detailed_signal + * on the target instance of @self. + * + * The @c_handler will be called after the default handler of the signal. + * + * You cannot connect a signal handler after #GSignalGroup:target has been set. + * + * Params: + * detailedSignal = a string of the form "signal-name::detail" + * cHandler = the #GCallback to connect + * data = the data to pass to @c_handler calls + * + * Since: 2.72 + */ + public void connectAfter(string detailedSignal, GCallback cHandler, void* data) + { + g_signal_group_connect_after(gSignalGroup, Str.toStringz(detailedSignal), cHandler, data); + } + + /** + * Connects @c_handler to the signal @detailed_signal + * on the target instance of @self. + * + * You cannot connect a signal handler after #GSignalGroup:target has been set. + * + * Params: + * detailedSignal = a string of the form "signal-name::detail" + * cHandler = the #GCallback to connect + * data = the data to pass to @c_handler calls + * notify = function to be called when disposing of @self + * flags = the flags used to create the signal connection + * + * Since: 2.72 + */ + public void connectData(string detailedSignal, GCallback cHandler, void* data, GClosureNotify notify, GConnectFlags flags) + { + g_signal_group_connect_data(gSignalGroup, Str.toStringz(detailedSignal), cHandler, data, notify, flags); + } + + /** + * Connects @c_handler to the signal @detailed_signal on #GSignalGroup:target. + * + * Ensures that the @object stays alive during the call to @c_handler + * by temporarily adding a reference count. When the @object is destroyed + * the signal handler will automatically be removed. + * + * You cannot connect a signal handler after #GSignalGroup:target has been set. + * + * Params: + * detailedSignal = a string of the form `signal-name` with optional `::signal-detail` + * cHandler = the #GCallback to connect + * object = the #GObject to pass as data to @c_handler calls + * flags = #GConnectFlags for the signal connection + * + * Since: 2.72 + */ + public void connectObject(string detailedSignal, GCallback cHandler, void* object, GConnectFlags flags) + { + g_signal_group_connect_object(gSignalGroup, Str.toStringz(detailedSignal), cHandler, object, flags); + } + + /** + * Connects @c_handler to the signal @detailed_signal + * on the target instance of @self. + * + * The instance on which the signal is emitted and @data + * will be swapped when calling @c_handler. + * + * You cannot connect a signal handler after #GSignalGroup:target has been set. + * + * Params: + * detailedSignal = a string of the form "signal-name::detail" + * cHandler = the #GCallback to connect + * data = the data to pass to @c_handler calls + * + * Since: 2.72 + */ + public void connectSwapped(string detailedSignal, GCallback cHandler, void* data) + { + g_signal_group_connect_swapped(gSignalGroup, Str.toStringz(detailedSignal), cHandler, data); + } + + /** + * Gets the target instance used when connecting signals. + * + * Returns: The target instance + * + * Since: 2.72 + */ + public ObjectG dupTarget() + { + auto __p = g_signal_group_dup_target(gSignalGroup); + + if(__p is null) + { + return null; + } + + return ObjectG.getDObject!(ObjectG)(cast(GObject*) __p, true); + } + + /** + * Sets the target instance used when connecting signals. Any signal + * that has been registered with g_signal_group_connect_object() or + * similar functions will be connected to this object. + * + * If the target instance was previously set, signals will be + * disconnected from that object prior to connecting to @target. + * + * Params: + * target = The target instance used + * when connecting signals. + * + * Since: 2.72 + */ + public void setTarget(ObjectG target) + { + g_signal_group_set_target(gSignalGroup, (target is null) ? null : target.getObjectGStruct()); + } + + /** + * Unblocks all signal handlers managed by @self so they will be + * called again during any signal emissions unless it is blocked + * again. Must be unblocked exactly the same number of times it + * has been blocked to become active again. + * + * Since: 2.72 + */ + public void unblock() + { + g_signal_group_unblock(gSignalGroup); + } + + /** + * This signal is emitted when #GSignalGroup:target is set to a new value + * other than %NULL. It is similar to #GObject::notify on `target` except it + * will not emit when #GSignalGroup:target is %NULL and also allows for + * receiving the #GObject without a data-race. + * + * Params: + * instance_ = a #GObject containing the new value for #GSignalGroup:target + * + * Since: 2.72 + */ + gulong addOnBind(void delegate(ObjectG, SignalGroup) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) + { + return Signals.connect(this, "bind", dlg, connectFlags ^ ConnectFlags.SWAPPED); + } + + /** + * This signal is emitted when the target instance of @self is set to a + * new #GObject. + * + * This signal will only be emitted if the previous target of @self is + * non-%NULL. + * + * Since: 2.72 + */ + gulong addOnUnbind(void delegate(SignalGroup) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) + { + return Signals.connect(this, "unbind", dlg, connectFlags ^ ConnectFlags.SWAPPED); + } +} diff --git a/generated/gtkd/gobject/Signals.d b/generated/gtkd/gobject/Signals.d index be600a7c4..3a00ec90e 100644 --- a/generated/gtkd/gobject/Signals.d +++ b/generated/gtkd/gobject/Signals.d @@ -25,6 +25,7 @@ module gobject.Signals; private import glib.Str; +private import glib.c.functions; private import gobject.Closure; private import gobject.DClosure; private import gobject.ObjectG; @@ -166,7 +167,7 @@ public struct Signals /** * Adds an emission hook for a signal, which will get called for any emission * of that signal, independent of the instance. This is possible only - * for signals which don't have #G_SIGNAL_NO_HOOKS flag set. + * for signals which don't have %G_SIGNAL_NO_HOOKS flag set. * * Params: * signalId = the signal identifier, as returned by g_signal_lookup(). @@ -288,7 +289,8 @@ public struct Signals } /** - * Emits a signal. + * Emits a signal. Signal emission is done synchronously. + * The method will only return control after all handlers are called or signal emission was stopped. * * Note that g_signal_emit_valist() resets the return value to the default * if no handlers are connected, in contrast to g_signal_emitv(). @@ -300,7 +302,7 @@ public struct Signals * detail = the detail * varArgs = a list of parameters to be passed to the signal, followed by a * location for the return value. If the return type of the signal - * is #G_TYPE_NONE, the return value location can be omitted. + * is %G_TYPE_NONE, the return value location can be omitted. */ public static void emitValist(TypeInstance instance_, uint signalId, GQuark detail, void* varArgs) { @@ -308,7 +310,8 @@ public struct Signals } /** - * Emits a signal. + * Emits a signal. Signal emission is done synchronously. + * The method will only return control after all handlers are called or signal emission was stopped. * * Note that g_signal_emitv() doesn't change @return_value if no handlers are * connected, in contrast to g_signal_emit() and g_signal_emit_valist(). @@ -340,7 +343,8 @@ public struct Signals * Params: * instance_ = the instance to query * - * Returns: the invocation hint of the innermost signal emission. + * Returns: the invocation hint of the innermost + * signal emission, or %NULL if not found. */ public static GSignalInvocationHint* getInvocationHint(ObjectG instance_) { @@ -350,7 +354,7 @@ public struct Signals /** * Blocks a handler of an instance so it will not be called during any * signal emissions unless it is unblocked again. Thus "blocking" a - * signal handler means to temporarily deactive it, a signal handler + * signal handler means to temporarily deactivate it, a signal handler * has to be unblocked exactly the same amount of times it has been * blocked before to become active again. * @@ -631,7 +635,7 @@ public struct Signals * accuData = user data for the @accumulator. * cMarshaller = the function to translate arrays of parameter * values to signal emissions into C language callback invocations or %NULL. - * returnType = the type of return value, or #G_TYPE_NONE for a signal + * returnType = the type of return value, or %G_TYPE_NONE for a signal * without a return value. * nParams = the number of parameter types in @args. * args = va_list of #GType, one for each parameter. @@ -665,10 +669,10 @@ public struct Signals * cMarshaller = the function to translate arrays of * parameter values to signal emissions into C language callback * invocations or %NULL - * returnType = the type of return value, or #G_TYPE_NONE for a signal + * returnType = the type of return value, or %G_TYPE_NONE for a signal * without a return value * paramTypes = an array of types, one for - * each parameter + * each parameter (may be %NULL if @n_params is zero) * * Returns: the signal id */ @@ -852,12 +856,13 @@ public struct Signals * * If the handler ID is 0 then this function does nothing. * - * A macro is also included that allows this function to be used without - * pointer casts. + * There is also a macro version of this function so that the code + * will be inlined. * * Params: * handlerIdPtr = A pointer to a handler ID (of type #gulong) of the handler to be disconnected. * instance_ = The instance to remove the signal handler from. + * This pointer may be %NULL or invalid, if the handler ID is zero. * * Since: 2.62 */ diff --git a/generated/gtkd/gobject/Type.d b/generated/gtkd/gobject/Type.d index 6b350da74..63e2ca1f9 100644 --- a/generated/gtkd/gobject/Type.d +++ b/generated/gtkd/gobject/Type.d @@ -25,6 +25,7 @@ module gobject.Type; private import glib.Str; +private import glib.c.functions; private import gobject.ObjectG; private import gobject.TypeClass; private import gobject.TypeInstance; @@ -129,12 +130,12 @@ public struct Type } /** - * Adds @interface_type to the dynamic @instantiable_type. The information + * Adds @interface_type to the dynamic @instance_type. The information * contained in the #GTypePlugin structure pointed to by @plugin * is used to manage the relationship. * * Params: - * instanceType = #GType value of an instantiable type + * instanceType = #GType value of an instantiatable type * interfaceType = #GType value of an interface type * plugin = #GTypePlugin structure to retrieve the #GInterfaceInfo from */ @@ -144,12 +145,12 @@ public struct Type } /** - * Adds @interface_type to the static @instantiable_type. + * Adds @interface_type to the static @instance_type. * The information contained in the #GInterfaceInfo structure * pointed to by @info is used to manage the relationship. * * Params: - * instanceType = #GType value of an instantiable type + * instanceType = #GType value of an instantiatable type * interfaceType = #GType value of an interface type * info = #GInterfaceInfo structure for this * (@instance_type, @interface_type) combination @@ -260,7 +261,7 @@ public struct Type * and structure setups for instances: actual instance creation should * happen through functions supplied by the type's fundamental type * implementation. So use of g_type_create_instance() is reserved for - * implementators of fundamental types only. E.g. instances of the + * implementers of fundamental types only. E.g. instances of the * #GObject hierarchy should be created via g_object_new() and never * directly through g_type_create_instance() which doesn't handle things * like singleton objects or object construction. @@ -320,7 +321,7 @@ public struct Type * and returns the default interface vtable for the type. * * If the type is not currently in use, then the default vtable - * for the type will be created and initalized by calling + * for the type will be created and initialized by calling * the base interface init and default vtable init functions for * the type (the @base_init and @class_init members of #GTypeInfo). * Calling g_type_default_interface_ref() is useful when you @@ -575,8 +576,8 @@ public struct Type * whether @type conforms to it. * * Params: - * type = type to check anchestry for - * isAType = possible anchestor of @type or interface that @type + * type = type to check ancestry for + * isAType = possible ancestor of @type or interface that @type * could conform to * * Returns: %TRUE if @type is a @is_a_type @@ -617,7 +618,7 @@ public struct Type /** * Given a @leaf_type and a @root_type which is contained in its - * anchestry, return the type that @root_type is the immediate parent + * ancestry, return the type that @root_type is the immediate parent * of. In other words, this function determines the type that is * derived directly from @root_type which is also a base class of * @leaf_type. Given a root type and a leaf type, this function can @@ -628,7 +629,7 @@ public struct Type * leafType = descendant of @root_type and the type to be returned * rootType = immediate parent of the returned type * - * Returns: immediate child of @root_type and anchestor of @leaf_type + * Returns: immediate child of @root_type and ancestor of @leaf_type */ public static GType nextBase(GType leafType, GType rootType) { @@ -693,7 +694,7 @@ public struct Type * plugin = #GTypePlugin structure to retrieve the #GTypeInfo from * flags = bitwise combination of #GTypeFlags values * - * Returns: the new type identifier or #G_TYPE_INVALID if registration failed + * Returns: the new type identifier or %G_TYPE_INVALID if registration failed */ public static GType registerDynamic(GType parentType, string typeName, TypePluginIF plugin, GTypeFlags flags) { diff --git a/generated/gtkd/gobject/TypeInterface.d b/generated/gtkd/gobject/TypeInterface.d index 37b8f008a..68f8146cb 100644 --- a/generated/gtkd/gobject/TypeInterface.d +++ b/generated/gtkd/gobject/TypeInterface.d @@ -129,6 +129,26 @@ public class TypeInterface return ObjectG.getDObject!(TypePluginIF)(cast(GTypePlugin*) __p); } + /** + * Returns the most specific instantiatable prerequisite of an + * interface type. If the interface type has no instantiatable + * prerequisite, %G_TYPE_INVALID is returned. + * + * See g_type_interface_add_prerequisite() for more information + * about prerequisites. + * + * Params: + * interfaceType = an interface type + * + * Returns: the instantiatable prerequisite type or %G_TYPE_INVALID if none + * + * Since: 2.68 + */ + public static GType instantiatablePrerequisite(GType interfaceType) + { + return g_type_interface_instantiatable_prerequisite(interfaceType); + } + /** * Returns the #GTypeInterface structure of an interface to which the * passed in class conforms. diff --git a/generated/gtkd/gobject/TypeModule.d b/generated/gtkd/gobject/TypeModule.d index 0a63e1fc8..56bbe75f2 100644 --- a/generated/gtkd/gobject/TypeModule.d +++ b/generated/gtkd/gobject/TypeModule.d @@ -35,16 +35,20 @@ public import gtkc.gobjecttypes; /** * #GTypeModule provides a simple implementation of the #GTypePlugin - * interface. The model of #GTypeModule is a dynamically loaded module - * which implements some number of types and interface implementations. + * interface. + * + * The model of #GTypeModule is a dynamically loaded module which + * implements some number of types and interface implementations. + * * When the module is loaded, it registers its types and interfaces * using g_type_module_register_type() and g_type_module_add_interface(). * As long as any instances of these types and interface implementations * are in use, the module is kept loaded. When the types and interfaces * are gone, the module may be unloaded. If the types and interfaces * become used again, the module will be reloaded. Note that the last - * unref cannot happen in module code, since that would lead to the - * caller's code being unloaded before g_object_unref() returns to it. + * reference cannot be released from within the module code, since that + * would lead to the caller's code being unloaded before g_object_unref() + * returns to it. * * Keeping track of whether the module should be loaded or not is done by * using a use count - it starts at zero, and whenever it is greater than diff --git a/generated/gtkd/gobject/TypePluginIF.d b/generated/gtkd/gobject/TypePluginIF.d index 57e6a799a..ae79ed42c 100644 --- a/generated/gtkd/gobject/TypePluginIF.d +++ b/generated/gtkd/gobject/TypePluginIF.d @@ -30,9 +30,10 @@ public import gtkc.gobjecttypes; /** + * An interface that handles the lifecycle of dynamically loaded types. + * * The GObject type system supports dynamic loading of types. - * The #GTypePlugin interface is used to handle the lifecycle - * of dynamically loaded types. It goes as follows: + * It goes as follows: * * 1. The type is initially introduced (usually upon loading the module * the first time, or by your main application that knows what modules @@ -98,7 +99,7 @@ public interface TypePluginIF{ * function outside of the GObject type system itself. * * Params: - * instanceType = the #GType of an instantiable type to which the interface + * instanceType = the #GType of an instantiatable type to which the interface * is added * interfaceType = the #GType of the interface whose info is completed * info = the #GInterfaceInfo to fill in diff --git a/generated/gtkd/gobject/TypePluginT.d b/generated/gtkd/gobject/TypePluginT.d index 91a162cbf..448a64d30 100644 --- a/generated/gtkd/gobject/TypePluginT.d +++ b/generated/gtkd/gobject/TypePluginT.d @@ -30,9 +30,10 @@ public import gtkc.gobjecttypes; /** + * An interface that handles the lifecycle of dynamically loaded types. + * * The GObject type system supports dynamic loading of types. - * The #GTypePlugin interface is used to handle the lifecycle - * of dynamically loaded types. It goes as follows: + * It goes as follows: * * 1. The type is initially introduced (usually upon loading the module * the first time, or by your main application that knows what modules @@ -95,7 +96,7 @@ public template TypePluginT(TStruct) * function outside of the GObject type system itself. * * Params: - * instanceType = the #GType of an instantiable type to which the interface + * instanceType = the #GType of an instantiatable type to which the interface * is added * interfaceType = the #GType of the interface whose info is completed * info = the #GInterfaceInfo to fill in diff --git a/generated/gtkd/gobject/Value.d b/generated/gtkd/gobject/Value.d index f132cc9d8..77f142fc1 100644 --- a/generated/gtkd/gobject/Value.d +++ b/generated/gtkd/gobject/Value.d @@ -27,6 +27,7 @@ module gobject.Value; private import glib.Str; private import glib.Variant; private import glib.VariantType; +private import glib.c.functions; private import gobject.ObjectG; private import gobject.ParamSpec; private import gobject.Type; @@ -39,10 +40,12 @@ private import std.traits; /** * An opaque structure used to hold different types of values. + * * The data within the structure has protected scope: it is accessible only * to functions within a #GTypeValueTable structure, or implementations of * the g_value_*() API. That is, code portions which implement new fundamental * types. + * * #GValue users cannot make any assumptions about how data is stored * within the 2 element @data union, and the @g_type member should * only be accessed through the G_VALUE_TYPE() macro. @@ -291,8 +294,8 @@ public class Value * Get the contents of a %G_TYPE_PARAM #GValue, increasing its * reference count. * - * Returns: #GParamSpec content of @value, should be unreferenced when - * no longer needed. + * Returns: #GParamSpec content of @value, should be + * unreferenced when no longer needed. */ public ParamSpec dupParam() { @@ -303,7 +306,7 @@ public class Value return null; } - return ObjectG.getDObject!(ParamSpec)(cast(GParamSpec*) __p); + return ObjectG.getDObject!(ParamSpec)(cast(GParamSpec*) __p, true); } /** @@ -801,6 +804,21 @@ public class Value g_value_set_int64(gValue, vInt64); } + /** + * Set the contents of a %G_TYPE_STRING #GValue to @v_string. The string is + * assumed to be static and interned (canonical, for example from + * g_intern_string()), and is thus not duplicated when setting the #GValue. + * + * Params: + * vString = static string to be set + * + * Since: 2.66 + */ + public void setInternedString(string vString) + { + g_value_set_interned_string(gValue, Str.toStringz(vString)); + } + /** * Set the contents of a %G_TYPE_LONG #GValue to @v_long. * @@ -896,6 +914,7 @@ public class Value /** * Set the contents of a %G_TYPE_BOXED derived #GValue to @v_boxed. + * * The boxed value is assumed to be static, and is thus not duplicated * when setting the #GValue. * @@ -912,6 +931,9 @@ public class Value * The string is assumed to be static, and is thus not duplicated * when setting the #GValue. * + * If the the string is a canonical string, using g_value_set_interned_string() + * is more appropriate. + * * Params: * vString = static string to be set */ @@ -921,7 +943,7 @@ public class Value } /** - * Set the contents of a %G_TYPE_STRING #GValue to @v_string. + * Set the contents of a %G_TYPE_STRING #GValue to a copy of @v_string. * * Params: * vString = caller-owned string to be duplicated for the #GValue diff --git a/generated/gtkd/gobject/WeakRef.d b/generated/gtkd/gobject/WeakRef.d index f919c5df0..51584e2a7 100644 --- a/generated/gtkd/gobject/WeakRef.d +++ b/generated/gtkd/gobject/WeakRef.d @@ -31,11 +31,12 @@ public import gtkc.gobjecttypes; /** - * A structure containing a weak reference to a #GObject. It can either - * be empty (i.e. point to %NULL), or point to an object for as long as - * at least one "strong" reference to that object exists. Before the - * object's #GObjectClass.dispose method is called, every #GWeakRef - * associated with becomes empty (i.e. points to %NULL). + * A structure containing a weak reference to a #GObject. + * + * A `GWeakRef` can either be empty (i.e. point to %NULL), or point to an + * object for as long as at least one "strong" reference to that object + * exists. Before the object's #GObjectClass.dispose method is called, + * every #GWeakRef associated with becomes empty (i.e. points to %NULL). * * Like #GValue, #GWeakRef can be statically allocated, stack- or * heap-allocated, or embedded in larger structures. @@ -46,11 +47,14 @@ public import gtkc.gobjecttypes; * objects. * * If the object's #GObjectClass.dispose method results in additional - * references to the object being held, any #GWeakRefs taken - * before it was disposed will continue to point to %NULL. If - * #GWeakRefs are taken after the object is disposed and - * re-referenced, they will continue to point to it until its refcount + * references to the object being held (‘re-referencing’), any #GWeakRefs taken + * before it was disposed will continue to point to %NULL. Any #GWeakRefs taken + * during disposal and after re-referencing, or after disposal has returned due + * to the re-referencing, will continue to point to the object until its refcount * goes back to zero, at which point they too will be invalidated. + * + * It is invalid to take a #GWeakRef on an object during #GObjectClass.dispose + * without first having or creating a strong reference to the object. */ public class WeakRef { diff --git a/generated/gtkd/gobject/c/functions.d b/generated/gtkd/gobject/c/functions.d index dd60dc220..9c1e54092 100644 --- a/generated/gtkd/gobject/c/functions.d +++ b/generated/gtkd/gobject/c/functions.d @@ -40,6 +40,8 @@ shared static this() // gobject.Binding Linker.link(g_binding_get_type, "g_binding_get_type", LIBRARY_GOBJECT); + Linker.link(g_binding_dup_source, "g_binding_dup_source", LIBRARY_GOBJECT); + Linker.link(g_binding_dup_target, "g_binding_dup_target", LIBRARY_GOBJECT); Linker.link(g_binding_get_flags, "g_binding_get_flags", LIBRARY_GOBJECT); Linker.link(g_binding_get_source, "g_binding_get_source", LIBRARY_GOBJECT); Linker.link(g_binding_get_source_property, "g_binding_get_source_property", LIBRARY_GOBJECT); @@ -47,6 +49,16 @@ shared static this() Linker.link(g_binding_get_target_property, "g_binding_get_target_property", LIBRARY_GOBJECT); Linker.link(g_binding_unbind, "g_binding_unbind", LIBRARY_GOBJECT); + // gobject.BindingGroup + + Linker.link(g_binding_group_get_type, "g_binding_group_get_type", LIBRARY_GOBJECT); + Linker.link(g_binding_group_new, "g_binding_group_new", LIBRARY_GOBJECT); + Linker.link(g_binding_group_bind, "g_binding_group_bind", LIBRARY_GOBJECT); + Linker.link(g_binding_group_bind_full, "g_binding_group_bind_full", LIBRARY_GOBJECT); + Linker.link(g_binding_group_bind_with_closures, "g_binding_group_bind_with_closures", LIBRARY_GOBJECT); + Linker.link(g_binding_group_dup_source, "g_binding_group_dup_source", LIBRARY_GOBJECT); + Linker.link(g_binding_group_set_source, "g_binding_group_set_source", LIBRARY_GOBJECT); + // gobject.CClosure Linker.link(g_cclosure_marshal_BOOLEAN__BOXED_BOXED, "g_cclosure_marshal_BOOLEAN__BOXED_BOXED", LIBRARY_GOBJECT); @@ -168,6 +180,7 @@ shared static this() Linker.link(g_object_setv, "g_object_setv", LIBRARY_GOBJECT); Linker.link(g_object_steal_data, "g_object_steal_data", LIBRARY_GOBJECT); Linker.link(g_object_steal_qdata, "g_object_steal_qdata", LIBRARY_GOBJECT); + Linker.link(g_object_take_ref, "g_object_take_ref", LIBRARY_GOBJECT); Linker.link(g_object_thaw_notify, "g_object_thaw_notify", LIBRARY_GOBJECT); Linker.link(g_object_unref, "g_object_unref", LIBRARY_GOBJECT); Linker.link(g_object_watch_closure, "g_object_watch_closure", LIBRARY_GOBJECT); @@ -186,6 +199,7 @@ shared static this() // gobject.ParamSpec Linker.link(g_param_spec_internal, "g_param_spec_internal", LIBRARY_GOBJECT); + Linker.link(g_param_spec_is_valid_name, "g_param_spec_is_valid_name", LIBRARY_GOBJECT); Linker.link(g_param_spec_get_blurb, "g_param_spec_get_blurb", LIBRARY_GOBJECT); Linker.link(g_param_spec_get_default_value, "g_param_spec_get_default_value", LIBRARY_GOBJECT); Linker.link(g_param_spec_get_name, "g_param_spec_get_name", LIBRARY_GOBJECT); @@ -216,6 +230,20 @@ shared static this() Linker.link(g_param_spec_pool_remove, "g_param_spec_pool_remove", LIBRARY_GOBJECT); Linker.link(g_param_spec_pool_new, "g_param_spec_pool_new", LIBRARY_GOBJECT); + // gobject.SignalGroup + + Linker.link(g_signal_group_get_type, "g_signal_group_get_type", LIBRARY_GOBJECT); + Linker.link(g_signal_group_new, "g_signal_group_new", LIBRARY_GOBJECT); + Linker.link(g_signal_group_block, "g_signal_group_block", LIBRARY_GOBJECT); + Linker.link(g_signal_group_connect, "g_signal_group_connect", LIBRARY_GOBJECT); + Linker.link(g_signal_group_connect_after, "g_signal_group_connect_after", LIBRARY_GOBJECT); + Linker.link(g_signal_group_connect_data, "g_signal_group_connect_data", LIBRARY_GOBJECT); + Linker.link(g_signal_group_connect_object, "g_signal_group_connect_object", LIBRARY_GOBJECT); + Linker.link(g_signal_group_connect_swapped, "g_signal_group_connect_swapped", LIBRARY_GOBJECT); + Linker.link(g_signal_group_dup_target, "g_signal_group_dup_target", LIBRARY_GOBJECT); + Linker.link(g_signal_group_set_target, "g_signal_group_set_target", LIBRARY_GOBJECT); + Linker.link(g_signal_group_unblock, "g_signal_group_unblock", LIBRARY_GOBJECT); + // gobject.TypeClass Linker.link(g_type_class_add_private, "g_type_class_add_private", LIBRARY_GOBJECT); @@ -238,6 +266,7 @@ shared static this() Linker.link(g_type_interface_peek_parent, "g_type_interface_peek_parent", LIBRARY_GOBJECT); Linker.link(g_type_interface_add_prerequisite, "g_type_interface_add_prerequisite", LIBRARY_GOBJECT); Linker.link(g_type_interface_get_plugin, "g_type_interface_get_plugin", LIBRARY_GOBJECT); + Linker.link(g_type_interface_instantiatable_prerequisite, "g_type_interface_instantiatable_prerequisite", LIBRARY_GOBJECT); Linker.link(g_type_interface_peek, "g_type_interface_peek", LIBRARY_GOBJECT); Linker.link(g_type_interface_prerequisites, "g_type_interface_prerequisites", LIBRARY_GOBJECT); @@ -311,6 +340,7 @@ shared static this() Linker.link(g_value_set_instance, "g_value_set_instance", LIBRARY_GOBJECT); Linker.link(g_value_set_int, "g_value_set_int", LIBRARY_GOBJECT); Linker.link(g_value_set_int64, "g_value_set_int64", LIBRARY_GOBJECT); + Linker.link(g_value_set_interned_string, "g_value_set_interned_string", LIBRARY_GOBJECT); Linker.link(g_value_set_long, "g_value_set_long", LIBRARY_GOBJECT); Linker.link(g_value_set_object, "g_value_set_object", LIBRARY_GOBJECT); Linker.link(g_value_set_object_take_ownership, "g_value_set_object_take_ownership", LIBRARY_GOBJECT); @@ -511,6 +541,8 @@ __gshared extern(C) // gobject.Binding GType function() c_g_binding_get_type; + GObject* function(GBinding* binding) c_g_binding_dup_source; + GObject* function(GBinding* binding) c_g_binding_dup_target; GBindingFlags function(GBinding* binding) c_g_binding_get_flags; GObject* function(GBinding* binding) c_g_binding_get_source; const(char)* function(GBinding* binding) c_g_binding_get_source_property; @@ -518,6 +550,16 @@ __gshared extern(C) const(char)* function(GBinding* binding) c_g_binding_get_target_property; void function(GBinding* binding) c_g_binding_unbind; + // gobject.BindingGroup + + GType function() c_g_binding_group_get_type; + GBindingGroup* function() c_g_binding_group_new; + void function(GBindingGroup* self, const(char)* sourceProperty, void* target, const(char)* targetProperty, GBindingFlags flags) c_g_binding_group_bind; + void function(GBindingGroup* self, const(char)* sourceProperty, void* target, const(char)* targetProperty, GBindingFlags flags, GBindingTransformFunc transformTo, GBindingTransformFunc transformFrom, void* userData, GDestroyNotify userDataDestroy) c_g_binding_group_bind_full; + void function(GBindingGroup* self, const(char)* sourceProperty, void* target, const(char)* targetProperty, GBindingFlags flags, GClosure* transformTo, GClosure* transformFrom) c_g_binding_group_bind_with_closures; + void* function(GBindingGroup* self) c_g_binding_group_dup_source; + void function(GBindingGroup* self, void* source) c_g_binding_group_set_source; + // gobject.CClosure void function(GClosure* closure, GValue* returnValue, uint nParamValues, GValue* paramValues, void* invocationHint, void* marshalData) c_g_cclosure_marshal_BOOLEAN__BOXED_BOXED; @@ -639,6 +681,7 @@ __gshared extern(C) void function(GObject* object, uint nProperties, char** names, GValue* values) c_g_object_setv; void* function(GObject* object, const(char)* key) c_g_object_steal_data; void* function(GObject* object, GQuark quark) c_g_object_steal_qdata; + void* function(void* object) c_g_object_take_ref; void function(GObject* object) c_g_object_thaw_notify; void function(void* object) c_g_object_unref; void function(GObject* object, GClosure* closure) c_g_object_watch_closure; @@ -657,6 +700,7 @@ __gshared extern(C) // gobject.ParamSpec void* function(GType paramType, const(char)* name, const(char)* nick, const(char)* blurb, GParamFlags flags) c_g_param_spec_internal; + int function(const(char)* name) c_g_param_spec_is_valid_name; const(char)* function(GParamSpec* pspec) c_g_param_spec_get_blurb; GValue* function(GParamSpec* pspec) c_g_param_spec_get_default_value; const(char)* function(GParamSpec* pspec) c_g_param_spec_get_name; @@ -687,6 +731,20 @@ __gshared extern(C) void function(GParamSpecPool* pool, GParamSpec* pspec) c_g_param_spec_pool_remove; GParamSpecPool* function(int typePrefixing) c_g_param_spec_pool_new; + // gobject.SignalGroup + + GType function() c_g_signal_group_get_type; + GSignalGroup* function(GType targetType) c_g_signal_group_new; + void function(GSignalGroup* self) c_g_signal_group_block; + void function(GSignalGroup* self, const(char)* detailedSignal, GCallback cHandler, void* data) c_g_signal_group_connect; + void function(GSignalGroup* self, const(char)* detailedSignal, GCallback cHandler, void* data) c_g_signal_group_connect_after; + void function(GSignalGroup* self, const(char)* detailedSignal, GCallback cHandler, void* data, GClosureNotify notify, GConnectFlags flags) c_g_signal_group_connect_data; + void function(GSignalGroup* self, const(char)* detailedSignal, GCallback cHandler, void* object, GConnectFlags flags) c_g_signal_group_connect_object; + void function(GSignalGroup* self, const(char)* detailedSignal, GCallback cHandler, void* data) c_g_signal_group_connect_swapped; + void* function(GSignalGroup* self) c_g_signal_group_dup_target; + void function(GSignalGroup* self, void* target) c_g_signal_group_set_target; + void function(GSignalGroup* self) c_g_signal_group_unblock; + // gobject.TypeClass void function(void* gClass, size_t privateSize) c_g_type_class_add_private; @@ -709,6 +767,7 @@ __gshared extern(C) void* function(void* gIface) c_g_type_interface_peek_parent; void function(GType interfaceType, GType prerequisiteType) c_g_type_interface_add_prerequisite; GTypePlugin* function(GType instanceType, GType interfaceType) c_g_type_interface_get_plugin; + GType function(GType interfaceType) c_g_type_interface_instantiatable_prerequisite; void* function(void* instanceClass, GType ifaceType) c_g_type_interface_peek; GType* function(GType interfaceType, uint* nPrerequisites) c_g_type_interface_prerequisites; @@ -782,6 +841,7 @@ __gshared extern(C) void function(GValue* value, void* instance_) c_g_value_set_instance; void function(GValue* value, int vInt) c_g_value_set_int; void function(GValue* value, long vInt64) c_g_value_set_int64; + void function(GValue* value, const(char)* vString) c_g_value_set_interned_string; void function(GValue* value, glong vLong) c_g_value_set_long; void function(GValue* value, void* vObject) c_g_value_set_object; void function(GValue* value, void* vObject) c_g_value_set_object_take_ownership; @@ -980,6 +1040,8 @@ __gshared extern(C) // gobject.Binding alias c_g_binding_get_type g_binding_get_type; +alias c_g_binding_dup_source g_binding_dup_source; +alias c_g_binding_dup_target g_binding_dup_target; alias c_g_binding_get_flags g_binding_get_flags; alias c_g_binding_get_source g_binding_get_source; alias c_g_binding_get_source_property g_binding_get_source_property; @@ -987,6 +1049,16 @@ alias c_g_binding_get_target g_binding_get_target; alias c_g_binding_get_target_property g_binding_get_target_property; alias c_g_binding_unbind g_binding_unbind; +// gobject.BindingGroup + +alias c_g_binding_group_get_type g_binding_group_get_type; +alias c_g_binding_group_new g_binding_group_new; +alias c_g_binding_group_bind g_binding_group_bind; +alias c_g_binding_group_bind_full g_binding_group_bind_full; +alias c_g_binding_group_bind_with_closures g_binding_group_bind_with_closures; +alias c_g_binding_group_dup_source g_binding_group_dup_source; +alias c_g_binding_group_set_source g_binding_group_set_source; + // gobject.CClosure alias c_g_cclosure_marshal_BOOLEAN__BOXED_BOXED g_cclosure_marshal_BOOLEAN__BOXED_BOXED; @@ -1108,6 +1180,7 @@ alias c_g_object_set_valist g_object_set_valist; alias c_g_object_setv g_object_setv; alias c_g_object_steal_data g_object_steal_data; alias c_g_object_steal_qdata g_object_steal_qdata; +alias c_g_object_take_ref g_object_take_ref; alias c_g_object_thaw_notify g_object_thaw_notify; alias c_g_object_unref g_object_unref; alias c_g_object_watch_closure g_object_watch_closure; @@ -1126,6 +1199,7 @@ alias c_g_object_class_override_property g_object_class_override_property; // gobject.ParamSpec alias c_g_param_spec_internal g_param_spec_internal; +alias c_g_param_spec_is_valid_name g_param_spec_is_valid_name; alias c_g_param_spec_get_blurb g_param_spec_get_blurb; alias c_g_param_spec_get_default_value g_param_spec_get_default_value; alias c_g_param_spec_get_name g_param_spec_get_name; @@ -1156,6 +1230,20 @@ alias c_g_param_spec_pool_lookup g_param_spec_pool_lookup; alias c_g_param_spec_pool_remove g_param_spec_pool_remove; alias c_g_param_spec_pool_new g_param_spec_pool_new; +// gobject.SignalGroup + +alias c_g_signal_group_get_type g_signal_group_get_type; +alias c_g_signal_group_new g_signal_group_new; +alias c_g_signal_group_block g_signal_group_block; +alias c_g_signal_group_connect g_signal_group_connect; +alias c_g_signal_group_connect_after g_signal_group_connect_after; +alias c_g_signal_group_connect_data g_signal_group_connect_data; +alias c_g_signal_group_connect_object g_signal_group_connect_object; +alias c_g_signal_group_connect_swapped g_signal_group_connect_swapped; +alias c_g_signal_group_dup_target g_signal_group_dup_target; +alias c_g_signal_group_set_target g_signal_group_set_target; +alias c_g_signal_group_unblock g_signal_group_unblock; + // gobject.TypeClass alias c_g_type_class_add_private g_type_class_add_private; @@ -1178,6 +1266,7 @@ alias c_g_type_instance_get_private g_type_instance_get_private; alias c_g_type_interface_peek_parent g_type_interface_peek_parent; alias c_g_type_interface_add_prerequisite g_type_interface_add_prerequisite; alias c_g_type_interface_get_plugin g_type_interface_get_plugin; +alias c_g_type_interface_instantiatable_prerequisite g_type_interface_instantiatable_prerequisite; alias c_g_type_interface_peek g_type_interface_peek; alias c_g_type_interface_prerequisites g_type_interface_prerequisites; @@ -1251,6 +1340,7 @@ alias c_g_value_set_gtype g_value_set_gtype; alias c_g_value_set_instance g_value_set_instance; alias c_g_value_set_int g_value_set_int; alias c_g_value_set_int64 g_value_set_int64; +alias c_g_value_set_interned_string g_value_set_interned_string; alias c_g_value_set_long g_value_set_long; alias c_g_value_set_object g_value_set_object; alias c_g_value_set_object_take_ownership g_value_set_object_take_ownership; diff --git a/generated/gtkd/gobject/c/types.d b/generated/gtkd/gobject/c/types.d index 0aaa5b018..4f50f6792 100644 --- a/generated/gtkd/gobject/c/types.d +++ b/generated/gtkd/gobject/c/types.d @@ -30,9 +30,11 @@ public import glib.c.types; /** * This is the signature of marshaller functions, required to marshall * arrays of parameter values to signal emissions into C language callback - * invocations. It is merely an alias to #GClosureMarshal since the #GClosure - * mechanism takes over responsibility of actual function invocation for the - * signal system. + * invocations. + * + * It is merely an alias to #GClosureMarshal since the #GClosure mechanism + * takes over responsibility of actual function invocation for the signal + * system. */ public alias GClosureMarshal GSignalCMarshaller; @@ -131,7 +133,9 @@ alias GConnectFlags ConnectFlags; /** * Through the #GParamFlags flag values, certain aspects of parameters - * can be configured. See also #G_PARAM_STATIC_STRINGS. + * can be configured. + * + * See also: %G_PARAM_STATIC_STRINGS */ public enum GParamFlags : uint { @@ -203,9 +207,7 @@ public enum GParamFlags : uint alias GParamFlags ParamFlags; /** - * The signal flags are used to specify a signal's behaviour, the overall - * signal description outlines how especially the RUN flags control the - * stages of a signal emission. + * The signal flags are used to specify a signal's behaviour. */ public enum GSignalFlags { @@ -256,6 +258,12 @@ public enum GSignalFlags * running with G_ENABLE_DIAGNOSTIC=1. Since 2.32. */ DEPRECATED = 256, + /** + * Only used in #GSignalAccumulator accumulator + * functions for the #GSignalInvocationHint::run_type field to mark the first + * call to the accumulator function for a signal emission. Since 2.68. + */ + ACCUMULATOR_FIRST_RUN = 131072, } alias GSignalFlags SignalFlags; @@ -343,6 +351,11 @@ public enum GTypeFlags * g_value_init() */ VALUE_ABSTRACT = 32, + /** + * Indicates a final type. A final type is a non-derivable + * leaf node in a deep derivable type hierarchy tree. Since: 2.70 + */ + FINAL = 64, } alias GTypeFlags TypeFlags; @@ -357,7 +370,7 @@ public enum GTypeFundamentalFlags */ CLASSED = 1, /** - * Indicates an instantiable type (implies classed) + * Indicates an instantiatable type (implies classed) */ INSTANTIATABLE = 2, /** @@ -373,6 +386,8 @@ alias GTypeFundamentalFlags TypeFundamentalFlags; struct GBinding; +struct GBindingGroup; + /** * A #GCClosure is a specialization of #GClosure for C function callbacks. */ @@ -564,9 +579,8 @@ struct GObjectClass } /** - * The GObjectConstructParam struct is an auxiliary - * structure used to hand #GParamSpec/#GValue pairs to the @constructor of - * a #GObjectClass. + * The GObjectConstructParam struct is an auxiliary structure used to hand + * #GParamSpec/#GValue pairs to the @constructor of a #GObjectClass. */ struct GObjectConstructParam { @@ -895,6 +909,7 @@ struct GParamSpecString * This structure is used to provide the type system with the information * required to initialize and destruct (finalize) a parameter's class and * instances thereof. + * * The initialized structure is passed to the g_param_type_register_static() * The type system will perform a deep copy of this structure, so its memory * does not need to be persistent across invocation of @@ -1069,6 +1084,8 @@ struct GParameter GValue value; } +struct GSignalGroup; + /** * The #GSignalInvocationHint structure is used to pass on additional information * to callbacks during a signal emission. @@ -1086,14 +1103,17 @@ struct GSignalInvocationHint /** * The stage the signal emission is currently in, this * field will contain one of %G_SIGNAL_RUN_FIRST, - * %G_SIGNAL_RUN_LAST or %G_SIGNAL_RUN_CLEANUP. + * %G_SIGNAL_RUN_LAST or %G_SIGNAL_RUN_CLEANUP and %G_SIGNAL_ACCUMULATOR_FIRST_RUN. + * %G_SIGNAL_ACCUMULATOR_FIRST_RUN is only set for the first run of the accumulator + * function for a signal emission. */ GSignalFlags runType; } /** - * A structure holding in-depth information for a specific signal. It is - * filled in by the g_signal_query() function. + * A structure holding in-depth information for a specific signal. + * + * See also: g_signal_query() */ struct GSignalQuery { @@ -1301,7 +1321,8 @@ struct GTypePluginClass /** * A structure holding information for a specific type. - * It is filled in by the g_type_query() function. + * + * See also: g_type_query() */ struct GTypeQuery { @@ -1411,8 +1432,11 @@ struct _Value__data__union /** * A callback function used by the type system to finalize those portions * of a derived types class structure that were setup from the corresponding - * GBaseInitFunc() function. Class finalization basically works the inverse - * way in which class initialization is performed. + * GBaseInitFunc() function. + * + * Class finalization basically works the inverse way in which class + * initialization is performed. + * * See GClassInitFunc() for a discussion of the class initialization process. * * Params: @@ -1422,9 +1446,12 @@ public alias extern(C) void function(void* gClass) GBaseFinalizeFunc; /** * A callback function used by the type system to do base initialization - * of the class structures of derived types. It is called as part of the - * initialization process of all derived classes and should reallocate - * or reset all dynamic class members copied over from the parent class. + * of the class structures of derived types. + * + * This function is called as part of the initialization process of all derived + * classes and should reallocate or reset all dynamic class members copied over + * from the parent class. + * * For example, class members (such as strings) that are not sufficiently * handled by a plain memory copy of the parent class into the derived class * have to be altered. See GClassInitFunc() for a discussion of the class @@ -1436,8 +1463,9 @@ public alias extern(C) void function(void* gClass) GBaseFinalizeFunc; public alias extern(C) void function(void* gClass) GBaseInitFunc; /** - * A function to be called to transform @from_value to @to_value. If - * this is the @transform_to function of a binding, then @from_value + * A function to be called to transform @from_value to @to_value. + * + * If this is the @transform_to function of a binding, then @from_value * is the @source_property on the @source object, and @to_value is the * @target_property on the @target object. If this is the * @transform_from function of a %G_BINDING_BIDIRECTIONAL binding, @@ -1478,17 +1506,22 @@ public alias extern(C) void function(void* boxed) GBoxedFreeFunc; /** * The type used for callback functions in structure definitions and function - * signatures. This doesn't mean that all callback functions must take no - * parameters and return void. The required signature of a callback function - * is determined by the context in which is used (e.g. the signal to which it - * is connected). Use G_CALLBACK() to cast the callback function to a #GCallback. + * signatures. + * + * This doesn't mean that all callback functions must take no parameters and + * return void. The required signature of a callback function is determined by + * the context in which is used (e.g. the signal to which it is connected). + * + * Use G_CALLBACK() to cast the callback function to a #GCallback. */ public alias extern(C) void function() GCallback; /** * A callback function used by the type system to finalize a class. + * * This function is rarely needed, as dynamically allocated class resources * should be handled by GBaseInitFunc() and GBaseFinalizeFunc(). + * * Also, specification of a GClassFinalizeFunc() in the #GTypeInfo * structure of a static type is invalid, because classes of static types * will never be finalized (they are artificially kept alive when their @@ -1502,8 +1535,9 @@ public alias extern(C) void function(void* gClass, void* classData) GClassFinali /** * A callback function used by the type system to initialize the class - * of a specific type. This function should initialize all static class - * members. + * of a specific type. + * + * This function should initialize all static class members. * * The initialization process of a class involves: * @@ -1572,6 +1606,7 @@ public alias extern(C) void function(void* gClass, void* classData) GClassFinali * class->static_float = 3.14159265358979323846; * } * ]| + * * Initialization of TypeBClass will first cause initialization of * TypeAClass (derived classes reference their parent classes, see * g_type_class_ref() on this). @@ -1635,8 +1670,10 @@ public alias extern(C) void function(void* data, GClosure* closure) GClosureNoti /** * A callback function used by the type system to initialize a new - * instance of a type. This function initializes all instance members and - * allocates any resources required by it. + * instance of a type. + * + * This function initializes all instance members and allocates any resources + * required by it. * * Initialization of a derived instance involves calling all its parent * types instance initializers, so the class member of the instance @@ -1655,6 +1692,7 @@ public alias extern(C) void function(GTypeInstance* instance_, void* gClass) GIn /** * A callback function used by the type system to finalize an interface. + * * This function should destroy any internal data and release any resources * allocated by the corresponding GInterfaceInitFunc() function. * @@ -1666,8 +1704,10 @@ public alias extern(C) void function(void* gIface, void* ifaceData) GInterfaceFi /** * A callback function used by the type system to initialize a new - * interface. This function should initialize all internal data and - * allocate any resources required by the interface. + * interface. + * + * This function should initialize all internal data and* allocate any + * resources required by the interface. * * The members of @iface_data are guaranteed to have been filled with * zeros before this function is called. @@ -1713,10 +1753,12 @@ public alias extern(C) void function(GObject* object, uint propertyId, GValue* v /** * The signal accumulator is a special callback function that can be used * to collect return values of the various callbacks that are called - * during a signal emission. The signal accumulator is specified at signal - * creation time, if it is left %NULL, no accumulation of callback return - * values is performed. The return value of signal emissions is then the - * value returned by the last callback. + * during a signal emission. + * + * The signal accumulator is specified at signal creation time, if it is + * left %NULL, no accumulation of callback return values is performed. + * The return value of signal emissions is then the value returned by the + * last callback. * * Params: * ihint = Signal invocation hint, see #GSignalInvocationHint. @@ -1726,17 +1768,21 @@ public alias extern(C) void function(GObject* object, uint propertyId, GValue* v * data = Callback data that was specified when creating the signal. * * Returns: The accumulator function returns whether the signal emission - * should be aborted. Returning %FALSE means to abort the - * current emission and %TRUE is returned for continuation. + * should be aborted. Returning %TRUE will continue with + * the signal emission. Returning %FALSE will abort the current emission. + * Since 2.62, returning %FALSE will skip to the CLEANUP stage. In this case, + * emission will occur as normal in the CLEANUP stage and the handler's + * return value will be accumulated. */ public alias extern(C) int function(GSignalInvocationHint* ihint, GValue* returnAccu, GValue* handlerReturn, void* data) GSignalAccumulator; /** - * A simple function pointer to get invoked when the signal is emitted. This - * allows you to tie a hook to the signal type, so that it will trap all - * emissions of that signal, from any object. + * A simple function pointer to get invoked when the signal is emitted. + * + * Emission hooks allow you to tie a hook to the signal type, so that it will + * trap all emissions of that signal, from any object. * - * You may not attach these to signals created with the #G_SIGNAL_NO_HOOKS flag. + * You may not attach these to signals created with the %G_SIGNAL_NO_HOOKS flag. * * Params: * ihint = Signal invocation hint, see #GSignalInvocationHint. @@ -1753,7 +1799,9 @@ public alias extern(C) int function(GSignalInvocationHint* ihint, uint nParamVal /** * A callback function used for notification when the state - * of a toggle reference changes. See g_object_add_toggle_ref(). + * of a toggle reference changes. + * + * See also: g_object_add_toggle_ref() * * Params: * data = Callback data passed to g_object_add_toggle_ref() @@ -1767,10 +1815,11 @@ public alias extern(C) void function(void* data, GObject* object, int isLastRef) /** * A callback function which is called when the reference count of a class - * drops to zero. It may use g_type_class_ref() to prevent the class from - * being freed. You should not call g_type_class_unref() from a - * #GTypeClassCacheFunc function to prevent infinite recursion, use - * g_type_class_unref_uncached() instead. + * drops to zero. + * + * It may use g_type_class_ref() to prevent the class from being freed. You + * should not call g_type_class_unref() from a #GTypeClassCacheFunc function + * to prevent infinite recursion, use g_type_class_unref_uncached() instead. * * The functions have to check the class id passed in to figure * whether they actually want to cache the class of this type, since all @@ -1788,6 +1837,7 @@ public alias extern(C) int function(void* cacheData, GTypeClass* gClass) GTypeCl /** * A callback called after an interface vtable is initialized. + * * See g_type_add_interface_check(). * * Params: @@ -1804,7 +1854,7 @@ public alias extern(C) void function(void* checkData, void* gIface) GTypeInterfa * * Params: * plugin = the #GTypePlugin - * instanceType = the #GType of an instantiable type to which the interface + * instanceType = the #GType of an instantiatable type to which the interface * is added * interfaceType = the #GType of the interface whose info is completed * info = the #GInterfaceInfo to fill in @@ -1875,13 +1925,20 @@ public alias extern(C) void function(GValue* srcValue, GValue* destValue) GValue /** * A #GWeakNotify function can be added to an object as a callback that gets - * triggered when the object is finalized. Since the object is already being - * finalized when the #GWeakNotify is called, there's not much you could do - * with the object, apart from e.g. using its address as hash-index or the like. + * triggered when the object is finalized. + * + * Since the object is already being disposed when the #GWeakNotify is called, + * there's not much you could do with the object, apart from e.g. using its + * address as hash-index or the like. + * + * In particular, this means it’s invalid to call g_object_ref(), + * g_weak_ref_init(), g_weak_ref_set(), g_object_add_toggle_ref(), + * g_object_weak_ref(), g_object_add_weak_pointer() or any function which calls + * them on the object from this callback. * * Params: * data = data that was provided when the weak reference was established - * whereTheObjectWas = the object being finalized + * whereTheObjectWas = the object being disposed */ public alias extern(C) void function(void* data, GObject* whereTheObjectWas) GWeakNotify; @@ -1970,10 +2027,18 @@ alias G_TYPE_RESERVED_GLIB_LAST = TYPE_RESERVED_GLIB_LAST; enum TYPE_RESERVED_USER_FIRST = 49; alias G_TYPE_RESERVED_USER_FIRST = TYPE_RESERVED_USER_FIRST; +/** + * For string values, indicates that the string contained is canonical and will + * exist for the duration of the process. See g_value_set_interned_string(). + */ +enum VALUE_INTERNED_STRING = 268435456; +alias G_VALUE_INTERNED_STRING = VALUE_INTERNED_STRING; + /** * If passed to G_VALUE_COLLECT(), allocated data won't be copied * but used verbatim. This does not affect ref-counted types like - * objects. + * objects. This does not affect usage of g_value_copy(), the data will + * be copied if it is not ref-counted. */ enum VALUE_NOCOPY_CONTENTS = 134217728; alias G_VALUE_NOCOPY_CONTENTS = VALUE_NOCOPY_CONTENTS; diff --git a/generated/gtkd/gtk/AboutDialog.d b/generated/gtkd/gtk/AboutDialog.d index 097b6a109..cdc7c05e7 100644 --- a/generated/gtkd/gtk/AboutDialog.d +++ b/generated/gtkd/gtk/AboutDialog.d @@ -27,6 +27,7 @@ module gtk.AboutDialog; private import gdkpixbuf.Pixbuf; private import glib.ConstructionException; private import glib.Str; +private import glib.c.functions; private import gobject.ObjectG; private import gobject.Signals; private import gtk.Dialog; @@ -123,14 +124,14 @@ public class AboutDialog : Dialog */ public this() { - auto p = gtk_about_dialog_new(); + auto __p = gtk_about_dialog_new(); - if(p is null) + if(__p is null) { throw new ConstructionException("null returned by new"); } - this(cast(GtkAboutDialog*) p); + this(cast(GtkAboutDialog*) __p); } /** @@ -254,14 +255,14 @@ public class AboutDialog : Dialog */ public Pixbuf getLogo() { - auto p = gtk_about_dialog_get_logo(gtkAboutDialog); + auto __p = gtk_about_dialog_get_logo(gtkAboutDialog); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Pixbuf)(cast(GdkPixbuf*) p); + return ObjectG.getDObject!(Pixbuf)(cast(GdkPixbuf*) __p); } /** diff --git a/generated/gtkd/gtk/AccelGroup.d b/generated/gtkd/gtk/AccelGroup.d index 8cfea8a75..93d1652d4 100644 --- a/generated/gtkd/gtk/AccelGroup.d +++ b/generated/gtkd/gtk/AccelGroup.d @@ -28,6 +28,7 @@ private import gdk.Display; private import glib.ConstructionException; private import glib.ListSG; private import glib.Str; +private import glib.c.functions; private import gobject.Closure; private import gobject.ObjectG; private import gobject.Signals; @@ -98,14 +99,14 @@ public class AccelGroup : ObjectG */ public this() { - auto p = gtk_accel_group_new(); + auto __p = gtk_accel_group_new(); - if(p is null) + if(__p is null) { throw new ConstructionException("null returned by new"); } - this(cast(GtkAccelGroup*) p, true); + this(cast(GtkAccelGroup*) __p, true); } /** @@ -120,14 +121,14 @@ public class AccelGroup : ObjectG */ public static AccelGroup fromAccelClosure(Closure closure) { - auto p = gtk_accel_group_from_accel_closure((closure is null) ? null : closure.getClosureStruct()); + auto __p = gtk_accel_group_from_accel_closure((closure is null) ? null : closure.getClosureStruct()); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(AccelGroup)(cast(GtkAccelGroup*) p); + return ObjectG.getDObject!(AccelGroup)(cast(GtkAccelGroup*) __p); } /** @@ -303,9 +304,9 @@ public class AccelGroup : ObjectG { uint nEntries; - auto p = gtk_accel_group_query(gtkAccelGroup, accelKey, accelMods, &nEntries); + auto __p = gtk_accel_group_query(gtkAccelGroup, accelKey, accelMods, &nEntries); - return p[0 .. nEntries]; + return __p[0 .. nEntries]; } /** @@ -380,14 +381,14 @@ public class AccelGroup : ObjectG */ public static ListSG accelGroupsFromObject(ObjectG object) { - auto p = gtk_accel_groups_from_object((object is null) ? null : object.getObjectGStruct()); + auto __p = gtk_accel_groups_from_object((object is null) ? null : object.getObjectGStruct()); - if(p is null) + if(__p is null) { return null; } - return new ListSG(cast(GSList*) p); + return new ListSG(cast(GSList*) __p); } /** @@ -550,7 +551,7 @@ public class AccelGroup : ObjectG */ public static void acceleratorParseWithKeycode(string accelerator, out uint acceleratorKey, out uint[] acceleratorCodes, out GdkModifierType acceleratorMods) { - uint* outacceleratorCodes = null; + uint* outacceleratorCodes; gtk_accelerator_parse_with_keycode(Str.toStringz(accelerator), &acceleratorKey, &outacceleratorCodes, &acceleratorMods); diff --git a/generated/gtkd/gtk/AccelLabel.d b/generated/gtkd/gtk/AccelLabel.d index c7d167952..297ca846b 100644 --- a/generated/gtkd/gtk/AccelLabel.d +++ b/generated/gtkd/gtk/AccelLabel.d @@ -144,14 +144,14 @@ public class AccelLabel : Label */ public this(string string_) { - auto p = gtk_accel_label_new(Str.toStringz(string_)); + auto __p = gtk_accel_label_new(Str.toStringz(string_)); - if(p is null) + if(__p is null) { throw new ConstructionException("null returned by new"); } - this(cast(GtkAccelLabel*) p); + this(cast(GtkAccelLabel*) __p); } /** @@ -177,14 +177,14 @@ public class AccelLabel : Label */ public Widget getAccelWidget() { - auto p = gtk_accel_label_get_accel_widget(gtkAccelLabel); + auto __p = gtk_accel_label_get_accel_widget(gtkAccelLabel); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Widget)(cast(GtkWidget*) p); + return ObjectG.getDObject!(Widget)(cast(GtkWidget*) __p); } /** diff --git a/generated/gtkd/gtk/AccelMap.d b/generated/gtkd/gtk/AccelMap.d index 4008daa90..ac9a6c6ec 100644 --- a/generated/gtkd/gtk/AccelMap.d +++ b/generated/gtkd/gtk/AccelMap.d @@ -239,14 +239,14 @@ public class AccelMap : ObjectG */ public static AccelMap get() { - auto p = gtk_accel_map_get(); + auto __p = gtk_accel_map_get(); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(AccelMap)(cast(GtkAccelMap*) p); + return ObjectG.getDObject!(AccelMap)(cast(GtkAccelMap*) __p); } /** diff --git a/generated/gtkd/gtk/Accessible.d b/generated/gtkd/gtk/Accessible.d index 375032d41..876556227 100644 --- a/generated/gtkd/gtk/Accessible.d +++ b/generated/gtkd/gtk/Accessible.d @@ -103,14 +103,14 @@ public class Accessible : ObjectAtk */ public Widget getWidget() { - auto p = gtk_accessible_get_widget(gtkAccessible); + auto __p = gtk_accessible_get_widget(gtkAccessible); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Widget)(cast(GtkWidget*) p); + return ObjectG.getDObject!(Widget)(cast(GtkWidget*) __p); } /** diff --git a/generated/gtkd/gtk/Action.d b/generated/gtkd/gtk/Action.d index 64351a4de..453981ddc 100644 --- a/generated/gtkd/gtk/Action.d +++ b/generated/gtkd/gtk/Action.d @@ -28,6 +28,7 @@ private import gio.IconIF; private import glib.ConstructionException; private import glib.ListSG; private import glib.Str; +private import glib.c.functions; private import gobject.Closure; private import gobject.ObjectG; private import gobject.Signals; @@ -269,14 +270,14 @@ public class Action : ObjectG, BuildableIF */ public this(string name, string label, string tooltip, string stockId) { - auto p = gtk_action_new(Str.toStringz(name), Str.toStringz(label), Str.toStringz(tooltip), Str.toStringz(stockId)); + auto __p = gtk_action_new(Str.toStringz(name), Str.toStringz(label), Str.toStringz(tooltip), Str.toStringz(stockId)); - if(p is null) + if(__p is null) { throw new ConstructionException("null returned by new"); } - this(cast(GtkAction*) p, true); + this(cast(GtkAction*) __p, true); } /** @@ -360,14 +361,14 @@ public class Action : ObjectG, BuildableIF */ public Closure getAccelClosure() { - auto p = gtk_action_get_accel_closure(gtkAction); + auto __p = gtk_action_get_accel_closure(gtkAction); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Closure)(cast(GClosure*) p); + return ObjectG.getDObject!(Closure)(cast(GClosure*) __p); } /** @@ -416,14 +417,14 @@ public class Action : ObjectG, BuildableIF */ public IconIF getGicon() { - auto p = gtk_action_get_gicon(gtkAction); + auto __p = gtk_action_get_gicon(gtkAction); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(IconIF)(cast(GIcon*) p); + return ObjectG.getDObject!(IconIF)(cast(GIcon*) __p); } /** @@ -499,14 +500,14 @@ public class Action : ObjectG, BuildableIF */ public ListSG getProxies() { - auto p = gtk_action_get_proxies(gtkAction); + auto __p = gtk_action_get_proxies(gtkAction); - if(p is null) + if(__p is null) { return null; } - return new ListSG(cast(GSList*) p); + return new ListSG(cast(GSList*) __p); } /** diff --git a/generated/gtkd/gtk/ActionBar.d b/generated/gtkd/gtk/ActionBar.d index 9e3d49d70..d19d3af54 100644 --- a/generated/gtkd/gtk/ActionBar.d +++ b/generated/gtkd/gtk/ActionBar.d @@ -93,14 +93,14 @@ public class ActionBar : Bin */ public this() { - auto p = gtk_action_bar_new(); + auto __p = gtk_action_bar_new(); - if(p is null) + if(__p is null) { throw new ConstructionException("null returned by new"); } - this(cast(GtkActionBar*) p); + this(cast(GtkActionBar*) __p); } /** @@ -112,14 +112,14 @@ public class ActionBar : Bin */ public Widget getCenterWidget() { - auto p = gtk_action_bar_get_center_widget(gtkActionBar); + auto __p = gtk_action_bar_get_center_widget(gtkActionBar); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Widget)(cast(GtkWidget*) p); + return ObjectG.getDObject!(Widget)(cast(GtkWidget*) __p); } /** diff --git a/generated/gtkd/gtk/ActionGroup.d b/generated/gtkd/gtk/ActionGroup.d index edc8ea115..c35273874 100644 --- a/generated/gtkd/gtk/ActionGroup.d +++ b/generated/gtkd/gtk/ActionGroup.d @@ -27,6 +27,7 @@ module gtk.ActionGroup; private import glib.ConstructionException; private import glib.ListG; private import glib.Str; +private import glib.c.functions; private import gobject.ObjectG; private import gobject.Signals; private import gtk.AccelGroup; @@ -66,19 +67,20 @@ private import std.algorithm; * # GtkActionGroup as GtkBuildable # {#GtkActionGroup-BUILDER-UI} * * The #GtkActionGroup implementation of the #GtkBuildable interface accepts - * #GtkAction objects as elements in UI definitions. + * #GtkAction objects as `` elements in UI definitions. * * Note that it is probably more common to define actions and action groups * in the code, since they are directly related to what the code can do. * * The GtkActionGroup implementation of the GtkBuildable interface supports - * a custom element, which has attributes named “key“ and + * a custom `` element, which has attributes named “key“ and * “modifiers“ and allows to specify accelerators. This is similar to the - * element of #GtkWidget, the main difference is that + * `` element of #GtkWidget, the main difference is that * it doesn’t allow you to specify a signal. * * ## A #GtkDialog UI definition fragment. ## - * |[ + * + * |[ * * * @@ -145,14 +147,14 @@ public class ActionGroup : ObjectG, BuildableIF */ public this(string name) { - auto p = gtk_action_group_new(Str.toStringz(name)); + auto __p = gtk_action_group_new(Str.toStringz(name)); - if(p is null) + if(__p is null) { throw new ConstructionException("null returned by new"); } - this(cast(GtkActionGroup*) p, true); + this(cast(GtkActionGroup*) __p, true); } /** @@ -313,14 +315,14 @@ public class ActionGroup : ObjectG, BuildableIF */ public AccelGroup getAccelGroup() { - auto p = gtk_action_group_get_accel_group(gtkActionGroup); + auto __p = gtk_action_group_get_accel_group(gtkActionGroup); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(AccelGroup)(cast(GtkAccelGroup*) p); + return ObjectG.getDObject!(AccelGroup)(cast(GtkAccelGroup*) __p); } /** @@ -335,14 +337,14 @@ public class ActionGroup : ObjectG, BuildableIF */ public Action getAction(string actionName) { - auto p = gtk_action_group_get_action(gtkActionGroup, Str.toStringz(actionName)); + auto __p = gtk_action_group_get_action(gtkActionGroup, Str.toStringz(actionName)); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Action)(cast(GtkAction*) p); + return ObjectG.getDObject!(Action)(cast(GtkAction*) __p); } /** @@ -396,14 +398,14 @@ public class ActionGroup : ObjectG, BuildableIF */ public ListG listActions() { - auto p = gtk_action_group_list_actions(gtkActionGroup); + auto __p = gtk_action_group_list_actions(gtkActionGroup); - if(p is null) + if(__p is null) { return null; } - return new ListG(cast(GList*) p); + return new ListG(cast(GList*) __p); } /** diff --git a/generated/gtkd/gtk/ActionableIF.d b/generated/gtkd/gtk/ActionableIF.d index 8be8e8eb1..3b5df0690 100644 --- a/generated/gtkd/gtk/ActionableIF.d +++ b/generated/gtkd/gtk/ActionableIF.d @@ -26,6 +26,7 @@ module gtk.ActionableIF; private import glib.Str; private import glib.Variant; +private import glib.c.functions; private import gtk.c.functions; public import gtk.c.types; public import gtkc.gtktypes; diff --git a/generated/gtkd/gtk/ActionableT.d b/generated/gtkd/gtk/ActionableT.d index 3511c1a23..accaa041e 100644 --- a/generated/gtkd/gtk/ActionableT.d +++ b/generated/gtkd/gtk/ActionableT.d @@ -26,6 +26,7 @@ module gtk.ActionableT; public import glib.Str; public import glib.Variant; +public import glib.c.functions; public import gtk.c.functions; public import gtk.c.types; public import gtkc.gtktypes; @@ -83,14 +84,14 @@ public template ActionableT(TStruct) */ public Variant getActionTargetValue() { - auto p = gtk_actionable_get_action_target_value(getActionableStruct()); + auto __p = gtk_actionable_get_action_target_value(getActionableStruct()); - if(p is null) + if(__p is null) { return null; } - return new Variant(cast(GVariant*) p); + return new Variant(cast(GVariant*) __p); } /** diff --git a/generated/gtkd/gtk/ActivatableT.d b/generated/gtkd/gtk/ActivatableT.d index 1d8436594..96b63cc74 100644 --- a/generated/gtkd/gtk/ActivatableT.d +++ b/generated/gtkd/gtk/ActivatableT.d @@ -314,14 +314,14 @@ public template ActivatableT(TStruct) */ public Action getRelatedAction() { - auto p = gtk_activatable_get_related_action(getActivatableStruct()); + auto __p = gtk_activatable_get_related_action(getActivatableStruct()); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Action)(cast(GtkAction*) p); + return ObjectG.getDObject!(Action)(cast(GtkAction*) __p); } /** diff --git a/generated/gtkd/gtk/Adjustment.d b/generated/gtkd/gtk/Adjustment.d index 9bdfb47d6..cfc4b5a87 100644 --- a/generated/gtkd/gtk/Adjustment.d +++ b/generated/gtkd/gtk/Adjustment.d @@ -94,14 +94,14 @@ public class Adjustment : ObjectG */ public this(double value, double lower, double upper, double stepIncrement, double pageIncrement, double pageSize) { - auto p = gtk_adjustment_new(value, lower, upper, stepIncrement, pageIncrement, pageSize); + auto __p = gtk_adjustment_new(value, lower, upper, stepIncrement, pageIncrement, pageSize); - if(p is null) + if(__p is null) { throw new ConstructionException("null returned by new"); } - this(cast(GtkAdjustment*) p); + this(cast(GtkAdjustment*) __p); } /** diff --git a/generated/gtkd/gtk/Alignment.d b/generated/gtkd/gtk/Alignment.d index 27b65a7db..7aef1682a 100644 --- a/generated/gtkd/gtk/Alignment.d +++ b/generated/gtkd/gtk/Alignment.d @@ -185,14 +185,14 @@ public class Alignment : Bin */ public this(float xalign, float yalign, float xscale, float yscale) { - auto p = gtk_alignment_new(xalign, yalign, xscale, yscale); + auto __p = gtk_alignment_new(xalign, yalign, xscale, yscale); - if(p is null) + if(__p is null) { throw new ConstructionException("null returned by new"); } - this(cast(GtkAlignment*) p); + this(cast(GtkAlignment*) __p); } /** diff --git a/generated/gtkd/gtk/AppChooserButton.d b/generated/gtkd/gtk/AppChooserButton.d index 58d2ea7ac..4aac31529 100644 --- a/generated/gtkd/gtk/AppChooserButton.d +++ b/generated/gtkd/gtk/AppChooserButton.d @@ -27,6 +27,7 @@ module gtk.AppChooserButton; private import gio.IconIF; private import glib.ConstructionException; private import glib.Str; +private import glib.c.functions; private import gobject.ObjectG; private import gobject.Signals; private import gtk.AppChooserIF; @@ -116,14 +117,14 @@ public class AppChooserButton : ComboBox, AppChooserIF */ public this(string contentType) { - auto p = gtk_app_chooser_button_new(Str.toStringz(contentType)); + auto __p = gtk_app_chooser_button_new(Str.toStringz(contentType)); - if(p is null) + if(__p is null) { throw new ConstructionException("null returned by new"); } - this(cast(GtkAppChooserButton*) p); + this(cast(GtkAppChooserButton*) __p); } /** diff --git a/generated/gtkd/gtk/AppChooserDialog.d b/generated/gtkd/gtk/AppChooserDialog.d index 27aa62c8f..9ee6e4d0b 100644 --- a/generated/gtkd/gtk/AppChooserDialog.d +++ b/generated/gtkd/gtk/AppChooserDialog.d @@ -27,6 +27,7 @@ module gtk.AppChooserDialog; private import gio.FileIF; private import glib.ConstructionException; private import glib.Str; +private import glib.c.functions; private import gobject.ObjectG; private import gtk.AppChooserIF; private import gtk.AppChooserT; @@ -104,14 +105,14 @@ public class AppChooserDialog : Dialog, AppChooserIF */ public this(Window parent, GtkDialogFlags flags, FileIF file) { - auto p = gtk_app_chooser_dialog_new((parent is null) ? null : parent.getWindowStruct(), flags, (file is null) ? null : file.getFileStruct()); + auto __p = gtk_app_chooser_dialog_new((parent is null) ? null : parent.getWindowStruct(), flags, (file is null) ? null : file.getFileStruct()); - if(p is null) + if(__p is null) { throw new ConstructionException("null returned by new"); } - this(cast(GtkAppChooserDialog*) p); + this(cast(GtkAppChooserDialog*) __p); } /** @@ -131,14 +132,14 @@ public class AppChooserDialog : Dialog, AppChooserIF */ public this(Window parent, GtkDialogFlags flags, string contentType) { - auto p = gtk_app_chooser_dialog_new_for_content_type((parent is null) ? null : parent.getWindowStruct(), flags, Str.toStringz(contentType)); + auto __p = gtk_app_chooser_dialog_new_for_content_type((parent is null) ? null : parent.getWindowStruct(), flags, Str.toStringz(contentType)); - if(p is null) + if(__p is null) { throw new ConstructionException("null returned by new_for_content_type"); } - this(cast(GtkAppChooserDialog*) p); + this(cast(GtkAppChooserDialog*) __p); } /** @@ -161,14 +162,14 @@ public class AppChooserDialog : Dialog, AppChooserIF */ public Widget getWidget() { - auto p = gtk_app_chooser_dialog_get_widget(gtkAppChooserDialog); + auto __p = gtk_app_chooser_dialog_get_widget(gtkAppChooserDialog); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Widget)(cast(GtkWidget*) p); + return ObjectG.getDObject!(Widget)(cast(GtkWidget*) __p); } /** diff --git a/generated/gtkd/gtk/AppChooserIF.d b/generated/gtkd/gtk/AppChooserIF.d index c22c0ff3c..5afabf21c 100644 --- a/generated/gtkd/gtk/AppChooserIF.d +++ b/generated/gtkd/gtk/AppChooserIF.d @@ -26,6 +26,7 @@ module gtk.AppChooserIF; private import gio.AppInfoIF; private import glib.Str; +private import glib.c.functions; private import gobject.ObjectG; private import gtk.c.functions; public import gtk.c.types; diff --git a/generated/gtkd/gtk/AppChooserT.d b/generated/gtkd/gtk/AppChooserT.d index 44fcfda0c..4016997ea 100644 --- a/generated/gtkd/gtk/AppChooserT.d +++ b/generated/gtkd/gtk/AppChooserT.d @@ -26,6 +26,7 @@ module gtk.AppChooserT; public import gio.AppInfoIF; public import glib.Str; +public import glib.c.functions; public import gobject.ObjectG; public import gtk.c.functions; public import gtk.c.types; @@ -72,14 +73,14 @@ public template AppChooserT(TStruct) */ public AppInfoIF getAppInfo() { - auto p = gtk_app_chooser_get_app_info(getAppChooserStruct()); + auto __p = gtk_app_chooser_get_app_info(getAppChooserStruct()); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(AppInfoIF)(cast(GAppInfo*) p, true); + return ObjectG.getDObject!(AppInfoIF)(cast(GAppInfo*) __p, true); } /** diff --git a/generated/gtkd/gtk/AppChooserWidget.d b/generated/gtkd/gtk/AppChooserWidget.d index f09ab9aa7..dfebdd331 100644 --- a/generated/gtkd/gtk/AppChooserWidget.d +++ b/generated/gtkd/gtk/AppChooserWidget.d @@ -27,6 +27,7 @@ module gtk.AppChooserWidget; private import gio.AppInfoIF; private import glib.ConstructionException; private import glib.Str; +private import glib.c.functions; private import gobject.ObjectG; private import gobject.Signals; private import gtk.AppChooserIF; @@ -116,14 +117,14 @@ public class AppChooserWidget : Box, AppChooserIF */ public this(string contentType) { - auto p = gtk_app_chooser_widget_new(Str.toStringz(contentType)); + auto __p = gtk_app_chooser_widget_new(Str.toStringz(contentType)); - if(p is null) + if(__p is null) { throw new ConstructionException("null returned by new"); } - this(cast(GtkAppChooserWidget*) p); + this(cast(GtkAppChooserWidget*) __p); } /** diff --git a/generated/gtkd/gtk/Application.d b/generated/gtkd/gtk/Application.d index fa82fa409..e46f5b7ea 100644 --- a/generated/gtkd/gtk/Application.d +++ b/generated/gtkd/gtk/Application.d @@ -28,13 +28,14 @@ private import gio.ActionGroupIF; private import gio.ActionGroupT; private import gio.ActionMapIF; private import gio.ActionMapT; -private import gio.Application : GioApplication = Application; +private import gio.Application : DGioApplication = Application; private import gio.Menu; private import gio.MenuModel; private import glib.ConstructionException; private import glib.ListG; private import glib.Str; private import glib.Variant; +private import glib.c.functions; private import gobject.ObjectG; private import gobject.Signals; private import gtk.Window; @@ -122,7 +123,7 @@ private import std.algorithm; * [HowDoI: Using GtkApplication](https://wiki.gnome.org/HowDoI/GtkApplication), * [Getting Started with GTK+: Basics](https://developer.gnome.org/gtk3/stable/gtk-getting-started.html#id-1.2.3.3) */ -public class Application : GioApplication +public class Application : DGioApplication { /** the main Gtk struct */ protected GtkApplication* gtkApplication; @@ -225,14 +226,14 @@ public class Application : GioApplication */ public this(string applicationId, GApplicationFlags flags) { - auto p = gtk_application_new(Str.toStringz(applicationId), flags); + auto __p = gtk_application_new(Str.toStringz(applicationId), flags); - if(p is null) + if(__p is null) { throw new ConstructionException("null returned by new"); } - this(cast(GtkApplication*) p, true); + this(cast(GtkApplication*) __p, true); } /** @@ -363,14 +364,14 @@ public class Application : GioApplication */ public Window getActiveWindow() { - auto p = gtk_application_get_active_window(gtkApplication); + auto __p = gtk_application_get_active_window(gtkApplication); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Window)(cast(GtkWindow*) p); + return ObjectG.getDObject!(Window)(cast(GtkWindow*) __p); } /** @@ -384,14 +385,14 @@ public class Application : GioApplication */ public MenuModel getAppMenu() { - auto p = gtk_application_get_app_menu(gtkApplication); + auto __p = gtk_application_get_app_menu(gtkApplication); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(MenuModel)(cast(GMenuModel*) p); + return ObjectG.getDObject!(MenuModel)(cast(GMenuModel*) __p); } /** @@ -409,14 +410,14 @@ public class Application : GioApplication */ public Menu getMenuById(string id) { - auto p = gtk_application_get_menu_by_id(gtkApplication, Str.toStringz(id)); + auto __p = gtk_application_get_menu_by_id(gtkApplication, Str.toStringz(id)); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Menu)(cast(GMenu*) p); + return ObjectG.getDObject!(Menu)(cast(GMenu*) __p); } /** @@ -429,14 +430,14 @@ public class Application : GioApplication */ public MenuModel getMenubar() { - auto p = gtk_application_get_menubar(gtkApplication); + auto __p = gtk_application_get_menubar(gtkApplication); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(MenuModel)(cast(GMenuModel*) p); + return ObjectG.getDObject!(MenuModel)(cast(GMenuModel*) __p); } /** @@ -455,14 +456,14 @@ public class Application : GioApplication */ public Window getWindowById(uint id) { - auto p = gtk_application_get_window_by_id(gtkApplication, id); + auto __p = gtk_application_get_window_by_id(gtkApplication, id); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Window)(cast(GtkWindow*) p); + return ObjectG.getDObject!(Window)(cast(GtkWindow*) __p); } /** @@ -482,14 +483,14 @@ public class Application : GioApplication */ public ListG getWindows() { - auto p = gtk_application_get_windows(gtkApplication); + auto __p = gtk_application_get_windows(gtkApplication); - if(p is null) + if(__p is null) { return null; } - return new ListG(cast(GList*) p); + return new ListG(cast(GList*) __p); } /** diff --git a/generated/gtkd/gtk/ApplicationWindow.d b/generated/gtkd/gtk/ApplicationWindow.d index 8258c1ba7..5f8507d80 100644 --- a/generated/gtkd/gtk/ApplicationWindow.d +++ b/generated/gtkd/gtk/ApplicationWindow.d @@ -199,14 +199,14 @@ public class ApplicationWindow : Window, ActionGroupIF, ActionMapIF */ public this(Application application) { - auto p = gtk_application_window_new((application is null) ? null : application.getGtkApplicationStruct()); + auto __p = gtk_application_window_new((application is null) ? null : application.getGtkApplicationStruct()); - if(p is null) + if(__p is null) { throw new ConstructionException("null returned by new"); } - this(cast(GtkApplicationWindow*) p); + this(cast(GtkApplicationWindow*) __p); } /** @@ -219,14 +219,14 @@ public class ApplicationWindow : Window, ActionGroupIF, ActionMapIF */ public ShortcutsWindow getHelpOverlay() { - auto p = gtk_application_window_get_help_overlay(gtkApplicationWindow); + auto __p = gtk_application_window_get_help_overlay(gtkApplicationWindow); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(ShortcutsWindow)(cast(GtkShortcutsWindow*) p); + return ObjectG.getDObject!(ShortcutsWindow)(cast(GtkShortcutsWindow*) __p); } /** diff --git a/generated/gtkd/gtk/Arrow.d b/generated/gtkd/gtk/Arrow.d index 3cfe5aa3e..92c932f1e 100644 --- a/generated/gtkd/gtk/Arrow.d +++ b/generated/gtkd/gtk/Arrow.d @@ -105,14 +105,14 @@ public class Arrow : Misc */ public this(GtkArrowType arrowType, GtkShadowType shadowType) { - auto p = gtk_arrow_new(arrowType, shadowType); + auto __p = gtk_arrow_new(arrowType, shadowType); - if(p is null) + if(__p is null) { throw new ConstructionException("null returned by new"); } - this(cast(GtkArrow*) p); + this(cast(GtkArrow*) __p); } /** diff --git a/generated/gtkd/gtk/AspectFrame.d b/generated/gtkd/gtk/AspectFrame.d index bfee5aab8..6fa8bf896 100644 --- a/generated/gtkd/gtk/AspectFrame.d +++ b/generated/gtkd/gtk/AspectFrame.d @@ -103,14 +103,14 @@ public class AspectFrame : Frame */ public this(string label, float xalign, float yalign, float ratio, bool obeyChild) { - auto p = gtk_aspect_frame_new(Str.toStringz(label), xalign, yalign, ratio, obeyChild); + auto __p = gtk_aspect_frame_new(Str.toStringz(label), xalign, yalign, ratio, obeyChild); - if(p is null) + if(__p is null) { throw new ConstructionException("null returned by new"); } - this(cast(GtkAspectFrame*) p); + this(cast(GtkAspectFrame*) __p); } /** diff --git a/generated/gtkd/gtk/Assistant.d b/generated/gtkd/gtk/Assistant.d index 807ec2819..62e9a6e07 100644 --- a/generated/gtkd/gtk/Assistant.d +++ b/generated/gtkd/gtk/Assistant.d @@ -27,6 +27,7 @@ module gtk.Assistant; private import gdkpixbuf.Pixbuf; private import glib.ConstructionException; private import glib.Str; +private import glib.c.functions; private import gobject.ObjectG; private import gobject.Signals; private import gtk.Widget; @@ -113,14 +114,14 @@ public class Assistant : Window */ public this() { - auto p = gtk_assistant_new(); + auto __p = gtk_assistant_new(); - if(p is null) + if(__p is null) { throw new ConstructionException("null returned by new"); } - this(cast(GtkAssistant*) p); + this(cast(GtkAssistant*) __p); } /** @@ -209,14 +210,14 @@ public class Assistant : Window */ public Widget getNthPage(int pageNum) { - auto p = gtk_assistant_get_nth_page(gtkAssistant, pageNum); + auto __p = gtk_assistant_get_nth_page(gtkAssistant, pageNum); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Widget)(cast(GtkWidget*) p); + return ObjectG.getDObject!(Widget)(cast(GtkWidget*) __p); } /** @@ -265,14 +266,14 @@ public class Assistant : Window */ public Pixbuf getPageHeaderImage(Widget page) { - auto p = gtk_assistant_get_page_header_image(gtkAssistant, (page is null) ? null : page.getWidgetStruct()); + auto __p = gtk_assistant_get_page_header_image(gtkAssistant, (page is null) ? null : page.getWidgetStruct()); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Pixbuf)(cast(GdkPixbuf*) p); + return ObjectG.getDObject!(Pixbuf)(cast(GdkPixbuf*) __p); } /** @@ -291,14 +292,14 @@ public class Assistant : Window */ public Pixbuf getPageSideImage(Widget page) { - auto p = gtk_assistant_get_page_side_image(gtkAssistant, (page is null) ? null : page.getWidgetStruct()); + auto __p = gtk_assistant_get_page_side_image(gtkAssistant, (page is null) ? null : page.getWidgetStruct()); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Pixbuf)(cast(GdkPixbuf*) p); + return ObjectG.getDObject!(Pixbuf)(cast(GdkPixbuf*) __p); } /** diff --git a/generated/gtkd/gtk/Bin.d b/generated/gtkd/gtk/Bin.d index b4be34ebf..5fc48a8a0 100644 --- a/generated/gtkd/gtk/Bin.d +++ b/generated/gtkd/gtk/Bin.d @@ -85,13 +85,13 @@ public class Bin : Container */ public Widget getChild() { - auto p = gtk_bin_get_child(gtkBin); + auto __p = gtk_bin_get_child(gtkBin); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Widget)(cast(GtkWidget*) p); + return ObjectG.getDObject!(Widget)(cast(GtkWidget*) __p); } } diff --git a/generated/gtkd/gtk/BindingSet.d b/generated/gtkd/gtk/BindingSet.d index 0a758008c..48921755c 100644 --- a/generated/gtkd/gtk/BindingSet.d +++ b/generated/gtkd/gtk/BindingSet.d @@ -28,6 +28,7 @@ private import glib.ConstructionException; private import glib.ListSG; private import glib.MemorySlice; private import glib.Str; +private import glib.c.functions; private import gobject.ObjectG; private import gtk.c.functions; public import gtk.c.types; @@ -236,14 +237,14 @@ public final class BindingSet */ public static BindingSet byClass(void* objectClass) { - auto p = gtk_binding_set_by_class(objectClass); + auto __p = gtk_binding_set_by_class(objectClass); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(BindingSet)(cast(GtkBindingSet*) p); + return ObjectG.getDObject!(BindingSet)(cast(GtkBindingSet*) __p); } /** @@ -259,14 +260,14 @@ public final class BindingSet */ public static BindingSet find(string setName) { - auto p = gtk_binding_set_find(Str.toStringz(setName)); + auto __p = gtk_binding_set_find(Str.toStringz(setName)); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(BindingSet)(cast(GtkBindingSet*) p); + return ObjectG.getDObject!(BindingSet)(cast(GtkBindingSet*) __p); } /** @@ -282,14 +283,14 @@ public final class BindingSet */ public this(string setName) { - auto p = gtk_binding_set_new(Str.toStringz(setName)); + auto __p = gtk_binding_set_new(Str.toStringz(setName)); - if(p is null) + if(__p is null) { throw new ConstructionException("null returned by new"); } - this(cast(GtkBindingSet*) p); + this(cast(GtkBindingSet*) __p); } /** diff --git a/generated/gtkd/gtk/Border.d b/generated/gtkd/gtk/Border.d index d39308454..dbbea046a 100644 --- a/generated/gtkd/gtk/Border.d +++ b/generated/gtkd/gtk/Border.d @@ -147,14 +147,14 @@ public final class Border */ public this() { - auto p = gtk_border_new(); + auto __p = gtk_border_new(); - if(p is null) + if(__p is null) { throw new ConstructionException("null returned by new"); } - this(cast(GtkBorder*) p); + this(cast(GtkBorder*) __p); } /** @@ -164,14 +164,14 @@ public final class Border */ public Border copy() { - auto p = gtk_border_copy(gtkBorder); + auto __p = gtk_border_copy(gtkBorder); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Border)(cast(GtkBorder*) p, true); + return ObjectG.getDObject!(Border)(cast(GtkBorder*) __p, true); } /** diff --git a/generated/gtkd/gtk/Box.d b/generated/gtkd/gtk/Box.d index 6345f9de4..2a31a2c18 100644 --- a/generated/gtkd/gtk/Box.d +++ b/generated/gtkd/gtk/Box.d @@ -137,14 +137,14 @@ public class Box : Container, OrientableIF */ public this(GtkOrientation orientation, int spacing) { - auto p = gtk_box_new(orientation, spacing); + auto __p = gtk_box_new(orientation, spacing); - if(p is null) + if(__p is null) { throw new ConstructionException("null returned by new"); } - this(cast(GtkBox*) p); + this(cast(GtkBox*) __p); } /** @@ -169,14 +169,14 @@ public class Box : Container, OrientableIF */ public Widget getCenterWidget() { - auto p = gtk_box_get_center_widget(gtkBox); + auto __p = gtk_box_get_center_widget(gtkBox); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(Widget)(cast(GtkWidget*) p); + return ObjectG.getDObject!(Widget)(cast(GtkWidget*) __p); } /** diff --git a/generated/gtkd/gtk/BuildableIF.d b/generated/gtkd/gtk/BuildableIF.d index f962b15d4..3749a4145 100644 --- a/generated/gtkd/gtk/BuildableIF.d +++ b/generated/gtkd/gtk/BuildableIF.d @@ -25,6 +25,7 @@ module gtk.BuildableIF; private import glib.Str; +private import glib.c.functions; private import gobject.ObjectG; private import gobject.Value; private import gtk.Builder; @@ -119,7 +120,7 @@ public interface BuildableIF{ public void customTagEnd(Builder builder, ObjectG child, string tagname, void** data); /** - * This is called for each unknown element under . + * This is called for each unknown element under ``. * * Params: * builder = a #GtkBuilder used to construct this object diff --git a/generated/gtkd/gtk/BuildableT.d b/generated/gtkd/gtk/BuildableT.d index 6ea50019b..13775e53b 100644 --- a/generated/gtkd/gtk/BuildableT.d +++ b/generated/gtkd/gtk/BuildableT.d @@ -25,6 +25,7 @@ module gtk.BuildableT; public import glib.Str; +public import glib.c.functions; public import gobject.ObjectG; public import gobject.Value; public import gtk.Builder; @@ -90,14 +91,14 @@ public template BuildableT(TStruct) */ public ObjectG constructChild(Builder builder, string name) { - auto p = gtk_buildable_construct_child(getBuildableStruct(), (builder is null) ? null : builder.getBuilderStruct(), Str.toStringz(name)); + auto __p = gtk_buildable_construct_child(getBuildableStruct(), (builder is null) ? null : builder.getBuilderStruct(), Str.toStringz(name)); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(ObjectG)(cast(GObject*) p, true); + return ObjectG.getDObject!(ObjectG)(cast(GObject*) __p, true); } /** @@ -135,7 +136,7 @@ public template BuildableT(TStruct) } /** - * This is called for each unknown element under . + * This is called for each unknown element under ``. * * Params: * builder = a #GtkBuilder used to construct this object @@ -168,14 +169,14 @@ public template BuildableT(TStruct) */ public ObjectG getInternalChild(Builder builder, string childname) { - auto p = gtk_buildable_get_internal_child(getBuildableStruct(), (builder is null) ? null : builder.getBuilderStruct(), Str.toStringz(childname)); + auto __p = gtk_buildable_get_internal_child(getBuildableStruct(), (builder is null) ? null : builder.getBuilderStruct(), Str.toStringz(childname)); - if(p is null) + if(__p is null) { return null; } - return ObjectG.getDObject!(ObjectG)(cast(GObject*) p); + return ObjectG.getDObject!(ObjectG)(cast(GObject*) __p); } /** diff --git a/generated/gtkd/gtk/Builder.d b/generated/gtkd/gtk/Builder.d index f5c3bfa88..821322e79 100644 --- a/generated/gtkd/gtk/Builder.d +++ b/generated/gtkd/gtk/Builder.d @@ -90,27 +90,27 @@ private import std.string; * It is common to use `.ui` as the filename extension for files containing * GtkBuilder UI definitions. * - * [RELAX NG Compact Syntax](https://git.gnome.org/browse/gtk+/tree/gtk/gtkbuilder.rnc) + * [RELAX NG Compact Syntax](https://gitlab.gnome.org/GNOME/gtk/-/blob/gtk-3-24/gtk/gtkbuilder.rnc) * - * The toplevel element is . It optionally takes a “domain” + * The toplevel element is ``. It optionally takes a “domain” * attribute, which will make the builder look for translated strings * using dgettext() in the domain specified. This can also be done by * calling gtk_builder_set_translation_domain() on the builder. - * Objects are described by elements, which can contain - * elements to set properties, elements which - * connect signals to handlers, and elements, which describe + * Objects are described by `` elements, which can contain + * `` elements to set properties, `` elements which + * connect signals to handlers, and `` elements, which describe * child objects (most often widgets inside a container, but also e.g. - * actions in an action group, or columns in a tree model). A - * element contains an element which describes the child object. - * The target toolkit version(s) are described by elements, + * actions in an action group, or columns in a tree model). A `` + * element contains an `` element which describes the child object. + * The target toolkit version(s) are described by `` elements, * the “lib” attribute specifies the widget library in question (currently * the only supported value is “gtk+”) and the “version” attribute specifies - * the target version in the form “.”. The builder will error + * the target version in the form `.`. The builder will error * out if the version requirements are not met. * - * Typically, the specific kind of object represented by an + * Typically, the specific kind of object represented by an `` * element is specified by the “class” attribute. If the type has not - * been loaded yet, GTK+ tries to find the get_type() function from the + * been loaded yet, GTK+ tries to find the `get_type()` function from the * class name by applying heuristics. This works in most cases, but if * necessary, it is possible to specify the name of the get_type() function * explictly with the "type-func" attribute. As a special case, GtkBuilder @@ -123,10 +123,10 @@ private import std.string; * application to retrieve them from the builder with gtk_builder_get_object(). * An id is also necessary to use the object as property value in other * parts of the UI definition. GTK+ reserves ids starting and ending - * with ___ (3 underscores) for its own purposes. + * with `___` (3 underscores) for its own purposes. * * Setting properties of objects is pretty straightforward with the - * element: the “name” attribute specifies the name of the + * `` element: the “name” attribute specifies the name of the * property, and the content of the element specifies the value. * If the “translatable” attribute is set to a true value, GTK+ uses * gettext() (or dgettext() if the builder has a translation domain set) @@ -160,11 +160,11 @@ private import std.string; * property value using the attributes * "bind-source" to specify the source object of the binding, * "bind-property" to specify the source property and optionally - * "bind-flags" to specify the binding flags - * Internally builder implement this using GBinding objects. + * "bind-flags" to specify the binding flags. + * Internally builder implements this using GBinding objects. * For more information see g_object_bind_property() * - * Signal handlers are set up with the element. The “name” + * Signal handlers are set up with the `` element. The “name” * attribute specifies the name of the signal, and the “handler” attribute * specifies the function to connect to the signal. By default, GTK+ tries * to find the handler using g_module_symbol(), but this can be changed by @@ -180,19 +180,19 @@ private import std.string; * been constructed by GTK+ as part of a composite widget, to set * properties on them or to add further children (e.g. the @vbox of * a #GtkDialog). This can be achieved by setting the “internal-child” - * propery of the element to a true value. Note that GtkBuilder - * still requires an element for the internal child, even if it + * property of the `` element to a true value. Note that GtkBuilder + * still requires an `` element for the internal child, even if it * has already been constructed. * * A number of widgets have different places where a child can be added * (e.g. tabs vs. page content in notebooks). This can be reflected in - * a UI definition by specifying the “type” attribute on a + * a UI definition by specifying the “type” attribute on a `` * The possible values for the “type” attribute are described in the * sections describing the widget-specific portions of UI definitions. * * # A GtkBuilder UI Definition * - * |[ + * |[ * * * @@ -218,14 +218,14 @@ private import std.string; * * Beyond this general structure, several object classes define their * own XML DTD fragments for filling in the ANY placeholders in the DTD - * above. Note that a custom element in a element gets parsed by + * above. Note that a custom element in a `` element gets parsed by * the custom tag handler of the parent object, while a custom element in - * an element gets parsed by the custom tag handler of the object. + * an `` element gets parsed by the custom tag handler of the object. * * These XML fragments are explained in the documentation of the * respective objects. * - * Additionally, since 3.10 a special