@@ -168,52 +168,52 @@ begin
168
168
gtype_wrapper_cache_init() = merge!(GLib.gtype_wrappers, gtype_wrapper_cache)
169
169
function GdkPixbuf(_colorspace, _has_alpha::Bool, _bits_per_sample::Integer, _width::Integer, _height::Integer; kwargs...)
170
170
obj = G_.Pixbuf_new(_colorspace, _has_alpha, _bits_per_sample, _width, _height)
171
- GLib.setproperties!(obj; kwargs...)
171
+ obj !== nothing && GLib.setproperties!(obj; kwargs...)
172
172
obj
173
173
end
174
174
function GdkPixbuf(_data::GBytes, _colorspace, _has_alpha::Bool, _bits_per_sample::Integer, _width::Integer, _height::Integer, _rowstride::Integer; kwargs...)
175
175
obj = G_.Pixbuf_new_from_bytes(_data, _colorspace, _has_alpha, _bits_per_sample, _width, _height, _rowstride)
176
- GLib.setproperties!(obj; kwargs...)
176
+ obj !== nothing && GLib.setproperties!(obj; kwargs...)
177
177
obj
178
178
end
179
179
function GdkPixbuf(_data, _colorspace, _has_alpha::Bool, _bits_per_sample::Integer, _width::Integer, _height::Integer, _rowstride::Integer, _destroy_fn::Maybe(Function); kwargs...)
180
180
obj = G_.Pixbuf_new_from_data(_data, _colorspace, _has_alpha, _bits_per_sample, _width, _height, _rowstride, _destroy_fn)
181
- GLib.setproperties!(obj; kwargs...)
181
+ obj !== nothing && GLib.setproperties!(obj; kwargs...)
182
182
obj
183
183
end
184
184
function GdkPixbuf(_filename::Union{AbstractString, Symbol}; kwargs...)
185
185
obj = G_.Pixbuf_new_from_file(_filename)
186
- GLib.setproperties!(obj; kwargs...)
186
+ obj !== nothing && GLib.setproperties!(obj; kwargs...)
187
187
obj
188
188
end
189
189
function GdkPixbuf(_filename::Union{AbstractString, Symbol}, _width::Integer, _height::Integer, _preserve_aspect_ratio::Bool; kwargs...)
190
190
obj = G_.Pixbuf_new_from_file_at_scale(_filename, _width, _height, _preserve_aspect_ratio)
191
- GLib.setproperties!(obj; kwargs...)
191
+ obj !== nothing && GLib.setproperties!(obj; kwargs...)
192
192
obj
193
193
end
194
194
function GdkPixbuf(_filename::Union{AbstractString, Symbol}, _width::Integer, _height::Integer; kwargs...)
195
195
obj = G_.Pixbuf_new_from_file_at_size(_filename, _width, _height)
196
- GLib.setproperties!(obj; kwargs...)
196
+ obj !== nothing && GLib.setproperties!(obj; kwargs...)
197
197
obj
198
198
end
199
199
function GdkPixbuf(_stream::GInputStream, _cancellable::Maybe(GCancellable); kwargs...)
200
200
obj = G_.Pixbuf_new_from_stream(_stream, _cancellable)
201
- GLib.setproperties!(obj; kwargs...)
201
+ obj !== nothing && GLib.setproperties!(obj; kwargs...)
202
202
obj
203
203
end
204
204
function GdkPixbuf(_stream::GInputStream, _width::Integer, _height::Integer, _preserve_aspect_ratio::Bool, _cancellable::Maybe(GCancellable); kwargs...)
205
205
obj = G_.Pixbuf_new_from_stream_at_scale(_stream, _width, _height, _preserve_aspect_ratio, _cancellable)
206
- GLib.setproperties!(obj; kwargs...)
206
+ obj !== nothing && GLib.setproperties!(obj; kwargs...)
207
207
obj
208
208
end
209
209
function GdkPixbuf(_async_result::GAsyncResult; kwargs...)
210
210
obj = G_.Pixbuf_new_from_stream_finish(_async_result)
211
- GLib.setproperties!(obj; kwargs...)
211
+ obj !== nothing && GLib.setproperties!(obj; kwargs...)
212
212
obj
213
213
end
214
214
function GdkPixbuf(_data; kwargs...)
215
215
obj = G_.Pixbuf_new_from_xpm_data(_data)
216
- GLib.setproperties!(obj; kwargs...)
216
+ obj !== nothing && GLib.setproperties!(obj; kwargs...)
217
217
obj
218
218
end
219
219
function GdkPixbufAnimation(_filename::Union{AbstractString, Symbol})
@@ -236,7 +236,7 @@ begin
236
236
end
237
237
function GdkPixbufSimpleAnim(_width::Integer, _height::Integer, _rate::Real; kwargs...)
238
238
obj = G_.PixbufSimpleAnim_new(_width, _height, _rate)
239
- GLib.setproperties!(obj; kwargs...)
239
+ obj !== nothing && GLib.setproperties!(obj; kwargs...)
240
240
obj
241
241
end
242
242
@doc "See the [GTK docs](https://docs.gtk.org/gdk-pixbuf/class.Pixbuf.html)." GdkPixbuf
0 commit comments