From ac17def5f6fd757dcd36519393aa627496ea9437 Mon Sep 17 00:00:00 2001 From: Jared Wahlstrand Date: Sun, 26 May 2024 18:50:34 -0400 Subject: [PATCH] explore copying texture from clipboard and support GdkTextureDownloader --- GI/src/giexport.jl | 28 ++++---- examples/show_image.jl | 32 +++++++-- gen/gen_gdk4.jl | 6 +- gen/gen_gsk.jl | 2 +- src/Gdk4.jl | 34 +++++++++- src/gen/gdk4_methods | 142 +++++++++++++++++++++++++++++++++++++-- src/gen/gdk4_structs | 66 ++++++++++++------ src/gen/gio_structs | 30 ++++----- src/gen/glib_structs | 50 +++++++------- src/gen/graphene_structs | 24 +++---- src/gen/gsk4_methods | 48 +++++++++++++ src/gen/gsk4_structs | 30 +++++++-- src/gen/gtk4_structs | 90 ++++++++++++------------- src/gen/pango_structs | 36 +++++----- 14 files changed, 449 insertions(+), 169 deletions(-) diff --git a/GI/src/giexport.jl b/GI/src/giexport.jl index 794b1949..6aafd2f5 100644 --- a/GI/src/giexport.jl +++ b/GI/src/giexport.jl @@ -89,10 +89,12 @@ function struct_exprs!(exprs,exports,ns,structs=nothing;print_summary=true,exclu fields=get_fields(ssi) if only_opaque && length(fields)>0 && !in(name,import_as_opaque) imported-=1 + push!(struct_skiplist,name) continue end if occursin("Private",String(name)) imported-=1 + push!(struct_skiplist,name) continue end if is_gtype_struct(ssi) # these are "class structures" and according to the documentation we probably don't need them in bindings @@ -120,19 +122,24 @@ function struct_exprs!(exprs,exports,ns,structs=nothing;print_summary=true,exclu length(fields)>0 && push!(exports.args,get_struct_name(ssi,false)) end - for ss in structs + if print_summary + printstyled("Generated ",imported," structs out of ",length(structs),"\n";color=:green) + end + + struct_skiplist +end + +function struct_constructor_exprs!(exprs,ns;constructor_skiplist=[], struct_skiplist=[], exclude_deprecated=true,first_list=[]) + s=get_non_skipped(ns,GIStructInfo,struct_skiplist,exclude_deprecated) + structs = get_name.(s) + for ss in vcat(first_list, structs) + println("struct constructor: ",ss) ssi=gi_find_by_name(ns,ss) constructors = get_constructors(ssi;skiplist=constructor_skiplist, struct_skiplist=struct_skiplist, exclude_deprecated=exclude_deprecated) if !isempty(constructors) append!(exprs,constructors) end end - - if print_summary - printstyled("Generated ",imported," structs out of ",length(structs),"\n";color=:green) - end - - struct_skiplist end function all_struct_exprs!(exprs,exports,ns;print_summary=true,excludelist=[],constructor_skiplist=[],import_as_opaque=Symbol[],output_cache_init=true,only_opaque=false,exclude_deprecated=true) @@ -171,13 +178,7 @@ function all_struct_exprs!(exprs,exports,ns;print_summary=true,excludelist=[],co end push!(exprs,unblock(gboxed_types_init)) end - - for ssi in ss - constructors = get_constructors(ssi;skiplist=constructor_skiplist, struct_skiplist=struct_skiplist, exclude_deprecated=exclude_deprecated) - isempty(constructors) || append!(exprs,constructors) - end - if print_summary printstyled("Generated ",imported," structs out of ",length(ss),"\n";color=:green) end @@ -219,6 +220,7 @@ function export_struct_exprs!(ns,path,prefix, struct_skiplist, import_as_opaque; end all_interfaces!(exprs,exports,ns; skiplist = interface_skiplist, exclude_deprecated = exclude_deprecated) c = all_objects!(exprs,exports,ns;handled=[:Object],skiplist=object_skiplist,output_cache_init = output_object_cache_init, output_cache_define = output_object_cache_define, constructor_skiplist = object_constructor_skiplist,exclude_deprecated=exclude_deprecated) + struct_constructor_exprs!(exprs,ns;constructor_skiplist=constructor_skiplist,exclude_deprecated=exclude_deprecated,struct_skiplist=struct_skiplist,first_list=first_list) if doc_xml !== nothing append_object_docs!(exprs, doc_prefix, doc_xml, c, ns; skiplist = doc_skiplist) end diff --git a/examples/show_image.jl b/examples/show_image.jl index c62d8ef1..b65dbb25 100644 --- a/examples/show_image.jl +++ b/examples/show_image.jl @@ -4,18 +4,42 @@ win=GtkWindow("Image") box = GtkBox(:v) img = testimage("mandrill") -t = GdkMemoryTexture(img) -p = GdkPaintable(t) +t = Ref(GdkMemoryTexture(img)) +pic = GtkPicture(GdkPaintable(t[])) button = GtkButton("Copy image to clipboard") signal_connect(button, "clicked") do _ - b = Gtk4.G_.save_to_png_bytes(t) + b = Gtk4.G_.save_to_png_bytes(t[]) cp = GdkContentProvider("image/png", b) c = Gtk4.clipboard(GdkDisplay()) Gtk4.content(c, cp) end -push!(box, GtkPicture(p)) +button2 = GtkButton("Copy image from clipboard") + +function cb(clipboard, resobj) + try + t[] = Gtk4.G_.read_texture_finish(clipboard, Gtk4.GLib.GAsyncResult(resobj)) + Gtk4.paintable(pic, GdkPaintable(t[])) + catch e + if e isa Gtk4.GLib.GErrorException + info_dialog(e.message, win) do + end + else + println(e) + end + end + nothing +end + +signal_connect(button2, "clicked") do _ + c = Gtk4.clipboard(GdkDisplay()) + cf = Gtk4.formats(c) + Gtk4.G_.read_texture_async(c, nothing, cb) +end + +push!(box, pic) push!(box, button) +push!(box, button2) win[] = box diff --git a/gen/gen_gdk4.jl b/gen/gen_gdk4.jl index a109a305..cc8a9401 100644 --- a/gen/gen_gdk4.jl +++ b/gen/gen_gdk4.jl @@ -13,15 +13,13 @@ toplevel, exprs, exports = GI.output_exprs() # These are marked as "disguised" and what this means is not documented AFAICT. disguised = Symbol[] -struct_skiplist=vcat(disguised, [:ToplevelSize,:TextureDownloader]) +struct_skiplist=vcat(disguised, [:ToplevelSize]) object_skiplist=Symbol[] GI.export_struct_exprs!(ns,path, "gdk4", struct_skiplist, [:TimeCoord]; object_constructor_skiplist=[:new_from_resource],doc_xml = d) -push!(struct_skiplist,:ContentFormats) - -object_method_skiplist=[:begin,:put_event] +object_method_skiplist=[:begin,:put_event,:download] interface_method_skiplist=[:inhibit_system_shortcuts,:show_window_menu] GI.export_methods!(ns,path,"gdk4"; interface_method_skiplist = interface_method_skiplist, object_method_skiplist = object_method_skiplist, object_skiplist = object_skiplist, struct_skiplist = struct_skiplist) diff --git a/gen/gen_gsk.jl b/gen/gen_gsk.jl index 18e752b5..a9014366 100644 --- a/gen/gen_gsk.jl +++ b/gen/gen_gsk.jl @@ -9,7 +9,7 @@ GI.export_consts!(ns, path, "gsk4"; doc_xml = d, export_constants = false) # These are marked as "disguised" and what this means is not documentated AFAICT. disguised = Symbol[] -struct_skiplist=vcat(disguised, Symbol[:ShaderArgsBuilder]) +struct_skiplist=disguised GI.export_struct_exprs!(ns,path, "gsk4", struct_skiplist, [:RoundedRect]; doc_xml = d, output_boxed_cache_init = false, output_boxed_types_def = false, output_object_cache_define = false, output_object_cache_init = false, output_callbacks = false) GI.export_methods!(ns,path,"gsk4"; struct_skiplist = struct_skiplist) diff --git a/src/Gdk4.jl b/src/Gdk4.jl index 2a5a4d7a..7dea06c4 100644 --- a/src/Gdk4.jl +++ b/src/Gdk4.jl @@ -77,7 +77,16 @@ const color_formats = Dict(ColorTypes.RGB{N0f8}=>Gtk4.MemoryFormat_R8G8B8, ColorTypes.Gray{N0f16}=>Gtk4.MemoryFormat_G16, ColorTypes.GrayA{N0f8}=>Gtk4.MemoryFormat_G8A8, ColorTypes.GrayA{N0f16}=>Gtk4.MemoryFormat_G16A16, - ) + ) + +const color_formats_premultiplied = Dict(ColorTypes.RGBA{N0f8}=>Gtk4.MemoryFormat_R8G8B8A8_PREMULTIPLIED, + ColorTypes.ARGB{N0f8}=>Gtk4.MemoryFormat_A8R8G8B8_PREMULTIPLIED, + ColorTypes.BGRA{N0f8}=>Gtk4.MemoryFormat_B8G8R8A8_PREMULTIPLIED, + ColorTypes.RGBA{N0f16}=>Gtk4.MemoryFormat_R16G16B16A16_PREMULTIPLIED, + # Available since GTK 4.12 + ColorTypes.GrayA{N0f8}=>Gtk4.MemoryFormat_G8A8_PREMULTIPLIED, + ColorTypes.GrayA{N0f16}=>Gtk4.MemoryFormat_G16A16_PREMULTIPLIED, +) imgformatsupported(img) = eltype(img) in keys(color_formats) @@ -100,6 +109,29 @@ function GdkMemoryTexture(img::AbstractArray, tp = true) GdkMemoryTexture(size(img)[1], size(img)[2], f, b, sizeof(eltype(img))*size(img)[1]) end +function toarray(::Type{T}, t::GdkTexture, td::GdkTextureDownloader) where T + ua = Vector{UInt8}(undef,sizeof(T)*size(t)[1]*size(t)[2]) + G_.download_into(td,ua,sizeof(T)*size(t)[1]) + arr = collect(reshape(reinterpret(T, ua),reverse(size(t)))) + arr' +end + +function toarray(t::GdkTexture) + td = GdkTextureDownloader(t) + f = G_.get_format(td) + for (k,v) in color_formats + if v == f + return toarray(k,t,td) + end + end + for (k,v) in color_formats_premultiplied + if v == f + return toarray(k,t,td) + end + end + error("no suitable format found") +end + function glib_ref(x::Ptr{GdkEvent}) ccall((:gdk_event_ref, libgtk4), Nothing, (Ptr{GdkEvent},), x) end diff --git a/src/gen/gdk4_methods b/src/gen/gdk4_methods index 5f44c81c..c29be2f2 100644 --- a/src/gen/gdk4_methods +++ b/src/gen/gdk4_methods @@ -1,5 +1,98 @@ quote $(Expr(:toplevel, quote + function ContentFormats_new(_mime_types) + _mime_types_maybe = nothing_to_null(_mime_types) + _n_mime_types = length(_mime_types) + ret = ccall(("gdk_content_formats_new", libgtk4), Ptr{GdkContentFormats}, (Ptr{Cstring}, UInt32), _mime_types_maybe, _n_mime_types) + ret2 = convert(GdkContentFormats, ret, true) + ret2 + end + function ContentFormats_new_for_gtype(_type::Integer) + ret = ccall(("gdk_content_formats_new_for_gtype", libgtk4), Ptr{GdkContentFormats}, (UInt64,), _type) + ret2 = convert(GdkContentFormats, ret, true) + ret2 + end + function contain_gtype(instance::GdkContentFormats, _type::Integer) + ret = ccall(("gdk_content_formats_contain_gtype", libgtk4), Cint, (Ptr{GdkContentFormats}, UInt64), instance, _type) + ret2 = convert(Bool, ret) + ret2 + end + function contain_mime_type(instance::GdkContentFormats, _mime_type::Union{AbstractString, Symbol}) + ret = ccall(("gdk_content_formats_contain_mime_type", libgtk4), Cint, (Ptr{GdkContentFormats}, Cstring), instance, _mime_type) + ret2 = convert(Bool, ret) + ret2 + end + function get_gtypes(instance::GdkContentFormats) + m_n_gtypes = Ref{UInt64}() + ret = ccall(("gdk_content_formats_get_gtypes", libgtk4), Ptr{UInt64}, (Ptr{GdkContentFormats}, Ptr{UInt64}), instance, m_n_gtypes) + ret2 = collect(unsafe_wrap(Vector{UInt64}, ret, m_n_gtypes[])) + _n_gtypes = m_n_gtypes[] + ret2 + end + function get_mime_types(instance::GdkContentFormats) + m_n_mime_types = Ref{UInt64}() + ret = ccall(("gdk_content_formats_get_mime_types", libgtk4), Ptr{Cstring}, (Ptr{GdkContentFormats}, Ptr{UInt64}), instance, m_n_mime_types) + ret2 = bytestring.(unsafe_wrap(Vector{Cstring}, ret, m_n_mime_types[])) + _n_mime_types = m_n_mime_types[] + ret2 + end + function match(instance::GdkContentFormats, _second::GdkContentFormats) + ret = ccall(("gdk_content_formats_match", libgtk4), Cint, (Ptr{GdkContentFormats}, Ptr{GdkContentFormats}), instance, _second) + ret2 = convert(Bool, ret) + ret2 + end + function match_gtype(instance::GdkContentFormats, _second::GdkContentFormats) + ret = ccall(("gdk_content_formats_match_gtype", libgtk4), UInt64, (Ptr{GdkContentFormats}, Ptr{GdkContentFormats}), instance, _second) + ret + end + function match_mime_type(instance::GdkContentFormats, _second::GdkContentFormats) + ret = ccall(("gdk_content_formats_match_mime_type", libgtk4), Cstring, (Ptr{GdkContentFormats}, Ptr{GdkContentFormats}), instance, _second) + ret2 = string_or_nothing(ret, false) + ret2 + end + function print(instance::GdkContentFormats, _string::Union{GString, Ref{_GString}}) + ret = ccall(("gdk_content_formats_print", libgtk4), Nothing, (Ptr{GdkContentFormats}, Ptr{_GString}), instance, _string) + nothing + end + function ref(instance::GdkContentFormats) + ret = ccall(("gdk_content_formats_ref", libgtk4), Ptr{GdkContentFormats}, (Ptr{GdkContentFormats},), instance) + ret2 = convert(GdkContentFormats, ret, true) + ret2 + end + function to_string(instance::GdkContentFormats) + ret = ccall(("gdk_content_formats_to_string", libgtk4), Cstring, (Ptr{GdkContentFormats},), instance) + ret2 = string_or_nothing(ret, true) + ret2 + end + function union(instance::GdkContentFormats, _second::GdkContentFormats) + ret = ccall(("gdk_content_formats_union", libgtk4), Ptr{GdkContentFormats}, (Ptr{GdkContentFormats}, Ptr{GdkContentFormats}), instance, _second) + ret2 = convert(GdkContentFormats, ret, true) + ret2 + end + function union_deserialize_gtypes(instance::GdkContentFormats) + ret = ccall(("gdk_content_formats_union_deserialize_gtypes", libgtk4), Ptr{GdkContentFormats}, (Ptr{GdkContentFormats},), instance) + ret2 = convert(GdkContentFormats, ret, true) + ret2 + end + function union_deserialize_mime_types(instance::GdkContentFormats) + ret = ccall(("gdk_content_formats_union_deserialize_mime_types", libgtk4), Ptr{GdkContentFormats}, (Ptr{GdkContentFormats},), instance) + ret2 = convert(GdkContentFormats, ret, true) + ret2 + end + function union_serialize_gtypes(instance::GdkContentFormats) + ret = ccall(("gdk_content_formats_union_serialize_gtypes", libgtk4), Ptr{GdkContentFormats}, (Ptr{GdkContentFormats},), instance) + ret2 = convert(GdkContentFormats, ret, true) + ret2 + end + function union_serialize_mime_types(instance::GdkContentFormats) + ret = ccall(("gdk_content_formats_union_serialize_mime_types", libgtk4), Ptr{GdkContentFormats}, (Ptr{GdkContentFormats},), instance) + ret2 = convert(GdkContentFormats, ret, true) + ret2 + end + function unref(instance::GdkContentFormats) + ret = ccall(("gdk_content_formats_unref", libgtk4), Nothing, (Ptr{GdkContentFormats},), instance) + nothing + end function ContentFormatsBuilder_new() ret = ccall(("gdk_content_formats_builder_new", libgtk4), Ptr{GdkContentFormatsBuilder}, ()) ret2 = convert(GdkContentFormatsBuilder, ret, true) @@ -235,6 +328,50 @@ $(Expr(:toplevel, quote _dest = m_dest[] _dest end + function TextureDownloader_new(_texture::GdkTexture) + ret = ccall(("gdk_texture_downloader_new", libgtk4), Ptr{GdkTextureDownloader}, (Ptr{GObject},), _texture) + ret2 = convert(GdkTextureDownloader, ret, true) + ret2 + end + function copy(instance::GdkTextureDownloader) + ret = ccall(("gdk_texture_downloader_copy", libgtk4), Ptr{GdkTextureDownloader}, (Ptr{GdkTextureDownloader},), instance) + ret2 = convert(GdkTextureDownloader, ret, true) + ret2 + end + function download_bytes(instance::GdkTextureDownloader) + m_out_stride = Ref{UInt64}() + ret = ccall(("gdk_texture_downloader_download_bytes", libgtk4), Ptr{GBytes}, (Ptr{GdkTextureDownloader}, Ptr{UInt64}), instance, m_out_stride) + ret2 = convert(GBytes, ret, true) + _out_stride = m_out_stride[] + (ret2, _out_stride) + end + function download_into(instance::GdkTextureDownloader, _data, _stride::Integer) + _data_arr = convert(Vector{UInt8}, _data) + ret = ccall(("gdk_texture_downloader_download_into", libgtk4), Nothing, (Ptr{GdkTextureDownloader}, Ptr{UInt8}, UInt64), instance, _data_arr, _stride) + nothing + end + function free(instance::GdkTextureDownloader) + ret = ccall(("gdk_texture_downloader_free", libgtk4), Nothing, (Ptr{GdkTextureDownloader},), instance) + nothing + end + function get_format(instance::GdkTextureDownloader) + ret = ccall(("gdk_texture_downloader_get_format", libgtk4), UInt32, (Ptr{GdkTextureDownloader},), instance) + ret2 = MemoryFormat(ret) + ret2 + end + function get_texture(instance::GdkTextureDownloader) + ret = ccall(("gdk_texture_downloader_get_texture", libgtk4), Ptr{GObject}, (Ptr{GdkTextureDownloader},), instance) + ret2 = convert(GdkTexture, ret, false) + ret2 + end + function set_format(instance::GdkTextureDownloader, _format) + ret = ccall(("gdk_texture_downloader_set_format", libgtk4), Nothing, (Ptr{GdkTextureDownloader}, UInt32), instance, _format) + nothing + end + function set_texture(instance::GdkTextureDownloader, _texture::GdkTexture) + ret = ccall(("gdk_texture_downloader_set_texture", libgtk4), Nothing, (Ptr{GdkTextureDownloader}, Ptr{GObject}), instance, _texture) + nothing + end function ToplevelLayout_new() ret = ccall(("gdk_toplevel_layout_new", libgtk4), Ptr{GdkToplevelLayout}, ()) ret2 = convert(GdkToplevelLayout, ret, true) @@ -1947,11 +2084,6 @@ $(Expr(:toplevel, quote ret2 = convert(GdkTexture, ret, true) ret2 end - function download(instance::GdkTexture, _data, _stride::Integer) - _data_arr = convert(Vector{UInt8}, _data) - ret = ccall(("gdk_texture_download", libgtk4), Nothing, (Ptr{GObject}, Ptr{UInt8}, UInt64), instance, _data_arr, _stride) - nothing - end function get_format(instance::GdkTexture) ret = ccall(("gdk_texture_get_format", libgtk4), UInt32, (Ptr{GObject},), instance) ret2 = MemoryFormat(ret) diff --git a/src/gen/gdk4_structs b/src/gen/gdk4_structs index 24e5102c..09d106af 100644 --- a/src/gen/gdk4_structs +++ b/src/gen/gdk4_structs @@ -183,6 +183,24 @@ $(Expr(:toplevel, quote convert(Ptr{_GdkRectangle}, box.handle) end end + mutable struct GdkTextureDownloader <: GBoxed + handle::Ptr{GdkTextureDownloader} + begin + (GLib.g_type(::Type{T}) where T <: GdkTextureDownloader) = begin + ccall(("gdk_texture_downloader_get_type", libgtk4), GType, ()) + end + function GdkTextureDownloader(ref::Ptr{T}, own::Bool = false) where T <: GBoxed + x = new(ref) + if own + finalizer(x) do x + GLib.delboxed(x) + end + end + x + end + push!(gboxed_types, GdkTextureDownloader) + end + end begin mutable struct GdkTimeCoord handle::Ptr{GdkTimeCoord} @@ -210,27 +228,6 @@ $(Expr(:toplevel, quote gboxed_cache_init() = begin append!(GLib.gboxed_types, gboxed_types) end - function GdkContentFormats(_mime_types) - G_.ContentFormats_new(_mime_types) - end - function GdkContentFormats(_type::Integer) - G_.ContentFormats_new_for_gtype(_type) - end - function GdkContentFormatsBuilder() - G_.ContentFormatsBuilder_new() - end - function GdkFileList(_files) - G_.FileList_new_from_array(_files) - end - function GdkFileList(_files::GLib.LList{GLib._GSList{Ptr{GObject}}}) - G_.FileList_new_from_list(_files) - end - function GdkPopupLayout(_anchor_rect::Union{GdkRectangle, Ref{_GdkRectangle}}, _rect_anchor, _surface_anchor) - G_.PopupLayout_new(_anchor_rect, _rect_anchor, _surface_anchor) - end - function GdkToplevelLayout() - G_.ToplevelLayout_new() - end @doc "See the [GTK docs](https://docs.gtk.org/gdk4/struct.ContentFormats.html)." GdkContentFormats @doc "See the [GTK docs](https://docs.gtk.org/gdk4/struct.ContentFormatsBuilder.html)." GdkContentFormatsBuilder @doc "See the [GTK docs](https://docs.gtk.org/gdk4/struct.DragSurfaceSize.html)." GdkDragSurfaceSize @@ -241,6 +238,7 @@ $(Expr(:toplevel, quote @doc "See the [GTK docs](https://docs.gtk.org/gdk4/struct.PopupLayout.html)." GdkPopupLayout @doc "See the [GTK docs](https://docs.gtk.org/gdk4/struct.RGBA.html)." GdkRGBA @doc "See the [GTK docs](https://docs.gtk.org/gdk4/struct.Rectangle.html)." GdkRectangle + @doc "See the [GTK docs](https://docs.gtk.org/gdk4/struct.TextureDownloader.html)." GdkTextureDownloader @doc "See the [GTK docs](https://docs.gtk.org/gdk4/struct.TimeCoord.html)." GdkTimeCoord @doc "See the [GTK docs](https://docs.gtk.org/gdk4/struct.ToplevelLayout.html)." GdkToplevelLayout struct GdkDevicePad <: GInterface @@ -1127,6 +1125,30 @@ $(Expr(:toplevel, quote GLib.setproperties!(obj; kwargs...) obj end + function GdkContentFormats(_mime_types) + G_.ContentFormats_new(_mime_types) + end + function GdkContentFormats(_type::Integer) + G_.ContentFormats_new_for_gtype(_type) + end + function GdkContentFormatsBuilder() + G_.ContentFormatsBuilder_new() + end + function GdkFileList(_files) + G_.FileList_new_from_array(_files) + end + function GdkFileList(_files::GLib.LList{GLib._GSList{Ptr{GObject}}}) + G_.FileList_new_from_list(_files) + end + function GdkPopupLayout(_anchor_rect::Union{GdkRectangle, Ref{_GdkRectangle}}, _rect_anchor, _surface_anchor) + G_.PopupLayout_new(_anchor_rect, _rect_anchor, _surface_anchor) + end + function GdkTextureDownloader(_texture::GdkTexture) + G_.TextureDownloader_new(_texture) + end + function GdkToplevelLayout() + G_.ToplevelLayout_new() + end @doc "See the [GTK docs](https://docs.gtk.org/gdk4/class.AppLaunchContext.html)." GdkAppLaunchContext @doc "See the [GTK docs](https://docs.gtk.org/gdk4/class.ButtonEvent.html)." GdkButtonEvent @doc "See the [GTK docs](https://docs.gtk.org/gdk4/class.CairoContext.html)." GdkCairoContext @@ -1277,6 +1299,6 @@ $(Expr(:toplevel, quote function on_images_updated(f, object::GdkVulkanContext, user_data = object, after = false) GLib.signal_connect_generic(f, object, "images-updated", Nothing, (), after, user_data) end - export GdkContentFormats, GdkContentFormatsBuilder, GdkDragSurfaceSize, GdkEventSequence, GdkFileList, GdkFrameTimings, GdkKeymapKey, _GdkKeymapKey, GdkPopupLayout, GdkRGBA, _GdkRGBA, GdkRectangle, _GdkRectangle, GdkTimeCoord, _GdkTimeCoord, GdkToplevelLayout, GdkDevicePad, GdkDragSurface, GdkPaintable, GdkPopup, GdkToplevel, GdkAppLaunchContext, GdkAppLaunchContextLeaf, GdkButtonEvent, GdkButtonEventLeaf, GdkCairoContext, GdkClipboard, GdkClipboardLeaf, GdkContentDeserializer, GdkContentDeserializerLeaf, GdkContentProvider, GdkContentProviderLeaf, GdkContentSerializer, GdkContentSerializerLeaf, GdkCrossingEvent, GdkCrossingEventLeaf, GdkCursor, GdkCursorLeaf, GdkDNDEvent, GdkDNDEventLeaf, GdkDeleteEvent, GdkDeleteEventLeaf, GdkDevice, GdkDeviceTool, GdkDeviceToolLeaf, GdkDisplay, GdkDisplayLeaf, GdkDisplayManager, GdkDisplayManagerLeaf, GdkDrag, GdkDrawContext, GdkDrop, GdkEvent, GdkFocusEvent, GdkFocusEventLeaf, GdkFrameClock, GdkGLContext, GdkGLTexture, GdkGLTextureLeaf, GdkGLTextureBuilder, GdkGLTextureBuilderLeaf, GdkGrabBrokenEvent, GdkGrabBrokenEventLeaf, GdkKeyEvent, GdkKeyEventLeaf, GdkMemoryTexture, GdkMemoryTextureLeaf, GdkMonitor, GdkMonitorLeaf, GdkMotionEvent, GdkMotionEventLeaf, GdkPadEvent, GdkPadEventLeaf, GdkProximityEvent, GdkProximityEventLeaf, GdkScrollEvent, GdkScrollEventLeaf, GdkSeat, GdkSnapshot, GdkSurface, GdkTexture, GdkTouchEvent, GdkTouchEventLeaf, GdkTouchpadEvent, GdkTouchpadEventLeaf, GdkVulkanContext + export GdkContentFormats, GdkContentFormatsBuilder, GdkDragSurfaceSize, GdkEventSequence, GdkFileList, GdkFrameTimings, GdkKeymapKey, _GdkKeymapKey, GdkPopupLayout, GdkRGBA, _GdkRGBA, GdkRectangle, _GdkRectangle, GdkTextureDownloader, GdkTimeCoord, _GdkTimeCoord, GdkToplevelLayout, GdkDevicePad, GdkDragSurface, GdkPaintable, GdkPopup, GdkToplevel, GdkAppLaunchContext, GdkAppLaunchContextLeaf, GdkButtonEvent, GdkButtonEventLeaf, GdkCairoContext, GdkClipboard, GdkClipboardLeaf, GdkContentDeserializer, GdkContentDeserializerLeaf, GdkContentProvider, GdkContentProviderLeaf, GdkContentSerializer, GdkContentSerializerLeaf, GdkCrossingEvent, GdkCrossingEventLeaf, GdkCursor, GdkCursorLeaf, GdkDNDEvent, GdkDNDEventLeaf, GdkDeleteEvent, GdkDeleteEventLeaf, GdkDevice, GdkDeviceTool, GdkDeviceToolLeaf, GdkDisplay, GdkDisplayLeaf, GdkDisplayManager, GdkDisplayManagerLeaf, GdkDrag, GdkDrawContext, GdkDrop, GdkEvent, GdkFocusEvent, GdkFocusEventLeaf, GdkFrameClock, GdkGLContext, GdkGLTexture, GdkGLTextureLeaf, GdkGLTextureBuilder, GdkGLTextureBuilderLeaf, GdkGrabBrokenEvent, GdkGrabBrokenEventLeaf, GdkKeyEvent, GdkKeyEventLeaf, GdkMemoryTexture, GdkMemoryTextureLeaf, GdkMonitor, GdkMonitorLeaf, GdkMotionEvent, GdkMotionEventLeaf, GdkPadEvent, GdkPadEventLeaf, GdkProximityEvent, GdkProximityEventLeaf, GdkScrollEvent, GdkScrollEventLeaf, GdkSeat, GdkSnapshot, GdkSurface, GdkTexture, GdkTouchEvent, GdkTouchEventLeaf, GdkTouchpadEvent, GdkTouchpadEventLeaf, GdkVulkanContext end)) end diff --git a/src/gen/gio_structs b/src/gen/gio_structs index b633ee13..61c5b48f 100644 --- a/src/gen/gio_structs +++ b/src/gen/gio_structs @@ -303,21 +303,6 @@ $(Expr(:toplevel, quote convert(Ptr{_G_FreedesktopDBusSkeleton}, box.handle) end end - function GFileAttributeInfoList() - G_.FileAttributeInfoList_new() - end - function GFileAttributeMatcher(_attributes::Union{AbstractString, Symbol}) - G_.FileAttributeMatcher_new(_attributes) - end - function GResource(_data::GBytes) - G_.Resource_new_from_data(_data) - end - function GSettingsSchemaSource(_directory::Union{AbstractString, Symbol}, _parent::Maybe(GSettingsSchemaSource), _trusted::Bool) - G_.SettingsSchemaSource_new_from_directory(_directory, _parent, _trusted) - end - function GSrvTarget(_hostname::Union{AbstractString, Symbol}, _port::Integer, _priority::Integer, _weight::Integer) - G_.SrvTarget_new(_hostname, _port, _priority, _weight) - end @doc "See the [GTK docs](https://docs.gtk.org/gio/struct.DBusErrorEntry.html)." GDBusErrorEntry @doc "See the [GTK docs](https://docs.gtk.org/gio/struct.FileAttributeInfo.html)." GFileAttributeInfo @doc "See the [GTK docs](https://docs.gtk.org/gio/struct.FileAttributeInfoList.html)." GFileAttributeInfoList @@ -3502,6 +3487,21 @@ $(Expr(:toplevel, quote GLib.setproperties!(obj; kwargs...) obj end + function GFileAttributeInfoList() + G_.FileAttributeInfoList_new() + end + function GFileAttributeMatcher(_attributes::Union{AbstractString, Symbol}) + G_.FileAttributeMatcher_new(_attributes) + end + function GResource(_data::GBytes) + G_.Resource_new_from_data(_data) + end + function GSettingsSchemaSource(_directory::Union{AbstractString, Symbol}, _parent::Maybe(GSettingsSchemaSource), _trusted::Bool) + G_.SettingsSchemaSource_new_from_directory(_directory, _parent, _trusted) + end + function GSrvTarget(_hostname::Union{AbstractString, Symbol}, _port::Integer, _priority::Integer, _weight::Integer) + G_.SrvTarget_new(_hostname, _port, _priority, _weight) + end @doc "See the [GTK docs](https://docs.gtk.org/gio/class.AppInfoMonitor.html)." GAppInfoMonitor @doc "See the [GTK docs](https://docs.gtk.org/gio/class.AppLaunchContext.html)." GAppLaunchContext @doc "See the [GTK docs](https://docs.gtk.org/gio/class.Application.html)." GApplication diff --git a/src/gen/glib_structs b/src/gen/glib_structs index d7532ab3..3c93f603 100644 --- a/src/gen/glib_structs +++ b/src/gen/glib_structs @@ -487,6 +487,31 @@ $(Expr(:toplevel, quote gboxed_cache_init() = begin append!(GLib.gboxed_types, gboxed_types) end + @doc "See the [GTK docs](https://docs.gtk.org/glib/struct.BookmarkFile.html)." GBookmarkFile + @doc "See the [GTK docs](https://docs.gtk.org/glib/struct.Bytes.html)." GBytes + @doc "See the [GTK docs](https://docs.gtk.org/glib/struct.Checksum.html)." GChecksum + @doc "See the [GTK docs](https://docs.gtk.org/glib/struct.Date.html)." GDate + @doc "See the [GTK docs](https://docs.gtk.org/glib/struct.DateTime.html)." GDateTime + @doc "See the [GTK docs](https://docs.gtk.org/glib/struct.DebugKey.html)." GDebugKey + @doc "See the [GTK docs](https://docs.gtk.org/glib/struct.KeyFile.html)." GKeyFile + @doc "See the [GTK docs](https://docs.gtk.org/glib/struct.LogField.html)." GLogField + @doc "See the [GTK docs](https://docs.gtk.org/glib/struct.MainContext.html)." GMainContext + @doc "See the [GTK docs](https://docs.gtk.org/glib/struct.MainLoop.html)." GMainLoop + @doc "See the [GTK docs](https://docs.gtk.org/glib/struct.MappedFile.html)." GMappedFile + @doc "See the [GTK docs](https://docs.gtk.org/glib/struct.MarkupParseContext.html)." GMarkupParseContext + @doc "See the [GTK docs](https://docs.gtk.org/glib/struct.MatchInfo.html)." GMatchInfo + @doc "See the [GTK docs](https://docs.gtk.org/glib/struct.OptionEntry.html)." GOptionEntry + @doc "See the [GTK docs](https://docs.gtk.org/glib/struct.PatternSpec.html)." GPatternSpec + @doc "See the [GTK docs](https://docs.gtk.org/glib/struct.Regex.html)." GRegex + @doc "See the [GTK docs](https://docs.gtk.org/glib/struct.ScannerConfig.html)." GScannerConfig + @doc "See the [GTK docs](https://docs.gtk.org/glib/struct.Source.html)." GSource + @doc "See the [GTK docs](https://docs.gtk.org/glib/struct.SourceCallbackFuncs.html)." GSourceCallbackFuncs + @doc "See the [GTK docs](https://docs.gtk.org/glib/struct.String.html)." GString + @doc "See the [GTK docs](https://docs.gtk.org/glib/struct.TimeZone.html)." GTimeZone + @doc "See the [GTK docs](https://docs.gtk.org/glib/struct.Uri.html)." GUri + @doc "See the [GTK docs](https://docs.gtk.org/glib/struct.VariantBuilder.html)." GVariantBuilder + @doc "See the [GTK docs](https://docs.gtk.org/glib/struct.VariantDict.html)." GVariantDict + @doc "See the [GTK docs](https://docs.gtk.org/glib/struct.VariantType.html)." GVariantType function GDate(_day::Integer, _month, _year::Integer) G_.Date_new_dmy(_day, _month, _year) end @@ -538,31 +563,6 @@ $(Expr(:toplevel, quote function GVariantType(_items) G_.VariantType_new_tuple(_items) end - @doc "See the [GTK docs](https://docs.gtk.org/glib/struct.BookmarkFile.html)." GBookmarkFile - @doc "See the [GTK docs](https://docs.gtk.org/glib/struct.Bytes.html)." GBytes - @doc "See the [GTK docs](https://docs.gtk.org/glib/struct.Checksum.html)." GChecksum - @doc "See the [GTK docs](https://docs.gtk.org/glib/struct.Date.html)." GDate - @doc "See the [GTK docs](https://docs.gtk.org/glib/struct.DateTime.html)." GDateTime - @doc "See the [GTK docs](https://docs.gtk.org/glib/struct.DebugKey.html)." GDebugKey - @doc "See the [GTK docs](https://docs.gtk.org/glib/struct.KeyFile.html)." GKeyFile - @doc "See the [GTK docs](https://docs.gtk.org/glib/struct.LogField.html)." GLogField - @doc "See the [GTK docs](https://docs.gtk.org/glib/struct.MainContext.html)." GMainContext - @doc "See the [GTK docs](https://docs.gtk.org/glib/struct.MainLoop.html)." GMainLoop - @doc "See the [GTK docs](https://docs.gtk.org/glib/struct.MappedFile.html)." GMappedFile - @doc "See the [GTK docs](https://docs.gtk.org/glib/struct.MarkupParseContext.html)." GMarkupParseContext - @doc "See the [GTK docs](https://docs.gtk.org/glib/struct.MatchInfo.html)." GMatchInfo - @doc "See the [GTK docs](https://docs.gtk.org/glib/struct.OptionEntry.html)." GOptionEntry - @doc "See the [GTK docs](https://docs.gtk.org/glib/struct.PatternSpec.html)." GPatternSpec - @doc "See the [GTK docs](https://docs.gtk.org/glib/struct.Regex.html)." GRegex - @doc "See the [GTK docs](https://docs.gtk.org/glib/struct.ScannerConfig.html)." GScannerConfig - @doc "See the [GTK docs](https://docs.gtk.org/glib/struct.Source.html)." GSource - @doc "See the [GTK docs](https://docs.gtk.org/glib/struct.SourceCallbackFuncs.html)." GSourceCallbackFuncs - @doc "See the [GTK docs](https://docs.gtk.org/glib/struct.String.html)." GString - @doc "See the [GTK docs](https://docs.gtk.org/glib/struct.TimeZone.html)." GTimeZone - @doc "See the [GTK docs](https://docs.gtk.org/glib/struct.Uri.html)." GUri - @doc "See the [GTK docs](https://docs.gtk.org/glib/struct.VariantBuilder.html)." GVariantBuilder - @doc "See the [GTK docs](https://docs.gtk.org/glib/struct.VariantDict.html)." GVariantDict - @doc "See the [GTK docs](https://docs.gtk.org/glib/struct.VariantType.html)." GVariantType function GChildWatchFunc(pid, wait_status, user_data) f = user_data ret = f(pid, wait_status) diff --git a/src/gen/graphene_structs b/src/gen/graphene_structs index 3ecf207c..d9c70786 100644 --- a/src/gen/graphene_structs +++ b/src/gen/graphene_structs @@ -82,12 +82,6 @@ $(Expr(:toplevel, quote convert(Ptr{_GrapheneSize}, box.handle) end end - function GrapheneVec3() - G_.Vec3_alloc() - end - function GrapheneSize() - G_.Size_alloc() - end begin struct _GrapheneBox min::_GrapheneVec3 @@ -485,6 +479,18 @@ $(Expr(:toplevel, quote gboxed_cache_init() = begin append!(GLib.gboxed_types, gboxed_types) end + const gtype_wrapper_cache = Dict{Symbol, Type}() + begin + gtype_wrapper_cache_init() = begin + merge!(GLib.gtype_wrappers, gtype_wrapper_cache) + end + end + function GrapheneVec3() + G_.Vec3_alloc() + end + function GrapheneSize() + G_.Size_alloc() + end function GrapheneBox() G_.Box_alloc() end @@ -527,12 +533,6 @@ $(Expr(:toplevel, quote function GrapheneVec4() G_.Vec4_alloc() end - const gtype_wrapper_cache = Dict{Symbol, Type}() - begin - gtype_wrapper_cache_init() = begin - merge!(GLib.gtype_wrappers, gtype_wrapper_cache) - end - end export GrapheneSimd4F, _GrapheneSimd4F, GrapheneVec3, _GrapheneVec3, GrapheneSimd4X4F, _GrapheneSimd4X4F, GrapheneSize, _GrapheneSize, GrapheneBox, _GrapheneBox, GrapheneEuler, _GrapheneEuler, GrapheneFrustum, _GrapheneFrustum, GrapheneMatrix, _GrapheneMatrix, GraphenePlane, _GraphenePlane, GraphenePoint, _GraphenePoint, GraphenePoint3D, _GraphenePoint3D, GrapheneQuad, _GrapheneQuad, GrapheneQuaternion, _GrapheneQuaternion, GrapheneRay, _GrapheneRay, GrapheneRect, _GrapheneRect, GrapheneSphere, _GrapheneSphere, GrapheneTriangle, _GrapheneTriangle, GrapheneVec2, _GrapheneVec2, GrapheneVec4, _GrapheneVec4 end)) end diff --git a/src/gen/gsk4_methods b/src/gen/gsk4_methods index a75ab272..5f27e7d5 100644 --- a/src/gen/gsk4_methods +++ b/src/gen/gsk4_methods @@ -50,6 +50,54 @@ $(Expr(:toplevel, quote ret2 = convert(Union{GskRoundedRect, Ref{_GskRoundedRect}}, ret) ret2 end + function ShaderArgsBuilder_new(_shader::GskGLShader, _initial_values::Maybe(GBytes)) + _initial_values_maybe = nothing_to_null(_initial_values) + ret = ccall(("gsk_shader_args_builder_new", libgtk4), Ptr{GskShaderArgsBuilder}, (Ptr{GObject}, Ptr{GBytes}), _shader, _initial_values_maybe) + ret2 = convert(GskShaderArgsBuilder, ret, true) + ret2 + end + function ref(instance::GskShaderArgsBuilder) + ret = ccall(("gsk_shader_args_builder_ref", libgtk4), Ptr{GskShaderArgsBuilder}, (Ptr{GskShaderArgsBuilder},), instance) + ret2 = convert(GskShaderArgsBuilder, ret, true) + ret2 + end + function set_bool(instance::GskShaderArgsBuilder, _idx::Integer, _value::Bool) + ret = ccall(("gsk_shader_args_builder_set_bool", libgtk4), Nothing, (Ptr{GskShaderArgsBuilder}, Int32, Cint), instance, _idx, _value) + nothing + end + function set_float(instance::GskShaderArgsBuilder, _idx::Integer, _value::Real) + ret = ccall(("gsk_shader_args_builder_set_float", libgtk4), Nothing, (Ptr{GskShaderArgsBuilder}, Int32, Float32), instance, _idx, _value) + nothing + end + function set_int(instance::GskShaderArgsBuilder, _idx::Integer, _value::Integer) + ret = ccall(("gsk_shader_args_builder_set_int", libgtk4), Nothing, (Ptr{GskShaderArgsBuilder}, Int32, Int32), instance, _idx, _value) + nothing + end + function set_uint(instance::GskShaderArgsBuilder, _idx::Integer, _value::Integer) + ret = ccall(("gsk_shader_args_builder_set_uint", libgtk4), Nothing, (Ptr{GskShaderArgsBuilder}, Int32, UInt32), instance, _idx, _value) + nothing + end + function set_vec2(instance::GskShaderArgsBuilder, _idx::Integer, _value::Union{GrapheneVec2, Ref{_GrapheneVec2}}) + ret = ccall(("gsk_shader_args_builder_set_vec2", libgtk4), Nothing, (Ptr{GskShaderArgsBuilder}, Int32, Ptr{_GrapheneVec2}), instance, _idx, _value) + nothing + end + function set_vec3(instance::GskShaderArgsBuilder, _idx::Integer, _value::Union{GrapheneVec3, Ref{_GrapheneVec3}}) + ret = ccall(("gsk_shader_args_builder_set_vec3", libgtk4), Nothing, (Ptr{GskShaderArgsBuilder}, Int32, Ptr{_GrapheneVec3}), instance, _idx, _value) + nothing + end + function set_vec4(instance::GskShaderArgsBuilder, _idx::Integer, _value::Union{GrapheneVec4, Ref{_GrapheneVec4}}) + ret = ccall(("gsk_shader_args_builder_set_vec4", libgtk4), Nothing, (Ptr{GskShaderArgsBuilder}, Int32, Ptr{_GrapheneVec4}), instance, _idx, _value) + nothing + end + function to_args(instance::GskShaderArgsBuilder) + ret = ccall(("gsk_shader_args_builder_to_args", libgtk4), Ptr{GBytes}, (Ptr{GskShaderArgsBuilder},), instance) + ret2 = convert(GBytes, ret, true) + ret2 + end + function unref(instance::GskShaderArgsBuilder) + ret = ccall(("gsk_shader_args_builder_unref", libgtk4), Nothing, (Ptr{GskShaderArgsBuilder},), instance) + nothing + end function Transform_new() ret = ccall(("gsk_transform_new", libgtk4), Ptr{GskTransform}, ()) ret2 = convert(GskTransform, ret, true) diff --git a/src/gen/gsk4_structs b/src/gen/gsk4_structs index fa961790..a0a20177 100644 --- a/src/gen/gsk4_structs +++ b/src/gen/gsk4_structs @@ -33,6 +33,24 @@ $(Expr(:toplevel, quote end const _GskRoundedRect = GskRoundedRect end + mutable struct GskShaderArgsBuilder <: GBoxed + handle::Ptr{GskShaderArgsBuilder} + begin + (GLib.g_type(::Type{T}) where T <: GskShaderArgsBuilder) = begin + ccall(("gsk_shader_args_builder_get_type", libgtk4), GType, ()) + end + function GskShaderArgsBuilder(ref::Ptr{T}, own::Bool = false) where T <: GBoxed + x = new(ref) + if own + finalizer(x) do x + GLib.delboxed(x) + end + end + x + end + push!(gboxed_types, GskShaderArgsBuilder) + end + end begin struct _GskShadow color::_GdkRGBA @@ -65,12 +83,10 @@ $(Expr(:toplevel, quote push!(gboxed_types, GskTransform) end end - function GskTransform() - G_.Transform_new() - end @doc "See the [GTK docs](https://docs.gtk.org/gsk4/struct.ColorStop.html)." GskColorStop @doc "See the [GTK docs](https://docs.gtk.org/gsk4/struct.ParseLocation.html)." GskParseLocation @doc "See the [GTK docs](https://docs.gtk.org/gsk4/struct.RoundedRect.html)." GskRoundedRect + @doc "See the [GTK docs](https://docs.gtk.org/gsk4/struct.ShaderArgsBuilder.html)." GskShaderArgsBuilder @doc "See the [GTK docs](https://docs.gtk.org/gsk4/struct.Shadow.html)." GskShadow @doc "See the [GTK docs](https://docs.gtk.org/gsk4/struct.Transform.html)." GskTransform begin @@ -540,6 +556,12 @@ $(Expr(:toplevel, quote function GskTransformNode(_child::GskRenderNode, _transform::GskTransform) G_.TransformNode_new(_child, _transform) end + function GskShaderArgsBuilder(_shader::GskGLShader, _initial_values::Maybe(GBytes)) + G_.ShaderArgsBuilder_new(_shader, _initial_values) + end + function GskTransform() + G_.Transform_new() + end @doc "See the [GTK docs](https://docs.gtk.org/gsk4/class.BlendNode.html)." GskBlendNode @doc "See the [GTK docs](https://docs.gtk.org/gsk4/class.BlurNode.html)." GskBlurNode @doc "See the [GTK docs](https://docs.gtk.org/gsk4/class.BorderNode.html)." GskBorderNode @@ -571,6 +593,6 @@ $(Expr(:toplevel, quote @doc "See the [GTK docs](https://docs.gtk.org/gsk4/class.TextureNode.html)." GskTextureNode @doc "See the [GTK docs](https://docs.gtk.org/gsk4/class.TextureScaleNode.html)." GskTextureScaleNode @doc "See the [GTK docs](https://docs.gtk.org/gsk4/class.TransformNode.html)." GskTransformNode - export GskColorStop, _GskColorStop, GskParseLocation, _GskParseLocation, GskRoundedRect, _GskRoundedRect, GskShadow, _GskShadow, GskTransform, GskBlendNode, GskBlendNodeLeaf, GskBlurNode, GskBlurNodeLeaf, GskBorderNode, GskBorderNodeLeaf, GskBroadwayRenderer, GskBroadwayRendererLeaf, GskCairoNode, GskCairoNodeLeaf, GskCairoRenderer, GskCairoRendererLeaf, GskClipNode, GskClipNodeLeaf, GskColorMatrixNode, GskColorMatrixNodeLeaf, GskColorNode, GskColorNodeLeaf, GskConicGradientNode, GskConicGradientNodeLeaf, GskContainerNode, GskContainerNodeLeaf, GskCrossFadeNode, GskCrossFadeNodeLeaf, GskDebugNode, GskDebugNodeLeaf, GskGLRenderer, GskGLRendererLeaf, GskGLShader, GskGLShaderLeaf, GskGLShaderNode, GskGLShaderNodeLeaf, GskInsetShadowNode, GskInsetShadowNodeLeaf, GskLinearGradientNode, GskLinearGradientNodeLeaf, GskMaskNode, GskMaskNodeLeaf, GskNglRenderer, GskNglRendererLeaf, GskOpacityNode, GskOpacityNodeLeaf, GskOutsetShadowNode, GskOutsetShadowNodeLeaf, GskRadialGradientNode, GskRadialGradientNodeLeaf, GskRenderNode, GskRenderer, GskRepeatNode, GskRepeatNodeLeaf, GskRepeatingLinearGradientNode, GskRepeatingLinearGradientNodeLeaf, GskRepeatingRadialGradientNode, GskRepeatingRadialGradientNodeLeaf, GskRoundedClipNode, GskRoundedClipNodeLeaf, GskShadowNode, GskShadowNodeLeaf, GskTextNode, GskTextNodeLeaf, GskTextureNode, GskTextureNodeLeaf, GskTextureScaleNode, GskTextureScaleNodeLeaf, GskTransformNode, GskTransformNodeLeaf + export GskColorStop, _GskColorStop, GskParseLocation, _GskParseLocation, GskRoundedRect, _GskRoundedRect, GskShaderArgsBuilder, GskShadow, _GskShadow, GskTransform, GskBlendNode, GskBlendNodeLeaf, GskBlurNode, GskBlurNodeLeaf, GskBorderNode, GskBorderNodeLeaf, GskBroadwayRenderer, GskBroadwayRendererLeaf, GskCairoNode, GskCairoNodeLeaf, GskCairoRenderer, GskCairoRendererLeaf, GskClipNode, GskClipNodeLeaf, GskColorMatrixNode, GskColorMatrixNodeLeaf, GskColorNode, GskColorNodeLeaf, GskConicGradientNode, GskConicGradientNodeLeaf, GskContainerNode, GskContainerNodeLeaf, GskCrossFadeNode, GskCrossFadeNodeLeaf, GskDebugNode, GskDebugNodeLeaf, GskGLRenderer, GskGLRendererLeaf, GskGLShader, GskGLShaderLeaf, GskGLShaderNode, GskGLShaderNodeLeaf, GskInsetShadowNode, GskInsetShadowNodeLeaf, GskLinearGradientNode, GskLinearGradientNodeLeaf, GskMaskNode, GskMaskNodeLeaf, GskNglRenderer, GskNglRendererLeaf, GskOpacityNode, GskOpacityNodeLeaf, GskOutsetShadowNode, GskOutsetShadowNodeLeaf, GskRadialGradientNode, GskRadialGradientNodeLeaf, GskRenderNode, GskRenderer, GskRepeatNode, GskRepeatNodeLeaf, GskRepeatingLinearGradientNode, GskRepeatingLinearGradientNodeLeaf, GskRepeatingRadialGradientNode, GskRepeatingRadialGradientNodeLeaf, GskRoundedClipNode, GskRoundedClipNodeLeaf, GskShadowNode, GskShadowNodeLeaf, GskTextNode, GskTextNodeLeaf, GskTextureNode, GskTextureNodeLeaf, GskTextureScaleNode, GskTextureScaleNodeLeaf, GskTransformNode, GskTransformNodeLeaf end)) end diff --git a/src/gen/gtk4_structs b/src/gen/gtk4_structs index bd7dc5f0..d65afa37 100644 --- a/src/gen/gtk4_structs +++ b/src/gen/gtk4_structs @@ -346,51 +346,6 @@ $(Expr(:toplevel, quote push!(gboxed_types, GtkTreePath) end end - function GtkBitset() - G_.Bitset_new_empty() - end - function GtkBitset(_start::Integer, _n_items::Integer) - G_.Bitset_new_range(_start, _n_items) - end - function GtkBorder() - G_.Border_new() - end - function GtkCssSection(_file::Maybe(GFile), _start::Union{GtkCssLocation, Ref{_GtkCssLocation}}, _end::Union{GtkCssLocation, Ref{_GtkCssLocation}}) - G_.CssSection_new(_file, _start, _end) - end - function GtkPaperSize(_name::Maybe(Union{AbstractString, Symbol})) - G_.PaperSize_new(_name) - end - function GtkPaperSize(_name::Union{AbstractString, Symbol}, _display_name::Union{AbstractString, Symbol}, _width::Real, _height::Real, _unit) - G_.PaperSize_new_custom(_name, _display_name, _width, _height, _unit) - end - function GtkPaperSize(_variant::GVariant) - G_.PaperSize_new_from_gvariant(_variant) - end - function GtkPaperSize(_ipp_name::Union{AbstractString, Symbol}, _width::Real, _height::Real) - G_.PaperSize_new_from_ipp(_ipp_name, _width, _height) - end - function GtkPaperSize(_key_file::GKeyFile, _group_name::Maybe(Union{AbstractString, Symbol})) - G_.PaperSize_new_from_key_file(_key_file, _group_name) - end - function GtkPaperSize(_ppd_name::Union{AbstractString, Symbol}, _ppd_display_name::Union{AbstractString, Symbol}, _width::Real, _height::Real) - G_.PaperSize_new_from_ppd(_ppd_name, _ppd_display_name, _width, _height) - end - function GtkRequisition() - G_.Requisition_new() - end - function GtkScrollInfo() - G_.ScrollInfo_new() - end - function GtkTreePath() - G_.TreePath_new() - end - function GtkTreePath(_indices) - G_.TreePath_new_from_indices(_indices) - end - function GtkTreePath(_path::Union{AbstractString, Symbol}) - G_.TreePath_new_from_string(_path) - end @doc "See the [GTK docs](https://docs.gtk.org/gtk4/struct.Bitset.html)." GtkBitset @doc "See the [GTK docs](https://docs.gtk.org/gtk4/struct.BitsetIter.html)." GtkBitsetIter @doc "See the [GTK docs](https://docs.gtk.org/gtk4/struct.Border.html)." GtkBorder @@ -8466,6 +8421,51 @@ $(Expr(:toplevel, quote GLib.setproperties!(obj; kwargs...) obj end + function GtkBitset() + G_.Bitset_new_empty() + end + function GtkBitset(_start::Integer, _n_items::Integer) + G_.Bitset_new_range(_start, _n_items) + end + function GtkBorder() + G_.Border_new() + end + function GtkCssSection(_file::Maybe(GFile), _start::Union{GtkCssLocation, Ref{_GtkCssLocation}}, _end::Union{GtkCssLocation, Ref{_GtkCssLocation}}) + G_.CssSection_new(_file, _start, _end) + end + function GtkPaperSize(_name::Maybe(Union{AbstractString, Symbol})) + G_.PaperSize_new(_name) + end + function GtkPaperSize(_name::Union{AbstractString, Symbol}, _display_name::Union{AbstractString, Symbol}, _width::Real, _height::Real, _unit) + G_.PaperSize_new_custom(_name, _display_name, _width, _height, _unit) + end + function GtkPaperSize(_variant::GVariant) + G_.PaperSize_new_from_gvariant(_variant) + end + function GtkPaperSize(_ipp_name::Union{AbstractString, Symbol}, _width::Real, _height::Real) + G_.PaperSize_new_from_ipp(_ipp_name, _width, _height) + end + function GtkPaperSize(_key_file::GKeyFile, _group_name::Maybe(Union{AbstractString, Symbol})) + G_.PaperSize_new_from_key_file(_key_file, _group_name) + end + function GtkPaperSize(_ppd_name::Union{AbstractString, Symbol}, _ppd_display_name::Union{AbstractString, Symbol}, _width::Real, _height::Real) + G_.PaperSize_new_from_ppd(_ppd_name, _ppd_display_name, _width, _height) + end + function GtkRequisition() + G_.Requisition_new() + end + function GtkScrollInfo() + G_.ScrollInfo_new() + end + function GtkTreePath() + G_.TreePath_new() + end + function GtkTreePath(_indices) + G_.TreePath_new_from_indices(_indices) + end + function GtkTreePath(_path::Union{AbstractString, Symbol}) + G_.TreePath_new_from_string(_path) + end @doc "See the [GTK docs](https://docs.gtk.org/gtk4/class.ATContext.html)." GtkATContext @doc "See the [GTK docs](https://docs.gtk.org/gtk4/class.AboutDialog.html)." GtkAboutDialog @doc "See the [GTK docs](https://docs.gtk.org/gtk4/class.ActionBar.html)." GtkActionBar diff --git a/src/gen/pango_structs b/src/gen/pango_structs index b3af48a5..83bd27c5 100644 --- a/src/gen/pango_structs +++ b/src/gen/pango_structs @@ -266,15 +266,6 @@ $(Expr(:toplevel, quote convert(Ptr{_PangoGlyphItem}, box.handle) end end - function PangoFontDescription() - G_.FontDescription_new() - end - function PangoItem() - G_.Item_new() - end - function PangoGlyphString() - G_.GlyphString_new() - end begin struct _PangoAttrColor attr::_PangoAttribute @@ -637,15 +628,6 @@ $(Expr(:toplevel, quote gboxed_cache_init() = begin append!(GLib.gboxed_types, gboxed_types) end - function PangoAttrList() - G_.AttrList_new() - end - function PangoScriptIter(_text::Union{AbstractString, Symbol}, _length::Integer) - G_.ScriptIter_new(_text, _length) - end - function PangoTabArray(_initial_size::Integer, _positions_in_pixels::Bool) - G_.TabArray_new(_initial_size, _positions_in_pixels) - end const gtype_wrapper_cache = Dict{Symbol, Type}() begin abstract type PangoContext <: GObject end @@ -900,6 +882,24 @@ $(Expr(:toplevel, quote function PangoLayout(_context::PangoContext) G_.Layout_new(_context) end + function PangoFontDescription() + G_.FontDescription_new() + end + function PangoItem() + G_.Item_new() + end + function PangoGlyphString() + G_.GlyphString_new() + end + function PangoAttrList() + G_.AttrList_new() + end + function PangoScriptIter(_text::Union{AbstractString, Symbol}, _length::Integer) + G_.ScriptIter_new(_text, _length) + end + function PangoTabArray(_initial_size::Integer, _positions_in_pixels::Bool) + G_.TabArray_new(_initial_size, _positions_in_pixels) + end function on_items_changed(f, object::PangoFontFamily, user_data = object, after = false) GLib.signal_connect_generic(f, object, "items-changed", Nothing, (UInt32, UInt32, UInt32), after, user_data) end