From c499462338e82c0a942871d671fde0b01979e6a1 Mon Sep 17 00:00:00 2001 From: Jared Wahlstrand Date: Sat, 21 Sep 2024 16:58:59 -0400 Subject: [PATCH] Version 0.7 (#74) * require julia 1.10 * minor stuff * improve test coverage (#70) * Use new dialogs (breaking) (#49) In the newer versions of GTK v4, new dialogs were introduced and the old ones were deprecated, including GtkDialog and GtkMessageDialog. There isn't much difference in user-facing behavior, but since the old ones were deprecated it's less likely bugs will be fixed. This PR migrates to the new dialogs and cleans up our API a little. I left the file dialogs alone after looking in the C code and realizing that the new dialogs are based on GtkFileChooserNative, like the old code. * GtkTextView: use pointer or Ref instead of _GtkTextIter struct (breaking) (#62) * GtkTextView: use pointer or ref instead of _GtkTextIter struct This is more consistent with everything else in the package * random stuff * support adding widgets to gutter * fix GtkTextIter auto-generated methods, better support methods for all non-opaque structs * a bit of tidying * remove unneeded version check * add simple TextView example * update auto-generated code for Adwaita * simplify generation script for Adwaita * update auto-generated code * regenerate code --- .github/workflows/ci.yml | 1 - Adwaita/README.md | 2 +- Adwaita/src/gen/adw_consts | 64 +- Adwaita/src/gen/adw_functions | 10 + Adwaita/src/gen/adw_methods | 6511 ++++++++++++++++++++++++++---- Adwaita/src/gen/adw_structs | 949 ++++- GI/src/GLibBase/GLibBase.jl | 11 - GI/src/GLibBase/gtype.jl | 1 - GI/src/giexport.jl | 6 + GI/src/giimport.jl | 21 +- GI/src/girepo.jl | 7 - Project.toml | 6 +- docs/src/doc/reference.md | 2 +- docs/src/manual/dialogs.md | 40 +- examples/HDF5Viewer/Project.toml | 2 +- examples/README.md | 1 + examples/word_counter.jl | 20 + gen/gen_adwaita.jl | 50 +- gen/gen_gio.jl | 2 +- gen/gen_gtk4.jl | 2 +- gen/gen_rest.jl | 2 +- src/GLib/GLib.jl | 8 +- src/GLib/gerror.jl | 3 +- src/GLib/gio.jl | 14 + src/GLib/gtype.jl | 12 +- src/GLib/gvalues.jl | 1 + src/GLib/signals.jl | 7 +- src/Gdk4.jl | 44 +- src/GdkPixbufLib.jl | 2 +- src/Gtk4.jl | 11 +- src/Pango/Cairo.jl | 2 +- src/Pango/Pango.jl | 4 +- src/buttons.jl | 1 - src/cairo.jl | 2 +- src/deprecated.jl | 47 +- src/displays.jl | 15 + src/gen/cairo_structs | 276 +- src/gen/gdk4_functions | 6 +- src/gen/gdk4_methods | 48 +- src/gen/gdk4_structs | 311 +- src/gen/gdkpixbuf_consts | 4 +- src/gen/gdkpixbuf_methods | 26 +- src/gen/gdkpixbuf_structs | 28 +- src/gen/gio_functions | 8 +- src/gen/gio_methods | 203 +- src/gen/gio_structs | 326 +- src/gen/glib_methods | 178 +- src/gen/glib_structs | 589 +-- src/gen/gobject_functions | 58 +- src/gen/gobject_methods | 118 +- src/gen/gobject_structs | 220 +- src/gen/graphene_functions | 52 +- src/gen/graphene_methods | 788 ++-- src/gen/graphene_structs | 238 +- src/gen/gsk4_functions | 4 +- src/gen/gsk4_methods | 150 +- src/gen/gsk4_structs | 274 +- src/gen/gtk4_functions | 12 +- src/gen/gtk4_methods | 907 ++++- src/gen/gtk4_structs | 434 +- src/gen/pango_functions | 92 +- src/gen/pango_methods | 212 +- src/gen/pango_structs | 515 ++- src/gen/pangocairo_structs | 2 +- src/input.jl | 12 +- src/layout.jl | 36 +- src/lists.jl | 4 +- src/precompile.jl | 14 +- src/text.jl | 373 +- src/windows.jl | 361 +- test/gdkpixbuf.jl | 2 + test/gui/canvas.jl | 3 +- test/gui/dialogs.jl | 6 +- test/gui/examples.jl | 9 + test/gui/input.jl | 6 +- test/gui/layout.jl | 2 + test/gui/misc.jl | 28 +- test/{ => gui}/test.ui | 0 test/runtests.jl | 4 +- test/text.jl | 45 +- 80 files changed, 11137 insertions(+), 3730 deletions(-) create mode 100644 examples/word_counter.jl rename test/{ => gui}/test.ui (100%) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2b769ff8..42483681 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,7 +15,6 @@ jobs: fail-fast: false matrix: julia-version: - - "1.6" - "1" #- "nightly" os: diff --git a/Adwaita/README.md b/Adwaita/README.md index 2ff3c588..2d831f45 100644 --- a/Adwaita/README.md +++ b/Adwaita/README.md @@ -1,5 +1,5 @@ # Adwaita.jl -Module for using [libadwaita](https://gnome.pages.gitlab.gnome.org/libadwaita/doc/1.2/). +Module for using [libadwaita](https://gnome.pages.gitlab.gnome.org/libadwaita/doc/1.3/) version 1.3. Requires and works with Gtk4.jl. This package is not currently registered, nor is there documentation yet. It is mostly autogenerated by GObject introspection, so it works very much like Gtk4.jl. diff --git a/Adwaita/src/gen/adw_consts b/Adwaita/src/gen/adw_consts index 4ed8a456..3e36d5fc 100644 --- a/Adwaita/src/gen/adw_consts +++ b/Adwaita/src/gen/adw_consts @@ -1,11 +1,11 @@ quote $(Expr(:toplevel, quote begin - DURATION_INFINITE = 0xffffffff - MAJOR_VERSION = 1 - MICRO_VERSION = 4 - MINOR_VERSION = 2 - VERSION_S = "1.2.4" + const DURATION_INFINITE = 0xffffffff + const MAJOR_VERSION = 1 + const MICRO_VERSION = 3 + const MINOR_VERSION = 5 + const VERSION_S = "1.5.3" begin @cenum AnimationState::Int32 AnimationState_IDLE = 0 AnimationState_PAUSED = 1 AnimationState_PLAYING = 2 AnimationState_FINISHED = 3 (GLib.g_type(::Type{T}) where T <: AnimationState) = begin @@ -13,45 +13,45 @@ $(Expr(:toplevel, quote end end begin - @cenum CenteringPolicy::Int32 CenteringPolicy_LOOSE = 0 CenteringPolicy_STRICT = 1 - (GLib.g_type(::Type{T}) where T <: CenteringPolicy) = begin - ccall(("adw_centering_policy_get_type", libadwaita), GType, ()) + @cenum BreakpointConditionLengthType::Int32 BreakpointConditionLengthType_MIN_WIDTH = 0 BreakpointConditionLengthType_MAX_WIDTH = 1 BreakpointConditionLengthType_MIN_HEIGHT = 2 BreakpointConditionLengthType_MAX_HEIGHT = 3 + (GLib.g_type(::Type{T}) where T <: BreakpointConditionLengthType) = begin + ccall(("adw_breakpoint_condition_length_type_get_type", libadwaita), GType, ()) end end begin - @cenum ColorScheme::Int32 ColorScheme_DEFAULT = 0 ColorScheme_FORCE_LIGHT = 1 ColorScheme_PREFER_LIGHT = 2 ColorScheme_PREFER_DARK = 3 ColorScheme_FORCE_DARK = 4 - (GLib.g_type(::Type{T}) where T <: ColorScheme) = begin - ccall(("adw_color_scheme_get_type", libadwaita), GType, ()) + @cenum BreakpointConditionRatioType::Int32 BreakpointConditionRatioType_MIN_ASPECT_RATIO = 0 BreakpointConditionRatioType_MAX_ASPECT_RATIO = 1 + (GLib.g_type(::Type{T}) where T <: BreakpointConditionRatioType) = begin + ccall(("adw_breakpoint_condition_ratio_type_get_type", libadwaita), GType, ()) end end begin - @cenum Easing::Int32 Easing_LINEAR = 0 Easing_EASE_IN_QUAD = 1 Easing_EASE_OUT_QUAD = 2 Easing_EASE_IN_OUT_QUAD = 3 Easing_EASE_IN_CUBIC = 4 Easing_EASE_OUT_CUBIC = 5 Easing_EASE_IN_OUT_CUBIC = 6 Easing_EASE_IN_QUART = 7 Easing_EASE_OUT_QUART = 8 Easing_EASE_IN_OUT_QUART = 9 Easing_EASE_IN_QUINT = 10 Easing_EASE_OUT_QUINT = 11 Easing_EASE_IN_OUT_QUINT = 12 Easing_EASE_IN_SINE = 13 Easing_EASE_OUT_SINE = 14 Easing_EASE_IN_OUT_SINE = 15 Easing_EASE_IN_EXPO = 16 Easing_EASE_OUT_EXPO = 17 Easing_EASE_IN_OUT_EXPO = 18 Easing_EASE_IN_CIRC = 19 Easing_EASE_OUT_CIRC = 20 Easing_EASE_IN_OUT_CIRC = 21 Easing_EASE_IN_ELASTIC = 22 Easing_EASE_OUT_ELASTIC = 23 Easing_EASE_IN_OUT_ELASTIC = 24 Easing_EASE_IN_BACK = 25 Easing_EASE_OUT_BACK = 26 Easing_EASE_IN_OUT_BACK = 27 Easing_EASE_IN_BOUNCE = 28 Easing_EASE_OUT_BOUNCE = 29 Easing_EASE_IN_OUT_BOUNCE = 30 - (GLib.g_type(::Type{T}) where T <: Easing) = begin - ccall(("adw_easing_get_type", libadwaita), GType, ()) + @cenum CenteringPolicy::Int32 CenteringPolicy_LOOSE = 0 CenteringPolicy_STRICT = 1 + (GLib.g_type(::Type{T}) where T <: CenteringPolicy) = begin + ccall(("adw_centering_policy_get_type", libadwaita), GType, ()) end end begin - @cenum FlapFoldPolicy::Int32 FlapFoldPolicy_NEVER = 0 FlapFoldPolicy_ALWAYS = 1 FlapFoldPolicy_AUTO = 2 - (GLib.g_type(::Type{T}) where T <: FlapFoldPolicy) = begin - ccall(("adw_flap_fold_policy_get_type", libadwaita), GType, ()) + @cenum ColorScheme::Int32 ColorScheme_DEFAULT = 0 ColorScheme_FORCE_LIGHT = 1 ColorScheme_PREFER_LIGHT = 2 ColorScheme_PREFER_DARK = 3 ColorScheme_FORCE_DARK = 4 + (GLib.g_type(::Type{T}) where T <: ColorScheme) = begin + ccall(("adw_color_scheme_get_type", libadwaita), GType, ()) end end begin - @cenum FlapTransitionType::Int32 FlapTransitionType_OVER = 0 FlapTransitionType_UNDER = 1 FlapTransitionType_SLIDE = 2 - (GLib.g_type(::Type{T}) where T <: FlapTransitionType) = begin - ccall(("adw_flap_transition_type_get_type", libadwaita), GType, ()) + @cenum DialogPresentationMode::Int32 DialogPresentationMode_AUTO = 0 DialogPresentationMode_FLOATING = 1 DialogPresentationMode_BOTTOM_SHEET = 2 + (GLib.g_type(::Type{T}) where T <: DialogPresentationMode) = begin + ccall(("adw_dialog_presentation_mode_get_type", libadwaita), GType, ()) end end begin - @cenum FoldThresholdPolicy::Int32 FoldThresholdPolicy_MINIMUM = 0 FoldThresholdPolicy_NATURAL = 1 - (GLib.g_type(::Type{T}) where T <: FoldThresholdPolicy) = begin - ccall(("adw_fold_threshold_policy_get_type", libadwaita), GType, ()) + @cenum Easing::Int32 Easing_LINEAR = 0 Easing_EASE_IN_QUAD = 1 Easing_EASE_OUT_QUAD = 2 Easing_EASE_IN_OUT_QUAD = 3 Easing_EASE_IN_CUBIC = 4 Easing_EASE_OUT_CUBIC = 5 Easing_EASE_IN_OUT_CUBIC = 6 Easing_EASE_IN_QUART = 7 Easing_EASE_OUT_QUART = 8 Easing_EASE_IN_OUT_QUART = 9 Easing_EASE_IN_QUINT = 10 Easing_EASE_OUT_QUINT = 11 Easing_EASE_IN_OUT_QUINT = 12 Easing_EASE_IN_SINE = 13 Easing_EASE_OUT_SINE = 14 Easing_EASE_IN_OUT_SINE = 15 Easing_EASE_IN_EXPO = 16 Easing_EASE_OUT_EXPO = 17 Easing_EASE_IN_OUT_EXPO = 18 Easing_EASE_IN_CIRC = 19 Easing_EASE_OUT_CIRC = 20 Easing_EASE_IN_OUT_CIRC = 21 Easing_EASE_IN_ELASTIC = 22 Easing_EASE_OUT_ELASTIC = 23 Easing_EASE_IN_OUT_ELASTIC = 24 Easing_EASE_IN_BACK = 25 Easing_EASE_OUT_BACK = 26 Easing_EASE_IN_OUT_BACK = 27 Easing_EASE_IN_BOUNCE = 28 Easing_EASE_OUT_BOUNCE = 29 Easing_EASE_IN_OUT_BOUNCE = 30 + (GLib.g_type(::Type{T}) where T <: Easing) = begin + ccall(("adw_easing_get_type", libadwaita), GType, ()) end end begin - @cenum LeafletTransitionType::Int32 LeafletTransitionType_OVER = 0 LeafletTransitionType_UNDER = 1 LeafletTransitionType_SLIDE = 2 - (GLib.g_type(::Type{T}) where T <: LeafletTransitionType) = begin - ccall(("adw_leaflet_transition_type_get_type", libadwaita), GType, ()) + @cenum LengthUnit::Int32 LengthUnit_PX = 0 LengthUnit_PT = 1 LengthUnit_SP = 2 + (GLib.g_type(::Type{T}) where T <: LengthUnit) = begin + ccall(("adw_length_unit_get_type", libadwaita), GType, ()) end end begin @@ -66,18 +66,18 @@ $(Expr(:toplevel, quote ccall(("adw_response_appearance_get_type", libadwaita), GType, ()) end end - begin - @cenum SqueezerTransitionType::Int32 SqueezerTransitionType_NONE = 0 SqueezerTransitionType_CROSSFADE = 1 - (GLib.g_type(::Type{T}) where T <: SqueezerTransitionType) = begin - ccall(("adw_squeezer_transition_type_get_type", libadwaita), GType, ()) - end - end begin @cenum ToastPriority::Int32 ToastPriority_NORMAL = 0 ToastPriority_HIGH = 1 (GLib.g_type(::Type{T}) where T <: ToastPriority) = begin ccall(("adw_toast_priority_get_type", libadwaita), GType, ()) end end + begin + @cenum ToolbarStyle::Int32 ToolbarStyle_FLAT = 0 ToolbarStyle_RAISED = 1 ToolbarStyle_RAISED_BORDER = 2 + (GLib.g_type(::Type{T}) where T <: ToolbarStyle) = begin + ccall(("adw_toolbar_style_get_type", libadwaita), GType, ()) + end + end begin @cenum ViewSwitcherPolicy::Int32 ViewSwitcherPolicy_NARROW = 0 ViewSwitcherPolicy_WIDE = 1 (GLib.g_type(::Type{T}) where T <: ViewSwitcherPolicy) = begin diff --git a/Adwaita/src/gen/adw_functions b/Adwaita/src/gen/adw_functions index 6b4899f9..ae63ed0b 100644 --- a/Adwaita/src/gen/adw_functions +++ b/Adwaita/src/gen/adw_functions @@ -30,6 +30,16 @@ $(Expr(:toplevel, quote ret2 = convert(Bool, ret) ret2 end + function length_unit_from_px(_unit, _value::Real, _settings::Maybe(GtkSettings)) + _settings_maybe = nothing_to_null(_settings) + ret = ccall(("adw_length_unit_from_px", libadwaita), Float64, (UInt32, Float64, Ptr{GObject}), _unit, _value, _settings_maybe) + ret + end + function length_unit_to_px(_unit, _value::Real, _settings::Maybe(GtkSettings)) + _settings_maybe = nothing_to_null(_settings) + ret = ccall(("adw_length_unit_to_px", libadwaita), Float64, (UInt32, Float64, Ptr{GObject}), _unit, _value, _settings_maybe) + ret + end function lerp(_a::Real, _b::Real, _t::Real) ret = ccall(("adw_lerp", libadwaita), Float64, (Float64, Float64, Float64), _a, _b, _t) ret diff --git a/Adwaita/src/gen/adw_methods b/Adwaita/src/gen/adw_methods index e4b86fa6..c7a27b8c 100644 --- a/Adwaita/src/gen/adw_methods +++ b/Adwaita/src/gen/adw_methods @@ -35,11 +35,299 @@ $(Expr(:toplevel, quote ret = ccall(("adw_spring_params_unref", libadwaita), Nothing, (Ptr{AdwSpringParams},), instance) nothing end + function AboutDialog_new() + ret = ccall(("adw_about_dialog_new", libadwaita), Ptr{GObject}, ()) + ret2 = AdwAboutDialogLeaf(ret, false) + ret2 + end + function AboutDialog_new_from_appdata(_resource_path::Union{AbstractString, Symbol}, _release_notes_version::Maybe(Union{AbstractString, Symbol})) + _release_notes_version_maybe = nothing_to_null(_release_notes_version) + ret = ccall(("adw_about_dialog_new_from_appdata", libadwaita), Ptr{GObject}, (Cstring, Cstring), _resource_path, _release_notes_version_maybe) + ret2 = AdwAboutDialogLeaf(ret, false) + ret2 + end + function add_acknowledgement_section(instance::AdwAboutDialog, _name::Maybe(Union{AbstractString, Symbol}), _people) + _name_maybe = nothing_to_null(_name) + ret = ccall(("adw_about_dialog_add_acknowledgement_section", libadwaita), Nothing, (Ptr{GObject}, Cstring, Ptr{Cstring}), instance, _name_maybe, _people) + nothing + end + function add_credit_section(instance::AdwAboutDialog, _name::Maybe(Union{AbstractString, Symbol}), _people) + _name_maybe = nothing_to_null(_name) + ret = ccall(("adw_about_dialog_add_credit_section", libadwaita), Nothing, (Ptr{GObject}, Cstring, Ptr{Cstring}), instance, _name_maybe, _people) + nothing + end + function add_legal_section(instance::AdwAboutDialog, _title::Union{AbstractString, Symbol}, _copyright::Maybe(Union{AbstractString, Symbol}), _license_type, _license::Maybe(Union{AbstractString, Symbol})) + _copyright_maybe = nothing_to_null(_copyright) + _license_maybe = nothing_to_null(_license) + ret = ccall(("adw_about_dialog_add_legal_section", libadwaita), Nothing, (Ptr{GObject}, Cstring, Cstring, UInt32, Cstring), instance, _title, _copyright_maybe, _license_type, _license_maybe) + nothing + end + function add_link(instance::AdwAboutDialog, _title::Union{AbstractString, Symbol}, _url::Union{AbstractString, Symbol}) + ret = ccall(("adw_about_dialog_add_link", libadwaita), Nothing, (Ptr{GObject}, Cstring, Cstring), instance, _title, _url) + nothing + end + function get_application_icon(instance::AdwAboutDialog) + ret = ccall(("adw_about_dialog_get_application_icon", libadwaita), Cstring, (Ptr{GObject},), instance) + ret2 = string_or_nothing(ret, false) + ret2 + end + function get_application_name(instance::AdwAboutDialog) + ret = ccall(("adw_about_dialog_get_application_name", libadwaita), Cstring, (Ptr{GObject},), instance) + ret2 = string_or_nothing(ret, false) + ret2 + end + function get_artists(instance::AdwAboutDialog) + ret = ccall(("adw_about_dialog_get_artists", libadwaita), Ptr{Cstring}, (Ptr{GObject},), instance) + ret2 = begin + _len = length_zt(ret) + arrtemp = bytestring.(unsafe_wrap(Vector{Cstring}, ret, _len)) + arrtemp + end + ret2 + end + function get_comments(instance::AdwAboutDialog) + ret = ccall(("adw_about_dialog_get_comments", libadwaita), Cstring, (Ptr{GObject},), instance) + ret2 = string_or_nothing(ret, false) + ret2 + end + function get_copyright(instance::AdwAboutDialog) + ret = ccall(("adw_about_dialog_get_copyright", libadwaita), Cstring, (Ptr{GObject},), instance) + ret2 = string_or_nothing(ret, false) + ret2 + end + function get_debug_info(instance::AdwAboutDialog) + ret = ccall(("adw_about_dialog_get_debug_info", libadwaita), Cstring, (Ptr{GObject},), instance) + ret2 = string_or_nothing(ret, false) + ret2 + end + function get_debug_info_filename(instance::AdwAboutDialog) + ret = ccall(("adw_about_dialog_get_debug_info_filename", libadwaita), Cstring, (Ptr{GObject},), instance) + ret2 = string_or_nothing(ret, false) + ret2 + end + function get_designers(instance::AdwAboutDialog) + ret = ccall(("adw_about_dialog_get_designers", libadwaita), Ptr{Cstring}, (Ptr{GObject},), instance) + ret2 = begin + _len = length_zt(ret) + arrtemp = bytestring.(unsafe_wrap(Vector{Cstring}, ret, _len)) + arrtemp + end + ret2 + end + function get_developer_name(instance::AdwAboutDialog) + ret = ccall(("adw_about_dialog_get_developer_name", libadwaita), Cstring, (Ptr{GObject},), instance) + ret2 = string_or_nothing(ret, false) + ret2 + end + function get_developers(instance::AdwAboutDialog) + ret = ccall(("adw_about_dialog_get_developers", libadwaita), Ptr{Cstring}, (Ptr{GObject},), instance) + ret2 = begin + _len = length_zt(ret) + arrtemp = bytestring.(unsafe_wrap(Vector{Cstring}, ret, _len)) + arrtemp + end + ret2 + end + function get_documenters(instance::AdwAboutDialog) + ret = ccall(("adw_about_dialog_get_documenters", libadwaita), Ptr{Cstring}, (Ptr{GObject},), instance) + ret2 = begin + _len = length_zt(ret) + arrtemp = bytestring.(unsafe_wrap(Vector{Cstring}, ret, _len)) + arrtemp + end + ret2 + end + function get_issue_url(instance::AdwAboutDialog) + ret = ccall(("adw_about_dialog_get_issue_url", libadwaita), Cstring, (Ptr{GObject},), instance) + ret2 = string_or_nothing(ret, false) + ret2 + end + function get_license(instance::AdwAboutDialog) + ret = ccall(("adw_about_dialog_get_license", libadwaita), Cstring, (Ptr{GObject},), instance) + ret2 = string_or_nothing(ret, false) + ret2 + end + function get_license_type(instance::AdwAboutDialog) + ret = ccall(("adw_about_dialog_get_license_type", libadwaita), UInt32, (Ptr{GObject},), instance) + ret2 = License(ret) + ret2 + end + function get_release_notes(instance::AdwAboutDialog) + ret = ccall(("adw_about_dialog_get_release_notes", libadwaita), Cstring, (Ptr{GObject},), instance) + ret2 = string_or_nothing(ret, false) + ret2 + end + function get_release_notes_version(instance::AdwAboutDialog) + ret = ccall(("adw_about_dialog_get_release_notes_version", libadwaita), Cstring, (Ptr{GObject},), instance) + ret2 = string_or_nothing(ret, false) + ret2 + end + function get_support_url(instance::AdwAboutDialog) + ret = ccall(("adw_about_dialog_get_support_url", libadwaita), Cstring, (Ptr{GObject},), instance) + ret2 = string_or_nothing(ret, false) + ret2 + end + function get_translator_credits(instance::AdwAboutDialog) + ret = ccall(("adw_about_dialog_get_translator_credits", libadwaita), Cstring, (Ptr{GObject},), instance) + ret2 = string_or_nothing(ret, false) + ret2 + end + function get_version(instance::AdwAboutDialog) + ret = ccall(("adw_about_dialog_get_version", libadwaita), Cstring, (Ptr{GObject},), instance) + ret2 = string_or_nothing(ret, false) + ret2 + end + function get_website(instance::AdwAboutDialog) + ret = ccall(("adw_about_dialog_get_website", libadwaita), Cstring, (Ptr{GObject},), instance) + ret2 = string_or_nothing(ret, false) + ret2 + end + function set_application_icon(instance::AdwAboutDialog, _application_icon::Union{AbstractString, Symbol}) + ret = ccall(("adw_about_dialog_set_application_icon", libadwaita), Nothing, (Ptr{GObject}, Cstring), instance, _application_icon) + nothing + end + function set_application_name(instance::AdwAboutDialog, _application_name::Union{AbstractString, Symbol}) + ret = ccall(("adw_about_dialog_set_application_name", libadwaita), Nothing, (Ptr{GObject}, Cstring), instance, _application_name) + nothing + end + function set_artists(instance::AdwAboutDialog, _artists) + _artists_maybe = nothing_to_null(_artists) + ret = ccall(("adw_about_dialog_set_artists", libadwaita), Nothing, (Ptr{GObject}, Ptr{Cstring}), instance, _artists_maybe) + nothing + end + function set_comments(instance::AdwAboutDialog, _comments::Union{AbstractString, Symbol}) + ret = ccall(("adw_about_dialog_set_comments", libadwaita), Nothing, (Ptr{GObject}, Cstring), instance, _comments) + nothing + end + function set_copyright(instance::AdwAboutDialog, _copyright::Union{AbstractString, Symbol}) + ret = ccall(("adw_about_dialog_set_copyright", libadwaita), Nothing, (Ptr{GObject}, Cstring), instance, _copyright) + nothing + end + function set_debug_info(instance::AdwAboutDialog, _debug_info::Union{AbstractString, Symbol}) + ret = ccall(("adw_about_dialog_set_debug_info", libadwaita), Nothing, (Ptr{GObject}, Cstring), instance, _debug_info) + nothing + end + function set_debug_info_filename(instance::AdwAboutDialog, _filename::Union{AbstractString, Symbol}) + ret = ccall(("adw_about_dialog_set_debug_info_filename", libadwaita), Nothing, (Ptr{GObject}, Cstring), instance, _filename) + nothing + end + function set_designers(instance::AdwAboutDialog, _designers) + _designers_maybe = nothing_to_null(_designers) + ret = ccall(("adw_about_dialog_set_designers", libadwaita), Nothing, (Ptr{GObject}, Ptr{Cstring}), instance, _designers_maybe) + nothing + end + function set_developer_name(instance::AdwAboutDialog, _developer_name::Union{AbstractString, Symbol}) + ret = ccall(("adw_about_dialog_set_developer_name", libadwaita), Nothing, (Ptr{GObject}, Cstring), instance, _developer_name) + nothing + end + function set_developers(instance::AdwAboutDialog, _developers) + _developers_maybe = nothing_to_null(_developers) + ret = ccall(("adw_about_dialog_set_developers", libadwaita), Nothing, (Ptr{GObject}, Ptr{Cstring}), instance, _developers_maybe) + nothing + end + function set_documenters(instance::AdwAboutDialog, _documenters) + _documenters_maybe = nothing_to_null(_documenters) + ret = ccall(("adw_about_dialog_set_documenters", libadwaita), Nothing, (Ptr{GObject}, Ptr{Cstring}), instance, _documenters_maybe) + nothing + end + function set_issue_url(instance::AdwAboutDialog, _issue_url::Union{AbstractString, Symbol}) + ret = ccall(("adw_about_dialog_set_issue_url", libadwaita), Nothing, (Ptr{GObject}, Cstring), instance, _issue_url) + nothing + end + function set_license(instance::AdwAboutDialog, _license::Union{AbstractString, Symbol}) + ret = ccall(("adw_about_dialog_set_license", libadwaita), Nothing, (Ptr{GObject}, Cstring), instance, _license) + nothing + end + function set_license_type(instance::AdwAboutDialog, _license_type) + ret = ccall(("adw_about_dialog_set_license_type", libadwaita), Nothing, (Ptr{GObject}, UInt32), instance, _license_type) + nothing + end + function set_release_notes(instance::AdwAboutDialog, _release_notes::Union{AbstractString, Symbol}) + ret = ccall(("adw_about_dialog_set_release_notes", libadwaita), Nothing, (Ptr{GObject}, Cstring), instance, _release_notes) + nothing + end + function set_release_notes_version(instance::AdwAboutDialog, _version::Union{AbstractString, Symbol}) + ret = ccall(("adw_about_dialog_set_release_notes_version", libadwaita), Nothing, (Ptr{GObject}, Cstring), instance, _version) + nothing + end + function set_support_url(instance::AdwAboutDialog, _support_url::Union{AbstractString, Symbol}) + ret = ccall(("adw_about_dialog_set_support_url", libadwaita), Nothing, (Ptr{GObject}, Cstring), instance, _support_url) + nothing + end + function set_translator_credits(instance::AdwAboutDialog, _translator_credits::Union{AbstractString, Symbol}) + ret = ccall(("adw_about_dialog_set_translator_credits", libadwaita), Nothing, (Ptr{GObject}, Cstring), instance, _translator_credits) + nothing + end + function set_version(instance::AdwAboutDialog, _version::Union{AbstractString, Symbol}) + ret = ccall(("adw_about_dialog_set_version", libadwaita), Nothing, (Ptr{GObject}, Cstring), instance, _version) + nothing + end + function set_website(instance::AdwAboutDialog, _website::Union{AbstractString, Symbol}) + ret = ccall(("adw_about_dialog_set_website", libadwaita), Nothing, (Ptr{GObject}, Cstring), instance, _website) + nothing + end + function announce(instance::AdwAboutDialog, _message::Union{AbstractString, Symbol}, _priority) + announce(GtkAccessible(instance), _message, _priority) + end + function get_accessible_parent(instance::AdwAboutDialog) + get_accessible_parent(GtkAccessible(instance)) + end + function get_accessible_role(instance::AdwAboutDialog) + get_accessible_role(GtkAccessible(instance)) + end + function get_at_context(instance::AdwAboutDialog) + get_at_context(GtkAccessible(instance)) + end + function get_bounds(instance::AdwAboutDialog) + get_bounds(GtkAccessible(instance)) + end + function get_first_accessible_child(instance::AdwAboutDialog) + get_first_accessible_child(GtkAccessible(instance)) + end + function get_next_accessible_sibling(instance::AdwAboutDialog) + get_next_accessible_sibling(GtkAccessible(instance)) + end + function get_platform_state(instance::AdwAboutDialog, _state) + get_platform_state(GtkAccessible(instance), _state) + end + function reset_property(instance::AdwAboutDialog, _property) + reset_property(GtkAccessible(instance), _property) + end + function reset_relation(instance::AdwAboutDialog, _relation) + reset_relation(GtkAccessible(instance), _relation) + end + function reset_state(instance::AdwAboutDialog, _state) + reset_state(GtkAccessible(instance), _state) + end + function set_accessible_parent(instance::AdwAboutDialog, _parent::Maybe(GtkAccessible), _next_sibling::Maybe(GtkAccessible)) + set_accessible_parent(GtkAccessible(instance), _parent, _next_sibling) + end + function update_next_accessible_sibling(instance::AdwAboutDialog, _new_sibling::Maybe(GtkAccessible)) + update_next_accessible_sibling(GtkAccessible(instance), _new_sibling) + end + function update_property(instance::AdwAboutDialog, _properties, _values) + update_property(GtkAccessible(instance), _properties, _values) + end + function update_relation(instance::AdwAboutDialog, _relations, _values) + update_relation(GtkAccessible(instance), _relations, _values) + end + function update_state(instance::AdwAboutDialog, _states, _values) + update_state(GtkAccessible(instance), _states, _values) + end + function get_buildable_id(instance::AdwAboutDialog) + get_buildable_id(GtkBuildable(instance)) + end function AboutWindow_new() ret = ccall(("adw_about_window_new", libadwaita), Ptr{GObject}, ()) ret2 = AdwAboutWindowLeaf(ret, false) ret2 end + function AboutWindow_new_from_appdata(_resource_path::Union{AbstractString, Symbol}, _release_notes_version::Maybe(Union{AbstractString, Symbol})) + _release_notes_version_maybe = nothing_to_null(_release_notes_version) + ret = ccall(("adw_about_window_new_from_appdata", libadwaita), Ptr{GObject}, (Cstring, Cstring), _resource_path, _release_notes_version_maybe) + ret2 = AdwAboutWindowLeaf(ret, false) + ret2 + end function add_acknowledgement_section(instance::AdwAboutWindow, _name::Maybe(Union{AbstractString, Symbol}), _people) _name_maybe = nothing_to_null(_name) ret = ccall(("adw_about_window_add_acknowledgement_section", libadwaita), Nothing, (Ptr{GObject}, Cstring, Ptr{Cstring}), instance, _name_maybe, _people) @@ -260,6 +548,81 @@ $(Expr(:toplevel, quote ret = ccall(("adw_about_window_set_website", libadwaita), Nothing, (Ptr{GObject}, Cstring), instance, _website) nothing end + function announce(instance::AdwAboutWindow, _message::Union{AbstractString, Symbol}, _priority) + announce(GtkAccessible(instance), _message, _priority) + end + function get_accessible_parent(instance::AdwAboutWindow) + get_accessible_parent(GtkAccessible(instance)) + end + function get_accessible_role(instance::AdwAboutWindow) + get_accessible_role(GtkAccessible(instance)) + end + function get_at_context(instance::AdwAboutWindow) + get_at_context(GtkAccessible(instance)) + end + function get_bounds(instance::AdwAboutWindow) + get_bounds(GtkAccessible(instance)) + end + function get_first_accessible_child(instance::AdwAboutWindow) + get_first_accessible_child(GtkAccessible(instance)) + end + function get_next_accessible_sibling(instance::AdwAboutWindow) + get_next_accessible_sibling(GtkAccessible(instance)) + end + function get_platform_state(instance::AdwAboutWindow, _state) + get_platform_state(GtkAccessible(instance), _state) + end + function reset_property(instance::AdwAboutWindow, _property) + reset_property(GtkAccessible(instance), _property) + end + function reset_relation(instance::AdwAboutWindow, _relation) + reset_relation(GtkAccessible(instance), _relation) + end + function reset_state(instance::AdwAboutWindow, _state) + reset_state(GtkAccessible(instance), _state) + end + function set_accessible_parent(instance::AdwAboutWindow, _parent::Maybe(GtkAccessible), _next_sibling::Maybe(GtkAccessible)) + set_accessible_parent(GtkAccessible(instance), _parent, _next_sibling) + end + function update_next_accessible_sibling(instance::AdwAboutWindow, _new_sibling::Maybe(GtkAccessible)) + update_next_accessible_sibling(GtkAccessible(instance), _new_sibling) + end + function update_property(instance::AdwAboutWindow, _properties, _values) + update_property(GtkAccessible(instance), _properties, _values) + end + function update_relation(instance::AdwAboutWindow, _relations, _values) + update_relation(GtkAccessible(instance), _relations, _values) + end + function update_state(instance::AdwAboutWindow, _states, _values) + update_state(GtkAccessible(instance), _states, _values) + end + function get_buildable_id(instance::AdwAboutWindow) + get_buildable_id(GtkBuildable(instance)) + end + function get_renderer(instance::AdwAboutWindow) + get_renderer(GtkNative(instance)) + end + function get_surface(instance::AdwAboutWindow) + get_surface(GtkNative(instance)) + end + function get_surface_transform(instance::AdwAboutWindow) + get_surface_transform(GtkNative(instance)) + end + function realize(instance::AdwAboutWindow) + realize(GtkNative(instance)) + end + function unrealize(instance::AdwAboutWindow) + unrealize(GtkNative(instance)) + end + function get_display(instance::AdwAboutWindow) + get_display(GtkRoot(instance)) + end + function get_focus(instance::AdwAboutWindow) + get_focus(GtkRoot(instance)) + end + function set_focus(instance::AdwAboutWindow, _focus::Maybe(GtkWidget)) + set_focus(GtkRoot(instance), _focus) + end function ActionRow_new() ret = ccall(("adw_action_row_new", libadwaita), Ptr{GObject}, ()) ret2 = AdwActionRowLeaf(ret, false) @@ -296,6 +659,11 @@ $(Expr(:toplevel, quote ret = ccall(("adw_action_row_get_subtitle_lines", libadwaita), Int32, (Ptr{GObject},), instance) ret end + function get_subtitle_selectable(instance::AdwActionRow) + ret = ccall(("adw_action_row_get_subtitle_selectable", libadwaita), Cint, (Ptr{GObject},), instance) + ret2 = convert(Bool, ret) + ret2 + end function get_title_lines(instance::AdwActionRow) ret = ccall(("adw_action_row_get_title_lines", libadwaita), Int32, (Ptr{GObject},), instance) ret @@ -322,1128 +690,3873 @@ $(Expr(:toplevel, quote ret = ccall(("adw_action_row_set_subtitle_lines", libadwaita), Nothing, (Ptr{GObject}, Int32), instance, _subtitle_lines) nothing end + function set_subtitle_selectable(instance::AdwActionRow, _subtitle_selectable::Bool) + ret = ccall(("adw_action_row_set_subtitle_selectable", libadwaita), Nothing, (Ptr{GObject}, Cint), instance, _subtitle_selectable) + nothing + end function set_title_lines(instance::AdwActionRow, _title_lines::Integer) ret = ccall(("adw_action_row_set_title_lines", libadwaita), Nothing, (Ptr{GObject}, Int32), instance, _title_lines) nothing end - function get_state(instance::AdwAnimation) - ret = ccall(("adw_animation_get_state", libadwaita), UInt32, (Ptr{GObject},), instance) - ret2 = AnimationState(ret) - ret2 + function announce(instance::AdwActionRow, _message::Union{AbstractString, Symbol}, _priority) + announce(GtkAccessible(instance), _message, _priority) end - function get_target(instance::AdwAnimation) - ret = ccall(("adw_animation_get_target", libadwaita), Ptr{GObject}, (Ptr{GObject},), instance) - ret2 = convert(AdwAnimationTarget, ret, false) - ret2 + function get_accessible_parent(instance::AdwActionRow) + get_accessible_parent(GtkAccessible(instance)) end - function get_value(instance::AdwAnimation) - ret = ccall(("adw_animation_get_value", libadwaita), Float64, (Ptr{GObject},), instance) - ret + function get_accessible_role(instance::AdwActionRow) + get_accessible_role(GtkAccessible(instance)) end - function get_widget(instance::AdwAnimation) - ret = ccall(("adw_animation_get_widget", libadwaita), Ptr{GObject}, (Ptr{GObject},), instance) - ret2 = convert(GtkWidget, ret, false) - ret2 + function get_at_context(instance::AdwActionRow) + get_at_context(GtkAccessible(instance)) end - function pause(instance::AdwAnimation) - ret = ccall(("adw_animation_pause", libadwaita), Nothing, (Ptr{GObject},), instance) - nothing + function get_bounds(instance::AdwActionRow) + get_bounds(GtkAccessible(instance)) end - function play(instance::AdwAnimation) - ret = ccall(("adw_animation_play", libadwaita), Nothing, (Ptr{GObject},), instance) - nothing + function get_first_accessible_child(instance::AdwActionRow) + get_first_accessible_child(GtkAccessible(instance)) end - function reset(instance::AdwAnimation) - ret = ccall(("adw_animation_reset", libadwaita), Nothing, (Ptr{GObject},), instance) - nothing + function get_next_accessible_sibling(instance::AdwActionRow) + get_next_accessible_sibling(GtkAccessible(instance)) end - function resume(instance::AdwAnimation) - ret = ccall(("adw_animation_resume", libadwaita), Nothing, (Ptr{GObject},), instance) - nothing + function get_platform_state(instance::AdwActionRow, _state) + get_platform_state(GtkAccessible(instance), _state) end - function set_target(instance::AdwAnimation, _target::AdwAnimationTarget) - ret = ccall(("adw_animation_set_target", libadwaita), Nothing, (Ptr{GObject}, Ptr{GObject}), instance, _target) - nothing + function reset_property(instance::AdwActionRow, _property) + reset_property(GtkAccessible(instance), _property) end - function skip(instance::AdwAnimation) - ret = ccall(("adw_animation_skip", libadwaita), Nothing, (Ptr{GObject},), instance) - nothing + function reset_relation(instance::AdwActionRow, _relation) + reset_relation(GtkAccessible(instance), _relation) end - function Application_new(_application_id::Maybe(Union{AbstractString, Symbol}), _flags) - _application_id_maybe = nothing_to_null(_application_id) - ret = ccall(("adw_application_new", libadwaita), Ptr{GObject}, (Cstring, UInt32), _application_id_maybe, _flags) - ret2 = AdwApplicationLeaf(ret, true) - ret2 + function reset_state(instance::AdwActionRow, _state) + reset_state(GtkAccessible(instance), _state) end - function get_style_manager(instance::AdwApplication) - ret = ccall(("adw_application_get_style_manager", libadwaita), Ptr{GObject}, (Ptr{GObject},), instance) - ret2 = convert(AdwStyleManager, ret, false) - ret2 + function set_accessible_parent(instance::AdwActionRow, _parent::Maybe(GtkAccessible), _next_sibling::Maybe(GtkAccessible)) + set_accessible_parent(GtkAccessible(instance), _parent, _next_sibling) end - function ApplicationWindow_new(_app::GtkApplication) - ret = ccall(("adw_application_window_new", libadwaita), Ptr{GObject}, (Ptr{GObject},), _app) - ret2 = AdwApplicationWindowLeaf(ret, false) - ret2 + function update_next_accessible_sibling(instance::AdwActionRow, _new_sibling::Maybe(GtkAccessible)) + update_next_accessible_sibling(GtkAccessible(instance), _new_sibling) end - function get_content(instance::AdwApplicationWindow) - ret = ccall(("adw_application_window_get_content", libadwaita), Ptr{GObject}, (Ptr{GObject},), instance) - ret2 = convert_if_not_null(GtkWidget, ret, false) + function update_property(instance::AdwActionRow, _properties, _values) + update_property(GtkAccessible(instance), _properties, _values) + end + function update_relation(instance::AdwActionRow, _relations, _values) + update_relation(GtkAccessible(instance), _relations, _values) + end + function update_state(instance::AdwActionRow, _states, _values) + update_state(GtkAccessible(instance), _states, _values) + end + function get_action_name(instance::AdwActionRow) + get_action_name(GtkActionable(instance)) + end + function get_action_target_value(instance::AdwActionRow) + get_action_target_value(GtkActionable(instance)) + end + function set_action_name(instance::AdwActionRow, _action_name::Maybe(Union{AbstractString, Symbol})) + set_action_name(GtkActionable(instance), _action_name) + end + function set_action_target_value(instance::AdwActionRow, _target_value::Maybe(GVariant)) + set_action_target_value(GtkActionable(instance), _target_value) + end + function set_detailed_action_name(instance::AdwActionRow, _detailed_action_name::Union{AbstractString, Symbol}) + set_detailed_action_name(GtkActionable(instance), _detailed_action_name) + end + function get_buildable_id(instance::AdwActionRow) + get_buildable_id(GtkBuildable(instance)) + end + function AlertDialog_new(_heading::Maybe(Union{AbstractString, Symbol}), _body::Maybe(Union{AbstractString, Symbol})) + _heading_maybe = nothing_to_null(_heading) + _body_maybe = nothing_to_null(_body) + ret = ccall(("adw_alert_dialog_new", libadwaita), Ptr{GObject}, (Cstring, Cstring), _heading_maybe, _body_maybe) + ret2 = AdwAlertDialogLeaf(ret, false) ret2 end - function set_content(instance::AdwApplicationWindow, _content::Maybe(GtkWidget)) - _content_maybe = nothing_to_null(_content) - ret = ccall(("adw_application_window_set_content", libadwaita), Nothing, (Ptr{GObject}, Ptr{GObject}), instance, _content_maybe) + function add_response(instance::AdwAlertDialog, _id::Union{AbstractString, Symbol}, _label::Union{AbstractString, Symbol}) + ret = ccall(("adw_alert_dialog_add_response", libadwaita), Nothing, (Ptr{GObject}, Cstring, Cstring), instance, _id, _label) nothing end - function Avatar_new(_size::Integer, _text::Maybe(Union{AbstractString, Symbol}), _show_initials::Bool) - _text_maybe = nothing_to_null(_text) - ret = ccall(("adw_avatar_new", libadwaita), Ptr{GObject}, (Int32, Cstring, Cint), _size, _text_maybe, _show_initials) - ret2 = AdwAvatarLeaf(ret, false) + function choose(instance::AdwAlertDialog, _parent::Maybe(GtkWidget), _cancellable::Maybe(GCancellable), _callback::Maybe(Function)) + _parent_maybe = nothing_to_null(_parent) + _cancellable_maybe = nothing_to_null(_cancellable) + if _callback === nothing + _callback_cfunc = C_NULL + _callback_closure = C_NULL + else + _callback_cfunc = @cfunction(GAsyncReadyCallback, Nothing, (Ptr{GObject}, Ptr{GObject}, Ref{Function})) + _callback_closure = GLib.gc_ref(_callback) + end + ret = ccall(("adw_alert_dialog_choose", libadwaita), Nothing, (Ptr{GObject}, Ptr{GObject}, Ptr{GObject}, Ptr{Cvoid}, Ptr{Nothing}), instance, _parent_maybe, _cancellable_maybe, _callback_cfunc, _callback_closure) + nothing + end + function choose_finish(instance::AdwAlertDialog, _result::GAsyncResult) + ret = ccall(("adw_alert_dialog_choose_finish", libadwaita), Cstring, (Ptr{GObject}, Ptr{GObject}), instance, _result) + ret2 = string_or_nothing(ret, false) ret2 end - function draw_to_texture(instance::AdwAvatar, _scale_factor::Integer) - ret = ccall(("adw_avatar_draw_to_texture", libadwaita), Ptr{GObject}, (Ptr{GObject}, Int32), instance, _scale_factor) - ret2 = convert(GdkTexture, ret, true) + function get_body(instance::AdwAlertDialog) + ret = ccall(("adw_alert_dialog_get_body", libadwaita), Cstring, (Ptr{GObject},), instance) + ret2 = string_or_nothing(ret, false) ret2 end - function get_custom_image(instance::AdwAvatar) - ret = ccall(("adw_avatar_get_custom_image", libadwaita), Ptr{GObject}, (Ptr{GObject},), instance) - ret2 = GLib.find_leaf_type_if_not_null(ret, false) + function get_body_use_markup(instance::AdwAlertDialog) + ret = ccall(("adw_alert_dialog_get_body_use_markup", libadwaita), Cint, (Ptr{GObject},), instance) + ret2 = convert(Bool, ret) ret2 end - function get_icon_name(instance::AdwAvatar) - ret = ccall(("adw_avatar_get_icon_name", libadwaita), Cstring, (Ptr{GObject},), instance) + function get_close_response(instance::AdwAlertDialog) + ret = ccall(("adw_alert_dialog_get_close_response", libadwaita), Cstring, (Ptr{GObject},), instance) ret2 = string_or_nothing(ret, false) ret2 end - function get_show_initials(instance::AdwAvatar) - ret = ccall(("adw_avatar_get_show_initials", libadwaita), Cint, (Ptr{GObject},), instance) + function get_default_response(instance::AdwAlertDialog) + ret = ccall(("adw_alert_dialog_get_default_response", libadwaita), Cstring, (Ptr{GObject},), instance) + ret2 = string_or_nothing(ret, false) + ret2 + end + function get_extra_child(instance::AdwAlertDialog) + ret = ccall(("adw_alert_dialog_get_extra_child", libadwaita), Ptr{GObject}, (Ptr{GObject},), instance) + ret2 = convert_if_not_null(GtkWidget, ret, false) + ret2 + end + function get_heading(instance::AdwAlertDialog) + ret = ccall(("adw_alert_dialog_get_heading", libadwaita), Cstring, (Ptr{GObject},), instance) + ret2 = string_or_nothing(ret, false) + ret2 + end + function get_heading_use_markup(instance::AdwAlertDialog) + ret = ccall(("adw_alert_dialog_get_heading_use_markup", libadwaita), Cint, (Ptr{GObject},), instance) ret2 = convert(Bool, ret) ret2 end - function get_size(instance::AdwAvatar) - ret = ccall(("adw_avatar_get_size", libadwaita), Int32, (Ptr{GObject},), instance) - ret + function get_response_appearance(instance::AdwAlertDialog, _response::Union{AbstractString, Symbol}) + ret = ccall(("adw_alert_dialog_get_response_appearance", libadwaita), UInt32, (Ptr{GObject}, Cstring), instance, _response) + ret2 = ResponseAppearance(ret) + ret2 end - function get_text(instance::AdwAvatar) - ret = ccall(("adw_avatar_get_text", libadwaita), Cstring, (Ptr{GObject},), instance) + function get_response_enabled(instance::AdwAlertDialog, _response::Union{AbstractString, Symbol}) + ret = ccall(("adw_alert_dialog_get_response_enabled", libadwaita), Cint, (Ptr{GObject}, Cstring), instance, _response) + ret2 = convert(Bool, ret) + ret2 + end + function get_response_label(instance::AdwAlertDialog, _response::Union{AbstractString, Symbol}) + ret = ccall(("adw_alert_dialog_get_response_label", libadwaita), Cstring, (Ptr{GObject}, Cstring), instance, _response) ret2 = string_or_nothing(ret, false) ret2 end - function set_custom_image(instance::AdwAvatar, _custom_image::Maybe(GdkPaintable)) - _custom_image_maybe = nothing_to_null(_custom_image) - ret = ccall(("adw_avatar_set_custom_image", libadwaita), Nothing, (Ptr{GObject}, Ptr{GObject}), instance, _custom_image_maybe) - nothing + function has_response(instance::AdwAlertDialog, _response::Union{AbstractString, Symbol}) + ret = ccall(("adw_alert_dialog_has_response", libadwaita), Cint, (Ptr{GObject}, Cstring), instance, _response) + ret2 = convert(Bool, ret) + ret2 end - function set_icon_name(instance::AdwAvatar, _icon_name::Maybe(Union{AbstractString, Symbol})) - _icon_name_maybe = nothing_to_null(_icon_name) - ret = ccall(("adw_avatar_set_icon_name", libadwaita), Nothing, (Ptr{GObject}, Cstring), instance, _icon_name_maybe) + function remove_response(instance::AdwAlertDialog, _id::Union{AbstractString, Symbol}) + ret = ccall(("adw_alert_dialog_remove_response", libadwaita), Nothing, (Ptr{GObject}, Cstring), instance, _id) nothing end - function set_show_initials(instance::AdwAvatar, _show_initials::Bool) - ret = ccall(("adw_avatar_set_show_initials", libadwaita), Nothing, (Ptr{GObject}, Cint), instance, _show_initials) + function set_body(instance::AdwAlertDialog, _body::Union{AbstractString, Symbol}) + ret = ccall(("adw_alert_dialog_set_body", libadwaita), Nothing, (Ptr{GObject}, Cstring), instance, _body) nothing end - function set_size(instance::AdwAvatar, _size::Integer) - ret = ccall(("adw_avatar_set_size", libadwaita), Nothing, (Ptr{GObject}, Int32), instance, _size) + function set_body_use_markup(instance::AdwAlertDialog, _use_markup::Bool) + ret = ccall(("adw_alert_dialog_set_body_use_markup", libadwaita), Nothing, (Ptr{GObject}, Cint), instance, _use_markup) nothing end - function set_text(instance::AdwAvatar, _text::Maybe(Union{AbstractString, Symbol})) - _text_maybe = nothing_to_null(_text) - ret = ccall(("adw_avatar_set_text", libadwaita), Nothing, (Ptr{GObject}, Cstring), instance, _text_maybe) + function set_close_response(instance::AdwAlertDialog, _response::Union{AbstractString, Symbol}) + ret = ccall(("adw_alert_dialog_set_close_response", libadwaita), Nothing, (Ptr{GObject}, Cstring), instance, _response) nothing end - function Bin_new() - ret = ccall(("adw_bin_new", libadwaita), Ptr{GObject}, ()) - ret2 = AdwBinLeaf(ret, false) - ret2 - end - function get_child(instance::AdwBin) - ret = ccall(("adw_bin_get_child", libadwaita), Ptr{GObject}, (Ptr{GObject},), instance) - ret2 = convert_if_not_null(GtkWidget, ret, false) - ret2 + function set_default_response(instance::AdwAlertDialog, _response::Maybe(Union{AbstractString, Symbol})) + _response_maybe = nothing_to_null(_response) + ret = ccall(("adw_alert_dialog_set_default_response", libadwaita), Nothing, (Ptr{GObject}, Cstring), instance, _response_maybe) + nothing end - function set_child(instance::AdwBin, _child::Maybe(GtkWidget)) + function set_extra_child(instance::AdwAlertDialog, _child::Maybe(GtkWidget)) _child_maybe = nothing_to_null(_child) - ret = ccall(("adw_bin_set_child", libadwaita), Nothing, (Ptr{GObject}, Ptr{GObject}), instance, _child_maybe) + ret = ccall(("adw_alert_dialog_set_extra_child", libadwaita), Nothing, (Ptr{GObject}, Ptr{GObject}), instance, _child_maybe) nothing end - function ButtonContent_new() - ret = ccall(("adw_button_content_new", libadwaita), Ptr{GObject}, ()) - ret2 = AdwButtonContentLeaf(ret, false) - ret2 - end - function get_icon_name(instance::AdwButtonContent) - ret = ccall(("adw_button_content_get_icon_name", libadwaita), Cstring, (Ptr{GObject},), instance) - ret2 = string_or_nothing(ret, false) - ret2 - end - function get_label(instance::AdwButtonContent) - ret = ccall(("adw_button_content_get_label", libadwaita), Cstring, (Ptr{GObject},), instance) - ret2 = string_or_nothing(ret, false) - ret2 + function set_heading(instance::AdwAlertDialog, _heading::Maybe(Union{AbstractString, Symbol})) + _heading_maybe = nothing_to_null(_heading) + ret = ccall(("adw_alert_dialog_set_heading", libadwaita), Nothing, (Ptr{GObject}, Cstring), instance, _heading_maybe) + nothing end - function get_use_underline(instance::AdwButtonContent) - ret = ccall(("adw_button_content_get_use_underline", libadwaita), Cint, (Ptr{GObject},), instance) - ret2 = convert(Bool, ret) - ret2 + function set_heading_use_markup(instance::AdwAlertDialog, _use_markup::Bool) + ret = ccall(("adw_alert_dialog_set_heading_use_markup", libadwaita), Nothing, (Ptr{GObject}, Cint), instance, _use_markup) + nothing end - function set_icon_name(instance::AdwButtonContent, _icon_name::Union{AbstractString, Symbol}) - ret = ccall(("adw_button_content_set_icon_name", libadwaita), Nothing, (Ptr{GObject}, Cstring), instance, _icon_name) + function set_response_appearance(instance::AdwAlertDialog, _response::Union{AbstractString, Symbol}, _appearance) + ret = ccall(("adw_alert_dialog_set_response_appearance", libadwaita), Nothing, (Ptr{GObject}, Cstring, UInt32), instance, _response, _appearance) nothing end - function set_label(instance::AdwButtonContent, _label::Union{AbstractString, Symbol}) - ret = ccall(("adw_button_content_set_label", libadwaita), Nothing, (Ptr{GObject}, Cstring), instance, _label) + function set_response_enabled(instance::AdwAlertDialog, _response::Union{AbstractString, Symbol}, _enabled::Bool) + ret = ccall(("adw_alert_dialog_set_response_enabled", libadwaita), Nothing, (Ptr{GObject}, Cstring, Cint), instance, _response, _enabled) nothing end - function set_use_underline(instance::AdwButtonContent, _use_underline::Bool) - ret = ccall(("adw_button_content_set_use_underline", libadwaita), Nothing, (Ptr{GObject}, Cint), instance, _use_underline) + function set_response_label(instance::AdwAlertDialog, _response::Union{AbstractString, Symbol}, _label::Union{AbstractString, Symbol}) + ret = ccall(("adw_alert_dialog_set_response_label", libadwaita), Nothing, (Ptr{GObject}, Cstring, Cstring), instance, _response, _label) nothing end - function Carousel_new() - ret = ccall(("adw_carousel_new", libadwaita), Ptr{GObject}, ()) - ret2 = AdwCarouselLeaf(ret, false) - ret2 + function announce(instance::AdwAlertDialog, _message::Union{AbstractString, Symbol}, _priority) + announce(GtkAccessible(instance), _message, _priority) end - function append(instance::AdwCarousel, _child::GtkWidget) - ret = ccall(("adw_carousel_append", libadwaita), Nothing, (Ptr{GObject}, Ptr{GObject}), instance, _child) - nothing + function get_accessible_parent(instance::AdwAlertDialog) + get_accessible_parent(GtkAccessible(instance)) end - function get_allow_long_swipes(instance::AdwCarousel) - ret = ccall(("adw_carousel_get_allow_long_swipes", libadwaita), Cint, (Ptr{GObject},), instance) - ret2 = convert(Bool, ret) - ret2 + function get_accessible_role(instance::AdwAlertDialog) + get_accessible_role(GtkAccessible(instance)) end - function get_allow_mouse_drag(instance::AdwCarousel) - ret = ccall(("adw_carousel_get_allow_mouse_drag", libadwaita), Cint, (Ptr{GObject},), instance) - ret2 = convert(Bool, ret) - ret2 + function get_at_context(instance::AdwAlertDialog) + get_at_context(GtkAccessible(instance)) end - function get_allow_scroll_wheel(instance::AdwCarousel) - ret = ccall(("adw_carousel_get_allow_scroll_wheel", libadwaita), Cint, (Ptr{GObject},), instance) - ret2 = convert(Bool, ret) - ret2 + function get_bounds(instance::AdwAlertDialog) + get_bounds(GtkAccessible(instance)) end - function get_interactive(instance::AdwCarousel) - ret = ccall(("adw_carousel_get_interactive", libadwaita), Cint, (Ptr{GObject},), instance) - ret2 = convert(Bool, ret) - ret2 + function get_first_accessible_child(instance::AdwAlertDialog) + get_first_accessible_child(GtkAccessible(instance)) end - function get_n_pages(instance::AdwCarousel) - ret = ccall(("adw_carousel_get_n_pages", libadwaita), UInt32, (Ptr{GObject},), instance) - ret + function get_next_accessible_sibling(instance::AdwAlertDialog) + get_next_accessible_sibling(GtkAccessible(instance)) end - function get_nth_page(instance::AdwCarousel, _n::Integer) - ret = ccall(("adw_carousel_get_nth_page", libadwaita), Ptr{GObject}, (Ptr{GObject}, UInt32), instance, _n) - ret2 = convert(GtkWidget, ret, false) - ret2 + function get_platform_state(instance::AdwAlertDialog, _state) + get_platform_state(GtkAccessible(instance), _state) end - function get_position(instance::AdwCarousel) - ret = ccall(("adw_carousel_get_position", libadwaita), Float64, (Ptr{GObject},), instance) - ret + function reset_property(instance::AdwAlertDialog, _property) + reset_property(GtkAccessible(instance), _property) end - function get_reveal_duration(instance::AdwCarousel) - ret = ccall(("adw_carousel_get_reveal_duration", libadwaita), UInt32, (Ptr{GObject},), instance) - ret + function reset_relation(instance::AdwAlertDialog, _relation) + reset_relation(GtkAccessible(instance), _relation) end - function get_scroll_params(instance::AdwCarousel) - ret = ccall(("adw_carousel_get_scroll_params", libadwaita), Ptr{AdwSpringParams}, (Ptr{GObject},), instance) - ret2 = convert(AdwSpringParams, ret, true) - ret2 + function reset_state(instance::AdwAlertDialog, _state) + reset_state(GtkAccessible(instance), _state) end - function get_spacing(instance::AdwCarousel) - ret = ccall(("adw_carousel_get_spacing", libadwaita), UInt32, (Ptr{GObject},), instance) - ret + function set_accessible_parent(instance::AdwAlertDialog, _parent::Maybe(GtkAccessible), _next_sibling::Maybe(GtkAccessible)) + set_accessible_parent(GtkAccessible(instance), _parent, _next_sibling) end - function insert(instance::AdwCarousel, _child::GtkWidget, _position::Integer) - ret = ccall(("adw_carousel_insert", libadwaita), Nothing, (Ptr{GObject}, Ptr{GObject}, Int32), instance, _child, _position) - nothing + function update_next_accessible_sibling(instance::AdwAlertDialog, _new_sibling::Maybe(GtkAccessible)) + update_next_accessible_sibling(GtkAccessible(instance), _new_sibling) end - function prepend(instance::AdwCarousel, _child::GtkWidget) - ret = ccall(("adw_carousel_prepend", libadwaita), Nothing, (Ptr{GObject}, Ptr{GObject}), instance, _child) - nothing + function update_property(instance::AdwAlertDialog, _properties, _values) + update_property(GtkAccessible(instance), _properties, _values) end - function remove(instance::AdwCarousel, _child::GtkWidget) - ret = ccall(("adw_carousel_remove", libadwaita), Nothing, (Ptr{GObject}, Ptr{GObject}), instance, _child) - nothing + function update_relation(instance::AdwAlertDialog, _relations, _values) + update_relation(GtkAccessible(instance), _relations, _values) end - function reorder(instance::AdwCarousel, _child::GtkWidget, _position::Integer) - ret = ccall(("adw_carousel_reorder", libadwaita), Nothing, (Ptr{GObject}, Ptr{GObject}, Int32), instance, _child, _position) - nothing + function update_state(instance::AdwAlertDialog, _states, _values) + update_state(GtkAccessible(instance), _states, _values) end - function scroll_to(instance::AdwCarousel, _widget::GtkWidget, _animate::Bool) - ret = ccall(("adw_carousel_scroll_to", libadwaita), Nothing, (Ptr{GObject}, Ptr{GObject}, Cint), instance, _widget, _animate) - nothing + function get_buildable_id(instance::AdwAlertDialog) + get_buildable_id(GtkBuildable(instance)) end - function set_allow_long_swipes(instance::AdwCarousel, _allow_long_swipes::Bool) - ret = ccall(("adw_carousel_set_allow_long_swipes", libadwaita), Nothing, (Ptr{GObject}, Cint), instance, _allow_long_swipes) + function get_follow_enable_animations_setting(instance::AdwAnimation) + ret = ccall(("adw_animation_get_follow_enable_animations_setting", libadwaita), Cint, (Ptr{GObject},), instance) + ret2 = convert(Bool, ret) + ret2 + end + function get_state(instance::AdwAnimation) + ret = ccall(("adw_animation_get_state", libadwaita), UInt32, (Ptr{GObject},), instance) + ret2 = AnimationState(ret) + ret2 + end + function get_target(instance::AdwAnimation) + ret = ccall(("adw_animation_get_target", libadwaita), Ptr{GObject}, (Ptr{GObject},), instance) + ret2 = convert(AdwAnimationTarget, ret, false) + ret2 + end + function get_value(instance::AdwAnimation) + ret = ccall(("adw_animation_get_value", libadwaita), Float64, (Ptr{GObject},), instance) + ret + end + function get_widget(instance::AdwAnimation) + ret = ccall(("adw_animation_get_widget", libadwaita), Ptr{GObject}, (Ptr{GObject},), instance) + ret2 = convert(GtkWidget, ret, false) + ret2 + end + function pause(instance::AdwAnimation) + ret = ccall(("adw_animation_pause", libadwaita), Nothing, (Ptr{GObject},), instance) nothing end - function set_allow_mouse_drag(instance::AdwCarousel, _allow_mouse_drag::Bool) - ret = ccall(("adw_carousel_set_allow_mouse_drag", libadwaita), Nothing, (Ptr{GObject}, Cint), instance, _allow_mouse_drag) + function play(instance::AdwAnimation) + ret = ccall(("adw_animation_play", libadwaita), Nothing, (Ptr{GObject},), instance) nothing end - function set_allow_scroll_wheel(instance::AdwCarousel, _allow_scroll_wheel::Bool) - ret = ccall(("adw_carousel_set_allow_scroll_wheel", libadwaita), Nothing, (Ptr{GObject}, Cint), instance, _allow_scroll_wheel) + function reset(instance::AdwAnimation) + ret = ccall(("adw_animation_reset", libadwaita), Nothing, (Ptr{GObject},), instance) nothing end - function set_interactive(instance::AdwCarousel, _interactive::Bool) - ret = ccall(("adw_carousel_set_interactive", libadwaita), Nothing, (Ptr{GObject}, Cint), instance, _interactive) + function resume(instance::AdwAnimation) + ret = ccall(("adw_animation_resume", libadwaita), Nothing, (Ptr{GObject},), instance) nothing end - function set_reveal_duration(instance::AdwCarousel, _reveal_duration::Integer) - ret = ccall(("adw_carousel_set_reveal_duration", libadwaita), Nothing, (Ptr{GObject}, UInt32), instance, _reveal_duration) + function set_follow_enable_animations_setting(instance::AdwAnimation, _setting::Bool) + ret = ccall(("adw_animation_set_follow_enable_animations_setting", libadwaita), Nothing, (Ptr{GObject}, Cint), instance, _setting) nothing end - function set_scroll_params(instance::AdwCarousel, _params::AdwSpringParams) - ret = ccall(("adw_carousel_set_scroll_params", libadwaita), Nothing, (Ptr{GObject}, Ptr{AdwSpringParams}), instance, _params) + function set_target(instance::AdwAnimation, _target::AdwAnimationTarget) + ret = ccall(("adw_animation_set_target", libadwaita), Nothing, (Ptr{GObject}, Ptr{GObject}), instance, _target) nothing end - function set_spacing(instance::AdwCarousel, _spacing::Integer) - ret = ccall(("adw_carousel_set_spacing", libadwaita), Nothing, (Ptr{GObject}, UInt32), instance, _spacing) + function skip(instance::AdwAnimation) + ret = ccall(("adw_animation_skip", libadwaita), Nothing, (Ptr{GObject},), instance) nothing end - function CarouselIndicatorDots_new() - ret = ccall(("adw_carousel_indicator_dots_new", libadwaita), Ptr{GObject}, ()) - ret2 = AdwCarouselIndicatorDotsLeaf(ret, false) + function Application_new(_application_id::Maybe(Union{AbstractString, Symbol}), _flags) + _application_id_maybe = nothing_to_null(_application_id) + ret = ccall(("adw_application_new", libadwaita), Ptr{GObject}, (Cstring, UInt32), _application_id_maybe, _flags) + ret2 = AdwApplicationLeaf(ret, true) ret2 end - function get_carousel(instance::AdwCarouselIndicatorDots) - ret = ccall(("adw_carousel_indicator_dots_get_carousel", libadwaita), Ptr{GObject}, (Ptr{GObject},), instance) - ret2 = convert_if_not_null(AdwCarousel, ret, false) + function get_style_manager(instance::AdwApplication) + ret = ccall(("adw_application_get_style_manager", libadwaita), Ptr{GObject}, (Ptr{GObject},), instance) + ret2 = convert(AdwStyleManager, ret, false) ret2 end - function set_carousel(instance::AdwCarouselIndicatorDots, _carousel::Maybe(AdwCarousel)) - _carousel_maybe = nothing_to_null(_carousel) - ret = ccall(("adw_carousel_indicator_dots_set_carousel", libadwaita), Nothing, (Ptr{GObject}, Ptr{GObject}), instance, _carousel_maybe) - nothing + function action_added(instance::AdwApplication, _action_name::Union{AbstractString, Symbol}) + action_added(GActionGroup(instance), _action_name) end - function CarouselIndicatorLines_new() - ret = ccall(("adw_carousel_indicator_lines_new", libadwaita), Ptr{GObject}, ()) - ret2 = AdwCarouselIndicatorLinesLeaf(ret, false) - ret2 + function action_enabled_changed(instance::AdwApplication, _action_name::Union{AbstractString, Symbol}, _enabled::Bool) + action_enabled_changed(GActionGroup(instance), _action_name, _enabled) end - function get_carousel(instance::AdwCarouselIndicatorLines) - ret = ccall(("adw_carousel_indicator_lines_get_carousel", libadwaita), Ptr{GObject}, (Ptr{GObject},), instance) - ret2 = convert_if_not_null(AdwCarousel, ret, false) - ret2 + function action_removed(instance::AdwApplication, _action_name::Union{AbstractString, Symbol}) + action_removed(GActionGroup(instance), _action_name) end - function set_carousel(instance::AdwCarouselIndicatorLines, _carousel::Maybe(AdwCarousel)) - _carousel_maybe = nothing_to_null(_carousel) - ret = ccall(("adw_carousel_indicator_lines_set_carousel", libadwaita), Nothing, (Ptr{GObject}, Ptr{GObject}), instance, _carousel_maybe) - nothing + function action_state_changed(instance::AdwApplication, _action_name::Union{AbstractString, Symbol}, _state::GVariant) + action_state_changed(GActionGroup(instance), _action_name, _state) end - function Clamp_new() - ret = ccall(("adw_clamp_new", libadwaita), Ptr{GObject}, ()) - ret2 = AdwClampLeaf(ret, false) - ret2 + function activate_action(instance::AdwApplication, _action_name::Union{AbstractString, Symbol}, _parameter::Maybe(GVariant)) + activate_action(GActionGroup(instance), _action_name, _parameter) end - function get_child(instance::AdwClamp) - ret = ccall(("adw_clamp_get_child", libadwaita), Ptr{GObject}, (Ptr{GObject},), instance) - ret2 = convert_if_not_null(GtkWidget, ret, false) - ret2 + function change_action_state(instance::AdwApplication, _action_name::Union{AbstractString, Symbol}, _value::GVariant) + change_action_state(GActionGroup(instance), _action_name, _value) end - function get_maximum_size(instance::AdwClamp) - ret = ccall(("adw_clamp_get_maximum_size", libadwaita), Int32, (Ptr{GObject},), instance) - ret + function get_action_enabled(instance::AdwApplication, _action_name::Union{AbstractString, Symbol}) + get_action_enabled(GActionGroup(instance), _action_name) end - function get_tightening_threshold(instance::AdwClamp) - ret = ccall(("adw_clamp_get_tightening_threshold", libadwaita), Int32, (Ptr{GObject},), instance) - ret + function get_action_parameter_type(instance::AdwApplication, _action_name::Union{AbstractString, Symbol}) + get_action_parameter_type(GActionGroup(instance), _action_name) end - function set_child(instance::AdwClamp, _child::Maybe(GtkWidget)) - _child_maybe = nothing_to_null(_child) - ret = ccall(("adw_clamp_set_child", libadwaita), Nothing, (Ptr{GObject}, Ptr{GObject}), instance, _child_maybe) - nothing + function get_action_state(instance::AdwApplication, _action_name::Union{AbstractString, Symbol}) + get_action_state(GActionGroup(instance), _action_name) end - function set_maximum_size(instance::AdwClamp, _maximum_size::Integer) - ret = ccall(("adw_clamp_set_maximum_size", libadwaita), Nothing, (Ptr{GObject}, Int32), instance, _maximum_size) - nothing + function get_action_state_hint(instance::AdwApplication, _action_name::Union{AbstractString, Symbol}) + get_action_state_hint(GActionGroup(instance), _action_name) end - function set_tightening_threshold(instance::AdwClamp, _tightening_threshold::Integer) - ret = ccall(("adw_clamp_set_tightening_threshold", libadwaita), Nothing, (Ptr{GObject}, Int32), instance, _tightening_threshold) - nothing + function get_action_state_type(instance::AdwApplication, _action_name::Union{AbstractString, Symbol}) + get_action_state_type(GActionGroup(instance), _action_name) end - function ClampLayout_new() - ret = ccall(("adw_clamp_layout_new", libadwaita), Ptr{GObject}, ()) - ret2 = AdwClampLayoutLeaf(ret, true) - ret2 + function has_action(instance::AdwApplication, _action_name::Union{AbstractString, Symbol}) + has_action(GActionGroup(instance), _action_name) end - function get_maximum_size(instance::AdwClampLayout) - ret = ccall(("adw_clamp_layout_get_maximum_size", libadwaita), Int32, (Ptr{GObject},), instance) - ret + function list_actions(instance::AdwApplication) + list_actions(GActionGroup(instance)) end - function get_tightening_threshold(instance::AdwClampLayout) - ret = ccall(("adw_clamp_layout_get_tightening_threshold", libadwaita), Int32, (Ptr{GObject},), instance) - ret + function query_action(instance::AdwApplication, _action_name::Union{AbstractString, Symbol}) + query_action(GActionGroup(instance), _action_name) end - function set_maximum_size(instance::AdwClampLayout, _maximum_size::Integer) - ret = ccall(("adw_clamp_layout_set_maximum_size", libadwaita), Nothing, (Ptr{GObject}, Int32), instance, _maximum_size) - nothing + function add_action(instance::AdwApplication, _action::GAction) + add_action(GActionMap(instance), _action) end - function set_tightening_threshold(instance::AdwClampLayout, _tightening_threshold::Integer) - ret = ccall(("adw_clamp_layout_set_tightening_threshold", libadwaita), Nothing, (Ptr{GObject}, Int32), instance, _tightening_threshold) - nothing + function add_action_entries(instance::AdwApplication, _entries, _user_data::Maybe(Nothing)) + add_action_entries(GActionMap(instance), _entries, _user_data) end - function ClampScrollable_new() - ret = ccall(("adw_clamp_scrollable_new", libadwaita), Ptr{GObject}, ()) - ret2 = AdwClampScrollableLeaf(ret, false) + function lookup_action(instance::AdwApplication, _action_name::Union{AbstractString, Symbol}) + lookup_action(GActionMap(instance), _action_name) + end + function remove_action(instance::AdwApplication, _action_name::Union{AbstractString, Symbol}) + remove_action(GActionMap(instance), _action_name) + end + function remove_action_entries(instance::AdwApplication, _entries) + remove_action_entries(GActionMap(instance), _entries) + end + function ApplicationWindow_new(_app::GtkApplication) + ret = ccall(("adw_application_window_new", libadwaita), Ptr{GObject}, (Ptr{GObject},), _app) + ret2 = AdwApplicationWindowLeaf(ret, false) ret2 end - function get_child(instance::AdwClampScrollable) - ret = ccall(("adw_clamp_scrollable_get_child", libadwaita), Ptr{GObject}, (Ptr{GObject},), instance) + function get_content(instance::AdwApplicationWindow) + ret = ccall(("adw_application_window_get_content", libadwaita), Ptr{GObject}, (Ptr{GObject},), instance) ret2 = convert_if_not_null(GtkWidget, ret, false) ret2 end - function get_maximum_size(instance::AdwClampScrollable) - ret = ccall(("adw_clamp_scrollable_get_maximum_size", libadwaita), Int32, (Ptr{GObject},), instance) - ret + function get_dialogs(instance::AdwApplicationWindow) + ret = ccall(("adw_application_window_get_dialogs", libadwaita), Ptr{GObject}, (Ptr{GObject},), instance) + ret2 = begin + leaftype = GLib.find_leaf_type(ret) + convert(leaftype, ret, true) + end + ret2 end - function get_tightening_threshold(instance::AdwClampScrollable) - ret = ccall(("adw_clamp_scrollable_get_tightening_threshold", libadwaita), Int32, (Ptr{GObject},), instance) - ret + function get_visible_dialog(instance::AdwApplicationWindow) + ret = ccall(("adw_application_window_get_visible_dialog", libadwaita), Ptr{GObject}, (Ptr{GObject},), instance) + ret2 = convert_if_not_null(AdwDialog, ret, false) + ret2 end - function set_child(instance::AdwClampScrollable, _child::Maybe(GtkWidget)) - _child_maybe = nothing_to_null(_child) - ret = ccall(("adw_clamp_scrollable_set_child", libadwaita), Nothing, (Ptr{GObject}, Ptr{GObject}), instance, _child_maybe) + function set_content(instance::AdwApplicationWindow, _content::Maybe(GtkWidget)) + _content_maybe = nothing_to_null(_content) + ret = ccall(("adw_application_window_set_content", libadwaita), Nothing, (Ptr{GObject}, Ptr{GObject}), instance, _content_maybe) nothing end - function set_maximum_size(instance::AdwClampScrollable, _maximum_size::Integer) - ret = ccall(("adw_clamp_scrollable_set_maximum_size", libadwaita), Nothing, (Ptr{GObject}, Int32), instance, _maximum_size) - nothing + function action_added(instance::AdwApplicationWindow, _action_name::Union{AbstractString, Symbol}) + action_added(GActionGroup(instance), _action_name) end - function set_tightening_threshold(instance::AdwClampScrollable, _tightening_threshold::Integer) - ret = ccall(("adw_clamp_scrollable_set_tightening_threshold", libadwaita), Nothing, (Ptr{GObject}, Int32), instance, _tightening_threshold) - nothing + function action_enabled_changed(instance::AdwApplicationWindow, _action_name::Union{AbstractString, Symbol}, _enabled::Bool) + action_enabled_changed(GActionGroup(instance), _action_name, _enabled) end - function ComboRow_new() - ret = ccall(("adw_combo_row_new", libadwaita), Ptr{GObject}, ()) - ret2 = AdwComboRowLeaf(ret, false) - ret2 + function action_removed(instance::AdwApplicationWindow, _action_name::Union{AbstractString, Symbol}) + action_removed(GActionGroup(instance), _action_name) end - function get_factory(instance::AdwComboRow) - ret = ccall(("adw_combo_row_get_factory", libadwaita), Ptr{GObject}, (Ptr{GObject},), instance) - ret2 = convert_if_not_null(GtkListItemFactory, ret, false) + function action_state_changed(instance::AdwApplicationWindow, _action_name::Union{AbstractString, Symbol}, _state::GVariant) + action_state_changed(GActionGroup(instance), _action_name, _state) + end + function activate_action(instance::AdwApplicationWindow, _action_name::Union{AbstractString, Symbol}, _parameter::Maybe(GVariant)) + activate_action(GActionGroup(instance), _action_name, _parameter) + end + function change_action_state(instance::AdwApplicationWindow, _action_name::Union{AbstractString, Symbol}, _value::GVariant) + change_action_state(GActionGroup(instance), _action_name, _value) + end + function get_action_enabled(instance::AdwApplicationWindow, _action_name::Union{AbstractString, Symbol}) + get_action_enabled(GActionGroup(instance), _action_name) + end + function get_action_parameter_type(instance::AdwApplicationWindow, _action_name::Union{AbstractString, Symbol}) + get_action_parameter_type(GActionGroup(instance), _action_name) + end + function get_action_state(instance::AdwApplicationWindow, _action_name::Union{AbstractString, Symbol}) + get_action_state(GActionGroup(instance), _action_name) + end + function get_action_state_hint(instance::AdwApplicationWindow, _action_name::Union{AbstractString, Symbol}) + get_action_state_hint(GActionGroup(instance), _action_name) + end + function get_action_state_type(instance::AdwApplicationWindow, _action_name::Union{AbstractString, Symbol}) + get_action_state_type(GActionGroup(instance), _action_name) + end + function has_action(instance::AdwApplicationWindow, _action_name::Union{AbstractString, Symbol}) + has_action(GActionGroup(instance), _action_name) + end + function list_actions(instance::AdwApplicationWindow) + list_actions(GActionGroup(instance)) + end + function query_action(instance::AdwApplicationWindow, _action_name::Union{AbstractString, Symbol}) + query_action(GActionGroup(instance), _action_name) + end + function add_action(instance::AdwApplicationWindow, _action::GAction) + add_action(GActionMap(instance), _action) + end + function add_action_entries(instance::AdwApplicationWindow, _entries, _user_data::Maybe(Nothing)) + add_action_entries(GActionMap(instance), _entries, _user_data) + end + function lookup_action(instance::AdwApplicationWindow, _action_name::Union{AbstractString, Symbol}) + lookup_action(GActionMap(instance), _action_name) + end + function remove_action(instance::AdwApplicationWindow, _action_name::Union{AbstractString, Symbol}) + remove_action(GActionMap(instance), _action_name) + end + function remove_action_entries(instance::AdwApplicationWindow, _entries) + remove_action_entries(GActionMap(instance), _entries) + end + function announce(instance::AdwApplicationWindow, _message::Union{AbstractString, Symbol}, _priority) + announce(GtkAccessible(instance), _message, _priority) + end + function get_accessible_parent(instance::AdwApplicationWindow) + get_accessible_parent(GtkAccessible(instance)) + end + function get_accessible_role(instance::AdwApplicationWindow) + get_accessible_role(GtkAccessible(instance)) + end + function get_at_context(instance::AdwApplicationWindow) + get_at_context(GtkAccessible(instance)) + end + function get_bounds(instance::AdwApplicationWindow) + get_bounds(GtkAccessible(instance)) + end + function get_first_accessible_child(instance::AdwApplicationWindow) + get_first_accessible_child(GtkAccessible(instance)) + end + function get_next_accessible_sibling(instance::AdwApplicationWindow) + get_next_accessible_sibling(GtkAccessible(instance)) + end + function get_platform_state(instance::AdwApplicationWindow, _state) + get_platform_state(GtkAccessible(instance), _state) + end + function reset_property(instance::AdwApplicationWindow, _property) + reset_property(GtkAccessible(instance), _property) + end + function reset_relation(instance::AdwApplicationWindow, _relation) + reset_relation(GtkAccessible(instance), _relation) + end + function reset_state(instance::AdwApplicationWindow, _state) + reset_state(GtkAccessible(instance), _state) + end + function set_accessible_parent(instance::AdwApplicationWindow, _parent::Maybe(GtkAccessible), _next_sibling::Maybe(GtkAccessible)) + set_accessible_parent(GtkAccessible(instance), _parent, _next_sibling) + end + function update_next_accessible_sibling(instance::AdwApplicationWindow, _new_sibling::Maybe(GtkAccessible)) + update_next_accessible_sibling(GtkAccessible(instance), _new_sibling) + end + function update_property(instance::AdwApplicationWindow, _properties, _values) + update_property(GtkAccessible(instance), _properties, _values) + end + function update_relation(instance::AdwApplicationWindow, _relations, _values) + update_relation(GtkAccessible(instance), _relations, _values) + end + function update_state(instance::AdwApplicationWindow, _states, _values) + update_state(GtkAccessible(instance), _states, _values) + end + function get_buildable_id(instance::AdwApplicationWindow) + get_buildable_id(GtkBuildable(instance)) + end + function get_renderer(instance::AdwApplicationWindow) + get_renderer(GtkNative(instance)) + end + function get_surface(instance::AdwApplicationWindow) + get_surface(GtkNative(instance)) + end + function get_surface_transform(instance::AdwApplicationWindow) + get_surface_transform(GtkNative(instance)) + end + function realize(instance::AdwApplicationWindow) + realize(GtkNative(instance)) + end + function unrealize(instance::AdwApplicationWindow) + unrealize(GtkNative(instance)) + end + function get_display(instance::AdwApplicationWindow) + get_display(GtkRoot(instance)) + end + function get_focus(instance::AdwApplicationWindow) + get_focus(GtkRoot(instance)) + end + function set_focus(instance::AdwApplicationWindow, _focus::Maybe(GtkWidget)) + set_focus(GtkRoot(instance), _focus) + end + function Avatar_new(_size::Integer, _text::Maybe(Union{AbstractString, Symbol}), _show_initials::Bool) + _text_maybe = nothing_to_null(_text) + ret = ccall(("adw_avatar_new", libadwaita), Ptr{GObject}, (Int32, Cstring, Cint), _size, _text_maybe, _show_initials) + ret2 = AdwAvatarLeaf(ret, false) ret2 end - function get_list_factory(instance::AdwComboRow) - ret = ccall(("adw_combo_row_get_list_factory", libadwaita), Ptr{GObject}, (Ptr{GObject},), instance) - ret2 = convert_if_not_null(GtkListItemFactory, ret, false) + function draw_to_texture(instance::AdwAvatar, _scale_factor::Integer) + ret = ccall(("adw_avatar_draw_to_texture", libadwaita), Ptr{GObject}, (Ptr{GObject}, Int32), instance, _scale_factor) + ret2 = convert(GdkTexture, ret, true) ret2 end - function get_model(instance::AdwComboRow) - ret = ccall(("adw_combo_row_get_model", libadwaita), Ptr{GObject}, (Ptr{GObject},), instance) + function get_custom_image(instance::AdwAvatar) + ret = ccall(("adw_avatar_get_custom_image", libadwaita), Ptr{GObject}, (Ptr{GObject},), instance) ret2 = GLib.find_leaf_type_if_not_null(ret, false) ret2 end - function get_selected(instance::AdwComboRow) - ret = ccall(("adw_combo_row_get_selected", libadwaita), UInt32, (Ptr{GObject},), instance) - ret - end - function get_selected_item(instance::AdwComboRow) - ret = ccall(("adw_combo_row_get_selected_item", libadwaita), Ptr{GObject}, (Ptr{GObject},), instance) - ret2 = convert_if_not_null(GObject, ret, false) + function get_icon_name(instance::AdwAvatar) + ret = ccall(("adw_avatar_get_icon_name", libadwaita), Cstring, (Ptr{GObject},), instance) + ret2 = string_or_nothing(ret, false) ret2 end - function get_use_subtitle(instance::AdwComboRow) - ret = ccall(("adw_combo_row_get_use_subtitle", libadwaita), Cint, (Ptr{GObject},), instance) + function get_show_initials(instance::AdwAvatar) + ret = ccall(("adw_avatar_get_show_initials", libadwaita), Cint, (Ptr{GObject},), instance) ret2 = convert(Bool, ret) ret2 end - function set_factory(instance::AdwComboRow, _factory::Maybe(GtkListItemFactory)) - _factory_maybe = nothing_to_null(_factory) - ret = ccall(("adw_combo_row_set_factory", libadwaita), Nothing, (Ptr{GObject}, Ptr{GObject}), instance, _factory_maybe) + function get_size(instance::AdwAvatar) + ret = ccall(("adw_avatar_get_size", libadwaita), Int32, (Ptr{GObject},), instance) + ret + end + function get_text(instance::AdwAvatar) + ret = ccall(("adw_avatar_get_text", libadwaita), Cstring, (Ptr{GObject},), instance) + ret2 = string_or_nothing(ret, false) + ret2 + end + function set_custom_image(instance::AdwAvatar, _custom_image::Maybe(GdkPaintable)) + _custom_image_maybe = nothing_to_null(_custom_image) + ret = ccall(("adw_avatar_set_custom_image", libadwaita), Nothing, (Ptr{GObject}, Ptr{GObject}), instance, _custom_image_maybe) nothing end - function set_list_factory(instance::AdwComboRow, _factory::Maybe(GtkListItemFactory)) - _factory_maybe = nothing_to_null(_factory) - ret = ccall(("adw_combo_row_set_list_factory", libadwaita), Nothing, (Ptr{GObject}, Ptr{GObject}), instance, _factory_maybe) + function set_icon_name(instance::AdwAvatar, _icon_name::Maybe(Union{AbstractString, Symbol})) + _icon_name_maybe = nothing_to_null(_icon_name) + ret = ccall(("adw_avatar_set_icon_name", libadwaita), Nothing, (Ptr{GObject}, Cstring), instance, _icon_name_maybe) nothing end - function set_model(instance::AdwComboRow, _model::Maybe(GListModel)) - _model_maybe = nothing_to_null(_model) - ret = ccall(("adw_combo_row_set_model", libadwaita), Nothing, (Ptr{GObject}, Ptr{GObject}), instance, _model_maybe) + function set_show_initials(instance::AdwAvatar, _show_initials::Bool) + ret = ccall(("adw_avatar_set_show_initials", libadwaita), Nothing, (Ptr{GObject}, Cint), instance, _show_initials) nothing end - function set_selected(instance::AdwComboRow, _position::Integer) - ret = ccall(("adw_combo_row_set_selected", libadwaita), Nothing, (Ptr{GObject}, UInt32), instance, _position) + function set_size(instance::AdwAvatar, _size::Integer) + ret = ccall(("adw_avatar_set_size", libadwaita), Nothing, (Ptr{GObject}, Int32), instance, _size) nothing end - function set_use_subtitle(instance::AdwComboRow, _use_subtitle::Bool) - ret = ccall(("adw_combo_row_set_use_subtitle", libadwaita), Nothing, (Ptr{GObject}, Cint), instance, _use_subtitle) + function set_text(instance::AdwAvatar, _text::Maybe(Union{AbstractString, Symbol})) + _text_maybe = nothing_to_null(_text) + ret = ccall(("adw_avatar_set_text", libadwaita), Nothing, (Ptr{GObject}, Cstring), instance, _text_maybe) nothing end - function EntryRow_new() - ret = ccall(("adw_entry_row_new", libadwaita), Ptr{GObject}, ()) - ret2 = AdwEntryRowLeaf(ret, false) - ret2 + function announce(instance::AdwAvatar, _message::Union{AbstractString, Symbol}, _priority) + announce(GtkAccessible(instance), _message, _priority) end - function add_prefix(instance::AdwEntryRow, _widget::GtkWidget) - ret = ccall(("adw_entry_row_add_prefix", libadwaita), Nothing, (Ptr{GObject}, Ptr{GObject}), instance, _widget) - nothing + function get_accessible_parent(instance::AdwAvatar) + get_accessible_parent(GtkAccessible(instance)) end - function add_suffix(instance::AdwEntryRow, _widget::GtkWidget) - ret = ccall(("adw_entry_row_add_suffix", libadwaita), Nothing, (Ptr{GObject}, Ptr{GObject}), instance, _widget) - nothing + function get_accessible_role(instance::AdwAvatar) + get_accessible_role(GtkAccessible(instance)) end - function get_activates_default(instance::AdwEntryRow) - ret = ccall(("adw_entry_row_get_activates_default", libadwaita), Cint, (Ptr{GObject},), instance) - ret2 = convert(Bool, ret) + function get_at_context(instance::AdwAvatar) + get_at_context(GtkAccessible(instance)) + end + function get_bounds(instance::AdwAvatar) + get_bounds(GtkAccessible(instance)) + end + function get_first_accessible_child(instance::AdwAvatar) + get_first_accessible_child(GtkAccessible(instance)) + end + function get_next_accessible_sibling(instance::AdwAvatar) + get_next_accessible_sibling(GtkAccessible(instance)) + end + function get_platform_state(instance::AdwAvatar, _state) + get_platform_state(GtkAccessible(instance), _state) + end + function reset_property(instance::AdwAvatar, _property) + reset_property(GtkAccessible(instance), _property) + end + function reset_relation(instance::AdwAvatar, _relation) + reset_relation(GtkAccessible(instance), _relation) + end + function reset_state(instance::AdwAvatar, _state) + reset_state(GtkAccessible(instance), _state) + end + function set_accessible_parent(instance::AdwAvatar, _parent::Maybe(GtkAccessible), _next_sibling::Maybe(GtkAccessible)) + set_accessible_parent(GtkAccessible(instance), _parent, _next_sibling) + end + function update_next_accessible_sibling(instance::AdwAvatar, _new_sibling::Maybe(GtkAccessible)) + update_next_accessible_sibling(GtkAccessible(instance), _new_sibling) + end + function update_property(instance::AdwAvatar, _properties, _values) + update_property(GtkAccessible(instance), _properties, _values) + end + function update_relation(instance::AdwAvatar, _relations, _values) + update_relation(GtkAccessible(instance), _relations, _values) + end + function update_state(instance::AdwAvatar, _states, _values) + update_state(GtkAccessible(instance), _states, _values) + end + function get_buildable_id(instance::AdwAvatar) + get_buildable_id(GtkBuildable(instance)) + end + function Banner_new(_title::Union{AbstractString, Symbol}) + ret = ccall(("adw_banner_new", libadwaita), Ptr{GObject}, (Cstring,), _title) + ret2 = AdwBannerLeaf(ret, false) ret2 end - function get_attributes(instance::AdwEntryRow) - ret = ccall(("adw_entry_row_get_attributes", libadwaita), Ptr{PangoAttrList}, (Ptr{GObject},), instance) - ret2 = convert_if_not_null(PangoAttrList, ret, true) + function get_button_label(instance::AdwBanner) + ret = ccall(("adw_banner_get_button_label", libadwaita), Cstring, (Ptr{GObject},), instance) + ret2 = string_or_nothing(ret, false) ret2 end - function get_enable_emoji_completion(instance::AdwEntryRow) - ret = ccall(("adw_entry_row_get_enable_emoji_completion", libadwaita), Cint, (Ptr{GObject},), instance) + function get_revealed(instance::AdwBanner) + ret = ccall(("adw_banner_get_revealed", libadwaita), Cint, (Ptr{GObject},), instance) ret2 = convert(Bool, ret) ret2 end - function get_input_hints(instance::AdwEntryRow) - ret = ccall(("adw_entry_row_get_input_hints", libadwaita), UInt32, (Ptr{GObject},), instance) - ret2 = InputHints(ret) + function get_title(instance::AdwBanner) + ret = ccall(("adw_banner_get_title", libadwaita), Cstring, (Ptr{GObject},), instance) + ret2 = string_or_nothing(ret, false) ret2 end - function get_input_purpose(instance::AdwEntryRow) - ret = ccall(("adw_entry_row_get_input_purpose", libadwaita), UInt32, (Ptr{GObject},), instance) - ret2 = InputPurpose(ret) + function get_use_markup(instance::AdwBanner) + ret = ccall(("adw_banner_get_use_markup", libadwaita), Cint, (Ptr{GObject},), instance) + ret2 = convert(Bool, ret) ret2 end - function get_show_apply_button(instance::AdwEntryRow) - ret = ccall(("adw_entry_row_get_show_apply_button", libadwaita), Cint, (Ptr{GObject},), instance) - ret2 = convert(Bool, ret) + function set_button_label(instance::AdwBanner, _label::Maybe(Union{AbstractString, Symbol})) + _label_maybe = nothing_to_null(_label) + ret = ccall(("adw_banner_set_button_label", libadwaita), Nothing, (Ptr{GObject}, Cstring), instance, _label_maybe) + nothing + end + function set_revealed(instance::AdwBanner, _revealed::Bool) + ret = ccall(("adw_banner_set_revealed", libadwaita), Nothing, (Ptr{GObject}, Cint), instance, _revealed) + nothing + end + function set_title(instance::AdwBanner, _title::Union{AbstractString, Symbol}) + ret = ccall(("adw_banner_set_title", libadwaita), Nothing, (Ptr{GObject}, Cstring), instance, _title) + nothing + end + function set_use_markup(instance::AdwBanner, _use_markup::Bool) + ret = ccall(("adw_banner_set_use_markup", libadwaita), Nothing, (Ptr{GObject}, Cint), instance, _use_markup) + nothing + end + function announce(instance::AdwBanner, _message::Union{AbstractString, Symbol}, _priority) + announce(GtkAccessible(instance), _message, _priority) + end + function get_accessible_parent(instance::AdwBanner) + get_accessible_parent(GtkAccessible(instance)) + end + function get_accessible_role(instance::AdwBanner) + get_accessible_role(GtkAccessible(instance)) + end + function get_at_context(instance::AdwBanner) + get_at_context(GtkAccessible(instance)) + end + function get_bounds(instance::AdwBanner) + get_bounds(GtkAccessible(instance)) + end + function get_first_accessible_child(instance::AdwBanner) + get_first_accessible_child(GtkAccessible(instance)) + end + function get_next_accessible_sibling(instance::AdwBanner) + get_next_accessible_sibling(GtkAccessible(instance)) + end + function get_platform_state(instance::AdwBanner, _state) + get_platform_state(GtkAccessible(instance), _state) + end + function reset_property(instance::AdwBanner, _property) + reset_property(GtkAccessible(instance), _property) + end + function reset_relation(instance::AdwBanner, _relation) + reset_relation(GtkAccessible(instance), _relation) + end + function reset_state(instance::AdwBanner, _state) + reset_state(GtkAccessible(instance), _state) + end + function set_accessible_parent(instance::AdwBanner, _parent::Maybe(GtkAccessible), _next_sibling::Maybe(GtkAccessible)) + set_accessible_parent(GtkAccessible(instance), _parent, _next_sibling) + end + function update_next_accessible_sibling(instance::AdwBanner, _new_sibling::Maybe(GtkAccessible)) + update_next_accessible_sibling(GtkAccessible(instance), _new_sibling) + end + function update_property(instance::AdwBanner, _properties, _values) + update_property(GtkAccessible(instance), _properties, _values) + end + function update_relation(instance::AdwBanner, _relations, _values) + update_relation(GtkAccessible(instance), _relations, _values) + end + function update_state(instance::AdwBanner, _states, _values) + update_state(GtkAccessible(instance), _states, _values) + end + function get_action_name(instance::AdwBanner) + get_action_name(GtkActionable(instance)) + end + function get_action_target_value(instance::AdwBanner) + get_action_target_value(GtkActionable(instance)) + end + function set_action_name(instance::AdwBanner, _action_name::Maybe(Union{AbstractString, Symbol})) + set_action_name(GtkActionable(instance), _action_name) + end + function set_action_target_value(instance::AdwBanner, _target_value::Maybe(GVariant)) + set_action_target_value(GtkActionable(instance), _target_value) + end + function set_detailed_action_name(instance::AdwBanner, _detailed_action_name::Union{AbstractString, Symbol}) + set_detailed_action_name(GtkActionable(instance), _detailed_action_name) + end + function get_buildable_id(instance::AdwBanner) + get_buildable_id(GtkBuildable(instance)) + end + function Bin_new() + ret = ccall(("adw_bin_new", libadwaita), Ptr{GObject}, ()) + ret2 = AdwBinLeaf(ret, false) ret2 end - function remove(instance::AdwEntryRow, _widget::GtkWidget) - ret = ccall(("adw_entry_row_remove", libadwaita), Nothing, (Ptr{GObject}, Ptr{GObject}), instance, _widget) + function get_child(instance::AdwBin) + ret = ccall(("adw_bin_get_child", libadwaita), Ptr{GObject}, (Ptr{GObject},), instance) + ret2 = convert_if_not_null(GtkWidget, ret, false) + ret2 + end + function set_child(instance::AdwBin, _child::Maybe(GtkWidget)) + _child_maybe = nothing_to_null(_child) + ret = ccall(("adw_bin_set_child", libadwaita), Nothing, (Ptr{GObject}, Ptr{GObject}), instance, _child_maybe) nothing end - function set_activates_default(instance::AdwEntryRow, _activates::Bool) - ret = ccall(("adw_entry_row_set_activates_default", libadwaita), Nothing, (Ptr{GObject}, Cint), instance, _activates) - nothing + function announce(instance::AdwBin, _message::Union{AbstractString, Symbol}, _priority) + announce(GtkAccessible(instance), _message, _priority) + end + function get_accessible_parent(instance::AdwBin) + get_accessible_parent(GtkAccessible(instance)) + end + function get_accessible_role(instance::AdwBin) + get_accessible_role(GtkAccessible(instance)) + end + function get_at_context(instance::AdwBin) + get_at_context(GtkAccessible(instance)) + end + function get_bounds(instance::AdwBin) + get_bounds(GtkAccessible(instance)) + end + function get_first_accessible_child(instance::AdwBin) + get_first_accessible_child(GtkAccessible(instance)) + end + function get_next_accessible_sibling(instance::AdwBin) + get_next_accessible_sibling(GtkAccessible(instance)) + end + function get_platform_state(instance::AdwBin, _state) + get_platform_state(GtkAccessible(instance), _state) + end + function reset_property(instance::AdwBin, _property) + reset_property(GtkAccessible(instance), _property) + end + function reset_relation(instance::AdwBin, _relation) + reset_relation(GtkAccessible(instance), _relation) + end + function reset_state(instance::AdwBin, _state) + reset_state(GtkAccessible(instance), _state) + end + function set_accessible_parent(instance::AdwBin, _parent::Maybe(GtkAccessible), _next_sibling::Maybe(GtkAccessible)) + set_accessible_parent(GtkAccessible(instance), _parent, _next_sibling) + end + function update_next_accessible_sibling(instance::AdwBin, _new_sibling::Maybe(GtkAccessible)) + update_next_accessible_sibling(GtkAccessible(instance), _new_sibling) + end + function update_property(instance::AdwBin, _properties, _values) + update_property(GtkAccessible(instance), _properties, _values) + end + function update_relation(instance::AdwBin, _relations, _values) + update_relation(GtkAccessible(instance), _relations, _values) + end + function update_state(instance::AdwBin, _states, _values) + update_state(GtkAccessible(instance), _states, _values) + end + function get_buildable_id(instance::AdwBin) + get_buildable_id(GtkBuildable(instance)) + end + function BreakpointBin_new() + ret = ccall(("adw_breakpoint_bin_new", libadwaita), Ptr{GObject}, ()) + ret2 = AdwBreakpointBinLeaf(ret, false) + ret2 + end + function get_child(instance::AdwBreakpointBin) + ret = ccall(("adw_breakpoint_bin_get_child", libadwaita), Ptr{GObject}, (Ptr{GObject},), instance) + ret2 = convert_if_not_null(GtkWidget, ret, false) + ret2 + end + function remove_breakpoint(instance::AdwBreakpointBin, _breakpoint::AdwBreakpoint) + ret = ccall(("adw_breakpoint_bin_remove_breakpoint", libadwaita), Nothing, (Ptr{GObject}, Ptr{GObject}), instance, _breakpoint) + nothing + end + function set_child(instance::AdwBreakpointBin, _child::Maybe(GtkWidget)) + _child_maybe = nothing_to_null(_child) + ret = ccall(("adw_breakpoint_bin_set_child", libadwaita), Nothing, (Ptr{GObject}, Ptr{GObject}), instance, _child_maybe) + nothing + end + function announce(instance::AdwBreakpointBin, _message::Union{AbstractString, Symbol}, _priority) + announce(GtkAccessible(instance), _message, _priority) + end + function get_accessible_parent(instance::AdwBreakpointBin) + get_accessible_parent(GtkAccessible(instance)) + end + function get_accessible_role(instance::AdwBreakpointBin) + get_accessible_role(GtkAccessible(instance)) + end + function get_at_context(instance::AdwBreakpointBin) + get_at_context(GtkAccessible(instance)) + end + function get_bounds(instance::AdwBreakpointBin) + get_bounds(GtkAccessible(instance)) + end + function get_first_accessible_child(instance::AdwBreakpointBin) + get_first_accessible_child(GtkAccessible(instance)) + end + function get_next_accessible_sibling(instance::AdwBreakpointBin) + get_next_accessible_sibling(GtkAccessible(instance)) + end + function get_platform_state(instance::AdwBreakpointBin, _state) + get_platform_state(GtkAccessible(instance), _state) + end + function reset_property(instance::AdwBreakpointBin, _property) + reset_property(GtkAccessible(instance), _property) + end + function reset_relation(instance::AdwBreakpointBin, _relation) + reset_relation(GtkAccessible(instance), _relation) + end + function reset_state(instance::AdwBreakpointBin, _state) + reset_state(GtkAccessible(instance), _state) + end + function set_accessible_parent(instance::AdwBreakpointBin, _parent::Maybe(GtkAccessible), _next_sibling::Maybe(GtkAccessible)) + set_accessible_parent(GtkAccessible(instance), _parent, _next_sibling) + end + function update_next_accessible_sibling(instance::AdwBreakpointBin, _new_sibling::Maybe(GtkAccessible)) + update_next_accessible_sibling(GtkAccessible(instance), _new_sibling) + end + function update_property(instance::AdwBreakpointBin, _properties, _values) + update_property(GtkAccessible(instance), _properties, _values) + end + function update_relation(instance::AdwBreakpointBin, _relations, _values) + update_relation(GtkAccessible(instance), _relations, _values) + end + function update_state(instance::AdwBreakpointBin, _states, _values) + update_state(GtkAccessible(instance), _states, _values) + end + function get_buildable_id(instance::AdwBreakpointBin) + get_buildable_id(GtkBuildable(instance)) + end + function ButtonContent_new() + ret = ccall(("adw_button_content_new", libadwaita), Ptr{GObject}, ()) + ret2 = AdwButtonContentLeaf(ret, false) + ret2 + end + function get_can_shrink(instance::AdwButtonContent) + ret = ccall(("adw_button_content_get_can_shrink", libadwaita), Cint, (Ptr{GObject},), instance) + ret2 = convert(Bool, ret) + ret2 + end + function get_icon_name(instance::AdwButtonContent) + ret = ccall(("adw_button_content_get_icon_name", libadwaita), Cstring, (Ptr{GObject},), instance) + ret2 = string_or_nothing(ret, false) + ret2 + end + function get_label(instance::AdwButtonContent) + ret = ccall(("adw_button_content_get_label", libadwaita), Cstring, (Ptr{GObject},), instance) + ret2 = string_or_nothing(ret, false) + ret2 + end + function get_use_underline(instance::AdwButtonContent) + ret = ccall(("adw_button_content_get_use_underline", libadwaita), Cint, (Ptr{GObject},), instance) + ret2 = convert(Bool, ret) + ret2 + end + function set_can_shrink(instance::AdwButtonContent, _can_shrink::Bool) + ret = ccall(("adw_button_content_set_can_shrink", libadwaita), Nothing, (Ptr{GObject}, Cint), instance, _can_shrink) + nothing + end + function set_icon_name(instance::AdwButtonContent, _icon_name::Union{AbstractString, Symbol}) + ret = ccall(("adw_button_content_set_icon_name", libadwaita), Nothing, (Ptr{GObject}, Cstring), instance, _icon_name) + nothing + end + function set_label(instance::AdwButtonContent, _label::Union{AbstractString, Symbol}) + ret = ccall(("adw_button_content_set_label", libadwaita), Nothing, (Ptr{GObject}, Cstring), instance, _label) + nothing + end + function set_use_underline(instance::AdwButtonContent, _use_underline::Bool) + ret = ccall(("adw_button_content_set_use_underline", libadwaita), Nothing, (Ptr{GObject}, Cint), instance, _use_underline) + nothing + end + function announce(instance::AdwButtonContent, _message::Union{AbstractString, Symbol}, _priority) + announce(GtkAccessible(instance), _message, _priority) + end + function get_accessible_parent(instance::AdwButtonContent) + get_accessible_parent(GtkAccessible(instance)) + end + function get_accessible_role(instance::AdwButtonContent) + get_accessible_role(GtkAccessible(instance)) + end + function get_at_context(instance::AdwButtonContent) + get_at_context(GtkAccessible(instance)) + end + function get_bounds(instance::AdwButtonContent) + get_bounds(GtkAccessible(instance)) + end + function get_first_accessible_child(instance::AdwButtonContent) + get_first_accessible_child(GtkAccessible(instance)) + end + function get_next_accessible_sibling(instance::AdwButtonContent) + get_next_accessible_sibling(GtkAccessible(instance)) + end + function get_platform_state(instance::AdwButtonContent, _state) + get_platform_state(GtkAccessible(instance), _state) + end + function reset_property(instance::AdwButtonContent, _property) + reset_property(GtkAccessible(instance), _property) + end + function reset_relation(instance::AdwButtonContent, _relation) + reset_relation(GtkAccessible(instance), _relation) + end + function reset_state(instance::AdwButtonContent, _state) + reset_state(GtkAccessible(instance), _state) + end + function set_accessible_parent(instance::AdwButtonContent, _parent::Maybe(GtkAccessible), _next_sibling::Maybe(GtkAccessible)) + set_accessible_parent(GtkAccessible(instance), _parent, _next_sibling) + end + function update_next_accessible_sibling(instance::AdwButtonContent, _new_sibling::Maybe(GtkAccessible)) + update_next_accessible_sibling(GtkAccessible(instance), _new_sibling) + end + function update_property(instance::AdwButtonContent, _properties, _values) + update_property(GtkAccessible(instance), _properties, _values) + end + function update_relation(instance::AdwButtonContent, _relations, _values) + update_relation(GtkAccessible(instance), _relations, _values) + end + function update_state(instance::AdwButtonContent, _states, _values) + update_state(GtkAccessible(instance), _states, _values) + end + function get_buildable_id(instance::AdwButtonContent) + get_buildable_id(GtkBuildable(instance)) + end + function Carousel_new() + ret = ccall(("adw_carousel_new", libadwaita), Ptr{GObject}, ()) + ret2 = AdwCarouselLeaf(ret, false) + ret2 + end + function append(instance::AdwCarousel, _child::GtkWidget) + ret = ccall(("adw_carousel_append", libadwaita), Nothing, (Ptr{GObject}, Ptr{GObject}), instance, _child) + nothing + end + function get_allow_long_swipes(instance::AdwCarousel) + ret = ccall(("adw_carousel_get_allow_long_swipes", libadwaita), Cint, (Ptr{GObject},), instance) + ret2 = convert(Bool, ret) + ret2 + end + function get_allow_mouse_drag(instance::AdwCarousel) + ret = ccall(("adw_carousel_get_allow_mouse_drag", libadwaita), Cint, (Ptr{GObject},), instance) + ret2 = convert(Bool, ret) + ret2 + end + function get_allow_scroll_wheel(instance::AdwCarousel) + ret = ccall(("adw_carousel_get_allow_scroll_wheel", libadwaita), Cint, (Ptr{GObject},), instance) + ret2 = convert(Bool, ret) + ret2 + end + function get_interactive(instance::AdwCarousel) + ret = ccall(("adw_carousel_get_interactive", libadwaita), Cint, (Ptr{GObject},), instance) + ret2 = convert(Bool, ret) + ret2 + end + function get_n_pages(instance::AdwCarousel) + ret = ccall(("adw_carousel_get_n_pages", libadwaita), UInt32, (Ptr{GObject},), instance) + ret + end + function get_nth_page(instance::AdwCarousel, _n::Integer) + ret = ccall(("adw_carousel_get_nth_page", libadwaita), Ptr{GObject}, (Ptr{GObject}, UInt32), instance, _n) + ret2 = convert(GtkWidget, ret, false) + ret2 + end + function get_position(instance::AdwCarousel) + ret = ccall(("adw_carousel_get_position", libadwaita), Float64, (Ptr{GObject},), instance) + ret + end + function get_reveal_duration(instance::AdwCarousel) + ret = ccall(("adw_carousel_get_reveal_duration", libadwaita), UInt32, (Ptr{GObject},), instance) + ret + end + function get_scroll_params(instance::AdwCarousel) + ret = ccall(("adw_carousel_get_scroll_params", libadwaita), Ptr{AdwSpringParams}, (Ptr{GObject},), instance) + ret2 = convert(AdwSpringParams, ret, true) + ret2 + end + function get_spacing(instance::AdwCarousel) + ret = ccall(("adw_carousel_get_spacing", libadwaita), UInt32, (Ptr{GObject},), instance) + ret + end + function insert(instance::AdwCarousel, _child::GtkWidget, _position::Integer) + ret = ccall(("adw_carousel_insert", libadwaita), Nothing, (Ptr{GObject}, Ptr{GObject}, Int32), instance, _child, _position) + nothing + end + function prepend(instance::AdwCarousel, _child::GtkWidget) + ret = ccall(("adw_carousel_prepend", libadwaita), Nothing, (Ptr{GObject}, Ptr{GObject}), instance, _child) + nothing + end + function remove(instance::AdwCarousel, _child::GtkWidget) + ret = ccall(("adw_carousel_remove", libadwaita), Nothing, (Ptr{GObject}, Ptr{GObject}), instance, _child) + nothing + end + function reorder(instance::AdwCarousel, _child::GtkWidget, _position::Integer) + ret = ccall(("adw_carousel_reorder", libadwaita), Nothing, (Ptr{GObject}, Ptr{GObject}, Int32), instance, _child, _position) + nothing + end + function scroll_to(instance::AdwCarousel, _widget::GtkWidget, _animate::Bool) + ret = ccall(("adw_carousel_scroll_to", libadwaita), Nothing, (Ptr{GObject}, Ptr{GObject}, Cint), instance, _widget, _animate) + nothing + end + function set_allow_long_swipes(instance::AdwCarousel, _allow_long_swipes::Bool) + ret = ccall(("adw_carousel_set_allow_long_swipes", libadwaita), Nothing, (Ptr{GObject}, Cint), instance, _allow_long_swipes) + nothing + end + function set_allow_mouse_drag(instance::AdwCarousel, _allow_mouse_drag::Bool) + ret = ccall(("adw_carousel_set_allow_mouse_drag", libadwaita), Nothing, (Ptr{GObject}, Cint), instance, _allow_mouse_drag) + nothing + end + function set_allow_scroll_wheel(instance::AdwCarousel, _allow_scroll_wheel::Bool) + ret = ccall(("adw_carousel_set_allow_scroll_wheel", libadwaita), Nothing, (Ptr{GObject}, Cint), instance, _allow_scroll_wheel) + nothing + end + function set_interactive(instance::AdwCarousel, _interactive::Bool) + ret = ccall(("adw_carousel_set_interactive", libadwaita), Nothing, (Ptr{GObject}, Cint), instance, _interactive) + nothing + end + function set_reveal_duration(instance::AdwCarousel, _reveal_duration::Integer) + ret = ccall(("adw_carousel_set_reveal_duration", libadwaita), Nothing, (Ptr{GObject}, UInt32), instance, _reveal_duration) + nothing + end + function set_scroll_params(instance::AdwCarousel, _params::AdwSpringParams) + ret = ccall(("adw_carousel_set_scroll_params", libadwaita), Nothing, (Ptr{GObject}, Ptr{AdwSpringParams}), instance, _params) + nothing + end + function set_spacing(instance::AdwCarousel, _spacing::Integer) + ret = ccall(("adw_carousel_set_spacing", libadwaita), Nothing, (Ptr{GObject}, UInt32), instance, _spacing) + nothing + end + function get_cancel_progress(instance::AdwCarousel) + get_cancel_progress(AdwSwipeable(instance)) + end + function get_distance(instance::AdwCarousel) + get_distance(AdwSwipeable(instance)) + end + function get_progress(instance::AdwCarousel) + get_progress(AdwSwipeable(instance)) + end + function get_snap_points(instance::AdwCarousel) + get_snap_points(AdwSwipeable(instance)) + end + function get_swipe_area(instance::AdwCarousel, _navigation_direction, _is_drag::Bool) + get_swipe_area(AdwSwipeable(instance), _navigation_direction, _is_drag) + end + function announce(instance::AdwCarousel, _message::Union{AbstractString, Symbol}, _priority) + announce(GtkAccessible(instance), _message, _priority) + end + function get_accessible_parent(instance::AdwCarousel) + get_accessible_parent(GtkAccessible(instance)) + end + function get_accessible_role(instance::AdwCarousel) + get_accessible_role(GtkAccessible(instance)) + end + function get_at_context(instance::AdwCarousel) + get_at_context(GtkAccessible(instance)) + end + function get_bounds(instance::AdwCarousel) + get_bounds(GtkAccessible(instance)) + end + function get_first_accessible_child(instance::AdwCarousel) + get_first_accessible_child(GtkAccessible(instance)) + end + function get_next_accessible_sibling(instance::AdwCarousel) + get_next_accessible_sibling(GtkAccessible(instance)) + end + function get_platform_state(instance::AdwCarousel, _state) + get_platform_state(GtkAccessible(instance), _state) + end + function reset_property(instance::AdwCarousel, _property) + reset_property(GtkAccessible(instance), _property) + end + function reset_relation(instance::AdwCarousel, _relation) + reset_relation(GtkAccessible(instance), _relation) + end + function reset_state(instance::AdwCarousel, _state) + reset_state(GtkAccessible(instance), _state) + end + function set_accessible_parent(instance::AdwCarousel, _parent::Maybe(GtkAccessible), _next_sibling::Maybe(GtkAccessible)) + set_accessible_parent(GtkAccessible(instance), _parent, _next_sibling) + end + function update_next_accessible_sibling(instance::AdwCarousel, _new_sibling::Maybe(GtkAccessible)) + update_next_accessible_sibling(GtkAccessible(instance), _new_sibling) + end + function update_property(instance::AdwCarousel, _properties, _values) + update_property(GtkAccessible(instance), _properties, _values) + end + function update_relation(instance::AdwCarousel, _relations, _values) + update_relation(GtkAccessible(instance), _relations, _values) + end + function update_state(instance::AdwCarousel, _states, _values) + update_state(GtkAccessible(instance), _states, _values) + end + function get_buildable_id(instance::AdwCarousel) + get_buildable_id(GtkBuildable(instance)) + end + function get_orientation(instance::AdwCarousel) + get_orientation(GtkOrientable(instance)) + end + function set_orientation(instance::AdwCarousel, _orientation) + set_orientation(GtkOrientable(instance), _orientation) + end + function CarouselIndicatorDots_new() + ret = ccall(("adw_carousel_indicator_dots_new", libadwaita), Ptr{GObject}, ()) + ret2 = AdwCarouselIndicatorDotsLeaf(ret, false) + ret2 + end + function get_carousel(instance::AdwCarouselIndicatorDots) + ret = ccall(("adw_carousel_indicator_dots_get_carousel", libadwaita), Ptr{GObject}, (Ptr{GObject},), instance) + ret2 = convert_if_not_null(AdwCarousel, ret, false) + ret2 + end + function set_carousel(instance::AdwCarouselIndicatorDots, _carousel::Maybe(AdwCarousel)) + _carousel_maybe = nothing_to_null(_carousel) + ret = ccall(("adw_carousel_indicator_dots_set_carousel", libadwaita), Nothing, (Ptr{GObject}, Ptr{GObject}), instance, _carousel_maybe) + nothing + end + function announce(instance::AdwCarouselIndicatorDots, _message::Union{AbstractString, Symbol}, _priority) + announce(GtkAccessible(instance), _message, _priority) + end + function get_accessible_parent(instance::AdwCarouselIndicatorDots) + get_accessible_parent(GtkAccessible(instance)) + end + function get_accessible_role(instance::AdwCarouselIndicatorDots) + get_accessible_role(GtkAccessible(instance)) + end + function get_at_context(instance::AdwCarouselIndicatorDots) + get_at_context(GtkAccessible(instance)) + end + function get_bounds(instance::AdwCarouselIndicatorDots) + get_bounds(GtkAccessible(instance)) + end + function get_first_accessible_child(instance::AdwCarouselIndicatorDots) + get_first_accessible_child(GtkAccessible(instance)) + end + function get_next_accessible_sibling(instance::AdwCarouselIndicatorDots) + get_next_accessible_sibling(GtkAccessible(instance)) + end + function get_platform_state(instance::AdwCarouselIndicatorDots, _state) + get_platform_state(GtkAccessible(instance), _state) + end + function reset_property(instance::AdwCarouselIndicatorDots, _property) + reset_property(GtkAccessible(instance), _property) + end + function reset_relation(instance::AdwCarouselIndicatorDots, _relation) + reset_relation(GtkAccessible(instance), _relation) + end + function reset_state(instance::AdwCarouselIndicatorDots, _state) + reset_state(GtkAccessible(instance), _state) + end + function set_accessible_parent(instance::AdwCarouselIndicatorDots, _parent::Maybe(GtkAccessible), _next_sibling::Maybe(GtkAccessible)) + set_accessible_parent(GtkAccessible(instance), _parent, _next_sibling) + end + function update_next_accessible_sibling(instance::AdwCarouselIndicatorDots, _new_sibling::Maybe(GtkAccessible)) + update_next_accessible_sibling(GtkAccessible(instance), _new_sibling) + end + function update_property(instance::AdwCarouselIndicatorDots, _properties, _values) + update_property(GtkAccessible(instance), _properties, _values) + end + function update_relation(instance::AdwCarouselIndicatorDots, _relations, _values) + update_relation(GtkAccessible(instance), _relations, _values) + end + function update_state(instance::AdwCarouselIndicatorDots, _states, _values) + update_state(GtkAccessible(instance), _states, _values) + end + function get_buildable_id(instance::AdwCarouselIndicatorDots) + get_buildable_id(GtkBuildable(instance)) + end + function get_orientation(instance::AdwCarouselIndicatorDots) + get_orientation(GtkOrientable(instance)) + end + function set_orientation(instance::AdwCarouselIndicatorDots, _orientation) + set_orientation(GtkOrientable(instance), _orientation) + end + function CarouselIndicatorLines_new() + ret = ccall(("adw_carousel_indicator_lines_new", libadwaita), Ptr{GObject}, ()) + ret2 = AdwCarouselIndicatorLinesLeaf(ret, false) + ret2 + end + function get_carousel(instance::AdwCarouselIndicatorLines) + ret = ccall(("adw_carousel_indicator_lines_get_carousel", libadwaita), Ptr{GObject}, (Ptr{GObject},), instance) + ret2 = convert_if_not_null(AdwCarousel, ret, false) + ret2 + end + function set_carousel(instance::AdwCarouselIndicatorLines, _carousel::Maybe(AdwCarousel)) + _carousel_maybe = nothing_to_null(_carousel) + ret = ccall(("adw_carousel_indicator_lines_set_carousel", libadwaita), Nothing, (Ptr{GObject}, Ptr{GObject}), instance, _carousel_maybe) + nothing + end + function announce(instance::AdwCarouselIndicatorLines, _message::Union{AbstractString, Symbol}, _priority) + announce(GtkAccessible(instance), _message, _priority) + end + function get_accessible_parent(instance::AdwCarouselIndicatorLines) + get_accessible_parent(GtkAccessible(instance)) + end + function get_accessible_role(instance::AdwCarouselIndicatorLines) + get_accessible_role(GtkAccessible(instance)) + end + function get_at_context(instance::AdwCarouselIndicatorLines) + get_at_context(GtkAccessible(instance)) + end + function get_bounds(instance::AdwCarouselIndicatorLines) + get_bounds(GtkAccessible(instance)) + end + function get_first_accessible_child(instance::AdwCarouselIndicatorLines) + get_first_accessible_child(GtkAccessible(instance)) + end + function get_next_accessible_sibling(instance::AdwCarouselIndicatorLines) + get_next_accessible_sibling(GtkAccessible(instance)) + end + function get_platform_state(instance::AdwCarouselIndicatorLines, _state) + get_platform_state(GtkAccessible(instance), _state) + end + function reset_property(instance::AdwCarouselIndicatorLines, _property) + reset_property(GtkAccessible(instance), _property) + end + function reset_relation(instance::AdwCarouselIndicatorLines, _relation) + reset_relation(GtkAccessible(instance), _relation) + end + function reset_state(instance::AdwCarouselIndicatorLines, _state) + reset_state(GtkAccessible(instance), _state) + end + function set_accessible_parent(instance::AdwCarouselIndicatorLines, _parent::Maybe(GtkAccessible), _next_sibling::Maybe(GtkAccessible)) + set_accessible_parent(GtkAccessible(instance), _parent, _next_sibling) + end + function update_next_accessible_sibling(instance::AdwCarouselIndicatorLines, _new_sibling::Maybe(GtkAccessible)) + update_next_accessible_sibling(GtkAccessible(instance), _new_sibling) + end + function update_property(instance::AdwCarouselIndicatorLines, _properties, _values) + update_property(GtkAccessible(instance), _properties, _values) + end + function update_relation(instance::AdwCarouselIndicatorLines, _relations, _values) + update_relation(GtkAccessible(instance), _relations, _values) + end + function update_state(instance::AdwCarouselIndicatorLines, _states, _values) + update_state(GtkAccessible(instance), _states, _values) + end + function get_buildable_id(instance::AdwCarouselIndicatorLines) + get_buildable_id(GtkBuildable(instance)) + end + function get_orientation(instance::AdwCarouselIndicatorLines) + get_orientation(GtkOrientable(instance)) + end + function set_orientation(instance::AdwCarouselIndicatorLines, _orientation) + set_orientation(GtkOrientable(instance), _orientation) + end + function Clamp_new() + ret = ccall(("adw_clamp_new", libadwaita), Ptr{GObject}, ()) + ret2 = AdwClampLeaf(ret, false) + ret2 + end + function get_child(instance::AdwClamp) + ret = ccall(("adw_clamp_get_child", libadwaita), Ptr{GObject}, (Ptr{GObject},), instance) + ret2 = convert_if_not_null(GtkWidget, ret, false) + ret2 + end + function get_maximum_size(instance::AdwClamp) + ret = ccall(("adw_clamp_get_maximum_size", libadwaita), Int32, (Ptr{GObject},), instance) + ret + end + function get_tightening_threshold(instance::AdwClamp) + ret = ccall(("adw_clamp_get_tightening_threshold", libadwaita), Int32, (Ptr{GObject},), instance) + ret + end + function get_unit(instance::AdwClamp) + ret = ccall(("adw_clamp_get_unit", libadwaita), UInt32, (Ptr{GObject},), instance) + ret2 = LengthUnit(ret) + ret2 + end + function set_child(instance::AdwClamp, _child::Maybe(GtkWidget)) + _child_maybe = nothing_to_null(_child) + ret = ccall(("adw_clamp_set_child", libadwaita), Nothing, (Ptr{GObject}, Ptr{GObject}), instance, _child_maybe) + nothing + end + function set_maximum_size(instance::AdwClamp, _maximum_size::Integer) + ret = ccall(("adw_clamp_set_maximum_size", libadwaita), Nothing, (Ptr{GObject}, Int32), instance, _maximum_size) + nothing + end + function set_tightening_threshold(instance::AdwClamp, _tightening_threshold::Integer) + ret = ccall(("adw_clamp_set_tightening_threshold", libadwaita), Nothing, (Ptr{GObject}, Int32), instance, _tightening_threshold) + nothing + end + function set_unit(instance::AdwClamp, _unit) + ret = ccall(("adw_clamp_set_unit", libadwaita), Nothing, (Ptr{GObject}, UInt32), instance, _unit) + nothing + end + function announce(instance::AdwClamp, _message::Union{AbstractString, Symbol}, _priority) + announce(GtkAccessible(instance), _message, _priority) + end + function get_accessible_parent(instance::AdwClamp) + get_accessible_parent(GtkAccessible(instance)) + end + function get_accessible_role(instance::AdwClamp) + get_accessible_role(GtkAccessible(instance)) + end + function get_at_context(instance::AdwClamp) + get_at_context(GtkAccessible(instance)) + end + function get_bounds(instance::AdwClamp) + get_bounds(GtkAccessible(instance)) + end + function get_first_accessible_child(instance::AdwClamp) + get_first_accessible_child(GtkAccessible(instance)) + end + function get_next_accessible_sibling(instance::AdwClamp) + get_next_accessible_sibling(GtkAccessible(instance)) + end + function get_platform_state(instance::AdwClamp, _state) + get_platform_state(GtkAccessible(instance), _state) + end + function reset_property(instance::AdwClamp, _property) + reset_property(GtkAccessible(instance), _property) + end + function reset_relation(instance::AdwClamp, _relation) + reset_relation(GtkAccessible(instance), _relation) + end + function reset_state(instance::AdwClamp, _state) + reset_state(GtkAccessible(instance), _state) + end + function set_accessible_parent(instance::AdwClamp, _parent::Maybe(GtkAccessible), _next_sibling::Maybe(GtkAccessible)) + set_accessible_parent(GtkAccessible(instance), _parent, _next_sibling) + end + function update_next_accessible_sibling(instance::AdwClamp, _new_sibling::Maybe(GtkAccessible)) + update_next_accessible_sibling(GtkAccessible(instance), _new_sibling) + end + function update_property(instance::AdwClamp, _properties, _values) + update_property(GtkAccessible(instance), _properties, _values) + end + function update_relation(instance::AdwClamp, _relations, _values) + update_relation(GtkAccessible(instance), _relations, _values) + end + function update_state(instance::AdwClamp, _states, _values) + update_state(GtkAccessible(instance), _states, _values) + end + function get_buildable_id(instance::AdwClamp) + get_buildable_id(GtkBuildable(instance)) + end + function get_orientation(instance::AdwClamp) + get_orientation(GtkOrientable(instance)) + end + function set_orientation(instance::AdwClamp, _orientation) + set_orientation(GtkOrientable(instance), _orientation) + end + function ClampLayout_new() + ret = ccall(("adw_clamp_layout_new", libadwaita), Ptr{GObject}, ()) + ret2 = AdwClampLayoutLeaf(ret, true) + ret2 + end + function get_maximum_size(instance::AdwClampLayout) + ret = ccall(("adw_clamp_layout_get_maximum_size", libadwaita), Int32, (Ptr{GObject},), instance) + ret + end + function get_tightening_threshold(instance::AdwClampLayout) + ret = ccall(("adw_clamp_layout_get_tightening_threshold", libadwaita), Int32, (Ptr{GObject},), instance) + ret + end + function get_unit(instance::AdwClampLayout) + ret = ccall(("adw_clamp_layout_get_unit", libadwaita), UInt32, (Ptr{GObject},), instance) + ret2 = LengthUnit(ret) + ret2 + end + function set_maximum_size(instance::AdwClampLayout, _maximum_size::Integer) + ret = ccall(("adw_clamp_layout_set_maximum_size", libadwaita), Nothing, (Ptr{GObject}, Int32), instance, _maximum_size) + nothing + end + function set_tightening_threshold(instance::AdwClampLayout, _tightening_threshold::Integer) + ret = ccall(("adw_clamp_layout_set_tightening_threshold", libadwaita), Nothing, (Ptr{GObject}, Int32), instance, _tightening_threshold) + nothing + end + function set_unit(instance::AdwClampLayout, _unit) + ret = ccall(("adw_clamp_layout_set_unit", libadwaita), Nothing, (Ptr{GObject}, UInt32), instance, _unit) + nothing + end + function get_orientation(instance::AdwClampLayout) + get_orientation(GtkOrientable(instance)) + end + function set_orientation(instance::AdwClampLayout, _orientation) + set_orientation(GtkOrientable(instance), _orientation) + end + function ClampScrollable_new() + ret = ccall(("adw_clamp_scrollable_new", libadwaita), Ptr{GObject}, ()) + ret2 = AdwClampScrollableLeaf(ret, false) + ret2 + end + function get_child(instance::AdwClampScrollable) + ret = ccall(("adw_clamp_scrollable_get_child", libadwaita), Ptr{GObject}, (Ptr{GObject},), instance) + ret2 = convert_if_not_null(GtkWidget, ret, false) + ret2 + end + function get_maximum_size(instance::AdwClampScrollable) + ret = ccall(("adw_clamp_scrollable_get_maximum_size", libadwaita), Int32, (Ptr{GObject},), instance) + ret + end + function get_tightening_threshold(instance::AdwClampScrollable) + ret = ccall(("adw_clamp_scrollable_get_tightening_threshold", libadwaita), Int32, (Ptr{GObject},), instance) + ret + end + function get_unit(instance::AdwClampScrollable) + ret = ccall(("adw_clamp_scrollable_get_unit", libadwaita), UInt32, (Ptr{GObject},), instance) + ret2 = LengthUnit(ret) + ret2 + end + function set_child(instance::AdwClampScrollable, _child::Maybe(GtkWidget)) + _child_maybe = nothing_to_null(_child) + ret = ccall(("adw_clamp_scrollable_set_child", libadwaita), Nothing, (Ptr{GObject}, Ptr{GObject}), instance, _child_maybe) + nothing + end + function set_maximum_size(instance::AdwClampScrollable, _maximum_size::Integer) + ret = ccall(("adw_clamp_scrollable_set_maximum_size", libadwaita), Nothing, (Ptr{GObject}, Int32), instance, _maximum_size) + nothing + end + function set_tightening_threshold(instance::AdwClampScrollable, _tightening_threshold::Integer) + ret = ccall(("adw_clamp_scrollable_set_tightening_threshold", libadwaita), Nothing, (Ptr{GObject}, Int32), instance, _tightening_threshold) + nothing + end + function set_unit(instance::AdwClampScrollable, _unit) + ret = ccall(("adw_clamp_scrollable_set_unit", libadwaita), Nothing, (Ptr{GObject}, UInt32), instance, _unit) + nothing + end + function announce(instance::AdwClampScrollable, _message::Union{AbstractString, Symbol}, _priority) + announce(GtkAccessible(instance), _message, _priority) + end + function get_accessible_parent(instance::AdwClampScrollable) + get_accessible_parent(GtkAccessible(instance)) + end + function get_accessible_role(instance::AdwClampScrollable) + get_accessible_role(GtkAccessible(instance)) + end + function get_at_context(instance::AdwClampScrollable) + get_at_context(GtkAccessible(instance)) + end + function get_bounds(instance::AdwClampScrollable) + get_bounds(GtkAccessible(instance)) + end + function get_first_accessible_child(instance::AdwClampScrollable) + get_first_accessible_child(GtkAccessible(instance)) + end + function get_next_accessible_sibling(instance::AdwClampScrollable) + get_next_accessible_sibling(GtkAccessible(instance)) + end + function get_platform_state(instance::AdwClampScrollable, _state) + get_platform_state(GtkAccessible(instance), _state) + end + function reset_property(instance::AdwClampScrollable, _property) + reset_property(GtkAccessible(instance), _property) + end + function reset_relation(instance::AdwClampScrollable, _relation) + reset_relation(GtkAccessible(instance), _relation) + end + function reset_state(instance::AdwClampScrollable, _state) + reset_state(GtkAccessible(instance), _state) + end + function set_accessible_parent(instance::AdwClampScrollable, _parent::Maybe(GtkAccessible), _next_sibling::Maybe(GtkAccessible)) + set_accessible_parent(GtkAccessible(instance), _parent, _next_sibling) + end + function update_next_accessible_sibling(instance::AdwClampScrollable, _new_sibling::Maybe(GtkAccessible)) + update_next_accessible_sibling(GtkAccessible(instance), _new_sibling) + end + function update_property(instance::AdwClampScrollable, _properties, _values) + update_property(GtkAccessible(instance), _properties, _values) + end + function update_relation(instance::AdwClampScrollable, _relations, _values) + update_relation(GtkAccessible(instance), _relations, _values) + end + function update_state(instance::AdwClampScrollable, _states, _values) + update_state(GtkAccessible(instance), _states, _values) + end + function get_buildable_id(instance::AdwClampScrollable) + get_buildable_id(GtkBuildable(instance)) + end + function get_orientation(instance::AdwClampScrollable) + get_orientation(GtkOrientable(instance)) + end + function set_orientation(instance::AdwClampScrollable, _orientation) + set_orientation(GtkOrientable(instance), _orientation) + end + function get_border(instance::AdwClampScrollable) + get_border(GtkScrollable(instance)) + end + function get_hadjustment(instance::AdwClampScrollable) + get_hadjustment(GtkScrollable(instance)) + end + function get_hscroll_policy(instance::AdwClampScrollable) + get_hscroll_policy(GtkScrollable(instance)) + end + function get_vadjustment(instance::AdwClampScrollable) + get_vadjustment(GtkScrollable(instance)) + end + function get_vscroll_policy(instance::AdwClampScrollable) + get_vscroll_policy(GtkScrollable(instance)) + end + function set_hadjustment(instance::AdwClampScrollable, _hadjustment::Maybe(GtkAdjustment)) + set_hadjustment(GtkScrollable(instance), _hadjustment) + end + function set_hscroll_policy(instance::AdwClampScrollable, _policy) + set_hscroll_policy(GtkScrollable(instance), _policy) + end + function set_vadjustment(instance::AdwClampScrollable, _vadjustment::Maybe(GtkAdjustment)) + set_vadjustment(GtkScrollable(instance), _vadjustment) + end + function set_vscroll_policy(instance::AdwClampScrollable, _policy) + set_vscroll_policy(GtkScrollable(instance), _policy) + end + function ComboRow_new() + ret = ccall(("adw_combo_row_new", libadwaita), Ptr{GObject}, ()) + ret2 = AdwComboRowLeaf(ret, false) + ret2 + end + function get_enable_search(instance::AdwComboRow) + ret = ccall(("adw_combo_row_get_enable_search", libadwaita), Cint, (Ptr{GObject},), instance) + ret2 = convert(Bool, ret) + ret2 + end + function get_factory(instance::AdwComboRow) + ret = ccall(("adw_combo_row_get_factory", libadwaita), Ptr{GObject}, (Ptr{GObject},), instance) + ret2 = convert_if_not_null(GtkListItemFactory, ret, false) + ret2 + end + function get_list_factory(instance::AdwComboRow) + ret = ccall(("adw_combo_row_get_list_factory", libadwaita), Ptr{GObject}, (Ptr{GObject},), instance) + ret2 = convert_if_not_null(GtkListItemFactory, ret, false) + ret2 + end + function get_model(instance::AdwComboRow) + ret = ccall(("adw_combo_row_get_model", libadwaita), Ptr{GObject}, (Ptr{GObject},), instance) + ret2 = GLib.find_leaf_type_if_not_null(ret, false) + ret2 + end + function get_selected(instance::AdwComboRow) + ret = ccall(("adw_combo_row_get_selected", libadwaita), UInt32, (Ptr{GObject},), instance) + ret + end + function get_selected_item(instance::AdwComboRow) + ret = ccall(("adw_combo_row_get_selected_item", libadwaita), Ptr{GObject}, (Ptr{GObject},), instance) + ret2 = convert_if_not_null(GObject, ret, false) + ret2 + end + function get_use_subtitle(instance::AdwComboRow) + ret = ccall(("adw_combo_row_get_use_subtitle", libadwaita), Cint, (Ptr{GObject},), instance) + ret2 = convert(Bool, ret) + ret2 + end + function set_enable_search(instance::AdwComboRow, _enable_search::Bool) + ret = ccall(("adw_combo_row_set_enable_search", libadwaita), Nothing, (Ptr{GObject}, Cint), instance, _enable_search) + nothing + end + function set_factory(instance::AdwComboRow, _factory::Maybe(GtkListItemFactory)) + _factory_maybe = nothing_to_null(_factory) + ret = ccall(("adw_combo_row_set_factory", libadwaita), Nothing, (Ptr{GObject}, Ptr{GObject}), instance, _factory_maybe) + nothing + end + function set_list_factory(instance::AdwComboRow, _factory::Maybe(GtkListItemFactory)) + _factory_maybe = nothing_to_null(_factory) + ret = ccall(("adw_combo_row_set_list_factory", libadwaita), Nothing, (Ptr{GObject}, Ptr{GObject}), instance, _factory_maybe) + nothing + end + function set_model(instance::AdwComboRow, _model::Maybe(GListModel)) + _model_maybe = nothing_to_null(_model) + ret = ccall(("adw_combo_row_set_model", libadwaita), Nothing, (Ptr{GObject}, Ptr{GObject}), instance, _model_maybe) + nothing + end + function set_selected(instance::AdwComboRow, _position::Integer) + ret = ccall(("adw_combo_row_set_selected", libadwaita), Nothing, (Ptr{GObject}, UInt32), instance, _position) + nothing + end + function set_use_subtitle(instance::AdwComboRow, _use_subtitle::Bool) + ret = ccall(("adw_combo_row_set_use_subtitle", libadwaita), Nothing, (Ptr{GObject}, Cint), instance, _use_subtitle) + nothing + end + function announce(instance::AdwComboRow, _message::Union{AbstractString, Symbol}, _priority) + announce(GtkAccessible(instance), _message, _priority) + end + function get_accessible_parent(instance::AdwComboRow) + get_accessible_parent(GtkAccessible(instance)) + end + function get_accessible_role(instance::AdwComboRow) + get_accessible_role(GtkAccessible(instance)) + end + function get_at_context(instance::AdwComboRow) + get_at_context(GtkAccessible(instance)) + end + function get_bounds(instance::AdwComboRow) + get_bounds(GtkAccessible(instance)) + end + function get_first_accessible_child(instance::AdwComboRow) + get_first_accessible_child(GtkAccessible(instance)) + end + function get_next_accessible_sibling(instance::AdwComboRow) + get_next_accessible_sibling(GtkAccessible(instance)) + end + function get_platform_state(instance::AdwComboRow, _state) + get_platform_state(GtkAccessible(instance), _state) + end + function reset_property(instance::AdwComboRow, _property) + reset_property(GtkAccessible(instance), _property) + end + function reset_relation(instance::AdwComboRow, _relation) + reset_relation(GtkAccessible(instance), _relation) + end + function reset_state(instance::AdwComboRow, _state) + reset_state(GtkAccessible(instance), _state) + end + function set_accessible_parent(instance::AdwComboRow, _parent::Maybe(GtkAccessible), _next_sibling::Maybe(GtkAccessible)) + set_accessible_parent(GtkAccessible(instance), _parent, _next_sibling) + end + function update_next_accessible_sibling(instance::AdwComboRow, _new_sibling::Maybe(GtkAccessible)) + update_next_accessible_sibling(GtkAccessible(instance), _new_sibling) + end + function update_property(instance::AdwComboRow, _properties, _values) + update_property(GtkAccessible(instance), _properties, _values) + end + function update_relation(instance::AdwComboRow, _relations, _values) + update_relation(GtkAccessible(instance), _relations, _values) + end + function update_state(instance::AdwComboRow, _states, _values) + update_state(GtkAccessible(instance), _states, _values) + end + function get_action_name(instance::AdwComboRow) + get_action_name(GtkActionable(instance)) + end + function get_action_target_value(instance::AdwComboRow) + get_action_target_value(GtkActionable(instance)) + end + function set_action_name(instance::AdwComboRow, _action_name::Maybe(Union{AbstractString, Symbol})) + set_action_name(GtkActionable(instance), _action_name) + end + function set_action_target_value(instance::AdwComboRow, _target_value::Maybe(GVariant)) + set_action_target_value(GtkActionable(instance), _target_value) + end + function set_detailed_action_name(instance::AdwComboRow, _detailed_action_name::Union{AbstractString, Symbol}) + set_detailed_action_name(GtkActionable(instance), _detailed_action_name) + end + function get_buildable_id(instance::AdwComboRow) + get_buildable_id(GtkBuildable(instance)) + end + function Dialog_new() + ret = ccall(("adw_dialog_new", libadwaita), Ptr{GObject}, ()) + ret2 = AdwDialogLeaf(ret, false) + ret2 + end + function close(instance::AdwDialog) + ret = ccall(("adw_dialog_close", libadwaita), Cint, (Ptr{GObject},), instance) + ret2 = convert(Bool, ret) + ret2 + end + function force_close(instance::AdwDialog) + ret = ccall(("adw_dialog_force_close", libadwaita), Nothing, (Ptr{GObject},), instance) + nothing + end + function get_can_close(instance::AdwDialog) + ret = ccall(("adw_dialog_get_can_close", libadwaita), Cint, (Ptr{GObject},), instance) + ret2 = convert(Bool, ret) + ret2 + end + function get_child(instance::AdwDialog) + ret = ccall(("adw_dialog_get_child", libadwaita), Ptr{GObject}, (Ptr{GObject},), instance) + ret2 = convert_if_not_null(GtkWidget, ret, false) + ret2 + end + function get_content_height(instance::AdwDialog) + ret = ccall(("adw_dialog_get_content_height", libadwaita), Int32, (Ptr{GObject},), instance) + ret + end + function get_content_width(instance::AdwDialog) + ret = ccall(("adw_dialog_get_content_width", libadwaita), Int32, (Ptr{GObject},), instance) + ret + end + function get_default_widget(instance::AdwDialog) + ret = ccall(("adw_dialog_get_default_widget", libadwaita), Ptr{GObject}, (Ptr{GObject},), instance) + ret2 = convert_if_not_null(GtkWidget, ret, false) + ret2 + end + function get_focus(instance::AdwDialog) + ret = ccall(("adw_dialog_get_focus", libadwaita), Ptr{GObject}, (Ptr{GObject},), instance) + ret2 = convert_if_not_null(GtkWidget, ret, false) + ret2 + end + function get_follows_content_size(instance::AdwDialog) + ret = ccall(("adw_dialog_get_follows_content_size", libadwaita), Cint, (Ptr{GObject},), instance) + ret2 = convert(Bool, ret) + ret2 + end + function get_presentation_mode(instance::AdwDialog) + ret = ccall(("adw_dialog_get_presentation_mode", libadwaita), UInt32, (Ptr{GObject},), instance) + ret2 = DialogPresentationMode(ret) + ret2 + end + function get_title(instance::AdwDialog) + ret = ccall(("adw_dialog_get_title", libadwaita), Cstring, (Ptr{GObject},), instance) + ret2 = string_or_nothing(ret, false) + ret2 + end + function present(instance::AdwDialog, _parent::Maybe(GtkWidget)) + _parent_maybe = nothing_to_null(_parent) + ret = ccall(("adw_dialog_present", libadwaita), Nothing, (Ptr{GObject}, Ptr{GObject}), instance, _parent_maybe) + nothing + end + function set_can_close(instance::AdwDialog, _can_close::Bool) + ret = ccall(("adw_dialog_set_can_close", libadwaita), Nothing, (Ptr{GObject}, Cint), instance, _can_close) + nothing + end + function set_child(instance::AdwDialog, _child::Maybe(GtkWidget)) + _child_maybe = nothing_to_null(_child) + ret = ccall(("adw_dialog_set_child", libadwaita), Nothing, (Ptr{GObject}, Ptr{GObject}), instance, _child_maybe) + nothing + end + function set_content_height(instance::AdwDialog, _content_height::Integer) + ret = ccall(("adw_dialog_set_content_height", libadwaita), Nothing, (Ptr{GObject}, Int32), instance, _content_height) + nothing + end + function set_content_width(instance::AdwDialog, _content_width::Integer) + ret = ccall(("adw_dialog_set_content_width", libadwaita), Nothing, (Ptr{GObject}, Int32), instance, _content_width) + nothing + end + function set_default_widget(instance::AdwDialog, _default_widget::Maybe(GtkWidget)) + _default_widget_maybe = nothing_to_null(_default_widget) + ret = ccall(("adw_dialog_set_default_widget", libadwaita), Nothing, (Ptr{GObject}, Ptr{GObject}), instance, _default_widget_maybe) + nothing + end + function set_focus(instance::AdwDialog, _focus::Maybe(GtkWidget)) + _focus_maybe = nothing_to_null(_focus) + ret = ccall(("adw_dialog_set_focus", libadwaita), Nothing, (Ptr{GObject}, Ptr{GObject}), instance, _focus_maybe) + nothing + end + function set_follows_content_size(instance::AdwDialog, _follows_content_size::Bool) + ret = ccall(("adw_dialog_set_follows_content_size", libadwaita), Nothing, (Ptr{GObject}, Cint), instance, _follows_content_size) + nothing + end + function set_presentation_mode(instance::AdwDialog, _presentation_mode) + ret = ccall(("adw_dialog_set_presentation_mode", libadwaita), Nothing, (Ptr{GObject}, UInt32), instance, _presentation_mode) + nothing + end + function set_title(instance::AdwDialog, _title::Union{AbstractString, Symbol}) + ret = ccall(("adw_dialog_set_title", libadwaita), Nothing, (Ptr{GObject}, Cstring), instance, _title) + nothing + end + function announce(instance::AdwDialog, _message::Union{AbstractString, Symbol}, _priority) + announce(GtkAccessible(instance), _message, _priority) + end + function get_accessible_parent(instance::AdwDialog) + get_accessible_parent(GtkAccessible(instance)) + end + function get_accessible_role(instance::AdwDialog) + get_accessible_role(GtkAccessible(instance)) + end + function get_at_context(instance::AdwDialog) + get_at_context(GtkAccessible(instance)) + end + function get_bounds(instance::AdwDialog) + get_bounds(GtkAccessible(instance)) + end + function get_first_accessible_child(instance::AdwDialog) + get_first_accessible_child(GtkAccessible(instance)) + end + function get_next_accessible_sibling(instance::AdwDialog) + get_next_accessible_sibling(GtkAccessible(instance)) + end + function get_platform_state(instance::AdwDialog, _state) + get_platform_state(GtkAccessible(instance), _state) + end + function reset_property(instance::AdwDialog, _property) + reset_property(GtkAccessible(instance), _property) + end + function reset_relation(instance::AdwDialog, _relation) + reset_relation(GtkAccessible(instance), _relation) + end + function reset_state(instance::AdwDialog, _state) + reset_state(GtkAccessible(instance), _state) + end + function set_accessible_parent(instance::AdwDialog, _parent::Maybe(GtkAccessible), _next_sibling::Maybe(GtkAccessible)) + set_accessible_parent(GtkAccessible(instance), _parent, _next_sibling) + end + function update_next_accessible_sibling(instance::AdwDialog, _new_sibling::Maybe(GtkAccessible)) + update_next_accessible_sibling(GtkAccessible(instance), _new_sibling) + end + function update_property(instance::AdwDialog, _properties, _values) + update_property(GtkAccessible(instance), _properties, _values) + end + function update_relation(instance::AdwDialog, _relations, _values) + update_relation(GtkAccessible(instance), _relations, _values) + end + function update_state(instance::AdwDialog, _states, _values) + update_state(GtkAccessible(instance), _states, _values) + end + function get_buildable_id(instance::AdwDialog) + get_buildable_id(GtkBuildable(instance)) + end + function EntryRow_new() + ret = ccall(("adw_entry_row_new", libadwaita), Ptr{GObject}, ()) + ret2 = AdwEntryRowLeaf(ret, false) + ret2 + end + function add_prefix(instance::AdwEntryRow, _widget::GtkWidget) + ret = ccall(("adw_entry_row_add_prefix", libadwaita), Nothing, (Ptr{GObject}, Ptr{GObject}), instance, _widget) + nothing + end + function add_suffix(instance::AdwEntryRow, _widget::GtkWidget) + ret = ccall(("adw_entry_row_add_suffix", libadwaita), Nothing, (Ptr{GObject}, Ptr{GObject}), instance, _widget) + nothing + end + function get_activates_default(instance::AdwEntryRow) + ret = ccall(("adw_entry_row_get_activates_default", libadwaita), Cint, (Ptr{GObject},), instance) + ret2 = convert(Bool, ret) + ret2 + end + function get_attributes(instance::AdwEntryRow) + ret = ccall(("adw_entry_row_get_attributes", libadwaita), Ptr{PangoAttrList}, (Ptr{GObject},), instance) + ret2 = convert_if_not_null(PangoAttrList, ret, true) + ret2 + end + function get_enable_emoji_completion(instance::AdwEntryRow) + ret = ccall(("adw_entry_row_get_enable_emoji_completion", libadwaita), Cint, (Ptr{GObject},), instance) + ret2 = convert(Bool, ret) + ret2 + end + function get_input_hints(instance::AdwEntryRow) + ret = ccall(("adw_entry_row_get_input_hints", libadwaita), UInt32, (Ptr{GObject},), instance) + ret2 = InputHints(ret) + ret2 + end + function get_input_purpose(instance::AdwEntryRow) + ret = ccall(("adw_entry_row_get_input_purpose", libadwaita), UInt32, (Ptr{GObject},), instance) + ret2 = InputPurpose(ret) + ret2 + end + function get_show_apply_button(instance::AdwEntryRow) + ret = ccall(("adw_entry_row_get_show_apply_button", libadwaita), Cint, (Ptr{GObject},), instance) + ret2 = convert(Bool, ret) + ret2 + end + function get_text_length(instance::AdwEntryRow) + ret = ccall(("adw_entry_row_get_text_length", libadwaita), UInt32, (Ptr{GObject},), instance) + ret + end + function grab_focus_without_selecting(instance::AdwEntryRow) + ret = ccall(("adw_entry_row_grab_focus_without_selecting", libadwaita), Cint, (Ptr{GObject},), instance) + ret2 = convert(Bool, ret) + ret2 + end + function remove(instance::AdwEntryRow, _widget::GtkWidget) + ret = ccall(("adw_entry_row_remove", libadwaita), Nothing, (Ptr{GObject}, Ptr{GObject}), instance, _widget) + nothing + end + function set_activates_default(instance::AdwEntryRow, _activates::Bool) + ret = ccall(("adw_entry_row_set_activates_default", libadwaita), Nothing, (Ptr{GObject}, Cint), instance, _activates) + nothing + end + function set_attributes(instance::AdwEntryRow, _attributes::Maybe(PangoAttrList)) + _attributes_maybe = nothing_to_null(_attributes) + ret = ccall(("adw_entry_row_set_attributes", libadwaita), Nothing, (Ptr{GObject}, Ptr{PangoAttrList}), instance, _attributes_maybe) + nothing + end + function set_enable_emoji_completion(instance::AdwEntryRow, _enable_emoji_completion::Bool) + ret = ccall(("adw_entry_row_set_enable_emoji_completion", libadwaita), Nothing, (Ptr{GObject}, Cint), instance, _enable_emoji_completion) + nothing + end + function set_input_hints(instance::AdwEntryRow, _hints) + ret = ccall(("adw_entry_row_set_input_hints", libadwaita), Nothing, (Ptr{GObject}, UInt32), instance, _hints) + nothing + end + function set_input_purpose(instance::AdwEntryRow, _purpose) + ret = ccall(("adw_entry_row_set_input_purpose", libadwaita), Nothing, (Ptr{GObject}, UInt32), instance, _purpose) + nothing + end + function set_show_apply_button(instance::AdwEntryRow, _show_apply_button::Bool) + ret = ccall(("adw_entry_row_set_show_apply_button", libadwaita), Nothing, (Ptr{GObject}, Cint), instance, _show_apply_button) + nothing + end + function announce(instance::AdwEntryRow, _message::Union{AbstractString, Symbol}, _priority) + announce(GtkAccessible(instance), _message, _priority) + end + function get_accessible_parent(instance::AdwEntryRow) + get_accessible_parent(GtkAccessible(instance)) + end + function get_accessible_role(instance::AdwEntryRow) + get_accessible_role(GtkAccessible(instance)) + end + function get_at_context(instance::AdwEntryRow) + get_at_context(GtkAccessible(instance)) + end + function get_bounds(instance::AdwEntryRow) + get_bounds(GtkAccessible(instance)) + end + function get_first_accessible_child(instance::AdwEntryRow) + get_first_accessible_child(GtkAccessible(instance)) + end + function get_next_accessible_sibling(instance::AdwEntryRow) + get_next_accessible_sibling(GtkAccessible(instance)) + end + function get_platform_state(instance::AdwEntryRow, _state) + get_platform_state(GtkAccessible(instance), _state) + end + function reset_property(instance::AdwEntryRow, _property) + reset_property(GtkAccessible(instance), _property) + end + function reset_relation(instance::AdwEntryRow, _relation) + reset_relation(GtkAccessible(instance), _relation) + end + function reset_state(instance::AdwEntryRow, _state) + reset_state(GtkAccessible(instance), _state) + end + function set_accessible_parent(instance::AdwEntryRow, _parent::Maybe(GtkAccessible), _next_sibling::Maybe(GtkAccessible)) + set_accessible_parent(GtkAccessible(instance), _parent, _next_sibling) + end + function update_next_accessible_sibling(instance::AdwEntryRow, _new_sibling::Maybe(GtkAccessible)) + update_next_accessible_sibling(GtkAccessible(instance), _new_sibling) + end + function update_property(instance::AdwEntryRow, _properties, _values) + update_property(GtkAccessible(instance), _properties, _values) + end + function update_relation(instance::AdwEntryRow, _relations, _values) + update_relation(GtkAccessible(instance), _relations, _values) + end + function update_state(instance::AdwEntryRow, _states, _values) + update_state(GtkAccessible(instance), _states, _values) + end + function get_action_name(instance::AdwEntryRow) + get_action_name(GtkActionable(instance)) + end + function get_action_target_value(instance::AdwEntryRow) + get_action_target_value(GtkActionable(instance)) + end + function set_action_name(instance::AdwEntryRow, _action_name::Maybe(Union{AbstractString, Symbol})) + set_action_name(GtkActionable(instance), _action_name) + end + function set_action_target_value(instance::AdwEntryRow, _target_value::Maybe(GVariant)) + set_action_target_value(GtkActionable(instance), _target_value) + end + function set_detailed_action_name(instance::AdwEntryRow, _detailed_action_name::Union{AbstractString, Symbol}) + set_detailed_action_name(GtkActionable(instance), _detailed_action_name) + end + function get_buildable_id(instance::AdwEntryRow) + get_buildable_id(GtkBuildable(instance)) + end + function delegate_get_accessible_platform_state(instance::AdwEntryRow, _state) + delegate_get_accessible_platform_state(GtkEditable(instance), _state) + end + function delete_selection(instance::AdwEntryRow) + delete_selection(GtkEditable(instance)) + end + function delete_text(instance::AdwEntryRow, _start_pos::Integer, _end_pos::Integer) + delete_text(GtkEditable(instance), _start_pos, _end_pos) + end + function finish_delegate(instance::AdwEntryRow) + finish_delegate(GtkEditable(instance)) + end + function get_alignment(instance::AdwEntryRow) + get_alignment(GtkEditable(instance)) + end + function get_chars(instance::AdwEntryRow, _start_pos::Integer, _end_pos::Integer) + get_chars(GtkEditable(instance), _start_pos, _end_pos) + end + function get_delegate(instance::AdwEntryRow) + get_delegate(GtkEditable(instance)) + end + function get_editable(instance::AdwEntryRow) + get_editable(GtkEditable(instance)) + end + function get_enable_undo(instance::AdwEntryRow) + get_enable_undo(GtkEditable(instance)) + end + function get_max_width_chars(instance::AdwEntryRow) + get_max_width_chars(GtkEditable(instance)) + end + function get_position(instance::AdwEntryRow) + get_position(GtkEditable(instance)) + end + function get_selection_bounds(instance::AdwEntryRow) + get_selection_bounds(GtkEditable(instance)) + end + function get_text(instance::AdwEntryRow) + get_text(GtkEditable(instance)) + end + function get_width_chars(instance::AdwEntryRow) + get_width_chars(GtkEditable(instance)) + end + function init_delegate(instance::AdwEntryRow) + init_delegate(GtkEditable(instance)) + end + function insert_text(instance::AdwEntryRow, _text::Union{AbstractString, Symbol}, _length::Integer, _position::Integer) + insert_text(GtkEditable(instance), _text, _length, _position) + end + function select_region(instance::AdwEntryRow, _start_pos::Integer, _end_pos::Integer) + select_region(GtkEditable(instance), _start_pos, _end_pos) + end + function set_alignment(instance::AdwEntryRow, _xalign::Real) + set_alignment(GtkEditable(instance), _xalign) + end + function set_editable(instance::AdwEntryRow, _is_editable::Bool) + set_editable(GtkEditable(instance), _is_editable) + end + function set_enable_undo(instance::AdwEntryRow, _enable_undo::Bool) + set_enable_undo(GtkEditable(instance), _enable_undo) + end + function set_max_width_chars(instance::AdwEntryRow, _n_chars::Integer) + set_max_width_chars(GtkEditable(instance), _n_chars) + end + function set_position(instance::AdwEntryRow, _position::Integer) + set_position(GtkEditable(instance), _position) + end + function set_text(instance::AdwEntryRow, _text::Union{AbstractString, Symbol}) + set_text(GtkEditable(instance), _text) + end + function set_width_chars(instance::AdwEntryRow, _n_chars::Integer) + set_width_chars(GtkEditable(instance), _n_chars) + end + function get_name(instance::AdwEnumListItem) + ret = ccall(("adw_enum_list_item_get_name", libadwaita), Cstring, (Ptr{GObject},), instance) + ret2 = string_or_nothing(ret, false) + ret2 + end + function get_nick(instance::AdwEnumListItem) + ret = ccall(("adw_enum_list_item_get_nick", libadwaita), Cstring, (Ptr{GObject},), instance) + ret2 = string_or_nothing(ret, false) + ret2 + end + function get_value(instance::AdwEnumListItem) + ret = ccall(("adw_enum_list_item_get_value", libadwaita), Int32, (Ptr{GObject},), instance) + ret + end + function EnumListModel_new(_enum_type::Integer) + ret = ccall(("adw_enum_list_model_new", libadwaita), Ptr{GObject}, (UInt64,), _enum_type) + ret2 = AdwEnumListModelLeaf(ret, true) + ret2 + end + function find_position(instance::AdwEnumListModel, _value::Integer) + ret = ccall(("adw_enum_list_model_find_position", libadwaita), UInt32, (Ptr{GObject}, Int32), instance, _value) + ret + end + function get_enum_type(instance::AdwEnumListModel) + ret = ccall(("adw_enum_list_model_get_enum_type", libadwaita), UInt64, (Ptr{GObject},), instance) + ret + end + function get_item_type(instance::AdwEnumListModel) + get_item_type(GListModel(instance)) + end + function get_n_items(instance::AdwEnumListModel) + get_n_items(GListModel(instance)) + end + function get_item(instance::AdwEnumListModel, _position::Integer) + get_item(GListModel(instance), _position) + end + function items_changed(instance::AdwEnumListModel, _position::Integer, _removed::Integer, _added::Integer) + items_changed(GListModel(instance), _position, _removed, _added) + end + function ExpanderRow_new() + ret = ccall(("adw_expander_row_new", libadwaita), Ptr{GObject}, ()) + ret2 = AdwExpanderRowLeaf(ret, false) + ret2 + end + function add_action(instance::AdwExpanderRow, _widget::GtkWidget) + ret = ccall(("adw_expander_row_add_action", libadwaita), Nothing, (Ptr{GObject}, Ptr{GObject}), instance, _widget) + nothing + end + function add_prefix(instance::AdwExpanderRow, _widget::GtkWidget) + ret = ccall(("adw_expander_row_add_prefix", libadwaita), Nothing, (Ptr{GObject}, Ptr{GObject}), instance, _widget) + nothing + end + function add_row(instance::AdwExpanderRow, _child::GtkWidget) + ret = ccall(("adw_expander_row_add_row", libadwaita), Nothing, (Ptr{GObject}, Ptr{GObject}), instance, _child) + nothing + end + function add_suffix(instance::AdwExpanderRow, _widget::GtkWidget) + ret = ccall(("adw_expander_row_add_suffix", libadwaita), Nothing, (Ptr{GObject}, Ptr{GObject}), instance, _widget) + nothing + end + function get_enable_expansion(instance::AdwExpanderRow) + ret = ccall(("adw_expander_row_get_enable_expansion", libadwaita), Cint, (Ptr{GObject},), instance) + ret2 = convert(Bool, ret) + ret2 + end + function get_expanded(instance::AdwExpanderRow) + ret = ccall(("adw_expander_row_get_expanded", libadwaita), Cint, (Ptr{GObject},), instance) + ret2 = convert(Bool, ret) + ret2 + end + function get_icon_name(instance::AdwExpanderRow) + ret = ccall(("adw_expander_row_get_icon_name", libadwaita), Cstring, (Ptr{GObject},), instance) + ret2 = string_or_nothing(ret, false) + ret2 + end + function get_show_enable_switch(instance::AdwExpanderRow) + ret = ccall(("adw_expander_row_get_show_enable_switch", libadwaita), Cint, (Ptr{GObject},), instance) + ret2 = convert(Bool, ret) + ret2 + end + function get_subtitle(instance::AdwExpanderRow) + ret = ccall(("adw_expander_row_get_subtitle", libadwaita), Cstring, (Ptr{GObject},), instance) + ret2 = string_or_nothing(ret, false) + ret2 + end + function get_subtitle_lines(instance::AdwExpanderRow) + ret = ccall(("adw_expander_row_get_subtitle_lines", libadwaita), Int32, (Ptr{GObject},), instance) + ret + end + function get_title_lines(instance::AdwExpanderRow) + ret = ccall(("adw_expander_row_get_title_lines", libadwaita), Int32, (Ptr{GObject},), instance) + ret + end + function remove(instance::AdwExpanderRow, _child::GtkWidget) + ret = ccall(("adw_expander_row_remove", libadwaita), Nothing, (Ptr{GObject}, Ptr{GObject}), instance, _child) + nothing + end + function set_enable_expansion(instance::AdwExpanderRow, _enable_expansion::Bool) + ret = ccall(("adw_expander_row_set_enable_expansion", libadwaita), Nothing, (Ptr{GObject}, Cint), instance, _enable_expansion) + nothing + end + function set_expanded(instance::AdwExpanderRow, _expanded::Bool) + ret = ccall(("adw_expander_row_set_expanded", libadwaita), Nothing, (Ptr{GObject}, Cint), instance, _expanded) + nothing + end + function set_icon_name(instance::AdwExpanderRow, _icon_name::Maybe(Union{AbstractString, Symbol})) + _icon_name_maybe = nothing_to_null(_icon_name) + ret = ccall(("adw_expander_row_set_icon_name", libadwaita), Nothing, (Ptr{GObject}, Cstring), instance, _icon_name_maybe) + nothing + end + function set_show_enable_switch(instance::AdwExpanderRow, _show_enable_switch::Bool) + ret = ccall(("adw_expander_row_set_show_enable_switch", libadwaita), Nothing, (Ptr{GObject}, Cint), instance, _show_enable_switch) + nothing + end + function set_subtitle(instance::AdwExpanderRow, _subtitle::Union{AbstractString, Symbol}) + ret = ccall(("adw_expander_row_set_subtitle", libadwaita), Nothing, (Ptr{GObject}, Cstring), instance, _subtitle) + nothing + end + function set_subtitle_lines(instance::AdwExpanderRow, _subtitle_lines::Integer) + ret = ccall(("adw_expander_row_set_subtitle_lines", libadwaita), Nothing, (Ptr{GObject}, Int32), instance, _subtitle_lines) + nothing + end + function set_title_lines(instance::AdwExpanderRow, _title_lines::Integer) + ret = ccall(("adw_expander_row_set_title_lines", libadwaita), Nothing, (Ptr{GObject}, Int32), instance, _title_lines) + nothing + end + function announce(instance::AdwExpanderRow, _message::Union{AbstractString, Symbol}, _priority) + announce(GtkAccessible(instance), _message, _priority) + end + function get_accessible_parent(instance::AdwExpanderRow) + get_accessible_parent(GtkAccessible(instance)) + end + function get_accessible_role(instance::AdwExpanderRow) + get_accessible_role(GtkAccessible(instance)) + end + function get_at_context(instance::AdwExpanderRow) + get_at_context(GtkAccessible(instance)) + end + function get_bounds(instance::AdwExpanderRow) + get_bounds(GtkAccessible(instance)) + end + function get_first_accessible_child(instance::AdwExpanderRow) + get_first_accessible_child(GtkAccessible(instance)) + end + function get_next_accessible_sibling(instance::AdwExpanderRow) + get_next_accessible_sibling(GtkAccessible(instance)) + end + function get_platform_state(instance::AdwExpanderRow, _state) + get_platform_state(GtkAccessible(instance), _state) + end + function reset_property(instance::AdwExpanderRow, _property) + reset_property(GtkAccessible(instance), _property) + end + function reset_relation(instance::AdwExpanderRow, _relation) + reset_relation(GtkAccessible(instance), _relation) + end + function reset_state(instance::AdwExpanderRow, _state) + reset_state(GtkAccessible(instance), _state) + end + function set_accessible_parent(instance::AdwExpanderRow, _parent::Maybe(GtkAccessible), _next_sibling::Maybe(GtkAccessible)) + set_accessible_parent(GtkAccessible(instance), _parent, _next_sibling) + end + function update_next_accessible_sibling(instance::AdwExpanderRow, _new_sibling::Maybe(GtkAccessible)) + update_next_accessible_sibling(GtkAccessible(instance), _new_sibling) + end + function update_property(instance::AdwExpanderRow, _properties, _values) + update_property(GtkAccessible(instance), _properties, _values) + end + function update_relation(instance::AdwExpanderRow, _relations, _values) + update_relation(GtkAccessible(instance), _relations, _values) + end + function update_state(instance::AdwExpanderRow, _states, _values) + update_state(GtkAccessible(instance), _states, _values) + end + function get_action_name(instance::AdwExpanderRow) + get_action_name(GtkActionable(instance)) + end + function get_action_target_value(instance::AdwExpanderRow) + get_action_target_value(GtkActionable(instance)) + end + function set_action_name(instance::AdwExpanderRow, _action_name::Maybe(Union{AbstractString, Symbol})) + set_action_name(GtkActionable(instance), _action_name) + end + function set_action_target_value(instance::AdwExpanderRow, _target_value::Maybe(GVariant)) + set_action_target_value(GtkActionable(instance), _target_value) + end + function set_detailed_action_name(instance::AdwExpanderRow, _detailed_action_name::Union{AbstractString, Symbol}) + set_detailed_action_name(GtkActionable(instance), _detailed_action_name) + end + function get_buildable_id(instance::AdwExpanderRow) + get_buildable_id(GtkBuildable(instance)) + end + function Flap_new() + ret = ccall(("adw_flap_new", libadwaita), Ptr{GObject}, ()) + ret2 = AdwFlapLeaf(ret, false) + ret2 + end + function get_content(instance::AdwFlap) + ret = ccall(("adw_flap_get_content", libadwaita), Ptr{GObject}, (Ptr{GObject},), instance) + ret2 = convert_if_not_null(GtkWidget, ret, false) + ret2 + end + function get_flap(instance::AdwFlap) + ret = ccall(("adw_flap_get_flap", libadwaita), Ptr{GObject}, (Ptr{GObject},), instance) + ret2 = convert_if_not_null(GtkWidget, ret, false) + ret2 + end + function get_flap_position(instance::AdwFlap) + ret = ccall(("adw_flap_get_flap_position", libadwaita), UInt32, (Ptr{GObject},), instance) + ret2 = PackType(ret) + ret2 + end + function get_fold_duration(instance::AdwFlap) + ret = ccall(("adw_flap_get_fold_duration", libadwaita), UInt32, (Ptr{GObject},), instance) + ret + end + function get_fold_policy(instance::AdwFlap) + ret = ccall(("adw_flap_get_fold_policy", libadwaita), UInt32, (Ptr{GObject},), instance) + ret2 = FlapFoldPolicy(ret) + ret2 + end + function get_fold_threshold_policy(instance::AdwFlap) + ret = ccall(("adw_flap_get_fold_threshold_policy", libadwaita), UInt32, (Ptr{GObject},), instance) + ret2 = FoldThresholdPolicy(ret) + ret2 + end + function get_folded(instance::AdwFlap) + ret = ccall(("adw_flap_get_folded", libadwaita), Cint, (Ptr{GObject},), instance) + ret2 = convert(Bool, ret) + ret2 + end + function get_locked(instance::AdwFlap) + ret = ccall(("adw_flap_get_locked", libadwaita), Cint, (Ptr{GObject},), instance) + ret2 = convert(Bool, ret) + ret2 + end + function get_modal(instance::AdwFlap) + ret = ccall(("adw_flap_get_modal", libadwaita), Cint, (Ptr{GObject},), instance) + ret2 = convert(Bool, ret) + ret2 + end + function get_reveal_flap(instance::AdwFlap) + ret = ccall(("adw_flap_get_reveal_flap", libadwaita), Cint, (Ptr{GObject},), instance) + ret2 = convert(Bool, ret) + ret2 + end + function get_reveal_params(instance::AdwFlap) + ret = ccall(("adw_flap_get_reveal_params", libadwaita), Ptr{AdwSpringParams}, (Ptr{GObject},), instance) + ret2 = convert(AdwSpringParams, ret, true) + ret2 + end + function get_reveal_progress(instance::AdwFlap) + ret = ccall(("adw_flap_get_reveal_progress", libadwaita), Float64, (Ptr{GObject},), instance) + ret + end + function get_separator(instance::AdwFlap) + ret = ccall(("adw_flap_get_separator", libadwaita), Ptr{GObject}, (Ptr{GObject},), instance) + ret2 = convert_if_not_null(GtkWidget, ret, false) + ret2 + end + function get_swipe_to_close(instance::AdwFlap) + ret = ccall(("adw_flap_get_swipe_to_close", libadwaita), Cint, (Ptr{GObject},), instance) + ret2 = convert(Bool, ret) + ret2 + end + function get_swipe_to_open(instance::AdwFlap) + ret = ccall(("adw_flap_get_swipe_to_open", libadwaita), Cint, (Ptr{GObject},), instance) + ret2 = convert(Bool, ret) + ret2 + end + function get_transition_type(instance::AdwFlap) + ret = ccall(("adw_flap_get_transition_type", libadwaita), UInt32, (Ptr{GObject},), instance) + ret2 = FlapTransitionType(ret) + ret2 + end + function set_content(instance::AdwFlap, _content::Maybe(GtkWidget)) + _content_maybe = nothing_to_null(_content) + ret = ccall(("adw_flap_set_content", libadwaita), Nothing, (Ptr{GObject}, Ptr{GObject}), instance, _content_maybe) + nothing + end + function set_flap(instance::AdwFlap, _flap::Maybe(GtkWidget)) + _flap_maybe = nothing_to_null(_flap) + ret = ccall(("adw_flap_set_flap", libadwaita), Nothing, (Ptr{GObject}, Ptr{GObject}), instance, _flap_maybe) + nothing + end + function set_flap_position(instance::AdwFlap, _position) + ret = ccall(("adw_flap_set_flap_position", libadwaita), Nothing, (Ptr{GObject}, UInt32), instance, _position) + nothing + end + function set_fold_duration(instance::AdwFlap, _duration::Integer) + ret = ccall(("adw_flap_set_fold_duration", libadwaita), Nothing, (Ptr{GObject}, UInt32), instance, _duration) + nothing + end + function set_fold_policy(instance::AdwFlap, _policy) + ret = ccall(("adw_flap_set_fold_policy", libadwaita), Nothing, (Ptr{GObject}, UInt32), instance, _policy) + nothing + end + function set_fold_threshold_policy(instance::AdwFlap, _policy) + ret = ccall(("adw_flap_set_fold_threshold_policy", libadwaita), Nothing, (Ptr{GObject}, UInt32), instance, _policy) + nothing + end + function set_locked(instance::AdwFlap, _locked::Bool) + ret = ccall(("adw_flap_set_locked", libadwaita), Nothing, (Ptr{GObject}, Cint), instance, _locked) + nothing + end + function set_modal(instance::AdwFlap, _modal::Bool) + ret = ccall(("adw_flap_set_modal", libadwaita), Nothing, (Ptr{GObject}, Cint), instance, _modal) + nothing + end + function set_reveal_flap(instance::AdwFlap, _reveal_flap::Bool) + ret = ccall(("adw_flap_set_reveal_flap", libadwaita), Nothing, (Ptr{GObject}, Cint), instance, _reveal_flap) + nothing + end + function set_reveal_params(instance::AdwFlap, _params::AdwSpringParams) + ret = ccall(("adw_flap_set_reveal_params", libadwaita), Nothing, (Ptr{GObject}, Ptr{AdwSpringParams}), instance, _params) + nothing + end + function set_separator(instance::AdwFlap, _separator::Maybe(GtkWidget)) + _separator_maybe = nothing_to_null(_separator) + ret = ccall(("adw_flap_set_separator", libadwaita), Nothing, (Ptr{GObject}, Ptr{GObject}), instance, _separator_maybe) + nothing + end + function set_swipe_to_close(instance::AdwFlap, _swipe_to_close::Bool) + ret = ccall(("adw_flap_set_swipe_to_close", libadwaita), Nothing, (Ptr{GObject}, Cint), instance, _swipe_to_close) + nothing + end + function set_swipe_to_open(instance::AdwFlap, _swipe_to_open::Bool) + ret = ccall(("adw_flap_set_swipe_to_open", libadwaita), Nothing, (Ptr{GObject}, Cint), instance, _swipe_to_open) + nothing + end + function set_transition_type(instance::AdwFlap, _transition_type) + ret = ccall(("adw_flap_set_transition_type", libadwaita), Nothing, (Ptr{GObject}, UInt32), instance, _transition_type) + nothing + end + function get_cancel_progress(instance::AdwFlap) + get_cancel_progress(AdwSwipeable(instance)) + end + function get_distance(instance::AdwFlap) + get_distance(AdwSwipeable(instance)) + end + function get_progress(instance::AdwFlap) + get_progress(AdwSwipeable(instance)) + end + function get_snap_points(instance::AdwFlap) + get_snap_points(AdwSwipeable(instance)) + end + function get_swipe_area(instance::AdwFlap, _navigation_direction, _is_drag::Bool) + get_swipe_area(AdwSwipeable(instance), _navigation_direction, _is_drag) + end + function announce(instance::AdwFlap, _message::Union{AbstractString, Symbol}, _priority) + announce(GtkAccessible(instance), _message, _priority) + end + function get_accessible_parent(instance::AdwFlap) + get_accessible_parent(GtkAccessible(instance)) + end + function get_accessible_role(instance::AdwFlap) + get_accessible_role(GtkAccessible(instance)) + end + function get_at_context(instance::AdwFlap) + get_at_context(GtkAccessible(instance)) + end + function get_bounds(instance::AdwFlap) + get_bounds(GtkAccessible(instance)) + end + function get_first_accessible_child(instance::AdwFlap) + get_first_accessible_child(GtkAccessible(instance)) + end + function get_next_accessible_sibling(instance::AdwFlap) + get_next_accessible_sibling(GtkAccessible(instance)) + end + function get_platform_state(instance::AdwFlap, _state) + get_platform_state(GtkAccessible(instance), _state) + end + function reset_property(instance::AdwFlap, _property) + reset_property(GtkAccessible(instance), _property) + end + function reset_relation(instance::AdwFlap, _relation) + reset_relation(GtkAccessible(instance), _relation) + end + function reset_state(instance::AdwFlap, _state) + reset_state(GtkAccessible(instance), _state) + end + function set_accessible_parent(instance::AdwFlap, _parent::Maybe(GtkAccessible), _next_sibling::Maybe(GtkAccessible)) + set_accessible_parent(GtkAccessible(instance), _parent, _next_sibling) + end + function update_next_accessible_sibling(instance::AdwFlap, _new_sibling::Maybe(GtkAccessible)) + update_next_accessible_sibling(GtkAccessible(instance), _new_sibling) + end + function update_property(instance::AdwFlap, _properties, _values) + update_property(GtkAccessible(instance), _properties, _values) + end + function update_relation(instance::AdwFlap, _relations, _values) + update_relation(GtkAccessible(instance), _relations, _values) + end + function update_state(instance::AdwFlap, _states, _values) + update_state(GtkAccessible(instance), _states, _values) + end + function get_buildable_id(instance::AdwFlap) + get_buildable_id(GtkBuildable(instance)) + end + function get_orientation(instance::AdwFlap) + get_orientation(GtkOrientable(instance)) + end + function set_orientation(instance::AdwFlap, _orientation) + set_orientation(GtkOrientable(instance), _orientation) + end + function HeaderBar_new() + ret = ccall(("adw_header_bar_new", libadwaita), Ptr{GObject}, ()) + ret2 = AdwHeaderBarLeaf(ret, false) + ret2 + end + function get_centering_policy(instance::AdwHeaderBar) + ret = ccall(("adw_header_bar_get_centering_policy", libadwaita), UInt32, (Ptr{GObject},), instance) + ret2 = CenteringPolicy(ret) + ret2 + end + function get_decoration_layout(instance::AdwHeaderBar) + ret = ccall(("adw_header_bar_get_decoration_layout", libadwaita), Cstring, (Ptr{GObject},), instance) + ret2 = string_or_nothing(ret, false) + ret2 + end + function get_show_back_button(instance::AdwHeaderBar) + ret = ccall(("adw_header_bar_get_show_back_button", libadwaita), Cint, (Ptr{GObject},), instance) + ret2 = convert(Bool, ret) + ret2 + end + function get_show_end_title_buttons(instance::AdwHeaderBar) + ret = ccall(("adw_header_bar_get_show_end_title_buttons", libadwaita), Cint, (Ptr{GObject},), instance) + ret2 = convert(Bool, ret) + ret2 + end + function get_show_start_title_buttons(instance::AdwHeaderBar) + ret = ccall(("adw_header_bar_get_show_start_title_buttons", libadwaita), Cint, (Ptr{GObject},), instance) + ret2 = convert(Bool, ret) + ret2 + end + function get_show_title(instance::AdwHeaderBar) + ret = ccall(("adw_header_bar_get_show_title", libadwaita), Cint, (Ptr{GObject},), instance) + ret2 = convert(Bool, ret) + ret2 + end + function get_title_widget(instance::AdwHeaderBar) + ret = ccall(("adw_header_bar_get_title_widget", libadwaita), Ptr{GObject}, (Ptr{GObject},), instance) + ret2 = convert_if_not_null(GtkWidget, ret, false) + ret2 + end + function pack_end(instance::AdwHeaderBar, _child::GtkWidget) + ret = ccall(("adw_header_bar_pack_end", libadwaita), Nothing, (Ptr{GObject}, Ptr{GObject}), instance, _child) + nothing + end + function pack_start(instance::AdwHeaderBar, _child::GtkWidget) + ret = ccall(("adw_header_bar_pack_start", libadwaita), Nothing, (Ptr{GObject}, Ptr{GObject}), instance, _child) + nothing + end + function remove(instance::AdwHeaderBar, _child::GtkWidget) + ret = ccall(("adw_header_bar_remove", libadwaita), Nothing, (Ptr{GObject}, Ptr{GObject}), instance, _child) + nothing + end + function set_centering_policy(instance::AdwHeaderBar, _centering_policy) + ret = ccall(("adw_header_bar_set_centering_policy", libadwaita), Nothing, (Ptr{GObject}, UInt32), instance, _centering_policy) + nothing + end + function set_decoration_layout(instance::AdwHeaderBar, _layout::Maybe(Union{AbstractString, Symbol})) + _layout_maybe = nothing_to_null(_layout) + ret = ccall(("adw_header_bar_set_decoration_layout", libadwaita), Nothing, (Ptr{GObject}, Cstring), instance, _layout_maybe) + nothing + end + function set_show_back_button(instance::AdwHeaderBar, _show_back_button::Bool) + ret = ccall(("adw_header_bar_set_show_back_button", libadwaita), Nothing, (Ptr{GObject}, Cint), instance, _show_back_button) + nothing + end + function set_show_end_title_buttons(instance::AdwHeaderBar, _setting::Bool) + ret = ccall(("adw_header_bar_set_show_end_title_buttons", libadwaita), Nothing, (Ptr{GObject}, Cint), instance, _setting) + nothing + end + function set_show_start_title_buttons(instance::AdwHeaderBar, _setting::Bool) + ret = ccall(("adw_header_bar_set_show_start_title_buttons", libadwaita), Nothing, (Ptr{GObject}, Cint), instance, _setting) + nothing + end + function set_show_title(instance::AdwHeaderBar, _show_title::Bool) + ret = ccall(("adw_header_bar_set_show_title", libadwaita), Nothing, (Ptr{GObject}, Cint), instance, _show_title) + nothing + end + function set_title_widget(instance::AdwHeaderBar, _title_widget::Maybe(GtkWidget)) + _title_widget_maybe = nothing_to_null(_title_widget) + ret = ccall(("adw_header_bar_set_title_widget", libadwaita), Nothing, (Ptr{GObject}, Ptr{GObject}), instance, _title_widget_maybe) + nothing + end + function announce(instance::AdwHeaderBar, _message::Union{AbstractString, Symbol}, _priority) + announce(GtkAccessible(instance), _message, _priority) + end + function get_accessible_parent(instance::AdwHeaderBar) + get_accessible_parent(GtkAccessible(instance)) + end + function get_accessible_role(instance::AdwHeaderBar) + get_accessible_role(GtkAccessible(instance)) + end + function get_at_context(instance::AdwHeaderBar) + get_at_context(GtkAccessible(instance)) + end + function get_bounds(instance::AdwHeaderBar) + get_bounds(GtkAccessible(instance)) + end + function get_first_accessible_child(instance::AdwHeaderBar) + get_first_accessible_child(GtkAccessible(instance)) + end + function get_next_accessible_sibling(instance::AdwHeaderBar) + get_next_accessible_sibling(GtkAccessible(instance)) + end + function get_platform_state(instance::AdwHeaderBar, _state) + get_platform_state(GtkAccessible(instance), _state) + end + function reset_property(instance::AdwHeaderBar, _property) + reset_property(GtkAccessible(instance), _property) + end + function reset_relation(instance::AdwHeaderBar, _relation) + reset_relation(GtkAccessible(instance), _relation) + end + function reset_state(instance::AdwHeaderBar, _state) + reset_state(GtkAccessible(instance), _state) + end + function set_accessible_parent(instance::AdwHeaderBar, _parent::Maybe(GtkAccessible), _next_sibling::Maybe(GtkAccessible)) + set_accessible_parent(GtkAccessible(instance), _parent, _next_sibling) + end + function update_next_accessible_sibling(instance::AdwHeaderBar, _new_sibling::Maybe(GtkAccessible)) + update_next_accessible_sibling(GtkAccessible(instance), _new_sibling) + end + function update_property(instance::AdwHeaderBar, _properties, _values) + update_property(GtkAccessible(instance), _properties, _values) + end + function update_relation(instance::AdwHeaderBar, _relations, _values) + update_relation(GtkAccessible(instance), _relations, _values) + end + function update_state(instance::AdwHeaderBar, _states, _values) + update_state(GtkAccessible(instance), _states, _values) + end + function get_buildable_id(instance::AdwHeaderBar) + get_buildable_id(GtkBuildable(instance)) + end + function Leaflet_new() + ret = ccall(("adw_leaflet_new", libadwaita), Ptr{GObject}, ()) + ret2 = AdwLeafletLeaf(ret, false) + ret2 + end + function append(instance::AdwLeaflet, _child::GtkWidget) + ret = ccall(("adw_leaflet_append", libadwaita), Ptr{GObject}, (Ptr{GObject}, Ptr{GObject}), instance, _child) + ret2 = convert(AdwLeafletPage, ret, false) + ret2 + end + function get_adjacent_child(instance::AdwLeaflet, _direction) + ret = ccall(("adw_leaflet_get_adjacent_child", libadwaita), Ptr{GObject}, (Ptr{GObject}, UInt32), instance, _direction) + ret2 = convert_if_not_null(GtkWidget, ret, false) + ret2 + end + function get_can_navigate_back(instance::AdwLeaflet) + ret = ccall(("adw_leaflet_get_can_navigate_back", libadwaita), Cint, (Ptr{GObject},), instance) + ret2 = convert(Bool, ret) + ret2 + end + function get_can_navigate_forward(instance::AdwLeaflet) + ret = ccall(("adw_leaflet_get_can_navigate_forward", libadwaita), Cint, (Ptr{GObject},), instance) + ret2 = convert(Bool, ret) + ret2 + end + function get_can_unfold(instance::AdwLeaflet) + ret = ccall(("adw_leaflet_get_can_unfold", libadwaita), Cint, (Ptr{GObject},), instance) + ret2 = convert(Bool, ret) + ret2 + end + function get_child_by_name(instance::AdwLeaflet, _name::Union{AbstractString, Symbol}) + ret = ccall(("adw_leaflet_get_child_by_name", libadwaita), Ptr{GObject}, (Ptr{GObject}, Cstring), instance, _name) + ret2 = convert_if_not_null(GtkWidget, ret, false) + ret2 + end + function get_child_transition_params(instance::AdwLeaflet) + ret = ccall(("adw_leaflet_get_child_transition_params", libadwaita), Ptr{AdwSpringParams}, (Ptr{GObject},), instance) + ret2 = convert(AdwSpringParams, ret, true) + ret2 + end + function get_child_transition_running(instance::AdwLeaflet) + ret = ccall(("adw_leaflet_get_child_transition_running", libadwaita), Cint, (Ptr{GObject},), instance) + ret2 = convert(Bool, ret) + ret2 + end + function get_fold_threshold_policy(instance::AdwLeaflet) + ret = ccall(("adw_leaflet_get_fold_threshold_policy", libadwaita), UInt32, (Ptr{GObject},), instance) + ret2 = FoldThresholdPolicy(ret) + ret2 + end + function get_folded(instance::AdwLeaflet) + ret = ccall(("adw_leaflet_get_folded", libadwaita), Cint, (Ptr{GObject},), instance) + ret2 = convert(Bool, ret) + ret2 + end + function get_homogeneous(instance::AdwLeaflet) + ret = ccall(("adw_leaflet_get_homogeneous", libadwaita), Cint, (Ptr{GObject},), instance) + ret2 = convert(Bool, ret) + ret2 + end + function get_mode_transition_duration(instance::AdwLeaflet) + ret = ccall(("adw_leaflet_get_mode_transition_duration", libadwaita), UInt32, (Ptr{GObject},), instance) + ret + end + function get_page(instance::AdwLeaflet, _child::GtkWidget) + ret = ccall(("adw_leaflet_get_page", libadwaita), Ptr{GObject}, (Ptr{GObject}, Ptr{GObject}), instance, _child) + ret2 = convert(AdwLeafletPage, ret, false) + ret2 + end + function get_pages(instance::AdwLeaflet) + ret = ccall(("adw_leaflet_get_pages", libadwaita), Ptr{GObject}, (Ptr{GObject},), instance) + ret2 = begin + leaftype = GLib.find_leaf_type(ret) + convert(leaftype, ret, true) + end + ret2 + end + function get_transition_type(instance::AdwLeaflet) + ret = ccall(("adw_leaflet_get_transition_type", libadwaita), UInt32, (Ptr{GObject},), instance) + ret2 = LeafletTransitionType(ret) + ret2 + end + function get_visible_child(instance::AdwLeaflet) + ret = ccall(("adw_leaflet_get_visible_child", libadwaita), Ptr{GObject}, (Ptr{GObject},), instance) + ret2 = convert_if_not_null(GtkWidget, ret, false) + ret2 + end + function get_visible_child_name(instance::AdwLeaflet) + ret = ccall(("adw_leaflet_get_visible_child_name", libadwaita), Cstring, (Ptr{GObject},), instance) + ret2 = string_or_nothing(ret, false) + ret2 + end + function insert_child_after(instance::AdwLeaflet, _child::GtkWidget, _sibling::Maybe(GtkWidget)) + _sibling_maybe = nothing_to_null(_sibling) + ret = ccall(("adw_leaflet_insert_child_after", libadwaita), Ptr{GObject}, (Ptr{GObject}, Ptr{GObject}, Ptr{GObject}), instance, _child, _sibling_maybe) + ret2 = convert(AdwLeafletPage, ret, false) + ret2 + end + function navigate(instance::AdwLeaflet, _direction) + ret = ccall(("adw_leaflet_navigate", libadwaita), Cint, (Ptr{GObject}, UInt32), instance, _direction) + ret2 = convert(Bool, ret) + ret2 + end + function prepend(instance::AdwLeaflet, _child::GtkWidget) + ret = ccall(("adw_leaflet_prepend", libadwaita), Ptr{GObject}, (Ptr{GObject}, Ptr{GObject}), instance, _child) + ret2 = convert(AdwLeafletPage, ret, false) + ret2 + end + function remove(instance::AdwLeaflet, _child::GtkWidget) + ret = ccall(("adw_leaflet_remove", libadwaita), Nothing, (Ptr{GObject}, Ptr{GObject}), instance, _child) + nothing + end + function reorder_child_after(instance::AdwLeaflet, _child::GtkWidget, _sibling::Maybe(GtkWidget)) + _sibling_maybe = nothing_to_null(_sibling) + ret = ccall(("adw_leaflet_reorder_child_after", libadwaita), Nothing, (Ptr{GObject}, Ptr{GObject}, Ptr{GObject}), instance, _child, _sibling_maybe) + nothing + end + function set_can_navigate_back(instance::AdwLeaflet, _can_navigate_back::Bool) + ret = ccall(("adw_leaflet_set_can_navigate_back", libadwaita), Nothing, (Ptr{GObject}, Cint), instance, _can_navigate_back) + nothing + end + function set_can_navigate_forward(instance::AdwLeaflet, _can_navigate_forward::Bool) + ret = ccall(("adw_leaflet_set_can_navigate_forward", libadwaita), Nothing, (Ptr{GObject}, Cint), instance, _can_navigate_forward) + nothing + end + function set_can_unfold(instance::AdwLeaflet, _can_unfold::Bool) + ret = ccall(("adw_leaflet_set_can_unfold", libadwaita), Nothing, (Ptr{GObject}, Cint), instance, _can_unfold) + nothing + end + function set_child_transition_params(instance::AdwLeaflet, _params::AdwSpringParams) + ret = ccall(("adw_leaflet_set_child_transition_params", libadwaita), Nothing, (Ptr{GObject}, Ptr{AdwSpringParams}), instance, _params) + nothing + end + function set_fold_threshold_policy(instance::AdwLeaflet, _policy) + ret = ccall(("adw_leaflet_set_fold_threshold_policy", libadwaita), Nothing, (Ptr{GObject}, UInt32), instance, _policy) + nothing + end + function set_homogeneous(instance::AdwLeaflet, _homogeneous::Bool) + ret = ccall(("adw_leaflet_set_homogeneous", libadwaita), Nothing, (Ptr{GObject}, Cint), instance, _homogeneous) + nothing + end + function set_mode_transition_duration(instance::AdwLeaflet, _duration::Integer) + ret = ccall(("adw_leaflet_set_mode_transition_duration", libadwaita), Nothing, (Ptr{GObject}, UInt32), instance, _duration) + nothing + end + function set_transition_type(instance::AdwLeaflet, _transition) + ret = ccall(("adw_leaflet_set_transition_type", libadwaita), Nothing, (Ptr{GObject}, UInt32), instance, _transition) + nothing + end + function set_visible_child(instance::AdwLeaflet, _visible_child::GtkWidget) + ret = ccall(("adw_leaflet_set_visible_child", libadwaita), Nothing, (Ptr{GObject}, Ptr{GObject}), instance, _visible_child) + nothing + end + function set_visible_child_name(instance::AdwLeaflet, _name::Union{AbstractString, Symbol}) + ret = ccall(("adw_leaflet_set_visible_child_name", libadwaita), Nothing, (Ptr{GObject}, Cstring), instance, _name) + nothing + end + function get_cancel_progress(instance::AdwLeaflet) + get_cancel_progress(AdwSwipeable(instance)) + end + function get_distance(instance::AdwLeaflet) + get_distance(AdwSwipeable(instance)) + end + function get_progress(instance::AdwLeaflet) + get_progress(AdwSwipeable(instance)) + end + function get_snap_points(instance::AdwLeaflet) + get_snap_points(AdwSwipeable(instance)) + end + function get_swipe_area(instance::AdwLeaflet, _navigation_direction, _is_drag::Bool) + get_swipe_area(AdwSwipeable(instance), _navigation_direction, _is_drag) + end + function announce(instance::AdwLeaflet, _message::Union{AbstractString, Symbol}, _priority) + announce(GtkAccessible(instance), _message, _priority) + end + function get_accessible_parent(instance::AdwLeaflet) + get_accessible_parent(GtkAccessible(instance)) + end + function get_accessible_role(instance::AdwLeaflet) + get_accessible_role(GtkAccessible(instance)) + end + function get_at_context(instance::AdwLeaflet) + get_at_context(GtkAccessible(instance)) + end + function get_bounds(instance::AdwLeaflet) + get_bounds(GtkAccessible(instance)) + end + function get_first_accessible_child(instance::AdwLeaflet) + get_first_accessible_child(GtkAccessible(instance)) + end + function get_next_accessible_sibling(instance::AdwLeaflet) + get_next_accessible_sibling(GtkAccessible(instance)) + end + function get_platform_state(instance::AdwLeaflet, _state) + get_platform_state(GtkAccessible(instance), _state) + end + function reset_property(instance::AdwLeaflet, _property) + reset_property(GtkAccessible(instance), _property) + end + function reset_relation(instance::AdwLeaflet, _relation) + reset_relation(GtkAccessible(instance), _relation) + end + function reset_state(instance::AdwLeaflet, _state) + reset_state(GtkAccessible(instance), _state) + end + function set_accessible_parent(instance::AdwLeaflet, _parent::Maybe(GtkAccessible), _next_sibling::Maybe(GtkAccessible)) + set_accessible_parent(GtkAccessible(instance), _parent, _next_sibling) + end + function update_next_accessible_sibling(instance::AdwLeaflet, _new_sibling::Maybe(GtkAccessible)) + update_next_accessible_sibling(GtkAccessible(instance), _new_sibling) + end + function update_property(instance::AdwLeaflet, _properties, _values) + update_property(GtkAccessible(instance), _properties, _values) + end + function update_relation(instance::AdwLeaflet, _relations, _values) + update_relation(GtkAccessible(instance), _relations, _values) + end + function update_state(instance::AdwLeaflet, _states, _values) + update_state(GtkAccessible(instance), _states, _values) + end + function get_buildable_id(instance::AdwLeaflet) + get_buildable_id(GtkBuildable(instance)) + end + function get_orientation(instance::AdwLeaflet) + get_orientation(GtkOrientable(instance)) + end + function set_orientation(instance::AdwLeaflet, _orientation) + set_orientation(GtkOrientable(instance), _orientation) + end + function get_child(instance::AdwLeafletPage) + ret = ccall(("adw_leaflet_page_get_child", libadwaita), Ptr{GObject}, (Ptr{GObject},), instance) + ret2 = convert(GtkWidget, ret, false) + ret2 + end + function get_name(instance::AdwLeafletPage) + ret = ccall(("adw_leaflet_page_get_name", libadwaita), Cstring, (Ptr{GObject},), instance) + ret2 = string_or_nothing(ret, false) + ret2 + end + function get_navigatable(instance::AdwLeafletPage) + ret = ccall(("adw_leaflet_page_get_navigatable", libadwaita), Cint, (Ptr{GObject},), instance) + ret2 = convert(Bool, ret) + ret2 + end + function set_name(instance::AdwLeafletPage, _name::Maybe(Union{AbstractString, Symbol})) + _name_maybe = nothing_to_null(_name) + ret = ccall(("adw_leaflet_page_set_name", libadwaita), Nothing, (Ptr{GObject}, Cstring), instance, _name_maybe) + nothing + end + function set_navigatable(instance::AdwLeafletPage, _navigatable::Bool) + ret = ccall(("adw_leaflet_page_set_navigatable", libadwaita), Nothing, (Ptr{GObject}, Cint), instance, _navigatable) + nothing + end + function MessageDialog_new(_parent::Maybe(GtkWindow), _heading::Maybe(Union{AbstractString, Symbol}), _body::Maybe(Union{AbstractString, Symbol})) + _parent_maybe = nothing_to_null(_parent) + _heading_maybe = nothing_to_null(_heading) + _body_maybe = nothing_to_null(_body) + ret = ccall(("adw_message_dialog_new", libadwaita), Ptr{GObject}, (Ptr{GObject}, Cstring, Cstring), _parent_maybe, _heading_maybe, _body_maybe) + ret2 = AdwMessageDialogLeaf(ret, false) + ret2 + end + function add_response(instance::AdwMessageDialog, _id::Union{AbstractString, Symbol}, _label::Union{AbstractString, Symbol}) + ret = ccall(("adw_message_dialog_add_response", libadwaita), Nothing, (Ptr{GObject}, Cstring, Cstring), instance, _id, _label) + nothing + end + function choose(instance::AdwMessageDialog, _cancellable::Maybe(GCancellable), _callback::Maybe(Function)) + _cancellable_maybe = nothing_to_null(_cancellable) + if _callback === nothing + _callback_cfunc = C_NULL + _callback_closure = C_NULL + else + _callback_cfunc = @cfunction(GAsyncReadyCallback, Nothing, (Ptr{GObject}, Ptr{GObject}, Ref{Function})) + _callback_closure = GLib.gc_ref(_callback) + end + ret = ccall(("adw_message_dialog_choose", libadwaita), Nothing, (Ptr{GObject}, Ptr{GObject}, Ptr{Cvoid}, Ptr{Nothing}), instance, _cancellable_maybe, _callback_cfunc, _callback_closure) + nothing + end + function choose_finish(instance::AdwMessageDialog, _result::GAsyncResult) + ret = ccall(("adw_message_dialog_choose_finish", libadwaita), Cstring, (Ptr{GObject}, Ptr{GObject}), instance, _result) + ret2 = string_or_nothing(ret, false) + ret2 + end + function get_body(instance::AdwMessageDialog) + ret = ccall(("adw_message_dialog_get_body", libadwaita), Cstring, (Ptr{GObject},), instance) + ret2 = string_or_nothing(ret, false) + ret2 + end + function get_body_use_markup(instance::AdwMessageDialog) + ret = ccall(("adw_message_dialog_get_body_use_markup", libadwaita), Cint, (Ptr{GObject},), instance) + ret2 = convert(Bool, ret) + ret2 + end + function get_close_response(instance::AdwMessageDialog) + ret = ccall(("adw_message_dialog_get_close_response", libadwaita), Cstring, (Ptr{GObject},), instance) + ret2 = string_or_nothing(ret, false) + ret2 + end + function get_default_response(instance::AdwMessageDialog) + ret = ccall(("adw_message_dialog_get_default_response", libadwaita), Cstring, (Ptr{GObject},), instance) + ret2 = string_or_nothing(ret, false) + ret2 + end + function get_extra_child(instance::AdwMessageDialog) + ret = ccall(("adw_message_dialog_get_extra_child", libadwaita), Ptr{GObject}, (Ptr{GObject},), instance) + ret2 = convert_if_not_null(GtkWidget, ret, false) + ret2 + end + function get_heading(instance::AdwMessageDialog) + ret = ccall(("adw_message_dialog_get_heading", libadwaita), Cstring, (Ptr{GObject},), instance) + ret2 = string_or_nothing(ret, false) + ret2 + end + function get_heading_use_markup(instance::AdwMessageDialog) + ret = ccall(("adw_message_dialog_get_heading_use_markup", libadwaita), Cint, (Ptr{GObject},), instance) + ret2 = convert(Bool, ret) + ret2 + end + function get_response_appearance(instance::AdwMessageDialog, _response::Union{AbstractString, Symbol}) + ret = ccall(("adw_message_dialog_get_response_appearance", libadwaita), UInt32, (Ptr{GObject}, Cstring), instance, _response) + ret2 = ResponseAppearance(ret) + ret2 + end + function get_response_enabled(instance::AdwMessageDialog, _response::Union{AbstractString, Symbol}) + ret = ccall(("adw_message_dialog_get_response_enabled", libadwaita), Cint, (Ptr{GObject}, Cstring), instance, _response) + ret2 = convert(Bool, ret) + ret2 + end + function get_response_label(instance::AdwMessageDialog, _response::Union{AbstractString, Symbol}) + ret = ccall(("adw_message_dialog_get_response_label", libadwaita), Cstring, (Ptr{GObject}, Cstring), instance, _response) + ret2 = string_or_nothing(ret, false) + ret2 + end + function has_response(instance::AdwMessageDialog, _response::Union{AbstractString, Symbol}) + ret = ccall(("adw_message_dialog_has_response", libadwaita), Cint, (Ptr{GObject}, Cstring), instance, _response) + ret2 = convert(Bool, ret) + ret2 + end + function remove_response(instance::AdwMessageDialog, _id::Union{AbstractString, Symbol}) + ret = ccall(("adw_message_dialog_remove_response", libadwaita), Nothing, (Ptr{GObject}, Cstring), instance, _id) + nothing + end + function response(instance::AdwMessageDialog, _response::Union{AbstractString, Symbol}) + ret = ccall(("adw_message_dialog_response", libadwaita), Nothing, (Ptr{GObject}, Cstring), instance, _response) + nothing + end + function set_body(instance::AdwMessageDialog, _body::Union{AbstractString, Symbol}) + ret = ccall(("adw_message_dialog_set_body", libadwaita), Nothing, (Ptr{GObject}, Cstring), instance, _body) + nothing + end + function set_body_use_markup(instance::AdwMessageDialog, _use_markup::Bool) + ret = ccall(("adw_message_dialog_set_body_use_markup", libadwaita), Nothing, (Ptr{GObject}, Cint), instance, _use_markup) + nothing + end + function set_close_response(instance::AdwMessageDialog, _response::Union{AbstractString, Symbol}) + ret = ccall(("adw_message_dialog_set_close_response", libadwaita), Nothing, (Ptr{GObject}, Cstring), instance, _response) + nothing + end + function set_default_response(instance::AdwMessageDialog, _response::Maybe(Union{AbstractString, Symbol})) + _response_maybe = nothing_to_null(_response) + ret = ccall(("adw_message_dialog_set_default_response", libadwaita), Nothing, (Ptr{GObject}, Cstring), instance, _response_maybe) + nothing + end + function set_extra_child(instance::AdwMessageDialog, _child::Maybe(GtkWidget)) + _child_maybe = nothing_to_null(_child) + ret = ccall(("adw_message_dialog_set_extra_child", libadwaita), Nothing, (Ptr{GObject}, Ptr{GObject}), instance, _child_maybe) + nothing + end + function set_heading(instance::AdwMessageDialog, _heading::Maybe(Union{AbstractString, Symbol})) + _heading_maybe = nothing_to_null(_heading) + ret = ccall(("adw_message_dialog_set_heading", libadwaita), Nothing, (Ptr{GObject}, Cstring), instance, _heading_maybe) + nothing + end + function set_heading_use_markup(instance::AdwMessageDialog, _use_markup::Bool) + ret = ccall(("adw_message_dialog_set_heading_use_markup", libadwaita), Nothing, (Ptr{GObject}, Cint), instance, _use_markup) + nothing + end + function set_response_appearance(instance::AdwMessageDialog, _response::Union{AbstractString, Symbol}, _appearance) + ret = ccall(("adw_message_dialog_set_response_appearance", libadwaita), Nothing, (Ptr{GObject}, Cstring, UInt32), instance, _response, _appearance) + nothing + end + function set_response_enabled(instance::AdwMessageDialog, _response::Union{AbstractString, Symbol}, _enabled::Bool) + ret = ccall(("adw_message_dialog_set_response_enabled", libadwaita), Nothing, (Ptr{GObject}, Cstring, Cint), instance, _response, _enabled) + nothing + end + function set_response_label(instance::AdwMessageDialog, _response::Union{AbstractString, Symbol}, _label::Union{AbstractString, Symbol}) + ret = ccall(("adw_message_dialog_set_response_label", libadwaita), Nothing, (Ptr{GObject}, Cstring, Cstring), instance, _response, _label) + nothing + end + function announce(instance::AdwMessageDialog, _message::Union{AbstractString, Symbol}, _priority) + announce(GtkAccessible(instance), _message, _priority) + end + function get_accessible_parent(instance::AdwMessageDialog) + get_accessible_parent(GtkAccessible(instance)) + end + function get_accessible_role(instance::AdwMessageDialog) + get_accessible_role(GtkAccessible(instance)) + end + function get_at_context(instance::AdwMessageDialog) + get_at_context(GtkAccessible(instance)) + end + function get_bounds(instance::AdwMessageDialog) + get_bounds(GtkAccessible(instance)) + end + function get_first_accessible_child(instance::AdwMessageDialog) + get_first_accessible_child(GtkAccessible(instance)) + end + function get_next_accessible_sibling(instance::AdwMessageDialog) + get_next_accessible_sibling(GtkAccessible(instance)) + end + function get_platform_state(instance::AdwMessageDialog, _state) + get_platform_state(GtkAccessible(instance), _state) + end + function reset_property(instance::AdwMessageDialog, _property) + reset_property(GtkAccessible(instance), _property) + end + function reset_relation(instance::AdwMessageDialog, _relation) + reset_relation(GtkAccessible(instance), _relation) end - function set_attributes(instance::AdwEntryRow, _attributes::Maybe(PangoAttrList)) - _attributes_maybe = nothing_to_null(_attributes) - ret = ccall(("adw_entry_row_set_attributes", libadwaita), Nothing, (Ptr{GObject}, Ptr{PangoAttrList}), instance, _attributes_maybe) - nothing + function reset_state(instance::AdwMessageDialog, _state) + reset_state(GtkAccessible(instance), _state) end - function set_enable_emoji_completion(instance::AdwEntryRow, _enable_emoji_completion::Bool) - ret = ccall(("adw_entry_row_set_enable_emoji_completion", libadwaita), Nothing, (Ptr{GObject}, Cint), instance, _enable_emoji_completion) - nothing + function set_accessible_parent(instance::AdwMessageDialog, _parent::Maybe(GtkAccessible), _next_sibling::Maybe(GtkAccessible)) + set_accessible_parent(GtkAccessible(instance), _parent, _next_sibling) end - function set_input_hints(instance::AdwEntryRow, _hints) - ret = ccall(("adw_entry_row_set_input_hints", libadwaita), Nothing, (Ptr{GObject}, UInt32), instance, _hints) - nothing + function update_next_accessible_sibling(instance::AdwMessageDialog, _new_sibling::Maybe(GtkAccessible)) + update_next_accessible_sibling(GtkAccessible(instance), _new_sibling) end - function set_input_purpose(instance::AdwEntryRow, _purpose) - ret = ccall(("adw_entry_row_set_input_purpose", libadwaita), Nothing, (Ptr{GObject}, UInt32), instance, _purpose) - nothing + function update_property(instance::AdwMessageDialog, _properties, _values) + update_property(GtkAccessible(instance), _properties, _values) end - function set_show_apply_button(instance::AdwEntryRow, _show_apply_button::Bool) - ret = ccall(("adw_entry_row_set_show_apply_button", libadwaita), Nothing, (Ptr{GObject}, Cint), instance, _show_apply_button) - nothing + function update_relation(instance::AdwMessageDialog, _relations, _values) + update_relation(GtkAccessible(instance), _relations, _values) end - function get_name(instance::AdwEnumListItem) - ret = ccall(("adw_enum_list_item_get_name", libadwaita), Cstring, (Ptr{GObject},), instance) - ret2 = string_or_nothing(ret, false) - ret2 + function update_state(instance::AdwMessageDialog, _states, _values) + update_state(GtkAccessible(instance), _states, _values) end - function get_nick(instance::AdwEnumListItem) - ret = ccall(("adw_enum_list_item_get_nick", libadwaita), Cstring, (Ptr{GObject},), instance) - ret2 = string_or_nothing(ret, false) - ret2 + function get_buildable_id(instance::AdwMessageDialog) + get_buildable_id(GtkBuildable(instance)) end - function get_value(instance::AdwEnumListItem) - ret = ccall(("adw_enum_list_item_get_value", libadwaita), Int32, (Ptr{GObject},), instance) - ret + function get_renderer(instance::AdwMessageDialog) + get_renderer(GtkNative(instance)) end - function EnumListModel_new(_enum_type::Integer) - ret = ccall(("adw_enum_list_model_new", libadwaita), Ptr{GObject}, (UInt64,), _enum_type) - ret2 = AdwEnumListModelLeaf(ret, true) - ret2 + function get_surface(instance::AdwMessageDialog) + get_surface(GtkNative(instance)) end - function find_position(instance::AdwEnumListModel, _value::Integer) - ret = ccall(("adw_enum_list_model_find_position", libadwaita), UInt32, (Ptr{GObject}, Int32), instance, _value) - ret + function get_surface_transform(instance::AdwMessageDialog) + get_surface_transform(GtkNative(instance)) end - function get_enum_type(instance::AdwEnumListModel) - ret = ccall(("adw_enum_list_model_get_enum_type", libadwaita), UInt64, (Ptr{GObject},), instance) - ret + function realize(instance::AdwMessageDialog) + realize(GtkNative(instance)) end - function ExpanderRow_new() - ret = ccall(("adw_expander_row_new", libadwaita), Ptr{GObject}, ()) - ret2 = AdwExpanderRowLeaf(ret, false) - ret2 + function unrealize(instance::AdwMessageDialog) + unrealize(GtkNative(instance)) end - function add_action(instance::AdwExpanderRow, _widget::GtkWidget) - ret = ccall(("adw_expander_row_add_action", libadwaita), Nothing, (Ptr{GObject}, Ptr{GObject}), instance, _widget) - nothing + function get_display(instance::AdwMessageDialog) + get_display(GtkRoot(instance)) end - function add_prefix(instance::AdwExpanderRow, _widget::GtkWidget) - ret = ccall(("adw_expander_row_add_prefix", libadwaita), Nothing, (Ptr{GObject}, Ptr{GObject}), instance, _widget) - nothing + function get_focus(instance::AdwMessageDialog) + get_focus(GtkRoot(instance)) end - function add_row(instance::AdwExpanderRow, _child::GtkWidget) - ret = ccall(("adw_expander_row_add_row", libadwaita), Nothing, (Ptr{GObject}, Ptr{GObject}), instance, _child) - nothing + function set_focus(instance::AdwMessageDialog, _focus::Maybe(GtkWidget)) + set_focus(GtkRoot(instance), _focus) end - function get_enable_expansion(instance::AdwExpanderRow) - ret = ccall(("adw_expander_row_get_enable_expansion", libadwaita), Cint, (Ptr{GObject},), instance) - ret2 = convert(Bool, ret) + function NavigationPage_new(_child::GtkWidget, _title::Union{AbstractString, Symbol}) + ret = ccall(("adw_navigation_page_new", libadwaita), Ptr{GObject}, (Ptr{GObject}, Cstring), _child, _title) + ret2 = AdwNavigationPageLeaf(ret, false) ret2 end - function get_expanded(instance::AdwExpanderRow) - ret = ccall(("adw_expander_row_get_expanded", libadwaita), Cint, (Ptr{GObject},), instance) + function NavigationPage_new_with_tag(_child::GtkWidget, _title::Union{AbstractString, Symbol}, _tag::Union{AbstractString, Symbol}) + ret = ccall(("adw_navigation_page_new_with_tag", libadwaita), Ptr{GObject}, (Ptr{GObject}, Cstring, Cstring), _child, _title, _tag) + ret2 = AdwNavigationPageLeaf(ret, false) + ret2 + end + function get_can_pop(instance::AdwNavigationPage) + ret = ccall(("adw_navigation_page_get_can_pop", libadwaita), Cint, (Ptr{GObject},), instance) ret2 = convert(Bool, ret) ret2 end - function get_icon_name(instance::AdwExpanderRow) - ret = ccall(("adw_expander_row_get_icon_name", libadwaita), Cstring, (Ptr{GObject},), instance) - ret2 = string_or_nothing(ret, false) + function get_child(instance::AdwNavigationPage) + ret = ccall(("adw_navigation_page_get_child", libadwaita), Ptr{GObject}, (Ptr{GObject},), instance) + ret2 = convert_if_not_null(GtkWidget, ret, false) ret2 end - function get_show_enable_switch(instance::AdwExpanderRow) - ret = ccall(("adw_expander_row_get_show_enable_switch", libadwaita), Cint, (Ptr{GObject},), instance) - ret2 = convert(Bool, ret) + function get_tag(instance::AdwNavigationPage) + ret = ccall(("adw_navigation_page_get_tag", libadwaita), Cstring, (Ptr{GObject},), instance) + ret2 = string_or_nothing(ret, false) ret2 end - function get_subtitle(instance::AdwExpanderRow) - ret = ccall(("adw_expander_row_get_subtitle", libadwaita), Cstring, (Ptr{GObject},), instance) + function get_title(instance::AdwNavigationPage) + ret = ccall(("adw_navigation_page_get_title", libadwaita), Cstring, (Ptr{GObject},), instance) ret2 = string_or_nothing(ret, false) ret2 end - function remove(instance::AdwExpanderRow, _child::GtkWidget) - ret = ccall(("adw_expander_row_remove", libadwaita), Nothing, (Ptr{GObject}, Ptr{GObject}), instance, _child) + function set_can_pop(instance::AdwNavigationPage, _can_pop::Bool) + ret = ccall(("adw_navigation_page_set_can_pop", libadwaita), Nothing, (Ptr{GObject}, Cint), instance, _can_pop) nothing end - function set_enable_expansion(instance::AdwExpanderRow, _enable_expansion::Bool) - ret = ccall(("adw_expander_row_set_enable_expansion", libadwaita), Nothing, (Ptr{GObject}, Cint), instance, _enable_expansion) + function set_child(instance::AdwNavigationPage, _child::Maybe(GtkWidget)) + _child_maybe = nothing_to_null(_child) + ret = ccall(("adw_navigation_page_set_child", libadwaita), Nothing, (Ptr{GObject}, Ptr{GObject}), instance, _child_maybe) nothing end - function set_expanded(instance::AdwExpanderRow, _expanded::Bool) - ret = ccall(("adw_expander_row_set_expanded", libadwaita), Nothing, (Ptr{GObject}, Cint), instance, _expanded) + function set_tag(instance::AdwNavigationPage, _tag::Maybe(Union{AbstractString, Symbol})) + _tag_maybe = nothing_to_null(_tag) + ret = ccall(("adw_navigation_page_set_tag", libadwaita), Nothing, (Ptr{GObject}, Cstring), instance, _tag_maybe) nothing end - function set_icon_name(instance::AdwExpanderRow, _icon_name::Maybe(Union{AbstractString, Symbol})) - _icon_name_maybe = nothing_to_null(_icon_name) - ret = ccall(("adw_expander_row_set_icon_name", libadwaita), Nothing, (Ptr{GObject}, Cstring), instance, _icon_name_maybe) + function set_title(instance::AdwNavigationPage, _title::Union{AbstractString, Symbol}) + ret = ccall(("adw_navigation_page_set_title", libadwaita), Nothing, (Ptr{GObject}, Cstring), instance, _title) nothing end - function set_show_enable_switch(instance::AdwExpanderRow, _show_enable_switch::Bool) - ret = ccall(("adw_expander_row_set_show_enable_switch", libadwaita), Nothing, (Ptr{GObject}, Cint), instance, _show_enable_switch) - nothing + function announce(instance::AdwNavigationPage, _message::Union{AbstractString, Symbol}, _priority) + announce(GtkAccessible(instance), _message, _priority) end - function set_subtitle(instance::AdwExpanderRow, _subtitle::Union{AbstractString, Symbol}) - ret = ccall(("adw_expander_row_set_subtitle", libadwaita), Nothing, (Ptr{GObject}, Cstring), instance, _subtitle) - nothing + function get_accessible_parent(instance::AdwNavigationPage) + get_accessible_parent(GtkAccessible(instance)) end - function Flap_new() - ret = ccall(("adw_flap_new", libadwaita), Ptr{GObject}, ()) - ret2 = AdwFlapLeaf(ret, false) - ret2 + function get_accessible_role(instance::AdwNavigationPage) + get_accessible_role(GtkAccessible(instance)) end - function get_content(instance::AdwFlap) - ret = ccall(("adw_flap_get_content", libadwaita), Ptr{GObject}, (Ptr{GObject},), instance) - ret2 = convert_if_not_null(GtkWidget, ret, false) - ret2 + function get_at_context(instance::AdwNavigationPage) + get_at_context(GtkAccessible(instance)) end - function get_flap(instance::AdwFlap) - ret = ccall(("adw_flap_get_flap", libadwaita), Ptr{GObject}, (Ptr{GObject},), instance) - ret2 = convert_if_not_null(GtkWidget, ret, false) - ret2 + function get_bounds(instance::AdwNavigationPage) + get_bounds(GtkAccessible(instance)) end - function get_flap_position(instance::AdwFlap) - ret = ccall(("adw_flap_get_flap_position", libadwaita), UInt32, (Ptr{GObject},), instance) - ret2 = PackType(ret) - ret2 + function get_first_accessible_child(instance::AdwNavigationPage) + get_first_accessible_child(GtkAccessible(instance)) end - function get_fold_duration(instance::AdwFlap) - ret = ccall(("adw_flap_get_fold_duration", libadwaita), UInt32, (Ptr{GObject},), instance) - ret + function get_next_accessible_sibling(instance::AdwNavigationPage) + get_next_accessible_sibling(GtkAccessible(instance)) end - function get_fold_policy(instance::AdwFlap) - ret = ccall(("adw_flap_get_fold_policy", libadwaita), UInt32, (Ptr{GObject},), instance) - ret2 = FlapFoldPolicy(ret) - ret2 + function get_platform_state(instance::AdwNavigationPage, _state) + get_platform_state(GtkAccessible(instance), _state) end - function get_fold_threshold_policy(instance::AdwFlap) - ret = ccall(("adw_flap_get_fold_threshold_policy", libadwaita), UInt32, (Ptr{GObject},), instance) - ret2 = FoldThresholdPolicy(ret) - ret2 + function reset_property(instance::AdwNavigationPage, _property) + reset_property(GtkAccessible(instance), _property) end - function get_folded(instance::AdwFlap) - ret = ccall(("adw_flap_get_folded", libadwaita), Cint, (Ptr{GObject},), instance) - ret2 = convert(Bool, ret) - ret2 + function reset_relation(instance::AdwNavigationPage, _relation) + reset_relation(GtkAccessible(instance), _relation) end - function get_locked(instance::AdwFlap) - ret = ccall(("adw_flap_get_locked", libadwaita), Cint, (Ptr{GObject},), instance) - ret2 = convert(Bool, ret) - ret2 + function reset_state(instance::AdwNavigationPage, _state) + reset_state(GtkAccessible(instance), _state) end - function get_modal(instance::AdwFlap) - ret = ccall(("adw_flap_get_modal", libadwaita), Cint, (Ptr{GObject},), instance) - ret2 = convert(Bool, ret) + function set_accessible_parent(instance::AdwNavigationPage, _parent::Maybe(GtkAccessible), _next_sibling::Maybe(GtkAccessible)) + set_accessible_parent(GtkAccessible(instance), _parent, _next_sibling) + end + function update_next_accessible_sibling(instance::AdwNavigationPage, _new_sibling::Maybe(GtkAccessible)) + update_next_accessible_sibling(GtkAccessible(instance), _new_sibling) + end + function update_property(instance::AdwNavigationPage, _properties, _values) + update_property(GtkAccessible(instance), _properties, _values) + end + function update_relation(instance::AdwNavigationPage, _relations, _values) + update_relation(GtkAccessible(instance), _relations, _values) + end + function update_state(instance::AdwNavigationPage, _states, _values) + update_state(GtkAccessible(instance), _states, _values) + end + function get_buildable_id(instance::AdwNavigationPage) + get_buildable_id(GtkBuildable(instance)) + end + function NavigationSplitView_new() + ret = ccall(("adw_navigation_split_view_new", libadwaita), Ptr{GObject}, ()) + ret2 = AdwNavigationSplitViewLeaf(ret, false) ret2 end - function get_reveal_flap(instance::AdwFlap) - ret = ccall(("adw_flap_get_reveal_flap", libadwaita), Cint, (Ptr{GObject},), instance) + function get_collapsed(instance::AdwNavigationSplitView) + ret = ccall(("adw_navigation_split_view_get_collapsed", libadwaita), Cint, (Ptr{GObject},), instance) ret2 = convert(Bool, ret) ret2 end - function get_reveal_params(instance::AdwFlap) - ret = ccall(("adw_flap_get_reveal_params", libadwaita), Ptr{AdwSpringParams}, (Ptr{GObject},), instance) - ret2 = convert(AdwSpringParams, ret, true) + function get_content(instance::AdwNavigationSplitView) + ret = ccall(("adw_navigation_split_view_get_content", libadwaita), Ptr{GObject}, (Ptr{GObject},), instance) + ret2 = convert_if_not_null(AdwNavigationPage, ret, false) ret2 end - function get_reveal_progress(instance::AdwFlap) - ret = ccall(("adw_flap_get_reveal_progress", libadwaita), Float64, (Ptr{GObject},), instance) + function get_max_sidebar_width(instance::AdwNavigationSplitView) + ret = ccall(("adw_navigation_split_view_get_max_sidebar_width", libadwaita), Float64, (Ptr{GObject},), instance) ret end - function get_separator(instance::AdwFlap) - ret = ccall(("adw_flap_get_separator", libadwaita), Ptr{GObject}, (Ptr{GObject},), instance) - ret2 = convert_if_not_null(GtkWidget, ret, false) - ret2 + function get_min_sidebar_width(instance::AdwNavigationSplitView) + ret = ccall(("adw_navigation_split_view_get_min_sidebar_width", libadwaita), Float64, (Ptr{GObject},), instance) + ret end - function get_swipe_to_close(instance::AdwFlap) - ret = ccall(("adw_flap_get_swipe_to_close", libadwaita), Cint, (Ptr{GObject},), instance) + function get_show_content(instance::AdwNavigationSplitView) + ret = ccall(("adw_navigation_split_view_get_show_content", libadwaita), Cint, (Ptr{GObject},), instance) ret2 = convert(Bool, ret) ret2 end - function get_swipe_to_open(instance::AdwFlap) - ret = ccall(("adw_flap_get_swipe_to_open", libadwaita), Cint, (Ptr{GObject},), instance) - ret2 = convert(Bool, ret) + function get_sidebar(instance::AdwNavigationSplitView) + ret = ccall(("adw_navigation_split_view_get_sidebar", libadwaita), Ptr{GObject}, (Ptr{GObject},), instance) + ret2 = convert_if_not_null(AdwNavigationPage, ret, false) ret2 end - function get_transition_type(instance::AdwFlap) - ret = ccall(("adw_flap_get_transition_type", libadwaita), UInt32, (Ptr{GObject},), instance) - ret2 = FlapTransitionType(ret) + function get_sidebar_width_fraction(instance::AdwNavigationSplitView) + ret = ccall(("adw_navigation_split_view_get_sidebar_width_fraction", libadwaita), Float64, (Ptr{GObject},), instance) + ret + end + function get_sidebar_width_unit(instance::AdwNavigationSplitView) + ret = ccall(("adw_navigation_split_view_get_sidebar_width_unit", libadwaita), UInt32, (Ptr{GObject},), instance) + ret2 = LengthUnit(ret) ret2 end - function set_content(instance::AdwFlap, _content::Maybe(GtkWidget)) - _content_maybe = nothing_to_null(_content) - ret = ccall(("adw_flap_set_content", libadwaita), Nothing, (Ptr{GObject}, Ptr{GObject}), instance, _content_maybe) + function set_collapsed(instance::AdwNavigationSplitView, _collapsed::Bool) + ret = ccall(("adw_navigation_split_view_set_collapsed", libadwaita), Nothing, (Ptr{GObject}, Cint), instance, _collapsed) nothing end - function set_flap(instance::AdwFlap, _flap::Maybe(GtkWidget)) - _flap_maybe = nothing_to_null(_flap) - ret = ccall(("adw_flap_set_flap", libadwaita), Nothing, (Ptr{GObject}, Ptr{GObject}), instance, _flap_maybe) + function set_content(instance::AdwNavigationSplitView, _content::Maybe(AdwNavigationPage)) + _content_maybe = nothing_to_null(_content) + ret = ccall(("adw_navigation_split_view_set_content", libadwaita), Nothing, (Ptr{GObject}, Ptr{GObject}), instance, _content_maybe) nothing end - function set_flap_position(instance::AdwFlap, _position) - ret = ccall(("adw_flap_set_flap_position", libadwaita), Nothing, (Ptr{GObject}, UInt32), instance, _position) + function set_max_sidebar_width(instance::AdwNavigationSplitView, _width::Real) + ret = ccall(("adw_navigation_split_view_set_max_sidebar_width", libadwaita), Nothing, (Ptr{GObject}, Float64), instance, _width) nothing end - function set_fold_duration(instance::AdwFlap, _duration::Integer) - ret = ccall(("adw_flap_set_fold_duration", libadwaita), Nothing, (Ptr{GObject}, UInt32), instance, _duration) + function set_min_sidebar_width(instance::AdwNavigationSplitView, _width::Real) + ret = ccall(("adw_navigation_split_view_set_min_sidebar_width", libadwaita), Nothing, (Ptr{GObject}, Float64), instance, _width) nothing end - function set_fold_policy(instance::AdwFlap, _policy) - ret = ccall(("adw_flap_set_fold_policy", libadwaita), Nothing, (Ptr{GObject}, UInt32), instance, _policy) + function set_show_content(instance::AdwNavigationSplitView, _show_content::Bool) + ret = ccall(("adw_navigation_split_view_set_show_content", libadwaita), Nothing, (Ptr{GObject}, Cint), instance, _show_content) nothing end - function set_fold_threshold_policy(instance::AdwFlap, _policy) - ret = ccall(("adw_flap_set_fold_threshold_policy", libadwaita), Nothing, (Ptr{GObject}, UInt32), instance, _policy) + function set_sidebar(instance::AdwNavigationSplitView, _sidebar::Maybe(AdwNavigationPage)) + _sidebar_maybe = nothing_to_null(_sidebar) + ret = ccall(("adw_navigation_split_view_set_sidebar", libadwaita), Nothing, (Ptr{GObject}, Ptr{GObject}), instance, _sidebar_maybe) nothing end - function set_locked(instance::AdwFlap, _locked::Bool) - ret = ccall(("adw_flap_set_locked", libadwaita), Nothing, (Ptr{GObject}, Cint), instance, _locked) + function set_sidebar_width_fraction(instance::AdwNavigationSplitView, _fraction::Real) + ret = ccall(("adw_navigation_split_view_set_sidebar_width_fraction", libadwaita), Nothing, (Ptr{GObject}, Float64), instance, _fraction) nothing end - function set_modal(instance::AdwFlap, _modal::Bool) - ret = ccall(("adw_flap_set_modal", libadwaita), Nothing, (Ptr{GObject}, Cint), instance, _modal) + function set_sidebar_width_unit(instance::AdwNavigationSplitView, _unit) + ret = ccall(("adw_navigation_split_view_set_sidebar_width_unit", libadwaita), Nothing, (Ptr{GObject}, UInt32), instance, _unit) nothing end - function set_reveal_flap(instance::AdwFlap, _reveal_flap::Bool) - ret = ccall(("adw_flap_set_reveal_flap", libadwaita), Nothing, (Ptr{GObject}, Cint), instance, _reveal_flap) - nothing + function announce(instance::AdwNavigationSplitView, _message::Union{AbstractString, Symbol}, _priority) + announce(GtkAccessible(instance), _message, _priority) end - function set_reveal_params(instance::AdwFlap, _params::AdwSpringParams) - ret = ccall(("adw_flap_set_reveal_params", libadwaita), Nothing, (Ptr{GObject}, Ptr{AdwSpringParams}), instance, _params) - nothing + function get_accessible_parent(instance::AdwNavigationSplitView) + get_accessible_parent(GtkAccessible(instance)) end - function set_separator(instance::AdwFlap, _separator::Maybe(GtkWidget)) - _separator_maybe = nothing_to_null(_separator) - ret = ccall(("adw_flap_set_separator", libadwaita), Nothing, (Ptr{GObject}, Ptr{GObject}), instance, _separator_maybe) - nothing + function get_accessible_role(instance::AdwNavigationSplitView) + get_accessible_role(GtkAccessible(instance)) end - function set_swipe_to_close(instance::AdwFlap, _swipe_to_close::Bool) - ret = ccall(("adw_flap_set_swipe_to_close", libadwaita), Nothing, (Ptr{GObject}, Cint), instance, _swipe_to_close) - nothing + function get_at_context(instance::AdwNavigationSplitView) + get_at_context(GtkAccessible(instance)) end - function set_swipe_to_open(instance::AdwFlap, _swipe_to_open::Bool) - ret = ccall(("adw_flap_set_swipe_to_open", libadwaita), Nothing, (Ptr{GObject}, Cint), instance, _swipe_to_open) - nothing + function get_bounds(instance::AdwNavigationSplitView) + get_bounds(GtkAccessible(instance)) end - function set_transition_type(instance::AdwFlap, _transition_type) - ret = ccall(("adw_flap_set_transition_type", libadwaita), Nothing, (Ptr{GObject}, UInt32), instance, _transition_type) + function get_first_accessible_child(instance::AdwNavigationSplitView) + get_first_accessible_child(GtkAccessible(instance)) + end + function get_next_accessible_sibling(instance::AdwNavigationSplitView) + get_next_accessible_sibling(GtkAccessible(instance)) + end + function get_platform_state(instance::AdwNavigationSplitView, _state) + get_platform_state(GtkAccessible(instance), _state) + end + function reset_property(instance::AdwNavigationSplitView, _property) + reset_property(GtkAccessible(instance), _property) + end + function reset_relation(instance::AdwNavigationSplitView, _relation) + reset_relation(GtkAccessible(instance), _relation) + end + function reset_state(instance::AdwNavigationSplitView, _state) + reset_state(GtkAccessible(instance), _state) + end + function set_accessible_parent(instance::AdwNavigationSplitView, _parent::Maybe(GtkAccessible), _next_sibling::Maybe(GtkAccessible)) + set_accessible_parent(GtkAccessible(instance), _parent, _next_sibling) + end + function update_next_accessible_sibling(instance::AdwNavigationSplitView, _new_sibling::Maybe(GtkAccessible)) + update_next_accessible_sibling(GtkAccessible(instance), _new_sibling) + end + function update_property(instance::AdwNavigationSplitView, _properties, _values) + update_property(GtkAccessible(instance), _properties, _values) + end + function update_relation(instance::AdwNavigationSplitView, _relations, _values) + update_relation(GtkAccessible(instance), _relations, _values) + end + function update_state(instance::AdwNavigationSplitView, _states, _values) + update_state(GtkAccessible(instance), _states, _values) + end + function get_buildable_id(instance::AdwNavigationSplitView) + get_buildable_id(GtkBuildable(instance)) + end + function NavigationView_new() + ret = ccall(("adw_navigation_view_new", libadwaita), Ptr{GObject}, ()) + ret2 = AdwNavigationViewLeaf(ret, false) + ret2 + end + function add(instance::AdwNavigationView, _page::AdwNavigationPage) + ret = ccall(("adw_navigation_view_add", libadwaita), Nothing, (Ptr{GObject}, Ptr{GObject}), instance, _page) nothing end - function HeaderBar_new() - ret = ccall(("adw_header_bar_new", libadwaita), Ptr{GObject}, ()) - ret2 = AdwHeaderBarLeaf(ret, false) + function find_page(instance::AdwNavigationView, _tag::Union{AbstractString, Symbol}) + ret = ccall(("adw_navigation_view_find_page", libadwaita), Ptr{GObject}, (Ptr{GObject}, Cstring), instance, _tag) + ret2 = convert_if_not_null(AdwNavigationPage, ret, false) ret2 end - function get_centering_policy(instance::AdwHeaderBar) - ret = ccall(("adw_header_bar_get_centering_policy", libadwaita), UInt32, (Ptr{GObject},), instance) - ret2 = CenteringPolicy(ret) + function get_animate_transitions(instance::AdwNavigationView) + ret = ccall(("adw_navigation_view_get_animate_transitions", libadwaita), Cint, (Ptr{GObject},), instance) + ret2 = convert(Bool, ret) ret2 end - function get_decoration_layout(instance::AdwHeaderBar) - ret = ccall(("adw_header_bar_get_decoration_layout", libadwaita), Cstring, (Ptr{GObject},), instance) - ret2 = string_or_nothing(ret, false) + function get_navigation_stack(instance::AdwNavigationView) + ret = ccall(("adw_navigation_view_get_navigation_stack", libadwaita), Ptr{GObject}, (Ptr{GObject},), instance) + ret2 = begin + leaftype = GLib.find_leaf_type(ret) + convert(leaftype, ret, true) + end ret2 end - function get_show_end_title_buttons(instance::AdwHeaderBar) - ret = ccall(("adw_header_bar_get_show_end_title_buttons", libadwaita), Cint, (Ptr{GObject},), instance) + function get_pop_on_escape(instance::AdwNavigationView) + ret = ccall(("adw_navigation_view_get_pop_on_escape", libadwaita), Cint, (Ptr{GObject},), instance) ret2 = convert(Bool, ret) ret2 end - function get_show_start_title_buttons(instance::AdwHeaderBar) - ret = ccall(("adw_header_bar_get_show_start_title_buttons", libadwaita), Cint, (Ptr{GObject},), instance) + function get_previous_page(instance::AdwNavigationView, _page::AdwNavigationPage) + ret = ccall(("adw_navigation_view_get_previous_page", libadwaita), Ptr{GObject}, (Ptr{GObject}, Ptr{GObject}), instance, _page) + ret2 = convert_if_not_null(AdwNavigationPage, ret, false) + ret2 + end + function get_visible_page(instance::AdwNavigationView) + ret = ccall(("adw_navigation_view_get_visible_page", libadwaita), Ptr{GObject}, (Ptr{GObject},), instance) + ret2 = convert_if_not_null(AdwNavigationPage, ret, false) + ret2 + end + function pop(instance::AdwNavigationView) + ret = ccall(("adw_navigation_view_pop", libadwaita), Cint, (Ptr{GObject},), instance) ret2 = convert(Bool, ret) ret2 end - function get_title_widget(instance::AdwHeaderBar) - ret = ccall(("adw_header_bar_get_title_widget", libadwaita), Ptr{GObject}, (Ptr{GObject},), instance) - ret2 = convert_if_not_null(GtkWidget, ret, false) + function pop_to_page(instance::AdwNavigationView, _page::AdwNavigationPage) + ret = ccall(("adw_navigation_view_pop_to_page", libadwaita), Cint, (Ptr{GObject}, Ptr{GObject}), instance, _page) + ret2 = convert(Bool, ret) ret2 end - function pack_end(instance::AdwHeaderBar, _child::GtkWidget) - ret = ccall(("adw_header_bar_pack_end", libadwaita), Nothing, (Ptr{GObject}, Ptr{GObject}), instance, _child) + function pop_to_tag(instance::AdwNavigationView, _tag::Union{AbstractString, Symbol}) + ret = ccall(("adw_navigation_view_pop_to_tag", libadwaita), Cint, (Ptr{GObject}, Cstring), instance, _tag) + ret2 = convert(Bool, ret) + ret2 + end + function push(instance::AdwNavigationView, _page::AdwNavigationPage) + ret = ccall(("adw_navigation_view_push", libadwaita), Nothing, (Ptr{GObject}, Ptr{GObject}), instance, _page) nothing end - function pack_start(instance::AdwHeaderBar, _child::GtkWidget) - ret = ccall(("adw_header_bar_pack_start", libadwaita), Nothing, (Ptr{GObject}, Ptr{GObject}), instance, _child) + function push_by_tag(instance::AdwNavigationView, _tag::Union{AbstractString, Symbol}) + ret = ccall(("adw_navigation_view_push_by_tag", libadwaita), Nothing, (Ptr{GObject}, Cstring), instance, _tag) nothing end - function remove(instance::AdwHeaderBar, _child::GtkWidget) - ret = ccall(("adw_header_bar_remove", libadwaita), Nothing, (Ptr{GObject}, Ptr{GObject}), instance, _child) + function remove(instance::AdwNavigationView, _page::AdwNavigationPage) + ret = ccall(("adw_navigation_view_remove", libadwaita), Nothing, (Ptr{GObject}, Ptr{GObject}), instance, _page) nothing end - function set_centering_policy(instance::AdwHeaderBar, _centering_policy) - ret = ccall(("adw_header_bar_set_centering_policy", libadwaita), Nothing, (Ptr{GObject}, UInt32), instance, _centering_policy) + function replace(instance::AdwNavigationView, _pages) + _pages_arr = convert(Vector{Ptr{GObject}}, _pages) + _n_pages = length(_pages) + ret = ccall(("adw_navigation_view_replace", libadwaita), Nothing, (Ptr{GObject}, Ptr{Ptr{GObject}}, Int32), instance, _pages_arr, _n_pages) nothing end - function set_decoration_layout(instance::AdwHeaderBar, _layout::Maybe(Union{AbstractString, Symbol})) - _layout_maybe = nothing_to_null(_layout) - ret = ccall(("adw_header_bar_set_decoration_layout", libadwaita), Nothing, (Ptr{GObject}, Cstring), instance, _layout_maybe) - nothing + function replace_with_tags(instance::AdwNavigationView, _tags) + _n_tags = length(_tags) + ret = ccall(("adw_navigation_view_replace_with_tags", libadwaita), Nothing, (Ptr{GObject}, Ptr{Cstring}, Int32), instance, _tags, _n_tags) + nothing + end + function set_animate_transitions(instance::AdwNavigationView, _animate_transitions::Bool) + ret = ccall(("adw_navigation_view_set_animate_transitions", libadwaita), Nothing, (Ptr{GObject}, Cint), instance, _animate_transitions) + nothing + end + function set_pop_on_escape(instance::AdwNavigationView, _pop_on_escape::Bool) + ret = ccall(("adw_navigation_view_set_pop_on_escape", libadwaita), Nothing, (Ptr{GObject}, Cint), instance, _pop_on_escape) + nothing + end + function get_cancel_progress(instance::AdwNavigationView) + get_cancel_progress(AdwSwipeable(instance)) + end + function get_distance(instance::AdwNavigationView) + get_distance(AdwSwipeable(instance)) + end + function get_progress(instance::AdwNavigationView) + get_progress(AdwSwipeable(instance)) + end + function get_snap_points(instance::AdwNavigationView) + get_snap_points(AdwSwipeable(instance)) + end + function get_swipe_area(instance::AdwNavigationView, _navigation_direction, _is_drag::Bool) + get_swipe_area(AdwSwipeable(instance), _navigation_direction, _is_drag) + end + function announce(instance::AdwNavigationView, _message::Union{AbstractString, Symbol}, _priority) + announce(GtkAccessible(instance), _message, _priority) + end + function get_accessible_parent(instance::AdwNavigationView) + get_accessible_parent(GtkAccessible(instance)) + end + function get_accessible_role(instance::AdwNavigationView) + get_accessible_role(GtkAccessible(instance)) + end + function get_at_context(instance::AdwNavigationView) + get_at_context(GtkAccessible(instance)) + end + function get_bounds(instance::AdwNavigationView) + get_bounds(GtkAccessible(instance)) + end + function get_first_accessible_child(instance::AdwNavigationView) + get_first_accessible_child(GtkAccessible(instance)) end - function set_show_end_title_buttons(instance::AdwHeaderBar, _setting::Bool) - ret = ccall(("adw_header_bar_set_show_end_title_buttons", libadwaita), Nothing, (Ptr{GObject}, Cint), instance, _setting) - nothing + function get_next_accessible_sibling(instance::AdwNavigationView) + get_next_accessible_sibling(GtkAccessible(instance)) end - function set_show_start_title_buttons(instance::AdwHeaderBar, _setting::Bool) - ret = ccall(("adw_header_bar_set_show_start_title_buttons", libadwaita), Nothing, (Ptr{GObject}, Cint), instance, _setting) - nothing + function get_platform_state(instance::AdwNavigationView, _state) + get_platform_state(GtkAccessible(instance), _state) end - function set_title_widget(instance::AdwHeaderBar, _title_widget::Maybe(GtkWidget)) - _title_widget_maybe = nothing_to_null(_title_widget) - ret = ccall(("adw_header_bar_set_title_widget", libadwaita), Nothing, (Ptr{GObject}, Ptr{GObject}), instance, _title_widget_maybe) - nothing + function reset_property(instance::AdwNavigationView, _property) + reset_property(GtkAccessible(instance), _property) end - function Leaflet_new() - ret = ccall(("adw_leaflet_new", libadwaita), Ptr{GObject}, ()) - ret2 = AdwLeafletLeaf(ret, false) - ret2 + function reset_relation(instance::AdwNavigationView, _relation) + reset_relation(GtkAccessible(instance), _relation) end - function append(instance::AdwLeaflet, _child::GtkWidget) - ret = ccall(("adw_leaflet_append", libadwaita), Ptr{GObject}, (Ptr{GObject}, Ptr{GObject}), instance, _child) - ret2 = convert(AdwLeafletPage, ret, false) - ret2 + function reset_state(instance::AdwNavigationView, _state) + reset_state(GtkAccessible(instance), _state) end - function get_adjacent_child(instance::AdwLeaflet, _direction) - ret = ccall(("adw_leaflet_get_adjacent_child", libadwaita), Ptr{GObject}, (Ptr{GObject}, UInt32), instance, _direction) - ret2 = convert_if_not_null(GtkWidget, ret, false) - ret2 + function set_accessible_parent(instance::AdwNavigationView, _parent::Maybe(GtkAccessible), _next_sibling::Maybe(GtkAccessible)) + set_accessible_parent(GtkAccessible(instance), _parent, _next_sibling) end - function get_can_navigate_back(instance::AdwLeaflet) - ret = ccall(("adw_leaflet_get_can_navigate_back", libadwaita), Cint, (Ptr{GObject},), instance) - ret2 = convert(Bool, ret) - ret2 + function update_next_accessible_sibling(instance::AdwNavigationView, _new_sibling::Maybe(GtkAccessible)) + update_next_accessible_sibling(GtkAccessible(instance), _new_sibling) end - function get_can_navigate_forward(instance::AdwLeaflet) - ret = ccall(("adw_leaflet_get_can_navigate_forward", libadwaita), Cint, (Ptr{GObject},), instance) - ret2 = convert(Bool, ret) - ret2 + function update_property(instance::AdwNavigationView, _properties, _values) + update_property(GtkAccessible(instance), _properties, _values) end - function get_can_unfold(instance::AdwLeaflet) - ret = ccall(("adw_leaflet_get_can_unfold", libadwaita), Cint, (Ptr{GObject},), instance) - ret2 = convert(Bool, ret) - ret2 + function update_relation(instance::AdwNavigationView, _relations, _values) + update_relation(GtkAccessible(instance), _relations, _values) end - function get_child_by_name(instance::AdwLeaflet, _name::Union{AbstractString, Symbol}) - ret = ccall(("adw_leaflet_get_child_by_name", libadwaita), Ptr{GObject}, (Ptr{GObject}, Cstring), instance, _name) - ret2 = convert_if_not_null(GtkWidget, ret, false) - ret2 + function update_state(instance::AdwNavigationView, _states, _values) + update_state(GtkAccessible(instance), _states, _values) end - function get_child_transition_params(instance::AdwLeaflet) - ret = ccall(("adw_leaflet_get_child_transition_params", libadwaita), Ptr{AdwSpringParams}, (Ptr{GObject},), instance) - ret2 = convert(AdwSpringParams, ret, true) + function get_buildable_id(instance::AdwNavigationView) + get_buildable_id(GtkBuildable(instance)) + end + function OverlaySplitView_new() + ret = ccall(("adw_overlay_split_view_new", libadwaita), Ptr{GObject}, ()) + ret2 = AdwOverlaySplitViewLeaf(ret, false) ret2 end - function get_child_transition_running(instance::AdwLeaflet) - ret = ccall(("adw_leaflet_get_child_transition_running", libadwaita), Cint, (Ptr{GObject},), instance) + function get_collapsed(instance::AdwOverlaySplitView) + ret = ccall(("adw_overlay_split_view_get_collapsed", libadwaita), Cint, (Ptr{GObject},), instance) ret2 = convert(Bool, ret) ret2 end - function get_fold_threshold_policy(instance::AdwLeaflet) - ret = ccall(("adw_leaflet_get_fold_threshold_policy", libadwaita), UInt32, (Ptr{GObject},), instance) - ret2 = FoldThresholdPolicy(ret) + function get_content(instance::AdwOverlaySplitView) + ret = ccall(("adw_overlay_split_view_get_content", libadwaita), Ptr{GObject}, (Ptr{GObject},), instance) + ret2 = convert_if_not_null(GtkWidget, ret, false) ret2 end - function get_folded(instance::AdwLeaflet) - ret = ccall(("adw_leaflet_get_folded", libadwaita), Cint, (Ptr{GObject},), instance) + function get_enable_hide_gesture(instance::AdwOverlaySplitView) + ret = ccall(("adw_overlay_split_view_get_enable_hide_gesture", libadwaita), Cint, (Ptr{GObject},), instance) ret2 = convert(Bool, ret) ret2 end - function get_homogeneous(instance::AdwLeaflet) - ret = ccall(("adw_leaflet_get_homogeneous", libadwaita), Cint, (Ptr{GObject},), instance) + function get_enable_show_gesture(instance::AdwOverlaySplitView) + ret = ccall(("adw_overlay_split_view_get_enable_show_gesture", libadwaita), Cint, (Ptr{GObject},), instance) ret2 = convert(Bool, ret) ret2 end - function get_mode_transition_duration(instance::AdwLeaflet) - ret = ccall(("adw_leaflet_get_mode_transition_duration", libadwaita), UInt32, (Ptr{GObject},), instance) + function get_max_sidebar_width(instance::AdwOverlaySplitView) + ret = ccall(("adw_overlay_split_view_get_max_sidebar_width", libadwaita), Float64, (Ptr{GObject},), instance) ret end - function get_page(instance::AdwLeaflet, _child::GtkWidget) - ret = ccall(("adw_leaflet_get_page", libadwaita), Ptr{GObject}, (Ptr{GObject}, Ptr{GObject}), instance, _child) - ret2 = convert(AdwLeafletPage, ret, false) - ret2 + function get_min_sidebar_width(instance::AdwOverlaySplitView) + ret = ccall(("adw_overlay_split_view_get_min_sidebar_width", libadwaita), Float64, (Ptr{GObject},), instance) + ret end - function get_pages(instance::AdwLeaflet) - ret = ccall(("adw_leaflet_get_pages", libadwaita), Ptr{GObject}, (Ptr{GObject},), instance) - ret2 = begin - leaftype = GLib.find_leaf_type(ret) - convert(leaftype, ret, true) - end + function get_pin_sidebar(instance::AdwOverlaySplitView) + ret = ccall(("adw_overlay_split_view_get_pin_sidebar", libadwaita), Cint, (Ptr{GObject},), instance) + ret2 = convert(Bool, ret) ret2 end - function get_transition_type(instance::AdwLeaflet) - ret = ccall(("adw_leaflet_get_transition_type", libadwaita), UInt32, (Ptr{GObject},), instance) - ret2 = LeafletTransitionType(ret) + function get_show_sidebar(instance::AdwOverlaySplitView) + ret = ccall(("adw_overlay_split_view_get_show_sidebar", libadwaita), Cint, (Ptr{GObject},), instance) + ret2 = convert(Bool, ret) ret2 end - function get_visible_child(instance::AdwLeaflet) - ret = ccall(("adw_leaflet_get_visible_child", libadwaita), Ptr{GObject}, (Ptr{GObject},), instance) + function get_sidebar(instance::AdwOverlaySplitView) + ret = ccall(("adw_overlay_split_view_get_sidebar", libadwaita), Ptr{GObject}, (Ptr{GObject},), instance) ret2 = convert_if_not_null(GtkWidget, ret, false) ret2 end - function get_visible_child_name(instance::AdwLeaflet) - ret = ccall(("adw_leaflet_get_visible_child_name", libadwaita), Cstring, (Ptr{GObject},), instance) - ret2 = string_or_nothing(ret, false) - ret2 - end - function insert_child_after(instance::AdwLeaflet, _child::GtkWidget, _sibling::Maybe(GtkWidget)) - _sibling_maybe = nothing_to_null(_sibling) - ret = ccall(("adw_leaflet_insert_child_after", libadwaita), Ptr{GObject}, (Ptr{GObject}, Ptr{GObject}, Ptr{GObject}), instance, _child, _sibling_maybe) - ret2 = convert(AdwLeafletPage, ret, false) + function get_sidebar_position(instance::AdwOverlaySplitView) + ret = ccall(("adw_overlay_split_view_get_sidebar_position", libadwaita), UInt32, (Ptr{GObject},), instance) + ret2 = PackType(ret) ret2 end - function navigate(instance::AdwLeaflet, _direction) - ret = ccall(("adw_leaflet_navigate", libadwaita), Cint, (Ptr{GObject}, UInt32), instance, _direction) - ret2 = convert(Bool, ret) - ret2 + function get_sidebar_width_fraction(instance::AdwOverlaySplitView) + ret = ccall(("adw_overlay_split_view_get_sidebar_width_fraction", libadwaita), Float64, (Ptr{GObject},), instance) + ret end - function prepend(instance::AdwLeaflet, _child::GtkWidget) - ret = ccall(("adw_leaflet_prepend", libadwaita), Ptr{GObject}, (Ptr{GObject}, Ptr{GObject}), instance, _child) - ret2 = convert(AdwLeafletPage, ret, false) + function get_sidebar_width_unit(instance::AdwOverlaySplitView) + ret = ccall(("adw_overlay_split_view_get_sidebar_width_unit", libadwaita), UInt32, (Ptr{GObject},), instance) + ret2 = LengthUnit(ret) ret2 end - function remove(instance::AdwLeaflet, _child::GtkWidget) - ret = ccall(("adw_leaflet_remove", libadwaita), Nothing, (Ptr{GObject}, Ptr{GObject}), instance, _child) + function set_collapsed(instance::AdwOverlaySplitView, _collapsed::Bool) + ret = ccall(("adw_overlay_split_view_set_collapsed", libadwaita), Nothing, (Ptr{GObject}, Cint), instance, _collapsed) nothing end - function reorder_child_after(instance::AdwLeaflet, _child::GtkWidget, _sibling::Maybe(GtkWidget)) - _sibling_maybe = nothing_to_null(_sibling) - ret = ccall(("adw_leaflet_reorder_child_after", libadwaita), Nothing, (Ptr{GObject}, Ptr{GObject}, Ptr{GObject}), instance, _child, _sibling_maybe) + function set_content(instance::AdwOverlaySplitView, _content::Maybe(GtkWidget)) + _content_maybe = nothing_to_null(_content) + ret = ccall(("adw_overlay_split_view_set_content", libadwaita), Nothing, (Ptr{GObject}, Ptr{GObject}), instance, _content_maybe) nothing end - function set_can_navigate_back(instance::AdwLeaflet, _can_navigate_back::Bool) - ret = ccall(("adw_leaflet_set_can_navigate_back", libadwaita), Nothing, (Ptr{GObject}, Cint), instance, _can_navigate_back) + function set_enable_hide_gesture(instance::AdwOverlaySplitView, _enable_hide_gesture::Bool) + ret = ccall(("adw_overlay_split_view_set_enable_hide_gesture", libadwaita), Nothing, (Ptr{GObject}, Cint), instance, _enable_hide_gesture) nothing end - function set_can_navigate_forward(instance::AdwLeaflet, _can_navigate_forward::Bool) - ret = ccall(("adw_leaflet_set_can_navigate_forward", libadwaita), Nothing, (Ptr{GObject}, Cint), instance, _can_navigate_forward) + function set_enable_show_gesture(instance::AdwOverlaySplitView, _enable_show_gesture::Bool) + ret = ccall(("adw_overlay_split_view_set_enable_show_gesture", libadwaita), Nothing, (Ptr{GObject}, Cint), instance, _enable_show_gesture) nothing end - function set_can_unfold(instance::AdwLeaflet, _can_unfold::Bool) - ret = ccall(("adw_leaflet_set_can_unfold", libadwaita), Nothing, (Ptr{GObject}, Cint), instance, _can_unfold) + function set_max_sidebar_width(instance::AdwOverlaySplitView, _width::Real) + ret = ccall(("adw_overlay_split_view_set_max_sidebar_width", libadwaita), Nothing, (Ptr{GObject}, Float64), instance, _width) nothing end - function set_child_transition_params(instance::AdwLeaflet, _params::AdwSpringParams) - ret = ccall(("adw_leaflet_set_child_transition_params", libadwaita), Nothing, (Ptr{GObject}, Ptr{AdwSpringParams}), instance, _params) + function set_min_sidebar_width(instance::AdwOverlaySplitView, _width::Real) + ret = ccall(("adw_overlay_split_view_set_min_sidebar_width", libadwaita), Nothing, (Ptr{GObject}, Float64), instance, _width) nothing end - function set_fold_threshold_policy(instance::AdwLeaflet, _policy) - ret = ccall(("adw_leaflet_set_fold_threshold_policy", libadwaita), Nothing, (Ptr{GObject}, UInt32), instance, _policy) + function set_pin_sidebar(instance::AdwOverlaySplitView, _pin_sidebar::Bool) + ret = ccall(("adw_overlay_split_view_set_pin_sidebar", libadwaita), Nothing, (Ptr{GObject}, Cint), instance, _pin_sidebar) nothing end - function set_homogeneous(instance::AdwLeaflet, _homogeneous::Bool) - ret = ccall(("adw_leaflet_set_homogeneous", libadwaita), Nothing, (Ptr{GObject}, Cint), instance, _homogeneous) + function set_show_sidebar(instance::AdwOverlaySplitView, _show_sidebar::Bool) + ret = ccall(("adw_overlay_split_view_set_show_sidebar", libadwaita), Nothing, (Ptr{GObject}, Cint), instance, _show_sidebar) nothing end - function set_mode_transition_duration(instance::AdwLeaflet, _duration::Integer) - ret = ccall(("adw_leaflet_set_mode_transition_duration", libadwaita), Nothing, (Ptr{GObject}, UInt32), instance, _duration) + function set_sidebar(instance::AdwOverlaySplitView, _sidebar::Maybe(GtkWidget)) + _sidebar_maybe = nothing_to_null(_sidebar) + ret = ccall(("adw_overlay_split_view_set_sidebar", libadwaita), Nothing, (Ptr{GObject}, Ptr{GObject}), instance, _sidebar_maybe) nothing end - function set_transition_type(instance::AdwLeaflet, _transition) - ret = ccall(("adw_leaflet_set_transition_type", libadwaita), Nothing, (Ptr{GObject}, UInt32), instance, _transition) + function set_sidebar_position(instance::AdwOverlaySplitView, _position) + ret = ccall(("adw_overlay_split_view_set_sidebar_position", libadwaita), Nothing, (Ptr{GObject}, UInt32), instance, _position) nothing end - function set_visible_child(instance::AdwLeaflet, _visible_child::GtkWidget) - ret = ccall(("adw_leaflet_set_visible_child", libadwaita), Nothing, (Ptr{GObject}, Ptr{GObject}), instance, _visible_child) + function set_sidebar_width_fraction(instance::AdwOverlaySplitView, _fraction::Real) + ret = ccall(("adw_overlay_split_view_set_sidebar_width_fraction", libadwaita), Nothing, (Ptr{GObject}, Float64), instance, _fraction) nothing end - function set_visible_child_name(instance::AdwLeaflet, _name::Union{AbstractString, Symbol}) - ret = ccall(("adw_leaflet_set_visible_child_name", libadwaita), Nothing, (Ptr{GObject}, Cstring), instance, _name) + function set_sidebar_width_unit(instance::AdwOverlaySplitView, _unit) + ret = ccall(("adw_overlay_split_view_set_sidebar_width_unit", libadwaita), Nothing, (Ptr{GObject}, UInt32), instance, _unit) nothing end - function get_child(instance::AdwLeafletPage) - ret = ccall(("adw_leaflet_page_get_child", libadwaita), Ptr{GObject}, (Ptr{GObject},), instance) - ret2 = convert(GtkWidget, ret, false) - ret2 + function get_cancel_progress(instance::AdwOverlaySplitView) + get_cancel_progress(AdwSwipeable(instance)) end - function get_name(instance::AdwLeafletPage) - ret = ccall(("adw_leaflet_page_get_name", libadwaita), Cstring, (Ptr{GObject},), instance) - ret2 = string_or_nothing(ret, false) - ret2 + function get_distance(instance::AdwOverlaySplitView) + get_distance(AdwSwipeable(instance)) end - function get_navigatable(instance::AdwLeafletPage) - ret = ccall(("adw_leaflet_page_get_navigatable", libadwaita), Cint, (Ptr{GObject},), instance) - ret2 = convert(Bool, ret) - ret2 + function get_progress(instance::AdwOverlaySplitView) + get_progress(AdwSwipeable(instance)) end - function set_name(instance::AdwLeafletPage, _name::Maybe(Union{AbstractString, Symbol})) - _name_maybe = nothing_to_null(_name) - ret = ccall(("adw_leaflet_page_set_name", libadwaita), Nothing, (Ptr{GObject}, Cstring), instance, _name_maybe) - nothing + function get_snap_points(instance::AdwOverlaySplitView) + get_snap_points(AdwSwipeable(instance)) end - function set_navigatable(instance::AdwLeafletPage, _navigatable::Bool) - ret = ccall(("adw_leaflet_page_set_navigatable", libadwaita), Nothing, (Ptr{GObject}, Cint), instance, _navigatable) - nothing + function get_swipe_area(instance::AdwOverlaySplitView, _navigation_direction, _is_drag::Bool) + get_swipe_area(AdwSwipeable(instance), _navigation_direction, _is_drag) end - function MessageDialog_new(_parent::Maybe(GtkWindow), _heading::Maybe(Union{AbstractString, Symbol}), _body::Maybe(Union{AbstractString, Symbol})) - _parent_maybe = nothing_to_null(_parent) - _heading_maybe = nothing_to_null(_heading) - _body_maybe = nothing_to_null(_body) - ret = ccall(("adw_message_dialog_new", libadwaita), Ptr{GObject}, (Ptr{GObject}, Cstring, Cstring), _parent_maybe, _heading_maybe, _body_maybe) - ret2 = AdwMessageDialogLeaf(ret, false) - ret2 + function announce(instance::AdwOverlaySplitView, _message::Union{AbstractString, Symbol}, _priority) + announce(GtkAccessible(instance), _message, _priority) end - function add_response(instance::AdwMessageDialog, _id::Union{AbstractString, Symbol}, _label::Union{AbstractString, Symbol}) - ret = ccall(("adw_message_dialog_add_response", libadwaita), Nothing, (Ptr{GObject}, Cstring, Cstring), instance, _id, _label) - nothing + function get_accessible_parent(instance::AdwOverlaySplitView) + get_accessible_parent(GtkAccessible(instance)) end - function get_body(instance::AdwMessageDialog) - ret = ccall(("adw_message_dialog_get_body", libadwaita), Cstring, (Ptr{GObject},), instance) - ret2 = string_or_nothing(ret, false) - ret2 + function get_accessible_role(instance::AdwOverlaySplitView) + get_accessible_role(GtkAccessible(instance)) end - function get_body_use_markup(instance::AdwMessageDialog) - ret = ccall(("adw_message_dialog_get_body_use_markup", libadwaita), Cint, (Ptr{GObject},), instance) - ret2 = convert(Bool, ret) - ret2 + function get_at_context(instance::AdwOverlaySplitView) + get_at_context(GtkAccessible(instance)) end - function get_close_response(instance::AdwMessageDialog) - ret = ccall(("adw_message_dialog_get_close_response", libadwaita), Cstring, (Ptr{GObject},), instance) - ret2 = string_or_nothing(ret, false) - ret2 + function get_bounds(instance::AdwOverlaySplitView) + get_bounds(GtkAccessible(instance)) end - function get_default_response(instance::AdwMessageDialog) - ret = ccall(("adw_message_dialog_get_default_response", libadwaita), Cstring, (Ptr{GObject},), instance) - ret2 = string_or_nothing(ret, false) - ret2 + function get_first_accessible_child(instance::AdwOverlaySplitView) + get_first_accessible_child(GtkAccessible(instance)) end - function get_extra_child(instance::AdwMessageDialog) - ret = ccall(("adw_message_dialog_get_extra_child", libadwaita), Ptr{GObject}, (Ptr{GObject},), instance) - ret2 = convert_if_not_null(GtkWidget, ret, false) - ret2 + function get_next_accessible_sibling(instance::AdwOverlaySplitView) + get_next_accessible_sibling(GtkAccessible(instance)) end - function get_heading(instance::AdwMessageDialog) - ret = ccall(("adw_message_dialog_get_heading", libadwaita), Cstring, (Ptr{GObject},), instance) - ret2 = string_or_nothing(ret, false) - ret2 + function get_platform_state(instance::AdwOverlaySplitView, _state) + get_platform_state(GtkAccessible(instance), _state) end - function get_heading_use_markup(instance::AdwMessageDialog) - ret = ccall(("adw_message_dialog_get_heading_use_markup", libadwaita), Cint, (Ptr{GObject},), instance) - ret2 = convert(Bool, ret) + function reset_property(instance::AdwOverlaySplitView, _property) + reset_property(GtkAccessible(instance), _property) + end + function reset_relation(instance::AdwOverlaySplitView, _relation) + reset_relation(GtkAccessible(instance), _relation) + end + function reset_state(instance::AdwOverlaySplitView, _state) + reset_state(GtkAccessible(instance), _state) + end + function set_accessible_parent(instance::AdwOverlaySplitView, _parent::Maybe(GtkAccessible), _next_sibling::Maybe(GtkAccessible)) + set_accessible_parent(GtkAccessible(instance), _parent, _next_sibling) + end + function update_next_accessible_sibling(instance::AdwOverlaySplitView, _new_sibling::Maybe(GtkAccessible)) + update_next_accessible_sibling(GtkAccessible(instance), _new_sibling) + end + function update_property(instance::AdwOverlaySplitView, _properties, _values) + update_property(GtkAccessible(instance), _properties, _values) + end + function update_relation(instance::AdwOverlaySplitView, _relations, _values) + update_relation(GtkAccessible(instance), _relations, _values) + end + function update_state(instance::AdwOverlaySplitView, _states, _values) + update_state(GtkAccessible(instance), _states, _values) + end + function get_buildable_id(instance::AdwOverlaySplitView) + get_buildable_id(GtkBuildable(instance)) + end + function PasswordEntryRow_new() + ret = ccall(("adw_password_entry_row_new", libadwaita), Ptr{GObject}, ()) + ret2 = AdwPasswordEntryRowLeaf(ret, false) ret2 end - function get_response_appearance(instance::AdwMessageDialog, _response::Union{AbstractString, Symbol}) - ret = ccall(("adw_message_dialog_get_response_appearance", libadwaita), UInt32, (Ptr{GObject}, Cstring), instance, _response) - ret2 = ResponseAppearance(ret) + function announce(instance::AdwPasswordEntryRow, _message::Union{AbstractString, Symbol}, _priority) + announce(GtkAccessible(instance), _message, _priority) + end + function get_accessible_parent(instance::AdwPasswordEntryRow) + get_accessible_parent(GtkAccessible(instance)) + end + function get_accessible_role(instance::AdwPasswordEntryRow) + get_accessible_role(GtkAccessible(instance)) + end + function get_at_context(instance::AdwPasswordEntryRow) + get_at_context(GtkAccessible(instance)) + end + function get_bounds(instance::AdwPasswordEntryRow) + get_bounds(GtkAccessible(instance)) + end + function get_first_accessible_child(instance::AdwPasswordEntryRow) + get_first_accessible_child(GtkAccessible(instance)) + end + function get_next_accessible_sibling(instance::AdwPasswordEntryRow) + get_next_accessible_sibling(GtkAccessible(instance)) + end + function get_platform_state(instance::AdwPasswordEntryRow, _state) + get_platform_state(GtkAccessible(instance), _state) + end + function reset_property(instance::AdwPasswordEntryRow, _property) + reset_property(GtkAccessible(instance), _property) + end + function reset_relation(instance::AdwPasswordEntryRow, _relation) + reset_relation(GtkAccessible(instance), _relation) + end + function reset_state(instance::AdwPasswordEntryRow, _state) + reset_state(GtkAccessible(instance), _state) + end + function set_accessible_parent(instance::AdwPasswordEntryRow, _parent::Maybe(GtkAccessible), _next_sibling::Maybe(GtkAccessible)) + set_accessible_parent(GtkAccessible(instance), _parent, _next_sibling) + end + function update_next_accessible_sibling(instance::AdwPasswordEntryRow, _new_sibling::Maybe(GtkAccessible)) + update_next_accessible_sibling(GtkAccessible(instance), _new_sibling) + end + function update_property(instance::AdwPasswordEntryRow, _properties, _values) + update_property(GtkAccessible(instance), _properties, _values) + end + function update_relation(instance::AdwPasswordEntryRow, _relations, _values) + update_relation(GtkAccessible(instance), _relations, _values) + end + function update_state(instance::AdwPasswordEntryRow, _states, _values) + update_state(GtkAccessible(instance), _states, _values) + end + function get_action_name(instance::AdwPasswordEntryRow) + get_action_name(GtkActionable(instance)) + end + function get_action_target_value(instance::AdwPasswordEntryRow) + get_action_target_value(GtkActionable(instance)) + end + function set_action_name(instance::AdwPasswordEntryRow, _action_name::Maybe(Union{AbstractString, Symbol})) + set_action_name(GtkActionable(instance), _action_name) + end + function set_action_target_value(instance::AdwPasswordEntryRow, _target_value::Maybe(GVariant)) + set_action_target_value(GtkActionable(instance), _target_value) + end + function set_detailed_action_name(instance::AdwPasswordEntryRow, _detailed_action_name::Union{AbstractString, Symbol}) + set_detailed_action_name(GtkActionable(instance), _detailed_action_name) + end + function get_buildable_id(instance::AdwPasswordEntryRow) + get_buildable_id(GtkBuildable(instance)) + end + function delegate_get_accessible_platform_state(instance::AdwPasswordEntryRow, _state) + delegate_get_accessible_platform_state(GtkEditable(instance), _state) + end + function delete_selection(instance::AdwPasswordEntryRow) + delete_selection(GtkEditable(instance)) + end + function delete_text(instance::AdwPasswordEntryRow, _start_pos::Integer, _end_pos::Integer) + delete_text(GtkEditable(instance), _start_pos, _end_pos) + end + function finish_delegate(instance::AdwPasswordEntryRow) + finish_delegate(GtkEditable(instance)) + end + function get_alignment(instance::AdwPasswordEntryRow) + get_alignment(GtkEditable(instance)) + end + function get_chars(instance::AdwPasswordEntryRow, _start_pos::Integer, _end_pos::Integer) + get_chars(GtkEditable(instance), _start_pos, _end_pos) + end + function get_delegate(instance::AdwPasswordEntryRow) + get_delegate(GtkEditable(instance)) + end + function get_editable(instance::AdwPasswordEntryRow) + get_editable(GtkEditable(instance)) + end + function get_enable_undo(instance::AdwPasswordEntryRow) + get_enable_undo(GtkEditable(instance)) + end + function get_max_width_chars(instance::AdwPasswordEntryRow) + get_max_width_chars(GtkEditable(instance)) + end + function get_position(instance::AdwPasswordEntryRow) + get_position(GtkEditable(instance)) + end + function get_selection_bounds(instance::AdwPasswordEntryRow) + get_selection_bounds(GtkEditable(instance)) + end + function get_text(instance::AdwPasswordEntryRow) + get_text(GtkEditable(instance)) + end + function get_width_chars(instance::AdwPasswordEntryRow) + get_width_chars(GtkEditable(instance)) + end + function init_delegate(instance::AdwPasswordEntryRow) + init_delegate(GtkEditable(instance)) + end + function insert_text(instance::AdwPasswordEntryRow, _text::Union{AbstractString, Symbol}, _length::Integer, _position::Integer) + insert_text(GtkEditable(instance), _text, _length, _position) + end + function select_region(instance::AdwPasswordEntryRow, _start_pos::Integer, _end_pos::Integer) + select_region(GtkEditable(instance), _start_pos, _end_pos) + end + function set_alignment(instance::AdwPasswordEntryRow, _xalign::Real) + set_alignment(GtkEditable(instance), _xalign) + end + function set_editable(instance::AdwPasswordEntryRow, _is_editable::Bool) + set_editable(GtkEditable(instance), _is_editable) + end + function set_enable_undo(instance::AdwPasswordEntryRow, _enable_undo::Bool) + set_enable_undo(GtkEditable(instance), _enable_undo) + end + function set_max_width_chars(instance::AdwPasswordEntryRow, _n_chars::Integer) + set_max_width_chars(GtkEditable(instance), _n_chars) + end + function set_position(instance::AdwPasswordEntryRow, _position::Integer) + set_position(GtkEditable(instance), _position) + end + function set_text(instance::AdwPasswordEntryRow, _text::Union{AbstractString, Symbol}) + set_text(GtkEditable(instance), _text) + end + function set_width_chars(instance::AdwPasswordEntryRow, _n_chars::Integer) + set_width_chars(GtkEditable(instance), _n_chars) + end + function PreferencesDialog_new() + ret = ccall(("adw_preferences_dialog_new", libadwaita), Ptr{GObject}, ()) + ret2 = AdwPreferencesDialogLeaf(ret, false) ret2 end - function get_response_enabled(instance::AdwMessageDialog, _response::Union{AbstractString, Symbol}) - ret = ccall(("adw_message_dialog_get_response_enabled", libadwaita), Cint, (Ptr{GObject}, Cstring), instance, _response) + function add(instance::AdwPreferencesDialog, _page::AdwPreferencesPage) + ret = ccall(("adw_preferences_dialog_add", libadwaita), Nothing, (Ptr{GObject}, Ptr{GObject}), instance, _page) + nothing + end + function add_toast(instance::AdwPreferencesDialog, _toast::AdwToast) + _toast = GLib.glib_ref(_toast) + ret = ccall(("adw_preferences_dialog_add_toast", libadwaita), Nothing, (Ptr{GObject}, Ptr{GObject}), instance, _toast) + nothing + end + function get_search_enabled(instance::AdwPreferencesDialog) + ret = ccall(("adw_preferences_dialog_get_search_enabled", libadwaita), Cint, (Ptr{GObject},), instance) ret2 = convert(Bool, ret) ret2 end - function get_response_label(instance::AdwMessageDialog, _response::Union{AbstractString, Symbol}) - ret = ccall(("adw_message_dialog_get_response_label", libadwaita), Cstring, (Ptr{GObject}, Cstring), instance, _response) - ret2 = string_or_nothing(ret, false) + function get_visible_page(instance::AdwPreferencesDialog) + ret = ccall(("adw_preferences_dialog_get_visible_page", libadwaita), Ptr{GObject}, (Ptr{GObject},), instance) + ret2 = convert_if_not_null(AdwPreferencesPage, ret, false) ret2 end - function has_response(instance::AdwMessageDialog, _response::Union{AbstractString, Symbol}) - ret = ccall(("adw_message_dialog_has_response", libadwaita), Cint, (Ptr{GObject}, Cstring), instance, _response) - ret2 = convert(Bool, ret) + function get_visible_page_name(instance::AdwPreferencesDialog) + ret = ccall(("adw_preferences_dialog_get_visible_page_name", libadwaita), Cstring, (Ptr{GObject},), instance) + ret2 = string_or_nothing(ret, false) ret2 end - function response(instance::AdwMessageDialog, _response::Union{AbstractString, Symbol}) - ret = ccall(("adw_message_dialog_response", libadwaita), Nothing, (Ptr{GObject}, Cstring), instance, _response) - nothing + function pop_subpage(instance::AdwPreferencesDialog) + ret = ccall(("adw_preferences_dialog_pop_subpage", libadwaita), Cint, (Ptr{GObject},), instance) + ret2 = convert(Bool, ret) + ret2 end - function set_body(instance::AdwMessageDialog, _body::Union{AbstractString, Symbol}) - ret = ccall(("adw_message_dialog_set_body", libadwaita), Nothing, (Ptr{GObject}, Cstring), instance, _body) + function push_subpage(instance::AdwPreferencesDialog, _page::AdwNavigationPage) + ret = ccall(("adw_preferences_dialog_push_subpage", libadwaita), Nothing, (Ptr{GObject}, Ptr{GObject}), instance, _page) nothing end - function set_body_use_markup(instance::AdwMessageDialog, _use_markup::Bool) - ret = ccall(("adw_message_dialog_set_body_use_markup", libadwaita), Nothing, (Ptr{GObject}, Cint), instance, _use_markup) + function remove(instance::AdwPreferencesDialog, _page::AdwPreferencesPage) + ret = ccall(("adw_preferences_dialog_remove", libadwaita), Nothing, (Ptr{GObject}, Ptr{GObject}), instance, _page) nothing end - function set_close_response(instance::AdwMessageDialog, _response::Union{AbstractString, Symbol}) - ret = ccall(("adw_message_dialog_set_close_response", libadwaita), Nothing, (Ptr{GObject}, Cstring), instance, _response) + function set_search_enabled(instance::AdwPreferencesDialog, _search_enabled::Bool) + ret = ccall(("adw_preferences_dialog_set_search_enabled", libadwaita), Nothing, (Ptr{GObject}, Cint), instance, _search_enabled) nothing end - function set_default_response(instance::AdwMessageDialog, _response::Maybe(Union{AbstractString, Symbol})) - _response_maybe = nothing_to_null(_response) - ret = ccall(("adw_message_dialog_set_default_response", libadwaita), Nothing, (Ptr{GObject}, Cstring), instance, _response_maybe) + function set_visible_page(instance::AdwPreferencesDialog, _page::AdwPreferencesPage) + ret = ccall(("adw_preferences_dialog_set_visible_page", libadwaita), Nothing, (Ptr{GObject}, Ptr{GObject}), instance, _page) nothing end - function set_extra_child(instance::AdwMessageDialog, _child::Maybe(GtkWidget)) - _child_maybe = nothing_to_null(_child) - ret = ccall(("adw_message_dialog_set_extra_child", libadwaita), Nothing, (Ptr{GObject}, Ptr{GObject}), instance, _child_maybe) + function set_visible_page_name(instance::AdwPreferencesDialog, _name::Union{AbstractString, Symbol}) + ret = ccall(("adw_preferences_dialog_set_visible_page_name", libadwaita), Nothing, (Ptr{GObject}, Cstring), instance, _name) nothing end - function set_heading(instance::AdwMessageDialog, _heading::Maybe(Union{AbstractString, Symbol})) - _heading_maybe = nothing_to_null(_heading) - ret = ccall(("adw_message_dialog_set_heading", libadwaita), Nothing, (Ptr{GObject}, Cstring), instance, _heading_maybe) - nothing + function announce(instance::AdwPreferencesDialog, _message::Union{AbstractString, Symbol}, _priority) + announce(GtkAccessible(instance), _message, _priority) end - function set_heading_use_markup(instance::AdwMessageDialog, _use_markup::Bool) - ret = ccall(("adw_message_dialog_set_heading_use_markup", libadwaita), Nothing, (Ptr{GObject}, Cint), instance, _use_markup) - nothing + function get_accessible_parent(instance::AdwPreferencesDialog) + get_accessible_parent(GtkAccessible(instance)) end - function set_response_appearance(instance::AdwMessageDialog, _response::Union{AbstractString, Symbol}, _appearance) - ret = ccall(("adw_message_dialog_set_response_appearance", libadwaita), Nothing, (Ptr{GObject}, Cstring, UInt32), instance, _response, _appearance) - nothing + function get_accessible_role(instance::AdwPreferencesDialog) + get_accessible_role(GtkAccessible(instance)) end - function set_response_enabled(instance::AdwMessageDialog, _response::Union{AbstractString, Symbol}, _enabled::Bool) - ret = ccall(("adw_message_dialog_set_response_enabled", libadwaita), Nothing, (Ptr{GObject}, Cstring, Cint), instance, _response, _enabled) - nothing + function get_at_context(instance::AdwPreferencesDialog) + get_at_context(GtkAccessible(instance)) end - function set_response_label(instance::AdwMessageDialog, _response::Union{AbstractString, Symbol}, _label::Union{AbstractString, Symbol}) - ret = ccall(("adw_message_dialog_set_response_label", libadwaita), Nothing, (Ptr{GObject}, Cstring, Cstring), instance, _response, _label) - nothing + function get_bounds(instance::AdwPreferencesDialog) + get_bounds(GtkAccessible(instance)) end - function PasswordEntryRow_new() - ret = ccall(("adw_password_entry_row_new", libadwaita), Ptr{GObject}, ()) - ret2 = AdwPasswordEntryRowLeaf(ret, false) - ret2 + function get_first_accessible_child(instance::AdwPreferencesDialog) + get_first_accessible_child(GtkAccessible(instance)) + end + function get_next_accessible_sibling(instance::AdwPreferencesDialog) + get_next_accessible_sibling(GtkAccessible(instance)) + end + function get_platform_state(instance::AdwPreferencesDialog, _state) + get_platform_state(GtkAccessible(instance), _state) + end + function reset_property(instance::AdwPreferencesDialog, _property) + reset_property(GtkAccessible(instance), _property) + end + function reset_relation(instance::AdwPreferencesDialog, _relation) + reset_relation(GtkAccessible(instance), _relation) + end + function reset_state(instance::AdwPreferencesDialog, _state) + reset_state(GtkAccessible(instance), _state) + end + function set_accessible_parent(instance::AdwPreferencesDialog, _parent::Maybe(GtkAccessible), _next_sibling::Maybe(GtkAccessible)) + set_accessible_parent(GtkAccessible(instance), _parent, _next_sibling) + end + function update_next_accessible_sibling(instance::AdwPreferencesDialog, _new_sibling::Maybe(GtkAccessible)) + update_next_accessible_sibling(GtkAccessible(instance), _new_sibling) + end + function update_property(instance::AdwPreferencesDialog, _properties, _values) + update_property(GtkAccessible(instance), _properties, _values) + end + function update_relation(instance::AdwPreferencesDialog, _relations, _values) + update_relation(GtkAccessible(instance), _relations, _values) + end + function update_state(instance::AdwPreferencesDialog, _states, _values) + update_state(GtkAccessible(instance), _states, _values) + end + function get_buildable_id(instance::AdwPreferencesDialog) + get_buildable_id(GtkBuildable(instance)) end function PreferencesGroup_new() ret = ccall(("adw_preferences_group_new", libadwaita), Ptr{GObject}, ()) @@ -1487,6 +4600,57 @@ $(Expr(:toplevel, quote ret = ccall(("adw_preferences_group_set_title", libadwaita), Nothing, (Ptr{GObject}, Cstring), instance, _title) nothing end + function announce(instance::AdwPreferencesGroup, _message::Union{AbstractString, Symbol}, _priority) + announce(GtkAccessible(instance), _message, _priority) + end + function get_accessible_parent(instance::AdwPreferencesGroup) + get_accessible_parent(GtkAccessible(instance)) + end + function get_accessible_role(instance::AdwPreferencesGroup) + get_accessible_role(GtkAccessible(instance)) + end + function get_at_context(instance::AdwPreferencesGroup) + get_at_context(GtkAccessible(instance)) + end + function get_bounds(instance::AdwPreferencesGroup) + get_bounds(GtkAccessible(instance)) + end + function get_first_accessible_child(instance::AdwPreferencesGroup) + get_first_accessible_child(GtkAccessible(instance)) + end + function get_next_accessible_sibling(instance::AdwPreferencesGroup) + get_next_accessible_sibling(GtkAccessible(instance)) + end + function get_platform_state(instance::AdwPreferencesGroup, _state) + get_platform_state(GtkAccessible(instance), _state) + end + function reset_property(instance::AdwPreferencesGroup, _property) + reset_property(GtkAccessible(instance), _property) + end + function reset_relation(instance::AdwPreferencesGroup, _relation) + reset_relation(GtkAccessible(instance), _relation) + end + function reset_state(instance::AdwPreferencesGroup, _state) + reset_state(GtkAccessible(instance), _state) + end + function set_accessible_parent(instance::AdwPreferencesGroup, _parent::Maybe(GtkAccessible), _next_sibling::Maybe(GtkAccessible)) + set_accessible_parent(GtkAccessible(instance), _parent, _next_sibling) + end + function update_next_accessible_sibling(instance::AdwPreferencesGroup, _new_sibling::Maybe(GtkAccessible)) + update_next_accessible_sibling(GtkAccessible(instance), _new_sibling) + end + function update_property(instance::AdwPreferencesGroup, _properties, _values) + update_property(GtkAccessible(instance), _properties, _values) + end + function update_relation(instance::AdwPreferencesGroup, _relations, _values) + update_relation(GtkAccessible(instance), _relations, _values) + end + function update_state(instance::AdwPreferencesGroup, _states, _values) + update_state(GtkAccessible(instance), _states, _values) + end + function get_buildable_id(instance::AdwPreferencesGroup) + get_buildable_id(GtkBuildable(instance)) + end function PreferencesPage_new() ret = ccall(("adw_preferences_page_new", libadwaita), Ptr{GObject}, ()) ret2 = AdwPreferencesPageLeaf(ret, false) @@ -1496,6 +4660,11 @@ $(Expr(:toplevel, quote ret = ccall(("adw_preferences_page_add", libadwaita), Nothing, (Ptr{GObject}, Ptr{GObject}), instance, _group) nothing end + function get_description(instance::AdwPreferencesPage) + ret = ccall(("adw_preferences_page_get_description", libadwaita), Cstring, (Ptr{GObject},), instance) + ret2 = string_or_nothing(ret, false) + ret2 + end function get_icon_name(instance::AdwPreferencesPage) ret = ccall(("adw_preferences_page_get_icon_name", libadwaita), Cstring, (Ptr{GObject},), instance) ret2 = string_or_nothing(ret, false) @@ -1520,6 +4689,14 @@ $(Expr(:toplevel, quote ret = ccall(("adw_preferences_page_remove", libadwaita), Nothing, (Ptr{GObject}, Ptr{GObject}), instance, _group) nothing end + function scroll_to_top(instance::AdwPreferencesPage) + ret = ccall(("adw_preferences_page_scroll_to_top", libadwaita), Nothing, (Ptr{GObject},), instance) + nothing + end + function set_description(instance::AdwPreferencesPage, _description::Union{AbstractString, Symbol}) + ret = ccall(("adw_preferences_page_set_description", libadwaita), Nothing, (Ptr{GObject}, Cstring), instance, _description) + nothing + end function set_icon_name(instance::AdwPreferencesPage, _icon_name::Maybe(Union{AbstractString, Symbol})) _icon_name_maybe = nothing_to_null(_icon_name) ret = ccall(("adw_preferences_page_set_icon_name", libadwaita), Nothing, (Ptr{GObject}, Cstring), instance, _icon_name_maybe) @@ -1538,6 +4715,57 @@ $(Expr(:toplevel, quote ret = ccall(("adw_preferences_page_set_use_underline", libadwaita), Nothing, (Ptr{GObject}, Cint), instance, _use_underline) nothing end + function announce(instance::AdwPreferencesPage, _message::Union{AbstractString, Symbol}, _priority) + announce(GtkAccessible(instance), _message, _priority) + end + function get_accessible_parent(instance::AdwPreferencesPage) + get_accessible_parent(GtkAccessible(instance)) + end + function get_accessible_role(instance::AdwPreferencesPage) + get_accessible_role(GtkAccessible(instance)) + end + function get_at_context(instance::AdwPreferencesPage) + get_at_context(GtkAccessible(instance)) + end + function get_bounds(instance::AdwPreferencesPage) + get_bounds(GtkAccessible(instance)) + end + function get_first_accessible_child(instance::AdwPreferencesPage) + get_first_accessible_child(GtkAccessible(instance)) + end + function get_next_accessible_sibling(instance::AdwPreferencesPage) + get_next_accessible_sibling(GtkAccessible(instance)) + end + function get_platform_state(instance::AdwPreferencesPage, _state) + get_platform_state(GtkAccessible(instance), _state) + end + function reset_property(instance::AdwPreferencesPage, _property) + reset_property(GtkAccessible(instance), _property) + end + function reset_relation(instance::AdwPreferencesPage, _relation) + reset_relation(GtkAccessible(instance), _relation) + end + function reset_state(instance::AdwPreferencesPage, _state) + reset_state(GtkAccessible(instance), _state) + end + function set_accessible_parent(instance::AdwPreferencesPage, _parent::Maybe(GtkAccessible), _next_sibling::Maybe(GtkAccessible)) + set_accessible_parent(GtkAccessible(instance), _parent, _next_sibling) + end + function update_next_accessible_sibling(instance::AdwPreferencesPage, _new_sibling::Maybe(GtkAccessible)) + update_next_accessible_sibling(GtkAccessible(instance), _new_sibling) + end + function update_property(instance::AdwPreferencesPage, _properties, _values) + update_property(GtkAccessible(instance), _properties, _values) + end + function update_relation(instance::AdwPreferencesPage, _relations, _values) + update_relation(GtkAccessible(instance), _relations, _values) + end + function update_state(instance::AdwPreferencesPage, _states, _values) + update_state(GtkAccessible(instance), _states, _values) + end + function get_buildable_id(instance::AdwPreferencesPage) + get_buildable_id(GtkBuildable(instance)) + end function PreferencesRow_new() ret = ccall(("adw_preferences_row_new", libadwaita), Ptr{GObject}, ()) ret2 = AdwPreferencesRowLeaf(ret, false) @@ -1579,6 +4807,72 @@ $(Expr(:toplevel, quote ret = ccall(("adw_preferences_row_set_use_underline", libadwaita), Nothing, (Ptr{GObject}, Cint), instance, _use_underline) nothing end + function announce(instance::AdwPreferencesRow, _message::Union{AbstractString, Symbol}, _priority) + announce(GtkAccessible(instance), _message, _priority) + end + function get_accessible_parent(instance::AdwPreferencesRow) + get_accessible_parent(GtkAccessible(instance)) + end + function get_accessible_role(instance::AdwPreferencesRow) + get_accessible_role(GtkAccessible(instance)) + end + function get_at_context(instance::AdwPreferencesRow) + get_at_context(GtkAccessible(instance)) + end + function get_bounds(instance::AdwPreferencesRow) + get_bounds(GtkAccessible(instance)) + end + function get_first_accessible_child(instance::AdwPreferencesRow) + get_first_accessible_child(GtkAccessible(instance)) + end + function get_next_accessible_sibling(instance::AdwPreferencesRow) + get_next_accessible_sibling(GtkAccessible(instance)) + end + function get_platform_state(instance::AdwPreferencesRow, _state) + get_platform_state(GtkAccessible(instance), _state) + end + function reset_property(instance::AdwPreferencesRow, _property) + reset_property(GtkAccessible(instance), _property) + end + function reset_relation(instance::AdwPreferencesRow, _relation) + reset_relation(GtkAccessible(instance), _relation) + end + function reset_state(instance::AdwPreferencesRow, _state) + reset_state(GtkAccessible(instance), _state) + end + function set_accessible_parent(instance::AdwPreferencesRow, _parent::Maybe(GtkAccessible), _next_sibling::Maybe(GtkAccessible)) + set_accessible_parent(GtkAccessible(instance), _parent, _next_sibling) + end + function update_next_accessible_sibling(instance::AdwPreferencesRow, _new_sibling::Maybe(GtkAccessible)) + update_next_accessible_sibling(GtkAccessible(instance), _new_sibling) + end + function update_property(instance::AdwPreferencesRow, _properties, _values) + update_property(GtkAccessible(instance), _properties, _values) + end + function update_relation(instance::AdwPreferencesRow, _relations, _values) + update_relation(GtkAccessible(instance), _relations, _values) + end + function update_state(instance::AdwPreferencesRow, _states, _values) + update_state(GtkAccessible(instance), _states, _values) + end + function get_action_name(instance::AdwPreferencesRow) + get_action_name(GtkActionable(instance)) + end + function get_action_target_value(instance::AdwPreferencesRow) + get_action_target_value(GtkActionable(instance)) + end + function set_action_name(instance::AdwPreferencesRow, _action_name::Maybe(Union{AbstractString, Symbol})) + set_action_name(GtkActionable(instance), _action_name) + end + function set_action_target_value(instance::AdwPreferencesRow, _target_value::Maybe(GVariant)) + set_action_target_value(GtkActionable(instance), _target_value) + end + function set_detailed_action_name(instance::AdwPreferencesRow, _detailed_action_name::Union{AbstractString, Symbol}) + set_detailed_action_name(GtkActionable(instance), _detailed_action_name) + end + function get_buildable_id(instance::AdwPreferencesRow) + get_buildable_id(GtkBuildable(instance)) + end function PreferencesWindow_new() ret = ccall(("adw_preferences_window_new", libadwaita), Ptr{GObject}, ()) ret2 = AdwPreferencesWindowLeaf(ret, false) @@ -1617,10 +4911,19 @@ $(Expr(:toplevel, quote ret2 = string_or_nothing(ret, false) ret2 end + function pop_subpage(instance::AdwPreferencesWindow) + ret = ccall(("adw_preferences_window_pop_subpage", libadwaita), Cint, (Ptr{GObject},), instance) + ret2 = convert(Bool, ret) + ret2 + end function present_subpage(instance::AdwPreferencesWindow, _subpage::GtkWidget) ret = ccall(("adw_preferences_window_present_subpage", libadwaita), Nothing, (Ptr{GObject}, Ptr{GObject}), instance, _subpage) nothing end + function push_subpage(instance::AdwPreferencesWindow, _page::AdwNavigationPage) + ret = ccall(("adw_preferences_window_push_subpage", libadwaita), Nothing, (Ptr{GObject}, Ptr{GObject}), instance, _page) + nothing + end function remove(instance::AdwPreferencesWindow, _page::AdwPreferencesPage) ret = ccall(("adw_preferences_window_remove", libadwaita), Nothing, (Ptr{GObject}, Ptr{GObject}), instance, _page) nothing @@ -1641,6 +4944,81 @@ $(Expr(:toplevel, quote ret = ccall(("adw_preferences_window_set_visible_page_name", libadwaita), Nothing, (Ptr{GObject}, Cstring), instance, _name) nothing end + function announce(instance::AdwPreferencesWindow, _message::Union{AbstractString, Symbol}, _priority) + announce(GtkAccessible(instance), _message, _priority) + end + function get_accessible_parent(instance::AdwPreferencesWindow) + get_accessible_parent(GtkAccessible(instance)) + end + function get_accessible_role(instance::AdwPreferencesWindow) + get_accessible_role(GtkAccessible(instance)) + end + function get_at_context(instance::AdwPreferencesWindow) + get_at_context(GtkAccessible(instance)) + end + function get_bounds(instance::AdwPreferencesWindow) + get_bounds(GtkAccessible(instance)) + end + function get_first_accessible_child(instance::AdwPreferencesWindow) + get_first_accessible_child(GtkAccessible(instance)) + end + function get_next_accessible_sibling(instance::AdwPreferencesWindow) + get_next_accessible_sibling(GtkAccessible(instance)) + end + function get_platform_state(instance::AdwPreferencesWindow, _state) + get_platform_state(GtkAccessible(instance), _state) + end + function reset_property(instance::AdwPreferencesWindow, _property) + reset_property(GtkAccessible(instance), _property) + end + function reset_relation(instance::AdwPreferencesWindow, _relation) + reset_relation(GtkAccessible(instance), _relation) + end + function reset_state(instance::AdwPreferencesWindow, _state) + reset_state(GtkAccessible(instance), _state) + end + function set_accessible_parent(instance::AdwPreferencesWindow, _parent::Maybe(GtkAccessible), _next_sibling::Maybe(GtkAccessible)) + set_accessible_parent(GtkAccessible(instance), _parent, _next_sibling) + end + function update_next_accessible_sibling(instance::AdwPreferencesWindow, _new_sibling::Maybe(GtkAccessible)) + update_next_accessible_sibling(GtkAccessible(instance), _new_sibling) + end + function update_property(instance::AdwPreferencesWindow, _properties, _values) + update_property(GtkAccessible(instance), _properties, _values) + end + function update_relation(instance::AdwPreferencesWindow, _relations, _values) + update_relation(GtkAccessible(instance), _relations, _values) + end + function update_state(instance::AdwPreferencesWindow, _states, _values) + update_state(GtkAccessible(instance), _states, _values) + end + function get_buildable_id(instance::AdwPreferencesWindow) + get_buildable_id(GtkBuildable(instance)) + end + function get_renderer(instance::AdwPreferencesWindow) + get_renderer(GtkNative(instance)) + end + function get_surface(instance::AdwPreferencesWindow) + get_surface(GtkNative(instance)) + end + function get_surface_transform(instance::AdwPreferencesWindow) + get_surface_transform(GtkNative(instance)) + end + function realize(instance::AdwPreferencesWindow) + realize(GtkNative(instance)) + end + function unrealize(instance::AdwPreferencesWindow) + unrealize(GtkNative(instance)) + end + function get_display(instance::AdwPreferencesWindow) + get_display(GtkRoot(instance)) + end + function get_focus(instance::AdwPreferencesWindow) + get_focus(GtkRoot(instance)) + end + function set_focus(instance::AdwPreferencesWindow, _focus::Maybe(GtkWidget)) + set_focus(GtkRoot(instance), _focus) + end function PropertyAnimationTarget_new(_object::GObject, _property_name::Union{AbstractString, Symbol}) ret = ccall(("adw_property_animation_target_new", libadwaita), Ptr{GObject}, (Ptr{GObject}, Cstring), _object, _property_name) ret2 = AdwPropertyAnimationTargetLeaf(ret, true) @@ -1661,11 +5039,248 @@ $(Expr(:toplevel, quote ret2 = convert(GParam, ret) ret2 end + function SpinRow_new(_adjustment::Maybe(GtkAdjustment), _climb_rate::Real, _digits::Integer) + _adjustment_maybe = nothing_to_null(_adjustment) + ret = ccall(("adw_spin_row_new", libadwaita), Ptr{GObject}, (Ptr{GObject}, Float64, UInt32), _adjustment_maybe, _climb_rate, _digits) + ret2 = AdwSpinRowLeaf(ret, false) + ret2 + end + function SpinRow_new_with_range(_min::Real, _max::Real, _step::Real) + ret = ccall(("adw_spin_row_new_with_range", libadwaita), Ptr{GObject}, (Float64, Float64, Float64), _min, _max, _step) + ret2 = AdwSpinRowLeaf(ret, false) + ret2 + end + function configure(instance::AdwSpinRow, _adjustment::Maybe(GtkAdjustment), _climb_rate::Real, _digits::Integer) + _adjustment_maybe = nothing_to_null(_adjustment) + ret = ccall(("adw_spin_row_configure", libadwaita), Nothing, (Ptr{GObject}, Ptr{GObject}, Float64, UInt32), instance, _adjustment_maybe, _climb_rate, _digits) + nothing + end + function get_adjustment(instance::AdwSpinRow) + ret = ccall(("adw_spin_row_get_adjustment", libadwaita), Ptr{GObject}, (Ptr{GObject},), instance) + ret2 = convert(GtkAdjustment, ret, false) + ret2 + end + function get_climb_rate(instance::AdwSpinRow) + ret = ccall(("adw_spin_row_get_climb_rate", libadwaita), Float64, (Ptr{GObject},), instance) + ret + end + function get_digits(instance::AdwSpinRow) + ret = ccall(("adw_spin_row_get_digits", libadwaita), UInt32, (Ptr{GObject},), instance) + ret + end + function get_numeric(instance::AdwSpinRow) + ret = ccall(("adw_spin_row_get_numeric", libadwaita), Cint, (Ptr{GObject},), instance) + ret2 = convert(Bool, ret) + ret2 + end + function get_snap_to_ticks(instance::AdwSpinRow) + ret = ccall(("adw_spin_row_get_snap_to_ticks", libadwaita), Cint, (Ptr{GObject},), instance) + ret2 = convert(Bool, ret) + ret2 + end + function get_update_policy(instance::AdwSpinRow) + ret = ccall(("adw_spin_row_get_update_policy", libadwaita), UInt32, (Ptr{GObject},), instance) + ret2 = SpinButtonUpdatePolicy(ret) + ret2 + end + function get_value(instance::AdwSpinRow) + ret = ccall(("adw_spin_row_get_value", libadwaita), Float64, (Ptr{GObject},), instance) + ret + end + function get_wrap(instance::AdwSpinRow) + ret = ccall(("adw_spin_row_get_wrap", libadwaita), Cint, (Ptr{GObject},), instance) + ret2 = convert(Bool, ret) + ret2 + end + function set_adjustment(instance::AdwSpinRow, _adjustment::Maybe(GtkAdjustment)) + _adjustment_maybe = nothing_to_null(_adjustment) + ret = ccall(("adw_spin_row_set_adjustment", libadwaita), Nothing, (Ptr{GObject}, Ptr{GObject}), instance, _adjustment_maybe) + nothing + end + function set_climb_rate(instance::AdwSpinRow, _climb_rate::Real) + ret = ccall(("adw_spin_row_set_climb_rate", libadwaita), Nothing, (Ptr{GObject}, Float64), instance, _climb_rate) + nothing + end + function set_digits(instance::AdwSpinRow, _digits::Integer) + ret = ccall(("adw_spin_row_set_digits", libadwaita), Nothing, (Ptr{GObject}, UInt32), instance, _digits) + nothing + end + function set_numeric(instance::AdwSpinRow, _numeric::Bool) + ret = ccall(("adw_spin_row_set_numeric", libadwaita), Nothing, (Ptr{GObject}, Cint), instance, _numeric) + nothing + end + function set_range(instance::AdwSpinRow, _min::Real, _max::Real) + ret = ccall(("adw_spin_row_set_range", libadwaita), Nothing, (Ptr{GObject}, Float64, Float64), instance, _min, _max) + nothing + end + function set_snap_to_ticks(instance::AdwSpinRow, _snap_to_ticks::Bool) + ret = ccall(("adw_spin_row_set_snap_to_ticks", libadwaita), Nothing, (Ptr{GObject}, Cint), instance, _snap_to_ticks) + nothing + end + function set_update_policy(instance::AdwSpinRow, _policy) + ret = ccall(("adw_spin_row_set_update_policy", libadwaita), Nothing, (Ptr{GObject}, UInt32), instance, _policy) + nothing + end + function set_value(instance::AdwSpinRow, _value::Real) + ret = ccall(("adw_spin_row_set_value", libadwaita), Nothing, (Ptr{GObject}, Float64), instance, _value) + nothing + end + function set_wrap(instance::AdwSpinRow, _wrap::Bool) + ret = ccall(("adw_spin_row_set_wrap", libadwaita), Nothing, (Ptr{GObject}, Cint), instance, _wrap) + nothing + end + function update(instance::AdwSpinRow) + ret = ccall(("adw_spin_row_update", libadwaita), Nothing, (Ptr{GObject},), instance) + nothing + end + function announce(instance::AdwSpinRow, _message::Union{AbstractString, Symbol}, _priority) + announce(GtkAccessible(instance), _message, _priority) + end + function get_accessible_parent(instance::AdwSpinRow) + get_accessible_parent(GtkAccessible(instance)) + end + function get_accessible_role(instance::AdwSpinRow) + get_accessible_role(GtkAccessible(instance)) + end + function get_at_context(instance::AdwSpinRow) + get_at_context(GtkAccessible(instance)) + end + function get_bounds(instance::AdwSpinRow) + get_bounds(GtkAccessible(instance)) + end + function get_first_accessible_child(instance::AdwSpinRow) + get_first_accessible_child(GtkAccessible(instance)) + end + function get_next_accessible_sibling(instance::AdwSpinRow) + get_next_accessible_sibling(GtkAccessible(instance)) + end + function get_platform_state(instance::AdwSpinRow, _state) + get_platform_state(GtkAccessible(instance), _state) + end + function reset_property(instance::AdwSpinRow, _property) + reset_property(GtkAccessible(instance), _property) + end + function reset_relation(instance::AdwSpinRow, _relation) + reset_relation(GtkAccessible(instance), _relation) + end + function reset_state(instance::AdwSpinRow, _state) + reset_state(GtkAccessible(instance), _state) + end + function set_accessible_parent(instance::AdwSpinRow, _parent::Maybe(GtkAccessible), _next_sibling::Maybe(GtkAccessible)) + set_accessible_parent(GtkAccessible(instance), _parent, _next_sibling) + end + function update_next_accessible_sibling(instance::AdwSpinRow, _new_sibling::Maybe(GtkAccessible)) + update_next_accessible_sibling(GtkAccessible(instance), _new_sibling) + end + function update_property(instance::AdwSpinRow, _properties, _values) + update_property(GtkAccessible(instance), _properties, _values) + end + function update_relation(instance::AdwSpinRow, _relations, _values) + update_relation(GtkAccessible(instance), _relations, _values) + end + function update_state(instance::AdwSpinRow, _states, _values) + update_state(GtkAccessible(instance), _states, _values) + end + function get_action_name(instance::AdwSpinRow) + get_action_name(GtkActionable(instance)) + end + function get_action_target_value(instance::AdwSpinRow) + get_action_target_value(GtkActionable(instance)) + end + function set_action_name(instance::AdwSpinRow, _action_name::Maybe(Union{AbstractString, Symbol})) + set_action_name(GtkActionable(instance), _action_name) + end + function set_action_target_value(instance::AdwSpinRow, _target_value::Maybe(GVariant)) + set_action_target_value(GtkActionable(instance), _target_value) + end + function set_detailed_action_name(instance::AdwSpinRow, _detailed_action_name::Union{AbstractString, Symbol}) + set_detailed_action_name(GtkActionable(instance), _detailed_action_name) + end + function get_buildable_id(instance::AdwSpinRow) + get_buildable_id(GtkBuildable(instance)) + end + function delegate_get_accessible_platform_state(instance::AdwSpinRow, _state) + delegate_get_accessible_platform_state(GtkEditable(instance), _state) + end + function delete_selection(instance::AdwSpinRow) + delete_selection(GtkEditable(instance)) + end + function delete_text(instance::AdwSpinRow, _start_pos::Integer, _end_pos::Integer) + delete_text(GtkEditable(instance), _start_pos, _end_pos) + end + function finish_delegate(instance::AdwSpinRow) + finish_delegate(GtkEditable(instance)) + end + function get_alignment(instance::AdwSpinRow) + get_alignment(GtkEditable(instance)) + end + function get_chars(instance::AdwSpinRow, _start_pos::Integer, _end_pos::Integer) + get_chars(GtkEditable(instance), _start_pos, _end_pos) + end + function get_delegate(instance::AdwSpinRow) + get_delegate(GtkEditable(instance)) + end + function get_editable(instance::AdwSpinRow) + get_editable(GtkEditable(instance)) + end + function get_enable_undo(instance::AdwSpinRow) + get_enable_undo(GtkEditable(instance)) + end + function get_max_width_chars(instance::AdwSpinRow) + get_max_width_chars(GtkEditable(instance)) + end + function get_position(instance::AdwSpinRow) + get_position(GtkEditable(instance)) + end + function get_selection_bounds(instance::AdwSpinRow) + get_selection_bounds(GtkEditable(instance)) + end + function get_text(instance::AdwSpinRow) + get_text(GtkEditable(instance)) + end + function get_width_chars(instance::AdwSpinRow) + get_width_chars(GtkEditable(instance)) + end + function init_delegate(instance::AdwSpinRow) + init_delegate(GtkEditable(instance)) + end + function insert_text(instance::AdwSpinRow, _text::Union{AbstractString, Symbol}, _length::Integer, _position::Integer) + insert_text(GtkEditable(instance), _text, _length, _position) + end + function select_region(instance::AdwSpinRow, _start_pos::Integer, _end_pos::Integer) + select_region(GtkEditable(instance), _start_pos, _end_pos) + end + function set_alignment(instance::AdwSpinRow, _xalign::Real) + set_alignment(GtkEditable(instance), _xalign) + end + function set_editable(instance::AdwSpinRow, _is_editable::Bool) + set_editable(GtkEditable(instance), _is_editable) + end + function set_enable_undo(instance::AdwSpinRow, _enable_undo::Bool) + set_enable_undo(GtkEditable(instance), _enable_undo) + end + function set_max_width_chars(instance::AdwSpinRow, _n_chars::Integer) + set_max_width_chars(GtkEditable(instance), _n_chars) + end + function set_position(instance::AdwSpinRow, _position::Integer) + set_position(GtkEditable(instance), _position) + end + function set_text(instance::AdwSpinRow, _text::Union{AbstractString, Symbol}) + set_text(GtkEditable(instance), _text) + end + function set_width_chars(instance::AdwSpinRow, _n_chars::Integer) + set_width_chars(GtkEditable(instance), _n_chars) + end function SplitButton_new() ret = ccall(("adw_split_button_new", libadwaita), Ptr{GObject}, ()) ret2 = AdwSplitButtonLeaf(ret, false) ret2 end + function get_can_shrink(instance::AdwSplitButton) + ret = ccall(("adw_split_button_get_can_shrink", libadwaita), Cint, (Ptr{GObject},), instance) + ret2 = convert(Bool, ret) + ret2 + end function get_child(instance::AdwSplitButton) ret = ccall(("adw_split_button_get_child", libadwaita), Ptr{GObject}, (Ptr{GObject},), instance) ret2 = convert_if_not_null(GtkWidget, ret, false) @@ -1714,6 +5329,10 @@ $(Expr(:toplevel, quote ret = ccall(("adw_split_button_popup", libadwaita), Nothing, (Ptr{GObject},), instance) nothing end + function set_can_shrink(instance::AdwSplitButton, _can_shrink::Bool) + ret = ccall(("adw_split_button_set_can_shrink", libadwaita), Nothing, (Ptr{GObject}, Cint), instance, _can_shrink) + nothing + end function set_child(instance::AdwSplitButton, _child::Maybe(GtkWidget)) _child_maybe = nothing_to_null(_child) ret = ccall(("adw_split_button_set_child", libadwaita), Nothing, (Ptr{GObject}, Ptr{GObject}), instance, _child_maybe) @@ -1749,12 +5368,86 @@ $(Expr(:toplevel, quote ret = ccall(("adw_split_button_set_use_underline", libadwaita), Nothing, (Ptr{GObject}, Cint), instance, _use_underline) nothing end + function announce(instance::AdwSplitButton, _message::Union{AbstractString, Symbol}, _priority) + announce(GtkAccessible(instance), _message, _priority) + end + function get_accessible_parent(instance::AdwSplitButton) + get_accessible_parent(GtkAccessible(instance)) + end + function get_accessible_role(instance::AdwSplitButton) + get_accessible_role(GtkAccessible(instance)) + end + function get_at_context(instance::AdwSplitButton) + get_at_context(GtkAccessible(instance)) + end + function get_bounds(instance::AdwSplitButton) + get_bounds(GtkAccessible(instance)) + end + function get_first_accessible_child(instance::AdwSplitButton) + get_first_accessible_child(GtkAccessible(instance)) + end + function get_next_accessible_sibling(instance::AdwSplitButton) + get_next_accessible_sibling(GtkAccessible(instance)) + end + function get_platform_state(instance::AdwSplitButton, _state) + get_platform_state(GtkAccessible(instance), _state) + end + function reset_property(instance::AdwSplitButton, _property) + reset_property(GtkAccessible(instance), _property) + end + function reset_relation(instance::AdwSplitButton, _relation) + reset_relation(GtkAccessible(instance), _relation) + end + function reset_state(instance::AdwSplitButton, _state) + reset_state(GtkAccessible(instance), _state) + end + function set_accessible_parent(instance::AdwSplitButton, _parent::Maybe(GtkAccessible), _next_sibling::Maybe(GtkAccessible)) + set_accessible_parent(GtkAccessible(instance), _parent, _next_sibling) + end + function update_next_accessible_sibling(instance::AdwSplitButton, _new_sibling::Maybe(GtkAccessible)) + update_next_accessible_sibling(GtkAccessible(instance), _new_sibling) + end + function update_property(instance::AdwSplitButton, _properties, _values) + update_property(GtkAccessible(instance), _properties, _values) + end + function update_relation(instance::AdwSplitButton, _relations, _values) + update_relation(GtkAccessible(instance), _relations, _values) + end + function update_state(instance::AdwSplitButton, _states, _values) + update_state(GtkAccessible(instance), _states, _values) + end + function get_action_name(instance::AdwSplitButton) + get_action_name(GtkActionable(instance)) + end + function get_action_target_value(instance::AdwSplitButton) + get_action_target_value(GtkActionable(instance)) + end + function set_action_name(instance::AdwSplitButton, _action_name::Maybe(Union{AbstractString, Symbol})) + set_action_name(GtkActionable(instance), _action_name) + end + function set_action_target_value(instance::AdwSplitButton, _target_value::Maybe(GVariant)) + set_action_target_value(GtkActionable(instance), _target_value) + end + function set_detailed_action_name(instance::AdwSplitButton, _detailed_action_name::Union{AbstractString, Symbol}) + set_detailed_action_name(GtkActionable(instance), _detailed_action_name) + end + function get_buildable_id(instance::AdwSplitButton) + get_buildable_id(GtkBuildable(instance)) + end function SpringAnimation_new(_widget::GtkWidget, _from::Real, _to::Real, _spring_params::AdwSpringParams, _target::AdwAnimationTarget) _target = GLib.glib_ref(_target) ret = ccall(("adw_spring_animation_new", libadwaita), Ptr{GObject}, (Ptr{GObject}, Float64, Float64, Ptr{AdwSpringParams}, Ptr{GObject}), _widget, _from, _to, _spring_params, _target) ret2 = AdwSpringAnimationLeaf(ret, false) ret2 end + function calculate_value(instance::AdwSpringAnimation, _time::Integer) + ret = ccall(("adw_spring_animation_calculate_value", libadwaita), Float64, (Ptr{GObject}, UInt32), instance, _time) + ret + end + function calculate_velocity(instance::AdwSpringAnimation, _time::Integer) + ret = ccall(("adw_spring_animation_calculate_velocity", libadwaita), Float64, (Ptr{GObject}, UInt32), instance, _time) + ret + end function get_clamp(instance::AdwSpringAnimation) ret = ccall(("adw_spring_animation_get_clamp", libadwaita), Cint, (Ptr{GObject},), instance) ret2 = convert(Bool, ret) @@ -1919,6 +5612,63 @@ $(Expr(:toplevel, quote ret = ccall(("adw_squeezer_set_yalign", libadwaita), Nothing, (Ptr{GObject}, Float32), instance, _yalign) nothing end + function announce(instance::AdwSqueezer, _message::Union{AbstractString, Symbol}, _priority) + announce(GtkAccessible(instance), _message, _priority) + end + function get_accessible_parent(instance::AdwSqueezer) + get_accessible_parent(GtkAccessible(instance)) + end + function get_accessible_role(instance::AdwSqueezer) + get_accessible_role(GtkAccessible(instance)) + end + function get_at_context(instance::AdwSqueezer) + get_at_context(GtkAccessible(instance)) + end + function get_bounds(instance::AdwSqueezer) + get_bounds(GtkAccessible(instance)) + end + function get_first_accessible_child(instance::AdwSqueezer) + get_first_accessible_child(GtkAccessible(instance)) + end + function get_next_accessible_sibling(instance::AdwSqueezer) + get_next_accessible_sibling(GtkAccessible(instance)) + end + function get_platform_state(instance::AdwSqueezer, _state) + get_platform_state(GtkAccessible(instance), _state) + end + function reset_property(instance::AdwSqueezer, _property) + reset_property(GtkAccessible(instance), _property) + end + function reset_relation(instance::AdwSqueezer, _relation) + reset_relation(GtkAccessible(instance), _relation) + end + function reset_state(instance::AdwSqueezer, _state) + reset_state(GtkAccessible(instance), _state) + end + function set_accessible_parent(instance::AdwSqueezer, _parent::Maybe(GtkAccessible), _next_sibling::Maybe(GtkAccessible)) + set_accessible_parent(GtkAccessible(instance), _parent, _next_sibling) + end + function update_next_accessible_sibling(instance::AdwSqueezer, _new_sibling::Maybe(GtkAccessible)) + update_next_accessible_sibling(GtkAccessible(instance), _new_sibling) + end + function update_property(instance::AdwSqueezer, _properties, _values) + update_property(GtkAccessible(instance), _properties, _values) + end + function update_relation(instance::AdwSqueezer, _relations, _values) + update_relation(GtkAccessible(instance), _relations, _values) + end + function update_state(instance::AdwSqueezer, _states, _values) + update_state(GtkAccessible(instance), _states, _values) + end + function get_buildable_id(instance::AdwSqueezer) + get_buildable_id(GtkBuildable(instance)) + end + function get_orientation(instance::AdwSqueezer) + get_orientation(GtkOrientable(instance)) + end + function set_orientation(instance::AdwSqueezer, _orientation) + set_orientation(GtkOrientable(instance), _orientation) + end function get_child(instance::AdwSqueezerPage) ret = ccall(("adw_squeezer_page_get_child", libadwaita), Ptr{GObject}, (Ptr{GObject},), instance) ret2 = convert(GtkWidget, ret, false) @@ -1987,6 +5737,57 @@ $(Expr(:toplevel, quote ret = ccall(("adw_status_page_set_title", libadwaita), Nothing, (Ptr{GObject}, Cstring), instance, _title) nothing end + function announce(instance::AdwStatusPage, _message::Union{AbstractString, Symbol}, _priority) + announce(GtkAccessible(instance), _message, _priority) + end + function get_accessible_parent(instance::AdwStatusPage) + get_accessible_parent(GtkAccessible(instance)) + end + function get_accessible_role(instance::AdwStatusPage) + get_accessible_role(GtkAccessible(instance)) + end + function get_at_context(instance::AdwStatusPage) + get_at_context(GtkAccessible(instance)) + end + function get_bounds(instance::AdwStatusPage) + get_bounds(GtkAccessible(instance)) + end + function get_first_accessible_child(instance::AdwStatusPage) + get_first_accessible_child(GtkAccessible(instance)) + end + function get_next_accessible_sibling(instance::AdwStatusPage) + get_next_accessible_sibling(GtkAccessible(instance)) + end + function get_platform_state(instance::AdwStatusPage, _state) + get_platform_state(GtkAccessible(instance), _state) + end + function reset_property(instance::AdwStatusPage, _property) + reset_property(GtkAccessible(instance), _property) + end + function reset_relation(instance::AdwStatusPage, _relation) + reset_relation(GtkAccessible(instance), _relation) + end + function reset_state(instance::AdwStatusPage, _state) + reset_state(GtkAccessible(instance), _state) + end + function set_accessible_parent(instance::AdwStatusPage, _parent::Maybe(GtkAccessible), _next_sibling::Maybe(GtkAccessible)) + set_accessible_parent(GtkAccessible(instance), _parent, _next_sibling) + end + function update_next_accessible_sibling(instance::AdwStatusPage, _new_sibling::Maybe(GtkAccessible)) + update_next_accessible_sibling(GtkAccessible(instance), _new_sibling) + end + function update_property(instance::AdwStatusPage, _properties, _values) + update_property(GtkAccessible(instance), _properties, _values) + end + function update_relation(instance::AdwStatusPage, _relations, _values) + update_relation(GtkAccessible(instance), _relations, _values) + end + function update_state(instance::AdwStatusPage, _states, _values) + update_state(GtkAccessible(instance), _states, _values) + end + function get_buildable_id(instance::AdwStatusPage) + get_buildable_id(GtkBuildable(instance)) + end function get_default() ret = ccall(("adw_style_manager_get_default", libadwaita), Ptr{GObject}, ()) ret2 = convert(AdwStyleManager, ret, false) @@ -2009,7 +5810,7 @@ $(Expr(:toplevel, quote end function get_display(instance::AdwStyleManager) ret = ccall(("adw_style_manager_get_display", libadwaita), Ptr{GObject}, (Ptr{GObject},), instance) - ret2 = convert(GdkDisplay, ret, false) + ret2 = convert_if_not_null(GdkDisplay, ret, false) ret2 end function get_high_contrast(instance::AdwStyleManager) @@ -2041,11 +5842,21 @@ $(Expr(:toplevel, quote ret2 = convert(Bool, ret) ret2 end + function get_allow_window_handle(instance::AdwSwipeTracker) + ret = ccall(("adw_swipe_tracker_get_allow_window_handle", libadwaita), Cint, (Ptr{GObject},), instance) + ret2 = convert(Bool, ret) + ret2 + end function get_enabled(instance::AdwSwipeTracker) ret = ccall(("adw_swipe_tracker_get_enabled", libadwaita), Cint, (Ptr{GObject},), instance) ret2 = convert(Bool, ret) ret2 end + function get_lower_overshoot(instance::AdwSwipeTracker) + ret = ccall(("adw_swipe_tracker_get_lower_overshoot", libadwaita), Cint, (Ptr{GObject},), instance) + ret2 = convert(Bool, ret) + ret2 + end function get_reversed(instance::AdwSwipeTracker) ret = ccall(("adw_swipe_tracker_get_reversed", libadwaita), Cint, (Ptr{GObject},), instance) ret2 = convert(Bool, ret) @@ -2059,6 +5870,11 @@ $(Expr(:toplevel, quote end ret2 end + function get_upper_overshoot(instance::AdwSwipeTracker) + ret = ccall(("adw_swipe_tracker_get_upper_overshoot", libadwaita), Cint, (Ptr{GObject},), instance) + ret2 = convert(Bool, ret) + ret2 + end function set_allow_long_swipes(instance::AdwSwipeTracker, _allow_long_swipes::Bool) ret = ccall(("adw_swipe_tracker_set_allow_long_swipes", libadwaita), Nothing, (Ptr{GObject}, Cint), instance, _allow_long_swipes) nothing @@ -2067,18 +5883,116 @@ $(Expr(:toplevel, quote ret = ccall(("adw_swipe_tracker_set_allow_mouse_drag", libadwaita), Nothing, (Ptr{GObject}, Cint), instance, _allow_mouse_drag) nothing end + function set_allow_window_handle(instance::AdwSwipeTracker, _allow_window_handle::Bool) + ret = ccall(("adw_swipe_tracker_set_allow_window_handle", libadwaita), Nothing, (Ptr{GObject}, Cint), instance, _allow_window_handle) + nothing + end function set_enabled(instance::AdwSwipeTracker, _enabled::Bool) ret = ccall(("adw_swipe_tracker_set_enabled", libadwaita), Nothing, (Ptr{GObject}, Cint), instance, _enabled) nothing end + function set_lower_overshoot(instance::AdwSwipeTracker, _overshoot::Bool) + ret = ccall(("adw_swipe_tracker_set_lower_overshoot", libadwaita), Nothing, (Ptr{GObject}, Cint), instance, _overshoot) + nothing + end function set_reversed(instance::AdwSwipeTracker, _reversed::Bool) ret = ccall(("adw_swipe_tracker_set_reversed", libadwaita), Nothing, (Ptr{GObject}, Cint), instance, _reversed) nothing end + function set_upper_overshoot(instance::AdwSwipeTracker, _overshoot::Bool) + ret = ccall(("adw_swipe_tracker_set_upper_overshoot", libadwaita), Nothing, (Ptr{GObject}, Cint), instance, _overshoot) + nothing + end function shift_position(instance::AdwSwipeTracker, _delta::Real) ret = ccall(("adw_swipe_tracker_shift_position", libadwaita), Nothing, (Ptr{GObject}, Float64), instance, _delta) nothing end + function get_orientation(instance::AdwSwipeTracker) + get_orientation(GtkOrientable(instance)) + end + function set_orientation(instance::AdwSwipeTracker, _orientation) + set_orientation(GtkOrientable(instance), _orientation) + end + function SwitchRow_new() + ret = ccall(("adw_switch_row_new", libadwaita), Ptr{GObject}, ()) + ret2 = AdwSwitchRowLeaf(ret, false) + ret2 + end + function get_active(instance::AdwSwitchRow) + ret = ccall(("adw_switch_row_get_active", libadwaita), Cint, (Ptr{GObject},), instance) + ret2 = convert(Bool, ret) + ret2 + end + function set_active(instance::AdwSwitchRow, _is_active::Bool) + ret = ccall(("adw_switch_row_set_active", libadwaita), Nothing, (Ptr{GObject}, Cint), instance, _is_active) + nothing + end + function announce(instance::AdwSwitchRow, _message::Union{AbstractString, Symbol}, _priority) + announce(GtkAccessible(instance), _message, _priority) + end + function get_accessible_parent(instance::AdwSwitchRow) + get_accessible_parent(GtkAccessible(instance)) + end + function get_accessible_role(instance::AdwSwitchRow) + get_accessible_role(GtkAccessible(instance)) + end + function get_at_context(instance::AdwSwitchRow) + get_at_context(GtkAccessible(instance)) + end + function get_bounds(instance::AdwSwitchRow) + get_bounds(GtkAccessible(instance)) + end + function get_first_accessible_child(instance::AdwSwitchRow) + get_first_accessible_child(GtkAccessible(instance)) + end + function get_next_accessible_sibling(instance::AdwSwitchRow) + get_next_accessible_sibling(GtkAccessible(instance)) + end + function get_platform_state(instance::AdwSwitchRow, _state) + get_platform_state(GtkAccessible(instance), _state) + end + function reset_property(instance::AdwSwitchRow, _property) + reset_property(GtkAccessible(instance), _property) + end + function reset_relation(instance::AdwSwitchRow, _relation) + reset_relation(GtkAccessible(instance), _relation) + end + function reset_state(instance::AdwSwitchRow, _state) + reset_state(GtkAccessible(instance), _state) + end + function set_accessible_parent(instance::AdwSwitchRow, _parent::Maybe(GtkAccessible), _next_sibling::Maybe(GtkAccessible)) + set_accessible_parent(GtkAccessible(instance), _parent, _next_sibling) + end + function update_next_accessible_sibling(instance::AdwSwitchRow, _new_sibling::Maybe(GtkAccessible)) + update_next_accessible_sibling(GtkAccessible(instance), _new_sibling) + end + function update_property(instance::AdwSwitchRow, _properties, _values) + update_property(GtkAccessible(instance), _properties, _values) + end + function update_relation(instance::AdwSwitchRow, _relations, _values) + update_relation(GtkAccessible(instance), _relations, _values) + end + function update_state(instance::AdwSwitchRow, _states, _values) + update_state(GtkAccessible(instance), _states, _values) + end + function get_action_name(instance::AdwSwitchRow) + get_action_name(GtkActionable(instance)) + end + function get_action_target_value(instance::AdwSwitchRow) + get_action_target_value(GtkActionable(instance)) + end + function set_action_name(instance::AdwSwitchRow, _action_name::Maybe(Union{AbstractString, Symbol})) + set_action_name(GtkActionable(instance), _action_name) + end + function set_action_target_value(instance::AdwSwitchRow, _target_value::Maybe(GVariant)) + set_action_target_value(GtkActionable(instance), _target_value) + end + function set_detailed_action_name(instance::AdwSwitchRow, _detailed_action_name::Union{AbstractString, Symbol}) + set_detailed_action_name(GtkActionable(instance), _detailed_action_name) + end + function get_buildable_id(instance::AdwSwitchRow) + get_buildable_id(GtkBuildable(instance)) + end function TabBar_new() ret = ccall(("adw_tab_bar_new", libadwaita), Ptr{GObject}, ()) ret2 = AdwTabBarLeaf(ret, false) @@ -2099,6 +6013,16 @@ $(Expr(:toplevel, quote ret2 = convert(Bool, ret) ret2 end + function get_extra_drag_preferred_action(instance::AdwTabBar) + ret = ccall(("adw_tab_bar_get_extra_drag_preferred_action", libadwaita), UInt32, (Ptr{GObject},), instance) + ret2 = DragAction(ret) + ret2 + end + function get_extra_drag_preload(instance::AdwTabBar) + ret = ccall(("adw_tab_bar_get_extra_drag_preload", libadwaita), Cint, (Ptr{GObject},), instance) + ret2 = convert(Bool, ret) + ret2 + end function get_inverted(instance::AdwTabBar) ret = ccall(("adw_tab_bar_get_inverted", libadwaita), Cint, (Ptr{GObject},), instance) ret2 = convert(Bool, ret) @@ -2137,6 +6061,10 @@ $(Expr(:toplevel, quote ret = ccall(("adw_tab_bar_set_expand_tabs", libadwaita), Nothing, (Ptr{GObject}, Cint), instance, _expand_tabs) nothing end + function set_extra_drag_preload(instance::AdwTabBar, _preload::Bool) + ret = ccall(("adw_tab_bar_set_extra_drag_preload", libadwaita), Nothing, (Ptr{GObject}, Cint), instance, _preload) + nothing + end function set_inverted(instance::AdwTabBar, _inverted::Bool) ret = ccall(("adw_tab_bar_set_inverted", libadwaita), Nothing, (Ptr{GObject}, Cint), instance, _inverted) nothing @@ -2157,6 +6085,303 @@ $(Expr(:toplevel, quote ret = ccall(("adw_tab_bar_setup_extra_drop_target", libadwaita), Nothing, (Ptr{GObject}, UInt32, Ptr{UInt64}, UInt64), instance, _actions, _types_arr, _n_types) nothing end + function announce(instance::AdwTabBar, _message::Union{AbstractString, Symbol}, _priority) + announce(GtkAccessible(instance), _message, _priority) + end + function get_accessible_parent(instance::AdwTabBar) + get_accessible_parent(GtkAccessible(instance)) + end + function get_accessible_role(instance::AdwTabBar) + get_accessible_role(GtkAccessible(instance)) + end + function get_at_context(instance::AdwTabBar) + get_at_context(GtkAccessible(instance)) + end + function get_bounds(instance::AdwTabBar) + get_bounds(GtkAccessible(instance)) + end + function get_first_accessible_child(instance::AdwTabBar) + get_first_accessible_child(GtkAccessible(instance)) + end + function get_next_accessible_sibling(instance::AdwTabBar) + get_next_accessible_sibling(GtkAccessible(instance)) + end + function get_platform_state(instance::AdwTabBar, _state) + get_platform_state(GtkAccessible(instance), _state) + end + function reset_property(instance::AdwTabBar, _property) + reset_property(GtkAccessible(instance), _property) + end + function reset_relation(instance::AdwTabBar, _relation) + reset_relation(GtkAccessible(instance), _relation) + end + function reset_state(instance::AdwTabBar, _state) + reset_state(GtkAccessible(instance), _state) + end + function set_accessible_parent(instance::AdwTabBar, _parent::Maybe(GtkAccessible), _next_sibling::Maybe(GtkAccessible)) + set_accessible_parent(GtkAccessible(instance), _parent, _next_sibling) + end + function update_next_accessible_sibling(instance::AdwTabBar, _new_sibling::Maybe(GtkAccessible)) + update_next_accessible_sibling(GtkAccessible(instance), _new_sibling) + end + function update_property(instance::AdwTabBar, _properties, _values) + update_property(GtkAccessible(instance), _properties, _values) + end + function update_relation(instance::AdwTabBar, _relations, _values) + update_relation(GtkAccessible(instance), _relations, _values) + end + function update_state(instance::AdwTabBar, _states, _values) + update_state(GtkAccessible(instance), _states, _values) + end + function get_buildable_id(instance::AdwTabBar) + get_buildable_id(GtkBuildable(instance)) + end + function TabButton_new() + ret = ccall(("adw_tab_button_new", libadwaita), Ptr{GObject}, ()) + ret2 = AdwTabButtonLeaf(ret, false) + ret2 + end + function get_view(instance::AdwTabButton) + ret = ccall(("adw_tab_button_get_view", libadwaita), Ptr{GObject}, (Ptr{GObject},), instance) + ret2 = convert_if_not_null(AdwTabView, ret, false) + ret2 + end + function set_view(instance::AdwTabButton, _view::Maybe(AdwTabView)) + _view_maybe = nothing_to_null(_view) + ret = ccall(("adw_tab_button_set_view", libadwaita), Nothing, (Ptr{GObject}, Ptr{GObject}), instance, _view_maybe) + nothing + end + function announce(instance::AdwTabButton, _message::Union{AbstractString, Symbol}, _priority) + announce(GtkAccessible(instance), _message, _priority) + end + function get_accessible_parent(instance::AdwTabButton) + get_accessible_parent(GtkAccessible(instance)) + end + function get_accessible_role(instance::AdwTabButton) + get_accessible_role(GtkAccessible(instance)) + end + function get_at_context(instance::AdwTabButton) + get_at_context(GtkAccessible(instance)) + end + function get_bounds(instance::AdwTabButton) + get_bounds(GtkAccessible(instance)) + end + function get_first_accessible_child(instance::AdwTabButton) + get_first_accessible_child(GtkAccessible(instance)) + end + function get_next_accessible_sibling(instance::AdwTabButton) + get_next_accessible_sibling(GtkAccessible(instance)) + end + function get_platform_state(instance::AdwTabButton, _state) + get_platform_state(GtkAccessible(instance), _state) + end + function reset_property(instance::AdwTabButton, _property) + reset_property(GtkAccessible(instance), _property) + end + function reset_relation(instance::AdwTabButton, _relation) + reset_relation(GtkAccessible(instance), _relation) + end + function reset_state(instance::AdwTabButton, _state) + reset_state(GtkAccessible(instance), _state) + end + function set_accessible_parent(instance::AdwTabButton, _parent::Maybe(GtkAccessible), _next_sibling::Maybe(GtkAccessible)) + set_accessible_parent(GtkAccessible(instance), _parent, _next_sibling) + end + function update_next_accessible_sibling(instance::AdwTabButton, _new_sibling::Maybe(GtkAccessible)) + update_next_accessible_sibling(GtkAccessible(instance), _new_sibling) + end + function update_property(instance::AdwTabButton, _properties, _values) + update_property(GtkAccessible(instance), _properties, _values) + end + function update_relation(instance::AdwTabButton, _relations, _values) + update_relation(GtkAccessible(instance), _relations, _values) + end + function update_state(instance::AdwTabButton, _states, _values) + update_state(GtkAccessible(instance), _states, _values) + end + function get_action_name(instance::AdwTabButton) + get_action_name(GtkActionable(instance)) + end + function get_action_target_value(instance::AdwTabButton) + get_action_target_value(GtkActionable(instance)) + end + function set_action_name(instance::AdwTabButton, _action_name::Maybe(Union{AbstractString, Symbol})) + set_action_name(GtkActionable(instance), _action_name) + end + function set_action_target_value(instance::AdwTabButton, _target_value::Maybe(GVariant)) + set_action_target_value(GtkActionable(instance), _target_value) + end + function set_detailed_action_name(instance::AdwTabButton, _detailed_action_name::Union{AbstractString, Symbol}) + set_detailed_action_name(GtkActionable(instance), _detailed_action_name) + end + function get_buildable_id(instance::AdwTabButton) + get_buildable_id(GtkBuildable(instance)) + end + function TabOverview_new() + ret = ccall(("adw_tab_overview_new", libadwaita), Ptr{GObject}, ()) + ret2 = AdwTabOverviewLeaf(ret, false) + ret2 + end + function get_child(instance::AdwTabOverview) + ret = ccall(("adw_tab_overview_get_child", libadwaita), Ptr{GObject}, (Ptr{GObject},), instance) + ret2 = convert_if_not_null(GtkWidget, ret, false) + ret2 + end + function get_enable_new_tab(instance::AdwTabOverview) + ret = ccall(("adw_tab_overview_get_enable_new_tab", libadwaita), Cint, (Ptr{GObject},), instance) + ret2 = convert(Bool, ret) + ret2 + end + function get_enable_search(instance::AdwTabOverview) + ret = ccall(("adw_tab_overview_get_enable_search", libadwaita), Cint, (Ptr{GObject},), instance) + ret2 = convert(Bool, ret) + ret2 + end + function get_extra_drag_preferred_action(instance::AdwTabOverview) + ret = ccall(("adw_tab_overview_get_extra_drag_preferred_action", libadwaita), UInt32, (Ptr{GObject},), instance) + ret2 = DragAction(ret) + ret2 + end + function get_extra_drag_preload(instance::AdwTabOverview) + ret = ccall(("adw_tab_overview_get_extra_drag_preload", libadwaita), Cint, (Ptr{GObject},), instance) + ret2 = convert(Bool, ret) + ret2 + end + function get_inverted(instance::AdwTabOverview) + ret = ccall(("adw_tab_overview_get_inverted", libadwaita), Cint, (Ptr{GObject},), instance) + ret2 = convert(Bool, ret) + ret2 + end + function get_open(instance::AdwTabOverview) + ret = ccall(("adw_tab_overview_get_open", libadwaita), Cint, (Ptr{GObject},), instance) + ret2 = convert(Bool, ret) + ret2 + end + function get_search_active(instance::AdwTabOverview) + ret = ccall(("adw_tab_overview_get_search_active", libadwaita), Cint, (Ptr{GObject},), instance) + ret2 = convert(Bool, ret) + ret2 + end + function get_secondary_menu(instance::AdwTabOverview) + ret = ccall(("adw_tab_overview_get_secondary_menu", libadwaita), Ptr{GObject}, (Ptr{GObject},), instance) + ret2 = convert_if_not_null(GMenuModel, ret, false) + ret2 + end + function get_show_end_title_buttons(instance::AdwTabOverview) + ret = ccall(("adw_tab_overview_get_show_end_title_buttons", libadwaita), Cint, (Ptr{GObject},), instance) + ret2 = convert(Bool, ret) + ret2 + end + function get_show_start_title_buttons(instance::AdwTabOverview) + ret = ccall(("adw_tab_overview_get_show_start_title_buttons", libadwaita), Cint, (Ptr{GObject},), instance) + ret2 = convert(Bool, ret) + ret2 + end + function get_view(instance::AdwTabOverview) + ret = ccall(("adw_tab_overview_get_view", libadwaita), Ptr{GObject}, (Ptr{GObject},), instance) + ret2 = convert_if_not_null(AdwTabView, ret, false) + ret2 + end + function set_child(instance::AdwTabOverview, _child::Maybe(GtkWidget)) + _child_maybe = nothing_to_null(_child) + ret = ccall(("adw_tab_overview_set_child", libadwaita), Nothing, (Ptr{GObject}, Ptr{GObject}), instance, _child_maybe) + nothing + end + function set_enable_new_tab(instance::AdwTabOverview, _enable_new_tab::Bool) + ret = ccall(("adw_tab_overview_set_enable_new_tab", libadwaita), Nothing, (Ptr{GObject}, Cint), instance, _enable_new_tab) + nothing + end + function set_enable_search(instance::AdwTabOverview, _enable_search::Bool) + ret = ccall(("adw_tab_overview_set_enable_search", libadwaita), Nothing, (Ptr{GObject}, Cint), instance, _enable_search) + nothing + end + function set_extra_drag_preload(instance::AdwTabOverview, _preload::Bool) + ret = ccall(("adw_tab_overview_set_extra_drag_preload", libadwaita), Nothing, (Ptr{GObject}, Cint), instance, _preload) + nothing + end + function set_inverted(instance::AdwTabOverview, _inverted::Bool) + ret = ccall(("adw_tab_overview_set_inverted", libadwaita), Nothing, (Ptr{GObject}, Cint), instance, _inverted) + nothing + end + function set_open(instance::AdwTabOverview, _open::Bool) + ret = ccall(("adw_tab_overview_set_open", libadwaita), Nothing, (Ptr{GObject}, Cint), instance, _open) + nothing + end + function set_secondary_menu(instance::AdwTabOverview, _secondary_menu::Maybe(GMenuModel)) + _secondary_menu_maybe = nothing_to_null(_secondary_menu) + ret = ccall(("adw_tab_overview_set_secondary_menu", libadwaita), Nothing, (Ptr{GObject}, Ptr{GObject}), instance, _secondary_menu_maybe) + nothing + end + function set_show_end_title_buttons(instance::AdwTabOverview, _show_end_title_buttons::Bool) + ret = ccall(("adw_tab_overview_set_show_end_title_buttons", libadwaita), Nothing, (Ptr{GObject}, Cint), instance, _show_end_title_buttons) + nothing + end + function set_show_start_title_buttons(instance::AdwTabOverview, _show_start_title_buttons::Bool) + ret = ccall(("adw_tab_overview_set_show_start_title_buttons", libadwaita), Nothing, (Ptr{GObject}, Cint), instance, _show_start_title_buttons) + nothing + end + function set_view(instance::AdwTabOverview, _view::Maybe(AdwTabView)) + _view_maybe = nothing_to_null(_view) + ret = ccall(("adw_tab_overview_set_view", libadwaita), Nothing, (Ptr{GObject}, Ptr{GObject}), instance, _view_maybe) + nothing + end + function setup_extra_drop_target(instance::AdwTabOverview, _actions, _types) + _types_arr = convert(Vector{UInt64}, _types) + _n_types = length(_types) + ret = ccall(("adw_tab_overview_setup_extra_drop_target", libadwaita), Nothing, (Ptr{GObject}, UInt32, Ptr{UInt64}, UInt64), instance, _actions, _types_arr, _n_types) + nothing + end + function announce(instance::AdwTabOverview, _message::Union{AbstractString, Symbol}, _priority) + announce(GtkAccessible(instance), _message, _priority) + end + function get_accessible_parent(instance::AdwTabOverview) + get_accessible_parent(GtkAccessible(instance)) + end + function get_accessible_role(instance::AdwTabOverview) + get_accessible_role(GtkAccessible(instance)) + end + function get_at_context(instance::AdwTabOverview) + get_at_context(GtkAccessible(instance)) + end + function get_bounds(instance::AdwTabOverview) + get_bounds(GtkAccessible(instance)) + end + function get_first_accessible_child(instance::AdwTabOverview) + get_first_accessible_child(GtkAccessible(instance)) + end + function get_next_accessible_sibling(instance::AdwTabOverview) + get_next_accessible_sibling(GtkAccessible(instance)) + end + function get_platform_state(instance::AdwTabOverview, _state) + get_platform_state(GtkAccessible(instance), _state) + end + function reset_property(instance::AdwTabOverview, _property) + reset_property(GtkAccessible(instance), _property) + end + function reset_relation(instance::AdwTabOverview, _relation) + reset_relation(GtkAccessible(instance), _relation) + end + function reset_state(instance::AdwTabOverview, _state) + reset_state(GtkAccessible(instance), _state) + end + function set_accessible_parent(instance::AdwTabOverview, _parent::Maybe(GtkAccessible), _next_sibling::Maybe(GtkAccessible)) + set_accessible_parent(GtkAccessible(instance), _parent, _next_sibling) + end + function update_next_accessible_sibling(instance::AdwTabOverview, _new_sibling::Maybe(GtkAccessible)) + update_next_accessible_sibling(GtkAccessible(instance), _new_sibling) + end + function update_property(instance::AdwTabOverview, _properties, _values) + update_property(GtkAccessible(instance), _properties, _values) + end + function update_relation(instance::AdwTabOverview, _relations, _values) + update_relation(GtkAccessible(instance), _relations, _values) + end + function update_state(instance::AdwTabOverview, _states, _values) + update_state(GtkAccessible(instance), _states, _values) + end + function get_buildable_id(instance::AdwTabOverview) + get_buildable_id(GtkBuildable(instance)) + end function get_child(instance::AdwTabPage) ret = ccall(("adw_tab_page_get_child", libadwaita), Ptr{GObject}, (Ptr{GObject},), instance) ret2 = convert(GtkWidget, ret, false) @@ -2182,6 +6407,16 @@ $(Expr(:toplevel, quote ret2 = string_or_nothing(ret, false) ret2 end + function get_keyword(instance::AdwTabPage) + ret = ccall(("adw_tab_page_get_keyword", libadwaita), Cstring, (Ptr{GObject},), instance) + ret2 = string_or_nothing(ret, false) + ret2 + end + function get_live_thumbnail(instance::AdwTabPage) + ret = ccall(("adw_tab_page_get_live_thumbnail", libadwaita), Cint, (Ptr{GObject},), instance) + ret2 = convert(Bool, ret) + ret2 + end function get_loading(instance::AdwTabPage) ret = ccall(("adw_tab_page_get_loading", libadwaita), Cint, (Ptr{GObject},), instance) ret2 = convert(Bool, ret) @@ -2207,6 +6442,14 @@ $(Expr(:toplevel, quote ret2 = convert(Bool, ret) ret2 end + function get_thumbnail_xalign(instance::AdwTabPage) + ret = ccall(("adw_tab_page_get_thumbnail_xalign", libadwaita), Float32, (Ptr{GObject},), instance) + ret + end + function get_thumbnail_yalign(instance::AdwTabPage) + ret = ccall(("adw_tab_page_get_thumbnail_yalign", libadwaita), Float32, (Ptr{GObject},), instance) + ret + end function get_title(instance::AdwTabPage) ret = ccall(("adw_tab_page_get_title", libadwaita), Cstring, (Ptr{GObject},), instance) ret2 = string_or_nothing(ret, false) @@ -2217,6 +6460,10 @@ $(Expr(:toplevel, quote ret2 = string_or_nothing(ret, false) ret2 end + function invalidate_thumbnail(instance::AdwTabPage) + ret = ccall(("adw_tab_page_invalidate_thumbnail", libadwaita), Nothing, (Ptr{GObject},), instance) + nothing + end function set_icon(instance::AdwTabPage, _icon::Maybe(GIcon)) _icon_maybe = nothing_to_null(_icon) ret = ccall(("adw_tab_page_set_icon", libadwaita), Nothing, (Ptr{GObject}, Ptr{GObject}), instance, _icon_maybe) @@ -2235,6 +6482,14 @@ $(Expr(:toplevel, quote ret = ccall(("adw_tab_page_set_indicator_tooltip", libadwaita), Nothing, (Ptr{GObject}, Cstring), instance, _tooltip) nothing end + function set_keyword(instance::AdwTabPage, _keyword::Union{AbstractString, Symbol}) + ret = ccall(("adw_tab_page_set_keyword", libadwaita), Nothing, (Ptr{GObject}, Cstring), instance, _keyword) + nothing + end + function set_live_thumbnail(instance::AdwTabPage, _live_thumbnail::Bool) + ret = ccall(("adw_tab_page_set_live_thumbnail", libadwaita), Nothing, (Ptr{GObject}, Cint), instance, _live_thumbnail) + nothing + end function set_loading(instance::AdwTabPage, _loading::Bool) ret = ccall(("adw_tab_page_set_loading", libadwaita), Nothing, (Ptr{GObject}, Cint), instance, _loading) nothing @@ -2243,6 +6498,14 @@ $(Expr(:toplevel, quote ret = ccall(("adw_tab_page_set_needs_attention", libadwaita), Nothing, (Ptr{GObject}, Cint), instance, _needs_attention) nothing end + function set_thumbnail_xalign(instance::AdwTabPage, _xalign::Real) + ret = ccall(("adw_tab_page_set_thumbnail_xalign", libadwaita), Nothing, (Ptr{GObject}, Float32), instance, _xalign) + nothing + end + function set_thumbnail_yalign(instance::AdwTabPage, _yalign::Real) + ret = ccall(("adw_tab_page_set_thumbnail_yalign", libadwaita), Nothing, (Ptr{GObject}, Float32), instance, _yalign) + nothing + end function set_title(instance::AdwTabPage, _title::Union{AbstractString, Symbol}) ret = ccall(("adw_tab_page_set_title", libadwaita), Nothing, (Ptr{GObject}, Cstring), instance, _title) nothing @@ -2251,6 +6514,54 @@ $(Expr(:toplevel, quote ret = ccall(("adw_tab_page_set_tooltip", libadwaita), Nothing, (Ptr{GObject}, Cstring), instance, _tooltip) nothing end + function announce(instance::AdwTabPage, _message::Union{AbstractString, Symbol}, _priority) + announce(GtkAccessible(instance), _message, _priority) + end + function get_accessible_parent(instance::AdwTabPage) + get_accessible_parent(GtkAccessible(instance)) + end + function get_accessible_role(instance::AdwTabPage) + get_accessible_role(GtkAccessible(instance)) + end + function get_at_context(instance::AdwTabPage) + get_at_context(GtkAccessible(instance)) + end + function get_bounds(instance::AdwTabPage) + get_bounds(GtkAccessible(instance)) + end + function get_first_accessible_child(instance::AdwTabPage) + get_first_accessible_child(GtkAccessible(instance)) + end + function get_next_accessible_sibling(instance::AdwTabPage) + get_next_accessible_sibling(GtkAccessible(instance)) + end + function get_platform_state(instance::AdwTabPage, _state) + get_platform_state(GtkAccessible(instance), _state) + end + function reset_property(instance::AdwTabPage, _property) + reset_property(GtkAccessible(instance), _property) + end + function reset_relation(instance::AdwTabPage, _relation) + reset_relation(GtkAccessible(instance), _relation) + end + function reset_state(instance::AdwTabPage, _state) + reset_state(GtkAccessible(instance), _state) + end + function set_accessible_parent(instance::AdwTabPage, _parent::Maybe(GtkAccessible), _next_sibling::Maybe(GtkAccessible)) + set_accessible_parent(GtkAccessible(instance), _parent, _next_sibling) + end + function update_next_accessible_sibling(instance::AdwTabPage, _new_sibling::Maybe(GtkAccessible)) + update_next_accessible_sibling(GtkAccessible(instance), _new_sibling) + end + function update_property(instance::AdwTabPage, _properties, _values) + update_property(GtkAccessible(instance), _properties, _values) + end + function update_relation(instance::AdwTabPage, _relations, _values) + update_relation(GtkAccessible(instance), _relations, _values) + end + function update_state(instance::AdwTabPage, _states, _values) + update_state(GtkAccessible(instance), _states, _values) + end function TabView_new() ret = ccall(("adw_tab_view_new", libadwaita), Ptr{GObject}, ()) ret2 = AdwTabViewLeaf(ret, false) @@ -2364,6 +6675,10 @@ $(Expr(:toplevel, quote ret2 = convert(AdwTabPage, ret, false) ret2 end + function invalidate_thumbnails(instance::AdwTabView) + ret = ccall(("adw_tab_view_invalidate_thumbnails", libadwaita), Nothing, (Ptr{GObject},), instance) + nothing + end function prepend(instance::AdwTabView, _child::GtkWidget) ret = ccall(("adw_tab_view_prepend", libadwaita), Ptr{GObject}, (Ptr{GObject}, Ptr{GObject}), instance, _child) ret2 = convert(AdwTabPage, ret, false) @@ -2438,6 +6753,57 @@ $(Expr(:toplevel, quote ret = ccall(("adw_tab_view_transfer_page", libadwaita), Nothing, (Ptr{GObject}, Ptr{GObject}, Ptr{GObject}, Int32), instance, _page, _other_view, _position) nothing end + function announce(instance::AdwTabView, _message::Union{AbstractString, Symbol}, _priority) + announce(GtkAccessible(instance), _message, _priority) + end + function get_accessible_parent(instance::AdwTabView) + get_accessible_parent(GtkAccessible(instance)) + end + function get_accessible_role(instance::AdwTabView) + get_accessible_role(GtkAccessible(instance)) + end + function get_at_context(instance::AdwTabView) + get_at_context(GtkAccessible(instance)) + end + function get_bounds(instance::AdwTabView) + get_bounds(GtkAccessible(instance)) + end + function get_first_accessible_child(instance::AdwTabView) + get_first_accessible_child(GtkAccessible(instance)) + end + function get_next_accessible_sibling(instance::AdwTabView) + get_next_accessible_sibling(GtkAccessible(instance)) + end + function get_platform_state(instance::AdwTabView, _state) + get_platform_state(GtkAccessible(instance), _state) + end + function reset_property(instance::AdwTabView, _property) + reset_property(GtkAccessible(instance), _property) + end + function reset_relation(instance::AdwTabView, _relation) + reset_relation(GtkAccessible(instance), _relation) + end + function reset_state(instance::AdwTabView, _state) + reset_state(GtkAccessible(instance), _state) + end + function set_accessible_parent(instance::AdwTabView, _parent::Maybe(GtkAccessible), _next_sibling::Maybe(GtkAccessible)) + set_accessible_parent(GtkAccessible(instance), _parent, _next_sibling) + end + function update_next_accessible_sibling(instance::AdwTabView, _new_sibling::Maybe(GtkAccessible)) + update_next_accessible_sibling(GtkAccessible(instance), _new_sibling) + end + function update_property(instance::AdwTabView, _properties, _values) + update_property(GtkAccessible(instance), _properties, _values) + end + function update_relation(instance::AdwTabView, _relations, _values) + update_relation(GtkAccessible(instance), _relations, _values) + end + function update_state(instance::AdwTabView, _states, _values) + update_state(GtkAccessible(instance), _states, _values) + end + function get_buildable_id(instance::AdwTabView) + get_buildable_id(GtkBuildable(instance)) + end function TimedAnimation_new(_widget::GtkWidget, _from::Real, _to::Real, _duration::Integer, _target::AdwAnimationTarget) _target = GLib.glib_ref(_target) ret = ccall(("adw_timed_animation_new", libadwaita), Ptr{GObject}, (Ptr{GObject}, Float64, Float64, UInt32, Ptr{GObject}), _widget, _from, _to, _duration, _target) @@ -2546,6 +6912,11 @@ $(Expr(:toplevel, quote ret2 = string_or_nothing(ret, false) ret2 end + function get_use_markup(instance::AdwToast) + ret = ccall(("adw_toast_get_use_markup", libadwaita), Cint, (Ptr{GObject},), instance) + ret2 = convert(Bool, ret) + ret2 + end function set_action_name(instance::AdwToast, _action_name::Maybe(Union{AbstractString, Symbol})) _action_name_maybe = nothing_to_null(_action_name) ret = ccall(("adw_toast_set_action_name", libadwaita), Nothing, (Ptr{GObject}, Cstring), instance, _action_name_maybe) @@ -2583,6 +6954,10 @@ $(Expr(:toplevel, quote ret = ccall(("adw_toast_set_title", libadwaita), Nothing, (Ptr{GObject}, Cstring), instance, _title) nothing end + function set_use_markup(instance::AdwToast, _use_markup::Bool) + ret = ccall(("adw_toast_set_use_markup", libadwaita), Nothing, (Ptr{GObject}, Cint), instance, _use_markup) + nothing + end function ToastOverlay_new() ret = ccall(("adw_toast_overlay_new", libadwaita), Ptr{GObject}, ()) ret2 = AdwToastOverlayLeaf(ret, false) @@ -2603,6 +6978,197 @@ $(Expr(:toplevel, quote ret = ccall(("adw_toast_overlay_set_child", libadwaita), Nothing, (Ptr{GObject}, Ptr{GObject}), instance, _child_maybe) nothing end + function announce(instance::AdwToastOverlay, _message::Union{AbstractString, Symbol}, _priority) + announce(GtkAccessible(instance), _message, _priority) + end + function get_accessible_parent(instance::AdwToastOverlay) + get_accessible_parent(GtkAccessible(instance)) + end + function get_accessible_role(instance::AdwToastOverlay) + get_accessible_role(GtkAccessible(instance)) + end + function get_at_context(instance::AdwToastOverlay) + get_at_context(GtkAccessible(instance)) + end + function get_bounds(instance::AdwToastOverlay) + get_bounds(GtkAccessible(instance)) + end + function get_first_accessible_child(instance::AdwToastOverlay) + get_first_accessible_child(GtkAccessible(instance)) + end + function get_next_accessible_sibling(instance::AdwToastOverlay) + get_next_accessible_sibling(GtkAccessible(instance)) + end + function get_platform_state(instance::AdwToastOverlay, _state) + get_platform_state(GtkAccessible(instance), _state) + end + function reset_property(instance::AdwToastOverlay, _property) + reset_property(GtkAccessible(instance), _property) + end + function reset_relation(instance::AdwToastOverlay, _relation) + reset_relation(GtkAccessible(instance), _relation) + end + function reset_state(instance::AdwToastOverlay, _state) + reset_state(GtkAccessible(instance), _state) + end + function set_accessible_parent(instance::AdwToastOverlay, _parent::Maybe(GtkAccessible), _next_sibling::Maybe(GtkAccessible)) + set_accessible_parent(GtkAccessible(instance), _parent, _next_sibling) + end + function update_next_accessible_sibling(instance::AdwToastOverlay, _new_sibling::Maybe(GtkAccessible)) + update_next_accessible_sibling(GtkAccessible(instance), _new_sibling) + end + function update_property(instance::AdwToastOverlay, _properties, _values) + update_property(GtkAccessible(instance), _properties, _values) + end + function update_relation(instance::AdwToastOverlay, _relations, _values) + update_relation(GtkAccessible(instance), _relations, _values) + end + function update_state(instance::AdwToastOverlay, _states, _values) + update_state(GtkAccessible(instance), _states, _values) + end + function get_buildable_id(instance::AdwToastOverlay) + get_buildable_id(GtkBuildable(instance)) + end + function ToolbarView_new() + ret = ccall(("adw_toolbar_view_new", libadwaita), Ptr{GObject}, ()) + ret2 = AdwToolbarViewLeaf(ret, false) + ret2 + end + function add_bottom_bar(instance::AdwToolbarView, _widget::GtkWidget) + ret = ccall(("adw_toolbar_view_add_bottom_bar", libadwaita), Nothing, (Ptr{GObject}, Ptr{GObject}), instance, _widget) + nothing + end + function add_top_bar(instance::AdwToolbarView, _widget::GtkWidget) + ret = ccall(("adw_toolbar_view_add_top_bar", libadwaita), Nothing, (Ptr{GObject}, Ptr{GObject}), instance, _widget) + nothing + end + function get_bottom_bar_height(instance::AdwToolbarView) + ret = ccall(("adw_toolbar_view_get_bottom_bar_height", libadwaita), Int32, (Ptr{GObject},), instance) + ret + end + function get_bottom_bar_style(instance::AdwToolbarView) + ret = ccall(("adw_toolbar_view_get_bottom_bar_style", libadwaita), UInt32, (Ptr{GObject},), instance) + ret2 = ToolbarStyle(ret) + ret2 + end + function get_content(instance::AdwToolbarView) + ret = ccall(("adw_toolbar_view_get_content", libadwaita), Ptr{GObject}, (Ptr{GObject},), instance) + ret2 = convert_if_not_null(GtkWidget, ret, false) + ret2 + end + function get_extend_content_to_bottom_edge(instance::AdwToolbarView) + ret = ccall(("adw_toolbar_view_get_extend_content_to_bottom_edge", libadwaita), Cint, (Ptr{GObject},), instance) + ret2 = convert(Bool, ret) + ret2 + end + function get_extend_content_to_top_edge(instance::AdwToolbarView) + ret = ccall(("adw_toolbar_view_get_extend_content_to_top_edge", libadwaita), Cint, (Ptr{GObject},), instance) + ret2 = convert(Bool, ret) + ret2 + end + function get_reveal_bottom_bars(instance::AdwToolbarView) + ret = ccall(("adw_toolbar_view_get_reveal_bottom_bars", libadwaita), Cint, (Ptr{GObject},), instance) + ret2 = convert(Bool, ret) + ret2 + end + function get_reveal_top_bars(instance::AdwToolbarView) + ret = ccall(("adw_toolbar_view_get_reveal_top_bars", libadwaita), Cint, (Ptr{GObject},), instance) + ret2 = convert(Bool, ret) + ret2 + end + function get_top_bar_height(instance::AdwToolbarView) + ret = ccall(("adw_toolbar_view_get_top_bar_height", libadwaita), Int32, (Ptr{GObject},), instance) + ret + end + function get_top_bar_style(instance::AdwToolbarView) + ret = ccall(("adw_toolbar_view_get_top_bar_style", libadwaita), UInt32, (Ptr{GObject},), instance) + ret2 = ToolbarStyle(ret) + ret2 + end + function remove(instance::AdwToolbarView, _widget::GtkWidget) + ret = ccall(("adw_toolbar_view_remove", libadwaita), Nothing, (Ptr{GObject}, Ptr{GObject}), instance, _widget) + nothing + end + function set_bottom_bar_style(instance::AdwToolbarView, _style) + ret = ccall(("adw_toolbar_view_set_bottom_bar_style", libadwaita), Nothing, (Ptr{GObject}, UInt32), instance, _style) + nothing + end + function set_content(instance::AdwToolbarView, _content::Maybe(GtkWidget)) + _content_maybe = nothing_to_null(_content) + ret = ccall(("adw_toolbar_view_set_content", libadwaita), Nothing, (Ptr{GObject}, Ptr{GObject}), instance, _content_maybe) + nothing + end + function set_extend_content_to_bottom_edge(instance::AdwToolbarView, _extend::Bool) + ret = ccall(("adw_toolbar_view_set_extend_content_to_bottom_edge", libadwaita), Nothing, (Ptr{GObject}, Cint), instance, _extend) + nothing + end + function set_extend_content_to_top_edge(instance::AdwToolbarView, _extend::Bool) + ret = ccall(("adw_toolbar_view_set_extend_content_to_top_edge", libadwaita), Nothing, (Ptr{GObject}, Cint), instance, _extend) + nothing + end + function set_reveal_bottom_bars(instance::AdwToolbarView, _reveal::Bool) + ret = ccall(("adw_toolbar_view_set_reveal_bottom_bars", libadwaita), Nothing, (Ptr{GObject}, Cint), instance, _reveal) + nothing + end + function set_reveal_top_bars(instance::AdwToolbarView, _reveal::Bool) + ret = ccall(("adw_toolbar_view_set_reveal_top_bars", libadwaita), Nothing, (Ptr{GObject}, Cint), instance, _reveal) + nothing + end + function set_top_bar_style(instance::AdwToolbarView, _style) + ret = ccall(("adw_toolbar_view_set_top_bar_style", libadwaita), Nothing, (Ptr{GObject}, UInt32), instance, _style) + nothing + end + function announce(instance::AdwToolbarView, _message::Union{AbstractString, Symbol}, _priority) + announce(GtkAccessible(instance), _message, _priority) + end + function get_accessible_parent(instance::AdwToolbarView) + get_accessible_parent(GtkAccessible(instance)) + end + function get_accessible_role(instance::AdwToolbarView) + get_accessible_role(GtkAccessible(instance)) + end + function get_at_context(instance::AdwToolbarView) + get_at_context(GtkAccessible(instance)) + end + function get_bounds(instance::AdwToolbarView) + get_bounds(GtkAccessible(instance)) + end + function get_first_accessible_child(instance::AdwToolbarView) + get_first_accessible_child(GtkAccessible(instance)) + end + function get_next_accessible_sibling(instance::AdwToolbarView) + get_next_accessible_sibling(GtkAccessible(instance)) + end + function get_platform_state(instance::AdwToolbarView, _state) + get_platform_state(GtkAccessible(instance), _state) + end + function reset_property(instance::AdwToolbarView, _property) + reset_property(GtkAccessible(instance), _property) + end + function reset_relation(instance::AdwToolbarView, _relation) + reset_relation(GtkAccessible(instance), _relation) + end + function reset_state(instance::AdwToolbarView, _state) + reset_state(GtkAccessible(instance), _state) + end + function set_accessible_parent(instance::AdwToolbarView, _parent::Maybe(GtkAccessible), _next_sibling::Maybe(GtkAccessible)) + set_accessible_parent(GtkAccessible(instance), _parent, _next_sibling) + end + function update_next_accessible_sibling(instance::AdwToolbarView, _new_sibling::Maybe(GtkAccessible)) + update_next_accessible_sibling(GtkAccessible(instance), _new_sibling) + end + function update_property(instance::AdwToolbarView, _properties, _values) + update_property(GtkAccessible(instance), _properties, _values) + end + function update_relation(instance::AdwToolbarView, _relations, _values) + update_relation(GtkAccessible(instance), _relations, _values) + end + function update_state(instance::AdwToolbarView, _states, _values) + update_state(GtkAccessible(instance), _states, _values) + end + function get_buildable_id(instance::AdwToolbarView) + get_buildable_id(GtkBuildable(instance)) + end function ViewStack_new() ret = ccall(("adw_view_stack_new", libadwaita), Ptr{GObject}, ()) ret2 = AdwViewStackLeaf(ret, false) @@ -2689,6 +7255,57 @@ $(Expr(:toplevel, quote ret = ccall(("adw_view_stack_set_visible_child_name", libadwaita), Nothing, (Ptr{GObject}, Cstring), instance, _name) nothing end + function announce(instance::AdwViewStack, _message::Union{AbstractString, Symbol}, _priority) + announce(GtkAccessible(instance), _message, _priority) + end + function get_accessible_parent(instance::AdwViewStack) + get_accessible_parent(GtkAccessible(instance)) + end + function get_accessible_role(instance::AdwViewStack) + get_accessible_role(GtkAccessible(instance)) + end + function get_at_context(instance::AdwViewStack) + get_at_context(GtkAccessible(instance)) + end + function get_bounds(instance::AdwViewStack) + get_bounds(GtkAccessible(instance)) + end + function get_first_accessible_child(instance::AdwViewStack) + get_first_accessible_child(GtkAccessible(instance)) + end + function get_next_accessible_sibling(instance::AdwViewStack) + get_next_accessible_sibling(GtkAccessible(instance)) + end + function get_platform_state(instance::AdwViewStack, _state) + get_platform_state(GtkAccessible(instance), _state) + end + function reset_property(instance::AdwViewStack, _property) + reset_property(GtkAccessible(instance), _property) + end + function reset_relation(instance::AdwViewStack, _relation) + reset_relation(GtkAccessible(instance), _relation) + end + function reset_state(instance::AdwViewStack, _state) + reset_state(GtkAccessible(instance), _state) + end + function set_accessible_parent(instance::AdwViewStack, _parent::Maybe(GtkAccessible), _next_sibling::Maybe(GtkAccessible)) + set_accessible_parent(GtkAccessible(instance), _parent, _next_sibling) + end + function update_next_accessible_sibling(instance::AdwViewStack, _new_sibling::Maybe(GtkAccessible)) + update_next_accessible_sibling(GtkAccessible(instance), _new_sibling) + end + function update_property(instance::AdwViewStack, _properties, _values) + update_property(GtkAccessible(instance), _properties, _values) + end + function update_relation(instance::AdwViewStack, _relations, _values) + update_relation(GtkAccessible(instance), _relations, _values) + end + function update_state(instance::AdwViewStack, _states, _values) + update_state(GtkAccessible(instance), _states, _values) + end + function get_buildable_id(instance::AdwViewStack) + get_buildable_id(GtkBuildable(instance)) + end function get_badge_number(instance::AdwViewStackPage) ret = ccall(("adw_view_stack_page_get_badge_number", libadwaita), UInt32, (Ptr{GObject},), instance) ret @@ -2759,6 +7376,108 @@ $(Expr(:toplevel, quote ret = ccall(("adw_view_stack_page_set_visible", libadwaita), Nothing, (Ptr{GObject}, Cint), instance, _visible) nothing end + function announce(instance::AdwViewStackPage, _message::Union{AbstractString, Symbol}, _priority) + announce(GtkAccessible(instance), _message, _priority) + end + function get_accessible_parent(instance::AdwViewStackPage) + get_accessible_parent(GtkAccessible(instance)) + end + function get_accessible_role(instance::AdwViewStackPage) + get_accessible_role(GtkAccessible(instance)) + end + function get_at_context(instance::AdwViewStackPage) + get_at_context(GtkAccessible(instance)) + end + function get_bounds(instance::AdwViewStackPage) + get_bounds(GtkAccessible(instance)) + end + function get_first_accessible_child(instance::AdwViewStackPage) + get_first_accessible_child(GtkAccessible(instance)) + end + function get_next_accessible_sibling(instance::AdwViewStackPage) + get_next_accessible_sibling(GtkAccessible(instance)) + end + function get_platform_state(instance::AdwViewStackPage, _state) + get_platform_state(GtkAccessible(instance), _state) + end + function reset_property(instance::AdwViewStackPage, _property) + reset_property(GtkAccessible(instance), _property) + end + function reset_relation(instance::AdwViewStackPage, _relation) + reset_relation(GtkAccessible(instance), _relation) + end + function reset_state(instance::AdwViewStackPage, _state) + reset_state(GtkAccessible(instance), _state) + end + function set_accessible_parent(instance::AdwViewStackPage, _parent::Maybe(GtkAccessible), _next_sibling::Maybe(GtkAccessible)) + set_accessible_parent(GtkAccessible(instance), _parent, _next_sibling) + end + function update_next_accessible_sibling(instance::AdwViewStackPage, _new_sibling::Maybe(GtkAccessible)) + update_next_accessible_sibling(GtkAccessible(instance), _new_sibling) + end + function update_property(instance::AdwViewStackPage, _properties, _values) + update_property(GtkAccessible(instance), _properties, _values) + end + function update_relation(instance::AdwViewStackPage, _relations, _values) + update_relation(GtkAccessible(instance), _relations, _values) + end + function update_state(instance::AdwViewStackPage, _states, _values) + update_state(GtkAccessible(instance), _states, _values) + end + function get_selected_page(instance::AdwViewStackPages) + ret = ccall(("adw_view_stack_pages_get_selected_page", libadwaita), Ptr{GObject}, (Ptr{GObject},), instance) + ret2 = convert_if_not_null(AdwViewStackPage, ret, false) + ret2 + end + function set_selected_page(instance::AdwViewStackPages, _page::AdwViewStackPage) + ret = ccall(("adw_view_stack_pages_set_selected_page", libadwaita), Nothing, (Ptr{GObject}, Ptr{GObject}), instance, _page) + nothing + end + function get_item_type(instance::AdwViewStackPages) + get_item_type(GListModel(instance)) + end + function get_n_items(instance::AdwViewStackPages) + get_n_items(GListModel(instance)) + end + function get_item(instance::AdwViewStackPages, _position::Integer) + get_item(GListModel(instance), _position) + end + function items_changed(instance::AdwViewStackPages, _position::Integer, _removed::Integer, _added::Integer) + items_changed(GListModel(instance), _position, _removed, _added) + end + function get_selection(instance::AdwViewStackPages) + get_selection(GtkSelectionModel(instance)) + end + function get_selection_in_range(instance::AdwViewStackPages, _position::Integer, _n_items::Integer) + get_selection_in_range(GtkSelectionModel(instance), _position, _n_items) + end + function is_selected(instance::AdwViewStackPages, _position::Integer) + is_selected(GtkSelectionModel(instance), _position) + end + function select_all(instance::AdwViewStackPages) + select_all(GtkSelectionModel(instance)) + end + function select_item(instance::AdwViewStackPages, _position::Integer, _unselect_rest::Bool) + select_item(GtkSelectionModel(instance), _position, _unselect_rest) + end + function select_range(instance::AdwViewStackPages, _position::Integer, _n_items::Integer, _unselect_rest::Bool) + select_range(GtkSelectionModel(instance), _position, _n_items, _unselect_rest) + end + function selection_changed(instance::AdwViewStackPages, _position::Integer, _n_items::Integer) + selection_changed(GtkSelectionModel(instance), _position, _n_items) + end + function set_selection(instance::AdwViewStackPages, _selected::GtkBitset, _mask::GtkBitset) + set_selection(GtkSelectionModel(instance), _selected, _mask) + end + function unselect_all(instance::AdwViewStackPages) + unselect_all(GtkSelectionModel(instance)) + end + function unselect_item(instance::AdwViewStackPages, _position::Integer) + unselect_item(GtkSelectionModel(instance), _position) + end + function unselect_range(instance::AdwViewStackPages, _position::Integer, _n_items::Integer) + unselect_range(GtkSelectionModel(instance), _position, _n_items) + end function ViewSwitcher_new() ret = ccall(("adw_view_switcher_new", libadwaita), Ptr{GObject}, ()) ret2 = AdwViewSwitcherLeaf(ret, false) @@ -2783,6 +7502,57 @@ $(Expr(:toplevel, quote ret = ccall(("adw_view_switcher_set_stack", libadwaita), Nothing, (Ptr{GObject}, Ptr{GObject}), instance, _stack_maybe) nothing end + function announce(instance::AdwViewSwitcher, _message::Union{AbstractString, Symbol}, _priority) + announce(GtkAccessible(instance), _message, _priority) + end + function get_accessible_parent(instance::AdwViewSwitcher) + get_accessible_parent(GtkAccessible(instance)) + end + function get_accessible_role(instance::AdwViewSwitcher) + get_accessible_role(GtkAccessible(instance)) + end + function get_at_context(instance::AdwViewSwitcher) + get_at_context(GtkAccessible(instance)) + end + function get_bounds(instance::AdwViewSwitcher) + get_bounds(GtkAccessible(instance)) + end + function get_first_accessible_child(instance::AdwViewSwitcher) + get_first_accessible_child(GtkAccessible(instance)) + end + function get_next_accessible_sibling(instance::AdwViewSwitcher) + get_next_accessible_sibling(GtkAccessible(instance)) + end + function get_platform_state(instance::AdwViewSwitcher, _state) + get_platform_state(GtkAccessible(instance), _state) + end + function reset_property(instance::AdwViewSwitcher, _property) + reset_property(GtkAccessible(instance), _property) + end + function reset_relation(instance::AdwViewSwitcher, _relation) + reset_relation(GtkAccessible(instance), _relation) + end + function reset_state(instance::AdwViewSwitcher, _state) + reset_state(GtkAccessible(instance), _state) + end + function set_accessible_parent(instance::AdwViewSwitcher, _parent::Maybe(GtkAccessible), _next_sibling::Maybe(GtkAccessible)) + set_accessible_parent(GtkAccessible(instance), _parent, _next_sibling) + end + function update_next_accessible_sibling(instance::AdwViewSwitcher, _new_sibling::Maybe(GtkAccessible)) + update_next_accessible_sibling(GtkAccessible(instance), _new_sibling) + end + function update_property(instance::AdwViewSwitcher, _properties, _values) + update_property(GtkAccessible(instance), _properties, _values) + end + function update_relation(instance::AdwViewSwitcher, _relations, _values) + update_relation(GtkAccessible(instance), _relations, _values) + end + function update_state(instance::AdwViewSwitcher, _states, _values) + update_state(GtkAccessible(instance), _states, _values) + end + function get_buildable_id(instance::AdwViewSwitcher) + get_buildable_id(GtkBuildable(instance)) + end function ViewSwitcherBar_new() ret = ccall(("adw_view_switcher_bar_new", libadwaita), Ptr{GObject}, ()) ret2 = AdwViewSwitcherBarLeaf(ret, false) @@ -2807,6 +7577,57 @@ $(Expr(:toplevel, quote ret = ccall(("adw_view_switcher_bar_set_stack", libadwaita), Nothing, (Ptr{GObject}, Ptr{GObject}), instance, _stack_maybe) nothing end + function announce(instance::AdwViewSwitcherBar, _message::Union{AbstractString, Symbol}, _priority) + announce(GtkAccessible(instance), _message, _priority) + end + function get_accessible_parent(instance::AdwViewSwitcherBar) + get_accessible_parent(GtkAccessible(instance)) + end + function get_accessible_role(instance::AdwViewSwitcherBar) + get_accessible_role(GtkAccessible(instance)) + end + function get_at_context(instance::AdwViewSwitcherBar) + get_at_context(GtkAccessible(instance)) + end + function get_bounds(instance::AdwViewSwitcherBar) + get_bounds(GtkAccessible(instance)) + end + function get_first_accessible_child(instance::AdwViewSwitcherBar) + get_first_accessible_child(GtkAccessible(instance)) + end + function get_next_accessible_sibling(instance::AdwViewSwitcherBar) + get_next_accessible_sibling(GtkAccessible(instance)) + end + function get_platform_state(instance::AdwViewSwitcherBar, _state) + get_platform_state(GtkAccessible(instance), _state) + end + function reset_property(instance::AdwViewSwitcherBar, _property) + reset_property(GtkAccessible(instance), _property) + end + function reset_relation(instance::AdwViewSwitcherBar, _relation) + reset_relation(GtkAccessible(instance), _relation) + end + function reset_state(instance::AdwViewSwitcherBar, _state) + reset_state(GtkAccessible(instance), _state) + end + function set_accessible_parent(instance::AdwViewSwitcherBar, _parent::Maybe(GtkAccessible), _next_sibling::Maybe(GtkAccessible)) + set_accessible_parent(GtkAccessible(instance), _parent, _next_sibling) + end + function update_next_accessible_sibling(instance::AdwViewSwitcherBar, _new_sibling::Maybe(GtkAccessible)) + update_next_accessible_sibling(GtkAccessible(instance), _new_sibling) + end + function update_property(instance::AdwViewSwitcherBar, _properties, _values) + update_property(GtkAccessible(instance), _properties, _values) + end + function update_relation(instance::AdwViewSwitcherBar, _relations, _values) + update_relation(GtkAccessible(instance), _relations, _values) + end + function update_state(instance::AdwViewSwitcherBar, _states, _values) + update_state(GtkAccessible(instance), _states, _values) + end + function get_buildable_id(instance::AdwViewSwitcherBar) + get_buildable_id(GtkBuildable(instance)) + end function ViewSwitcherTitle_new() ret = ccall(("adw_view_switcher_title_new", libadwaita), Ptr{GObject}, ()) ret2 = AdwViewSwitcherTitleLeaf(ret, false) @@ -2854,6 +7675,57 @@ $(Expr(:toplevel, quote ret = ccall(("adw_view_switcher_title_set_view_switcher_enabled", libadwaita), Nothing, (Ptr{GObject}, Cint), instance, _enabled) nothing end + function announce(instance::AdwViewSwitcherTitle, _message::Union{AbstractString, Symbol}, _priority) + announce(GtkAccessible(instance), _message, _priority) + end + function get_accessible_parent(instance::AdwViewSwitcherTitle) + get_accessible_parent(GtkAccessible(instance)) + end + function get_accessible_role(instance::AdwViewSwitcherTitle) + get_accessible_role(GtkAccessible(instance)) + end + function get_at_context(instance::AdwViewSwitcherTitle) + get_at_context(GtkAccessible(instance)) + end + function get_bounds(instance::AdwViewSwitcherTitle) + get_bounds(GtkAccessible(instance)) + end + function get_first_accessible_child(instance::AdwViewSwitcherTitle) + get_first_accessible_child(GtkAccessible(instance)) + end + function get_next_accessible_sibling(instance::AdwViewSwitcherTitle) + get_next_accessible_sibling(GtkAccessible(instance)) + end + function get_platform_state(instance::AdwViewSwitcherTitle, _state) + get_platform_state(GtkAccessible(instance), _state) + end + function reset_property(instance::AdwViewSwitcherTitle, _property) + reset_property(GtkAccessible(instance), _property) + end + function reset_relation(instance::AdwViewSwitcherTitle, _relation) + reset_relation(GtkAccessible(instance), _relation) + end + function reset_state(instance::AdwViewSwitcherTitle, _state) + reset_state(GtkAccessible(instance), _state) + end + function set_accessible_parent(instance::AdwViewSwitcherTitle, _parent::Maybe(GtkAccessible), _next_sibling::Maybe(GtkAccessible)) + set_accessible_parent(GtkAccessible(instance), _parent, _next_sibling) + end + function update_next_accessible_sibling(instance::AdwViewSwitcherTitle, _new_sibling::Maybe(GtkAccessible)) + update_next_accessible_sibling(GtkAccessible(instance), _new_sibling) + end + function update_property(instance::AdwViewSwitcherTitle, _properties, _values) + update_property(GtkAccessible(instance), _properties, _values) + end + function update_relation(instance::AdwViewSwitcherTitle, _relations, _values) + update_relation(GtkAccessible(instance), _relations, _values) + end + function update_state(instance::AdwViewSwitcherTitle, _states, _values) + update_state(GtkAccessible(instance), _states, _values) + end + function get_buildable_id(instance::AdwViewSwitcherTitle) + get_buildable_id(GtkBuildable(instance)) + end function Window_new() ret = ccall(("adw_window_new", libadwaita), Ptr{GObject}, ()) ret2 = AdwWindowLeaf(ret, false) @@ -2864,11 +7736,99 @@ $(Expr(:toplevel, quote ret2 = convert_if_not_null(GtkWidget, ret, false) ret2 end + function get_dialogs(instance::AdwWindow) + ret = ccall(("adw_window_get_dialogs", libadwaita), Ptr{GObject}, (Ptr{GObject},), instance) + ret2 = begin + leaftype = GLib.find_leaf_type(ret) + convert(leaftype, ret, true) + end + ret2 + end + function get_visible_dialog(instance::AdwWindow) + ret = ccall(("adw_window_get_visible_dialog", libadwaita), Ptr{GObject}, (Ptr{GObject},), instance) + ret2 = convert_if_not_null(AdwDialog, ret, false) + ret2 + end function set_content(instance::AdwWindow, _content::Maybe(GtkWidget)) _content_maybe = nothing_to_null(_content) ret = ccall(("adw_window_set_content", libadwaita), Nothing, (Ptr{GObject}, Ptr{GObject}), instance, _content_maybe) nothing end + function announce(instance::AdwWindow, _message::Union{AbstractString, Symbol}, _priority) + announce(GtkAccessible(instance), _message, _priority) + end + function get_accessible_parent(instance::AdwWindow) + get_accessible_parent(GtkAccessible(instance)) + end + function get_accessible_role(instance::AdwWindow) + get_accessible_role(GtkAccessible(instance)) + end + function get_at_context(instance::AdwWindow) + get_at_context(GtkAccessible(instance)) + end + function get_bounds(instance::AdwWindow) + get_bounds(GtkAccessible(instance)) + end + function get_first_accessible_child(instance::AdwWindow) + get_first_accessible_child(GtkAccessible(instance)) + end + function get_next_accessible_sibling(instance::AdwWindow) + get_next_accessible_sibling(GtkAccessible(instance)) + end + function get_platform_state(instance::AdwWindow, _state) + get_platform_state(GtkAccessible(instance), _state) + end + function reset_property(instance::AdwWindow, _property) + reset_property(GtkAccessible(instance), _property) + end + function reset_relation(instance::AdwWindow, _relation) + reset_relation(GtkAccessible(instance), _relation) + end + function reset_state(instance::AdwWindow, _state) + reset_state(GtkAccessible(instance), _state) + end + function set_accessible_parent(instance::AdwWindow, _parent::Maybe(GtkAccessible), _next_sibling::Maybe(GtkAccessible)) + set_accessible_parent(GtkAccessible(instance), _parent, _next_sibling) + end + function update_next_accessible_sibling(instance::AdwWindow, _new_sibling::Maybe(GtkAccessible)) + update_next_accessible_sibling(GtkAccessible(instance), _new_sibling) + end + function update_property(instance::AdwWindow, _properties, _values) + update_property(GtkAccessible(instance), _properties, _values) + end + function update_relation(instance::AdwWindow, _relations, _values) + update_relation(GtkAccessible(instance), _relations, _values) + end + function update_state(instance::AdwWindow, _states, _values) + update_state(GtkAccessible(instance), _states, _values) + end + function get_buildable_id(instance::AdwWindow) + get_buildable_id(GtkBuildable(instance)) + end + function get_renderer(instance::AdwWindow) + get_renderer(GtkNative(instance)) + end + function get_surface(instance::AdwWindow) + get_surface(GtkNative(instance)) + end + function get_surface_transform(instance::AdwWindow) + get_surface_transform(GtkNative(instance)) + end + function realize(instance::AdwWindow) + realize(GtkNative(instance)) + end + function unrealize(instance::AdwWindow) + unrealize(GtkNative(instance)) + end + function get_display(instance::AdwWindow) + get_display(GtkRoot(instance)) + end + function get_focus(instance::AdwWindow) + get_focus(GtkRoot(instance)) + end + function set_focus(instance::AdwWindow, _focus::Maybe(GtkWidget)) + set_focus(GtkRoot(instance), _focus) + end function WindowTitle_new(_title::Union{AbstractString, Symbol}, _subtitle::Union{AbstractString, Symbol}) ret = ccall(("adw_window_title_new", libadwaita), Ptr{GObject}, (Cstring, Cstring), _title, _subtitle) ret2 = AdwWindowTitleLeaf(ret, false) @@ -2892,6 +7852,57 @@ $(Expr(:toplevel, quote ret = ccall(("adw_window_title_set_title", libadwaita), Nothing, (Ptr{GObject}, Cstring), instance, _title) nothing end + function announce(instance::AdwWindowTitle, _message::Union{AbstractString, Symbol}, _priority) + announce(GtkAccessible(instance), _message, _priority) + end + function get_accessible_parent(instance::AdwWindowTitle) + get_accessible_parent(GtkAccessible(instance)) + end + function get_accessible_role(instance::AdwWindowTitle) + get_accessible_role(GtkAccessible(instance)) + end + function get_at_context(instance::AdwWindowTitle) + get_at_context(GtkAccessible(instance)) + end + function get_bounds(instance::AdwWindowTitle) + get_bounds(GtkAccessible(instance)) + end + function get_first_accessible_child(instance::AdwWindowTitle) + get_first_accessible_child(GtkAccessible(instance)) + end + function get_next_accessible_sibling(instance::AdwWindowTitle) + get_next_accessible_sibling(GtkAccessible(instance)) + end + function get_platform_state(instance::AdwWindowTitle, _state) + get_platform_state(GtkAccessible(instance), _state) + end + function reset_property(instance::AdwWindowTitle, _property) + reset_property(GtkAccessible(instance), _property) + end + function reset_relation(instance::AdwWindowTitle, _relation) + reset_relation(GtkAccessible(instance), _relation) + end + function reset_state(instance::AdwWindowTitle, _state) + reset_state(GtkAccessible(instance), _state) + end + function set_accessible_parent(instance::AdwWindowTitle, _parent::Maybe(GtkAccessible), _next_sibling::Maybe(GtkAccessible)) + set_accessible_parent(GtkAccessible(instance), _parent, _next_sibling) + end + function update_next_accessible_sibling(instance::AdwWindowTitle, _new_sibling::Maybe(GtkAccessible)) + update_next_accessible_sibling(GtkAccessible(instance), _new_sibling) + end + function update_property(instance::AdwWindowTitle, _properties, _values) + update_property(GtkAccessible(instance), _properties, _values) + end + function update_relation(instance::AdwWindowTitle, _relations, _values) + update_relation(GtkAccessible(instance), _relations, _values) + end + function update_state(instance::AdwWindowTitle, _states, _values) + update_state(GtkAccessible(instance), _states, _values) + end + function get_buildable_id(instance::AdwWindowTitle) + get_buildable_id(GtkBuildable(instance)) + end function get_cancel_progress(instance::AdwSwipeable) ret = ccall(("adw_swipeable_get_cancel_progress", libadwaita), Float64, (Ptr{GObject},), instance) ret diff --git a/Adwaita/src/gen/adw_structs b/Adwaita/src/gen/adw_structs index d02867ff..13853f0a 100644 --- a/Adwaita/src/gen/adw_structs +++ b/Adwaita/src/gen/adw_structs @@ -1,30 +1,30 @@ quote $(Expr(:toplevel, quote - gboxed_types = Any[] - mutable struct AdwSpringParams <: GBoxed - handle::Ptr{AdwSpringParams} - begin - (GLib.g_type(::Type{T}) where T <: AdwSpringParams) = begin - ccall(("adw_spring_params_get_type", libadwaita), GType, ()) - end - function AdwSpringParams(ref::Ptr{T}, own::Bool = false) where T <: GBoxed - x = new(ref) - if own - finalizer(x) do x - GLib.delboxed(x) + const gboxed_types = Any[] + begin + mutable struct AdwSpringParams <: GBoxed + handle::Ptr{AdwSpringParams} + begin + (GLib.g_type(::Type{T}) where T <: AdwSpringParams) = begin + ccall(("adw_spring_params_get_type", libadwaita), GType, ()) + end + function AdwSpringParams(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 - x + push!(gboxed_types, AdwSpringParams) end - push!(gboxed_types, AdwSpringParams) end + const AdwSpringParamsLike = AdwSpringParams end gboxed_cache_init() = begin append!(GLib.gboxed_types, gboxed_types) end - function AdwSpringParams(_damping_ratio::Real, _mass::Real, _stiffness::Real) - G_.SpringParams_new(_damping_ratio, _mass, _stiffness) - end struct AdwSwipeable <: GInterface handle::Ptr{GObject} gc::Any @@ -32,7 +32,67 @@ $(Expr(:toplevel, quote new(unsafe_convert(Ptr{GObject}, x), x) end end - gtype_wrapper_cache = Dict{Symbol, Type}() + const gtype_wrapper_cache = Dict{Symbol, Type}() + begin + abstract type AdwDialog <: GtkWidget end + mutable struct AdwDialogLeaf <: AdwDialog + handle::Ptr{GObject} + function AdwDialogLeaf(handle::Ptr{GObject}, owns = false) + if handle == C_NULL + error("Cannot construct AdwDialogLeaf with a NULL pointer") + end + GLib.gobject_maybe_sink(handle, owns) + return gobject_ref(new(handle)) + end + end + gtype_wrapper_cache[:AdwDialog] = AdwDialogLeaf + (GLib.g_type(::Type{T}) where T <: AdwDialog) = begin + ccall(("adw_dialog_get_type", libadwaita), GType, ()) + end + end + begin + function GLib.signalnames(::Type{AdwDialog}) + vcat([:close_attempt, :closed], signalnames(supertype(AdwDialog))) + end + let d = Dict{Symbol, Tuple{Any, Any}}(:notify => (:Nothing, Any[:(Ptr{GParamSpec})]), :state_flags_changed => (:Nothing, [:UInt32]), :map => (:Nothing, Any[]), :unrealize => (:Nothing, Any[]), :closed => (:Nothing, Any[]), :show => (:Nothing, Any[]), :unmap => (:Nothing, Any[]), :close_attempt => (:Nothing, Any[]), :hide => (:Nothing, Any[]), :query_tooltip => (:Cint, Any[:Int32, :Int32, :Cint, :(Ptr{GObject})]), :move_focus => (:Nothing, [:UInt32]), :mnemonic_activate => (:Cint, [:Cint]), :direction_changed => (:Nothing, [:UInt32]), :destroy => (:Nothing, Any[]), :keynav_failed => (:Cint, [:UInt32]), :realize => (:Nothing, Any[])) + function GLib.signal_return_type(::Type{T}, name::Symbol) where T <: AdwDialog + eval((d[name])[1]) + end + function GLib.signal_argument_types(::Type{T}, name::Symbol) where T <: AdwDialog + Tuple(eval.((d[name])[2])) + end + end + end + begin + abstract type AdwAboutDialog <: AdwDialog end + mutable struct AdwAboutDialogLeaf <: AdwAboutDialog + handle::Ptr{GObject} + function AdwAboutDialogLeaf(handle::Ptr{GObject}, owns = false) + if handle == C_NULL + error("Cannot construct AdwAboutDialogLeaf with a NULL pointer") + end + GLib.gobject_maybe_sink(handle, owns) + return gobject_ref(new(handle)) + end + end + gtype_wrapper_cache[:AdwAboutDialog] = AdwAboutDialogLeaf + (GLib.g_type(::Type{T}) where T <: AdwAboutDialog) = begin + ccall(("adw_about_dialog_get_type", libadwaita), GType, ()) + end + end + begin + function GLib.signalnames(::Type{AdwAboutDialog}) + vcat([:activate_link], signalnames(supertype(AdwAboutDialog))) + end + let d = Dict{Symbol, Tuple{Any, Any}}(:notify => (:Nothing, Any[:(Ptr{GParamSpec})]), :state_flags_changed => (:Nothing, [:UInt32]), :map => (:Nothing, Any[]), :activate_link => (:Cint, [:Cstring]), :unrealize => (:Nothing, Any[]), :closed => (:Nothing, Any[]), :show => (:Nothing, Any[]), :unmap => (:Nothing, Any[]), :close_attempt => (:Nothing, Any[]), :hide => (:Nothing, Any[]), :query_tooltip => (:Cint, Any[:Int32, :Int32, :Cint, :(Ptr{GObject})]), :move_focus => (:Nothing, [:UInt32]), :mnemonic_activate => (:Cint, [:Cint]), :direction_changed => (:Nothing, [:UInt32]), :destroy => (:Nothing, Any[]), :keynav_failed => (:Cint, [:UInt32]), :realize => (:Nothing, Any[])) + function GLib.signal_return_type(::Type{T}, name::Symbol) where T <: AdwAboutDialog + eval((d[name])[1]) + end + function GLib.signal_argument_types(::Type{T}, name::Symbol) where T <: AdwAboutDialog + Tuple(eval.((d[name])[2])) + end + end + end begin abstract type AdwWindow <: GtkWindow end mutable struct AdwWindowLeaf <: AdwWindow @@ -50,6 +110,11 @@ $(Expr(:toplevel, quote ccall(("adw_window_get_type", libadwaita), GType, ()) end end + begin + function GLib.signalnames(::Type{AdwWindow}) + signalnames(supertype(AdwWindow)) + end + end begin abstract type AdwAboutWindow <: AdwWindow end mutable struct AdwAboutWindowLeaf <: AdwAboutWindow @@ -67,6 +132,19 @@ $(Expr(:toplevel, quote ccall(("adw_about_window_get_type", libadwaita), GType, ()) end end + begin + function GLib.signalnames(::Type{AdwAboutWindow}) + vcat([:activate_link], signalnames(supertype(AdwAboutWindow))) + end + let d = Dict{Symbol, Tuple{Any, Any}}(:notify => (:Nothing, Any[:(Ptr{GParamSpec})]), :state_flags_changed => (:Nothing, [:UInt32]), :map => (:Nothing, Any[]), :activate_link => (:Cint, [:Cstring]), :keys_changed => (:Nothing, Any[]), :close_request => (:Cint, Any[]), :enable_debugging => (:Cint, [:Cint]), :unrealize => (:Nothing, Any[]), :activate_focus => (:Nothing, Any[]), :show => (:Nothing, Any[]), :unmap => (:Nothing, Any[]), :hide => (:Nothing, Any[]), :query_tooltip => (:Cint, Any[:Int32, :Int32, :Cint, :(Ptr{GObject})]), :activate_default => (:Nothing, Any[]), :move_focus => (:Nothing, [:UInt32]), :mnemonic_activate => (:Cint, [:Cint]), :direction_changed => (:Nothing, [:UInt32]), :destroy => (:Nothing, Any[]), :keynav_failed => (:Cint, [:UInt32]), :realize => (:Nothing, Any[])) + function GLib.signal_return_type(::Type{T}, name::Symbol) where T <: AdwAboutWindow + eval((d[name])[1]) + end + function GLib.signal_argument_types(::Type{T}, name::Symbol) where T <: AdwAboutWindow + Tuple(eval.((d[name])[2])) + end + end + end begin abstract type AdwPreferencesRow <: GtkListBoxRow end mutable struct AdwPreferencesRowLeaf <: AdwPreferencesRow @@ -84,6 +162,11 @@ $(Expr(:toplevel, quote ccall(("adw_preferences_row_get_type", libadwaita), GType, ()) end end + begin + function GLib.signalnames(::Type{AdwPreferencesRow}) + signalnames(supertype(AdwPreferencesRow)) + end + end begin abstract type AdwActionRow <: AdwPreferencesRow end mutable struct AdwActionRowLeaf <: AdwActionRow @@ -101,6 +184,49 @@ $(Expr(:toplevel, quote ccall(("adw_action_row_get_type", libadwaita), GType, ()) end end + begin + function GLib.signalnames(::Type{AdwActionRow}) + vcat([:activated], signalnames(supertype(AdwActionRow))) + end + let d = Dict{Symbol, Tuple{Any, Any}}(:notify => (:Nothing, Any[:(Ptr{GParamSpec})]), :state_flags_changed => (:Nothing, [:UInt32]), :map => (:Nothing, Any[]), :unrealize => (:Nothing, Any[]), :show => (:Nothing, Any[]), :unmap => (:Nothing, Any[]), :hide => (:Nothing, Any[]), :query_tooltip => (:Cint, Any[:Int32, :Int32, :Cint, :(Ptr{GObject})]), :activated => (:Nothing, Any[]), :move_focus => (:Nothing, [:UInt32]), :mnemonic_activate => (:Cint, [:Cint]), :direction_changed => (:Nothing, [:UInt32]), :activate => (:Nothing, Any[]), :destroy => (:Nothing, Any[]), :keynav_failed => (:Cint, [:UInt32]), :realize => (:Nothing, Any[])) + function GLib.signal_return_type(::Type{T}, name::Symbol) where T <: AdwActionRow + eval((d[name])[1]) + end + function GLib.signal_argument_types(::Type{T}, name::Symbol) where T <: AdwActionRow + Tuple(eval.((d[name])[2])) + end + end + end + begin + abstract type AdwAlertDialog <: AdwDialog end + mutable struct AdwAlertDialogLeaf <: AdwAlertDialog + handle::Ptr{GObject} + function AdwAlertDialogLeaf(handle::Ptr{GObject}, owns = false) + if handle == C_NULL + error("Cannot construct AdwAlertDialogLeaf with a NULL pointer") + end + GLib.gobject_maybe_sink(handle, owns) + return gobject_ref(new(handle)) + end + end + gtype_wrapper_cache[:AdwAlertDialog] = AdwAlertDialogLeaf + (GLib.g_type(::Type{T}) where T <: AdwAlertDialog) = begin + ccall(("adw_alert_dialog_get_type", libadwaita), GType, ()) + end + end + begin + function GLib.signalnames(::Type{AdwAlertDialog}) + vcat([:response], signalnames(supertype(AdwAlertDialog))) + end + let d = Dict{Symbol, Tuple{Any, Any}}(:notify => (:Nothing, Any[:(Ptr{GParamSpec})]), :state_flags_changed => (:Nothing, [:UInt32]), :map => (:Nothing, Any[]), :unrealize => (:Nothing, Any[]), :closed => (:Nothing, Any[]), :show => (:Nothing, Any[]), :unmap => (:Nothing, Any[]), :close_attempt => (:Nothing, Any[]), :hide => (:Nothing, Any[]), :query_tooltip => (:Cint, Any[:Int32, :Int32, :Cint, :(Ptr{GObject})]), :response => (:Nothing, [:Cstring]), :move_focus => (:Nothing, [:UInt32]), :mnemonic_activate => (:Cint, [:Cint]), :direction_changed => (:Nothing, [:UInt32]), :destroy => (:Nothing, Any[]), :keynav_failed => (:Cint, [:UInt32]), :realize => (:Nothing, Any[])) + function GLib.signal_return_type(::Type{T}, name::Symbol) where T <: AdwAlertDialog + eval((d[name])[1]) + end + function GLib.signal_argument_types(::Type{T}, name::Symbol) where T <: AdwAlertDialog + Tuple(eval.((d[name])[2])) + end + end + end begin abstract type AdwAnimation <: GObject end mutable struct AdwAnimationLeaf <: AdwAnimation @@ -118,6 +244,19 @@ $(Expr(:toplevel, quote ccall(("adw_animation_get_type", libadwaita), GType, ()) end end + begin + function GLib.signalnames(::Type{AdwAnimation}) + vcat([:done], signalnames(supertype(AdwAnimation))) + end + let d = Dict{Symbol, Tuple{Any, Any}}(:notify => (:Nothing, Any[:(Ptr{GParamSpec})]), :done => (:Nothing, Any[])) + function GLib.signal_return_type(::Type{T}, name::Symbol) where T <: AdwAnimation + eval((d[name])[1]) + end + function GLib.signal_argument_types(::Type{T}, name::Symbol) where T <: AdwAnimation + Tuple(eval.((d[name])[2])) + end + end + end begin abstract type AdwAnimationTarget <: GObject end mutable struct AdwAnimationTargetLeaf <: AdwAnimationTarget @@ -135,6 +274,11 @@ $(Expr(:toplevel, quote ccall(("adw_animation_target_get_type", libadwaita), GType, ()) end end + begin + function GLib.signalnames(::Type{AdwAnimationTarget}) + signalnames(supertype(AdwAnimationTarget)) + end + end begin abstract type AdwApplication <: GtkApplication end mutable struct AdwApplicationLeaf <: AdwApplication @@ -152,6 +296,19 @@ $(Expr(:toplevel, quote ccall(("adw_application_get_type", libadwaita), GType, ()) end end + begin + function GLib.signalnames(::Type{AdwApplication}) + vcat([:action_added, :action_enabled_changed, :action_removed, :action_state_changed], signalnames(supertype(AdwApplication))) + end + let d = Dict{Symbol, Tuple{Any, Any}}(:notify => (:Nothing, Any[:(Ptr{GParamSpec})]), :startup => (:Nothing, Any[]), :command_line => (:Int32, Expr[:(Ptr{GObject})]), :open => (:Nothing, Any[:(Ptr{Ptr{GObject}}), :Int32, :Cstring]), :window_removed => (:Nothing, Expr[:(Ptr{GObject})]), :shutdown => (:Nothing, Any[]), :name_lost => (:Cint, Any[]), :window_added => (:Nothing, Expr[:(Ptr{GObject})]), :activate => (:Nothing, Any[]), :handle_local_options => (:Int32, [:GVariantDict]), :query_end => (:Nothing, Any[])) + function GLib.signal_return_type(::Type{T}, name::Symbol) where T <: AdwApplication + eval((d[name])[1]) + end + function GLib.signal_argument_types(::Type{T}, name::Symbol) where T <: AdwApplication + Tuple(eval.((d[name])[2])) + end + end + end begin abstract type AdwApplicationWindow <: GtkApplicationWindow end mutable struct AdwApplicationWindowLeaf <: AdwApplicationWindow @@ -169,6 +326,19 @@ $(Expr(:toplevel, quote ccall(("adw_application_window_get_type", libadwaita), GType, ()) end end + begin + function GLib.signalnames(::Type{AdwApplicationWindow}) + vcat([:action_added, :action_enabled_changed, :action_removed, :action_state_changed], signalnames(supertype(AdwApplicationWindow))) + end + let d = Dict{Symbol, Tuple{Any, Any}}(:notify => (:Nothing, Any[:(Ptr{GParamSpec})]), :state_flags_changed => (:Nothing, [:UInt32]), :map => (:Nothing, Any[]), :keys_changed => (:Nothing, Any[]), :close_request => (:Cint, Any[]), :enable_debugging => (:Cint, [:Cint]), :unrealize => (:Nothing, Any[]), :activate_focus => (:Nothing, Any[]), :show => (:Nothing, Any[]), :unmap => (:Nothing, Any[]), :hide => (:Nothing, Any[]), :query_tooltip => (:Cint, Any[:Int32, :Int32, :Cint, :(Ptr{GObject})]), :activate_default => (:Nothing, Any[]), :move_focus => (:Nothing, [:UInt32]), :mnemonic_activate => (:Cint, [:Cint]), :direction_changed => (:Nothing, [:UInt32]), :destroy => (:Nothing, Any[]), :keynav_failed => (:Cint, [:UInt32]), :realize => (:Nothing, Any[])) + function GLib.signal_return_type(::Type{T}, name::Symbol) where T <: AdwApplicationWindow + eval((d[name])[1]) + end + function GLib.signal_argument_types(::Type{T}, name::Symbol) where T <: AdwApplicationWindow + Tuple(eval.((d[name])[2])) + end + end + end begin abstract type AdwAvatar <: GtkWidget end mutable struct AdwAvatarLeaf <: AdwAvatar @@ -186,6 +356,41 @@ $(Expr(:toplevel, quote ccall(("adw_avatar_get_type", libadwaita), GType, ()) end end + begin + function GLib.signalnames(::Type{AdwAvatar}) + signalnames(supertype(AdwAvatar)) + end + end + begin + abstract type AdwBanner <: GtkWidget end + mutable struct AdwBannerLeaf <: AdwBanner + handle::Ptr{GObject} + function AdwBannerLeaf(handle::Ptr{GObject}, owns = false) + if handle == C_NULL + error("Cannot construct AdwBannerLeaf with a NULL pointer") + end + GLib.gobject_maybe_sink(handle, owns) + return gobject_ref(new(handle)) + end + end + gtype_wrapper_cache[:AdwBanner] = AdwBannerLeaf + (GLib.g_type(::Type{T}) where T <: AdwBanner) = begin + ccall(("adw_banner_get_type", libadwaita), GType, ()) + end + end + begin + function GLib.signalnames(::Type{AdwBanner}) + vcat([:button_clicked], signalnames(supertype(AdwBanner))) + end + let d = Dict{Symbol, Tuple{Any, Any}}(:notify => (:Nothing, Any[:(Ptr{GParamSpec})]), :state_flags_changed => (:Nothing, [:UInt32]), :map => (:Nothing, Any[]), :button_clicked => (:Nothing, Any[]), :unrealize => (:Nothing, Any[]), :show => (:Nothing, Any[]), :unmap => (:Nothing, Any[]), :hide => (:Nothing, Any[]), :query_tooltip => (:Cint, Any[:Int32, :Int32, :Cint, :(Ptr{GObject})]), :move_focus => (:Nothing, [:UInt32]), :mnemonic_activate => (:Cint, [:Cint]), :direction_changed => (:Nothing, [:UInt32]), :destroy => (:Nothing, Any[]), :keynav_failed => (:Cint, [:UInt32]), :realize => (:Nothing, Any[])) + function GLib.signal_return_type(::Type{T}, name::Symbol) where T <: AdwBanner + eval((d[name])[1]) + end + function GLib.signal_argument_types(::Type{T}, name::Symbol) where T <: AdwBanner + Tuple(eval.((d[name])[2])) + end + end + end begin abstract type AdwBin <: GtkWidget end mutable struct AdwBinLeaf <: AdwBin @@ -203,6 +408,33 @@ $(Expr(:toplevel, quote ccall(("adw_bin_get_type", libadwaita), GType, ()) end end + begin + function GLib.signalnames(::Type{AdwBin}) + signalnames(supertype(AdwBin)) + end + end + begin + abstract type AdwBreakpointBin <: GtkWidget end + mutable struct AdwBreakpointBinLeaf <: AdwBreakpointBin + handle::Ptr{GObject} + function AdwBreakpointBinLeaf(handle::Ptr{GObject}, owns = false) + if handle == C_NULL + error("Cannot construct AdwBreakpointBinLeaf with a NULL pointer") + end + GLib.gobject_maybe_sink(handle, owns) + return gobject_ref(new(handle)) + end + end + gtype_wrapper_cache[:AdwBreakpointBin] = AdwBreakpointBinLeaf + (GLib.g_type(::Type{T}) where T <: AdwBreakpointBin) = begin + ccall(("adw_breakpoint_bin_get_type", libadwaita), GType, ()) + end + end + begin + function GLib.signalnames(::Type{AdwBreakpointBin}) + signalnames(supertype(AdwBreakpointBin)) + end + end begin abstract type AdwButtonContent <: GtkWidget end mutable struct AdwButtonContentLeaf <: AdwButtonContent @@ -220,6 +452,11 @@ $(Expr(:toplevel, quote ccall(("adw_button_content_get_type", libadwaita), GType, ()) end end + begin + function GLib.signalnames(::Type{AdwButtonContent}) + signalnames(supertype(AdwButtonContent)) + end + end begin abstract type AdwCallbackAnimationTarget <: AdwAnimationTarget end mutable struct AdwCallbackAnimationTargetLeaf <: AdwCallbackAnimationTarget @@ -237,6 +474,11 @@ $(Expr(:toplevel, quote ccall(("adw_callback_animation_target_get_type", libadwaita), GType, ()) end end + begin + function GLib.signalnames(::Type{AdwCallbackAnimationTarget}) + signalnames(supertype(AdwCallbackAnimationTarget)) + end + end begin abstract type AdwCarousel <: GtkWidget end mutable struct AdwCarouselLeaf <: AdwCarousel @@ -254,6 +496,19 @@ $(Expr(:toplevel, quote ccall(("adw_carousel_get_type", libadwaita), GType, ()) end end + begin + function GLib.signalnames(::Type{AdwCarousel}) + vcat([:page_changed], signalnames(supertype(AdwCarousel))) + end + let d = Dict{Symbol, Tuple{Any, Any}}(:notify => (:Nothing, Any[:(Ptr{GParamSpec})]), :state_flags_changed => (:Nothing, [:UInt32]), :map => (:Nothing, Any[]), :page_changed => (:Nothing, [:UInt32]), :unrealize => (:Nothing, Any[]), :show => (:Nothing, Any[]), :unmap => (:Nothing, Any[]), :hide => (:Nothing, Any[]), :query_tooltip => (:Cint, Any[:Int32, :Int32, :Cint, :(Ptr{GObject})]), :move_focus => (:Nothing, [:UInt32]), :mnemonic_activate => (:Cint, [:Cint]), :direction_changed => (:Nothing, [:UInt32]), :destroy => (:Nothing, Any[]), :keynav_failed => (:Cint, [:UInt32]), :realize => (:Nothing, Any[])) + function GLib.signal_return_type(::Type{T}, name::Symbol) where T <: AdwCarousel + eval((d[name])[1]) + end + function GLib.signal_argument_types(::Type{T}, name::Symbol) where T <: AdwCarousel + Tuple(eval.((d[name])[2])) + end + end + end begin abstract type AdwCarouselIndicatorDots <: GtkWidget end mutable struct AdwCarouselIndicatorDotsLeaf <: AdwCarouselIndicatorDots @@ -271,6 +526,11 @@ $(Expr(:toplevel, quote ccall(("adw_carousel_indicator_dots_get_type", libadwaita), GType, ()) end end + begin + function GLib.signalnames(::Type{AdwCarouselIndicatorDots}) + signalnames(supertype(AdwCarouselIndicatorDots)) + end + end begin abstract type AdwCarouselIndicatorLines <: GtkWidget end mutable struct AdwCarouselIndicatorLinesLeaf <: AdwCarouselIndicatorLines @@ -288,6 +548,11 @@ $(Expr(:toplevel, quote ccall(("adw_carousel_indicator_lines_get_type", libadwaita), GType, ()) end end + begin + function GLib.signalnames(::Type{AdwCarouselIndicatorLines}) + signalnames(supertype(AdwCarouselIndicatorLines)) + end + end begin abstract type AdwClamp <: GtkWidget end mutable struct AdwClampLeaf <: AdwClamp @@ -305,6 +570,11 @@ $(Expr(:toplevel, quote ccall(("adw_clamp_get_type", libadwaita), GType, ()) end end + begin + function GLib.signalnames(::Type{AdwClamp}) + signalnames(supertype(AdwClamp)) + end + end begin abstract type AdwClampLayout <: GtkLayoutManager end mutable struct AdwClampLayoutLeaf <: AdwClampLayout @@ -322,6 +592,11 @@ $(Expr(:toplevel, quote ccall(("adw_clamp_layout_get_type", libadwaita), GType, ()) end end + begin + function GLib.signalnames(::Type{AdwClampLayout}) + signalnames(supertype(AdwClampLayout)) + end + end begin abstract type AdwClampScrollable <: GtkWidget end mutable struct AdwClampScrollableLeaf <: AdwClampScrollable @@ -339,6 +614,11 @@ $(Expr(:toplevel, quote ccall(("adw_clamp_scrollable_get_type", libadwaita), GType, ()) end end + begin + function GLib.signalnames(::Type{AdwClampScrollable}) + signalnames(supertype(AdwClampScrollable)) + end + end begin abstract type AdwComboRow <: AdwActionRow end mutable struct AdwComboRowLeaf <: AdwComboRow @@ -356,6 +636,11 @@ $(Expr(:toplevel, quote ccall(("adw_combo_row_get_type", libadwaita), GType, ()) end end + begin + function GLib.signalnames(::Type{AdwComboRow}) + signalnames(supertype(AdwComboRow)) + end + end begin abstract type AdwEntryRow <: AdwPreferencesRow end mutable struct AdwEntryRowLeaf <: AdwEntryRow @@ -373,6 +658,19 @@ $(Expr(:toplevel, quote ccall(("adw_entry_row_get_type", libadwaita), GType, ()) end end + begin + function GLib.signalnames(::Type{AdwEntryRow}) + vcat([:apply, :entry_activated, :changed, :delete_text, :insert_text], signalnames(supertype(AdwEntryRow))) + end + let d = Dict{Symbol, Tuple{Any, Any}}(:notify => (:Nothing, Any[:(Ptr{GParamSpec})]), :state_flags_changed => (:Nothing, [:UInt32]), :map => (:Nothing, Any[]), :unrealize => (:Nothing, Any[]), :entry_activated => (:Nothing, Any[]), :apply => (:Nothing, Any[]), :show => (:Nothing, Any[]), :unmap => (:Nothing, Any[]), :hide => (:Nothing, Any[]), :query_tooltip => (:Cint, Any[:Int32, :Int32, :Cint, :(Ptr{GObject})]), :move_focus => (:Nothing, [:UInt32]), :mnemonic_activate => (:Cint, [:Cint]), :direction_changed => (:Nothing, [:UInt32]), :activate => (:Nothing, Any[]), :destroy => (:Nothing, Any[]), :keynav_failed => (:Cint, [:UInt32]), :realize => (:Nothing, Any[])) + function GLib.signal_return_type(::Type{T}, name::Symbol) where T <: AdwEntryRow + eval((d[name])[1]) + end + function GLib.signal_argument_types(::Type{T}, name::Symbol) where T <: AdwEntryRow + Tuple(eval.((d[name])[2])) + end + end + end begin abstract type AdwEnumListItem <: GObject end mutable struct AdwEnumListItemLeaf <: AdwEnumListItem @@ -390,6 +688,11 @@ $(Expr(:toplevel, quote ccall(("adw_enum_list_item_get_type", libadwaita), GType, ()) end end + begin + function GLib.signalnames(::Type{AdwEnumListItem}) + signalnames(supertype(AdwEnumListItem)) + end + end begin abstract type AdwEnumListModel <: GObject end mutable struct AdwEnumListModelLeaf <: AdwEnumListModel @@ -407,6 +710,19 @@ $(Expr(:toplevel, quote ccall(("adw_enum_list_model_get_type", libadwaita), GType, ()) end end + begin + function GLib.signalnames(::Type{AdwEnumListModel}) + vcat([:items_changed], signalnames(supertype(AdwEnumListModel))) + end + let d = Dict{Symbol, Tuple{Any, Any}}(:notify => (:Nothing, Any[:(Ptr{GParamSpec})])) + function GLib.signal_return_type(::Type{T}, name::Symbol) where T <: AdwEnumListModel + eval((d[name])[1]) + end + function GLib.signal_argument_types(::Type{T}, name::Symbol) where T <: AdwEnumListModel + Tuple(eval.((d[name])[2])) + end + end + end begin abstract type AdwExpanderRow <: AdwPreferencesRow end mutable struct AdwExpanderRowLeaf <: AdwExpanderRow @@ -424,6 +740,11 @@ $(Expr(:toplevel, quote ccall(("adw_expander_row_get_type", libadwaita), GType, ()) end end + begin + function GLib.signalnames(::Type{AdwExpanderRow}) + signalnames(supertype(AdwExpanderRow)) + end + end begin abstract type AdwFlap <: GtkWidget end mutable struct AdwFlapLeaf <: AdwFlap @@ -441,6 +762,11 @@ $(Expr(:toplevel, quote ccall(("adw_flap_get_type", libadwaita), GType, ()) end end + begin + function GLib.signalnames(::Type{AdwFlap}) + signalnames(supertype(AdwFlap)) + end + end begin abstract type AdwHeaderBar <: GtkWidget end mutable struct AdwHeaderBarLeaf <: AdwHeaderBar @@ -458,6 +784,11 @@ $(Expr(:toplevel, quote ccall(("adw_header_bar_get_type", libadwaita), GType, ()) end end + begin + function GLib.signalnames(::Type{AdwHeaderBar}) + signalnames(supertype(AdwHeaderBar)) + end + end begin abstract type AdwLeaflet <: GtkWidget end mutable struct AdwLeafletLeaf <: AdwLeaflet @@ -475,6 +806,11 @@ $(Expr(:toplevel, quote ccall(("adw_leaflet_get_type", libadwaita), GType, ()) end end + begin + function GLib.signalnames(::Type{AdwLeaflet}) + signalnames(supertype(AdwLeaflet)) + end + end begin abstract type AdwLeafletPage <: GObject end mutable struct AdwLeafletPageLeaf <: AdwLeafletPage @@ -492,6 +828,11 @@ $(Expr(:toplevel, quote ccall(("adw_leaflet_page_get_type", libadwaita), GType, ()) end end + begin + function GLib.signalnames(::Type{AdwLeafletPage}) + signalnames(supertype(AdwLeafletPage)) + end + end begin abstract type AdwMessageDialog <: GtkWindow end mutable struct AdwMessageDialogLeaf <: AdwMessageDialog @@ -509,6 +850,123 @@ $(Expr(:toplevel, quote ccall(("adw_message_dialog_get_type", libadwaita), GType, ()) end end + begin + function GLib.signalnames(::Type{AdwMessageDialog}) + vcat([:response], signalnames(supertype(AdwMessageDialog))) + end + let d = Dict{Symbol, Tuple{Any, Any}}(:notify => (:Nothing, Any[:(Ptr{GParamSpec})]), :state_flags_changed => (:Nothing, [:UInt32]), :map => (:Nothing, Any[]), :keys_changed => (:Nothing, Any[]), :close_request => (:Cint, Any[]), :enable_debugging => (:Cint, [:Cint]), :unrealize => (:Nothing, Any[]), :activate_focus => (:Nothing, Any[]), :show => (:Nothing, Any[]), :unmap => (:Nothing, Any[]), :hide => (:Nothing, Any[]), :query_tooltip => (:Cint, Any[:Int32, :Int32, :Cint, :(Ptr{GObject})]), :activate_default => (:Nothing, Any[]), :move_focus => (:Nothing, [:UInt32]), :mnemonic_activate => (:Cint, [:Cint]), :direction_changed => (:Nothing, [:UInt32]), :response => (:Nothing, [:Cstring]), :destroy => (:Nothing, Any[]), :keynav_failed => (:Cint, [:UInt32]), :realize => (:Nothing, Any[])) + function GLib.signal_return_type(::Type{T}, name::Symbol) where T <: AdwMessageDialog + eval((d[name])[1]) + end + function GLib.signal_argument_types(::Type{T}, name::Symbol) where T <: AdwMessageDialog + Tuple(eval.((d[name])[2])) + end + end + end + begin + abstract type AdwNavigationPage <: GtkWidget end + mutable struct AdwNavigationPageLeaf <: AdwNavigationPage + handle::Ptr{GObject} + function AdwNavigationPageLeaf(handle::Ptr{GObject}, owns = false) + if handle == C_NULL + error("Cannot construct AdwNavigationPageLeaf with a NULL pointer") + end + GLib.gobject_maybe_sink(handle, owns) + return gobject_ref(new(handle)) + end + end + gtype_wrapper_cache[:AdwNavigationPage] = AdwNavigationPageLeaf + (GLib.g_type(::Type{T}) where T <: AdwNavigationPage) = begin + ccall(("adw_navigation_page_get_type", libadwaita), GType, ()) + end + end + begin + function GLib.signalnames(::Type{AdwNavigationPage}) + vcat([:hidden, :hiding, :showing, :shown], signalnames(supertype(AdwNavigationPage))) + end + let d = Dict{Symbol, Tuple{Any, Any}}(:notify => (:Nothing, Any[:(Ptr{GParamSpec})]), :state_flags_changed => (:Nothing, [:UInt32]), :map => (:Nothing, Any[]), :showing => (:Nothing, Any[]), :shown => (:Nothing, Any[]), :unrealize => (:Nothing, Any[]), :hidden => (:Nothing, Any[]), :show => (:Nothing, Any[]), :unmap => (:Nothing, Any[]), :hide => (:Nothing, Any[]), :query_tooltip => (:Cint, Any[:Int32, :Int32, :Cint, :(Ptr{GObject})]), :move_focus => (:Nothing, [:UInt32]), :mnemonic_activate => (:Cint, [:Cint]), :direction_changed => (:Nothing, [:UInt32]), :hiding => (:Nothing, Any[]), :destroy => (:Nothing, Any[]), :keynav_failed => (:Cint, [:UInt32]), :realize => (:Nothing, Any[])) + function GLib.signal_return_type(::Type{T}, name::Symbol) where T <: AdwNavigationPage + eval((d[name])[1]) + end + function GLib.signal_argument_types(::Type{T}, name::Symbol) where T <: AdwNavigationPage + Tuple(eval.((d[name])[2])) + end + end + end + begin + abstract type AdwNavigationSplitView <: GtkWidget end + mutable struct AdwNavigationSplitViewLeaf <: AdwNavigationSplitView + handle::Ptr{GObject} + function AdwNavigationSplitViewLeaf(handle::Ptr{GObject}, owns = false) + if handle == C_NULL + error("Cannot construct AdwNavigationSplitViewLeaf with a NULL pointer") + end + GLib.gobject_maybe_sink(handle, owns) + return gobject_ref(new(handle)) + end + end + gtype_wrapper_cache[:AdwNavigationSplitView] = AdwNavigationSplitViewLeaf + (GLib.g_type(::Type{T}) where T <: AdwNavigationSplitView) = begin + ccall(("adw_navigation_split_view_get_type", libadwaita), GType, ()) + end + end + begin + function GLib.signalnames(::Type{AdwNavigationSplitView}) + signalnames(supertype(AdwNavigationSplitView)) + end + end + begin + abstract type AdwNavigationView <: GtkWidget end + mutable struct AdwNavigationViewLeaf <: AdwNavigationView + handle::Ptr{GObject} + function AdwNavigationViewLeaf(handle::Ptr{GObject}, owns = false) + if handle == C_NULL + error("Cannot construct AdwNavigationViewLeaf with a NULL pointer") + end + GLib.gobject_maybe_sink(handle, owns) + return gobject_ref(new(handle)) + end + end + gtype_wrapper_cache[:AdwNavigationView] = AdwNavigationViewLeaf + (GLib.g_type(::Type{T}) where T <: AdwNavigationView) = begin + ccall(("adw_navigation_view_get_type", libadwaita), GType, ()) + end + end + begin + function GLib.signalnames(::Type{AdwNavigationView}) + vcat([:get_next_page, :popped, :pushed, :replaced], signalnames(supertype(AdwNavigationView))) + end + let d = Dict{Symbol, Tuple{Any, Any}}(:notify => (:Nothing, Any[:(Ptr{GParamSpec})]), :state_flags_changed => (:Nothing, [:UInt32]), :map => (:Nothing, Any[]), :pushed => (:Nothing, Any[]), :get_next_page => (:(Ptr{GObject}), Any[]), :unrealize => (:Nothing, Any[]), :show => (:Nothing, Any[]), :unmap => (:Nothing, Any[]), :popped => (:Nothing, Expr[:(Ptr{GObject})]), :hide => (:Nothing, Any[]), :query_tooltip => (:Cint, Any[:Int32, :Int32, :Cint, :(Ptr{GObject})]), :move_focus => (:Nothing, [:UInt32]), :mnemonic_activate => (:Cint, [:Cint]), :direction_changed => (:Nothing, [:UInt32]), :replaced => (:Nothing, Any[]), :destroy => (:Nothing, Any[]), :keynav_failed => (:Cint, [:UInt32]), :realize => (:Nothing, Any[])) + function GLib.signal_return_type(::Type{T}, name::Symbol) where T <: AdwNavigationView + eval((d[name])[1]) + end + function GLib.signal_argument_types(::Type{T}, name::Symbol) where T <: AdwNavigationView + Tuple(eval.((d[name])[2])) + end + end + end + begin + abstract type AdwOverlaySplitView <: GtkWidget end + mutable struct AdwOverlaySplitViewLeaf <: AdwOverlaySplitView + handle::Ptr{GObject} + function AdwOverlaySplitViewLeaf(handle::Ptr{GObject}, owns = false) + if handle == C_NULL + error("Cannot construct AdwOverlaySplitViewLeaf with a NULL pointer") + end + GLib.gobject_maybe_sink(handle, owns) + return gobject_ref(new(handle)) + end + end + gtype_wrapper_cache[:AdwOverlaySplitView] = AdwOverlaySplitViewLeaf + (GLib.g_type(::Type{T}) where T <: AdwOverlaySplitView) = begin + ccall(("adw_overlay_split_view_get_type", libadwaita), GType, ()) + end + end + begin + function GLib.signalnames(::Type{AdwOverlaySplitView}) + signalnames(supertype(AdwOverlaySplitView)) + end + end begin abstract type AdwPasswordEntryRow <: AdwEntryRow end mutable struct AdwPasswordEntryRowLeaf <: AdwPasswordEntryRow @@ -526,6 +984,41 @@ $(Expr(:toplevel, quote ccall(("adw_password_entry_row_get_type", libadwaita), GType, ()) end end + begin + function GLib.signalnames(::Type{AdwPasswordEntryRow}) + vcat([:changed, :delete_text, :insert_text], signalnames(supertype(AdwPasswordEntryRow))) + end + let d = Dict{Symbol, Tuple{Any, Any}}(:notify => (:Nothing, Any[:(Ptr{GParamSpec})]), :state_flags_changed => (:Nothing, [:UInt32]), :map => (:Nothing, Any[]), :unrealize => (:Nothing, Any[]), :entry_activated => (:Nothing, Any[]), :apply => (:Nothing, Any[]), :show => (:Nothing, Any[]), :unmap => (:Nothing, Any[]), :hide => (:Nothing, Any[]), :query_tooltip => (:Cint, Any[:Int32, :Int32, :Cint, :(Ptr{GObject})]), :move_focus => (:Nothing, [:UInt32]), :mnemonic_activate => (:Cint, [:Cint]), :direction_changed => (:Nothing, [:UInt32]), :activate => (:Nothing, Any[]), :destroy => (:Nothing, Any[]), :keynav_failed => (:Cint, [:UInt32]), :realize => (:Nothing, Any[])) + function GLib.signal_return_type(::Type{T}, name::Symbol) where T <: AdwPasswordEntryRow + eval((d[name])[1]) + end + function GLib.signal_argument_types(::Type{T}, name::Symbol) where T <: AdwPasswordEntryRow + Tuple(eval.((d[name])[2])) + end + end + end + begin + abstract type AdwPreferencesDialog <: AdwDialog end + mutable struct AdwPreferencesDialogLeaf <: AdwPreferencesDialog + handle::Ptr{GObject} + function AdwPreferencesDialogLeaf(handle::Ptr{GObject}, owns = false) + if handle == C_NULL + error("Cannot construct AdwPreferencesDialogLeaf with a NULL pointer") + end + GLib.gobject_maybe_sink(handle, owns) + return gobject_ref(new(handle)) + end + end + gtype_wrapper_cache[:AdwPreferencesDialog] = AdwPreferencesDialogLeaf + (GLib.g_type(::Type{T}) where T <: AdwPreferencesDialog) = begin + ccall(("adw_preferences_dialog_get_type", libadwaita), GType, ()) + end + end + begin + function GLib.signalnames(::Type{AdwPreferencesDialog}) + signalnames(supertype(AdwPreferencesDialog)) + end + end begin abstract type AdwPreferencesGroup <: GtkWidget end mutable struct AdwPreferencesGroupLeaf <: AdwPreferencesGroup @@ -543,6 +1036,11 @@ $(Expr(:toplevel, quote ccall(("adw_preferences_group_get_type", libadwaita), GType, ()) end end + begin + function GLib.signalnames(::Type{AdwPreferencesGroup}) + signalnames(supertype(AdwPreferencesGroup)) + end + end begin abstract type AdwPreferencesPage <: GtkWidget end mutable struct AdwPreferencesPageLeaf <: AdwPreferencesPage @@ -560,6 +1058,11 @@ $(Expr(:toplevel, quote ccall(("adw_preferences_page_get_type", libadwaita), GType, ()) end end + begin + function GLib.signalnames(::Type{AdwPreferencesPage}) + signalnames(supertype(AdwPreferencesPage)) + end + end begin abstract type AdwPreferencesWindow <: AdwWindow end mutable struct AdwPreferencesWindowLeaf <: AdwPreferencesWindow @@ -577,6 +1080,11 @@ $(Expr(:toplevel, quote ccall(("adw_preferences_window_get_type", libadwaita), GType, ()) end end + begin + function GLib.signalnames(::Type{AdwPreferencesWindow}) + signalnames(supertype(AdwPreferencesWindow)) + end + end begin abstract type AdwPropertyAnimationTarget <: AdwAnimationTarget end mutable struct AdwPropertyAnimationTargetLeaf <: AdwPropertyAnimationTarget @@ -594,6 +1102,41 @@ $(Expr(:toplevel, quote ccall(("adw_property_animation_target_get_type", libadwaita), GType, ()) end end + begin + function GLib.signalnames(::Type{AdwPropertyAnimationTarget}) + signalnames(supertype(AdwPropertyAnimationTarget)) + end + end + begin + abstract type AdwSpinRow <: AdwActionRow end + mutable struct AdwSpinRowLeaf <: AdwSpinRow + handle::Ptr{GObject} + function AdwSpinRowLeaf(handle::Ptr{GObject}, owns = false) + if handle == C_NULL + error("Cannot construct AdwSpinRowLeaf with a NULL pointer") + end + GLib.gobject_maybe_sink(handle, owns) + return gobject_ref(new(handle)) + end + end + gtype_wrapper_cache[:AdwSpinRow] = AdwSpinRowLeaf + (GLib.g_type(::Type{T}) where T <: AdwSpinRow) = begin + ccall(("adw_spin_row_get_type", libadwaita), GType, ()) + end + end + begin + function GLib.signalnames(::Type{AdwSpinRow}) + vcat([:input, :output, :wrapped, :changed, :delete_text, :insert_text], signalnames(supertype(AdwSpinRow))) + end + let d = Dict{Symbol, Tuple{Any, Any}}(:notify => (:Nothing, Any[:(Ptr{GParamSpec})]), :state_flags_changed => (:Nothing, [:UInt32]), :map => (:Nothing, Any[]), :unrealize => (:Nothing, Any[]), :input => (:Int32, [:Float64]), :wrapped => (:Nothing, Any[]), :output => (:Cint, Any[]), :show => (:Nothing, Any[]), :unmap => (:Nothing, Any[]), :hide => (:Nothing, Any[]), :query_tooltip => (:Cint, Any[:Int32, :Int32, :Cint, :(Ptr{GObject})]), :activated => (:Nothing, Any[]), :move_focus => (:Nothing, [:UInt32]), :mnemonic_activate => (:Cint, [:Cint]), :direction_changed => (:Nothing, [:UInt32]), :activate => (:Nothing, Any[]), :destroy => (:Nothing, Any[]), :keynav_failed => (:Cint, [:UInt32]), :realize => (:Nothing, Any[])) + function GLib.signal_return_type(::Type{T}, name::Symbol) where T <: AdwSpinRow + eval((d[name])[1]) + end + function GLib.signal_argument_types(::Type{T}, name::Symbol) where T <: AdwSpinRow + Tuple(eval.((d[name])[2])) + end + end + end begin abstract type AdwSplitButton <: GtkWidget end mutable struct AdwSplitButtonLeaf <: AdwSplitButton @@ -611,6 +1154,19 @@ $(Expr(:toplevel, quote ccall(("adw_split_button_get_type", libadwaita), GType, ()) end end + begin + function GLib.signalnames(::Type{AdwSplitButton}) + vcat([:activate, :clicked], signalnames(supertype(AdwSplitButton))) + end + let d = Dict{Symbol, Tuple{Any, Any}}(:notify => (:Nothing, Any[:(Ptr{GParamSpec})]), :state_flags_changed => (:Nothing, [:UInt32]), :map => (:Nothing, Any[]), :unrealize => (:Nothing, Any[]), :show => (:Nothing, Any[]), :unmap => (:Nothing, Any[]), :hide => (:Nothing, Any[]), :query_tooltip => (:Cint, Any[:Int32, :Int32, :Cint, :(Ptr{GObject})]), :clicked => (:Nothing, Any[]), :move_focus => (:Nothing, [:UInt32]), :mnemonic_activate => (:Cint, [:Cint]), :direction_changed => (:Nothing, [:UInt32]), :activate => (:Nothing, Any[]), :destroy => (:Nothing, Any[]), :keynav_failed => (:Cint, [:UInt32]), :realize => (:Nothing, Any[])) + function GLib.signal_return_type(::Type{T}, name::Symbol) where T <: AdwSplitButton + eval((d[name])[1]) + end + function GLib.signal_argument_types(::Type{T}, name::Symbol) where T <: AdwSplitButton + Tuple(eval.((d[name])[2])) + end + end + end begin abstract type AdwSpringAnimation <: AdwAnimation end mutable struct AdwSpringAnimationLeaf <: AdwSpringAnimation @@ -628,6 +1184,11 @@ $(Expr(:toplevel, quote ccall(("adw_spring_animation_get_type", libadwaita), GType, ()) end end + begin + function GLib.signalnames(::Type{AdwSpringAnimation}) + signalnames(supertype(AdwSpringAnimation)) + end + end begin abstract type AdwSqueezer <: GtkWidget end mutable struct AdwSqueezerLeaf <: AdwSqueezer @@ -645,6 +1206,11 @@ $(Expr(:toplevel, quote ccall(("adw_squeezer_get_type", libadwaita), GType, ()) end end + begin + function GLib.signalnames(::Type{AdwSqueezer}) + signalnames(supertype(AdwSqueezer)) + end + end begin abstract type AdwSqueezerPage <: GObject end mutable struct AdwSqueezerPageLeaf <: AdwSqueezerPage @@ -662,6 +1228,11 @@ $(Expr(:toplevel, quote ccall(("adw_squeezer_page_get_type", libadwaita), GType, ()) end end + begin + function GLib.signalnames(::Type{AdwSqueezerPage}) + signalnames(supertype(AdwSqueezerPage)) + end + end begin abstract type AdwStatusPage <: GtkWidget end mutable struct AdwStatusPageLeaf <: AdwStatusPage @@ -679,6 +1250,11 @@ $(Expr(:toplevel, quote ccall(("adw_status_page_get_type", libadwaita), GType, ()) end end + begin + function GLib.signalnames(::Type{AdwStatusPage}) + signalnames(supertype(AdwStatusPage)) + end + end begin abstract type AdwStyleManager <: GObject end mutable struct AdwStyleManagerLeaf <: AdwStyleManager @@ -696,6 +1272,11 @@ $(Expr(:toplevel, quote ccall(("adw_style_manager_get_type", libadwaita), GType, ()) end end + begin + function GLib.signalnames(::Type{AdwStyleManager}) + signalnames(supertype(AdwStyleManager)) + end + end begin abstract type AdwSwipeTracker <: GObject end mutable struct AdwSwipeTrackerLeaf <: AdwSwipeTracker @@ -713,6 +1294,41 @@ $(Expr(:toplevel, quote ccall(("adw_swipe_tracker_get_type", libadwaita), GType, ()) end end + begin + function GLib.signalnames(::Type{AdwSwipeTracker}) + vcat([:begin_swipe, :end_swipe, :prepare, :update_swipe], signalnames(supertype(AdwSwipeTracker))) + end + let d = Dict{Symbol, Tuple{Any, Any}}(:notify => (:Nothing, Any[:(Ptr{GParamSpec})]), :end_swipe => (:Nothing, [:Float64, :Float64]), :prepare => (:Nothing, [:UInt32]), :begin_swipe => (:Nothing, Any[]), :update_swipe => (:Nothing, [:Float64])) + function GLib.signal_return_type(::Type{T}, name::Symbol) where T <: AdwSwipeTracker + eval((d[name])[1]) + end + function GLib.signal_argument_types(::Type{T}, name::Symbol) where T <: AdwSwipeTracker + Tuple(eval.((d[name])[2])) + end + end + end + begin + abstract type AdwSwitchRow <: AdwActionRow end + mutable struct AdwSwitchRowLeaf <: AdwSwitchRow + handle::Ptr{GObject} + function AdwSwitchRowLeaf(handle::Ptr{GObject}, owns = false) + if handle == C_NULL + error("Cannot construct AdwSwitchRowLeaf with a NULL pointer") + end + GLib.gobject_maybe_sink(handle, owns) + return gobject_ref(new(handle)) + end + end + gtype_wrapper_cache[:AdwSwitchRow] = AdwSwitchRowLeaf + (GLib.g_type(::Type{T}) where T <: AdwSwitchRow) = begin + ccall(("adw_switch_row_get_type", libadwaita), GType, ()) + end + end + begin + function GLib.signalnames(::Type{AdwSwitchRow}) + signalnames(supertype(AdwSwitchRow)) + end + end begin abstract type AdwTabBar <: GtkWidget end mutable struct AdwTabBarLeaf <: AdwTabBar @@ -730,6 +1346,79 @@ $(Expr(:toplevel, quote ccall(("adw_tab_bar_get_type", libadwaita), GType, ()) end end + begin + function GLib.signalnames(::Type{AdwTabBar}) + vcat([:extra_drag_drop, :extra_drag_value], signalnames(supertype(AdwTabBar))) + end + let d = Dict{Symbol, Tuple{Any, Any}}(:notify => (:Nothing, Any[:(Ptr{GParamSpec})]), :state_flags_changed => (:Nothing, [:UInt32]), :map => (:Nothing, Any[]), :extra_drag_drop => (:Cint, Any[:(Ptr{GObject}), :_GValue]), :unrealize => (:Nothing, Any[]), :extra_drag_value => (:UInt32, Any[:(Ptr{GObject}), :_GValue]), :show => (:Nothing, Any[]), :unmap => (:Nothing, Any[]), :hide => (:Nothing, Any[]), :query_tooltip => (:Cint, Any[:Int32, :Int32, :Cint, :(Ptr{GObject})]), :move_focus => (:Nothing, [:UInt32]), :mnemonic_activate => (:Cint, [:Cint]), :direction_changed => (:Nothing, [:UInt32]), :destroy => (:Nothing, Any[]), :keynav_failed => (:Cint, [:UInt32]), :realize => (:Nothing, Any[])) + function GLib.signal_return_type(::Type{T}, name::Symbol) where T <: AdwTabBar + eval((d[name])[1]) + end + function GLib.signal_argument_types(::Type{T}, name::Symbol) where T <: AdwTabBar + Tuple(eval.((d[name])[2])) + end + end + end + begin + abstract type AdwTabButton <: GtkWidget end + mutable struct AdwTabButtonLeaf <: AdwTabButton + handle::Ptr{GObject} + function AdwTabButtonLeaf(handle::Ptr{GObject}, owns = false) + if handle == C_NULL + error("Cannot construct AdwTabButtonLeaf with a NULL pointer") + end + GLib.gobject_maybe_sink(handle, owns) + return gobject_ref(new(handle)) + end + end + gtype_wrapper_cache[:AdwTabButton] = AdwTabButtonLeaf + (GLib.g_type(::Type{T}) where T <: AdwTabButton) = begin + ccall(("adw_tab_button_get_type", libadwaita), GType, ()) + end + end + begin + function GLib.signalnames(::Type{AdwTabButton}) + vcat([:activate, :clicked], signalnames(supertype(AdwTabButton))) + end + let d = Dict{Symbol, Tuple{Any, Any}}(:notify => (:Nothing, Any[:(Ptr{GParamSpec})]), :state_flags_changed => (:Nothing, [:UInt32]), :map => (:Nothing, Any[]), :unrealize => (:Nothing, Any[]), :show => (:Nothing, Any[]), :unmap => (:Nothing, Any[]), :hide => (:Nothing, Any[]), :query_tooltip => (:Cint, Any[:Int32, :Int32, :Cint, :(Ptr{GObject})]), :clicked => (:Nothing, Any[]), :move_focus => (:Nothing, [:UInt32]), :mnemonic_activate => (:Cint, [:Cint]), :direction_changed => (:Nothing, [:UInt32]), :activate => (:Nothing, Any[]), :destroy => (:Nothing, Any[]), :keynav_failed => (:Cint, [:UInt32]), :realize => (:Nothing, Any[])) + function GLib.signal_return_type(::Type{T}, name::Symbol) where T <: AdwTabButton + eval((d[name])[1]) + end + function GLib.signal_argument_types(::Type{T}, name::Symbol) where T <: AdwTabButton + Tuple(eval.((d[name])[2])) + end + end + end + begin + abstract type AdwTabOverview <: GtkWidget end + mutable struct AdwTabOverviewLeaf <: AdwTabOverview + handle::Ptr{GObject} + function AdwTabOverviewLeaf(handle::Ptr{GObject}, owns = false) + if handle == C_NULL + error("Cannot construct AdwTabOverviewLeaf with a NULL pointer") + end + GLib.gobject_maybe_sink(handle, owns) + return gobject_ref(new(handle)) + end + end + gtype_wrapper_cache[:AdwTabOverview] = AdwTabOverviewLeaf + (GLib.g_type(::Type{T}) where T <: AdwTabOverview) = begin + ccall(("adw_tab_overview_get_type", libadwaita), GType, ()) + end + end + begin + function GLib.signalnames(::Type{AdwTabOverview}) + vcat([:create_tab, :extra_drag_drop, :extra_drag_value], signalnames(supertype(AdwTabOverview))) + end + let d = Dict{Symbol, Tuple{Any, Any}}(:notify => (:Nothing, Any[:(Ptr{GParamSpec})]), :state_flags_changed => (:Nothing, [:UInt32]), :map => (:Nothing, Any[]), :extra_drag_drop => (:Cint, Any[:(Ptr{GObject}), :_GValue]), :create_tab => (:(Ptr{GObject}), Any[]), :unrealize => (:Nothing, Any[]), :extra_drag_value => (:UInt32, Any[:(Ptr{GObject}), :_GValue]), :show => (:Nothing, Any[]), :unmap => (:Nothing, Any[]), :hide => (:Nothing, Any[]), :query_tooltip => (:Cint, Any[:Int32, :Int32, :Cint, :(Ptr{GObject})]), :move_focus => (:Nothing, [:UInt32]), :mnemonic_activate => (:Cint, [:Cint]), :direction_changed => (:Nothing, [:UInt32]), :destroy => (:Nothing, Any[]), :keynav_failed => (:Cint, [:UInt32]), :realize => (:Nothing, Any[])) + function GLib.signal_return_type(::Type{T}, name::Symbol) where T <: AdwTabOverview + eval((d[name])[1]) + end + function GLib.signal_argument_types(::Type{T}, name::Symbol) where T <: AdwTabOverview + Tuple(eval.((d[name])[2])) + end + end + end begin abstract type AdwTabPage <: GObject end mutable struct AdwTabPageLeaf <: AdwTabPage @@ -747,6 +1436,11 @@ $(Expr(:toplevel, quote ccall(("adw_tab_page_get_type", libadwaita), GType, ()) end end + begin + function GLib.signalnames(::Type{AdwTabPage}) + signalnames(supertype(AdwTabPage)) + end + end begin abstract type AdwTabView <: GtkWidget end mutable struct AdwTabViewLeaf <: AdwTabView @@ -764,6 +1458,19 @@ $(Expr(:toplevel, quote ccall(("adw_tab_view_get_type", libadwaita), GType, ()) end end + begin + function GLib.signalnames(::Type{AdwTabView}) + vcat([:close_page, :create_window, :indicator_activated, :page_attached, :page_detached, :page_reordered, :setup_menu], signalnames(supertype(AdwTabView))) + end + let d = Dict{Symbol, Tuple{Any, Any}}(:notify => (:Nothing, Any[:(Ptr{GParamSpec})]), :state_flags_changed => (:Nothing, [:UInt32]), :map => (:Nothing, Any[]), :page_attached => (:Nothing, Any[:(Ptr{GObject}), :Int32]), :page_reordered => (:Nothing, Any[:(Ptr{GObject}), :Int32]), :page_detached => (:Nothing, Any[:(Ptr{GObject}), :Int32]), :unrealize => (:Nothing, Any[]), :create_window => (:(Ptr{GObject}), Any[]), :setup_menu => (:Nothing, Expr[:(Ptr{GObject})]), :show => (:Nothing, Any[]), :unmap => (:Nothing, Any[]), :indicator_activated => (:Nothing, Expr[:(Ptr{GObject})]), :hide => (:Nothing, Any[]), :query_tooltip => (:Cint, Any[:Int32, :Int32, :Cint, :(Ptr{GObject})]), :move_focus => (:Nothing, [:UInt32]), :mnemonic_activate => (:Cint, [:Cint]), :direction_changed => (:Nothing, [:UInt32]), :close_page => (:Cint, Expr[:(Ptr{GObject})]), :destroy => (:Nothing, Any[]), :keynav_failed => (:Cint, [:UInt32]), :realize => (:Nothing, Any[])) + function GLib.signal_return_type(::Type{T}, name::Symbol) where T <: AdwTabView + eval((d[name])[1]) + end + function GLib.signal_argument_types(::Type{T}, name::Symbol) where T <: AdwTabView + Tuple(eval.((d[name])[2])) + end + end + end begin abstract type AdwTimedAnimation <: AdwAnimation end mutable struct AdwTimedAnimationLeaf <: AdwTimedAnimation @@ -781,6 +1488,11 @@ $(Expr(:toplevel, quote ccall(("adw_timed_animation_get_type", libadwaita), GType, ()) end end + begin + function GLib.signalnames(::Type{AdwTimedAnimation}) + signalnames(supertype(AdwTimedAnimation)) + end + end begin abstract type AdwToast <: GObject end mutable struct AdwToastLeaf <: AdwToast @@ -798,6 +1510,19 @@ $(Expr(:toplevel, quote ccall(("adw_toast_get_type", libadwaita), GType, ()) end end + begin + function GLib.signalnames(::Type{AdwToast}) + vcat([:button_clicked, :dismissed], signalnames(supertype(AdwToast))) + end + let d = Dict{Symbol, Tuple{Any, Any}}(:notify => (:Nothing, Any[:(Ptr{GParamSpec})]), :dismissed => (:Nothing, Any[]), :button_clicked => (:Nothing, Any[])) + function GLib.signal_return_type(::Type{T}, name::Symbol) where T <: AdwToast + eval((d[name])[1]) + end + function GLib.signal_argument_types(::Type{T}, name::Symbol) where T <: AdwToast + Tuple(eval.((d[name])[2])) + end + end + end begin abstract type AdwToastOverlay <: GtkWidget end mutable struct AdwToastOverlayLeaf <: AdwToastOverlay @@ -815,6 +1540,33 @@ $(Expr(:toplevel, quote ccall(("adw_toast_overlay_get_type", libadwaita), GType, ()) end end + begin + function GLib.signalnames(::Type{AdwToastOverlay}) + signalnames(supertype(AdwToastOverlay)) + end + end + begin + abstract type AdwToolbarView <: GtkWidget end + mutable struct AdwToolbarViewLeaf <: AdwToolbarView + handle::Ptr{GObject} + function AdwToolbarViewLeaf(handle::Ptr{GObject}, owns = false) + if handle == C_NULL + error("Cannot construct AdwToolbarViewLeaf with a NULL pointer") + end + GLib.gobject_maybe_sink(handle, owns) + return gobject_ref(new(handle)) + end + end + gtype_wrapper_cache[:AdwToolbarView] = AdwToolbarViewLeaf + (GLib.g_type(::Type{T}) where T <: AdwToolbarView) = begin + ccall(("adw_toolbar_view_get_type", libadwaita), GType, ()) + end + end + begin + function GLib.signalnames(::Type{AdwToolbarView}) + signalnames(supertype(AdwToolbarView)) + end + end begin abstract type AdwViewStack <: GtkWidget end mutable struct AdwViewStackLeaf <: AdwViewStack @@ -832,6 +1584,11 @@ $(Expr(:toplevel, quote ccall(("adw_view_stack_get_type", libadwaita), GType, ()) end end + begin + function GLib.signalnames(::Type{AdwViewStack}) + signalnames(supertype(AdwViewStack)) + end + end begin abstract type AdwViewStackPage <: GObject end mutable struct AdwViewStackPageLeaf <: AdwViewStackPage @@ -849,6 +1606,41 @@ $(Expr(:toplevel, quote ccall(("adw_view_stack_page_get_type", libadwaita), GType, ()) end end + begin + function GLib.signalnames(::Type{AdwViewStackPage}) + signalnames(supertype(AdwViewStackPage)) + end + end + begin + abstract type AdwViewStackPages <: GObject end + mutable struct AdwViewStackPagesLeaf <: AdwViewStackPages + handle::Ptr{GObject} + function AdwViewStackPagesLeaf(handle::Ptr{GObject}, owns = false) + if handle == C_NULL + error("Cannot construct AdwViewStackPagesLeaf with a NULL pointer") + end + GLib.gobject_maybe_sink(handle, owns) + return gobject_ref(new(handle)) + end + end + gtype_wrapper_cache[:AdwViewStackPages] = AdwViewStackPagesLeaf + (GLib.g_type(::Type{T}) where T <: AdwViewStackPages) = begin + ccall(("adw_view_stack_pages_get_type", libadwaita), GType, ()) + end + end + begin + function GLib.signalnames(::Type{AdwViewStackPages}) + vcat([:items_changed, :selection_changed], signalnames(supertype(AdwViewStackPages))) + end + let d = Dict{Symbol, Tuple{Any, Any}}(:notify => (:Nothing, Any[:(Ptr{GParamSpec})])) + function GLib.signal_return_type(::Type{T}, name::Symbol) where T <: AdwViewStackPages + eval((d[name])[1]) + end + function GLib.signal_argument_types(::Type{T}, name::Symbol) where T <: AdwViewStackPages + Tuple(eval.((d[name])[2])) + end + end + end begin abstract type AdwViewSwitcher <: GtkWidget end mutable struct AdwViewSwitcherLeaf <: AdwViewSwitcher @@ -866,6 +1658,11 @@ $(Expr(:toplevel, quote ccall(("adw_view_switcher_get_type", libadwaita), GType, ()) end end + begin + function GLib.signalnames(::Type{AdwViewSwitcher}) + signalnames(supertype(AdwViewSwitcher)) + end + end begin abstract type AdwViewSwitcherBar <: GtkWidget end mutable struct AdwViewSwitcherBarLeaf <: AdwViewSwitcherBar @@ -883,6 +1680,11 @@ $(Expr(:toplevel, quote ccall(("adw_view_switcher_bar_get_type", libadwaita), GType, ()) end end + begin + function GLib.signalnames(::Type{AdwViewSwitcherBar}) + signalnames(supertype(AdwViewSwitcherBar)) + end + end begin abstract type AdwViewSwitcherTitle <: GtkWidget end mutable struct AdwViewSwitcherTitleLeaf <: AdwViewSwitcherTitle @@ -900,6 +1702,11 @@ $(Expr(:toplevel, quote ccall(("adw_view_switcher_title_get_type", libadwaita), GType, ()) end end + begin + function GLib.signalnames(::Type{AdwViewSwitcherTitle}) + signalnames(supertype(AdwViewSwitcherTitle)) + end + end begin abstract type AdwWindowTitle <: GtkWidget end mutable struct AdwWindowTitleLeaf <: AdwWindowTitle @@ -917,21 +1724,46 @@ $(Expr(:toplevel, quote ccall(("adw_window_title_get_type", libadwaita), GType, ()) end end + begin + function GLib.signalnames(::Type{AdwWindowTitle}) + signalnames(supertype(AdwWindowTitle)) + end + end begin gtype_wrapper_cache_init() = begin merge!(GLib.gtype_wrappers, gtype_wrapper_cache) end end + function AdwAboutDialog(; kwargs...) + obj = G_.AboutDialog_new() + GLib.setproperties!(obj; kwargs...) + obj + end + function AdwAboutDialog(_resource_path::Union{AbstractString, Symbol}, _release_notes_version::Maybe(Union{AbstractString, Symbol}); kwargs...) + obj = G_.AboutDialog_new_from_appdata(_resource_path, _release_notes_version) + GLib.setproperties!(obj; kwargs...) + obj + end function AdwAboutWindow(; kwargs...) obj = G_.AboutWindow_new() GLib.setproperties!(obj; kwargs...) obj end + function AdwAboutWindow(_resource_path::Union{AbstractString, Symbol}, _release_notes_version::Maybe(Union{AbstractString, Symbol}); kwargs...) + obj = G_.AboutWindow_new_from_appdata(_resource_path, _release_notes_version) + GLib.setproperties!(obj; kwargs...) + obj + end function AdwActionRow(; kwargs...) obj = G_.ActionRow_new() GLib.setproperties!(obj; kwargs...) obj end + function AdwAlertDialog(_heading::Maybe(Union{AbstractString, Symbol}), _body::Maybe(Union{AbstractString, Symbol}); kwargs...) + obj = G_.AlertDialog_new(_heading, _body) + GLib.setproperties!(obj; kwargs...) + obj + end function AdwApplication(_application_id::Maybe(Union{AbstractString, Symbol}), _flags; kwargs...) obj = G_.Application_new(_application_id, _flags) GLib.setproperties!(obj; kwargs...) @@ -947,18 +1779,28 @@ $(Expr(:toplevel, quote GLib.setproperties!(obj; kwargs...) obj end + function AdwBanner(_title::Union{AbstractString, Symbol}; kwargs...) + obj = G_.Banner_new(_title) + GLib.setproperties!(obj; kwargs...) + obj + end function AdwBin(; kwargs...) obj = G_.Bin_new() GLib.setproperties!(obj; kwargs...) obj end + function AdwBreakpointBin(; kwargs...) + obj = G_.BreakpointBin_new() + GLib.setproperties!(obj; kwargs...) + obj + end function AdwButtonContent(; kwargs...) obj = G_.ButtonContent_new() GLib.setproperties!(obj; kwargs...) obj end - function AdwCallbackAnimationTarget(_callback::Function, _user_data::Maybe(Nothing), _destroy::Function) - G_.CallbackAnimationTarget_new(_callback, _user_data, _destroy) + function AdwCallbackAnimationTarget(_callback::Function, _destroy::Function) + G_.CallbackAnimationTarget_new(_callback, _destroy) end function AdwCarousel(; kwargs...) obj = G_.Carousel_new() @@ -995,6 +1837,11 @@ $(Expr(:toplevel, quote GLib.setproperties!(obj; kwargs...) obj end + function AdwDialog(; kwargs...) + obj = G_.Dialog_new() + GLib.setproperties!(obj; kwargs...) + obj + end function AdwEntryRow(; kwargs...) obj = G_.EntryRow_new() GLib.setproperties!(obj; kwargs...) @@ -1030,9 +1877,39 @@ $(Expr(:toplevel, quote GLib.setproperties!(obj; kwargs...) obj end + function AdwNavigationPage(_child::GtkWidget, _title::Union{AbstractString, Symbol}; kwargs...) + obj = G_.NavigationPage_new(_child, _title) + GLib.setproperties!(obj; kwargs...) + obj + end + function AdwNavigationPage(_child::GtkWidget, _title::Union{AbstractString, Symbol}, _tag::Union{AbstractString, Symbol}; kwargs...) + obj = G_.NavigationPage_new_with_tag(_child, _title, _tag) + GLib.setproperties!(obj; kwargs...) + obj + end + function AdwNavigationSplitView(; kwargs...) + obj = G_.NavigationSplitView_new() + GLib.setproperties!(obj; kwargs...) + obj + end + function AdwNavigationView(; kwargs...) + obj = G_.NavigationView_new() + GLib.setproperties!(obj; kwargs...) + obj + end + function AdwOverlaySplitView(; kwargs...) + obj = G_.OverlaySplitView_new() + GLib.setproperties!(obj; kwargs...) + obj + end function AdwPasswordEntryRow() G_.PasswordEntryRow_new() end + function AdwPreferencesDialog(; kwargs...) + obj = G_.PreferencesDialog_new() + GLib.setproperties!(obj; kwargs...) + obj + end function AdwPreferencesGroup(; kwargs...) obj = G_.PreferencesGroup_new() GLib.setproperties!(obj; kwargs...) @@ -1063,6 +1940,16 @@ $(Expr(:toplevel, quote GLib.setproperties!(obj; kwargs...) obj end + function AdwSpinRow(_adjustment::Maybe(GtkAdjustment), _climb_rate::Real, _digits::Integer; kwargs...) + obj = G_.SpinRow_new(_adjustment, _climb_rate, _digits) + GLib.setproperties!(obj; kwargs...) + obj + end + function AdwSpinRow(_min::Real, _max::Real, _step::Real; kwargs...) + obj = G_.SpinRow_new_with_range(_min, _max, _step) + GLib.setproperties!(obj; kwargs...) + obj + end function AdwSplitButton(; kwargs...) obj = G_.SplitButton_new() GLib.setproperties!(obj; kwargs...) @@ -1088,11 +1975,26 @@ $(Expr(:toplevel, quote GLib.setproperties!(obj; kwargs...) obj end + function AdwSwitchRow(; kwargs...) + obj = G_.SwitchRow_new() + GLib.setproperties!(obj; kwargs...) + obj + end function AdwTabBar(; kwargs...) obj = G_.TabBar_new() GLib.setproperties!(obj; kwargs...) obj end + function AdwTabButton(; kwargs...) + obj = G_.TabButton_new() + GLib.setproperties!(obj; kwargs...) + obj + end + function AdwTabOverview(; kwargs...) + obj = G_.TabOverview_new() + GLib.setproperties!(obj; kwargs...) + obj + end function AdwTabView(; kwargs...) obj = G_.TabView_new() GLib.setproperties!(obj; kwargs...) @@ -1113,6 +2015,11 @@ $(Expr(:toplevel, quote GLib.setproperties!(obj; kwargs...) obj end + function AdwToolbarView(; kwargs...) + obj = G_.ToolbarView_new() + GLib.setproperties!(obj; kwargs...) + obj + end function AdwViewStack(; kwargs...) obj = G_.ViewStack_new() GLib.setproperties!(obj; kwargs...) @@ -1143,6 +2050,6 @@ $(Expr(:toplevel, quote GLib.setproperties!(obj; kwargs...) obj end - export AdwSpringParams, AdwSwipeable, AdwAboutWindow, AdwAboutWindowLeaf, AdwActionRow, AdwActionRowLeaf, AdwAnimation, AdwAnimationTarget, AdwApplication, AdwApplicationLeaf, AdwApplicationWindow, AdwApplicationWindowLeaf, AdwAvatar, AdwAvatarLeaf, AdwBin, AdwBinLeaf, AdwButtonContent, AdwButtonContentLeaf, AdwCallbackAnimationTarget, AdwCallbackAnimationTargetLeaf, AdwCarousel, AdwCarouselLeaf, AdwCarouselIndicatorDots, AdwCarouselIndicatorDotsLeaf, AdwCarouselIndicatorLines, AdwCarouselIndicatorLinesLeaf, AdwClamp, AdwClampLeaf, AdwClampLayout, AdwClampLayoutLeaf, AdwClampScrollable, AdwClampScrollableLeaf, AdwComboRow, AdwComboRowLeaf, AdwEntryRow, AdwEntryRowLeaf, AdwEnumListItem, AdwEnumListItemLeaf, AdwEnumListModel, AdwEnumListModelLeaf, AdwExpanderRow, AdwExpanderRowLeaf, AdwFlap, AdwFlapLeaf, AdwHeaderBar, AdwHeaderBarLeaf, AdwLeaflet, AdwLeafletLeaf, AdwLeafletPage, AdwLeafletPageLeaf, AdwMessageDialog, AdwMessageDialogLeaf, AdwPasswordEntryRow, AdwPasswordEntryRowLeaf, AdwPreferencesGroup, AdwPreferencesGroupLeaf, AdwPreferencesPage, AdwPreferencesPageLeaf, AdwPreferencesRow, AdwPreferencesRowLeaf, AdwPreferencesWindow, AdwPreferencesWindowLeaf, AdwPropertyAnimationTarget, AdwPropertyAnimationTargetLeaf, AdwSplitButton, AdwSplitButtonLeaf, AdwSpringAnimation, AdwSpringAnimationLeaf, AdwSqueezer, AdwSqueezerLeaf, AdwSqueezerPage, AdwSqueezerPageLeaf, AdwStatusPage, AdwStatusPageLeaf, AdwStyleManager, AdwStyleManagerLeaf, AdwSwipeTracker, AdwSwipeTrackerLeaf, AdwTabBar, AdwTabBarLeaf, AdwTabPage, AdwTabPageLeaf, AdwTabView, AdwTabViewLeaf, AdwTimedAnimation, AdwTimedAnimationLeaf, AdwToast, AdwToastLeaf, AdwToastOverlay, AdwToastOverlayLeaf, AdwViewStack, AdwViewStackLeaf, AdwViewStackPage, AdwViewStackPageLeaf, AdwViewSwitcher, AdwViewSwitcherLeaf, AdwViewSwitcherBar, AdwViewSwitcherBarLeaf, AdwViewSwitcherTitle, AdwViewSwitcherTitleLeaf, AdwWindow, AdwWindowLeaf, AdwWindowTitle, AdwWindowTitleLeaf + export AdwSpringParams, AdwSwipeable, AdwAboutDialog, AdwAboutDialogLeaf, AdwAboutWindow, AdwAboutWindowLeaf, AdwActionRow, AdwActionRowLeaf, AdwAlertDialog, AdwAlertDialogLeaf, AdwAnimation, AdwAnimationTarget, AdwApplication, AdwApplicationLeaf, AdwApplicationWindow, AdwApplicationWindowLeaf, AdwAvatar, AdwAvatarLeaf, AdwBanner, AdwBannerLeaf, AdwBin, AdwBinLeaf, AdwBreakpointBin, AdwBreakpointBinLeaf, AdwButtonContent, AdwButtonContentLeaf, AdwCallbackAnimationTarget, AdwCallbackAnimationTargetLeaf, AdwCarousel, AdwCarouselLeaf, AdwCarouselIndicatorDots, AdwCarouselIndicatorDotsLeaf, AdwCarouselIndicatorLines, AdwCarouselIndicatorLinesLeaf, AdwClamp, AdwClampLeaf, AdwClampLayout, AdwClampLayoutLeaf, AdwClampScrollable, AdwClampScrollableLeaf, AdwComboRow, AdwComboRowLeaf, AdwDialog, AdwDialogLeaf, AdwEntryRow, AdwEntryRowLeaf, AdwEnumListItem, AdwEnumListItemLeaf, AdwEnumListModel, AdwEnumListModelLeaf, AdwExpanderRow, AdwExpanderRowLeaf, AdwFlap, AdwFlapLeaf, AdwHeaderBar, AdwHeaderBarLeaf, AdwLeaflet, AdwLeafletLeaf, AdwLeafletPage, AdwLeafletPageLeaf, AdwMessageDialog, AdwMessageDialogLeaf, AdwNavigationPage, AdwNavigationPageLeaf, AdwNavigationSplitView, AdwNavigationSplitViewLeaf, AdwNavigationView, AdwNavigationViewLeaf, AdwOverlaySplitView, AdwOverlaySplitViewLeaf, AdwPasswordEntryRow, AdwPasswordEntryRowLeaf, AdwPreferencesDialog, AdwPreferencesDialogLeaf, AdwPreferencesGroup, AdwPreferencesGroupLeaf, AdwPreferencesPage, AdwPreferencesPageLeaf, AdwPreferencesRow, AdwPreferencesRowLeaf, AdwPreferencesWindow, AdwPreferencesWindowLeaf, AdwPropertyAnimationTarget, AdwPropertyAnimationTargetLeaf, AdwSpinRow, AdwSpinRowLeaf, AdwSplitButton, AdwSplitButtonLeaf, AdwSpringAnimation, AdwSpringAnimationLeaf, AdwSqueezer, AdwSqueezerLeaf, AdwSqueezerPage, AdwSqueezerPageLeaf, AdwStatusPage, AdwStatusPageLeaf, AdwStyleManager, AdwStyleManagerLeaf, AdwSwipeTracker, AdwSwipeTrackerLeaf, AdwSwitchRow, AdwSwitchRowLeaf, AdwTabBar, AdwTabBarLeaf, AdwTabButton, AdwTabButtonLeaf, AdwTabOverview, AdwTabOverviewLeaf, AdwTabPage, AdwTabPageLeaf, AdwTabView, AdwTabViewLeaf, AdwTimedAnimation, AdwTimedAnimationLeaf, AdwToast, AdwToastLeaf, AdwToastOverlay, AdwToastOverlayLeaf, AdwToolbarView, AdwToolbarViewLeaf, AdwViewStack, AdwViewStackLeaf, AdwViewStackPage, AdwViewStackPageLeaf, AdwViewStackPages, AdwViewStackPagesLeaf, AdwViewSwitcher, AdwViewSwitcherLeaf, AdwViewSwitcherBar, AdwViewSwitcherBarLeaf, AdwViewSwitcherTitle, AdwViewSwitcherTitleLeaf, AdwWindow, AdwWindowLeaf, AdwWindowTitle, AdwWindowTitleLeaf end)) end diff --git a/GI/src/GLibBase/GLibBase.jl b/GI/src/GLibBase/GLibBase.jl index 3d6e293e..e8498439 100644 --- a/GI/src/GLibBase/GLibBase.jl +++ b/GI/src/GLibBase/GLibBase.jl @@ -15,16 +15,6 @@ export GInterface, GType, GObject, GBoxed, GTypeInstance export GEnum, GError, GValue, g_type export GHashTable, GByteArray, GArray, GPtrArray export GList, _GSList, _GList -export cfunction_ - - -cfunction_(@nospecialize(f), r, a::Tuple) = cfunction_(f, r, Tuple{a...}) - -@generated function cfunction_(f, R::Type{rt}, A::Type{at}) where {rt, at<:Tuple} - quote - @cfunction($(Expr(:$,:f)), $rt, ($(at.parameters...),)) - end -end # local function, handles Symbol and makes UTF8-strings easier const AbstractStringLike = Union{AbstractString, Symbol} @@ -33,7 +23,6 @@ bytestring(s::Symbol) = s bytestring(s::Ptr{UInt8}) = s == C_NULL ? nothing : unsafe_string(s) # bytestring(s::Ptr{UInt8}, own::Bool=false) = unsafe_string(s) -g_malloc(s::Integer) = ccall((:g_malloc, libglib), Ptr{Nothing}, (Csize_t,), s) g_free(p::Ptr) = ccall((:g_free, libglib), Nothing, (Ptr{Nothing},), p) gtkdoc_const_url(ns,name)="https://docs.gtk.org/$(ns)/const.$(name).html" diff --git a/GI/src/GLibBase/gtype.jl b/GI/src/GLibBase/gtype.jl index bdeea0f6..4461e1e7 100644 --- a/GI/src/GLibBase/gtype.jl +++ b/GI/src/GLibBase/gtype.jl @@ -57,7 +57,6 @@ end g_isa(gtyp::GType, is_a_type::GType) = ccall((:g_type_is_a, libgobject), Cint, (GType, GType), gtyp, is_a_type) != 0 g_type_name(g_type::GType) = Symbol(bytestring(ccall((:g_type_name, libgobject), Ptr{UInt8}, (GType,), g_type))) -g_type_test_flags(g_type::GType, flag) = ccall((:g_type_test_flags, libgobject), Bool, (GType, GEnum), g_type, flag) const G_TYPE_FLAG_CLASSED = 1 << 0 const G_TYPE_FLAG_INSTANTIATABLE = 1 << 1 const G_TYPE_FLAG_DERIVABLE = 1 << 2 diff --git a/GI/src/giexport.jl b/GI/src/giexport.jl index 6aafd2f5..77a27566 100644 --- a/GI/src/giexport.jl +++ b/GI/src/giexport.jl @@ -120,6 +120,9 @@ function struct_exprs!(exprs,exports,ns,structs=nothing;print_summary=true,exclu end push!(exports.args, get_full_name(ssi)) length(fields)>0 && push!(exports.args,get_struct_name(ssi,false)) + if length(fields)>0 && !in(name, import_as_opaque) + push!(exports.args, structptrlike(ssi)) + end end if print_summary @@ -168,6 +171,9 @@ function all_struct_exprs!(exprs,exports,ns;print_summary=true,excludelist=[],co push!(exprs, decl(ssi,in(name,import_as_opaque))) push!(exports.args, get_full_name(ssi)) + if length(fields)>0 + push!(exports.args, structptrlike(ssi)) + end push!(loaded, name) length(fields)>0 && push!(exports.args,get_struct_name(ssi,false)) end diff --git a/GI/src/giimport.jl b/GI/src/giimport.jl index 0f247c48..ed72f614 100644 --- a/GI/src/giimport.jl +++ b/GI/src/giimport.jl @@ -86,11 +86,14 @@ function decl(structinfo::GIStructInfo,force_opaque=false) gstructname = get_full_name(structinfo) gtype=get_g_type(structinfo) isboxed = GLib.g_isa(gtype,GLib.g_type(GBoxed)) + ustructname=get_struct_name(structinfo,force_opaque) + opaque = force_opaque || isopaque(structinfo) + ctypename = opaque ? :GBoxed : :(Union{GBoxed,$ustructname}) exprs=Expr[] if isboxed fin = quote $(unblock(typeinit_def(structinfo,gstructname))) - function $gstructname(ref::Ptr{T}, own::Bool = false) where {T <: GBoxed} + function $gstructname(ref::Ptr{T}, own::Bool = false) where {T <: $ctypename} #println("constructing ",$(QuoteNode(gstructname)), " ",own) x = new(ref) if own @@ -105,8 +108,7 @@ function decl(structinfo::GIStructInfo,force_opaque=false) end end conv=nothing - opaque = force_opaque || isopaque(structinfo) - ustructname=get_struct_name(structinfo,force_opaque) + structlike = Symbol(gstructname,:Like) if !opaque fieldsexpr=Expr[] for field in get_fields(structinfo) @@ -123,6 +125,12 @@ function decl(structinfo::GIStructInfo,force_opaque=false) push!(exprs,ustruc) conv = quote unsafe_convert(::Type{Ptr{$ustructname}}, box::$gstructname) = convert(Ptr{$ustructname}, box.handle) + convert(::Type{$gstructname}, p::Ptr{$ustructname}, owns = false) = $gstructname(p, owns) + const $structlike = Union{Ref{$ustructname},$gstructname} + end + else + conv = quote + const $structlike = $gstructname end end decl = isboxed ? :($gstructname <: GBoxed) : gstructname @@ -499,12 +507,13 @@ function typename(info::GIStructInfo) Symbol(GLib.g_type_name(g_type)) end end +structptrlike(info::GIStructInfo) = Symbol(get_full_name(info),:Like) function extract_type(typeinfo::GITypeInfo, info::GIStructInfo) name = typename(info) sname = get_struct_name(info) if is_pointer(typeinfo) fname = get_full_name(info) - tname = isopaque(info) ? fname : :(Union{$fname,Ref{$sname}}) + tname = isopaque(info) ? fname : structptrlike(info) TypeDesc(info,tname,typename(info),:(Ptr{$sname})) else TypeDesc(info,sname,sname,sname) @@ -515,7 +524,7 @@ function extract_type(typeinfo::Type{InstanceType}, info::GIStructInfo) sname = get_struct_name(info) if is_pointer(typeinfo) fname = get_full_name(info) - tname = isopaque(info) ? fname : :(Union{$fname,Ref{$sname}}) + tname = isopaque(info) ? fname : structptrlike(info) TypeDesc(info,tname,typename(info),:(Ptr{$sname})) else TypeDesc(info,sname,sname,sname) @@ -799,7 +808,7 @@ function extract_type(typeinfo::GITypeInfo, basetype::Type{T}) where {T<:GBoxed} name = get_full_name(interf_info) sname = get_struct_name(interf_info) p = is_pointer(typeinfo) - jarg = (name != sname ? :(Union{$name,Ref{$sname}}) : name) + jarg = (name != sname ? structptrlike(interf_info) : name) ctype = is_pointer(typeinfo) ? :(Ptr{$sname}) : sname TypeDesc{Type{GBoxed}}(GBoxed, jarg, name, ctype) end diff --git a/GI/src/girepo.jl b/GI/src/girepo.jl index efffe907..28ad398b 100644 --- a/GI/src/girepo.jl +++ b/GI/src/girepo.jl @@ -26,7 +26,6 @@ function info_unref(info::GIInfo) info.handle = C_NULL end -convert(::Type{Ptr{GIBaseInfo}},w::GIInfo) = w.handle unsafe_convert(::Type{Ptr{GIBaseInfo}},w::GIInfo) = w.handle const GIInfoTypesShortNames = (:Invalid, :Function, :Callback, :Struct, :Boxed, :Enum, @@ -115,13 +114,7 @@ struct GINamespace new(namespace) end end -convert(::Type{Symbol}, ns::GINamespace) = ns.name convert(::Type{Cstring}, ns::GINamespace) = ns.name -convert(::Type{Ptr{UInt8}}, ns::GINamespace) = convert(Ptr{UInt8}, ns.name) -unsafe_convert(::Type{Symbol}, ns::GINamespace) = ns.name -unsafe_convert(::Type{Ptr{UInt8}}, ns::GINamespace) = convert(Ptr{UInt8}, ns.name) - -Base.:(==)(a::GINamespace, b::GINamespace) = (a.name === b.name) function gi_require(namespace::Symbol, version = nothing) if isnothing(version) diff --git a/Project.toml b/Project.toml index b390b5f9..98d7b22c 100644 --- a/Project.toml +++ b/Project.toml @@ -1,6 +1,6 @@ name = "Gtk4" uuid = "9db2cae5-386f-4011-9d63-a5602296539b" -version = "0.6.9" +version = "0.7.0" [deps] BitFlags = "d1d4a3ce-64b1-5f1a-9ba4-7e7e69966f35" @@ -38,7 +38,7 @@ Glib_jll = "2.78.0" Graphene_jll = "1.10" Graphics = "1" JLLWrappers = "1.4.0" -Libdl = "1.6" +Libdl = "1.10" libpng_jll = "<1.6.42" Librsvg_jll = "2.54" Pango_jll = "1.54" @@ -49,4 +49,4 @@ Xorg_xkeyboard_config_jll = "2.27.0" adwaita_icon_theme_jll = "3,43" gdk_pixbuf_jll = "2.42.0" hicolor_icon_theme_jll = "0.17.0" -julia = "1.6" +julia = "1.10" diff --git a/docs/src/doc/reference.md b/docs/src/doc/reference.md index b9d7f2e8..9f040bfb 100644 --- a/docs/src/doc/reference.md +++ b/docs/src/doc/reference.md @@ -52,8 +52,8 @@ Gtk4.selected_string ## Dialogs ```@docs -Gtk4.ask_dialog Gtk4.info_dialog +Gtk4.ask_dialog Gtk4.input_dialog Gtk4.open_dialog Gtk4.save_dialog diff --git a/docs/src/manual/dialogs.md b/docs/src/manual/dialogs.md index 99c73645..225710d5 100644 --- a/docs/src/manual/dialogs.md +++ b/docs/src/manual/dialogs.md @@ -1,25 +1,25 @@ # Dialogs -Dialogs are transient windows that show information or ask the user for information. +Dialogs are transient windows that show messages or ask the user for information. !!! note "Example" Some of the code on this page can be found in "dialogs.jl" in the "example" subdirectory. !!! tip "Creating dialogs in callbacks" - When creating dialogs in signal or action callbacks, you have to use the methods that take a function as the first argument (equivalently the `do` syntax). + When creating dialogs in signal or action callbacks, you must use the methods that take a function as the first argument (equivalently the `do` syntax). ## Message dialogs -Gtk4.jl supports `GtkMessageDialog` and provides several convenience functions: `info_dialog`, `ask_dialog`, `warn_dialog`, and `error_dialog`. Each takes a string for a message to show and an optional parent container, and returns nothing, except for `ask_dialog` which returns `true` if the user clicks the button corresponding to yes. +Gtk4.jl supports `GtkAlertDialog` and wraps it in convenience functions `info_dialog` and `ask_dialog`. +Each takes a string for a message to show and an optional parent container. For all dialog convenience functions, there are two ways of using them. For use in the REPL or an interactive script, the following forms can be used: ```julia info_dialog("Julia rocks!") ask_dialog("Do you like chocolate ice cream?", "Not at all", "I like it") && println("That's my favorite too.") -warn_dialog("Oops!... I did it again") ``` -These take an optional argument `timeout` (in seconds) that can be used to make the dialog disappear after a certain time. +Note that `ask_dialog` returns `true` if the user clicks the button corresponding to yes. These functions take an optional argument `timeout` (in seconds) that can be used to make the dialog disappear after a certain time. In callbacks (for example when a user clicks a button in a GUI), you _must_ use a different form, which takes a callback as the first argument that will be called when the user closes the dialog. A full example: ```julia @@ -31,9 +31,9 @@ function on_click(b) end signal_connect(on_click, b, "clicked") ``` -If you are using these functions in the context of a GUI, you should set the third argument of `info_dialog`, `parent`, to be the top-level window. Otherwise, for standalone usage in scripts, do not set it. +If you are using these functions in the context of a GUI, you should set the third argument of `info_dialog`, `parent`, to be the top-level window. -The callback can alternatively be constructed using Julia's `do` syntax: +The callback function can alternatively be constructed using Julia's `do` syntax: ```julia info_dialog("Julia rocks!", win) do println("message received") @@ -76,18 +76,7 @@ open_dialog(f, "Pick a file to open", parent; start_folder = "/data") ``` The same syntax works for `save_dialog`. -### Filters -Filters can be used to limit the type of files that the user can pick. Filters can be specified as a Tuple or Vector. -A filter can be specified as a string, in which case it specifies a globbing pattern, for example `"*.png"`. -You can specify multiple match types for a single filter by separating the patterns with a comma, for example `"*.png,*.jpg"`. -You can alternatively specify MIME types, or if no specification is provided it defaults to types supported by `GdkPixbuf`. -The generic specification of a filter is -```julia -GtkFileFilter(pattern = "", mimetype = "") -``` -A human-readable name can optionally be provided using a keyword argument. - -If on the other hand you want to choose a folder instead of a file, use `select_folder = true` in `open_dialog`: +If you want to choose a folder instead of a file, use `select_folder = true` in `open_dialog`: ```julia dir=Ref{String}() open_dialog("Select Dataset Folder"; select_folder = true) do name @@ -99,6 +88,13 @@ if isdir(dir[]) end ``` -## Custom dialogs - -TODO +### Filters +Filters can be used to limit the type of files that the user can pick. Filters can be specified as a Tuple or Vector. +A filter can be specified as a string, in which case it specifies a globbing pattern, for example `"*.png"`. +You can specify multiple match types for a single filter by separating the patterns with a comma, for example `"*.png,*.jpg"`. +You can alternatively specify MIME types, or if no specification is provided it defaults to types supported by `GdkPixbuf`. +The generic specification of a filter is +```julia +GtkFileFilter(pattern = "", mimetype = "") +``` +A human-readable name can optionally be provided using a keyword argument. diff --git a/examples/HDF5Viewer/Project.toml b/examples/HDF5Viewer/Project.toml index d9c358b1..2570cd88 100644 --- a/examples/HDF5Viewer/Project.toml +++ b/examples/HDF5Viewer/Project.toml @@ -8,5 +8,5 @@ HDF5 = "f67ccb44-e63f-5c2f-98bd-6dc0ccc4ba2f" PrecompileTools = "aea7be01-6a6a-4083-8856-8a6e6704d82a" [compat] -Gtk4 = "0.6" +Gtk4 = "0.7" diff --git a/examples/README.md b/examples/README.md index 959c7610..5a648544 100644 --- a/examples/README.md +++ b/examples/README.md @@ -6,6 +6,7 @@ - `css-style.jl` shows how to style individual widgets using CSS classes. - `dialogs.jl` demonstrates various types of dialogs. - `show_image.jl` demonstrates how to show a static image using `GtkPicture` and how to copy an image to the clipboard. +- `word_counter.jl` is a minimal example using `GtkTextView`. ## Drawing - `canvas.jl` demonstrates use of `GtkCanvas`, which allows drawing with [Cairo](https://github.com/JuliaGraphics/Cairo.jl). Also shows how to change the cursor when it's over a certain widget. Adapted from an example in the Gtk.jl manual. diff --git a/examples/word_counter.jl b/examples/word_counter.jl new file mode 100644 index 00000000..8e9458f5 --- /dev/null +++ b/examples/word_counter.jl @@ -0,0 +1,20 @@ +using Gtk4 + +win = GtkWindow("Word counter") + +b = GtkBox(:v) +tv = GtkTextView(; vexpand = true) +l = GtkLabel("0 characters, 0 words, 0 lines") +push!(b, tv) +Gtk4.gutter(tv, :bottom, l) + +signal_connect(tv.buffer, "changed") do tb + charcount = length(tb) + txt = tb.text + wordcount = length(split(txt)) + linecount = length(split(txt,"\n")) + l.label = "$charcount characters, $wordcount words, $linecount lines" +end + +win[] = b +show(win) diff --git a/gen/gen_adwaita.jl b/gen/gen_adwaita.jl index a1b13b0b..969479fe 100644 --- a/gen/gen_adwaita.jl +++ b/gen/gen_adwaita.jl @@ -1,28 +1,15 @@ using GI -toplevel, exprs, exports = GI.output_exprs() - ns = GINamespace(:Adw,"1") path="../Adwaita/src/gen" -## constants, enums, and flags, put in a "Constants" submodule - -const_mod = Expr(:block) - -const_exports = Expr(:export) - -GI.all_const_exprs!(const_mod, const_exports, ns) - -push!(exprs, const_mod) - -## export constants, enums, and flags code -GI.write_to_file(path,"adw_consts",toplevel) +GI.export_consts!(ns, path, "adw"; export_constants = false) ## structs toplevel, exprs, exports = GI.output_exprs() -struct_skiplist=Symbol[] +struct_skiplist=[:BreakpointCondition] first_list=[] GI.struct_cache_expr!(exprs) @@ -30,41 +17,20 @@ GI.struct_exprs!(exprs,exports,ns,first_list) struct_skiplist=vcat(first_list,struct_skiplist) -struct_skiplist,c = GI.all_struct_exprs!(exprs,exports,ns;excludelist=struct_skiplist, constructor_skiplist=[:new_full]) +struct_skiplist,c = GI.all_struct_exprs!(exprs,exports,ns;excludelist=struct_skiplist, constructor_skiplist=[:new_full], exclude_deprecated=false) ## objects GI.all_interfaces!(exprs,exports,ns) -GI.all_objects!(exprs,exports,ns) +obj_skiplist=[:Breakpoint] +GI.all_objects!(exprs,exports,ns; skiplist=obj_skiplist, exclude_deprecated=false) push!(exprs,exports) GI.write_to_file(path,"adw_structs",toplevel) -## struct methods - -toplevel, exprs, exports = GI.output_exprs() - -skiplist=[] - -GI.all_struct_methods!(exprs,ns,print_detailed=true,skiplist=skiplist,struct_skiplist=struct_skiplist) - -## object methods - -skiplist=[:get_expression,:set_expression] - -# skips are to avoid method name collisions -GI.all_object_methods!(exprs,ns;skiplist=skiplist) - -# skips are to avoid method name collisions -GI.all_interface_methods!(exprs,ns) - -GI.write_to_file(path,"adw_methods",toplevel) - -## functions - -toplevel, exprs, exports = GI.output_exprs() +skiplist=[:get_expression,:set_expression,:add_breakpoint,:get_current_breakpoint] -GI.all_functions!(exprs,ns) +GI.export_methods!(ns, path, "adw"; struct_skiplist = struct_skiplist, object_method_skiplist = skiplist, object_skiplist = obj_skiplist, exclude_deprecated=false) -GI.write_to_file(path,"adw_functions",toplevel) +GI.export_functions!(ns, path, "adw"; skiplist=[:breakpoint_condition_parse]) diff --git a/gen/gen_gio.jl b/gen/gen_gio.jl index 12339c61..bc31cad9 100644 --- a/gen/gen_gio.jl +++ b/gen/gen_gio.jl @@ -31,7 +31,7 @@ object_method_skiplist=[:new_for_bus,:export,:add_option_group,:make_pollfd,:get :new_for_bus_sync,:new_sync,:writev,:writev_all,:flatten_tree,:changed_tree,:receive_messages,:send_message,:send_message_with_timeout,:send_messages, :get_channel_binding_data,:lookup_certificates_issued_by,:get_default,:get_unix_fd_list,:set_unix_fd_list,:get_attribute_file_path,:set_attribute_file_path,:get_timeout,:set_timeout] -object_skiplist=vcat(obj_skiplist,[:AppInfoMonitor,:DBusConnection,:DBusMenuModel,:DBusProxy,:DBusMethodInvocation,:IOModule,:SimpleProxyResolver,:UnixMountMonitor,:Task]) +object_skiplist=vcat(obj_skiplist,[:AppInfoMonitor,:DBusConnection,:DBusMenuModel,:DBusProxy,:DBusMethodInvocation,:IOModule,:SimpleProxyResolver,:UnixMountMonitor]) interface_method_skiplist=[:add_action_entries,:get_info,:receive_messages,:send_messages, :writev_nonblocking,:dup_default,:remove_action_entries,:new_build_filenamev] diff --git a/gen/gen_gtk4.jl b/gen/gen_gtk4.jl index ae1b7162..b36107cb 100644 --- a/gen/gen_gtk4.jl +++ b/gen/gen_gtk4.jl @@ -21,7 +21,7 @@ skiplist=[:create_closure,:activate_cell,:event,:start_editing,:filter_keypress, object_skiplist=vcat(object_skiplist,[:CellRenderer,:MnemonicAction,:NeverTrigger,:NothingAction,:PrintJob,:PrintSettings,:RecentManager]) -GI.export_methods!(ns,path,"gtk4"; exclude_deprecated = false, object_method_skiplist = skiplist, object_skiplist = object_skiplist, interface_method_skiplist = [:start_editing, :install_properties], interface_skiplist = [:PrintOperationPreview], struct_skiplist = vcat(struct_skiplist,[:Bitset,:BitsetIter,:BuildableParseContext,:CssSection,:TextIter])) +GI.export_methods!(ns,path,"gtk4"; exclude_deprecated = false, object_method_skiplist = skiplist, object_skiplist = object_skiplist, interface_method_skiplist = [:start_editing, :install_properties], interface_skiplist = [:PrintOperationPreview], struct_skiplist = vcat(struct_skiplist,[:Bitset,:BitsetIter,:BuildableParseContext,:CssSection])) skiplist=[:editable_install_properties,:ordering_from_cmpfunc,:value_set_expression,:value_take_expression] diff --git a/gen/gen_rest.jl b/gen/gen_rest.jl index 61d41de6..52fc0862 100644 --- a/gen/gen_rest.jl +++ b/gen/gen_rest.jl @@ -11,4 +11,4 @@ include("gen_graphene.jl") include("gen_gsk.jl") include("gen_gdk4.jl") include("gen_gtk4.jl") -#include("gen_adwaita.jl") +include("gen_adwaita.jl") diff --git a/src/GLib/GLib.jl b/src/GLib/GLib.jl index 38a659e0..404f9afa 100644 --- a/src/GLib/GLib.jl +++ b/src/GLib/GLib.jl @@ -5,9 +5,9 @@ if isdefined(Base, :Experimental) && isdefined(Base.Experimental, Symbol("@optle end import Base: convert, copy, run, show, size, length, getindex, setindex!, get, - iterate, eltype, isempty, ndims, stride, strides, popfirst!, + iterate, eltype, isempty, popfirst!, empty!, append!, reverse!, pushfirst!, pop!, push!, splice!, insert!, deleteat!, delete!, - sigatomic_begin, sigatomic_end, unsafe_convert, + unsafe_convert, getproperty, setproperty!, propertynames, getindex, setindex!, print, replace import CEnum: @cenum, CEnum import BitFlags: @bitflag, BitFlag @@ -33,7 +33,7 @@ export gtkdoc_const_url, gtkdoc_enum_url, gtkdoc_flags_url, gtkdoc_method_url, gtkdoc_func_url, gtkdoc_struc_url export gtype_wrappers, GVariantDict, GBytes, GVariantType -export GValue, GParamSpec, GTypeModule, _GValue +export GValue, GParamSpec, GTypeModule, _GValue, GValueLike Maybe(T) = Union{T,Nothing} @@ -153,7 +153,7 @@ include("gtype.jl") eval(include("../gen/glib_consts")) -global const lib_version = VersionNumber( +const lib_version = VersionNumber( MAJOR_VERSION, MINOR_VERSION, MICRO_VERSION) diff --git a/src/GLib/gerror.jl b/src/GLib/gerror.jl index 5e10dca3..f52bccf7 100644 --- a/src/GLib/gerror.jl +++ b/src/GLib/gerror.jl @@ -26,6 +26,8 @@ end GErrorException(err::GError) = GErrorException(err.domain, err.code, message(err)) +GError(e::GErrorException) = GError(e.domain, e.code, Base.unsafe_convert(Cstring,e.message)) + function check_err(err::Base.RefValue{Ptr{GError}}) if err[] != C_NULL gerror = GError(err[]) @@ -34,4 +36,3 @@ function check_err(err::Base.RefValue{Ptr{GError}}) throw(ee) end end - diff --git a/src/GLib/gio.jl b/src/GLib/gio.jl index 64af6c51..75150283 100644 --- a/src/GLib/gio.jl +++ b/src/GLib/gio.jl @@ -36,3 +36,17 @@ end cancel(c::GCancellable) = G_.cancel(c) iscancelled(c::GCancellable) = G_.is_cancelled(c) +""" + cancel_after_delay(timeout) + +Creates and returns a `GCancellable` and after `timeout` seconds, cancels it. +""" +function cancel_after_delay(timeout) + cancellable = GCancellable() + if timeout > 0 + Timer(timeout) do timer + cancel(cancellable) + end + end + cancellable +end diff --git a/src/GLib/gtype.jl b/src/GLib/gtype.jl index f3bde02d..2896e628 100644 --- a/src/GLib/gtype.jl +++ b/src/GLib/gtype.jl @@ -224,7 +224,11 @@ _gc_unref(@nospecialize(x), ::Ptr{Nothing}) = gc_unref(x) gc_ref_closure(@nospecialize(cb::Function)) = (invoke(gc_ref, Tuple{Any}, cb), @cfunction(_gc_unref, Nothing, (Any, Ptr{Nothing}))) gc_ref_closure(x::T) where {T} = (gc_ref(x), @cfunction(_gc_unref, Nothing, (Any, Ptr{Nothing}))) -# GLib ref/unref functions -- generally, you shouldn't be calling these +""" + glib_ref(x::Ptr) + +Increments the reference count of a pointer managed by a GLib based library. Generally this function will just call a C function, e.g. `g_object_ref`. Most users will not ever need to use this function. +""" function glib_ref(x::Ptr{GObject}) ccall((:g_object_ref, libgobject), Nothing, (Ptr{GObject},), x) end @@ -234,6 +238,12 @@ function glib_ref(x::GObject) end glib_ref(::Nothing) = nothing gc_unref(p::Ptr{GObject}) = glib_unref(p) + +""" + glib_unref(x::Ptr) + +Decrements the reference count of a pointer managed by a GLib based library. Generally this function will just call a C function, e.g. `g_object_unref`. Most users will not ever need to use this function. +""" function glib_unref(x::Ptr{GObject}) ccall((:g_object_unref, libgobject), Nothing, (Ptr{GObject},), x) end diff --git a/src/GLib/gvalues.jl b/src/GLib/gvalues.jl index b1047a39..ef0696b6 100644 --- a/src/GLib/gvalues.jl +++ b/src/GLib/gvalues.jl @@ -4,6 +4,7 @@ struct GValue field3::UInt64 GValue() = new(0, 0, 0) end +const GValueLike = Union{Ref{GValue},GValue} # This should be a subtype of GBoxed and the above struct should be renamed to _GValue to be consistent with other boxed types const _GValue = GValue Base.zero(::Type{GValue}) = GValue() diff --git a/src/GLib/signals.jl b/src/GLib/signals.jl index 763d4b6a..450393cd 100644 --- a/src/GLib/signals.jl +++ b/src/GLib/signals.jl @@ -290,6 +290,8 @@ mutable struct _GPollFD _GPollFD(fd, ev) = new(fd, ev, 0) end +uv_pollfd::_GPollFD = _GPollFD(0,0) + mutable struct _GSourceFuncs prepare::Ptr{Nothing} check::Ptr{Nothing} @@ -308,7 +310,7 @@ function new_gsource(source_funcs::_GSourceFuncs) gsource end -expiration = UInt64(0) +expiration::UInt64 = UInt64(0) _isempty_workqueue() = isempty(Base.Workqueue) uv_loop_alive(evt) = ccall(:uv_loop_alive, Cint, (Ptr{Nothing},), evt) != 0 @@ -361,7 +363,8 @@ function uv_dispatch(src::Ptr{Nothing}, callback::Ptr{Nothing}, data) return ccall(callback, Cint, (UInt,), data) end -sizeof_gclosure = 0 +sizeof_gclosure::Int = 0 +jlref_quark::UInt32 = 0 function __init__gtype__() global jlref_quark = quark"julia_ref" global sizeof_gclosure = Sys.WORD_SIZE diff --git a/src/Gdk4.jl b/src/Gdk4.jl index 7dea06c4..1d6ab741 100644 --- a/src/Gdk4.jl +++ b/src/Gdk4.jl @@ -5,7 +5,7 @@ keyval(name::AbstractString) = G_.keyval_from_name(name) function GdkRGBA(r,g,b,a = 1.0) s=_GdkRGBA(r,g,b,a) - r=ccall((:gdk_rgba_copy, libgtk4), Ptr{GdkRGBA}, (Ptr{_GdkRGBA},), Ref(s)) + r=ccall((:gdk_rgba_copy, libgtk4), Ptr{_GdkRGBA}, (Ptr{_GdkRGBA},), Ref(s)) GdkRGBA(r) end @@ -18,8 +18,8 @@ function GdkRGBA(rgba::AbstractString) r end -convert(::Type{RGBA}, gcolor::Gtk4._GdkRGBA) = RGBA(gcolor.red, gcolor.green, gcolor.blue, gcolor.alpha) -convert(::Type{Gtk4.GdkRGBA}, color::Colorant) = Gtk4.GdkRGBA(red(color), green(color), blue(color), alpha(color)) +convert(::Type{RGBA}, gcolor::_GdkRGBA) = RGBA(gcolor.red, gcolor.green, gcolor.blue, gcolor.alpha) +convert(::Type{GdkRGBA}, color::Colorant) = GdkRGBA(red(color), green(color), blue(color), alpha(color)) ## GdkCursor @@ -64,28 +64,28 @@ end size(t::GdkTexture) = (G_.get_width(t),G_.get_height(t)) -const color_formats = Dict(ColorTypes.RGB{N0f8}=>Gtk4.MemoryFormat_R8G8B8, - ColorTypes.BGR{N0f8}=>Gtk4.MemoryFormat_B8G8R8, - ColorTypes.RGBA{N0f8}=>Gtk4.MemoryFormat_R8G8B8A8, - ColorTypes.ARGB{N0f8}=>Gtk4.MemoryFormat_A8R8G8B8, - ColorTypes.ABGR{N0f8}=>Gtk4.MemoryFormat_A8B8G8R8, - ColorTypes.BGRA{N0f8}=>Gtk4.MemoryFormat_B8G8R8A8, - ColorTypes.RGB{N0f16}=>Gtk4.MemoryFormat_R16G16B16, - ColorTypes.RGBA{N0f16}=>Gtk4.MemoryFormat_R16G16B16A16, +const color_formats = Dict(ColorTypes.RGB{N0f8}=>MemoryFormat_R8G8B8, + ColorTypes.BGR{N0f8}=>MemoryFormat_B8G8R8, + ColorTypes.RGBA{N0f8}=>MemoryFormat_R8G8B8A8, + ColorTypes.ARGB{N0f8}=>MemoryFormat_A8R8G8B8, + ColorTypes.ABGR{N0f8}=>MemoryFormat_A8B8G8R8, + ColorTypes.BGRA{N0f8}=>MemoryFormat_B8G8R8A8, + ColorTypes.RGB{N0f16}=>MemoryFormat_R16G16B16, + ColorTypes.RGBA{N0f16}=>MemoryFormat_R16G16B16A16, # Available since GTK 4.12 - ColorTypes.Gray{N0f8}=>Gtk4.MemoryFormat_G8, - ColorTypes.Gray{N0f16}=>Gtk4.MemoryFormat_G16, - ColorTypes.GrayA{N0f8}=>Gtk4.MemoryFormat_G8A8, - ColorTypes.GrayA{N0f16}=>Gtk4.MemoryFormat_G16A16, + ColorTypes.Gray{N0f8}=>MemoryFormat_G8, + ColorTypes.Gray{N0f16}=>MemoryFormat_G16, + ColorTypes.GrayA{N0f8}=>MemoryFormat_G8A8, + ColorTypes.GrayA{N0f16}=>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, +const color_formats_premultiplied = Dict(ColorTypes.RGBA{N0f8}=>MemoryFormat_R8G8B8A8_PREMULTIPLIED, + ColorTypes.ARGB{N0f8}=>MemoryFormat_A8R8G8B8_PREMULTIPLIED, + ColorTypes.BGRA{N0f8}=>MemoryFormat_B8G8R8A8_PREMULTIPLIED, + ColorTypes.RGBA{N0f16}=>MemoryFormat_R16G16B16A16_PREMULTIPLIED, # Available since GTK 4.12 - ColorTypes.GrayA{N0f8}=>Gtk4.MemoryFormat_G8A8_PREMULTIPLIED, - ColorTypes.GrayA{N0f16}=>Gtk4.MemoryFormat_G16A16_PREMULTIPLIED, + ColorTypes.GrayA{N0f8}=>MemoryFormat_G8A8_PREMULTIPLIED, + ColorTypes.GrayA{N0f16}=>MemoryFormat_G16A16_PREMULTIPLIED, ) imgformatsupported(img) = eltype(img) in keys(color_formats) @@ -105,7 +105,7 @@ function GdkMemoryTexture(img::AbstractArray, tp = true) error("format not supported") # could also convert the image end img = tp ? img' : img - b=Gtk4.GLib.GBytes(img) + b=GLib.GBytes(img) GdkMemoryTexture(size(img)[1], size(img)[2], f, b, sizeof(eltype(img))*size(img)[1]) end diff --git a/src/GdkPixbufLib.jl b/src/GdkPixbufLib.jl index 946478ba..4920568c 100644 --- a/src/GdkPixbufLib.jl +++ b/src/GdkPixbufLib.jl @@ -59,7 +59,7 @@ let skiplist = [ :file_info ] end end -global const lib_version = VersionNumber( +const lib_version = VersionNumber( PIXBUF_MAJOR, PIXBUF_MINOR, PIXBUF_MICRO) diff --git a/src/Gtk4.jl b/src/Gtk4.jl index 4287d0b4..4552c8e5 100644 --- a/src/Gtk4.jl +++ b/src/Gtk4.jl @@ -2,11 +2,8 @@ module Gtk4 import Base: unsafe_convert, length, size, parent, push!, pushfirst!, insert!, pop!, show, length, setindex!, getindex, iterate, eltype, IteratorSize, - convert, empty!, string, popfirst!, size, delete!, in, close, + convert, empty!, string, popfirst!, size, delete!, in, close, stack, deleteat!, splice!, first, parent, (:), getproperty, setproperty!, copy -@static if VERSION >= v"1.9" - import Base: stack -end import CEnum: @cenum import BitFlags: @bitflag @@ -33,7 +30,7 @@ using Preferences using Reexport @reexport using Graphics import .Graphics: width, height, getgc, scale -import Cairo: destroy, show_text, text, status +import Cairo: destroy, text, status eval(include("gen/gdk4_consts")) eval(include("gen/gdk4_structs")) @@ -68,7 +65,7 @@ end end -import .GLib: set_gtk_property!, get_gtk_property, run, activate, +import .GLib: set_gtk_property!, get_gtk_property, activate, signal_handler_is_connected, signalnames, GListModel, start_main_loop, stop_main_loop @@ -114,7 +111,7 @@ include("tree.jl") include("deprecated.jl") include("basic_exports.jl") -global const lib_version = VersionNumber( +const lib_version = VersionNumber( G_.get_major_version(), G_.get_minor_version(), G_.get_micro_version()) diff --git a/src/Pango/Cairo.jl b/src/Pango/Cairo.jl index d70261cd..8a933cac 100644 --- a/src/Pango/Cairo.jl +++ b/src/Pango/Cairo.jl @@ -4,7 +4,7 @@ using ..GLib import Base: convert, unsafe_convert import CEnum: @cenum, CEnum -import BitFlags: @bitflag, BitFlag +import BitFlags: @bitflag eval(include("../gen/cairo_consts")) eval(include("../gen/cairo_structs")) diff --git a/src/Pango/Pango.jl b/src/Pango/Pango.jl index e0998cf1..686687f4 100644 --- a/src/Pango/Pango.jl +++ b/src/Pango/Pango.jl @@ -4,9 +4,9 @@ using ..GLib using Glib_jll using Pango_jll -import Base: convert, copy, length, getindex, iterate, unsafe_convert +import Base: convert, length, getindex, iterate, unsafe_convert import CEnum: @cenum, CEnum -import BitFlags: @bitflag, BitFlag +import BitFlags: @bitflag eval(include("../gen/pango_consts")) eval(include("../gen/pango_structs")) diff --git a/src/buttons.jl b/src/buttons.jl index 05d6b74d..5fb90db8 100644 --- a/src/buttons.jl +++ b/src/buttons.jl @@ -94,4 +94,3 @@ end GtkPopoverMenuBar(model::GMenu) = G_.PopoverMenuBar_new_from_model(model) menu_model(b::Union{GtkMenuButton,GtkPopoverMenu, GtkPopoverMenuBar}, model) = G_.set_menu_model(b, GMenuModel(model)) -menu_model(b::Union{GtkMenuButton,GtkPopoverMenu, GtkPopoverMenuBar}) = G_.get_menu_model(b) diff --git a/src/cairo.jl b/src/cairo.jl index e531e66f..1e3682fd 100644 --- a/src/cairo.jl +++ b/src/cairo.jl @@ -22,7 +22,7 @@ end function _canvas_on_resize(::Ptr, width, height, canvas) canvas.is_sized = true - if G_.get_realized(canvas) + if isrealized(canvas) _init_canvas!(canvas, width, height) if isa(canvas.resize, Function) diff --git a/src/deprecated.jl b/src/deprecated.jl index c524cf60..cd5aace3 100644 --- a/src/deprecated.jl +++ b/src/deprecated.jl @@ -1,6 +1,47 @@ -GtkAdjustment(spinButton::GtkSpinButton) = G_.get_adjustment(spinButton) -GtkAdjustment(range::GtkRange) = G_.get_adjustment(range) -GtkAdjustment(scale::GtkScaleButton) = G_.get_adjustment(scale) +@deprecate GtkAdjustment(spinButton::GtkSpinButton) adjustment(spinButton::GtkSpinButton) +@deprecate GtkAdjustment(range::GtkRange) adjustment(range::GtkRange) +@deprecate GtkAdjustment(scale::GtkScaleButton) adjustment(scale::GtkScaleButton) setindex!(buffer::GtkEntryBuffer, content::String, ::Type{String}) = G_.set_text(buffer, content, -1) + +## GtkDialog + +function push!(d::GtkDialog, s::AbstractString, response) + G_.add_button(d, s, Int32(response)) + d +end + +function response(widget::GtkDialog, response_id) + G_.response(widget, Int32(response_id)) +end + +function GtkDialog(title::AbstractString, buttons, flags, parent = nothing; kwargs...) + parent = (parent === nothing ? C_NULL : parent) + w = GtkDialogLeaf(ccall((:gtk_dialog_new_with_buttons, libgtk4), Ptr{GObject}, + (Ptr{UInt8}, Ptr{GObject}, Cint, Ptr{Nothing}), + title, parent, flags, C_NULL)) + GLib.setproperties!(w; kwargs...) + for (k, v) in buttons + push!(w, k, v) + end + w +end + +function GtkMessageDialog(message::AbstractString, buttons, flags, typ, parent = nothing; kwargs...) + parent = (parent === nothing ? C_NULL : parent) + w = GtkMessageDialogLeaf(ccall((:gtk_message_dialog_new, libgtk4), Ptr{GObject}, + (Ptr{GObject}, Cuint, Cint, Cint, Ptr{UInt8}), + parent, flags, typ, ButtonsType_NONE, message)) + GLib.setproperties!(w; kwargs...) + for (k, v) in buttons + push!(w, k, v) + end + w +end + +warn_dialog(callback::Function, message::AbstractString, parent = nothing; timeout = -1) = info_dialog(callback, message, parent; timeout = -1) +error_dialog(callback::Function, message::AbstractString, parent = nothing; timeout = -1) = info_dialog(callback, message, parent; timeout = -1) + +@deprecate warn_dialog info_dialog +@deprecate error_dialog info_dialog diff --git a/src/displays.jl b/src/displays.jl index d78b165d..334bd207 100644 --- a/src/displays.jl +++ b/src/displays.jl @@ -40,7 +40,22 @@ pulse(progress::GtkProgressBar) = G_.pulse(progress) ## GtkSpinner +""" + start(spinner::GtkSpinner) + +Start a GtkSpinner widget spinning. The purpose of this widget is to show that some operation is in process. + +Related GTK function: [`gtk_spinner_start`()]($(gtkdoc_method_url("gtk4","Spinner","start"))) +""" start(spinner::GtkSpinner) = G_.start(spinner) + +""" + stop(spinner::GtkSpinner) + +Stop a GtkSpinner. The purpose of this widget is to show that some operation is in process. + +Related GTK function: [`gtk_spinner_stop`()]($(gtkdoc_method_url("gtk4","Spinner","stop"))) +""" stop(spinner::GtkSpinner) = G_.stop(spinner) ## GtkStatusbar diff --git a/src/gen/cairo_structs b/src/gen/cairo_structs index dde900ed..c3c80e2e 100644 --- a/src/gen/cairo_structs +++ b/src/gen/cairo_structs @@ -1,155 +1,185 @@ quote $(Expr(:toplevel, quote const gboxed_types = Any[] - mutable struct cairoContext <: GBoxed - handle::Ptr{cairoContext} - begin - (GLib.g_type(::Type{T}) where T <: cairoContext) = begin - ccall(("cairo_gobject_context_get_type", libcairo_gobject), GType, ()) - end - function cairoContext(ref::Ptr{T}, own::Bool = false) where T <: GBoxed - x = new(ref) - if own - finalizer(x) do x - GLib.delboxed(x) + begin + mutable struct cairoContext <: GBoxed + handle::Ptr{cairoContext} + begin + (GLib.g_type(::Type{T}) where T <: cairoContext) = begin + ccall(("cairo_gobject_context_get_type", libcairo_gobject), GType, ()) end + function cairoContext(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 - x + push!(gboxed_types, cairoContext) end - push!(gboxed_types, cairoContext) end + const cairoContextLike = cairoContext end - mutable struct cairoDevice <: GBoxed - handle::Ptr{cairoDevice} - begin - (GLib.g_type(::Type{T}) where T <: cairoDevice) = begin - ccall(("cairo_gobject_device_get_type", libcairo_gobject), GType, ()) - end - function cairoDevice(ref::Ptr{T}, own::Bool = false) where T <: GBoxed - x = new(ref) - if own - finalizer(x) do x - GLib.delboxed(x) + begin + mutable struct cairoDevice <: GBoxed + handle::Ptr{cairoDevice} + begin + (GLib.g_type(::Type{T}) where T <: cairoDevice) = begin + ccall(("cairo_gobject_device_get_type", libcairo_gobject), GType, ()) end + function cairoDevice(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 - x + push!(gboxed_types, cairoDevice) end - push!(gboxed_types, cairoDevice) end + const cairoDeviceLike = cairoDevice end - mutable struct cairoSurface <: GBoxed - handle::Ptr{cairoSurface} - begin - (GLib.g_type(::Type{T}) where T <: cairoSurface) = begin - ccall(("cairo_gobject_surface_get_type", libcairo_gobject), GType, ()) - end - function cairoSurface(ref::Ptr{T}, own::Bool = false) where T <: GBoxed - x = new(ref) - if own - finalizer(x) do x - GLib.delboxed(x) + begin + mutable struct cairoSurface <: GBoxed + handle::Ptr{cairoSurface} + begin + (GLib.g_type(::Type{T}) where T <: cairoSurface) = begin + ccall(("cairo_gobject_surface_get_type", libcairo_gobject), GType, ()) end + function cairoSurface(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 - x + push!(gboxed_types, cairoSurface) end - push!(gboxed_types, cairoSurface) end + const cairoSurfaceLike = cairoSurface end - mutable struct cairoMatrix - handle::Ptr{cairoMatrix} + begin + mutable struct cairoMatrix + handle::Ptr{cairoMatrix} + end + const cairoMatrixLike = cairoMatrix end - mutable struct cairoPattern <: GBoxed - handle::Ptr{cairoPattern} - begin - (GLib.g_type(::Type{T}) where T <: cairoPattern) = begin - ccall(("cairo_gobject_pattern_get_type", libcairo_gobject), GType, ()) - end - function cairoPattern(ref::Ptr{T}, own::Bool = false) where T <: GBoxed - x = new(ref) - if own - finalizer(x) do x - GLib.delboxed(x) + begin + mutable struct cairoPattern <: GBoxed + handle::Ptr{cairoPattern} + begin + (GLib.g_type(::Type{T}) where T <: cairoPattern) = begin + ccall(("cairo_gobject_pattern_get_type", libcairo_gobject), GType, ()) end + function cairoPattern(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 - x + push!(gboxed_types, cairoPattern) end - push!(gboxed_types, cairoPattern) end + const cairoPatternLike = cairoPattern end - mutable struct cairoRegion <: GBoxed - handle::Ptr{cairoRegion} - begin - (GLib.g_type(::Type{T}) where T <: cairoRegion) = begin - ccall(("cairo_gobject_region_get_type", libcairo_gobject), GType, ()) - end - function cairoRegion(ref::Ptr{T}, own::Bool = false) where T <: GBoxed - x = new(ref) - if own - finalizer(x) do x - GLib.delboxed(x) + begin + mutable struct cairoRegion <: GBoxed + handle::Ptr{cairoRegion} + begin + (GLib.g_type(::Type{T}) where T <: cairoRegion) = begin + ccall(("cairo_gobject_region_get_type", libcairo_gobject), GType, ()) + end + function cairoRegion(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 - x + push!(gboxed_types, cairoRegion) end - push!(gboxed_types, cairoRegion) end + const cairoRegionLike = cairoRegion end - mutable struct cairoFontOptions <: GBoxed - handle::Ptr{cairoFontOptions} - begin - (GLib.g_type(::Type{T}) where T <: cairoFontOptions) = begin - ccall(("cairo_gobject_font_options_get_type", libcairo_gobject), GType, ()) - end - function cairoFontOptions(ref::Ptr{T}, own::Bool = false) where T <: GBoxed - x = new(ref) - if own - finalizer(x) do x - GLib.delboxed(x) + begin + mutable struct cairoFontOptions <: GBoxed + handle::Ptr{cairoFontOptions} + begin + (GLib.g_type(::Type{T}) where T <: cairoFontOptions) = begin + ccall(("cairo_gobject_font_options_get_type", libcairo_gobject), GType, ()) + end + function cairoFontOptions(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 - x + push!(gboxed_types, cairoFontOptions) end - push!(gboxed_types, cairoFontOptions) end + const cairoFontOptionsLike = cairoFontOptions end - mutable struct cairoFontFace <: GBoxed - handle::Ptr{cairoFontFace} - begin - (GLib.g_type(::Type{T}) where T <: cairoFontFace) = begin - ccall(("cairo_gobject_font_face_get_type", libcairo_gobject), GType, ()) - end - function cairoFontFace(ref::Ptr{T}, own::Bool = false) where T <: GBoxed - x = new(ref) - if own - finalizer(x) do x - GLib.delboxed(x) + begin + mutable struct cairoFontFace <: GBoxed + handle::Ptr{cairoFontFace} + begin + (GLib.g_type(::Type{T}) where T <: cairoFontFace) = begin + ccall(("cairo_gobject_font_face_get_type", libcairo_gobject), GType, ()) end + function cairoFontFace(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 - x + push!(gboxed_types, cairoFontFace) end - push!(gboxed_types, cairoFontFace) end + const cairoFontFaceLike = cairoFontFace end - mutable struct cairoScaledFont <: GBoxed - handle::Ptr{cairoScaledFont} - begin - (GLib.g_type(::Type{T}) where T <: cairoScaledFont) = begin - ccall(("cairo_gobject_scaled_font_get_type", libcairo_gobject), GType, ()) - end - function cairoScaledFont(ref::Ptr{T}, own::Bool = false) where T <: GBoxed - x = new(ref) - if own - finalizer(x) do x - GLib.delboxed(x) + begin + mutable struct cairoScaledFont <: GBoxed + handle::Ptr{cairoScaledFont} + begin + (GLib.g_type(::Type{T}) where T <: cairoScaledFont) = begin + ccall(("cairo_gobject_scaled_font_get_type", libcairo_gobject), GType, ()) end + function cairoScaledFont(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 - x + push!(gboxed_types, cairoScaledFont) end - push!(gboxed_types, cairoScaledFont) end + const cairoScaledFontLike = cairoScaledFont end - mutable struct cairoPath - handle::Ptr{cairoPath} + begin + mutable struct cairoPath + handle::Ptr{cairoPath} + end + const cairoPathLike = cairoPath end begin struct _cairoRectangle @@ -164,7 +194,7 @@ $(Expr(:toplevel, quote (GLib.g_type(::Type{T}) where T <: cairoRectangle) = begin ccall(("cairo_gobject_rectangle_get_type", libcairo_gobject), GType, ()) end - function cairoRectangle(ref::Ptr{T}, own::Bool = false) where T <: GBoxed + function cairoRectangle(ref::Ptr{T}, own::Bool = false) where T <: Union{GBoxed, _cairoRectangle} x = new(ref) if own finalizer(x) do x @@ -176,9 +206,15 @@ $(Expr(:toplevel, quote push!(gboxed_types, cairoRectangle) end end - unsafe_convert(::Type{Ptr{_cairoRectangle}}, box::cairoRectangle) = begin - convert(Ptr{_cairoRectangle}, box.handle) - end + begin + unsafe_convert(::Type{Ptr{_cairoRectangle}}, box::cairoRectangle) = begin + convert(Ptr{_cairoRectangle}, box.handle) + end + convert(::Type{cairoRectangle}, p::Ptr{_cairoRectangle}, owns = false) = begin + cairoRectangle(p, owns) + end + const cairoRectangleLike = Union{Ref{_cairoRectangle}, cairoRectangle} + end end begin struct _cairoRectangleInt @@ -193,7 +229,7 @@ $(Expr(:toplevel, quote (GLib.g_type(::Type{T}) where T <: cairoRectangleInt) = begin ccall(("cairo_gobject_rectangle_int_get_type", libcairo_gobject), GType, ()) end - function cairoRectangleInt(ref::Ptr{T}, own::Bool = false) where T <: GBoxed + function cairoRectangleInt(ref::Ptr{T}, own::Bool = false) where T <: Union{GBoxed, _cairoRectangleInt} x = new(ref) if own finalizer(x) do x @@ -205,13 +241,19 @@ $(Expr(:toplevel, quote push!(gboxed_types, cairoRectangleInt) end end - unsafe_convert(::Type{Ptr{_cairoRectangleInt}}, box::cairoRectangleInt) = begin - convert(Ptr{_cairoRectangleInt}, box.handle) - end + begin + unsafe_convert(::Type{Ptr{_cairoRectangleInt}}, box::cairoRectangleInt) = begin + convert(Ptr{_cairoRectangleInt}, box.handle) + end + convert(::Type{cairoRectangleInt}, p::Ptr{_cairoRectangleInt}, owns = false) = begin + cairoRectangleInt(p, owns) + end + const cairoRectangleIntLike = Union{Ref{_cairoRectangleInt}, cairoRectangleInt} + end end gboxed_cache_init() = begin append!(GLib.gboxed_types, gboxed_types) end - export cairoContext, cairoDevice, cairoSurface, cairoMatrix, cairoPattern, cairoRegion, cairoFontOptions, cairoFontFace, cairoScaledFont, cairoPath, cairoRectangle, _cairoRectangle, cairoRectangleInt, _cairoRectangleInt + export cairoContext, cairoDevice, cairoSurface, cairoMatrix, cairoPattern, cairoRegion, cairoFontOptions, cairoFontFace, cairoScaledFont, cairoPath, cairoRectangle, cairoRectangleLike, _cairoRectangle, cairoRectangleInt, cairoRectangleIntLike, _cairoRectangleInt end)) end diff --git a/src/gen/gdk4_functions b/src/gen/gdk4_functions index 2efe59d1..2fd474fd 100644 --- a/src/gen/gdk4_functions +++ b/src/gen/gdk4_functions @@ -1,6 +1,6 @@ quote $(Expr(:toplevel, quote - function cairo_rectangle(_cr::cairoContext, _rectangle::Union{GdkRectangle, Ref{_GdkRectangle}}) + function cairo_rectangle(_cr::cairoContext, _rectangle::GdkRectangleLike) ret = ccall(("gdk_cairo_rectangle", libgtk4), Nothing, (Ptr{cairoContext}, Ptr{_GdkRectangle}), _cr, _rectangle) nothing end @@ -17,7 +17,7 @@ $(Expr(:toplevel, quote ret = ccall(("gdk_cairo_set_source_pixbuf", libgtk4), Nothing, (Ptr{cairoContext}, Ptr{GObject}, Float64, Float64), _cr, _pixbuf, _pixbuf_x, _pixbuf_y) nothing end - function cairo_set_source_rgba(_cr::cairoContext, _rgba::Union{GdkRGBA, Ref{_GdkRGBA}}) + function cairo_set_source_rgba(_cr::cairoContext, _rgba::GdkRGBALike) ret = ccall(("gdk_cairo_set_source_rgba", libgtk4), Nothing, (Ptr{cairoContext}, Ptr{_GdkRGBA}), _cr, _rgba) nothing end @@ -47,7 +47,7 @@ $(Expr(:toplevel, quote ret2 = convert_if_not_null(GdkContentFormats, ret, true) ret2 end - function content_serialize_async(_stream::GOutputStream, _mime_type::Union{AbstractString, Symbol}, _value::Union{GValue, Ref{_GValue}}, _io_priority::Integer, _cancellable::Maybe(GCancellable), _callback::Maybe(Function)) + function content_serialize_async(_stream::GOutputStream, _mime_type::Union{AbstractString, Symbol}, _value::GValueLike, _io_priority::Integer, _cancellable::Maybe(GCancellable), _callback::Maybe(Function)) _cancellable_maybe = nothing_to_null(_cancellable) if _callback === nothing _callback_cfunc = C_NULL diff --git a/src/gen/gdk4_methods b/src/gen/gdk4_methods index 8cdc5f3b..c5d215bd 100644 --- a/src/gen/gdk4_methods +++ b/src/gen/gdk4_methods @@ -50,7 +50,7 @@ $(Expr(:toplevel, quote ret2 = string_or_nothing(ret, false) ret2 end - function print(instance::GdkContentFormats, _string::Union{GString, Ref{_GString}}) + function print(instance::GdkContentFormats, _string::GStringLike) ret = ccall(("gdk_content_formats_print", libgtk4), Nothing, (Ptr{GdkContentFormats}, Ptr{_GString}), instance, _string) nothing end @@ -211,7 +211,7 @@ $(Expr(:toplevel, quote ret = ccall(("gdk_frame_timings_unref", libgtk4), Nothing, (Ptr{GdkFrameTimings},), instance) nothing end - function PopupLayout_new(_anchor_rect::Union{GdkRectangle, Ref{_GdkRectangle}}, _rect_anchor, _surface_anchor) + function PopupLayout_new(_anchor_rect::GdkRectangleLike, _rect_anchor, _surface_anchor) ret = ccall(("gdk_popup_layout_new", libgtk4), Ptr{GdkPopupLayout}, (Ptr{_GdkRectangle}, UInt32, UInt32), _anchor_rect, _rect_anchor, _surface_anchor) ret2 = convert(GdkPopupLayout, ret, true) ret2 @@ -233,7 +233,7 @@ $(Expr(:toplevel, quote end function get_anchor_rect(instance::GdkPopupLayout) ret = ccall(("gdk_popup_layout_get_anchor_rect", libgtk4), Ptr{_GdkRectangle}, (Ptr{GdkPopupLayout},), instance) - ret2 = convert(Union{GdkRectangle, Ref{_GdkRectangle}}, ret, false) + ret2 = convert(GdkRectangleLike, ret, false) ret2 end function get_offset(instance::GdkPopupLayout) @@ -275,7 +275,7 @@ $(Expr(:toplevel, quote ret = ccall(("gdk_popup_layout_set_anchor_hints", libgtk4), Nothing, (Ptr{GdkPopupLayout}, UInt32), instance, _anchor_hints) nothing end - function set_anchor_rect(instance::GdkPopupLayout, _anchor_rect::Union{GdkRectangle, Ref{_GdkRectangle}}) + function set_anchor_rect(instance::GdkPopupLayout, _anchor_rect::GdkRectangleLike) ret = ccall(("gdk_popup_layout_set_anchor_rect", libgtk4), Nothing, (Ptr{GdkPopupLayout}, Ptr{_GdkRectangle}), instance, _anchor_rect) nothing end @@ -299,62 +299,62 @@ $(Expr(:toplevel, quote ret = ccall(("gdk_popup_layout_unref", libgtk4), Nothing, (Ptr{GdkPopupLayout},), instance) nothing end - function copy(instance::Union{GdkRGBA, Ref{_GdkRGBA}}) + function copy(instance::GdkRGBALike) ret = ccall(("gdk_rgba_copy", libgtk4), Ptr{_GdkRGBA}, (Ptr{_GdkRGBA},), instance) - ret2 = convert(Union{GdkRGBA, Ref{_GdkRGBA}}, ret, true) + ret2 = convert(GdkRGBALike, ret, true) ret2 end - function equal(instance::Union{GdkRGBA, Ref{_GdkRGBA}}, _p2::Union{GdkRGBA, Ref{_GdkRGBA}}) + function equal(instance::GdkRGBALike, _p2::GdkRGBALike) ret = ccall(("gdk_rgba_equal", libgtk4), Cint, (Ptr{_GdkRGBA}, Ptr{_GdkRGBA}), instance, _p2) ret2 = convert(Bool, ret) ret2 end - function free(instance::Union{GdkRGBA, Ref{_GdkRGBA}}) + function free(instance::GdkRGBALike) ret = ccall(("gdk_rgba_free", libgtk4), Nothing, (Ptr{_GdkRGBA},), instance) nothing end - function hash(instance::Union{GdkRGBA, Ref{_GdkRGBA}}) + function hash(instance::GdkRGBALike) ret = ccall(("gdk_rgba_hash", libgtk4), UInt32, (Ptr{_GdkRGBA},), instance) ret end - function is_clear(instance::Union{GdkRGBA, Ref{_GdkRGBA}}) + function is_clear(instance::GdkRGBALike) ret = ccall(("gdk_rgba_is_clear", libgtk4), Cint, (Ptr{_GdkRGBA},), instance) ret2 = convert(Bool, ret) ret2 end - function is_opaque(instance::Union{GdkRGBA, Ref{_GdkRGBA}}) + function is_opaque(instance::GdkRGBALike) ret = ccall(("gdk_rgba_is_opaque", libgtk4), Cint, (Ptr{_GdkRGBA},), instance) ret2 = convert(Bool, ret) ret2 end - function parse(instance::Union{GdkRGBA, Ref{_GdkRGBA}}, _spec::Union{AbstractString, Symbol}) + function parse(instance::GdkRGBALike, _spec::Union{AbstractString, Symbol}) ret = ccall(("gdk_rgba_parse", libgtk4), Cint, (Ptr{_GdkRGBA}, Cstring), instance, _spec) ret2 = convert(Bool, ret) ret2 end - function to_string(instance::Union{GdkRGBA, Ref{_GdkRGBA}}) + function to_string(instance::GdkRGBALike) ret = ccall(("gdk_rgba_to_string", libgtk4), Cstring, (Ptr{_GdkRGBA},), instance) ret2 = string_or_nothing(ret, true) ret2 end - function contains_point(instance::Union{GdkRectangle, Ref{_GdkRectangle}}, _x::Integer, _y::Integer) + function contains_point(instance::GdkRectangleLike, _x::Integer, _y::Integer) ret = ccall(("gdk_rectangle_contains_point", libgtk4), Cint, (Ptr{_GdkRectangle}, Int32, Int32), instance, _x, _y) ret2 = convert(Bool, ret) ret2 end - function equal(instance::Union{GdkRectangle, Ref{_GdkRectangle}}, _rect2::Union{GdkRectangle, Ref{_GdkRectangle}}) + function equal(instance::GdkRectangleLike, _rect2::GdkRectangleLike) ret = ccall(("gdk_rectangle_equal", libgtk4), Cint, (Ptr{_GdkRectangle}, Ptr{_GdkRectangle}), instance, _rect2) ret2 = convert(Bool, ret) ret2 end - function intersect(instance::Union{GdkRectangle, Ref{_GdkRectangle}}, _src2::Union{GdkRectangle, Ref{_GdkRectangle}}) + function intersect(instance::GdkRectangleLike, _src2::GdkRectangleLike) m_dest = Ref{_GdkRectangle}() ret = ccall(("gdk_rectangle_intersect", libgtk4), Cint, (Ptr{_GdkRectangle}, Ptr{_GdkRectangle}, Ptr{_GdkRectangle}), instance, _src2, m_dest) ret2 = convert(Bool, ret) _dest = m_dest[] (ret2, _dest) end - function union(instance::Union{GdkRectangle, Ref{_GdkRectangle}}, _src2::Union{GdkRectangle, Ref{_GdkRectangle}}) + function union(instance::GdkRectangleLike, _src2::GdkRectangleLike) m_dest = Ref{_GdkRectangle}() ret = ccall(("gdk_rectangle_union", libgtk4), Nothing, (Ptr{_GdkRectangle}, Ptr{_GdkRectangle}, Ptr{_GdkRectangle}), instance, _src2, m_dest) _dest = m_dest[] @@ -595,7 +595,7 @@ $(Expr(:toplevel, quote err = err_buf() ret = ccall(("gdk_clipboard_read_value_finish", libgtk4), Ptr{_GValue}, (Ptr{GObject}, Ptr{GObject}, Ptr{Ptr{GError}}), instance, _result, err) check_err(err) - ret2 = convert(Union{GValue, Ref{_GValue}}, ret, false) + ret2 = convert(GValueLike, ret, false) ret2 end function set_content(instance::GdkClipboard, _provider::Maybe(GdkContentProvider)) @@ -604,7 +604,7 @@ $(Expr(:toplevel, quote ret2 = convert(Bool, ret) ret2 end - function set(instance::GdkClipboard, _value::Union{GValue, Ref{_GValue}}) + function set(instance::GdkClipboard, _value::GValueLike) ret = ccall(("gdk_clipboard_set_value", libgtk4), Nothing, (Ptr{GObject}, Ptr{_GValue}), instance, _value) nothing end @@ -662,7 +662,7 @@ $(Expr(:toplevel, quote end function get_value(instance::GdkContentDeserializer) ret = ccall(("gdk_content_deserializer_get_value", libgtk4), Ptr{_GValue}, (Ptr{GObject},), instance) - ret2 = convert(Union{GValue, Ref{_GValue}}, ret, false) + ret2 = convert(GValueLike, ret, false) ret2 end function return_error(instance::GdkContentDeserializer, _error) @@ -687,7 +687,7 @@ $(Expr(:toplevel, quote ret2 = GdkContentProviderLeaf(ret, true) ret2 end - function ContentProvider_new_for_value(_value::Union{GValue, Ref{_GValue}}) + function ContentProvider_new_for_value(_value::GValueLike) ret = ccall(("gdk_content_provider_new_for_value", libgtk4), Ptr{GObject}, (Ptr{_GValue},), _value) ret2 = GdkContentProviderLeaf(ret, true) ret2 @@ -776,7 +776,7 @@ $(Expr(:toplevel, quote end function get_value(instance::GdkContentSerializer) ret = ccall(("gdk_content_serializer_get_value", libgtk4), Ptr{_GValue}, (Ptr{GObject},), instance) - ret2 = convert(Union{GValue, Ref{_GValue}}, ret, false) + ret2 = convert(GValueLike, ret, false) ret2 end function return_error(instance::GdkContentSerializer, _error) @@ -1034,7 +1034,7 @@ $(Expr(:toplevel, quote ret2 = convert(GdkClipboard, ret, false) ret2 end - function get_setting(instance::GdkDisplay, _name::Union{AbstractString, Symbol}, _value::Union{GValue, Ref{_GValue}}) + function get_setting(instance::GdkDisplay, _name::Union{AbstractString, Symbol}, _value::GValueLike) ret = ccall(("gdk_display_get_setting", libgtk4), Cint, (Ptr{GObject}, Cstring, Ptr{_GValue}), instance, _name, _value) ret2 = convert(Bool, ret) ret2 @@ -1457,7 +1457,7 @@ $(Expr(:toplevel, quote err = err_buf() ret = ccall(("gdk_drop_read_value_finish", libgtk4), Ptr{_GValue}, (Ptr{GObject}, Ptr{GObject}, Ptr{Ptr{GError}}), instance, _result, err) check_err(err) - ret2 = convert(Union{GValue, Ref{_GValue}}, ret, false) + ret2 = convert(GValueLike, ret, false) ret2 end function status(instance::GdkDrop, _actions, _preferred) diff --git a/src/gen/gdk4_structs b/src/gen/gdk4_structs index abc9e172..ed161c07 100644 --- a/src/gen/gdk4_structs +++ b/src/gen/gdk4_structs @@ -1,116 +1,137 @@ quote $(Expr(:toplevel, quote const gboxed_types = Any[] - mutable struct GdkContentFormats <: GBoxed - handle::Ptr{GdkContentFormats} - begin - (GLib.g_type(::Type{T}) where T <: GdkContentFormats) = begin - ccall(("gdk_content_formats_get_type", libgtk4), GType, ()) - end - function GdkContentFormats(ref::Ptr{T}, own::Bool = false) where T <: GBoxed - x = new(ref) - if own - finalizer(x) do x - GLib.delboxed(x) + begin + mutable struct GdkContentFormats <: GBoxed + handle::Ptr{GdkContentFormats} + begin + (GLib.g_type(::Type{T}) where T <: GdkContentFormats) = begin + ccall(("gdk_content_formats_get_type", libgtk4), GType, ()) + end + function GdkContentFormats(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 - x + push!(gboxed_types, GdkContentFormats) end - push!(gboxed_types, GdkContentFormats) end + const GdkContentFormatsLike = GdkContentFormats end - mutable struct GdkContentFormatsBuilder <: GBoxed - handle::Ptr{GdkContentFormatsBuilder} - begin - (GLib.g_type(::Type{T}) where T <: GdkContentFormatsBuilder) = begin - ccall(("gdk_content_formats_builder_get_type", libgtk4), GType, ()) - end - function GdkContentFormatsBuilder(ref::Ptr{T}, own::Bool = false) where T <: GBoxed - x = new(ref) - if own - finalizer(x) do x - GLib.delboxed(x) + begin + mutable struct GdkContentFormatsBuilder <: GBoxed + handle::Ptr{GdkContentFormatsBuilder} + begin + (GLib.g_type(::Type{T}) where T <: GdkContentFormatsBuilder) = begin + ccall(("gdk_content_formats_builder_get_type", libgtk4), GType, ()) + end + function GdkContentFormatsBuilder(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 - x + push!(gboxed_types, GdkContentFormatsBuilder) end - push!(gboxed_types, GdkContentFormatsBuilder) end + const GdkContentFormatsBuilderLike = GdkContentFormatsBuilder end - mutable struct GdkDmabufFormats <: GBoxed - handle::Ptr{GdkDmabufFormats} - begin - (GLib.g_type(::Type{T}) where T <: GdkDmabufFormats) = begin - ccall(("gdk_dmabuf_formats_get_type", libgtk4), GType, ()) - end - function GdkDmabufFormats(ref::Ptr{T}, own::Bool = false) where T <: GBoxed - x = new(ref) - if own - finalizer(x) do x - GLib.delboxed(x) + begin + mutable struct GdkDmabufFormats <: GBoxed + handle::Ptr{GdkDmabufFormats} + begin + (GLib.g_type(::Type{T}) where T <: GdkDmabufFormats) = begin + ccall(("gdk_dmabuf_formats_get_type", libgtk4), GType, ()) + end + function GdkDmabufFormats(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 - x + push!(gboxed_types, GdkDmabufFormats) end - push!(gboxed_types, GdkDmabufFormats) end + const GdkDmabufFormatsLike = GdkDmabufFormats end - mutable struct GdkDragSurfaceSize - handle::Ptr{GdkDragSurfaceSize} + begin + mutable struct GdkDragSurfaceSize + handle::Ptr{GdkDragSurfaceSize} + end + const GdkDragSurfaceSizeLike = GdkDragSurfaceSize end - mutable struct GdkEventSequence <: GBoxed - handle::Ptr{GdkEventSequence} - begin - (GLib.g_type(::Type{T}) where T <: GdkEventSequence) = begin - ccall(("gdk_event_sequence_get_type", libgtk4), GType, ()) - end - function GdkEventSequence(ref::Ptr{T}, own::Bool = false) where T <: GBoxed - x = new(ref) - if own - finalizer(x) do x - GLib.delboxed(x) + begin + mutable struct GdkEventSequence <: GBoxed + handle::Ptr{GdkEventSequence} + begin + (GLib.g_type(::Type{T}) where T <: GdkEventSequence) = begin + ccall(("gdk_event_sequence_get_type", libgtk4), GType, ()) + end + function GdkEventSequence(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 - x + push!(gboxed_types, GdkEventSequence) end - push!(gboxed_types, GdkEventSequence) end + const GdkEventSequenceLike = GdkEventSequence end - mutable struct GdkFileList <: GBoxed - handle::Ptr{GdkFileList} - begin - (GLib.g_type(::Type{T}) where T <: GdkFileList) = begin - ccall(("gdk_file_list_get_type", libgtk4), GType, ()) - end - function GdkFileList(ref::Ptr{T}, own::Bool = false) where T <: GBoxed - x = new(ref) - if own - finalizer(x) do x - GLib.delboxed(x) + begin + mutable struct GdkFileList <: GBoxed + handle::Ptr{GdkFileList} + begin + (GLib.g_type(::Type{T}) where T <: GdkFileList) = begin + ccall(("gdk_file_list_get_type", libgtk4), GType, ()) + end + function GdkFileList(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 - x + push!(gboxed_types, GdkFileList) end - push!(gboxed_types, GdkFileList) end + const GdkFileListLike = GdkFileList end - mutable struct GdkFrameTimings <: GBoxed - handle::Ptr{GdkFrameTimings} - begin - (GLib.g_type(::Type{T}) where T <: GdkFrameTimings) = begin - ccall(("gdk_frame_timings_get_type", libgtk4), GType, ()) - end - function GdkFrameTimings(ref::Ptr{T}, own::Bool = false) where T <: GBoxed - x = new(ref) - if own - finalizer(x) do x - GLib.delboxed(x) + begin + mutable struct GdkFrameTimings <: GBoxed + handle::Ptr{GdkFrameTimings} + begin + (GLib.g_type(::Type{T}) where T <: GdkFrameTimings) = begin + ccall(("gdk_frame_timings_get_type", libgtk4), GType, ()) + end + function GdkFrameTimings(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 - x + push!(gboxed_types, GdkFrameTimings) end - push!(gboxed_types, GdkFrameTimings) end + const GdkFrameTimingsLike = GdkFrameTimings end begin struct _GdkKeymapKey @@ -121,27 +142,36 @@ $(Expr(:toplevel, quote mutable struct GdkKeymapKey handle::Ptr{_GdkKeymapKey} end - unsafe_convert(::Type{Ptr{_GdkKeymapKey}}, box::GdkKeymapKey) = begin - convert(Ptr{_GdkKeymapKey}, box.handle) - end - end - mutable struct GdkPopupLayout <: GBoxed - handle::Ptr{GdkPopupLayout} begin - (GLib.g_type(::Type{T}) where T <: GdkPopupLayout) = begin - ccall(("gdk_popup_layout_get_type", libgtk4), GType, ()) + unsafe_convert(::Type{Ptr{_GdkKeymapKey}}, box::GdkKeymapKey) = begin + convert(Ptr{_GdkKeymapKey}, box.handle) end - function GdkPopupLayout(ref::Ptr{T}, own::Bool = false) where T <: GBoxed - x = new(ref) - if own - finalizer(x) do x - GLib.delboxed(x) + convert(::Type{GdkKeymapKey}, p::Ptr{_GdkKeymapKey}, owns = false) = begin + GdkKeymapKey(p, owns) + end + const GdkKeymapKeyLike = Union{Ref{_GdkKeymapKey}, GdkKeymapKey} + end + end + begin + mutable struct GdkPopupLayout <: GBoxed + handle::Ptr{GdkPopupLayout} + begin + (GLib.g_type(::Type{T}) where T <: GdkPopupLayout) = begin + ccall(("gdk_popup_layout_get_type", libgtk4), GType, ()) + end + function GdkPopupLayout(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 - x + push!(gboxed_types, GdkPopupLayout) end - push!(gboxed_types, GdkPopupLayout) end + const GdkPopupLayoutLike = GdkPopupLayout end begin struct _GdkRGBA @@ -156,7 +186,7 @@ $(Expr(:toplevel, quote (GLib.g_type(::Type{T}) where T <: GdkRGBA) = begin ccall(("gdk_rgba_get_type", libgtk4), GType, ()) end - function GdkRGBA(ref::Ptr{T}, own::Bool = false) where T <: GBoxed + function GdkRGBA(ref::Ptr{T}, own::Bool = false) where T <: Union{GBoxed, _GdkRGBA} x = new(ref) if own finalizer(x) do x @@ -168,9 +198,15 @@ $(Expr(:toplevel, quote push!(gboxed_types, GdkRGBA) end end - unsafe_convert(::Type{Ptr{_GdkRGBA}}, box::GdkRGBA) = begin - convert(Ptr{_GdkRGBA}, box.handle) - end + begin + unsafe_convert(::Type{Ptr{_GdkRGBA}}, box::GdkRGBA) = begin + convert(Ptr{_GdkRGBA}, box.handle) + end + convert(::Type{GdkRGBA}, p::Ptr{_GdkRGBA}, owns = false) = begin + GdkRGBA(p, owns) + end + const GdkRGBALike = Union{Ref{_GdkRGBA}, GdkRGBA} + end end begin struct _GdkRectangle @@ -185,7 +221,7 @@ $(Expr(:toplevel, quote (GLib.g_type(::Type{T}) where T <: GdkRectangle) = begin ccall(("gdk_rectangle_get_type", libgtk4), GType, ()) end - function GdkRectangle(ref::Ptr{T}, own::Bool = false) where T <: GBoxed + function GdkRectangle(ref::Ptr{T}, own::Bool = false) where T <: Union{GBoxed, _GdkRectangle} x = new(ref) if own finalizer(x) do x @@ -197,51 +233,64 @@ $(Expr(:toplevel, quote push!(gboxed_types, GdkRectangle) end end - unsafe_convert(::Type{Ptr{_GdkRectangle}}, box::GdkRectangle) = begin - 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, ()) + unsafe_convert(::Type{Ptr{_GdkRectangle}}, box::GdkRectangle) = begin + convert(Ptr{_GdkRectangle}, box.handle) + end + convert(::Type{GdkRectangle}, p::Ptr{_GdkRectangle}, owns = false) = begin + GdkRectangle(p, owns) end - function GdkTextureDownloader(ref::Ptr{T}, own::Bool = false) where T <: GBoxed - x = new(ref) - if own - finalizer(x) do x - GLib.delboxed(x) + const GdkRectangleLike = Union{Ref{_GdkRectangle}, GdkRectangle} + end + end + begin + 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 - x + push!(gboxed_types, GdkTextureDownloader) end - push!(gboxed_types, GdkTextureDownloader) end + const GdkTextureDownloaderLike = GdkTextureDownloader end begin mutable struct GdkTimeCoord handle::Ptr{GdkTimeCoord} end + const GdkTimeCoordLike = GdkTimeCoord const _GdkTimeCoord = GdkTimeCoord end - mutable struct GdkToplevelLayout <: GBoxed - handle::Ptr{GdkToplevelLayout} - begin - (GLib.g_type(::Type{T}) where T <: GdkToplevelLayout) = begin - ccall(("gdk_toplevel_layout_get_type", libgtk4), GType, ()) - end - function GdkToplevelLayout(ref::Ptr{T}, own::Bool = false) where T <: GBoxed - x = new(ref) - if own - finalizer(x) do x - GLib.delboxed(x) + begin + mutable struct GdkToplevelLayout <: GBoxed + handle::Ptr{GdkToplevelLayout} + begin + (GLib.g_type(::Type{T}) where T <: GdkToplevelLayout) = begin + ccall(("gdk_toplevel_layout_get_type", libgtk4), GType, ()) end + function GdkToplevelLayout(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 - x + push!(gboxed_types, GdkToplevelLayout) end - push!(gboxed_types, GdkToplevelLayout) end + const GdkToplevelLayoutLike = GdkToplevelLayout end gboxed_cache_init() = begin append!(GLib.gboxed_types, gboxed_types) @@ -1138,7 +1187,7 @@ $(Expr(:toplevel, quote GLib.setproperties!(obj; kwargs...) obj end - function GdkContentProvider(_value::Union{GValue, Ref{_GValue}}; kwargs...) + function GdkContentProvider(_value::GValueLike; kwargs...) obj = G_.ContentProvider_new_for_value(_value) GLib.setproperties!(obj; kwargs...) obj @@ -1216,7 +1265,7 @@ $(Expr(:toplevel, quote 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) + function GdkPopupLayout(_anchor_rect::GdkRectangleLike, _rect_anchor, _surface_anchor) G_.PopupLayout_new(_anchor_rect, _rect_anchor, _surface_anchor) end function GdkTextureDownloader(_texture::GdkTexture) @@ -1383,6 +1432,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, GdkDmabufFormats, 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, GdkDmabufTexture, GdkDmabufTextureLeaf, GdkDmabufTextureBuilder, GdkDmabufTextureBuilderLeaf, 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, GdkDmabufFormats, GdkDragSurfaceSize, GdkEventSequence, GdkFileList, GdkFrameTimings, GdkKeymapKey, GdkKeymapKeyLike, _GdkKeymapKey, GdkPopupLayout, GdkRGBA, GdkRGBALike, _GdkRGBA, GdkRectangle, GdkRectangleLike, _GdkRectangle, GdkTextureDownloader, GdkTimeCoord, GdkTimeCoordLike, _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, GdkDmabufTexture, GdkDmabufTextureLeaf, GdkDmabufTextureBuilder, GdkDmabufTextureBuilderLeaf, 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/gdkpixbuf_consts b/src/gen/gdkpixbuf_consts index 7cd92348..702a785a 100644 --- a/src/gen/gdkpixbuf_consts +++ b/src/gen/gdkpixbuf_consts @@ -2,9 +2,9 @@ quote $(Expr(:toplevel, quote begin const PIXBUF_MAJOR = 2 - const PIXBUF_MICRO = 8 + const PIXBUF_MICRO = 10 const PIXBUF_MINOR = 42 - const PIXBUF_VERSION = "2.42.8" + const PIXBUF_VERSION = "2.42.10" begin @cenum Colorspace::Int32 Colorspace_RGB = 0 (GLib.g_type(::Type{T}) where T <: Colorspace) = begin diff --git a/src/gen/gdkpixbuf_methods b/src/gen/gdkpixbuf_methods index 86c7d1c0..f708acab 100644 --- a/src/gen/gdkpixbuf_methods +++ b/src/gen/gdkpixbuf_methods @@ -1,20 +1,20 @@ quote $(Expr(:toplevel, quote - function copy(instance::Union{GdkPixbufFormat, Ref{_GdkPixbufFormat}}) + function copy(instance::GdkPixbufFormatLike) ret = ccall(("gdk_pixbuf_format_copy", libgdkpixbuf), Ptr{_GdkPixbufFormat}, (Ptr{_GdkPixbufFormat},), instance) - ret2 = convert(Union{GdkPixbufFormat, Ref{_GdkPixbufFormat}}, ret, true) + ret2 = convert(GdkPixbufFormatLike, ret, true) ret2 end - function free(instance::Union{GdkPixbufFormat, Ref{_GdkPixbufFormat}}) + function free(instance::GdkPixbufFormatLike) ret = ccall(("gdk_pixbuf_format_free", libgdkpixbuf), Nothing, (Ptr{_GdkPixbufFormat},), instance) nothing end - function get_description(instance::Union{GdkPixbufFormat, Ref{_GdkPixbufFormat}}) + function get_description(instance::GdkPixbufFormatLike) ret = ccall(("gdk_pixbuf_format_get_description", libgdkpixbuf), Cstring, (Ptr{_GdkPixbufFormat},), instance) ret2 = string_or_nothing(ret, true) ret2 end - function get_extensions(instance::Union{GdkPixbufFormat, Ref{_GdkPixbufFormat}}) + function get_extensions(instance::GdkPixbufFormatLike) ret = ccall(("gdk_pixbuf_format_get_extensions", libgdkpixbuf), Ptr{Cstring}, (Ptr{_GdkPixbufFormat},), instance) ret2 = begin _len = length_zt(ret) @@ -24,12 +24,12 @@ $(Expr(:toplevel, quote end ret2 end - function get_license(instance::Union{GdkPixbufFormat, Ref{_GdkPixbufFormat}}) + function get_license(instance::GdkPixbufFormatLike) ret = ccall(("gdk_pixbuf_format_get_license", libgdkpixbuf), Cstring, (Ptr{_GdkPixbufFormat},), instance) ret2 = string_or_nothing(ret, true) ret2 end - function get_mime_types(instance::Union{GdkPixbufFormat, Ref{_GdkPixbufFormat}}) + function get_mime_types(instance::GdkPixbufFormatLike) ret = ccall(("gdk_pixbuf_format_get_mime_types", libgdkpixbuf), Ptr{Cstring}, (Ptr{_GdkPixbufFormat},), instance) ret2 = begin _len = length_zt(ret) @@ -39,32 +39,32 @@ $(Expr(:toplevel, quote end ret2 end - function get_name(instance::Union{GdkPixbufFormat, Ref{_GdkPixbufFormat}}) + function get_name(instance::GdkPixbufFormatLike) ret = ccall(("gdk_pixbuf_format_get_name", libgdkpixbuf), Cstring, (Ptr{_GdkPixbufFormat},), instance) ret2 = string_or_nothing(ret, true) ret2 end - function is_disabled(instance::Union{GdkPixbufFormat, Ref{_GdkPixbufFormat}}) + function is_disabled(instance::GdkPixbufFormatLike) ret = ccall(("gdk_pixbuf_format_is_disabled", libgdkpixbuf), Cint, (Ptr{_GdkPixbufFormat},), instance) ret2 = convert(Bool, ret) ret2 end - function is_save_option_supported(instance::Union{GdkPixbufFormat, Ref{_GdkPixbufFormat}}, _option_key::Union{AbstractString, Symbol}) + function is_save_option_supported(instance::GdkPixbufFormatLike, _option_key::Union{AbstractString, Symbol}) ret = ccall(("gdk_pixbuf_format_is_save_option_supported", libgdkpixbuf), Cint, (Ptr{_GdkPixbufFormat}, Cstring), instance, _option_key) ret2 = convert(Bool, ret) ret2 end - function is_scalable(instance::Union{GdkPixbufFormat, Ref{_GdkPixbufFormat}}) + function is_scalable(instance::GdkPixbufFormatLike) ret = ccall(("gdk_pixbuf_format_is_scalable", libgdkpixbuf), Cint, (Ptr{_GdkPixbufFormat},), instance) ret2 = convert(Bool, ret) ret2 end - function is_writable(instance::Union{GdkPixbufFormat, Ref{_GdkPixbufFormat}}) + function is_writable(instance::GdkPixbufFormatLike) ret = ccall(("gdk_pixbuf_format_is_writable", libgdkpixbuf), Cint, (Ptr{_GdkPixbufFormat},), instance) ret2 = convert(Bool, ret) ret2 end - function set_disabled(instance::Union{GdkPixbufFormat, Ref{_GdkPixbufFormat}}, _disabled::Bool) + function set_disabled(instance::GdkPixbufFormatLike, _disabled::Bool) ret = ccall(("gdk_pixbuf_format_set_disabled", libgdkpixbuf), Nothing, (Ptr{_GdkPixbufFormat}, Cint), instance, _disabled) nothing end diff --git a/src/gen/gdkpixbuf_structs b/src/gen/gdkpixbuf_structs index 603d677b..ca1716ca 100644 --- a/src/gen/gdkpixbuf_structs +++ b/src/gen/gdkpixbuf_structs @@ -10,9 +10,15 @@ $(Expr(:toplevel, quote mutable struct GdkPixbufModulePattern handle::Ptr{_GdkPixbufModulePattern} end - unsafe_convert(::Type{Ptr{_GdkPixbufModulePattern}}, box::GdkPixbufModulePattern) = begin - convert(Ptr{_GdkPixbufModulePattern}, box.handle) - end + begin + unsafe_convert(::Type{Ptr{_GdkPixbufModulePattern}}, box::GdkPixbufModulePattern) = begin + convert(Ptr{_GdkPixbufModulePattern}, box.handle) + end + convert(::Type{GdkPixbufModulePattern}, p::Ptr{_GdkPixbufModulePattern}, owns = false) = begin + GdkPixbufModulePattern(p, owns) + end + const GdkPixbufModulePatternLike = Union{Ref{_GdkPixbufModulePattern}, GdkPixbufModulePattern} + end end begin struct _GdkPixbufFormat @@ -32,7 +38,7 @@ $(Expr(:toplevel, quote (GLib.g_type(::Type{T}) where T <: GdkPixbufFormat) = begin ccall(("gdk_pixbuf_format_get_type", libgdkpixbuf), GType, ()) end - function GdkPixbufFormat(ref::Ptr{T}, own::Bool = false) where T <: GBoxed + function GdkPixbufFormat(ref::Ptr{T}, own::Bool = false) where T <: Union{GBoxed, _GdkPixbufFormat} x = new(ref) if own finalizer(x) do x @@ -44,9 +50,15 @@ $(Expr(:toplevel, quote push!(gboxed_types, GdkPixbufFormat) end end - unsafe_convert(::Type{Ptr{_GdkPixbufFormat}}, box::GdkPixbufFormat) = begin - convert(Ptr{_GdkPixbufFormat}, box.handle) - end + begin + unsafe_convert(::Type{Ptr{_GdkPixbufFormat}}, box::GdkPixbufFormat) = begin + convert(Ptr{_GdkPixbufFormat}, box.handle) + end + convert(::Type{GdkPixbufFormat}, p::Ptr{_GdkPixbufFormat}, owns = false) = begin + GdkPixbufFormat(p, owns) + end + const GdkPixbufFormatLike = Union{Ref{_GdkPixbufFormat}, GdkPixbufFormat} + end end gboxed_cache_init() = begin append!(GLib.gboxed_types, gboxed_types) @@ -349,6 +361,6 @@ $(Expr(:toplevel, quote ret = f(buf, count, error) convert(Cint, ret) end - export GdkPixbufModulePattern, _GdkPixbufModulePattern, GdkPixbufFormat, _GdkPixbufFormat, GdkPixbuf, GdkPixbufLeaf, GdkPixbufAnimation, GdkPixbufAnimationLeaf, GdkPixbufAnimationIter, GdkPixbufAnimationIterLeaf, GdkPixbufLoader, GdkPixbufLoaderLeaf, GdkPixbufNonAnim, GdkPixbufNonAnimLeaf, GdkPixbufSimpleAnim, GdkPixbufSimpleAnimLeaf, GdkPixbufSimpleAnimIter, GdkPixbufSimpleAnimIterLeaf, GdkPixbufDestroyNotify, GdkPixbufModuleLoadXpmDataFunc, GdkPixbufModulePreparedFunc, GdkPixbufModuleSizeFunc, GdkPixbufModuleUpdatedFunc, GdkPixbufSaveFunc + export GdkPixbufModulePattern, _GdkPixbufModulePattern, GdkPixbufModulePatternLike, GdkPixbufFormat, GdkPixbufFormatLike, _GdkPixbufFormat, GdkPixbuf, GdkPixbufLeaf, GdkPixbufAnimation, GdkPixbufAnimationLeaf, GdkPixbufAnimationIter, GdkPixbufAnimationIterLeaf, GdkPixbufLoader, GdkPixbufLoaderLeaf, GdkPixbufNonAnim, GdkPixbufNonAnimLeaf, GdkPixbufSimpleAnim, GdkPixbufSimpleAnimLeaf, GdkPixbufSimpleAnimIter, GdkPixbufSimpleAnimIterLeaf, GdkPixbufDestroyNotify, GdkPixbufModuleLoadXpmDataFunc, GdkPixbufModulePreparedFunc, GdkPixbufModuleSizeFunc, GdkPixbufModuleUpdatedFunc, GdkPixbufSaveFunc end)) end diff --git a/src/gen/gio_functions b/src/gen/gio_functions index e4ba4f6e..7de6b10a 100644 --- a/src/gen/gio_functions +++ b/src/gen/gio_functions @@ -353,7 +353,7 @@ $(Expr(:toplevel, quote ret2 = string_or_nothing(ret, true) ret2 end - function dbus_gvalue_to_gvariant(_gvalue::Union{GValue, Ref{_GValue}}, _type::GVariantType) + function dbus_gvalue_to_gvariant(_gvalue::GValueLike, _type::GVariantType) ret = ccall(("g_dbus_gvalue_to_gvariant", libgio), Ptr{GVariant}, (Ptr{_GValue}, Ptr{GVariantType}), _gvalue, _type) ret2 = convert(GVariant, ret) ret2 @@ -601,14 +601,14 @@ $(Expr(:toplevel, quote end function pollable_source_new(_pollable_stream::GObject) ret = ccall(("g_pollable_source_new", libgio), Ptr{_GSource}, (Ptr{GObject},), _pollable_stream) - ret2 = convert(Union{GSource, Ref{_GSource}}, ret, true) + ret2 = convert(GSourceLike, ret, true) ret2 end - function pollable_source_new_full(_pollable_stream::GObject, _child_source::Maybe(Union{GSource, Ref{_GSource}}), _cancellable::Maybe(GCancellable)) + function pollable_source_new_full(_pollable_stream::GObject, _child_source::Maybe(GSourceLike), _cancellable::Maybe(GCancellable)) _child_source_maybe = nothing_to_null(_child_source) _cancellable_maybe = nothing_to_null(_cancellable) ret = ccall(("g_pollable_source_new_full", libgio), Ptr{_GSource}, (Ptr{GObject}, Ptr{_GSource}, Ptr{GObject}), _pollable_stream, _child_source_maybe, _cancellable_maybe) - ret2 = convert(Union{GSource, Ref{_GSource}}, ret, true) + ret2 = convert(GSourceLike, ret, true) ret2 end function pollable_stream_read(_stream::GInputStream, _buffer, _blocking::Bool, _cancellable::Maybe(GCancellable)) diff --git a/src/gen/gio_methods b/src/gen/gio_methods index aa295b24..ce65f65a 100644 --- a/src/gen/gio_methods +++ b/src/gen/gio_methods @@ -2,29 +2,29 @@ quote $(Expr(:toplevel, quote function FileAttributeInfoList_new() ret = ccall(("g_file_attribute_info_list_new", libgio), Ptr{_GFileAttributeInfoList}, ()) - ret2 = convert(Union{GFileAttributeInfoList, Ref{_GFileAttributeInfoList}}, ret, true) + ret2 = convert(GFileAttributeInfoListLike, ret, true) ret2 end - function add(instance::Union{GFileAttributeInfoList, Ref{_GFileAttributeInfoList}}, _name::Union{AbstractString, Symbol}, _type, _flags) + function add(instance::GFileAttributeInfoListLike, _name::Union{AbstractString, Symbol}, _type, _flags) ret = ccall(("g_file_attribute_info_list_add", libgio), Nothing, (Ptr{_GFileAttributeInfoList}, Cstring, UInt32, UInt32), instance, _name, _type, _flags) nothing end - function dup(instance::Union{GFileAttributeInfoList, Ref{_GFileAttributeInfoList}}) + function dup(instance::GFileAttributeInfoListLike) ret = ccall(("g_file_attribute_info_list_dup", libgio), Ptr{_GFileAttributeInfoList}, (Ptr{_GFileAttributeInfoList},), instance) - ret2 = convert(Union{GFileAttributeInfoList, Ref{_GFileAttributeInfoList}}, ret, true) + ret2 = convert(GFileAttributeInfoListLike, ret, true) ret2 end - function lookup(instance::Union{GFileAttributeInfoList, Ref{_GFileAttributeInfoList}}, _name::Union{AbstractString, Symbol}) + function lookup(instance::GFileAttributeInfoListLike, _name::Union{AbstractString, Symbol}) ret = ccall(("g_file_attribute_info_list_lookup", libgio), Ptr{_GFileAttributeInfo}, (Ptr{_GFileAttributeInfoList}, Cstring), instance, _name) - ret2 = convert(Union{GFileAttributeInfo, Ref{_GFileAttributeInfo}}, ret) + ret2 = convert(GFileAttributeInfoLike, ret) ret2 end - function ref(instance::Union{GFileAttributeInfoList, Ref{_GFileAttributeInfoList}}) + function ref(instance::GFileAttributeInfoListLike) ret = ccall(("g_file_attribute_info_list_ref", libgio), Ptr{_GFileAttributeInfoList}, (Ptr{_GFileAttributeInfoList},), instance) - ret2 = convert(Union{GFileAttributeInfoList, Ref{_GFileAttributeInfoList}}, ret, true) + ret2 = convert(GFileAttributeInfoListLike, ret, true) ret2 end - function unref(instance::Union{GFileAttributeInfoList, Ref{_GFileAttributeInfoList}}) + function unref(instance::GFileAttributeInfoListLike) ret = ccall(("g_file_attribute_info_list_unref", libgio), Nothing, (Ptr{_GFileAttributeInfoList},), instance) nothing end @@ -830,7 +830,7 @@ $(Expr(:toplevel, quote end function source_new(instance::GCancellable) ret = ccall(("g_cancellable_source_new", libgio), Ptr{_GSource}, (Ptr{GObject},), instance) - ret2 = convert(Union{GSource, Ref{_GSource}}, ret, true) + ret2 = convert(GSourceLike, ret, true) ret2 end function CharsetConverter_new(_to_charset::Union{AbstractString, Symbol}, _from_charset::Union{AbstractString, Symbol}) @@ -5773,6 +5773,181 @@ $(Expr(:toplevel, quote ret = ccall(("g_subprocess_launcher_unsetenv", libgio), Nothing, (Ptr{GObject}, Cstring), instance, _variable) nothing end + function Task_new(_source_object::Maybe(GObject), _cancellable::Maybe(GCancellable), _callback::Maybe(Function)) + _source_object_maybe = nothing_to_null(_source_object) + _cancellable_maybe = nothing_to_null(_cancellable) + if _callback === nothing + _callback_cfunc = C_NULL + _callback_closure = C_NULL + else + _callback_cfunc = @cfunction(GAsyncReadyCallback, Nothing, (Ptr{GObject}, Ptr{GObject}, Ref{Function})) + _callback_closure = GLib.gc_ref(_callback) + end + ret = ccall(("g_task_new", libgio), Ptr{GObject}, (Ptr{GObject}, Ptr{GObject}, Ptr{Cvoid}, Ptr{Nothing}), _source_object_maybe, _cancellable_maybe, _callback_cfunc, _callback_closure) + ret2 = GTaskLeaf(ret, true) + ret2 + end + function is_valid(_result::GAsyncResult, _source_object::Maybe(GObject)) + _source_object_maybe = nothing_to_null(_source_object) + ret = ccall(("g_task_is_valid", libgio), Cint, (Ptr{GObject}, Ptr{GObject}), _result, _source_object_maybe) + ret2 = convert(Bool, ret) + ret2 + end + function report_error(_source_object::Maybe(GObject), _callback::Maybe(Function), _source_tag::Maybe(Nothing), _error) + _source_object_maybe = nothing_to_null(_source_object) + if _callback === nothing + _callback_cfunc = C_NULL + _callback_closure = C_NULL + else + _callback_cfunc = @cfunction(GAsyncReadyCallback, Nothing, (Ptr{GObject}, Ptr{GObject}, Ref{Function})) + _callback_closure = GLib.gc_ref(_callback) + end + _source_tag_maybe = nothing_to_null(_source_tag) + ret = ccall(("g_task_report_error", libgio), Nothing, (Ptr{GObject}, Ptr{Cvoid}, Ptr{Nothing}, Ptr{Nothing}, Ptr{GError}), _source_object_maybe, _callback_cfunc, _callback_closure, _source_tag_maybe, _error) + nothing + end + function get_cancellable(instance::GTask) + ret = ccall(("g_task_get_cancellable", libgio), Ptr{GObject}, (Ptr{GObject},), instance) + ret2 = convert_if_not_null(GCancellable, ret, false) + ret2 + end + function get_check_cancellable(instance::GTask) + ret = ccall(("g_task_get_check_cancellable", libgio), Cint, (Ptr{GObject},), instance) + ret2 = convert(Bool, ret) + ret2 + end + function get_completed(instance::GTask) + ret = ccall(("g_task_get_completed", libgio), Cint, (Ptr{GObject},), instance) + ret2 = convert(Bool, ret) + ret2 + end + function get_context(instance::GTask) + ret = ccall(("g_task_get_context", libgio), Ptr{GMainContext}, (Ptr{GObject},), instance) + ret2 = convert(GMainContext, ret, false) + ret2 + end + function get_name(instance::GTask) + ret = ccall(("g_task_get_name", libgio), Cstring, (Ptr{GObject},), instance) + ret2 = string_or_nothing(ret, false) + ret2 + end + function get_priority(instance::GTask) + ret = ccall(("g_task_get_priority", libgio), Int32, (Ptr{GObject},), instance) + ret + end + function get_return_on_cancel(instance::GTask) + ret = ccall(("g_task_get_return_on_cancel", libgio), Cint, (Ptr{GObject},), instance) + ret2 = convert(Bool, ret) + ret2 + end + function get_source_object(instance::GTask) + ret = ccall(("g_task_get_source_object", libgio), Ptr{GObject}, (Ptr{GObject},), instance) + ret2 = convert_if_not_null(GObject, ret, false) + ret2 + end + function get_source_tag(instance::GTask) + ret = ccall(("g_task_get_source_tag", libgio), Ptr{Nothing}, (Ptr{GObject},), instance) + ret2 = convert(Nothing, ret) + ret2 + end + function get_task_data(instance::GTask) + ret = ccall(("g_task_get_task_data", libgio), Ptr{Nothing}, (Ptr{GObject},), instance) + ret2 = convert(Nothing, ret) + ret2 + end + function had_error(instance::GTask) + ret = ccall(("g_task_had_error", libgio), Cint, (Ptr{GObject},), instance) + ret2 = convert(Bool, ret) + ret2 + end + function propagate_boolean(instance::GTask) + err = err_buf() + ret = ccall(("g_task_propagate_boolean", libgio), Cint, (Ptr{GObject}, Ptr{Ptr{GError}}), instance, err) + check_err(err) + ret2 = convert(Bool, ret) + ret2 + end + function propagate_int(instance::GTask) + err = err_buf() + ret = ccall(("g_task_propagate_int", libgio), Int64, (Ptr{GObject}, Ptr{Ptr{GError}}), instance, err) + check_err(err) + ret + end + function propagate_pointer(instance::GTask) + err = err_buf() + ret = ccall(("g_task_propagate_pointer", libgio), Ptr{Nothing}, (Ptr{GObject}, Ptr{Ptr{GError}}), instance, err) + check_err(err) + ret2 = convert(Nothing, ret) + ret2 + end + function propagate_value(instance::GTask) + m_value = Ref{_GValue}() + err = err_buf() + ret = ccall(("g_task_propagate_value", libgio), Cint, (Ptr{GObject}, Ptr{_GValue}, Ptr{Ptr{GError}}), instance, m_value, err) + check_err(err) + ret2 = convert(Bool, ret) + _value = m_value[] + (ret2, _value) + end + function return_boolean(instance::GTask, _result::Bool) + ret = ccall(("g_task_return_boolean", libgio), Nothing, (Ptr{GObject}, Cint), instance, _result) + nothing + end + function return_error(instance::GTask, _error) + ret = ccall(("g_task_return_error", libgio), Nothing, (Ptr{GObject}, Ptr{GError}), instance, _error) + nothing + end + function return_error_if_cancelled(instance::GTask) + ret = ccall(("g_task_return_error_if_cancelled", libgio), Cint, (Ptr{GObject},), instance) + ret2 = convert(Bool, ret) + ret2 + end + function return_int(instance::GTask, _result::Integer) + ret = ccall(("g_task_return_int", libgio), Nothing, (Ptr{GObject}, Int64), instance, _result) + nothing + end + function return_value(instance::GTask, _result::Maybe(GValueLike)) + _result_maybe = nothing_to_null(_result) + ret = ccall(("g_task_return_value", libgio), Nothing, (Ptr{GObject}, Ptr{_GValue}), instance, _result_maybe) + nothing + end + function set_check_cancellable(instance::GTask, _check_cancellable::Bool) + ret = ccall(("g_task_set_check_cancellable", libgio), Nothing, (Ptr{GObject}, Cint), instance, _check_cancellable) + nothing + end + function set_name(instance::GTask, _name::Maybe(Union{AbstractString, Symbol})) + _name_maybe = nothing_to_null(_name) + ret = ccall(("g_task_set_name", libgio), Nothing, (Ptr{GObject}, Cstring), instance, _name_maybe) + nothing + end + function set_priority(instance::GTask, _priority::Integer) + ret = ccall(("g_task_set_priority", libgio), Nothing, (Ptr{GObject}, Int32), instance, _priority) + nothing + end + function set_return_on_cancel(instance::GTask, _return_on_cancel::Bool) + ret = ccall(("g_task_set_return_on_cancel", libgio), Cint, (Ptr{GObject}, Cint), instance, _return_on_cancel) + ret2 = convert(Bool, ret) + ret2 + end + function set_source_tag(instance::GTask, _source_tag::Maybe(Nothing)) + _source_tag_maybe = nothing_to_null(_source_tag) + ret = ccall(("g_task_set_source_tag", libgio), Nothing, (Ptr{GObject}, Ptr{Nothing}), instance, _source_tag_maybe) + nothing + end + function set_static_name(instance::GTask, _name::Maybe(Union{AbstractString, Symbol})) + _name_maybe = nothing_to_null(_name) + ret = ccall(("g_task_set_static_name", libgio), Nothing, (Ptr{GObject}, Cstring), instance, _name_maybe) + nothing + end + function get_user_data(instance::GTask) + get_user_data(GAsyncResult(instance)) + end + function is_tagged(instance::GTask, _source_tag::Maybe(Nothing)) + is_tagged(GAsyncResult(instance), _source_tag) + end + function legacy_propagate_error(instance::GTask) + legacy_propagate_error(GAsyncResult(instance)) + end function get_graceful_disconnect(instance::GTcpConnection) ret = ccall(("g_tcp_connection_get_graceful_disconnect", libgio), Cint, (Ptr{GObject},), instance) ret2 = convert(Bool, ret) @@ -6778,7 +6953,7 @@ $(Expr(:toplevel, quote function create_source(instance::GDatagramBased, _condition, _cancellable::Maybe(GCancellable)) _cancellable_maybe = nothing_to_null(_cancellable) ret = ccall(("g_datagram_based_create_source", libgio), Ptr{_GSource}, (Ptr{GObject}, UInt32, Ptr{GObject}), instance, _condition, _cancellable_maybe) - ret2 = convert(Union{GSource, Ref{_GSource}}, ret, true) + ret2 = convert(GSourceLike, ret, true) ret2 end function get_debug_enabled(instance::GDebugController) @@ -7874,7 +8049,7 @@ $(Expr(:toplevel, quote err = err_buf() ret = ccall(("g_file_query_settable_attributes", libgio), Ptr{_GFileAttributeInfoList}, (Ptr{GObject}, Ptr{GObject}, Ptr{Ptr{GError}}), instance, _cancellable_maybe, err) check_err(err) - ret2 = convert(Union{GFileAttributeInfoList, Ref{_GFileAttributeInfoList}}, ret, true) + ret2 = convert(GFileAttributeInfoListLike, ret, true) ret2 end function query_writable_namespaces(instance::GFile, _cancellable::Maybe(GCancellable)) @@ -7882,7 +8057,7 @@ $(Expr(:toplevel, quote err = err_buf() ret = ccall(("g_file_query_writable_namespaces", libgio), Ptr{_GFileAttributeInfoList}, (Ptr{GObject}, Ptr{GObject}, Ptr{Ptr{GError}}), instance, _cancellable_maybe, err) check_err(err) - ret2 = convert(Union{GFileAttributeInfoList, Ref{_GFileAttributeInfoList}}, ret, true) + ret2 = convert(GFileAttributeInfoListLike, ret, true) ret2 end function read(instance::GFile, _cancellable::Maybe(GCancellable)) @@ -8312,7 +8487,7 @@ $(Expr(:toplevel, quote function create_source(instance::GPollableInputStream, _cancellable::Maybe(GCancellable)) _cancellable_maybe = nothing_to_null(_cancellable) ret = ccall(("g_pollable_input_stream_create_source", libgio), Ptr{_GSource}, (Ptr{GObject}, Ptr{GObject}), instance, _cancellable_maybe) - ret2 = convert(Union{GSource, Ref{_GSource}}, ret, true) + ret2 = convert(GSourceLike, ret, true) ret2 end function is_readable(instance::GPollableInputStream) diff --git a/src/gen/gio_structs b/src/gen/gio_structs index 61c5b48f..8e5d890a 100644 --- a/src/gen/gio_structs +++ b/src/gen/gio_structs @@ -8,9 +8,15 @@ $(Expr(:toplevel, quote mutable struct GDBusErrorEntry handle::Ptr{_GDBusErrorEntry} end - unsafe_convert(::Type{Ptr{_GDBusErrorEntry}}, box::GDBusErrorEntry) = begin - convert(Ptr{_GDBusErrorEntry}, box.handle) - end + begin + unsafe_convert(::Type{Ptr{_GDBusErrorEntry}}, box::GDBusErrorEntry) = begin + convert(Ptr{_GDBusErrorEntry}, box.handle) + end + convert(::Type{GDBusErrorEntry}, p::Ptr{_GDBusErrorEntry}, owns = false) = begin + GDBusErrorEntry(p, owns) + end + const GDBusErrorEntryLike = Union{Ref{_GDBusErrorEntry}, GDBusErrorEntry} + end end begin struct _GFileAttributeInfo @@ -21,9 +27,15 @@ $(Expr(:toplevel, quote mutable struct GFileAttributeInfo handle::Ptr{_GFileAttributeInfo} end - unsafe_convert(::Type{Ptr{_GFileAttributeInfo}}, box::GFileAttributeInfo) = begin - convert(Ptr{_GFileAttributeInfo}, box.handle) - end + begin + unsafe_convert(::Type{Ptr{_GFileAttributeInfo}}, box::GFileAttributeInfo) = begin + convert(Ptr{_GFileAttributeInfo}, box.handle) + end + convert(::Type{GFileAttributeInfo}, p::Ptr{_GFileAttributeInfo}, owns = false) = begin + GFileAttributeInfo(p, owns) + end + const GFileAttributeInfoLike = Union{Ref{_GFileAttributeInfo}, GFileAttributeInfo} + end end begin struct _GFileAttributeInfoList @@ -36,7 +48,7 @@ $(Expr(:toplevel, quote (GLib.g_type(::Type{T}) where T <: GFileAttributeInfoList) = begin ccall(("g_file_attribute_info_list_get_type", libgio), GType, ()) end - function GFileAttributeInfoList(ref::Ptr{T}, own::Bool = false) where T <: GBoxed + function GFileAttributeInfoList(ref::Ptr{T}, own::Bool = false) where T <: Union{GBoxed, _GFileAttributeInfoList} x = new(ref) if own finalizer(x) do x @@ -48,27 +60,36 @@ $(Expr(:toplevel, quote push!(gboxed_types, GFileAttributeInfoList) end end - unsafe_convert(::Type{Ptr{_GFileAttributeInfoList}}, box::GFileAttributeInfoList) = begin - convert(Ptr{_GFileAttributeInfoList}, box.handle) - end - end - mutable struct GFileAttributeMatcher <: GBoxed - handle::Ptr{GFileAttributeMatcher} begin - (GLib.g_type(::Type{T}) where T <: GFileAttributeMatcher) = begin - ccall(("g_file_attribute_matcher_get_type", libgio), GType, ()) - end - function GFileAttributeMatcher(ref::Ptr{T}, own::Bool = false) where T <: GBoxed - x = new(ref) - if own - finalizer(x) do x - GLib.delboxed(x) + unsafe_convert(::Type{Ptr{_GFileAttributeInfoList}}, box::GFileAttributeInfoList) = begin + convert(Ptr{_GFileAttributeInfoList}, box.handle) + end + convert(::Type{GFileAttributeInfoList}, p::Ptr{_GFileAttributeInfoList}, owns = false) = begin + GFileAttributeInfoList(p, owns) + end + const GFileAttributeInfoListLike = Union{Ref{_GFileAttributeInfoList}, GFileAttributeInfoList} + end + end + begin + mutable struct GFileAttributeMatcher <: GBoxed + handle::Ptr{GFileAttributeMatcher} + begin + (GLib.g_type(::Type{T}) where T <: GFileAttributeMatcher) = begin + ccall(("g_file_attribute_matcher_get_type", libgio), GType, ()) end + function GFileAttributeMatcher(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 - x + push!(gboxed_types, GFileAttributeMatcher) end - push!(gboxed_types, GFileAttributeMatcher) end + const GFileAttributeMatcherLike = GFileAttributeMatcher end begin struct _GInputVector @@ -78,9 +99,15 @@ $(Expr(:toplevel, quote mutable struct GInputVector handle::Ptr{_GInputVector} end - unsafe_convert(::Type{Ptr{_GInputVector}}, box::GInputVector) = begin - convert(Ptr{_GInputVector}, box.handle) - end + begin + unsafe_convert(::Type{Ptr{_GInputVector}}, box::GInputVector) = begin + convert(Ptr{_GInputVector}, box.handle) + end + convert(::Type{GInputVector}, p::Ptr{_GInputVector}, owns = false) = begin + GInputVector(p, owns) + end + const GInputVectorLike = Union{Ref{_GInputVector}, GInputVector} + end end begin struct _GOutputVector @@ -90,99 +117,120 @@ $(Expr(:toplevel, quote mutable struct GOutputVector handle::Ptr{_GOutputVector} end - unsafe_convert(::Type{Ptr{_GOutputVector}}, box::GOutputVector) = begin - convert(Ptr{_GOutputVector}, box.handle) - end - end - mutable struct GResource <: GBoxed - handle::Ptr{GResource} begin - (GLib.g_type(::Type{T}) where T <: GResource) = begin - ccall(("g_resource_get_type", libgio), GType, ()) - end - function GResource(ref::Ptr{T}, own::Bool = false) where T <: GBoxed - x = new(ref) - if own - finalizer(x) do x - GLib.delboxed(x) + unsafe_convert(::Type{Ptr{_GOutputVector}}, box::GOutputVector) = begin + convert(Ptr{_GOutputVector}, box.handle) + end + convert(::Type{GOutputVector}, p::Ptr{_GOutputVector}, owns = false) = begin + GOutputVector(p, owns) + end + const GOutputVectorLike = Union{Ref{_GOutputVector}, GOutputVector} + end + end + begin + mutable struct GResource <: GBoxed + handle::Ptr{GResource} + begin + (GLib.g_type(::Type{T}) where T <: GResource) = begin + ccall(("g_resource_get_type", libgio), GType, ()) end + function GResource(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 - x + push!(gboxed_types, GResource) end - push!(gboxed_types, GResource) end + const GResourceLike = GResource end - mutable struct GSettingsSchema <: GBoxed - handle::Ptr{GSettingsSchema} - begin - (GLib.g_type(::Type{T}) where T <: GSettingsSchema) = begin - ccall(("g_settings_schema_get_type", libgio), GType, ()) - end - function GSettingsSchema(ref::Ptr{T}, own::Bool = false) where T <: GBoxed - x = new(ref) - if own - finalizer(x) do x - GLib.delboxed(x) + begin + mutable struct GSettingsSchema <: GBoxed + handle::Ptr{GSettingsSchema} + begin + (GLib.g_type(::Type{T}) where T <: GSettingsSchema) = begin + ccall(("g_settings_schema_get_type", libgio), GType, ()) end + function GSettingsSchema(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 - x + push!(gboxed_types, GSettingsSchema) end - push!(gboxed_types, GSettingsSchema) end + const GSettingsSchemaLike = GSettingsSchema end - mutable struct GSettingsSchemaKey <: GBoxed - handle::Ptr{GSettingsSchemaKey} - begin - (GLib.g_type(::Type{T}) where T <: GSettingsSchemaKey) = begin - ccall(("g_settings_schema_key_get_type", libgio), GType, ()) - end - function GSettingsSchemaKey(ref::Ptr{T}, own::Bool = false) where T <: GBoxed - x = new(ref) - if own - finalizer(x) do x - GLib.delboxed(x) + begin + mutable struct GSettingsSchemaKey <: GBoxed + handle::Ptr{GSettingsSchemaKey} + begin + (GLib.g_type(::Type{T}) where T <: GSettingsSchemaKey) = begin + ccall(("g_settings_schema_key_get_type", libgio), GType, ()) + end + function GSettingsSchemaKey(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 - x + push!(gboxed_types, GSettingsSchemaKey) end - push!(gboxed_types, GSettingsSchemaKey) end + const GSettingsSchemaKeyLike = GSettingsSchemaKey end - mutable struct GSettingsSchemaSource <: GBoxed - handle::Ptr{GSettingsSchemaSource} - begin - (GLib.g_type(::Type{T}) where T <: GSettingsSchemaSource) = begin - ccall(("g_settings_schema_source_get_type", libgio), GType, ()) - end - function GSettingsSchemaSource(ref::Ptr{T}, own::Bool = false) where T <: GBoxed - x = new(ref) - if own - finalizer(x) do x - GLib.delboxed(x) + begin + mutable struct GSettingsSchemaSource <: GBoxed + handle::Ptr{GSettingsSchemaSource} + begin + (GLib.g_type(::Type{T}) where T <: GSettingsSchemaSource) = begin + ccall(("g_settings_schema_source_get_type", libgio), GType, ()) end + function GSettingsSchemaSource(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 - x + push!(gboxed_types, GSettingsSchemaSource) end - push!(gboxed_types, GSettingsSchemaSource) end + const GSettingsSchemaSourceLike = GSettingsSchemaSource end - mutable struct GSrvTarget <: GBoxed - handle::Ptr{GSrvTarget} - begin - (GLib.g_type(::Type{T}) where T <: GSrvTarget) = begin - ccall(("g_srv_target_get_type", libgio), GType, ()) - end - function GSrvTarget(ref::Ptr{T}, own::Bool = false) where T <: GBoxed - x = new(ref) - if own - finalizer(x) do x - GLib.delboxed(x) + begin + mutable struct GSrvTarget <: GBoxed + handle::Ptr{GSrvTarget} + begin + (GLib.g_type(::Type{T}) where T <: GSrvTarget) = begin + ccall(("g_srv_target_get_type", libgio), GType, ()) end + function GSrvTarget(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 - x + push!(gboxed_types, GSrvTarget) end - push!(gboxed_types, GSrvTarget) end + const GSrvTargetLike = GSrvTarget end begin struct _GXdpDocumentsIface @@ -203,9 +251,15 @@ $(Expr(:toplevel, quote mutable struct GXdpDocumentsIface handle::Ptr{_GXdpDocumentsIface} end - unsafe_convert(::Type{Ptr{_GXdpDocumentsIface}}, box::GXdpDocumentsIface) = begin - convert(Ptr{_GXdpDocumentsIface}, box.handle) - end + begin + unsafe_convert(::Type{Ptr{_GXdpDocumentsIface}}, box::GXdpDocumentsIface) = begin + convert(Ptr{_GXdpDocumentsIface}, box.handle) + end + convert(::Type{GXdpDocumentsIface}, p::Ptr{_GXdpDocumentsIface}, owns = false) = begin + GXdpDocumentsIface(p, owns) + end + const GXdpDocumentsIfaceLike = Union{Ref{_GXdpDocumentsIface}, GXdpDocumentsIface} + end end begin struct _GXdpOpenURIIface @@ -218,9 +272,15 @@ $(Expr(:toplevel, quote mutable struct GXdpOpenURIIface handle::Ptr{_GXdpOpenURIIface} end - unsafe_convert(::Type{Ptr{_GXdpOpenURIIface}}, box::GXdpOpenURIIface) = begin - convert(Ptr{_GXdpOpenURIIface}, box.handle) - end + begin + unsafe_convert(::Type{Ptr{_GXdpOpenURIIface}}, box::GXdpOpenURIIface) = begin + convert(Ptr{_GXdpOpenURIIface}, box.handle) + end + convert(::Type{GXdpOpenURIIface}, p::Ptr{_GXdpOpenURIIface}, owns = false) = begin + GXdpOpenURIIface(p, owns) + end + const GXdpOpenURIIfaceLike = Union{Ref{_GXdpOpenURIIface}, GXdpOpenURIIface} + end end begin struct _GXdpProxyResolverIface @@ -231,9 +291,15 @@ $(Expr(:toplevel, quote mutable struct GXdpProxyResolverIface handle::Ptr{_GXdpProxyResolverIface} end - unsafe_convert(::Type{Ptr{_GXdpProxyResolverIface}}, box::GXdpProxyResolverIface) = begin - convert(Ptr{_GXdpProxyResolverIface}, box.handle) - end + begin + unsafe_convert(::Type{Ptr{_GXdpProxyResolverIface}}, box::GXdpProxyResolverIface) = begin + convert(Ptr{_GXdpProxyResolverIface}, box.handle) + end + convert(::Type{GXdpProxyResolverIface}, p::Ptr{_GXdpProxyResolverIface}, owns = false) = begin + GXdpProxyResolverIface(p, owns) + end + const GXdpProxyResolverIfaceLike = Union{Ref{_GXdpProxyResolverIface}, GXdpProxyResolverIface} + end end begin struct _GXdpTrashIface @@ -244,9 +310,15 @@ $(Expr(:toplevel, quote mutable struct GXdpTrashIface handle::Ptr{_GXdpTrashIface} end - unsafe_convert(::Type{Ptr{_GXdpTrashIface}}, box::GXdpTrashIface) = begin - convert(Ptr{_GXdpTrashIface}, box.handle) - end + begin + unsafe_convert(::Type{Ptr{_GXdpTrashIface}}, box::GXdpTrashIface) = begin + convert(Ptr{_GXdpTrashIface}, box.handle) + end + convert(::Type{GXdpTrashIface}, p::Ptr{_GXdpTrashIface}, owns = false) = begin + GXdpTrashIface(p, owns) + end + const GXdpTrashIfaceLike = Union{Ref{_GXdpTrashIface}, GXdpTrashIface} + end end begin struct _G_FreedesktopDBusIface @@ -275,9 +347,15 @@ $(Expr(:toplevel, quote mutable struct G_FreedesktopDBusIface handle::Ptr{_G_FreedesktopDBusIface} end - unsafe_convert(::Type{Ptr{_G_FreedesktopDBusIface}}, box::G_FreedesktopDBusIface) = begin - convert(Ptr{_G_FreedesktopDBusIface}, box.handle) - end + begin + unsafe_convert(::Type{Ptr{_G_FreedesktopDBusIface}}, box::G_FreedesktopDBusIface) = begin + convert(Ptr{_G_FreedesktopDBusIface}, box.handle) + end + convert(::Type{G_FreedesktopDBusIface}, p::Ptr{_G_FreedesktopDBusIface}, owns = false) = begin + G_FreedesktopDBusIface(p, owns) + end + const G_FreedesktopDBusIfaceLike = Union{Ref{_G_FreedesktopDBusIface}, G_FreedesktopDBusIface} + end end begin struct _G_FreedesktopDBusProxy @@ -287,9 +365,15 @@ $(Expr(:toplevel, quote mutable struct G_FreedesktopDBusProxy handle::Ptr{_G_FreedesktopDBusProxy} end - unsafe_convert(::Type{Ptr{_G_FreedesktopDBusProxy}}, box::G_FreedesktopDBusProxy) = begin - convert(Ptr{_G_FreedesktopDBusProxy}, box.handle) - end + begin + unsafe_convert(::Type{Ptr{_G_FreedesktopDBusProxy}}, box::G_FreedesktopDBusProxy) = begin + convert(Ptr{_G_FreedesktopDBusProxy}, box.handle) + end + convert(::Type{G_FreedesktopDBusProxy}, p::Ptr{_G_FreedesktopDBusProxy}, owns = false) = begin + G_FreedesktopDBusProxy(p, owns) + end + const G_FreedesktopDBusProxyLike = Union{Ref{_G_FreedesktopDBusProxy}, G_FreedesktopDBusProxy} + end end begin struct _G_FreedesktopDBusSkeleton @@ -299,9 +383,15 @@ $(Expr(:toplevel, quote mutable struct G_FreedesktopDBusSkeleton handle::Ptr{_G_FreedesktopDBusSkeleton} end - unsafe_convert(::Type{Ptr{_G_FreedesktopDBusSkeleton}}, box::G_FreedesktopDBusSkeleton) = begin - convert(Ptr{_G_FreedesktopDBusSkeleton}, box.handle) - end + begin + unsafe_convert(::Type{Ptr{_G_FreedesktopDBusSkeleton}}, box::G_FreedesktopDBusSkeleton) = begin + convert(Ptr{_G_FreedesktopDBusSkeleton}, box.handle) + end + convert(::Type{G_FreedesktopDBusSkeleton}, p::Ptr{_G_FreedesktopDBusSkeleton}, owns = false) = begin + G_FreedesktopDBusSkeleton(p, owns) + end + const G_FreedesktopDBusSkeletonLike = Union{Ref{_G_FreedesktopDBusSkeleton}, G_FreedesktopDBusSkeleton} + end 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 @@ -4036,14 +4126,14 @@ $(Expr(:toplevel, quote convert(Cint, ret) end function GSettingsBindGetMapping(value, variant, user_data) - value = convert(Union{GValue, Ref{_GValue}}, value, false) + value = convert(GValueLike, value, false) variant = convert(GVariant, variant) f = user_data ret = f(value, variant) convert(Cint, ret) end function GSettingsBindSetMapping(value, expected_type, user_data) - value = convert(Union{GValue, Ref{_GValue}}, value, false) + value = convert(GValueLike, value, false) expected_type = convert(GVariantType, expected_type, false) f = user_data ret = f(value, expected_type) @@ -4076,6 +4166,6 @@ $(Expr(:toplevel, quote convert(Ptr{GObject}, GLib.get_pointer(ret)) end end - export GDBusErrorEntry, _GDBusErrorEntry, GFileAttributeInfo, _GFileAttributeInfo, GFileAttributeInfoList, _GFileAttributeInfoList, GFileAttributeMatcher, GInputVector, _GInputVector, GOutputVector, _GOutputVector, GResource, GSettingsSchema, GSettingsSchemaKey, GSettingsSchemaSource, GSrvTarget, GXdpDocumentsIface, _GXdpDocumentsIface, GXdpOpenURIIface, _GXdpOpenURIIface, GXdpProxyResolverIface, _GXdpProxyResolverIface, GXdpTrashIface, _GXdpTrashIface, G_FreedesktopDBusIface, _G_FreedesktopDBusIface, G_FreedesktopDBusProxy, _G_FreedesktopDBusProxy, G_FreedesktopDBusSkeleton, _G_FreedesktopDBusSkeleton, GAction, GActionGroup, GActionMap, GAppInfo, GAsyncInitable, GAsyncResult, GConverter, GDBusInterface, GDBusObject, GDBusObjectManager, GDatagramBased, GDebugController, GDrive, GDtlsClientConnection, GDtlsConnection, GDtlsServerConnection, GFile, GFileDescriptorBased, GIcon, GInitable, GListModel, GLoadableIcon, GMemoryMonitor, GMount, GNetworkMonitor, GPollableInputStream, GPollableOutputStream, GPowerProfileMonitor, GProxy, GProxyResolver, GRemoteActionGroup, GSeekable, GSocketConnectable, GTlsBackend, GTlsClientConnection, GTlsFileDatabase, GTlsServerConnection, GVolume, GAppInfoMonitor, GAppInfoMonitorLeaf, GAppLaunchContext, GAppLaunchContextLeaf, GApplication, GApplicationLeaf, GApplicationCommandLine, GApplicationCommandLineLeaf, GBufferedInputStream, GBufferedInputStreamLeaf, GBufferedOutputStream, GBufferedOutputStreamLeaf, GBytesIcon, GBytesIconLeaf, GCancellable, GCancellableLeaf, GCharsetConverter, GCharsetConverterLeaf, GConverterInputStream, GConverterInputStreamLeaf, GConverterOutputStream, GConverterOutputStreamLeaf, GCredentials, GCredentialsLeaf, GDBusActionGroup, GDBusActionGroupLeaf, GDBusAuthObserver, GDBusAuthObserverLeaf, GDBusConnection, GDBusConnectionLeaf, GDBusInterfaceSkeleton, GDBusMenuModel, GDBusMenuModelLeaf, GDBusMessage, GDBusMessageLeaf, GDBusMethodInvocation, GDBusMethodInvocationLeaf, GDBusObjectManagerClient, GDBusObjectManagerClientLeaf, GDBusObjectManagerServer, GDBusObjectManagerServerLeaf, GDBusObjectProxy, GDBusObjectProxyLeaf, GDBusObjectSkeleton, GDBusObjectSkeletonLeaf, GDBusProxy, GDBusProxyLeaf, GDBusServer, GDBusServerLeaf, GDataInputStream, GDataInputStreamLeaf, GDataOutputStream, GDataOutputStreamLeaf, GDesktopAppInfo, GDesktopAppInfoLeaf, GEmblem, GEmblemLeaf, GEmblemedIcon, GEmblemedIconLeaf, GFileEnumerator, GFileEnumeratorLeaf, GFileIOStream, GFileIOStreamLeaf, GFileIcon, GFileIconLeaf, GFileInfo, GFileInfoLeaf, GFileInputStream, GFileInputStreamLeaf, GFileMonitor, GFileOutputStream, GFileOutputStreamLeaf, GFilenameCompleter, GFilenameCompleterLeaf, GFilterInputStream, GFilterOutputStream, GIOModule, GIOModuleLeaf, GIOStream, GInetAddress, GInetAddressLeaf, GInetAddressMask, GInetAddressMaskLeaf, GInetSocketAddress, GInetSocketAddressLeaf, GInputStream, GListStore, GListStoreLeaf, GMemoryInputStream, GMemoryInputStreamLeaf, GMemoryOutputStream, GMemoryOutputStreamLeaf, GMenu, GMenuLeaf, GMenuAttributeIter, GMenuItem, GMenuItemLeaf, GMenuLinkIter, GMenuModel, GMountOperation, GMountOperationLeaf, GNativeSocketAddress, GNativeSocketAddressLeaf, GNativeVolumeMonitor, GNetworkAddress, GNetworkAddressLeaf, GNetworkService, GNetworkServiceLeaf, GNotification, GNotificationLeaf, GOutputStream, GPermission, GPropertyAction, GPropertyActionLeaf, GProxyAddress, GProxyAddressLeaf, GProxyAddressEnumerator, GProxyAddressEnumeratorLeaf, GResolver, GSettings, GSettingsLeaf, GSettingsBackend, GSimpleAction, GSimpleActionLeaf, GSimpleActionGroup, GSimpleActionGroupLeaf, GSimpleAsyncResult, GSimpleAsyncResultLeaf, GSimpleIOStream, GSimpleIOStreamLeaf, GSimplePermission, GSimplePermissionLeaf, GSimpleProxyResolver, GSimpleProxyResolverLeaf, GSocket, GSocketLeaf, GSocketAddress, GSocketAddressEnumerator, GSocketClient, GSocketClientLeaf, GSocketConnection, GSocketConnectionLeaf, GSocketControlMessage, GSocketListener, GSocketListenerLeaf, GSocketService, GSocketServiceLeaf, GSubprocess, GSubprocessLeaf, GSubprocessLauncher, GSubprocessLauncherLeaf, GTask, GTaskLeaf, GTcpConnection, GTcpConnectionLeaf, GTcpWrapperConnection, GTcpWrapperConnectionLeaf, GTestDBus, GTestDBusLeaf, GThemedIcon, GThemedIconLeaf, GThreadedResolver, GThreadedResolverLeaf, GThreadedSocketService, GThreadedSocketServiceLeaf, GTlsCertificate, GTlsConnection, GTlsDatabase, GTlsInteraction, GTlsInteractionLeaf, GTlsPassword, GTlsPasswordLeaf, GUnixConnection, GUnixConnectionLeaf, GUnixCredentialsMessage, GUnixCredentialsMessageLeaf, GVfs, GVfsLeaf, GVolumeMonitor, GVolumeMonitorLeaf, GZlibCompressor, GZlibCompressorLeaf, GZlibDecompressor, GZlibDecompressorLeaf, GAsyncReadyCallback, GBusAcquiredCallback, GBusNameAcquiredCallback, GBusNameAppearedCallback, GBusNameLostCallback, GBusNameVanishedCallback, GCancellableSourceFunc, GDBusInterfaceGetPropertyFunc, GDBusInterfaceMethodCallFunc, GDBusInterfaceSetPropertyFunc, GDBusMessageFilterFunction, GDBusProxyTypeFunc, GDBusSignalCallback, GDBusSubtreeDispatchFunc, GDBusSubtreeEnumerateFunc, GDBusSubtreeIntrospectFunc, GDatagramBasedSourceFunc, GDesktopAppLaunchCallback, GFileMeasureProgressCallback, GFileProgressCallback, GFileReadMoreCallback, GIOSchedulerJobFunc, GPollableSourceFunc, GSettingsBindGetMapping, GSettingsBindSetMapping, GSettingsGetMapping, GSocketSourceFunc, GVfsFileLookupFunc + export GDBusErrorEntry, GDBusErrorEntryLike, _GDBusErrorEntry, GFileAttributeInfo, GFileAttributeInfoLike, _GFileAttributeInfo, GFileAttributeInfoList, GFileAttributeInfoListLike, _GFileAttributeInfoList, GFileAttributeMatcher, GInputVector, GInputVectorLike, _GInputVector, GOutputVector, GOutputVectorLike, _GOutputVector, GResource, GSettingsSchema, GSettingsSchemaKey, GSettingsSchemaSource, GSrvTarget, GXdpDocumentsIface, GXdpDocumentsIfaceLike, _GXdpDocumentsIface, GXdpOpenURIIface, GXdpOpenURIIfaceLike, _GXdpOpenURIIface, GXdpProxyResolverIface, GXdpProxyResolverIfaceLike, _GXdpProxyResolverIface, GXdpTrashIface, GXdpTrashIfaceLike, _GXdpTrashIface, G_FreedesktopDBusIface, G_FreedesktopDBusIfaceLike, _G_FreedesktopDBusIface, G_FreedesktopDBusProxy, G_FreedesktopDBusProxyLike, _G_FreedesktopDBusProxy, G_FreedesktopDBusSkeleton, G_FreedesktopDBusSkeletonLike, _G_FreedesktopDBusSkeleton, GAction, GActionGroup, GActionMap, GAppInfo, GAsyncInitable, GAsyncResult, GConverter, GDBusInterface, GDBusObject, GDBusObjectManager, GDatagramBased, GDebugController, GDrive, GDtlsClientConnection, GDtlsConnection, GDtlsServerConnection, GFile, GFileDescriptorBased, GIcon, GInitable, GListModel, GLoadableIcon, GMemoryMonitor, GMount, GNetworkMonitor, GPollableInputStream, GPollableOutputStream, GPowerProfileMonitor, GProxy, GProxyResolver, GRemoteActionGroup, GSeekable, GSocketConnectable, GTlsBackend, GTlsClientConnection, GTlsFileDatabase, GTlsServerConnection, GVolume, GAppInfoMonitor, GAppInfoMonitorLeaf, GAppLaunchContext, GAppLaunchContextLeaf, GApplication, GApplicationLeaf, GApplicationCommandLine, GApplicationCommandLineLeaf, GBufferedInputStream, GBufferedInputStreamLeaf, GBufferedOutputStream, GBufferedOutputStreamLeaf, GBytesIcon, GBytesIconLeaf, GCancellable, GCancellableLeaf, GCharsetConverter, GCharsetConverterLeaf, GConverterInputStream, GConverterInputStreamLeaf, GConverterOutputStream, GConverterOutputStreamLeaf, GCredentials, GCredentialsLeaf, GDBusActionGroup, GDBusActionGroupLeaf, GDBusAuthObserver, GDBusAuthObserverLeaf, GDBusConnection, GDBusConnectionLeaf, GDBusInterfaceSkeleton, GDBusMenuModel, GDBusMenuModelLeaf, GDBusMessage, GDBusMessageLeaf, GDBusMethodInvocation, GDBusMethodInvocationLeaf, GDBusObjectManagerClient, GDBusObjectManagerClientLeaf, GDBusObjectManagerServer, GDBusObjectManagerServerLeaf, GDBusObjectProxy, GDBusObjectProxyLeaf, GDBusObjectSkeleton, GDBusObjectSkeletonLeaf, GDBusProxy, GDBusProxyLeaf, GDBusServer, GDBusServerLeaf, GDataInputStream, GDataInputStreamLeaf, GDataOutputStream, GDataOutputStreamLeaf, GDesktopAppInfo, GDesktopAppInfoLeaf, GEmblem, GEmblemLeaf, GEmblemedIcon, GEmblemedIconLeaf, GFileEnumerator, GFileEnumeratorLeaf, GFileIOStream, GFileIOStreamLeaf, GFileIcon, GFileIconLeaf, GFileInfo, GFileInfoLeaf, GFileInputStream, GFileInputStreamLeaf, GFileMonitor, GFileOutputStream, GFileOutputStreamLeaf, GFilenameCompleter, GFilenameCompleterLeaf, GFilterInputStream, GFilterOutputStream, GIOModule, GIOModuleLeaf, GIOStream, GInetAddress, GInetAddressLeaf, GInetAddressMask, GInetAddressMaskLeaf, GInetSocketAddress, GInetSocketAddressLeaf, GInputStream, GListStore, GListStoreLeaf, GMemoryInputStream, GMemoryInputStreamLeaf, GMemoryOutputStream, GMemoryOutputStreamLeaf, GMenu, GMenuLeaf, GMenuAttributeIter, GMenuItem, GMenuItemLeaf, GMenuLinkIter, GMenuModel, GMountOperation, GMountOperationLeaf, GNativeSocketAddress, GNativeSocketAddressLeaf, GNativeVolumeMonitor, GNetworkAddress, GNetworkAddressLeaf, GNetworkService, GNetworkServiceLeaf, GNotification, GNotificationLeaf, GOutputStream, GPermission, GPropertyAction, GPropertyActionLeaf, GProxyAddress, GProxyAddressLeaf, GProxyAddressEnumerator, GProxyAddressEnumeratorLeaf, GResolver, GSettings, GSettingsLeaf, GSettingsBackend, GSimpleAction, GSimpleActionLeaf, GSimpleActionGroup, GSimpleActionGroupLeaf, GSimpleAsyncResult, GSimpleAsyncResultLeaf, GSimpleIOStream, GSimpleIOStreamLeaf, GSimplePermission, GSimplePermissionLeaf, GSimpleProxyResolver, GSimpleProxyResolverLeaf, GSocket, GSocketLeaf, GSocketAddress, GSocketAddressEnumerator, GSocketClient, GSocketClientLeaf, GSocketConnection, GSocketConnectionLeaf, GSocketControlMessage, GSocketListener, GSocketListenerLeaf, GSocketService, GSocketServiceLeaf, GSubprocess, GSubprocessLeaf, GSubprocessLauncher, GSubprocessLauncherLeaf, GTask, GTaskLeaf, GTcpConnection, GTcpConnectionLeaf, GTcpWrapperConnection, GTcpWrapperConnectionLeaf, GTestDBus, GTestDBusLeaf, GThemedIcon, GThemedIconLeaf, GThreadedResolver, GThreadedResolverLeaf, GThreadedSocketService, GThreadedSocketServiceLeaf, GTlsCertificate, GTlsConnection, GTlsDatabase, GTlsInteraction, GTlsInteractionLeaf, GTlsPassword, GTlsPasswordLeaf, GUnixConnection, GUnixConnectionLeaf, GUnixCredentialsMessage, GUnixCredentialsMessageLeaf, GVfs, GVfsLeaf, GVolumeMonitor, GVolumeMonitorLeaf, GZlibCompressor, GZlibCompressorLeaf, GZlibDecompressor, GZlibDecompressorLeaf, GAsyncReadyCallback, GBusAcquiredCallback, GBusNameAcquiredCallback, GBusNameAppearedCallback, GBusNameLostCallback, GBusNameVanishedCallback, GCancellableSourceFunc, GDBusInterfaceGetPropertyFunc, GDBusInterfaceMethodCallFunc, GDBusInterfaceSetPropertyFunc, GDBusMessageFilterFunction, GDBusProxyTypeFunc, GDBusSignalCallback, GDBusSubtreeDispatchFunc, GDBusSubtreeEnumerateFunc, GDBusSubtreeIntrospectFunc, GDatagramBasedSourceFunc, GDesktopAppLaunchCallback, GFileMeasureProgressCallback, GFileProgressCallback, GFileReadMoreCallback, GIOSchedulerJobFunc, GPollableSourceFunc, GSettingsBindGetMapping, GSettingsBindSetMapping, GSettingsGetMapping, GSocketSourceFunc, GVfsFileLookupFunc end)) end diff --git a/src/gen/glib_methods b/src/gen/glib_methods index 6f8371cd..0e20ddf9 100644 --- a/src/gen/glib_methods +++ b/src/gen/glib_methods @@ -385,153 +385,153 @@ $(Expr(:toplevel, quote end function Date_new() ret = ccall(("g_date_new", libglib), Ptr{_GDate}, ()) - ret2 = convert(Union{GDate, Ref{_GDate}}, ret, true) + ret2 = convert(GDateLike, ret, true) ret2 end function Date_new_dmy(_day::Integer, _month, _year::Integer) ret = ccall(("g_date_new_dmy", libglib), Ptr{_GDate}, (UInt8, UInt32, UInt16), _day, _month, _year) - ret2 = convert(Union{GDate, Ref{_GDate}}, ret, true) + ret2 = convert(GDateLike, ret, true) ret2 end function Date_new_julian(_julian_day::Integer) ret = ccall(("g_date_new_julian", libglib), Ptr{_GDate}, (UInt32,), _julian_day) - ret2 = convert(Union{GDate, Ref{_GDate}}, ret, true) + ret2 = convert(GDateLike, ret, true) ret2 end - function add_days(instance::Union{GDate, Ref{_GDate}}, _n_days::Integer) + function add_days(instance::GDateLike, _n_days::Integer) ret = ccall(("g_date_add_days", libglib), Nothing, (Ptr{_GDate}, UInt32), instance, _n_days) nothing end - function add_months(instance::Union{GDate, Ref{_GDate}}, _n_months::Integer) + function add_months(instance::GDateLike, _n_months::Integer) ret = ccall(("g_date_add_months", libglib), Nothing, (Ptr{_GDate}, UInt32), instance, _n_months) nothing end - function add_years(instance::Union{GDate, Ref{_GDate}}, _n_years::Integer) + function add_years(instance::GDateLike, _n_years::Integer) ret = ccall(("g_date_add_years", libglib), Nothing, (Ptr{_GDate}, UInt32), instance, _n_years) nothing end - function clamp(instance::Union{GDate, Ref{_GDate}}, _min_date::Union{GDate, Ref{_GDate}}, _max_date::Union{GDate, Ref{_GDate}}) + function clamp(instance::GDateLike, _min_date::GDateLike, _max_date::GDateLike) ret = ccall(("g_date_clamp", libglib), Nothing, (Ptr{_GDate}, Ptr{_GDate}, Ptr{_GDate}), instance, _min_date, _max_date) nothing end - function clear(instance::Union{GDate, Ref{_GDate}}, _n_dates::Integer) + function clear(instance::GDateLike, _n_dates::Integer) ret = ccall(("g_date_clear", libglib), Nothing, (Ptr{_GDate}, UInt32), instance, _n_dates) nothing end - function compare(instance::Union{GDate, Ref{_GDate}}, _rhs::Union{GDate, Ref{_GDate}}) + function compare(instance::GDateLike, _rhs::GDateLike) ret = ccall(("g_date_compare", libglib), Int32, (Ptr{_GDate}, Ptr{_GDate}), instance, _rhs) ret end - function copy(instance::Union{GDate, Ref{_GDate}}) + function copy(instance::GDateLike) ret = ccall(("g_date_copy", libglib), Ptr{_GDate}, (Ptr{_GDate},), instance) - ret2 = convert(Union{GDate, Ref{_GDate}}, ret, true) + ret2 = convert(GDateLike, ret, true) ret2 end - function days_between(instance::Union{GDate, Ref{_GDate}}, _date2::Union{GDate, Ref{_GDate}}) + function days_between(instance::GDateLike, _date2::GDateLike) ret = ccall(("g_date_days_between", libglib), Int32, (Ptr{_GDate}, Ptr{_GDate}), instance, _date2) ret end - function free(instance::Union{GDate, Ref{_GDate}}) + function free(instance::GDateLike) ret = ccall(("g_date_free", libglib), Nothing, (Ptr{_GDate},), instance) nothing end - function get_day(instance::Union{GDate, Ref{_GDate}}) + function get_day(instance::GDateLike) ret = ccall(("g_date_get_day", libglib), UInt8, (Ptr{_GDate},), instance) ret end - function get_day_of_year(instance::Union{GDate, Ref{_GDate}}) + function get_day_of_year(instance::GDateLike) ret = ccall(("g_date_get_day_of_year", libglib), UInt32, (Ptr{_GDate},), instance) ret end - function get_iso8601_week_of_year(instance::Union{GDate, Ref{_GDate}}) + function get_iso8601_week_of_year(instance::GDateLike) ret = ccall(("g_date_get_iso8601_week_of_year", libglib), UInt32, (Ptr{_GDate},), instance) ret end - function get_julian(instance::Union{GDate, Ref{_GDate}}) + function get_julian(instance::GDateLike) ret = ccall(("g_date_get_julian", libglib), UInt32, (Ptr{_GDate},), instance) ret end - function get_monday_week_of_year(instance::Union{GDate, Ref{_GDate}}) + function get_monday_week_of_year(instance::GDateLike) ret = ccall(("g_date_get_monday_week_of_year", libglib), UInt32, (Ptr{_GDate},), instance) ret end - function get_month(instance::Union{GDate, Ref{_GDate}}) + function get_month(instance::GDateLike) ret = ccall(("g_date_get_month", libglib), UInt32, (Ptr{_GDate},), instance) ret2 = DateMonth(ret) ret2 end - function get_sunday_week_of_year(instance::Union{GDate, Ref{_GDate}}) + function get_sunday_week_of_year(instance::GDateLike) ret = ccall(("g_date_get_sunday_week_of_year", libglib), UInt32, (Ptr{_GDate},), instance) ret end - function get_weekday(instance::Union{GDate, Ref{_GDate}}) + function get_weekday(instance::GDateLike) ret = ccall(("g_date_get_weekday", libglib), UInt32, (Ptr{_GDate},), instance) ret2 = DateWeekday(ret) ret2 end - function get_year(instance::Union{GDate, Ref{_GDate}}) + function get_year(instance::GDateLike) ret = ccall(("g_date_get_year", libglib), UInt16, (Ptr{_GDate},), instance) ret end - function is_first_of_month(instance::Union{GDate, Ref{_GDate}}) + function is_first_of_month(instance::GDateLike) ret = ccall(("g_date_is_first_of_month", libglib), Cint, (Ptr{_GDate},), instance) ret2 = convert(Bool, ret) ret2 end - function is_last_of_month(instance::Union{GDate, Ref{_GDate}}) + function is_last_of_month(instance::GDateLike) ret = ccall(("g_date_is_last_of_month", libglib), Cint, (Ptr{_GDate},), instance) ret2 = convert(Bool, ret) ret2 end - function order(instance::Union{GDate, Ref{_GDate}}, _date2::Union{GDate, Ref{_GDate}}) + function order(instance::GDateLike, _date2::GDateLike) ret = ccall(("g_date_order", libglib), Nothing, (Ptr{_GDate}, Ptr{_GDate}), instance, _date2) nothing end - function set_day(instance::Union{GDate, Ref{_GDate}}, _day::Integer) + function set_day(instance::GDateLike, _day::Integer) ret = ccall(("g_date_set_day", libglib), Nothing, (Ptr{_GDate}, UInt8), instance, _day) nothing end - function set_dmy(instance::Union{GDate, Ref{_GDate}}, _day::Integer, _month, _y::Integer) + function set_dmy(instance::GDateLike, _day::Integer, _month, _y::Integer) ret = ccall(("g_date_set_dmy", libglib), Nothing, (Ptr{_GDate}, UInt8, UInt32, UInt16), instance, _day, _month, _y) nothing end - function set_julian(instance::Union{GDate, Ref{_GDate}}, _julian_date::Integer) + function set_julian(instance::GDateLike, _julian_date::Integer) ret = ccall(("g_date_set_julian", libglib), Nothing, (Ptr{_GDate}, UInt32), instance, _julian_date) nothing end - function set_month(instance::Union{GDate, Ref{_GDate}}, _month) + function set_month(instance::GDateLike, _month) ret = ccall(("g_date_set_month", libglib), Nothing, (Ptr{_GDate}, UInt32), instance, _month) nothing end - function set_parse(instance::Union{GDate, Ref{_GDate}}, _str::Union{AbstractString, Symbol}) + function set_parse(instance::GDateLike, _str::Union{AbstractString, Symbol}) ret = ccall(("g_date_set_parse", libglib), Nothing, (Ptr{_GDate}, Cstring), instance, _str) nothing end - function set_time_t(instance::Union{GDate, Ref{_GDate}}, _timet::Integer) + function set_time_t(instance::GDateLike, _timet::Integer) ret = ccall(("g_date_set_time_t", libglib), Nothing, (Ptr{_GDate}, Int64), instance, _timet) nothing end - function set_year(instance::Union{GDate, Ref{_GDate}}, _year::Integer) + function set_year(instance::GDateLike, _year::Integer) ret = ccall(("g_date_set_year", libglib), Nothing, (Ptr{_GDate}, UInt16), instance, _year) nothing end - function subtract_days(instance::Union{GDate, Ref{_GDate}}, _n_days::Integer) + function subtract_days(instance::GDateLike, _n_days::Integer) ret = ccall(("g_date_subtract_days", libglib), Nothing, (Ptr{_GDate}, UInt32), instance, _n_days) nothing end - function subtract_months(instance::Union{GDate, Ref{_GDate}}, _n_months::Integer) + function subtract_months(instance::GDateLike, _n_months::Integer) ret = ccall(("g_date_subtract_months", libglib), Nothing, (Ptr{_GDate}, UInt32), instance, _n_months) nothing end - function subtract_years(instance::Union{GDate, Ref{_GDate}}, _n_years::Integer) + function subtract_years(instance::GDateLike, _n_years::Integer) ret = ccall(("g_date_subtract_years", libglib), Nothing, (Ptr{_GDate}, UInt32), instance, _n_years) nothing end - function to_struct_tm(instance::Union{GDate, Ref{_GDate}}, _tm::Nothing) + function to_struct_tm(instance::GDateLike, _tm::Nothing) ret = ccall(("g_date_to_struct_tm", libglib), Nothing, (Ptr{_GDate}, Ptr{Nothing}), instance, _tm) nothing end - function valid(instance::Union{GDate, Ref{_GDate}}) + function valid(instance::GDateLike) ret = ccall(("g_date_valid", libglib), Cint, (Ptr{_GDate},), instance) ret2 = convert(Bool, ret) ret2 @@ -1480,156 +1480,156 @@ $(Expr(:toplevel, quote function String_new(_init::Maybe(Union{AbstractString, Symbol})) _init_maybe = nothing_to_null(_init) ret = ccall(("g_string_new", libglib), Ptr{_GString}, (Cstring,), _init_maybe) - ret2 = convert(Union{GString, Ref{_GString}}, ret, true) + ret2 = convert(GStringLike, ret, true) ret2 end function String_new_len(_init::Union{AbstractString, Symbol}, _len::Integer) ret = ccall(("g_string_new_len", libglib), Ptr{_GString}, (Cstring, Int64), _init, _len) - ret2 = convert(Union{GString, Ref{_GString}}, ret, true) + ret2 = convert(GStringLike, ret, true) ret2 end function String_new_take(_init::Maybe(Union{AbstractString, Symbol})) _init_maybe = nothing_to_null(_init) ret = ccall(("g_string_new_take", libglib), Ptr{_GString}, (Cstring,), _init_maybe) - ret2 = convert(Union{GString, Ref{_GString}}, ret, true) + ret2 = convert(GStringLike, ret, true) ret2 end function String_sized_new(_dfl_size::Integer) ret = ccall(("g_string_sized_new", libglib), Ptr{_GString}, (UInt64,), _dfl_size) - ret2 = convert(Union{GString, Ref{_GString}}, ret, true) + ret2 = convert(GStringLike, ret, true) ret2 end - function append(instance::Union{GString, Ref{_GString}}, _val::Union{AbstractString, Symbol}) + function append(instance::GStringLike, _val::Union{AbstractString, Symbol}) ret = ccall(("g_string_append", libglib), Ptr{_GString}, (Ptr{_GString}, Cstring), instance, _val) - ret2 = convert(Union{GString, Ref{_GString}}, ret, false) + ret2 = convert(GStringLike, ret, false) ret2 end - function append_c(instance::Union{GString, Ref{_GString}}, _c::Integer) + function append_c(instance::GStringLike, _c::Integer) ret = ccall(("g_string_append_c", libglib), Ptr{_GString}, (Ptr{_GString}, Int8), instance, _c) - ret2 = convert(Union{GString, Ref{_GString}}, ret, false) + ret2 = convert(GStringLike, ret, false) ret2 end - function append_len(instance::Union{GString, Ref{_GString}}, _val::Union{AbstractString, Symbol}, _len::Integer) + function append_len(instance::GStringLike, _val::Union{AbstractString, Symbol}, _len::Integer) ret = ccall(("g_string_append_len", libglib), Ptr{_GString}, (Ptr{_GString}, Cstring, Int64), instance, _val, _len) - ret2 = convert(Union{GString, Ref{_GString}}, ret, false) + ret2 = convert(GStringLike, ret, false) ret2 end - function append_unichar(instance::Union{GString, Ref{_GString}}, _wc) + function append_unichar(instance::GStringLike, _wc) ret = ccall(("g_string_append_unichar", libglib), Ptr{_GString}, (Ptr{_GString}, Nothing), instance, _wc) - ret2 = convert(Union{GString, Ref{_GString}}, ret, false) + ret2 = convert(GStringLike, ret, false) ret2 end - function append_uri_escaped(instance::Union{GString, Ref{_GString}}, _unescaped::Union{AbstractString, Symbol}, _reserved_chars_allowed::Union{AbstractString, Symbol}, _allow_utf8::Bool) + function append_uri_escaped(instance::GStringLike, _unescaped::Union{AbstractString, Symbol}, _reserved_chars_allowed::Union{AbstractString, Symbol}, _allow_utf8::Bool) ret = ccall(("g_string_append_uri_escaped", libglib), Ptr{_GString}, (Ptr{_GString}, Cstring, Cstring, Cint), instance, _unescaped, _reserved_chars_allowed, _allow_utf8) - ret2 = convert(Union{GString, Ref{_GString}}, ret, false) + ret2 = convert(GStringLike, ret, false) ret2 end - function ascii_down(instance::Union{GString, Ref{_GString}}) + function ascii_down(instance::GStringLike) ret = ccall(("g_string_ascii_down", libglib), Ptr{_GString}, (Ptr{_GString},), instance) - ret2 = convert(Union{GString, Ref{_GString}}, ret, false) + ret2 = convert(GStringLike, ret, false) ret2 end - function ascii_up(instance::Union{GString, Ref{_GString}}) + function ascii_up(instance::GStringLike) ret = ccall(("g_string_ascii_up", libglib), Ptr{_GString}, (Ptr{_GString},), instance) - ret2 = convert(Union{GString, Ref{_GString}}, ret, false) + ret2 = convert(GStringLike, ret, false) ret2 end - function assign(instance::Union{GString, Ref{_GString}}, _rval::Union{AbstractString, Symbol}) + function assign(instance::GStringLike, _rval::Union{AbstractString, Symbol}) ret = ccall(("g_string_assign", libglib), Ptr{_GString}, (Ptr{_GString}, Cstring), instance, _rval) - ret2 = convert(Union{GString, Ref{_GString}}, ret, false) + ret2 = convert(GStringLike, ret, false) ret2 end - function equal(instance::Union{GString, Ref{_GString}}, _v2::Union{GString, Ref{_GString}}) + function equal(instance::GStringLike, _v2::GStringLike) ret = ccall(("g_string_equal", libglib), Cint, (Ptr{_GString}, Ptr{_GString}), instance, _v2) ret2 = convert(Bool, ret) ret2 end - function erase(instance::Union{GString, Ref{_GString}}, _pos::Integer, _len::Integer) + function erase(instance::GStringLike, _pos::Integer, _len::Integer) ret = ccall(("g_string_erase", libglib), Ptr{_GString}, (Ptr{_GString}, Int64, Int64), instance, _pos, _len) - ret2 = convert(Union{GString, Ref{_GString}}, ret, false) + ret2 = convert(GStringLike, ret, false) ret2 end - function free(instance::Union{GString, Ref{_GString}}, _free_segment::Bool) + function free(instance::GStringLike, _free_segment::Bool) ret = ccall(("g_string_free", libglib), Cstring, (Ptr{_GString}, Cint), instance, _free_segment) ret2 = string_or_nothing(ret, true) ret2 end - function free_and_steal(instance::Union{GString, Ref{_GString}}) + function free_and_steal(instance::GStringLike) ret = ccall(("g_string_free_and_steal", libglib), Cstring, (Ptr{_GString},), instance) ret2 = string_or_nothing(ret, true) ret2 end - function free_to_bytes(instance::Union{GString, Ref{_GString}}) + function free_to_bytes(instance::GStringLike) ret = ccall(("g_string_free_to_bytes", libglib), Ptr{GBytes}, (Ptr{_GString},), instance) ret2 = convert(GBytes, ret, true) ret2 end - function hash(instance::Union{GString, Ref{_GString}}) + function hash(instance::GStringLike) ret = ccall(("g_string_hash", libglib), UInt32, (Ptr{_GString},), instance) ret end - function insert(instance::Union{GString, Ref{_GString}}, _pos::Integer, _val::Union{AbstractString, Symbol}) + function insert(instance::GStringLike, _pos::Integer, _val::Union{AbstractString, Symbol}) ret = ccall(("g_string_insert", libglib), Ptr{_GString}, (Ptr{_GString}, Int64, Cstring), instance, _pos, _val) - ret2 = convert(Union{GString, Ref{_GString}}, ret, false) + ret2 = convert(GStringLike, ret, false) ret2 end - function insert_c(instance::Union{GString, Ref{_GString}}, _pos::Integer, _c::Integer) + function insert_c(instance::GStringLike, _pos::Integer, _c::Integer) ret = ccall(("g_string_insert_c", libglib), Ptr{_GString}, (Ptr{_GString}, Int64, Int8), instance, _pos, _c) - ret2 = convert(Union{GString, Ref{_GString}}, ret, false) + ret2 = convert(GStringLike, ret, false) ret2 end - function insert_len(instance::Union{GString, Ref{_GString}}, _pos::Integer, _val::Union{AbstractString, Symbol}, _len::Integer) + function insert_len(instance::GStringLike, _pos::Integer, _val::Union{AbstractString, Symbol}, _len::Integer) ret = ccall(("g_string_insert_len", libglib), Ptr{_GString}, (Ptr{_GString}, Int64, Cstring, Int64), instance, _pos, _val, _len) - ret2 = convert(Union{GString, Ref{_GString}}, ret, false) + ret2 = convert(GStringLike, ret, false) ret2 end - function insert_unichar(instance::Union{GString, Ref{_GString}}, _pos::Integer, _wc) + function insert_unichar(instance::GStringLike, _pos::Integer, _wc) ret = ccall(("g_string_insert_unichar", libglib), Ptr{_GString}, (Ptr{_GString}, Int64, Nothing), instance, _pos, _wc) - ret2 = convert(Union{GString, Ref{_GString}}, ret, false) + ret2 = convert(GStringLike, ret, false) ret2 end - function overwrite(instance::Union{GString, Ref{_GString}}, _pos::Integer, _val::Union{AbstractString, Symbol}) + function overwrite(instance::GStringLike, _pos::Integer, _val::Union{AbstractString, Symbol}) ret = ccall(("g_string_overwrite", libglib), Ptr{_GString}, (Ptr{_GString}, UInt64, Cstring), instance, _pos, _val) - ret2 = convert(Union{GString, Ref{_GString}}, ret, false) + ret2 = convert(GStringLike, ret, false) ret2 end - function overwrite_len(instance::Union{GString, Ref{_GString}}, _pos::Integer, _val::Union{AbstractString, Symbol}, _len::Integer) + function overwrite_len(instance::GStringLike, _pos::Integer, _val::Union{AbstractString, Symbol}, _len::Integer) ret = ccall(("g_string_overwrite_len", libglib), Ptr{_GString}, (Ptr{_GString}, UInt64, Cstring, Int64), instance, _pos, _val, _len) - ret2 = convert(Union{GString, Ref{_GString}}, ret, false) + ret2 = convert(GStringLike, ret, false) ret2 end - function prepend(instance::Union{GString, Ref{_GString}}, _val::Union{AbstractString, Symbol}) + function prepend(instance::GStringLike, _val::Union{AbstractString, Symbol}) ret = ccall(("g_string_prepend", libglib), Ptr{_GString}, (Ptr{_GString}, Cstring), instance, _val) - ret2 = convert(Union{GString, Ref{_GString}}, ret, false) + ret2 = convert(GStringLike, ret, false) ret2 end - function prepend_c(instance::Union{GString, Ref{_GString}}, _c::Integer) + function prepend_c(instance::GStringLike, _c::Integer) ret = ccall(("g_string_prepend_c", libglib), Ptr{_GString}, (Ptr{_GString}, Int8), instance, _c) - ret2 = convert(Union{GString, Ref{_GString}}, ret, false) + ret2 = convert(GStringLike, ret, false) ret2 end - function prepend_len(instance::Union{GString, Ref{_GString}}, _val::Union{AbstractString, Symbol}, _len::Integer) + function prepend_len(instance::GStringLike, _val::Union{AbstractString, Symbol}, _len::Integer) ret = ccall(("g_string_prepend_len", libglib), Ptr{_GString}, (Ptr{_GString}, Cstring, Int64), instance, _val, _len) - ret2 = convert(Union{GString, Ref{_GString}}, ret, false) + ret2 = convert(GStringLike, ret, false) ret2 end - function prepend_unichar(instance::Union{GString, Ref{_GString}}, _wc) + function prepend_unichar(instance::GStringLike, _wc) ret = ccall(("g_string_prepend_unichar", libglib), Ptr{_GString}, (Ptr{_GString}, Nothing), instance, _wc) - ret2 = convert(Union{GString, Ref{_GString}}, ret, false) + ret2 = convert(GStringLike, ret, false) ret2 end - function replace(instance::Union{GString, Ref{_GString}}, _find::Union{AbstractString, Symbol}, _replace::Union{AbstractString, Symbol}, _limit::Integer) + function replace(instance::GStringLike, _find::Union{AbstractString, Symbol}, _replace::Union{AbstractString, Symbol}, _limit::Integer) ret = ccall(("g_string_replace", libglib), UInt32, (Ptr{_GString}, Cstring, Cstring, UInt32), instance, _find, _replace, _limit) ret end - function set_size(instance::Union{GString, Ref{_GString}}, _len::Integer) + function set_size(instance::GStringLike, _len::Integer) ret = ccall(("g_string_set_size", libglib), Ptr{_GString}, (Ptr{_GString}, UInt64), instance, _len) - ret2 = convert(Union{GString, Ref{_GString}}, ret, false) + ret2 = convert(GStringLike, ret, false) ret2 end - function truncate(instance::Union{GString, Ref{_GString}}, _len::Integer) + function truncate(instance::GStringLike, _len::Integer) ret = ccall(("g_string_truncate", libglib), Ptr{_GString}, (Ptr{_GString}, UInt64), instance, _len) - ret2 = convert(Union{GString, Ref{_GString}}, ret, false) + ret2 = convert(GStringLike, ret, false) ret2 end function TimeZone_new_identifier(_identifier::Maybe(Union{AbstractString, Symbol})) diff --git a/src/gen/glib_structs b/src/gen/glib_structs index 3c93f603..8313182a 100644 --- a/src/gen/glib_structs +++ b/src/gen/glib_structs @@ -1,58 +1,67 @@ quote $(Expr(:toplevel, quote - mutable struct GBookmarkFile <: GBoxed - handle::Ptr{GBookmarkFile} - begin - (GLib.g_type(::Type{T}) where T <: GBookmarkFile) = begin - ccall(("g_bookmark_file_get_type", libgobject), GType, ()) - end - function GBookmarkFile(ref::Ptr{T}, own::Bool = false) where T <: GBoxed - x = new(ref) - if own - finalizer(x) do x - GLib.delboxed(x) + begin + mutable struct GBookmarkFile <: GBoxed + handle::Ptr{GBookmarkFile} + begin + (GLib.g_type(::Type{T}) where T <: GBookmarkFile) = begin + ccall(("g_bookmark_file_get_type", libgobject), GType, ()) + end + function GBookmarkFile(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 - x + push!(gboxed_types, GBookmarkFile) end - push!(gboxed_types, GBookmarkFile) end + const GBookmarkFileLike = GBookmarkFile end - mutable struct GBytes <: GBoxed - handle::Ptr{GBytes} - begin - (GLib.g_type(::Type{T}) where T <: GBytes) = begin - ccall(("g_bytes_get_type", libgobject), GType, ()) - end - function GBytes(ref::Ptr{T}, own::Bool = false) where T <: GBoxed - x = new(ref) - if own - finalizer(x) do x - GLib.delboxed(x) + begin + mutable struct GBytes <: GBoxed + handle::Ptr{GBytes} + begin + (GLib.g_type(::Type{T}) where T <: GBytes) = begin + ccall(("g_bytes_get_type", libgobject), GType, ()) + end + function GBytes(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 - x + push!(gboxed_types, GBytes) end - push!(gboxed_types, GBytes) end + const GBytesLike = GBytes end - mutable struct GChecksum <: GBoxed - handle::Ptr{GChecksum} - begin - (GLib.g_type(::Type{T}) where T <: GChecksum) = begin - ccall(("g_checksum_get_type", libgobject), GType, ()) - end - function GChecksum(ref::Ptr{T}, own::Bool = false) where T <: GBoxed - x = new(ref) - if own - finalizer(x) do x - GLib.delboxed(x) + begin + mutable struct GChecksum <: GBoxed + handle::Ptr{GChecksum} + begin + (GLib.g_type(::Type{T}) where T <: GChecksum) = begin + ccall(("g_checksum_get_type", libgobject), GType, ()) + end + function GChecksum(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 - x + push!(gboxed_types, GChecksum) end - push!(gboxed_types, GChecksum) end + const GChecksumLike = GChecksum end begin mutable struct GDate <: GBoxed @@ -73,25 +82,29 @@ $(Expr(:toplevel, quote push!(gboxed_types, GDate) end end + const GDateLike = GDate const _GDate = GDate end - mutable struct GDateTime <: GBoxed - handle::Ptr{GDateTime} - begin - (GLib.g_type(::Type{T}) where T <: GDateTime) = begin - ccall(("g_date_time_get_type", libgobject), GType, ()) - end - function GDateTime(ref::Ptr{T}, own::Bool = false) where T <: GBoxed - x = new(ref) - if own - finalizer(x) do x - GLib.delboxed(x) + begin + mutable struct GDateTime <: GBoxed + handle::Ptr{GDateTime} + begin + (GLib.g_type(::Type{T}) where T <: GDateTime) = begin + ccall(("g_date_time_get_type", libgobject), GType, ()) end + function GDateTime(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 - x + push!(gboxed_types, GDateTime) end - push!(gboxed_types, GDateTime) end + const GDateTimeLike = GDateTime end begin struct _GDebugKey @@ -101,27 +114,36 @@ $(Expr(:toplevel, quote mutable struct GDebugKey handle::Ptr{_GDebugKey} end - unsafe_convert(::Type{Ptr{_GDebugKey}}, box::GDebugKey) = begin - convert(Ptr{_GDebugKey}, box.handle) - end - end - mutable struct GKeyFile <: GBoxed - handle::Ptr{GKeyFile} begin - (GLib.g_type(::Type{T}) where T <: GKeyFile) = begin - ccall(("g_key_file_get_type", libgobject), GType, ()) + unsafe_convert(::Type{Ptr{_GDebugKey}}, box::GDebugKey) = begin + convert(Ptr{_GDebugKey}, box.handle) + end + convert(::Type{GDebugKey}, p::Ptr{_GDebugKey}, owns = false) = begin + GDebugKey(p, owns) end - function GKeyFile(ref::Ptr{T}, own::Bool = false) where T <: GBoxed - x = new(ref) - if own - finalizer(x) do x - GLib.delboxed(x) + const GDebugKeyLike = Union{Ref{_GDebugKey}, GDebugKey} + end + end + begin + mutable struct GKeyFile <: GBoxed + handle::Ptr{GKeyFile} + begin + (GLib.g_type(::Type{T}) where T <: GKeyFile) = begin + ccall(("g_key_file_get_type", libgobject), GType, ()) end + function GKeyFile(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 - x + push!(gboxed_types, GKeyFile) end - push!(gboxed_types, GKeyFile) end + const GKeyFileLike = GKeyFile end begin struct _GLogField @@ -132,99 +154,120 @@ $(Expr(:toplevel, quote mutable struct GLogField handle::Ptr{_GLogField} end - unsafe_convert(::Type{Ptr{_GLogField}}, box::GLogField) = begin - convert(Ptr{_GLogField}, box.handle) - end - end - mutable struct GMainContext <: GBoxed - handle::Ptr{GMainContext} begin - (GLib.g_type(::Type{T}) where T <: GMainContext) = begin - ccall(("g_main_context_get_type", libgobject), GType, ()) + unsafe_convert(::Type{Ptr{_GLogField}}, box::GLogField) = begin + convert(Ptr{_GLogField}, box.handle) + end + convert(::Type{GLogField}, p::Ptr{_GLogField}, owns = false) = begin + GLogField(p, owns) end - function GMainContext(ref::Ptr{T}, own::Bool = false) where T <: GBoxed - x = new(ref) - if own - finalizer(x) do x - GLib.delboxed(x) + const GLogFieldLike = Union{Ref{_GLogField}, GLogField} + end + end + begin + mutable struct GMainContext <: GBoxed + handle::Ptr{GMainContext} + begin + (GLib.g_type(::Type{T}) where T <: GMainContext) = begin + ccall(("g_main_context_get_type", libgobject), GType, ()) end + function GMainContext(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 - x + push!(gboxed_types, GMainContext) end - push!(gboxed_types, GMainContext) end + const GMainContextLike = GMainContext end - mutable struct GMainLoop <: GBoxed - handle::Ptr{GMainLoop} - begin - (GLib.g_type(::Type{T}) where T <: GMainLoop) = begin - ccall(("g_main_loop_get_type", libgobject), GType, ()) - end - function GMainLoop(ref::Ptr{T}, own::Bool = false) where T <: GBoxed - x = new(ref) - if own - finalizer(x) do x - GLib.delboxed(x) + begin + mutable struct GMainLoop <: GBoxed + handle::Ptr{GMainLoop} + begin + (GLib.g_type(::Type{T}) where T <: GMainLoop) = begin + ccall(("g_main_loop_get_type", libgobject), GType, ()) end + function GMainLoop(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 - x + push!(gboxed_types, GMainLoop) end - push!(gboxed_types, GMainLoop) end + const GMainLoopLike = GMainLoop end - mutable struct GMappedFile <: GBoxed - handle::Ptr{GMappedFile} - begin - (GLib.g_type(::Type{T}) where T <: GMappedFile) = begin - ccall(("g_mapped_file_get_type", libgobject), GType, ()) - end - function GMappedFile(ref::Ptr{T}, own::Bool = false) where T <: GBoxed - x = new(ref) - if own - finalizer(x) do x - GLib.delboxed(x) + begin + mutable struct GMappedFile <: GBoxed + handle::Ptr{GMappedFile} + begin + (GLib.g_type(::Type{T}) where T <: GMappedFile) = begin + ccall(("g_mapped_file_get_type", libgobject), GType, ()) end + function GMappedFile(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 - x + push!(gboxed_types, GMappedFile) end - push!(gboxed_types, GMappedFile) end + const GMappedFileLike = GMappedFile end - mutable struct GMarkupParseContext <: GBoxed - handle::Ptr{GMarkupParseContext} - begin - (GLib.g_type(::Type{T}) where T <: GMarkupParseContext) = begin - ccall(("g_markup_parse_context_get_type", libgobject), GType, ()) - end - function GMarkupParseContext(ref::Ptr{T}, own::Bool = false) where T <: GBoxed - x = new(ref) - if own - finalizer(x) do x - GLib.delboxed(x) + begin + mutable struct GMarkupParseContext <: GBoxed + handle::Ptr{GMarkupParseContext} + begin + (GLib.g_type(::Type{T}) where T <: GMarkupParseContext) = begin + ccall(("g_markup_parse_context_get_type", libgobject), GType, ()) end + function GMarkupParseContext(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 - x + push!(gboxed_types, GMarkupParseContext) end - push!(gboxed_types, GMarkupParseContext) end + const GMarkupParseContextLike = GMarkupParseContext end - mutable struct GMatchInfo <: GBoxed - handle::Ptr{GMatchInfo} - begin - (GLib.g_type(::Type{T}) where T <: GMatchInfo) = begin - ccall(("g_match_info_get_type", libgobject), GType, ()) - end - function GMatchInfo(ref::Ptr{T}, own::Bool = false) where T <: GBoxed - x = new(ref) - if own - finalizer(x) do x - GLib.delboxed(x) + begin + mutable struct GMatchInfo <: GBoxed + handle::Ptr{GMatchInfo} + begin + (GLib.g_type(::Type{T}) where T <: GMatchInfo) = begin + ccall(("g_match_info_get_type", libgobject), GType, ()) + end + function GMatchInfo(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 - x + push!(gboxed_types, GMatchInfo) end - push!(gboxed_types, GMatchInfo) end + const GMatchInfoLike = GMatchInfo end begin struct _GOptionEntry @@ -239,45 +282,57 @@ $(Expr(:toplevel, quote mutable struct GOptionEntry handle::Ptr{_GOptionEntry} end - unsafe_convert(::Type{Ptr{_GOptionEntry}}, box::GOptionEntry) = begin - convert(Ptr{_GOptionEntry}, box.handle) - end - end - mutable struct GPatternSpec <: GBoxed - handle::Ptr{GPatternSpec} begin - (GLib.g_type(::Type{T}) where T <: GPatternSpec) = begin - ccall(("g_pattern_spec_get_type", libgobject), GType, ()) + unsafe_convert(::Type{Ptr{_GOptionEntry}}, box::GOptionEntry) = begin + convert(Ptr{_GOptionEntry}, box.handle) end - function GPatternSpec(ref::Ptr{T}, own::Bool = false) where T <: GBoxed - x = new(ref) - if own - finalizer(x) do x - GLib.delboxed(x) + convert(::Type{GOptionEntry}, p::Ptr{_GOptionEntry}, owns = false) = begin + GOptionEntry(p, owns) + end + const GOptionEntryLike = Union{Ref{_GOptionEntry}, GOptionEntry} + end + end + begin + mutable struct GPatternSpec <: GBoxed + handle::Ptr{GPatternSpec} + begin + (GLib.g_type(::Type{T}) where T <: GPatternSpec) = begin + ccall(("g_pattern_spec_get_type", libgobject), GType, ()) end + function GPatternSpec(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 - x + push!(gboxed_types, GPatternSpec) end - push!(gboxed_types, GPatternSpec) end + const GPatternSpecLike = GPatternSpec end - mutable struct GRegex <: GBoxed - handle::Ptr{GRegex} - begin - (GLib.g_type(::Type{T}) where T <: GRegex) = begin - ccall(("g_regex_get_type", libgobject), GType, ()) - end - function GRegex(ref::Ptr{T}, own::Bool = false) where T <: GBoxed - x = new(ref) - if own - finalizer(x) do x - GLib.delboxed(x) + begin + mutable struct GRegex <: GBoxed + handle::Ptr{GRegex} + begin + (GLib.g_type(::Type{T}) where T <: GRegex) = begin + ccall(("g_regex_get_type", libgobject), GType, ()) end + function GRegex(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 - x + push!(gboxed_types, GRegex) end - push!(gboxed_types, GRegex) end + const GRegexLike = GRegex end begin struct _GScannerConfig @@ -312,9 +367,15 @@ $(Expr(:toplevel, quote mutable struct GScannerConfig handle::Ptr{_GScannerConfig} end - unsafe_convert(::Type{Ptr{_GScannerConfig}}, box::GScannerConfig) = begin - convert(Ptr{_GScannerConfig}, box.handle) - end + begin + unsafe_convert(::Type{Ptr{_GScannerConfig}}, box::GScannerConfig) = begin + convert(Ptr{_GScannerConfig}, box.handle) + end + convert(::Type{GScannerConfig}, p::Ptr{_GScannerConfig}, owns = false) = begin + GScannerConfig(p, owns) + end + const GScannerConfigLike = Union{Ref{_GScannerConfig}, GScannerConfig} + end end begin mutable struct GSource <: GBoxed @@ -335,6 +396,7 @@ $(Expr(:toplevel, quote push!(gboxed_types, GSource) end end + const GSourceLike = GSource const _GSource = GSource end begin @@ -346,9 +408,15 @@ $(Expr(:toplevel, quote mutable struct GSourceCallbackFuncs handle::Ptr{_GSourceCallbackFuncs} end - unsafe_convert(::Type{Ptr{_GSourceCallbackFuncs}}, box::GSourceCallbackFuncs) = begin - convert(Ptr{_GSourceCallbackFuncs}, box.handle) - end + begin + unsafe_convert(::Type{Ptr{_GSourceCallbackFuncs}}, box::GSourceCallbackFuncs) = begin + convert(Ptr{_GSourceCallbackFuncs}, box.handle) + end + convert(::Type{GSourceCallbackFuncs}, p::Ptr{_GSourceCallbackFuncs}, owns = false) = begin + GSourceCallbackFuncs(p, owns) + end + const GSourceCallbackFuncsLike = Union{Ref{_GSourceCallbackFuncs}, GSourceCallbackFuncs} + end end begin struct _GString @@ -362,7 +430,7 @@ $(Expr(:toplevel, quote (GLib.g_type(::Type{T}) where T <: GString) = begin ccall(("g_gstring_get_type", libgobject), GType, ()) end - function GString(ref::Ptr{T}, own::Bool = false) where T <: GBoxed + function GString(ref::Ptr{T}, own::Bool = false) where T <: Union{GBoxed, _GString} x = new(ref) if own finalizer(x) do x @@ -374,9 +442,15 @@ $(Expr(:toplevel, quote push!(gboxed_types, GString) end end - unsafe_convert(::Type{Ptr{_GString}}, box::GString) = begin - convert(Ptr{_GString}, box.handle) - end + begin + unsafe_convert(::Type{Ptr{_GString}}, box::GString) = begin + convert(Ptr{_GString}, box.handle) + end + convert(::Type{GString}, p::Ptr{_GString}, owns = false) = begin + GString(p, owns) + end + const GStringLike = Union{Ref{_GString}, GString} + end end begin struct _GTestConfig @@ -390,99 +464,120 @@ $(Expr(:toplevel, quote mutable struct GTestConfig handle::Ptr{_GTestConfig} end - unsafe_convert(::Type{Ptr{_GTestConfig}}, box::GTestConfig) = begin - convert(Ptr{_GTestConfig}, box.handle) - end - end - mutable struct GTimeZone <: GBoxed - handle::Ptr{GTimeZone} begin - (GLib.g_type(::Type{T}) where T <: GTimeZone) = begin - ccall(("g_time_zone_get_type", libgobject), GType, ()) + unsafe_convert(::Type{Ptr{_GTestConfig}}, box::GTestConfig) = begin + convert(Ptr{_GTestConfig}, box.handle) end - function GTimeZone(ref::Ptr{T}, own::Bool = false) where T <: GBoxed - x = new(ref) - if own - finalizer(x) do x - GLib.delboxed(x) + convert(::Type{GTestConfig}, p::Ptr{_GTestConfig}, owns = false) = begin + GTestConfig(p, owns) + end + const GTestConfigLike = Union{Ref{_GTestConfig}, GTestConfig} + end + end + begin + mutable struct GTimeZone <: GBoxed + handle::Ptr{GTimeZone} + begin + (GLib.g_type(::Type{T}) where T <: GTimeZone) = begin + ccall(("g_time_zone_get_type", libgobject), GType, ()) + end + function GTimeZone(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 - x + push!(gboxed_types, GTimeZone) end - push!(gboxed_types, GTimeZone) end + const GTimeZoneLike = GTimeZone end - mutable struct GUri <: GBoxed - handle::Ptr{GUri} - begin - (GLib.g_type(::Type{T}) where T <: GUri) = begin - ccall(("g_uri_get_type", libgobject), GType, ()) - end - function GUri(ref::Ptr{T}, own::Bool = false) where T <: GBoxed - x = new(ref) - if own - finalizer(x) do x - GLib.delboxed(x) + begin + mutable struct GUri <: GBoxed + handle::Ptr{GUri} + begin + (GLib.g_type(::Type{T}) where T <: GUri) = begin + ccall(("g_uri_get_type", libgobject), GType, ()) end + function GUri(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 - x + push!(gboxed_types, GUri) end - push!(gboxed_types, GUri) end + const GUriLike = GUri end - mutable struct GVariantBuilder <: GBoxed - handle::Ptr{GVariantBuilder} - begin - (GLib.g_type(::Type{T}) where T <: GVariantBuilder) = begin - ccall(("g_variant_builder_get_type", libgobject), GType, ()) - end - function GVariantBuilder(ref::Ptr{T}, own::Bool = false) where T <: GBoxed - x = new(ref) - if own - finalizer(x) do x - GLib.delboxed(x) + begin + mutable struct GVariantBuilder <: GBoxed + handle::Ptr{GVariantBuilder} + begin + (GLib.g_type(::Type{T}) where T <: GVariantBuilder) = begin + ccall(("g_variant_builder_get_type", libgobject), GType, ()) end + function GVariantBuilder(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 - x + push!(gboxed_types, GVariantBuilder) end - push!(gboxed_types, GVariantBuilder) end + const GVariantBuilderLike = GVariantBuilder end - mutable struct GVariantDict <: GBoxed - handle::Ptr{GVariantDict} - begin - (GLib.g_type(::Type{T}) where T <: GVariantDict) = begin - ccall(("g_variant_dict_get_type", libgobject), GType, ()) - end - function GVariantDict(ref::Ptr{T}, own::Bool = false) where T <: GBoxed - x = new(ref) - if own - finalizer(x) do x - GLib.delboxed(x) + begin + mutable struct GVariantDict <: GBoxed + handle::Ptr{GVariantDict} + begin + (GLib.g_type(::Type{T}) where T <: GVariantDict) = begin + ccall(("g_variant_dict_get_type", libgobject), GType, ()) + end + function GVariantDict(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 - x + push!(gboxed_types, GVariantDict) end - push!(gboxed_types, GVariantDict) end + const GVariantDictLike = GVariantDict end - mutable struct GVariantType <: GBoxed - handle::Ptr{GVariantType} - begin - (GLib.g_type(::Type{T}) where T <: GVariantType) = begin - ccall(("g_variant_type_get_gtype", libgobject), GType, ()) - end - function GVariantType(ref::Ptr{T}, own::Bool = false) where T <: GBoxed - x = new(ref) - if own - finalizer(x) do x - GLib.delboxed(x) + begin + mutable struct GVariantType <: GBoxed + handle::Ptr{GVariantType} + begin + (GLib.g_type(::Type{T}) where T <: GVariantType) = begin + ccall(("g_variant_type_get_gtype", libgobject), GType, ()) end + function GVariantType(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 - x + push!(gboxed_types, GVariantType) end - push!(gboxed_types, GVariantType) end + const GVariantTypeLike = GVariantType end gboxed_cache_init() = begin append!(GLib.gboxed_types, gboxed_types) @@ -636,13 +731,13 @@ $(Expr(:toplevel, quote convert(Cint, ret) end function GHookCheckMarshaller(hook, marshal_data) - hook = convert(Union{GHook, Ref{_GHook}}, hook) + hook = convert(GHookLike, hook) f = marshal_data ret = f(hook) convert(Cint, ret) end function GHookFindFunc(hook, data) - hook = convert(Union{GHook, Ref{_GHook}}, hook) + hook = convert(GHookLike, hook) f = data ret = f(hook) convert(Cint, ret) @@ -653,13 +748,13 @@ $(Expr(:toplevel, quote nothing end function GHookMarshaller(hook, marshal_data) - hook = convert(Union{GHook, Ref{_GHook}}, hook) + hook = convert(GHookLike, hook) f = marshal_data ret = f(hook) nothing end function GIOFunc(source, condition, data) - source = convert(Union{GIOChannel, Ref{_GIOChannel}}, source, false) + source = convert(GIOChannelLike, source, false) condition = IOCondition(condition) f = data ret = f(source, condition) @@ -681,13 +776,13 @@ $(Expr(:toplevel, quote convert(UInt32, ret) end function GNodeForeachFunc(node, data) - node = convert(Union{GNode, Ref{_GNode}}, node) + node = convert(GNodeLike, node) f = data ret = f(node) nothing end function GNodeTraverseFunc(node, data) - node = convert(Union{GNode, Ref{_GNode}}, node) + node = convert(GNodeLike, node) f = data ret = f(node) convert(Cint, ret) @@ -715,7 +810,7 @@ $(Expr(:toplevel, quote end function GRegexEvalCallback(match_info, result, user_data) match_info = convert(GMatchInfo, match_info, false) - result = convert(Union{GString, Ref{_GString}}, result, false) + result = convert(GStringLike, result, false) f = user_data ret = f(match_info, result) convert(Cint, ret) @@ -791,6 +886,6 @@ $(Expr(:toplevel, quote ret = f(fd, condition) convert(Cint, ret) end - export GBookmarkFile, GBytes, GChecksum, GDate, _GDate, GDateTime, GDebugKey, _GDebugKey, GKeyFile, GLogField, _GLogField, GMainContext, GMainLoop, GMappedFile, GMarkupParseContext, GMatchInfo, GOptionEntry, _GOptionEntry, GPatternSpec, GRegex, GScannerConfig, _GScannerConfig, GSource, _GSource, GSourceCallbackFuncs, _GSourceCallbackFuncs, GString, _GString, GTestConfig, _GTestConfig, GTimeZone, GUri, GVariantBuilder, GVariantDict, GVariantType, GChildWatchFunc, GCompareDataFunc, GCopyFunc, GDataForeachFunc, GDestroyNotify, GDuplicateFunc, GEqualFuncFull, GFreeFunc, GFunc, GHFunc, GHRFunc, GHookCheckFunc, GHookCheckMarshaller, GHookFindFunc, GHookFunc, GHookMarshaller, GIOFunc, GLogFunc, GLogWriterFunc, GNodeForeachFunc, GNodeTraverseFunc, GOptionArgFunc, GOptionErrorFunc, GOptionParseFunc, GRegexEvalCallback, GSequenceIterCompareFunc, GSourceFunc, GSourceOnceFunc, GSpawnChildSetupFunc, GTestDataFunc, GTestFixtureFunc, GTestLogFatalFunc, GThreadFunc, GTranslateFunc, GTraverseFunc, GTraverseNodeFunc, GUnixFDSourceFunc + export GBookmarkFile, GBytes, GChecksum, GDate, GDateLike, _GDate, GDateTime, GDebugKey, GDebugKeyLike, _GDebugKey, GKeyFile, GLogField, GLogFieldLike, _GLogField, GMainContext, GMainLoop, GMappedFile, GMarkupParseContext, GMatchInfo, GOptionEntry, GOptionEntryLike, _GOptionEntry, GPatternSpec, GRegex, GScannerConfig, GScannerConfigLike, _GScannerConfig, GSource, GSourceLike, _GSource, GSourceCallbackFuncs, GSourceCallbackFuncsLike, _GSourceCallbackFuncs, GString, GStringLike, _GString, GTestConfig, GTestConfigLike, _GTestConfig, GTimeZone, GUri, GVariantBuilder, GVariantDict, GVariantType, GChildWatchFunc, GCompareDataFunc, GCopyFunc, GDataForeachFunc, GDestroyNotify, GDuplicateFunc, GEqualFuncFull, GFreeFunc, GFunc, GHFunc, GHRFunc, GHookCheckFunc, GHookCheckMarshaller, GHookFindFunc, GHookFunc, GHookMarshaller, GIOFunc, GLogFunc, GLogWriterFunc, GNodeForeachFunc, GNodeTraverseFunc, GOptionArgFunc, GOptionErrorFunc, GOptionParseFunc, GRegexEvalCallback, GSequenceIterCompareFunc, GSourceFunc, GSourceOnceFunc, GSpawnChildSetupFunc, GTestDataFunc, GTestFixtureFunc, GTestLogFatalFunc, GThreadFunc, GTranslateFunc, GTraverseFunc, GTraverseNodeFunc, GUnixFDSourceFunc end)) end diff --git a/src/gen/gobject_functions b/src/gen/gobject_functions index 372293ca..ac22a25e 100644 --- a/src/gen/gobject_functions +++ b/src/gen/gobject_functions @@ -13,19 +13,19 @@ $(Expr(:toplevel, quote ret = ccall(("g_clear_signal_handler", libgobject), Nothing, (Ptr{UInt64}, Ptr{GObject}), _handler_id_ptr, _instance) nothing end - function enum_get_value(_enum_class::Union{GEnumClass, Ref{_GEnumClass}}, _value::Integer) + function enum_get_value(_enum_class::GEnumClassLike, _value::Integer) ret = ccall(("g_enum_get_value", libgobject), Ptr{_GEnumValue}, (Ptr{_GEnumClass}, Int32), _enum_class, _value) - ret2 = convert(Union{GEnumValue, Ref{_GEnumValue}}, ret) + ret2 = convert(GEnumValueLike, ret) ret2 end - function enum_get_value_by_name(_enum_class::Union{GEnumClass, Ref{_GEnumClass}}, _name::Union{AbstractString, Symbol}) + function enum_get_value_by_name(_enum_class::GEnumClassLike, _name::Union{AbstractString, Symbol}) ret = ccall(("g_enum_get_value_by_name", libgobject), Ptr{_GEnumValue}, (Ptr{_GEnumClass}, Cstring), _enum_class, _name) - ret2 = convert(Union{GEnumValue, Ref{_GEnumValue}}, ret) + ret2 = convert(GEnumValueLike, ret) ret2 end - function enum_get_value_by_nick(_enum_class::Union{GEnumClass, Ref{_GEnumClass}}, _nick::Union{AbstractString, Symbol}) + function enum_get_value_by_nick(_enum_class::GEnumClassLike, _nick::Union{AbstractString, Symbol}) ret = ccall(("g_enum_get_value_by_nick", libgobject), Ptr{_GEnumValue}, (Ptr{_GEnumClass}, Cstring), _enum_class, _nick) - ret2 = convert(Union{GEnumValue, Ref{_GEnumValue}}, ret) + ret2 = convert(GEnumValueLike, ret) ret2 end function enum_to_string(_g_enum_type::Integer, _value::Integer) @@ -33,19 +33,19 @@ $(Expr(:toplevel, quote ret2 = string_or_nothing(ret, true) ret2 end - function flags_get_first_value(_flags_class::Union{GFlagsClass, Ref{_GFlagsClass}}, _value::Integer) + function flags_get_first_value(_flags_class::GFlagsClassLike, _value::Integer) ret = ccall(("g_flags_get_first_value", libgobject), Ptr{_GFlagsValue}, (Ptr{_GFlagsClass}, UInt32), _flags_class, _value) - ret2 = convert(Union{GFlagsValue, Ref{_GFlagsValue}}, ret) + ret2 = convert(GFlagsValueLike, ret) ret2 end - function flags_get_value_by_name(_flags_class::Union{GFlagsClass, Ref{_GFlagsClass}}, _name::Union{AbstractString, Symbol}) + function flags_get_value_by_name(_flags_class::GFlagsClassLike, _name::Union{AbstractString, Symbol}) ret = ccall(("g_flags_get_value_by_name", libgobject), Ptr{_GFlagsValue}, (Ptr{_GFlagsClass}, Cstring), _flags_class, _name) - ret2 = convert(Union{GFlagsValue, Ref{_GFlagsValue}}, ret) + ret2 = convert(GFlagsValueLike, ret) ret2 end - function flags_get_value_by_nick(_flags_class::Union{GFlagsClass, Ref{_GFlagsClass}}, _nick::Union{AbstractString, Symbol}) + function flags_get_value_by_nick(_flags_class::GFlagsClassLike, _nick::Union{AbstractString, Symbol}) ret = ccall(("g_flags_get_value_by_nick", libgobject), Ptr{_GFlagsValue}, (Ptr{_GFlagsClass}, Cstring), _flags_class, _nick) - ret2 = convert(Union{GFlagsValue, Ref{_GFlagsValue}}, ret) + ret2 = convert(GFlagsValueLike, ret) ret2 end function flags_to_string(_flags_type::Integer, _value::Integer) @@ -57,7 +57,7 @@ $(Expr(:toplevel, quote ret = ccall(("g_gtype_get_type", libgobject), UInt64, ()) ret end - function param_value_is_valid(_pspec::GParam, _value::Union{GValue, Ref{_GValue}}) + function param_value_is_valid(_pspec::GParam, _value::GValueLike) ret = ccall(("g_param_value_is_valid", libgobject), Cint, (Ptr{GParam}, Ptr{_GValue}), _pspec, _value) ret2 = convert(Bool, ret) ret2 @@ -66,14 +66,14 @@ $(Expr(:toplevel, quote ret = ccall(("g_pointer_type_register_static", libgobject), UInt64, (Cstring,), _name) ret end - function signal_chain_from_overridden(_instance_and_params, _return_value::Union{GValue, Ref{_GValue}}) + function signal_chain_from_overridden(_instance_and_params, _return_value::GValueLike) _instance_and_params_arr = convert(Vector{_GValue}, _instance_and_params) ret = ccall(("g_signal_chain_from_overridden", libgobject), Nothing, (Ptr{_GValue}, Ptr{_GValue}), _instance_and_params_arr, _return_value) nothing end function signal_get_invocation_hint(_instance::GObject) ret = ccall(("g_signal_get_invocation_hint", libgobject), Ptr{_GSignalInvocationHint}, (Ptr{GObject},), _instance) - ret2 = convert(Union{GSignalInvocationHint, Ref{_GSignalInvocationHint}}, ret) + ret2 = convert(GSignalInvocationHintLike, ret) ret2 end function signal_handler_block(_instance::GObject, _handler_id::Integer) @@ -155,7 +155,7 @@ $(Expr(:toplevel, quote ret = ccall(("g_signal_stop_emission_by_name", libgobject), Nothing, (Ptr{GObject}, Cstring), _instance, _detailed_signal) nothing end - function strdup_value_contents(_value::Union{GValue, Ref{_GValue}}) + function strdup_value_contents(_value::GValueLike) ret = ccall(("g_strdup_value_contents", libgobject), Cstring, (Ptr{_GValue},), _value) ret2 = string_or_nothing(ret, true) ret2 @@ -172,11 +172,11 @@ $(Expr(:toplevel, quote ret = ccall(("g_type_add_interface_dynamic", libgobject), Nothing, (UInt64, UInt64, Ptr{GObject}), _instance_type, _interface_type, _plugin) nothing end - function type_add_interface_static(_instance_type::Integer, _interface_type::Integer, _info::Union{GInterfaceInfo, Ref{_GInterfaceInfo}}) + function type_add_interface_static(_instance_type::Integer, _interface_type::Integer, _info::GInterfaceInfoLike) ret = ccall(("g_type_add_interface_static", libgobject), Nothing, (UInt64, UInt64, Ptr{_GInterfaceInfo}), _instance_type, _interface_type, _info) nothing end - function type_check_class_is_a(_g_class::Union{GTypeClass, Ref{_GTypeClass}}, _is_a_type::Integer) + function type_check_class_is_a(_g_class::GTypeClassLike, _is_a_type::Integer) ret = ccall(("g_type_check_class_is_a", libgobject), Cint, (Ptr{_GTypeClass}, UInt64), _g_class, _is_a_type) ret2 = convert(Bool, ret) ret2 @@ -186,12 +186,12 @@ $(Expr(:toplevel, quote ret2 = convert(Bool, ret) ret2 end - function type_check_value(_value::Union{GValue, Ref{_GValue}}) + function type_check_value(_value::GValueLike) ret = ccall(("g_type_check_value", libgobject), Cint, (Ptr{_GValue},), _value) ret2 = convert(Bool, ret) ret2 end - function type_check_value_holds(_value::Union{GValue, Ref{_GValue}}, _type::Integer) + function type_check_value_holds(_value::GValueLike, _type::Integer) ret = ccall(("g_type_check_value_holds", libgobject), Cint, (Ptr{_GValue}, UInt64), _value, _type) ret2 = convert(Bool, ret) ret2 @@ -214,27 +214,27 @@ $(Expr(:toplevel, quote end function type_class_peek(_type::Integer) ret = ccall(("g_type_class_peek", libgobject), Ptr{_GTypeClass}, (UInt64,), _type) - ret2 = convert(Union{GTypeClass, Ref{_GTypeClass}}, ret) + ret2 = convert(GTypeClassLike, ret) ret2 end function type_class_peek_static(_type::Integer) ret = ccall(("g_type_class_peek_static", libgobject), Ptr{_GTypeClass}, (UInt64,), _type) - ret2 = convert(Union{GTypeClass, Ref{_GTypeClass}}, ret) + ret2 = convert(GTypeClassLike, ret) ret2 end function type_class_ref(_type::Integer) ret = ccall(("g_type_class_ref", libgobject), Ptr{_GTypeClass}, (UInt64,), _type) - ret2 = convert(Union{GTypeClass, Ref{_GTypeClass}}, ret) + ret2 = convert(GTypeClassLike, ret) ret2 end function type_default_interface_peek(_g_type::Integer) ret = ccall(("g_type_default_interface_peek", libgobject), Ptr{_GTypeInterface}, (UInt64,), _g_type) - ret2 = convert(Union{GTypeInterface, Ref{_GTypeInterface}}, ret) + ret2 = convert(GTypeInterfaceLike, ret) ret2 end function type_default_interface_ref(_g_type::Integer) ret = ccall(("g_type_default_interface_ref", libgobject), Ptr{_GTypeInterface}, (UInt64,), _g_type) - ret2 = convert(Union{GTypeInterface, Ref{_GTypeInterface}}, ret) + ret2 = convert(GTypeInterfaceLike, ret) ret2 end function type_depth(_type::Integer) @@ -290,9 +290,9 @@ $(Expr(:toplevel, quote ret = ccall(("g_type_interface_instantiatable_prerequisite", libgobject), UInt64, (UInt64,), _interface_type) ret end - function type_interface_peek(_instance_class::Union{GTypeClass, Ref{_GTypeClass}}, _iface_type::Integer) + function type_interface_peek(_instance_class::GTypeClassLike, _iface_type::Integer) ret = ccall(("g_type_interface_peek", libgobject), Ptr{_GTypeInterface}, (Ptr{_GTypeClass}, UInt64), _instance_class, _iface_type) - ret2 = convert(Union{GTypeInterface, Ref{_GTypeInterface}}, ret) + ret2 = convert(GTypeInterfaceLike, ret) ret2 end function type_interface_prerequisites(_interface_type::Integer) @@ -317,7 +317,7 @@ $(Expr(:toplevel, quote _n_interfaces = m_n_interfaces[] ret2 end - function type_name_from_class(_g_class::Union{GTypeClass, Ref{_GTypeClass}}) + function type_name_from_class(_g_class::GTypeClassLike) ret = ccall(("g_type_name_from_class", libgobject), Cstring, (Ptr{_GTypeClass},), _g_class) ret2 = string_or_nothing(ret, false) ret2 @@ -341,7 +341,7 @@ $(Expr(:toplevel, quote ret = ccall(("g_type_register_dynamic", libgobject), UInt64, (UInt64, Cstring, Ptr{GObject}, UInt32), _parent_type, _type_name, _plugin, _flags) ret end - function type_register_static(_parent_type::Integer, _type_name::Union{AbstractString, Symbol}, _info::Union{GTypeInfo, Ref{_GTypeInfo}}, _flags) + function type_register_static(_parent_type::Integer, _type_name::Union{AbstractString, Symbol}, _info::GTypeInfoLike, _flags) ret = ccall(("g_type_register_static", libgobject), UInt64, (UInt64, Cstring, Ptr{_GTypeInfo}, UInt32), _parent_type, _type_name, _info, _flags) ret end diff --git a/src/gen/gobject_methods b/src/gen/gobject_methods index 4894bce2..16c13ab2 100644 --- a/src/gen/gobject_methods +++ b/src/gen/gobject_methods @@ -1,248 +1,248 @@ quote $(Expr(:toplevel, quote - function copy(instance::Union{GValue, Ref{_GValue}}, _dest_value::Union{GValue, Ref{_GValue}}) + function copy(instance::GValueLike, _dest_value::GValueLike) ret = ccall(("g_value_copy", libgobject), Nothing, (Ptr{_GValue}, Ptr{_GValue}), instance, _dest_value) nothing end - function dup_object(instance::Union{GValue, Ref{_GValue}}) + function dup_object(instance::GValueLike) ret = ccall(("g_value_dup_object", libgobject), Ptr{GObject}, (Ptr{_GValue},), instance) ret2 = convert_if_not_null(GObject, ret, true) ret2 end - function dup_string(instance::Union{GValue, Ref{_GValue}}) + function dup_string(instance::GValueLike) ret = ccall(("g_value_dup_string", libgobject), Cstring, (Ptr{_GValue},), instance) ret2 = string_or_nothing(ret, true) ret2 end - function dup_variant(instance::Union{GValue, Ref{_GValue}}) + function dup_variant(instance::GValueLike) ret = ccall(("g_value_dup_variant", libgobject), Ptr{GVariant}, (Ptr{_GValue},), instance) ret2 = convert(GVariant, ret) ret2 end - function fits_pointer(instance::Union{GValue, Ref{_GValue}}) + function fits_pointer(instance::GValueLike) ret = ccall(("g_value_fits_pointer", libgobject), Cint, (Ptr{_GValue},), instance) ret2 = convert(Bool, ret) ret2 end - function get_boolean(instance::Union{GValue, Ref{_GValue}}) + function get_boolean(instance::GValueLike) ret = ccall(("g_value_get_boolean", libgobject), Cint, (Ptr{_GValue},), instance) ret2 = convert(Bool, ret) ret2 end - function get_boxed(instance::Union{GValue, Ref{_GValue}}) + function get_boxed(instance::GValueLike) ret = ccall(("g_value_get_boxed", libgobject), Ptr{Nothing}, (Ptr{_GValue},), instance) ret2 = convert(Nothing, ret) ret2 end - function get_double(instance::Union{GValue, Ref{_GValue}}) + function get_double(instance::GValueLike) ret = ccall(("g_value_get_double", libgobject), Float64, (Ptr{_GValue},), instance) ret end - function get_enum(instance::Union{GValue, Ref{_GValue}}) + function get_enum(instance::GValueLike) ret = ccall(("g_value_get_enum", libgobject), Int32, (Ptr{_GValue},), instance) ret end - function get_flags(instance::Union{GValue, Ref{_GValue}}) + function get_flags(instance::GValueLike) ret = ccall(("g_value_get_flags", libgobject), UInt32, (Ptr{_GValue},), instance) ret end - function get_float(instance::Union{GValue, Ref{_GValue}}) + function get_float(instance::GValueLike) ret = ccall(("g_value_get_float", libgobject), Float32, (Ptr{_GValue},), instance) ret end - function get_gtype(instance::Union{GValue, Ref{_GValue}}) + function get_gtype(instance::GValueLike) ret = ccall(("g_value_get_gtype", libgobject), UInt64, (Ptr{_GValue},), instance) ret end - function get_int(instance::Union{GValue, Ref{_GValue}}) + function get_int(instance::GValueLike) ret = ccall(("g_value_get_int", libgobject), Int32, (Ptr{_GValue},), instance) ret end - function get_int64(instance::Union{GValue, Ref{_GValue}}) + function get_int64(instance::GValueLike) ret = ccall(("g_value_get_int64", libgobject), Int64, (Ptr{_GValue},), instance) ret end - function get_long(instance::Union{GValue, Ref{_GValue}}) + function get_long(instance::GValueLike) ret = ccall(("g_value_get_long", libgobject), Int64, (Ptr{_GValue},), instance) ret end - function get_object(instance::Union{GValue, Ref{_GValue}}) + function get_object(instance::GValueLike) ret = ccall(("g_value_get_object", libgobject), Ptr{GObject}, (Ptr{_GValue},), instance) ret2 = convert_if_not_null(GObject, ret, false) ret2 end - function get_pointer(instance::Union{GValue, Ref{_GValue}}) + function get_pointer(instance::GValueLike) ret = ccall(("g_value_get_pointer", libgobject), Ptr{Nothing}, (Ptr{_GValue},), instance) ret2 = convert(Nothing, ret) ret2 end - function get_schar(instance::Union{GValue, Ref{_GValue}}) + function get_schar(instance::GValueLike) ret = ccall(("g_value_get_schar", libgobject), Int8, (Ptr{_GValue},), instance) ret end - function get_string(instance::Union{GValue, Ref{_GValue}}) + function get_string(instance::GValueLike) ret = ccall(("g_value_get_string", libgobject), Cstring, (Ptr{_GValue},), instance) ret2 = string_or_nothing(ret, false) ret2 end - function get_uchar(instance::Union{GValue, Ref{_GValue}}) + function get_uchar(instance::GValueLike) ret = ccall(("g_value_get_uchar", libgobject), UInt8, (Ptr{_GValue},), instance) ret end - function get_uint(instance::Union{GValue, Ref{_GValue}}) + function get_uint(instance::GValueLike) ret = ccall(("g_value_get_uint", libgobject), UInt32, (Ptr{_GValue},), instance) ret end - function get_uint64(instance::Union{GValue, Ref{_GValue}}) + function get_uint64(instance::GValueLike) ret = ccall(("g_value_get_uint64", libgobject), UInt64, (Ptr{_GValue},), instance) ret end - function get_ulong(instance::Union{GValue, Ref{_GValue}}) + function get_ulong(instance::GValueLike) ret = ccall(("g_value_get_ulong", libgobject), UInt64, (Ptr{_GValue},), instance) ret end - function get_variant(instance::Union{GValue, Ref{_GValue}}) + function get_variant(instance::GValueLike) ret = ccall(("g_value_get_variant", libgobject), Ptr{GVariant}, (Ptr{_GValue},), instance) ret2 = convert(GVariant, ret) ret2 end - function init(instance::Union{GValue, Ref{_GValue}}, _g_type::Integer) + function init(instance::GValueLike, _g_type::Integer) ret = ccall(("g_value_init", libgobject), Ptr{_GValue}, (Ptr{_GValue}, UInt64), instance, _g_type) - ret2 = convert(Union{GValue, Ref{_GValue}}, ret, false) + ret2 = convert(GValueLike, ret, false) ret2 end - function peek_pointer(instance::Union{GValue, Ref{_GValue}}) + function peek_pointer(instance::GValueLike) ret = ccall(("g_value_peek_pointer", libgobject), Ptr{Nothing}, (Ptr{_GValue},), instance) ret2 = convert(Nothing, ret) ret2 end - function reset(instance::Union{GValue, Ref{_GValue}}) + function reset(instance::GValueLike) ret = ccall(("g_value_reset", libgobject), Ptr{_GValue}, (Ptr{_GValue},), instance) - ret2 = convert(Union{GValue, Ref{_GValue}}, ret, true) + ret2 = convert(GValueLike, ret, true) ret2 end - function set_boolean(instance::Union{GValue, Ref{_GValue}}, _v_boolean::Bool) + function set_boolean(instance::GValueLike, _v_boolean::Bool) ret = ccall(("g_value_set_boolean", libgobject), Nothing, (Ptr{_GValue}, Cint), instance, _v_boolean) nothing end - function set_boxed(instance::Union{GValue, Ref{_GValue}}, _v_boxed::Maybe(Nothing)) + function set_boxed(instance::GValueLike, _v_boxed::Maybe(Nothing)) _v_boxed_maybe = nothing_to_null(_v_boxed) ret = ccall(("g_value_set_boxed", libgobject), Nothing, (Ptr{_GValue}, Ptr{Nothing}), instance, _v_boxed_maybe) nothing end - function set_double(instance::Union{GValue, Ref{_GValue}}, _v_double::Real) + function set_double(instance::GValueLike, _v_double::Real) ret = ccall(("g_value_set_double", libgobject), Nothing, (Ptr{_GValue}, Float64), instance, _v_double) nothing end - function set_enum(instance::Union{GValue, Ref{_GValue}}, _v_enum::Integer) + function set_enum(instance::GValueLike, _v_enum::Integer) ret = ccall(("g_value_set_enum", libgobject), Nothing, (Ptr{_GValue}, Int32), instance, _v_enum) nothing end - function set_flags(instance::Union{GValue, Ref{_GValue}}, _v_flags::Integer) + function set_flags(instance::GValueLike, _v_flags::Integer) ret = ccall(("g_value_set_flags", libgobject), Nothing, (Ptr{_GValue}, UInt32), instance, _v_flags) nothing end - function set_float(instance::Union{GValue, Ref{_GValue}}, _v_float::Real) + function set_float(instance::GValueLike, _v_float::Real) ret = ccall(("g_value_set_float", libgobject), Nothing, (Ptr{_GValue}, Float32), instance, _v_float) nothing end - function set_gtype(instance::Union{GValue, Ref{_GValue}}, _v_gtype::Integer) + function set_gtype(instance::GValueLike, _v_gtype::Integer) ret = ccall(("g_value_set_gtype", libgobject), Nothing, (Ptr{_GValue}, UInt64), instance, _v_gtype) nothing end - function set_instance(instance::Union{GValue, Ref{_GValue}}, _instance::Maybe(Nothing)) + function set_instance(instance::GValueLike, _instance::Maybe(Nothing)) _instance_maybe = nothing_to_null(_instance) ret = ccall(("g_value_set_instance", libgobject), Nothing, (Ptr{_GValue}, Ptr{Nothing}), instance, _instance_maybe) nothing end - function set_int(instance::Union{GValue, Ref{_GValue}}, _v_int::Integer) + function set_int(instance::GValueLike, _v_int::Integer) ret = ccall(("g_value_set_int", libgobject), Nothing, (Ptr{_GValue}, Int32), instance, _v_int) nothing end - function set_int64(instance::Union{GValue, Ref{_GValue}}, _v_int64::Integer) + function set_int64(instance::GValueLike, _v_int64::Integer) ret = ccall(("g_value_set_int64", libgobject), Nothing, (Ptr{_GValue}, Int64), instance, _v_int64) nothing end - function set_interned_string(instance::Union{GValue, Ref{_GValue}}, _v_string::Maybe(Union{AbstractString, Symbol})) + function set_interned_string(instance::GValueLike, _v_string::Maybe(Union{AbstractString, Symbol})) _v_string_maybe = nothing_to_null(_v_string) ret = ccall(("g_value_set_interned_string", libgobject), Nothing, (Ptr{_GValue}, Cstring), instance, _v_string_maybe) nothing end - function set_long(instance::Union{GValue, Ref{_GValue}}, _v_long::Integer) + function set_long(instance::GValueLike, _v_long::Integer) ret = ccall(("g_value_set_long", libgobject), Nothing, (Ptr{_GValue}, Int64), instance, _v_long) nothing end - function set_object(instance::Union{GValue, Ref{_GValue}}, _v_object::Maybe(GObject)) + function set_object(instance::GValueLike, _v_object::Maybe(GObject)) _v_object_maybe = nothing_to_null(_v_object) ret = ccall(("g_value_set_object", libgobject), Nothing, (Ptr{_GValue}, Ptr{GObject}), instance, _v_object_maybe) nothing end - function set_pointer(instance::Union{GValue, Ref{_GValue}}, _v_pointer::Maybe(Nothing)) + function set_pointer(instance::GValueLike, _v_pointer::Maybe(Nothing)) _v_pointer_maybe = nothing_to_null(_v_pointer) ret = ccall(("g_value_set_pointer", libgobject), Nothing, (Ptr{_GValue}, Ptr{Nothing}), instance, _v_pointer_maybe) nothing end - function set_schar(instance::Union{GValue, Ref{_GValue}}, _v_char::Integer) + function set_schar(instance::GValueLike, _v_char::Integer) ret = ccall(("g_value_set_schar", libgobject), Nothing, (Ptr{_GValue}, Int8), instance, _v_char) nothing end - function set_static_boxed(instance::Union{GValue, Ref{_GValue}}, _v_boxed::Maybe(Nothing)) + function set_static_boxed(instance::GValueLike, _v_boxed::Maybe(Nothing)) _v_boxed_maybe = nothing_to_null(_v_boxed) ret = ccall(("g_value_set_static_boxed", libgobject), Nothing, (Ptr{_GValue}, Ptr{Nothing}), instance, _v_boxed_maybe) nothing end - function set_static_string(instance::Union{GValue, Ref{_GValue}}, _v_string::Maybe(Union{AbstractString, Symbol})) + function set_static_string(instance::GValueLike, _v_string::Maybe(Union{AbstractString, Symbol})) _v_string_maybe = nothing_to_null(_v_string) ret = ccall(("g_value_set_static_string", libgobject), Nothing, (Ptr{_GValue}, Cstring), instance, _v_string_maybe) nothing end - function set_string(instance::Union{GValue, Ref{_GValue}}, _v_string::Maybe(Union{AbstractString, Symbol})) + function set_string(instance::GValueLike, _v_string::Maybe(Union{AbstractString, Symbol})) _v_string_maybe = nothing_to_null(_v_string) ret = ccall(("g_value_set_string", libgobject), Nothing, (Ptr{_GValue}, Cstring), instance, _v_string_maybe) nothing end - function set_uchar(instance::Union{GValue, Ref{_GValue}}, _v_uchar::Integer) + function set_uchar(instance::GValueLike, _v_uchar::Integer) ret = ccall(("g_value_set_uchar", libgobject), Nothing, (Ptr{_GValue}, UInt8), instance, _v_uchar) nothing end - function set_uint(instance::Union{GValue, Ref{_GValue}}, _v_uint::Integer) + function set_uint(instance::GValueLike, _v_uint::Integer) ret = ccall(("g_value_set_uint", libgobject), Nothing, (Ptr{_GValue}, UInt32), instance, _v_uint) nothing end - function set_uint64(instance::Union{GValue, Ref{_GValue}}, _v_uint64::Integer) + function set_uint64(instance::GValueLike, _v_uint64::Integer) ret = ccall(("g_value_set_uint64", libgobject), Nothing, (Ptr{_GValue}, UInt64), instance, _v_uint64) nothing end - function set_ulong(instance::Union{GValue, Ref{_GValue}}, _v_ulong::Integer) + function set_ulong(instance::GValueLike, _v_ulong::Integer) ret = ccall(("g_value_set_ulong", libgobject), Nothing, (Ptr{_GValue}, UInt64), instance, _v_ulong) nothing end - function set_variant(instance::Union{GValue, Ref{_GValue}}, _variant::Maybe(GVariant)) + function set_variant(instance::GValueLike, _variant::Maybe(GVariant)) _variant_maybe = nothing_to_null(_variant) ret = ccall(("g_value_set_variant", libgobject), Nothing, (Ptr{_GValue}, Ptr{GVariant}), instance, _variant_maybe) nothing end - function take_boxed(instance::Union{GValue, Ref{_GValue}}, _v_boxed::Maybe(Nothing)) + function take_boxed(instance::GValueLike, _v_boxed::Maybe(Nothing)) _v_boxed_maybe = nothing_to_null(_v_boxed) ret = ccall(("g_value_take_boxed", libgobject), Nothing, (Ptr{_GValue}, Ptr{Nothing}), instance, _v_boxed_maybe) nothing end - function take_string(instance::Union{GValue, Ref{_GValue}}, _v_string::Maybe(Union{AbstractString, Symbol})) + function take_string(instance::GValueLike, _v_string::Maybe(Union{AbstractString, Symbol})) _v_string_maybe = nothing_to_null(_v_string) ret = ccall(("g_value_take_string", libgobject), Nothing, (Ptr{_GValue}, Cstring), instance, _v_string_maybe) nothing end - function take_variant(instance::Union{GValue, Ref{_GValue}}, _variant::Maybe(GVariant)) + function take_variant(instance::GValueLike, _variant::Maybe(GVariant)) _variant_maybe = nothing_to_null(_variant) ret = ccall(("g_value_take_variant", libgobject), Nothing, (Ptr{_GValue}, Ptr{GVariant}), instance, _variant_maybe) nothing end - function transform(instance::Union{GValue, Ref{_GValue}}, _dest_value::Union{GValue, Ref{_GValue}}) + function transform(instance::GValueLike, _dest_value::GValueLike) ret = ccall(("g_value_transform", libgobject), Cint, (Ptr{_GValue}, Ptr{_GValue}), instance, _dest_value) ret2 = convert(Bool, ret) ret2 end - function unset(instance::Union{GValue, Ref{_GValue}}) + function unset(instance::GValueLike) ret = ccall(("g_value_unset", libgobject), Nothing, (Ptr{_GValue},), instance) nothing end @@ -298,7 +298,7 @@ $(Expr(:toplevel, quote ret2 = convert(Nothing, ret) ret2 end - function get_property(instance::GObject, _property_name::Union{AbstractString, Symbol}, _value::Union{GValue, Ref{_GValue}}) + function get_property(instance::GObject, _property_name::Union{AbstractString, Symbol}, _value::GValueLike) ret = ccall(("g_object_get_property", libgobject), Nothing, (Ptr{GObject}, Cstring, Ptr{_GValue}), instance, _property_name, _value) nothing end @@ -335,7 +335,7 @@ $(Expr(:toplevel, quote ret = ccall(("g_object_set_data", libgobject), Nothing, (Ptr{GObject}, Cstring, Ptr{Nothing}), instance, _key, _data_maybe) nothing end - function set_property(instance::GObject, _property_name::Union{AbstractString, Symbol}, _value::Union{GValue, Ref{_GValue}}) + function set_property(instance::GObject, _property_name::Union{AbstractString, Symbol}, _value::GValueLike) ret = ccall(("g_object_set_property", libgobject), Nothing, (Ptr{GObject}, Cstring, Ptr{_GValue}), instance, _property_name, _value) nothing end diff --git a/src/gen/gobject_structs b/src/gen/gobject_structs index 33250194..a7c5d19c 100644 --- a/src/gen/gobject_structs +++ b/src/gen/gobject_structs @@ -9,9 +9,15 @@ $(Expr(:toplevel, quote mutable struct GEnumValue handle::Ptr{_GEnumValue} end - unsafe_convert(::Type{Ptr{_GEnumValue}}, box::GEnumValue) = begin - convert(Ptr{_GEnumValue}, box.handle) - end + begin + unsafe_convert(::Type{Ptr{_GEnumValue}}, box::GEnumValue) = begin + convert(Ptr{_GEnumValue}, box.handle) + end + convert(::Type{GEnumValue}, p::Ptr{_GEnumValue}, owns = false) = begin + GEnumValue(p, owns) + end + const GEnumValueLike = Union{Ref{_GEnumValue}, GEnumValue} + end end begin struct _GTypeClass @@ -20,9 +26,15 @@ $(Expr(:toplevel, quote mutable struct GTypeClass handle::Ptr{_GTypeClass} end - unsafe_convert(::Type{Ptr{_GTypeClass}}, box::GTypeClass) = begin - convert(Ptr{_GTypeClass}, box.handle) - end + begin + unsafe_convert(::Type{Ptr{_GTypeClass}}, box::GTypeClass) = begin + convert(Ptr{_GTypeClass}, box.handle) + end + convert(::Type{GTypeClass}, p::Ptr{_GTypeClass}, owns = false) = begin + GTypeClass(p, owns) + end + const GTypeClassLike = Union{Ref{_GTypeClass}, GTypeClass} + end end begin struct _GTypeInterface @@ -32,9 +44,15 @@ $(Expr(:toplevel, quote mutable struct GTypeInterface handle::Ptr{_GTypeInterface} end - unsafe_convert(::Type{Ptr{_GTypeInterface}}, box::GTypeInterface) = begin - convert(Ptr{_GTypeInterface}, box.handle) - end + begin + unsafe_convert(::Type{Ptr{_GTypeInterface}}, box::GTypeInterface) = begin + convert(Ptr{_GTypeInterface}, box.handle) + end + convert(::Type{GTypeInterface}, p::Ptr{_GTypeInterface}, owns = false) = begin + GTypeInterface(p, owns) + end + const GTypeInterfaceLike = Union{Ref{_GTypeInterface}, GTypeInterface} + end end begin struct _GFlagsValue @@ -45,9 +63,15 @@ $(Expr(:toplevel, quote mutable struct GFlagsValue handle::Ptr{_GFlagsValue} end - unsafe_convert(::Type{Ptr{_GFlagsValue}}, box::GFlagsValue) = begin - convert(Ptr{_GFlagsValue}, box.handle) - end + begin + unsafe_convert(::Type{Ptr{_GFlagsValue}}, box::GFlagsValue) = begin + convert(Ptr{_GFlagsValue}, box.handle) + end + convert(::Type{GFlagsValue}, p::Ptr{_GFlagsValue}, owns = false) = begin + GFlagsValue(p, owns) + end + const GFlagsValueLike = Union{Ref{_GFlagsValue}, GFlagsValue} + end end begin struct _GTypeValueTable @@ -63,9 +87,15 @@ $(Expr(:toplevel, quote mutable struct GTypeValueTable handle::Ptr{_GTypeValueTable} end - unsafe_convert(::Type{Ptr{_GTypeValueTable}}, box::GTypeValueTable) = begin - convert(Ptr{_GTypeValueTable}, box.handle) - end + begin + unsafe_convert(::Type{Ptr{_GTypeValueTable}}, box::GTypeValueTable) = begin + convert(Ptr{_GTypeValueTable}, box.handle) + end + convert(::Type{GTypeValueTable}, p::Ptr{_GTypeValueTable}, owns = false) = begin + GTypeValueTable(p, owns) + end + const GTypeValueTableLike = Union{Ref{_GTypeValueTable}, GTypeValueTable} + end end begin struct _GEnumClass @@ -78,9 +108,15 @@ $(Expr(:toplevel, quote mutable struct GEnumClass handle::Ptr{_GEnumClass} end - unsafe_convert(::Type{Ptr{_GEnumClass}}, box::GEnumClass) = begin - convert(Ptr{_GEnumClass}, box.handle) - end + begin + unsafe_convert(::Type{Ptr{_GEnumClass}}, box::GEnumClass) = begin + convert(Ptr{_GEnumClass}, box.handle) + end + convert(::Type{GEnumClass}, p::Ptr{_GEnumClass}, owns = false) = begin + GEnumClass(p, owns) + end + const GEnumClassLike = Union{Ref{_GEnumClass}, GEnumClass} + end end begin struct _GFlagsClass @@ -92,9 +128,15 @@ $(Expr(:toplevel, quote mutable struct GFlagsClass handle::Ptr{_GFlagsClass} end - unsafe_convert(::Type{Ptr{_GFlagsClass}}, box::GFlagsClass) = begin - convert(Ptr{_GFlagsClass}, box.handle) - end + begin + unsafe_convert(::Type{Ptr{_GFlagsClass}}, box::GFlagsClass) = begin + convert(Ptr{_GFlagsClass}, box.handle) + end + convert(::Type{GFlagsClass}, p::Ptr{_GFlagsClass}, owns = false) = begin + GFlagsClass(p, owns) + end + const GFlagsClassLike = Union{Ref{_GFlagsClass}, GFlagsClass} + end end begin struct _GInterfaceInfo @@ -105,9 +147,15 @@ $(Expr(:toplevel, quote mutable struct GInterfaceInfo handle::Ptr{_GInterfaceInfo} end - unsafe_convert(::Type{Ptr{_GInterfaceInfo}}, box::GInterfaceInfo) = begin - convert(Ptr{_GInterfaceInfo}, box.handle) - end + begin + unsafe_convert(::Type{Ptr{_GInterfaceInfo}}, box::GInterfaceInfo) = begin + convert(Ptr{_GInterfaceInfo}, box.handle) + end + convert(::Type{GInterfaceInfo}, p::Ptr{_GInterfaceInfo}, owns = false) = begin + GInterfaceInfo(p, owns) + end + const GInterfaceInfoLike = Union{Ref{_GInterfaceInfo}, GInterfaceInfo} + end end begin struct _GParamSpecTypeInfo @@ -123,9 +171,15 @@ $(Expr(:toplevel, quote mutable struct GParamSpecTypeInfo handle::Ptr{_GParamSpecTypeInfo} end - unsafe_convert(::Type{Ptr{_GParamSpecTypeInfo}}, box::GParamSpecTypeInfo) = begin - convert(Ptr{_GParamSpecTypeInfo}, box.handle) - end + begin + unsafe_convert(::Type{Ptr{_GParamSpecTypeInfo}}, box::GParamSpecTypeInfo) = begin + convert(Ptr{_GParamSpecTypeInfo}, box.handle) + end + convert(::Type{GParamSpecTypeInfo}, p::Ptr{_GParamSpecTypeInfo}, owns = false) = begin + GParamSpecTypeInfo(p, owns) + end + const GParamSpecTypeInfoLike = Union{Ref{_GParamSpecTypeInfo}, GParamSpecTypeInfo} + end end begin struct _GSignalInvocationHint @@ -136,9 +190,15 @@ $(Expr(:toplevel, quote mutable struct GSignalInvocationHint handle::Ptr{_GSignalInvocationHint} end - unsafe_convert(::Type{Ptr{_GSignalInvocationHint}}, box::GSignalInvocationHint) = begin - convert(Ptr{_GSignalInvocationHint}, box.handle) - end + begin + unsafe_convert(::Type{Ptr{_GSignalInvocationHint}}, box::GSignalInvocationHint) = begin + convert(Ptr{_GSignalInvocationHint}, box.handle) + end + convert(::Type{GSignalInvocationHint}, p::Ptr{_GSignalInvocationHint}, owns = false) = begin + GSignalInvocationHint(p, owns) + end + const GSignalInvocationHintLike = Union{Ref{_GSignalInvocationHint}, GSignalInvocationHint} + end end begin struct _GSignalQuery @@ -153,9 +213,15 @@ $(Expr(:toplevel, quote mutable struct GSignalQuery handle::Ptr{_GSignalQuery} end - unsafe_convert(::Type{Ptr{_GSignalQuery}}, box::GSignalQuery) = begin - convert(Ptr{_GSignalQuery}, box.handle) - end + begin + unsafe_convert(::Type{Ptr{_GSignalQuery}}, box::GSignalQuery) = begin + convert(Ptr{_GSignalQuery}, box.handle) + end + convert(::Type{GSignalQuery}, p::Ptr{_GSignalQuery}, owns = false) = begin + GSignalQuery(p, owns) + end + const GSignalQueryLike = Union{Ref{_GSignalQuery}, GSignalQuery} + end end begin struct _GTypeFundamentalInfo @@ -164,9 +230,15 @@ $(Expr(:toplevel, quote mutable struct GTypeFundamentalInfo handle::Ptr{_GTypeFundamentalInfo} end - unsafe_convert(::Type{Ptr{_GTypeFundamentalInfo}}, box::GTypeFundamentalInfo) = begin - convert(Ptr{_GTypeFundamentalInfo}, box.handle) - end + begin + unsafe_convert(::Type{Ptr{_GTypeFundamentalInfo}}, box::GTypeFundamentalInfo) = begin + convert(Ptr{_GTypeFundamentalInfo}, box.handle) + end + convert(::Type{GTypeFundamentalInfo}, p::Ptr{_GTypeFundamentalInfo}, owns = false) = begin + GTypeFundamentalInfo(p, owns) + end + const GTypeFundamentalInfoLike = Union{Ref{_GTypeFundamentalInfo}, GTypeFundamentalInfo} + end end begin struct _GTypeInfo @@ -184,9 +256,15 @@ $(Expr(:toplevel, quote mutable struct GTypeInfo handle::Ptr{_GTypeInfo} end - unsafe_convert(::Type{Ptr{_GTypeInfo}}, box::GTypeInfo) = begin - convert(Ptr{_GTypeInfo}, box.handle) - end + begin + unsafe_convert(::Type{Ptr{_GTypeInfo}}, box::GTypeInfo) = begin + convert(Ptr{_GTypeInfo}, box.handle) + end + convert(::Type{GTypeInfo}, p::Ptr{_GTypeInfo}, owns = false) = begin + GTypeInfo(p, owns) + end + const GTypeInfoLike = Union{Ref{_GTypeInfo}, GTypeInfo} + end end begin struct _GTypePluginClass @@ -199,9 +277,15 @@ $(Expr(:toplevel, quote mutable struct GTypePluginClass handle::Ptr{_GTypePluginClass} end - unsafe_convert(::Type{Ptr{_GTypePluginClass}}, box::GTypePluginClass) = begin - convert(Ptr{_GTypePluginClass}, box.handle) - end + begin + unsafe_convert(::Type{Ptr{_GTypePluginClass}}, box::GTypePluginClass) = begin + convert(Ptr{_GTypePluginClass}, box.handle) + end + convert(::Type{GTypePluginClass}, p::Ptr{_GTypePluginClass}, owns = false) = begin + GTypePluginClass(p, owns) + end + const GTypePluginClassLike = Union{Ref{_GTypePluginClass}, GTypePluginClass} + end end begin struct _GTypeQuery @@ -213,9 +297,15 @@ $(Expr(:toplevel, quote mutable struct GTypeQuery handle::Ptr{_GTypeQuery} end - unsafe_convert(::Type{Ptr{_GTypeQuery}}, box::GTypeQuery) = begin - convert(Ptr{_GTypeQuery}, box.handle) - end + begin + unsafe_convert(::Type{Ptr{_GTypeQuery}}, box::GTypeQuery) = begin + convert(Ptr{_GTypeQuery}, box.handle) + end + convert(::Type{GTypeQuery}, p::Ptr{_GTypeQuery}, owns = false) = begin + GTypeQuery(p, owns) + end + const GTypeQueryLike = Union{Ref{_GTypeQuery}, GTypeQuery} + end end begin struct _GValueArray @@ -229,7 +319,7 @@ $(Expr(:toplevel, quote (GLib.g_type(::Type{T}) where T <: GValueArray) = begin ccall(("g_value_array_get_type", libgobject), GType, ()) end - function GValueArray(ref::Ptr{T}, own::Bool = false) where T <: GBoxed + function GValueArray(ref::Ptr{T}, own::Bool = false) where T <: Union{GBoxed, _GValueArray} x = new(ref) if own finalizer(x) do x @@ -241,9 +331,15 @@ $(Expr(:toplevel, quote push!(gboxed_types, GValueArray) end end - unsafe_convert(::Type{Ptr{_GValueArray}}, box::GValueArray) = begin - convert(Ptr{_GValueArray}, box.handle) - end + begin + unsafe_convert(::Type{Ptr{_GValueArray}}, box::GValueArray) = begin + convert(Ptr{_GValueArray}, box.handle) + end + convert(::Type{GValueArray}, p::Ptr{_GValueArray}, owns = false) = begin + GValueArray(p, owns) + end + const GValueArrayLike = Union{Ref{_GValueArray}, GValueArray} + end end @doc "See the [GTK docs](https://docs.gtk.org/gobject/struct.EnumClass.html)." GEnumClass @doc "See the [GTK docs](https://docs.gtk.org/gobject/struct.FlagsClass.html)." GFlagsClass @@ -341,27 +437,27 @@ $(Expr(:toplevel, quote gtype_wrapper_cache[:GObject] = GObjectLeaf function GBindingTransformFunc(binding, from_value, to_value, user_data) binding = convert(GBinding, binding, false) - from_value = convert(Union{GValue, Ref{_GValue}}, from_value, false) - to_value = convert(Union{GValue, Ref{_GValue}}, to_value, false) + from_value = convert(GValueLike, from_value, false) + to_value = convert(GValueLike, to_value, false) f = user_data ret = f(binding, from_value, to_value) convert(Cint, ret) end function GClassFinalizeFunc(g_class, class_data) - g_class = convert(Union{GTypeClass, Ref{_GTypeClass}}, g_class) + g_class = convert(GTypeClassLike, g_class) f = class_data ret = f(g_class) nothing end function GClassInitFunc(g_class, class_data) - g_class = convert(Union{GTypeClass, Ref{_GTypeClass}}, g_class) + g_class = convert(GTypeClassLike, g_class) f = class_data ret = f(g_class) nothing end function GClosureMarshal(closure, return_value, n_param_values, param_values, invocation_hint, marshal_data) - closure = convert(Union{GClosure, Ref{_GClosure}}, closure, false) - return_value = convert_if_not_null(Union{GValue, Ref{_GValue}}, return_value, false) + closure = convert(GClosureLike, closure, false) + return_value = convert_if_not_null(GValueLike, return_value, false) param_values = collect(unsafe_wrap(Vector{_GValue}, param_values, m_n_param_values[])) invocation_hint = convert(Maybe(Nothing), invocation_hint) f = marshal_data @@ -369,32 +465,32 @@ $(Expr(:toplevel, quote nothing end function GInterfaceFinalizeFunc(g_iface, iface_data) - g_iface = convert(Union{GTypeInterface, Ref{_GTypeInterface}}, g_iface) + g_iface = convert(GTypeInterfaceLike, g_iface) f = iface_data ret = f(g_iface) nothing end function GInterfaceInitFunc(g_iface, iface_data) - g_iface = convert(Union{GTypeInterface, Ref{_GTypeInterface}}, g_iface) + g_iface = convert(GTypeInterfaceLike, g_iface) f = iface_data ret = f(g_iface) nothing end function GSignalAccumulator(ihint, return_accu, handler_return, data) - ihint = convert(Union{GSignalInvocationHint, Ref{_GSignalInvocationHint}}, ihint) - return_accu = convert(Union{GValue, Ref{_GValue}}, return_accu, false) - handler_return = convert(Union{GValue, Ref{_GValue}}, handler_return, false) + ihint = convert(GSignalInvocationHintLike, ihint) + return_accu = convert(GValueLike, return_accu, false) + handler_return = convert(GValueLike, handler_return, false) f = data ret = f(ihint, return_accu, handler_return) convert(Cint, ret) end function GSignalEmissionHook(ihint, n_param_values, param_values, data) - ihint = convert(Union{GSignalInvocationHint, Ref{_GSignalInvocationHint}}, ihint) + ihint = convert(GSignalInvocationHintLike, ihint) param_values = collect(unsafe_wrap(Vector{_GValue}, param_values, m_n_param_values[])) f = data ret = f(ihint, n_param_values, param_values) convert(Cint, ret) end - export GEnumValue, _GEnumValue, GTypeClass, _GTypeClass, GTypeInterface, _GTypeInterface, GFlagsValue, _GFlagsValue, GTypeValueTable, _GTypeValueTable, GEnumClass, _GEnumClass, GFlagsClass, _GFlagsClass, GInterfaceInfo, _GInterfaceInfo, GParamSpecTypeInfo, _GParamSpecTypeInfo, GSignalInvocationHint, _GSignalInvocationHint, GSignalQuery, _GSignalQuery, GTypeFundamentalInfo, _GTypeFundamentalInfo, GTypeInfo, _GTypeInfo, GTypePluginClass, _GTypePluginClass, GTypeQuery, _GTypeQuery, GValueArray, _GValueArray, GTypePlugin, GBinding, GBindingLeaf, GInitiallyUnowned, GInitiallyUnownedLeaf, GTypeModule, GBindingTransformFunc, GClassFinalizeFunc, GClassInitFunc, GClosureMarshal, GInterfaceFinalizeFunc, GInterfaceInitFunc, GSignalAccumulator, GSignalEmissionHook + export GEnumValue, _GEnumValue, GEnumValueLike, GTypeClass, _GTypeClass, GTypeClassLike, GTypeInterface, _GTypeInterface, GTypeInterfaceLike, GFlagsValue, _GFlagsValue, GFlagsValueLike, GTypeValueTable, _GTypeValueTable, GTypeValueTableLike, GEnumClass, GEnumClassLike, _GEnumClass, GFlagsClass, GFlagsClassLike, _GFlagsClass, GInterfaceInfo, GInterfaceInfoLike, _GInterfaceInfo, GParamSpecTypeInfo, GParamSpecTypeInfoLike, _GParamSpecTypeInfo, GSignalInvocationHint, GSignalInvocationHintLike, _GSignalInvocationHint, GSignalQuery, GSignalQueryLike, _GSignalQuery, GTypeFundamentalInfo, GTypeFundamentalInfoLike, _GTypeFundamentalInfo, GTypeInfo, GTypeInfoLike, _GTypeInfo, GTypePluginClass, GTypePluginClassLike, _GTypePluginClass, GTypeQuery, GTypeQueryLike, _GTypeQuery, GValueArray, GValueArrayLike, _GValueArray, GTypePlugin, GBinding, GBindingLeaf, GInitiallyUnowned, GInitiallyUnownedLeaf, GTypeModule, GBindingTransformFunc, GClassFinalizeFunc, GClassInitFunc, GClosureMarshal, GInterfaceFinalizeFunc, GInterfaceInitFunc, GSignalAccumulator, GSignalEmissionHook end)) end diff --git a/src/gen/graphene_functions b/src/gen/graphene_functions index 11e960dd..d3a6e256 100644 --- a/src/gen/graphene_functions +++ b/src/gen/graphene_functions @@ -2,132 +2,132 @@ quote $(Expr(:toplevel, quote function box_empty() ret = ccall(("graphene_box_empty", libgraphene), Ptr{_GrapheneBox}, ()) - ret2 = convert(Union{GrapheneBox, Ref{_GrapheneBox}}, ret, false) + ret2 = convert(GrapheneBoxLike, ret, false) ret2 end function box_infinite() ret = ccall(("graphene_box_infinite", libgraphene), Ptr{_GrapheneBox}, ()) - ret2 = convert(Union{GrapheneBox, Ref{_GrapheneBox}}, ret, false) + ret2 = convert(GrapheneBoxLike, ret, false) ret2 end function box_minus_one() ret = ccall(("graphene_box_minus_one", libgraphene), Ptr{_GrapheneBox}, ()) - ret2 = convert(Union{GrapheneBox, Ref{_GrapheneBox}}, ret, false) + ret2 = convert(GrapheneBoxLike, ret, false) ret2 end function box_one() ret = ccall(("graphene_box_one", libgraphene), Ptr{_GrapheneBox}, ()) - ret2 = convert(Union{GrapheneBox, Ref{_GrapheneBox}}, ret, false) + ret2 = convert(GrapheneBoxLike, ret, false) ret2 end function box_one_minus_one() ret = ccall(("graphene_box_one_minus_one", libgraphene), Ptr{_GrapheneBox}, ()) - ret2 = convert(Union{GrapheneBox, Ref{_GrapheneBox}}, ret, false) + ret2 = convert(GrapheneBoxLike, ret, false) ret2 end function box_zero() ret = ccall(("graphene_box_zero", libgraphene), Ptr{_GrapheneBox}, ()) - ret2 = convert(Union{GrapheneBox, Ref{_GrapheneBox}}, ret, false) + ret2 = convert(GrapheneBoxLike, ret, false) ret2 end function point3d_zero() ret = ccall(("graphene_point3d_zero", libgraphene), Ptr{_GraphenePoint3D}, ()) - ret2 = convert(Union{GraphenePoint3D, Ref{_GraphenePoint3D}}, ret, false) + ret2 = convert(GraphenePoint3DLike, ret, false) ret2 end function point_zero() ret = ccall(("graphene_point_zero", libgraphene), Ptr{_GraphenePoint}, ()) - ret2 = convert(Union{GraphenePoint, Ref{_GraphenePoint}}, ret, false) + ret2 = convert(GraphenePointLike, ret, false) ret2 end function rect_alloc() ret = ccall(("graphene_rect_alloc", libgraphene), Ptr{_GrapheneRect}, ()) - ret2 = convert(Union{GrapheneRect, Ref{_GrapheneRect}}, ret, true) + ret2 = convert(GrapheneRectLike, ret, true) ret2 end function rect_zero() ret = ccall(("graphene_rect_zero", libgraphene), Ptr{_GrapheneRect}, ()) - ret2 = convert(Union{GrapheneRect, Ref{_GrapheneRect}}, ret, false) + ret2 = convert(GrapheneRectLike, ret, false) ret2 end function size_zero() ret = ccall(("graphene_size_zero", libgraphene), Ptr{_GrapheneSize}, ()) - ret2 = convert(Union{GrapheneSize, Ref{_GrapheneSize}}, ret, false) + ret2 = convert(GrapheneSizeLike, ret, false) ret2 end function vec2_one() ret = ccall(("graphene_vec2_one", libgraphene), Ptr{_GrapheneVec2}, ()) - ret2 = convert(Union{GrapheneVec2, Ref{_GrapheneVec2}}, ret, false) + ret2 = convert(GrapheneVec2Like, ret, false) ret2 end function vec2_x_axis() ret = ccall(("graphene_vec2_x_axis", libgraphene), Ptr{_GrapheneVec2}, ()) - ret2 = convert(Union{GrapheneVec2, Ref{_GrapheneVec2}}, ret, false) + ret2 = convert(GrapheneVec2Like, ret, false) ret2 end function vec2_y_axis() ret = ccall(("graphene_vec2_y_axis", libgraphene), Ptr{_GrapheneVec2}, ()) - ret2 = convert(Union{GrapheneVec2, Ref{_GrapheneVec2}}, ret, false) + ret2 = convert(GrapheneVec2Like, ret, false) ret2 end function vec2_zero() ret = ccall(("graphene_vec2_zero", libgraphene), Ptr{_GrapheneVec2}, ()) - ret2 = convert(Union{GrapheneVec2, Ref{_GrapheneVec2}}, ret, false) + ret2 = convert(GrapheneVec2Like, ret, false) ret2 end function vec3_one() ret = ccall(("graphene_vec3_one", libgraphene), Ptr{_GrapheneVec3}, ()) - ret2 = convert(Union{GrapheneVec3, Ref{_GrapheneVec3}}, ret, false) + ret2 = convert(GrapheneVec3Like, ret, false) ret2 end function vec3_x_axis() ret = ccall(("graphene_vec3_x_axis", libgraphene), Ptr{_GrapheneVec3}, ()) - ret2 = convert(Union{GrapheneVec3, Ref{_GrapheneVec3}}, ret, false) + ret2 = convert(GrapheneVec3Like, ret, false) ret2 end function vec3_y_axis() ret = ccall(("graphene_vec3_y_axis", libgraphene), Ptr{_GrapheneVec3}, ()) - ret2 = convert(Union{GrapheneVec3, Ref{_GrapheneVec3}}, ret, false) + ret2 = convert(GrapheneVec3Like, ret, false) ret2 end function vec3_z_axis() ret = ccall(("graphene_vec3_z_axis", libgraphene), Ptr{_GrapheneVec3}, ()) - ret2 = convert(Union{GrapheneVec3, Ref{_GrapheneVec3}}, ret, false) + ret2 = convert(GrapheneVec3Like, ret, false) ret2 end function vec3_zero() ret = ccall(("graphene_vec3_zero", libgraphene), Ptr{_GrapheneVec3}, ()) - ret2 = convert(Union{GrapheneVec3, Ref{_GrapheneVec3}}, ret, false) + ret2 = convert(GrapheneVec3Like, ret, false) ret2 end function vec4_one() ret = ccall(("graphene_vec4_one", libgraphene), Ptr{_GrapheneVec4}, ()) - ret2 = convert(Union{GrapheneVec4, Ref{_GrapheneVec4}}, ret, false) + ret2 = convert(GrapheneVec4Like, ret, false) ret2 end function vec4_w_axis() ret = ccall(("graphene_vec4_w_axis", libgraphene), Ptr{_GrapheneVec4}, ()) - ret2 = convert(Union{GrapheneVec4, Ref{_GrapheneVec4}}, ret, false) + ret2 = convert(GrapheneVec4Like, ret, false) ret2 end function vec4_x_axis() ret = ccall(("graphene_vec4_x_axis", libgraphene), Ptr{_GrapheneVec4}, ()) - ret2 = convert(Union{GrapheneVec4, Ref{_GrapheneVec4}}, ret, false) + ret2 = convert(GrapheneVec4Like, ret, false) ret2 end function vec4_y_axis() ret = ccall(("graphene_vec4_y_axis", libgraphene), Ptr{_GrapheneVec4}, ()) - ret2 = convert(Union{GrapheneVec4, Ref{_GrapheneVec4}}, ret, false) + ret2 = convert(GrapheneVec4Like, ret, false) ret2 end function vec4_z_axis() ret = ccall(("graphene_vec4_z_axis", libgraphene), Ptr{_GrapheneVec4}, ()) - ret2 = convert(Union{GrapheneVec4, Ref{_GrapheneVec4}}, ret, false) + ret2 = convert(GrapheneVec4Like, ret, false) ret2 end function vec4_zero() ret = ccall(("graphene_vec4_zero", libgraphene), Ptr{_GrapheneVec4}, ()) - ret2 = convert(Union{GrapheneVec4, Ref{_GrapheneVec4}}, ret, false) + ret2 = convert(GrapheneVec4Like, ret, false) ret2 end end)) diff --git a/src/gen/graphene_methods b/src/gen/graphene_methods index 244d1958..e3b61e46 100644 --- a/src/gen/graphene_methods +++ b/src/gen/graphene_methods @@ -2,135 +2,135 @@ quote $(Expr(:toplevel, quote function Box_alloc() ret = ccall(("graphene_box_alloc", libgraphene), Ptr{_GrapheneBox}, ()) - ret2 = convert(Union{GrapheneBox, Ref{_GrapheneBox}}, ret, true) + ret2 = convert(GrapheneBoxLike, ret, true) ret2 end - function contains_box(instance::Union{GrapheneBox, Ref{_GrapheneBox}}, _b::Union{GrapheneBox, Ref{_GrapheneBox}}) + function contains_box(instance::GrapheneBoxLike, _b::GrapheneBoxLike) ret = ccall(("graphene_box_contains_box", libgraphene), Cint, (Ptr{_GrapheneBox}, Ptr{_GrapheneBox}), instance, _b) ret2 = convert(Bool, ret) ret2 end - function contains_point(instance::Union{GrapheneBox, Ref{_GrapheneBox}}, _point::Union{GraphenePoint3D, Ref{_GraphenePoint3D}}) + function contains_point(instance::GrapheneBoxLike, _point::GraphenePoint3DLike) ret = ccall(("graphene_box_contains_point", libgraphene), Cint, (Ptr{_GrapheneBox}, Ptr{_GraphenePoint3D}), instance, _point) ret2 = convert(Bool, ret) ret2 end - function equal(instance::Union{GrapheneBox, Ref{_GrapheneBox}}, _b::Union{GrapheneBox, Ref{_GrapheneBox}}) + function equal(instance::GrapheneBoxLike, _b::GrapheneBoxLike) ret = ccall(("graphene_box_equal", libgraphene), Cint, (Ptr{_GrapheneBox}, Ptr{_GrapheneBox}), instance, _b) ret2 = convert(Bool, ret) ret2 end - function expand(instance::Union{GrapheneBox, Ref{_GrapheneBox}}, _point::Union{GraphenePoint3D, Ref{_GraphenePoint3D}}) + function expand(instance::GrapheneBoxLike, _point::GraphenePoint3DLike) m_res = Ref{_GrapheneBox}() ret = ccall(("graphene_box_expand", libgraphene), Nothing, (Ptr{_GrapheneBox}, Ptr{_GraphenePoint3D}, Ptr{_GrapheneBox}), instance, _point, m_res) _res = m_res[] _res end - function expand_scalar(instance::Union{GrapheneBox, Ref{_GrapheneBox}}, _scalar::Real) + function expand_scalar(instance::GrapheneBoxLike, _scalar::Real) m_res = Ref{_GrapheneBox}() ret = ccall(("graphene_box_expand_scalar", libgraphene), Nothing, (Ptr{_GrapheneBox}, Float32, Ptr{_GrapheneBox}), instance, _scalar, m_res) _res = m_res[] _res end - function expand_vec3(instance::Union{GrapheneBox, Ref{_GrapheneBox}}, _vec::Union{GrapheneVec3, Ref{_GrapheneVec3}}) + function expand_vec3(instance::GrapheneBoxLike, _vec::GrapheneVec3Like) m_res = Ref{_GrapheneBox}() ret = ccall(("graphene_box_expand_vec3", libgraphene), Nothing, (Ptr{_GrapheneBox}, Ptr{_GrapheneVec3}, Ptr{_GrapheneBox}), instance, _vec, m_res) _res = m_res[] _res end - function free(instance::Union{GrapheneBox, Ref{_GrapheneBox}}) + function free(instance::GrapheneBoxLike) ret = ccall(("graphene_box_free", libgraphene), Nothing, (Ptr{_GrapheneBox},), instance) nothing end - function get_bounding_sphere(instance::Union{GrapheneBox, Ref{_GrapheneBox}}) + function get_bounding_sphere(instance::GrapheneBoxLike) m_sphere = Ref{_GrapheneSphere}() ret = ccall(("graphene_box_get_bounding_sphere", libgraphene), Nothing, (Ptr{_GrapheneBox}, Ptr{_GrapheneSphere}), instance, m_sphere) _sphere = m_sphere[] _sphere end - function get_center(instance::Union{GrapheneBox, Ref{_GrapheneBox}}) + function get_center(instance::GrapheneBoxLike) m_center = Ref{_GraphenePoint3D}() ret = ccall(("graphene_box_get_center", libgraphene), Nothing, (Ptr{_GrapheneBox}, Ptr{_GraphenePoint3D}), instance, m_center) _center = m_center[] _center end - function get_depth(instance::Union{GrapheneBox, Ref{_GrapheneBox}}) + function get_depth(instance::GrapheneBoxLike) ret = ccall(("graphene_box_get_depth", libgraphene), Float32, (Ptr{_GrapheneBox},), instance) ret end - function get_height(instance::Union{GrapheneBox, Ref{_GrapheneBox}}) + function get_height(instance::GrapheneBoxLike) ret = ccall(("graphene_box_get_height", libgraphene), Float32, (Ptr{_GrapheneBox},), instance) ret end - function get_max(instance::Union{GrapheneBox, Ref{_GrapheneBox}}) + function get_max(instance::GrapheneBoxLike) m_max = Ref{_GraphenePoint3D}() ret = ccall(("graphene_box_get_max", libgraphene), Nothing, (Ptr{_GrapheneBox}, Ptr{_GraphenePoint3D}), instance, m_max) _max = m_max[] _max end - function get_min(instance::Union{GrapheneBox, Ref{_GrapheneBox}}) + function get_min(instance::GrapheneBoxLike) m_min = Ref{_GraphenePoint3D}() ret = ccall(("graphene_box_get_min", libgraphene), Nothing, (Ptr{_GrapheneBox}, Ptr{_GraphenePoint3D}), instance, m_min) _min = m_min[] _min end - function get_size(instance::Union{GrapheneBox, Ref{_GrapheneBox}}) + function get_size(instance::GrapheneBoxLike) m_size = Ref{_GrapheneVec3}() ret = ccall(("graphene_box_get_size", libgraphene), Nothing, (Ptr{_GrapheneBox}, Ptr{_GrapheneVec3}), instance, m_size) _size = m_size[] _size end - function get_vertices(instance::Union{GrapheneBox, Ref{_GrapheneBox}}) + function get_vertices(instance::GrapheneBoxLike) m_vertices = Ref{Ptr{_GrapheneVec3}}() ret = ccall(("graphene_box_get_vertices", libgraphene), Nothing, (Ptr{_GrapheneBox}, Ptr{Ptr{_GrapheneVec3}}), instance, m_vertices) _vertices = m_vertices[] _vertices end - function get_width(instance::Union{GrapheneBox, Ref{_GrapheneBox}}) + function get_width(instance::GrapheneBoxLike) ret = ccall(("graphene_box_get_width", libgraphene), Float32, (Ptr{_GrapheneBox},), instance) ret end - function init(instance::Union{GrapheneBox, Ref{_GrapheneBox}}, _min::Maybe(Union{GraphenePoint3D, Ref{_GraphenePoint3D}}), _max::Maybe(Union{GraphenePoint3D, Ref{_GraphenePoint3D}})) + function init(instance::GrapheneBoxLike, _min::Maybe(GraphenePoint3DLike), _max::Maybe(GraphenePoint3DLike)) _min_maybe = nothing_to_null(_min) _max_maybe = nothing_to_null(_max) ret = ccall(("graphene_box_init", libgraphene), Ptr{_GrapheneBox}, (Ptr{_GrapheneBox}, Ptr{_GraphenePoint3D}, Ptr{_GraphenePoint3D}), instance, _min_maybe, _max_maybe) - ret2 = convert(Union{GrapheneBox, Ref{_GrapheneBox}}, ret, false) + ret2 = convert(GrapheneBoxLike, ret, false) ret2 end - function init_from_box(instance::Union{GrapheneBox, Ref{_GrapheneBox}}, _src::Union{GrapheneBox, Ref{_GrapheneBox}}) + function init_from_box(instance::GrapheneBoxLike, _src::GrapheneBoxLike) ret = ccall(("graphene_box_init_from_box", libgraphene), Ptr{_GrapheneBox}, (Ptr{_GrapheneBox}, Ptr{_GrapheneBox}), instance, _src) - ret2 = convert(Union{GrapheneBox, Ref{_GrapheneBox}}, ret, false) + ret2 = convert(GrapheneBoxLike, ret, false) ret2 end - function init_from_points(instance::Union{GrapheneBox, Ref{_GrapheneBox}}, _points) + function init_from_points(instance::GrapheneBoxLike, _points) _points_arr = convert(Vector{_GraphenePoint3D}, _points) _n_points = length(_points) ret = ccall(("graphene_box_init_from_points", libgraphene), Ptr{_GrapheneBox}, (Ptr{_GrapheneBox}, UInt32, Ptr{_GraphenePoint3D}), instance, _n_points, _points_arr) - ret2 = convert(Union{GrapheneBox, Ref{_GrapheneBox}}, ret, false) + ret2 = convert(GrapheneBoxLike, ret, false) ret2 end - function init_from_vec3(instance::Union{GrapheneBox, Ref{_GrapheneBox}}, _min::Maybe(Union{GrapheneVec3, Ref{_GrapheneVec3}}), _max::Maybe(Union{GrapheneVec3, Ref{_GrapheneVec3}})) + function init_from_vec3(instance::GrapheneBoxLike, _min::Maybe(GrapheneVec3Like), _max::Maybe(GrapheneVec3Like)) _min_maybe = nothing_to_null(_min) _max_maybe = nothing_to_null(_max) ret = ccall(("graphene_box_init_from_vec3", libgraphene), Ptr{_GrapheneBox}, (Ptr{_GrapheneBox}, Ptr{_GrapheneVec3}, Ptr{_GrapheneVec3}), instance, _min_maybe, _max_maybe) - ret2 = convert(Union{GrapheneBox, Ref{_GrapheneBox}}, ret, false) + ret2 = convert(GrapheneBoxLike, ret, false) ret2 end - function init_from_vectors(instance::Union{GrapheneBox, Ref{_GrapheneBox}}, _vectors) + function init_from_vectors(instance::GrapheneBoxLike, _vectors) _vectors_arr = convert(Vector{_GrapheneVec3}, _vectors) _n_vectors = length(_vectors) ret = ccall(("graphene_box_init_from_vectors", libgraphene), Ptr{_GrapheneBox}, (Ptr{_GrapheneBox}, UInt32, Ptr{_GrapheneVec3}), instance, _n_vectors, _vectors_arr) - ret2 = convert(Union{GrapheneBox, Ref{_GrapheneBox}}, ret, false) + ret2 = convert(GrapheneBoxLike, ret, false) ret2 end - function intersection(instance::Union{GrapheneBox, Ref{_GrapheneBox}}, _b::Union{GrapheneBox, Ref{_GrapheneBox}}) + function intersection(instance::GrapheneBoxLike, _b::GrapheneBoxLike) m_res = Ref{_GrapheneBox}() ret = ccall(("graphene_box_intersection", libgraphene), Cint, (Ptr{_GrapheneBox}, Ptr{_GrapheneBox}, Ptr{_GrapheneBox}), instance, _b, m_res) ret2 = convert(Bool, ret) _res = m_res[] (ret2, _res) end - function union(instance::Union{GrapheneBox, Ref{_GrapheneBox}}, _b::Union{GrapheneBox, Ref{_GrapheneBox}}) + function union(instance::GrapheneBoxLike, _b::GrapheneBoxLike) m_res = Ref{_GrapheneBox}() ret = ccall(("graphene_box_union", libgraphene), Nothing, (Ptr{_GrapheneBox}, Ptr{_GrapheneBox}, Ptr{_GrapheneBox}), instance, _b, m_res) _res = m_res[] @@ -138,105 +138,105 @@ $(Expr(:toplevel, quote end function Euler_alloc() ret = ccall(("graphene_euler_alloc", libgraphene), Ptr{_GrapheneEuler}, ()) - ret2 = convert(Union{GrapheneEuler, Ref{_GrapheneEuler}}, ret, true) + ret2 = convert(GrapheneEulerLike, ret, true) ret2 end - function equal(instance::Union{GrapheneEuler, Ref{_GrapheneEuler}}, _b::Union{GrapheneEuler, Ref{_GrapheneEuler}}) + function equal(instance::GrapheneEulerLike, _b::GrapheneEulerLike) ret = ccall(("graphene_euler_equal", libgraphene), Cint, (Ptr{_GrapheneEuler}, Ptr{_GrapheneEuler}), instance, _b) ret2 = convert(Bool, ret) ret2 end - function free(instance::Union{GrapheneEuler, Ref{_GrapheneEuler}}) + function free(instance::GrapheneEulerLike) ret = ccall(("graphene_euler_free", libgraphene), Nothing, (Ptr{_GrapheneEuler},), instance) nothing end - function get_alpha(instance::Union{GrapheneEuler, Ref{_GrapheneEuler}}) + function get_alpha(instance::GrapheneEulerLike) ret = ccall(("graphene_euler_get_alpha", libgraphene), Float32, (Ptr{_GrapheneEuler},), instance) ret end - function get_beta(instance::Union{GrapheneEuler, Ref{_GrapheneEuler}}) + function get_beta(instance::GrapheneEulerLike) ret = ccall(("graphene_euler_get_beta", libgraphene), Float32, (Ptr{_GrapheneEuler},), instance) ret end - function get_gamma(instance::Union{GrapheneEuler, Ref{_GrapheneEuler}}) + function get_gamma(instance::GrapheneEulerLike) ret = ccall(("graphene_euler_get_gamma", libgraphene), Float32, (Ptr{_GrapheneEuler},), instance) ret end - function get_order(instance::Union{GrapheneEuler, Ref{_GrapheneEuler}}) + function get_order(instance::GrapheneEulerLike) ret = ccall(("graphene_euler_get_order", libgraphene), UInt32, (Ptr{_GrapheneEuler},), instance) ret2 = EulerOrder(ret) ret2 end - function get_x(instance::Union{GrapheneEuler, Ref{_GrapheneEuler}}) + function get_x(instance::GrapheneEulerLike) ret = ccall(("graphene_euler_get_x", libgraphene), Float32, (Ptr{_GrapheneEuler},), instance) ret end - function get_y(instance::Union{GrapheneEuler, Ref{_GrapheneEuler}}) + function get_y(instance::GrapheneEulerLike) ret = ccall(("graphene_euler_get_y", libgraphene), Float32, (Ptr{_GrapheneEuler},), instance) ret end - function get_z(instance::Union{GrapheneEuler, Ref{_GrapheneEuler}}) + function get_z(instance::GrapheneEulerLike) ret = ccall(("graphene_euler_get_z", libgraphene), Float32, (Ptr{_GrapheneEuler},), instance) ret end - function init(instance::Union{GrapheneEuler, Ref{_GrapheneEuler}}, _x::Real, _y::Real, _z::Real) + function init(instance::GrapheneEulerLike, _x::Real, _y::Real, _z::Real) ret = ccall(("graphene_euler_init", libgraphene), Ptr{_GrapheneEuler}, (Ptr{_GrapheneEuler}, Float32, Float32, Float32), instance, _x, _y, _z) - ret2 = convert(Union{GrapheneEuler, Ref{_GrapheneEuler}}, ret, false) + ret2 = convert(GrapheneEulerLike, ret, false) ret2 end - function init_from_euler(instance::Union{GrapheneEuler, Ref{_GrapheneEuler}}, _src::Maybe(Union{GrapheneEuler, Ref{_GrapheneEuler}})) + function init_from_euler(instance::GrapheneEulerLike, _src::Maybe(GrapheneEulerLike)) _src_maybe = nothing_to_null(_src) ret = ccall(("graphene_euler_init_from_euler", libgraphene), Ptr{_GrapheneEuler}, (Ptr{_GrapheneEuler}, Ptr{_GrapheneEuler}), instance, _src_maybe) - ret2 = convert(Union{GrapheneEuler, Ref{_GrapheneEuler}}, ret, false) + ret2 = convert(GrapheneEulerLike, ret, false) ret2 end - function init_from_matrix(instance::Union{GrapheneEuler, Ref{_GrapheneEuler}}, _m::Maybe(Union{GrapheneMatrix, Ref{_GrapheneMatrix}}), _order) + function init_from_matrix(instance::GrapheneEulerLike, _m::Maybe(GrapheneMatrixLike), _order) _m_maybe = nothing_to_null(_m) ret = ccall(("graphene_euler_init_from_matrix", libgraphene), Ptr{_GrapheneEuler}, (Ptr{_GrapheneEuler}, Ptr{_GrapheneMatrix}, UInt32), instance, _m_maybe, _order) - ret2 = convert(Union{GrapheneEuler, Ref{_GrapheneEuler}}, ret, false) + ret2 = convert(GrapheneEulerLike, ret, false) ret2 end - function init_from_quaternion(instance::Union{GrapheneEuler, Ref{_GrapheneEuler}}, _q::Maybe(Union{GrapheneQuaternion, Ref{_GrapheneQuaternion}}), _order) + function init_from_quaternion(instance::GrapheneEulerLike, _q::Maybe(GrapheneQuaternionLike), _order) _q_maybe = nothing_to_null(_q) ret = ccall(("graphene_euler_init_from_quaternion", libgraphene), Ptr{_GrapheneEuler}, (Ptr{_GrapheneEuler}, Ptr{_GrapheneQuaternion}, UInt32), instance, _q_maybe, _order) - ret2 = convert(Union{GrapheneEuler, Ref{_GrapheneEuler}}, ret, false) + ret2 = convert(GrapheneEulerLike, ret, false) ret2 end - function init_from_radians(instance::Union{GrapheneEuler, Ref{_GrapheneEuler}}, _x::Real, _y::Real, _z::Real, _order) + function init_from_radians(instance::GrapheneEulerLike, _x::Real, _y::Real, _z::Real, _order) ret = ccall(("graphene_euler_init_from_radians", libgraphene), Ptr{_GrapheneEuler}, (Ptr{_GrapheneEuler}, Float32, Float32, Float32, UInt32), instance, _x, _y, _z, _order) - ret2 = convert(Union{GrapheneEuler, Ref{_GrapheneEuler}}, ret, false) + ret2 = convert(GrapheneEulerLike, ret, false) ret2 end - function init_from_vec3(instance::Union{GrapheneEuler, Ref{_GrapheneEuler}}, _v::Maybe(Union{GrapheneVec3, Ref{_GrapheneVec3}}), _order) + function init_from_vec3(instance::GrapheneEulerLike, _v::Maybe(GrapheneVec3Like), _order) _v_maybe = nothing_to_null(_v) ret = ccall(("graphene_euler_init_from_vec3", libgraphene), Ptr{_GrapheneEuler}, (Ptr{_GrapheneEuler}, Ptr{_GrapheneVec3}, UInt32), instance, _v_maybe, _order) - ret2 = convert(Union{GrapheneEuler, Ref{_GrapheneEuler}}, ret, false) + ret2 = convert(GrapheneEulerLike, ret, false) ret2 end - function init_with_order(instance::Union{GrapheneEuler, Ref{_GrapheneEuler}}, _x::Real, _y::Real, _z::Real, _order) + function init_with_order(instance::GrapheneEulerLike, _x::Real, _y::Real, _z::Real, _order) ret = ccall(("graphene_euler_init_with_order", libgraphene), Ptr{_GrapheneEuler}, (Ptr{_GrapheneEuler}, Float32, Float32, Float32, UInt32), instance, _x, _y, _z, _order) - ret2 = convert(Union{GrapheneEuler, Ref{_GrapheneEuler}}, ret, false) + ret2 = convert(GrapheneEulerLike, ret, false) ret2 end - function reorder(instance::Union{GrapheneEuler, Ref{_GrapheneEuler}}, _order) + function reorder(instance::GrapheneEulerLike, _order) m_res = Ref{_GrapheneEuler}() ret = ccall(("graphene_euler_reorder", libgraphene), Nothing, (Ptr{_GrapheneEuler}, UInt32, Ptr{_GrapheneEuler}), instance, _order, m_res) _res = m_res[] _res end - function to_matrix(instance::Union{GrapheneEuler, Ref{_GrapheneEuler}}) + function to_matrix(instance::GrapheneEulerLike) m_res = Ref{_GrapheneMatrix}() ret = ccall(("graphene_euler_to_matrix", libgraphene), Nothing, (Ptr{_GrapheneEuler}, Ptr{_GrapheneMatrix}), instance, m_res) _res = m_res[] _res end - function to_quaternion(instance::Union{GrapheneEuler, Ref{_GrapheneEuler}}) + function to_quaternion(instance::GrapheneEulerLike) m_res = Ref{_GrapheneQuaternion}() ret = ccall(("graphene_euler_to_quaternion", libgraphene), Nothing, (Ptr{_GrapheneEuler}, Ptr{_GrapheneQuaternion}), instance, m_res) _res = m_res[] _res end - function to_vec3(instance::Union{GrapheneEuler, Ref{_GrapheneEuler}}) + function to_vec3(instance::GrapheneEulerLike) m_res = Ref{_GrapheneVec3}() ret = ccall(("graphene_euler_to_vec3", libgraphene), Nothing, (Ptr{_GrapheneEuler}, Ptr{_GrapheneVec3}), instance, m_res) _res = m_res[] @@ -244,60 +244,60 @@ $(Expr(:toplevel, quote end function Frustum_alloc() ret = ccall(("graphene_frustum_alloc", libgraphene), Ptr{_GrapheneFrustum}, ()) - ret2 = convert(Union{GrapheneFrustum, Ref{_GrapheneFrustum}}, ret, true) + ret2 = convert(GrapheneFrustumLike, ret, true) ret2 end - function contains_point(instance::Union{GrapheneFrustum, Ref{_GrapheneFrustum}}, _point::Union{GraphenePoint3D, Ref{_GraphenePoint3D}}) + function contains_point(instance::GrapheneFrustumLike, _point::GraphenePoint3DLike) ret = ccall(("graphene_frustum_contains_point", libgraphene), Cint, (Ptr{_GrapheneFrustum}, Ptr{_GraphenePoint3D}), instance, _point) ret2 = convert(Bool, ret) ret2 end - function equal(instance::Union{GrapheneFrustum, Ref{_GrapheneFrustum}}, _b::Union{GrapheneFrustum, Ref{_GrapheneFrustum}}) + function equal(instance::GrapheneFrustumLike, _b::GrapheneFrustumLike) ret = ccall(("graphene_frustum_equal", libgraphene), Cint, (Ptr{_GrapheneFrustum}, Ptr{_GrapheneFrustum}), instance, _b) ret2 = convert(Bool, ret) ret2 end - function free(instance::Union{GrapheneFrustum, Ref{_GrapheneFrustum}}) + function free(instance::GrapheneFrustumLike) ret = ccall(("graphene_frustum_free", libgraphene), Nothing, (Ptr{_GrapheneFrustum},), instance) nothing end - function get_planes(instance::Union{GrapheneFrustum, Ref{_GrapheneFrustum}}) + function get_planes(instance::GrapheneFrustumLike) m_planes = Ref{Ptr{_GraphenePlane}}() ret = ccall(("graphene_frustum_get_planes", libgraphene), Nothing, (Ptr{_GrapheneFrustum}, Ptr{Ptr{_GraphenePlane}}), instance, m_planes) _planes = m_planes[] _planes end - function init(instance::Union{GrapheneFrustum, Ref{_GrapheneFrustum}}, _p0::Union{GraphenePlane, Ref{_GraphenePlane}}, _p1::Union{GraphenePlane, Ref{_GraphenePlane}}, _p2::Union{GraphenePlane, Ref{_GraphenePlane}}, _p3::Union{GraphenePlane, Ref{_GraphenePlane}}, _p4::Union{GraphenePlane, Ref{_GraphenePlane}}, _p5::Union{GraphenePlane, Ref{_GraphenePlane}}) + function init(instance::GrapheneFrustumLike, _p0::GraphenePlaneLike, _p1::GraphenePlaneLike, _p2::GraphenePlaneLike, _p3::GraphenePlaneLike, _p4::GraphenePlaneLike, _p5::GraphenePlaneLike) ret = ccall(("graphene_frustum_init", libgraphene), Ptr{_GrapheneFrustum}, (Ptr{_GrapheneFrustum}, Ptr{_GraphenePlane}, Ptr{_GraphenePlane}, Ptr{_GraphenePlane}, Ptr{_GraphenePlane}, Ptr{_GraphenePlane}, Ptr{_GraphenePlane}), instance, _p0, _p1, _p2, _p3, _p4, _p5) - ret2 = convert(Union{GrapheneFrustum, Ref{_GrapheneFrustum}}, ret, false) + ret2 = convert(GrapheneFrustumLike, ret, false) ret2 end - function init_from_frustum(instance::Union{GrapheneFrustum, Ref{_GrapheneFrustum}}, _src::Union{GrapheneFrustum, Ref{_GrapheneFrustum}}) + function init_from_frustum(instance::GrapheneFrustumLike, _src::GrapheneFrustumLike) ret = ccall(("graphene_frustum_init_from_frustum", libgraphene), Ptr{_GrapheneFrustum}, (Ptr{_GrapheneFrustum}, Ptr{_GrapheneFrustum}), instance, _src) - ret2 = convert(Union{GrapheneFrustum, Ref{_GrapheneFrustum}}, ret, false) + ret2 = convert(GrapheneFrustumLike, ret, false) ret2 end - function init_from_matrix(instance::Union{GrapheneFrustum, Ref{_GrapheneFrustum}}, _matrix::Union{GrapheneMatrix, Ref{_GrapheneMatrix}}) + function init_from_matrix(instance::GrapheneFrustumLike, _matrix::GrapheneMatrixLike) ret = ccall(("graphene_frustum_init_from_matrix", libgraphene), Ptr{_GrapheneFrustum}, (Ptr{_GrapheneFrustum}, Ptr{_GrapheneMatrix}), instance, _matrix) - ret2 = convert(Union{GrapheneFrustum, Ref{_GrapheneFrustum}}, ret, false) + ret2 = convert(GrapheneFrustumLike, ret, false) ret2 end - function intersects_box(instance::Union{GrapheneFrustum, Ref{_GrapheneFrustum}}, _box::Union{GrapheneBox, Ref{_GrapheneBox}}) + function intersects_box(instance::GrapheneFrustumLike, _box::GrapheneBoxLike) ret = ccall(("graphene_frustum_intersects_box", libgraphene), Cint, (Ptr{_GrapheneFrustum}, Ptr{_GrapheneBox}), instance, _box) ret2 = convert(Bool, ret) ret2 end - function intersects_sphere(instance::Union{GrapheneFrustum, Ref{_GrapheneFrustum}}, _sphere::Union{GrapheneSphere, Ref{_GrapheneSphere}}) + function intersects_sphere(instance::GrapheneFrustumLike, _sphere::GrapheneSphereLike) ret = ccall(("graphene_frustum_intersects_sphere", libgraphene), Cint, (Ptr{_GrapheneFrustum}, Ptr{_GrapheneSphere}), instance, _sphere) ret2 = convert(Bool, ret) ret2 end function Matrix_alloc() ret = ccall(("graphene_matrix_alloc", libgraphene), Ptr{_GrapheneMatrix}, ()) - ret2 = convert(Union{GrapheneMatrix, Ref{_GrapheneMatrix}}, ret, true) + ret2 = convert(GrapheneMatrixLike, ret, true) ret2 end - function decompose(instance::Union{GrapheneMatrix, Ref{_GrapheneMatrix}}) + function decompose(instance::GrapheneMatrixLike) m_translate = Ref{_GrapheneVec3}() m_scale = Ref{_GrapheneVec3}() m_rotate = Ref{_GrapheneQuaternion}() @@ -312,243 +312,243 @@ $(Expr(:toplevel, quote _perspective = m_perspective[] (ret2, _translate, _scale, _rotate, _shear, _perspective) end - function determinant(instance::Union{GrapheneMatrix, Ref{_GrapheneMatrix}}) + function determinant(instance::GrapheneMatrixLike) ret = ccall(("graphene_matrix_determinant", libgraphene), Float32, (Ptr{_GrapheneMatrix},), instance) ret end - function equal(instance::Union{GrapheneMatrix, Ref{_GrapheneMatrix}}, _b::Union{GrapheneMatrix, Ref{_GrapheneMatrix}}) + function equal(instance::GrapheneMatrixLike, _b::GrapheneMatrixLike) ret = ccall(("graphene_matrix_equal", libgraphene), Cint, (Ptr{_GrapheneMatrix}, Ptr{_GrapheneMatrix}), instance, _b) ret2 = convert(Bool, ret) ret2 end - function equal_fast(instance::Union{GrapheneMatrix, Ref{_GrapheneMatrix}}, _b::Union{GrapheneMatrix, Ref{_GrapheneMatrix}}) + function equal_fast(instance::GrapheneMatrixLike, _b::GrapheneMatrixLike) ret = ccall(("graphene_matrix_equal_fast", libgraphene), Cint, (Ptr{_GrapheneMatrix}, Ptr{_GrapheneMatrix}), instance, _b) ret2 = convert(Bool, ret) ret2 end - function free(instance::Union{GrapheneMatrix, Ref{_GrapheneMatrix}}) + function free(instance::GrapheneMatrixLike) ret = ccall(("graphene_matrix_free", libgraphene), Nothing, (Ptr{_GrapheneMatrix},), instance) nothing end - function get_row(instance::Union{GrapheneMatrix, Ref{_GrapheneMatrix}}, _index_::Integer) + function get_row(instance::GrapheneMatrixLike, _index_::Integer) m_res = Ref{_GrapheneVec4}() ret = ccall(("graphene_matrix_get_row", libgraphene), Nothing, (Ptr{_GrapheneMatrix}, UInt32, Ptr{_GrapheneVec4}), instance, _index_, m_res) _res = m_res[] _res end - function get_value(instance::Union{GrapheneMatrix, Ref{_GrapheneMatrix}}, _row::Integer, _col::Integer) + function get_value(instance::GrapheneMatrixLike, _row::Integer, _col::Integer) ret = ccall(("graphene_matrix_get_value", libgraphene), Float32, (Ptr{_GrapheneMatrix}, UInt32, UInt32), instance, _row, _col) ret end - function get_x_scale(instance::Union{GrapheneMatrix, Ref{_GrapheneMatrix}}) + function get_x_scale(instance::GrapheneMatrixLike) ret = ccall(("graphene_matrix_get_x_scale", libgraphene), Float32, (Ptr{_GrapheneMatrix},), instance) ret end - function get_x_translation(instance::Union{GrapheneMatrix, Ref{_GrapheneMatrix}}) + function get_x_translation(instance::GrapheneMatrixLike) ret = ccall(("graphene_matrix_get_x_translation", libgraphene), Float32, (Ptr{_GrapheneMatrix},), instance) ret end - function get_y_scale(instance::Union{GrapheneMatrix, Ref{_GrapheneMatrix}}) + function get_y_scale(instance::GrapheneMatrixLike) ret = ccall(("graphene_matrix_get_y_scale", libgraphene), Float32, (Ptr{_GrapheneMatrix},), instance) ret end - function get_y_translation(instance::Union{GrapheneMatrix, Ref{_GrapheneMatrix}}) + function get_y_translation(instance::GrapheneMatrixLike) ret = ccall(("graphene_matrix_get_y_translation", libgraphene), Float32, (Ptr{_GrapheneMatrix},), instance) ret end - function get_z_scale(instance::Union{GrapheneMatrix, Ref{_GrapheneMatrix}}) + function get_z_scale(instance::GrapheneMatrixLike) ret = ccall(("graphene_matrix_get_z_scale", libgraphene), Float32, (Ptr{_GrapheneMatrix},), instance) ret end - function get_z_translation(instance::Union{GrapheneMatrix, Ref{_GrapheneMatrix}}) + function get_z_translation(instance::GrapheneMatrixLike) ret = ccall(("graphene_matrix_get_z_translation", libgraphene), Float32, (Ptr{_GrapheneMatrix},), instance) ret end - function init_from_2d(instance::Union{GrapheneMatrix, Ref{_GrapheneMatrix}}, _xx::Real, _yx::Real, _xy::Real, _yy::Real, _x_0::Real, _y_0::Real) + function init_from_2d(instance::GrapheneMatrixLike, _xx::Real, _yx::Real, _xy::Real, _yy::Real, _x_0::Real, _y_0::Real) ret = ccall(("graphene_matrix_init_from_2d", libgraphene), Ptr{_GrapheneMatrix}, (Ptr{_GrapheneMatrix}, Float64, Float64, Float64, Float64, Float64, Float64), instance, _xx, _yx, _xy, _yy, _x_0, _y_0) - ret2 = convert(Union{GrapheneMatrix, Ref{_GrapheneMatrix}}, ret, false) + ret2 = convert(GrapheneMatrixLike, ret, false) ret2 end - function init_from_float(instance::Union{GrapheneMatrix, Ref{_GrapheneMatrix}}, _v) + function init_from_float(instance::GrapheneMatrixLike, _v) _v_arr = convert(Vector{Float32}, _v) ret = ccall(("graphene_matrix_init_from_float", libgraphene), Ptr{_GrapheneMatrix}, (Ptr{_GrapheneMatrix}, Ptr{Float32}), instance, _v_arr) - ret2 = convert(Union{GrapheneMatrix, Ref{_GrapheneMatrix}}, ret, false) + ret2 = convert(GrapheneMatrixLike, ret, false) ret2 end - function init_from_matrix(instance::Union{GrapheneMatrix, Ref{_GrapheneMatrix}}, _src::Union{GrapheneMatrix, Ref{_GrapheneMatrix}}) + function init_from_matrix(instance::GrapheneMatrixLike, _src::GrapheneMatrixLike) ret = ccall(("graphene_matrix_init_from_matrix", libgraphene), Ptr{_GrapheneMatrix}, (Ptr{_GrapheneMatrix}, Ptr{_GrapheneMatrix}), instance, _src) - ret2 = convert(Union{GrapheneMatrix, Ref{_GrapheneMatrix}}, ret, false) + ret2 = convert(GrapheneMatrixLike, ret, false) ret2 end - function init_from_vec4(instance::Union{GrapheneMatrix, Ref{_GrapheneMatrix}}, _v0::Union{GrapheneVec4, Ref{_GrapheneVec4}}, _v1::Union{GrapheneVec4, Ref{_GrapheneVec4}}, _v2::Union{GrapheneVec4, Ref{_GrapheneVec4}}, _v3::Union{GrapheneVec4, Ref{_GrapheneVec4}}) + function init_from_vec4(instance::GrapheneMatrixLike, _v0::GrapheneVec4Like, _v1::GrapheneVec4Like, _v2::GrapheneVec4Like, _v3::GrapheneVec4Like) ret = ccall(("graphene_matrix_init_from_vec4", libgraphene), Ptr{_GrapheneMatrix}, (Ptr{_GrapheneMatrix}, Ptr{_GrapheneVec4}, Ptr{_GrapheneVec4}, Ptr{_GrapheneVec4}, Ptr{_GrapheneVec4}), instance, _v0, _v1, _v2, _v3) - ret2 = convert(Union{GrapheneMatrix, Ref{_GrapheneMatrix}}, ret, false) + ret2 = convert(GrapheneMatrixLike, ret, false) ret2 end - function init_frustum(instance::Union{GrapheneMatrix, Ref{_GrapheneMatrix}}, _left::Real, _right::Real, _bottom::Real, _top::Real, _z_near::Real, _z_far::Real) + function init_frustum(instance::GrapheneMatrixLike, _left::Real, _right::Real, _bottom::Real, _top::Real, _z_near::Real, _z_far::Real) ret = ccall(("graphene_matrix_init_frustum", libgraphene), Ptr{_GrapheneMatrix}, (Ptr{_GrapheneMatrix}, Float32, Float32, Float32, Float32, Float32, Float32), instance, _left, _right, _bottom, _top, _z_near, _z_far) - ret2 = convert(Union{GrapheneMatrix, Ref{_GrapheneMatrix}}, ret, false) + ret2 = convert(GrapheneMatrixLike, ret, false) ret2 end - function init_identity(instance::Union{GrapheneMatrix, Ref{_GrapheneMatrix}}) + function init_identity(instance::GrapheneMatrixLike) ret = ccall(("graphene_matrix_init_identity", libgraphene), Ptr{_GrapheneMatrix}, (Ptr{_GrapheneMatrix},), instance) - ret2 = convert(Union{GrapheneMatrix, Ref{_GrapheneMatrix}}, ret, false) + ret2 = convert(GrapheneMatrixLike, ret, false) ret2 end - function init_look_at(instance::Union{GrapheneMatrix, Ref{_GrapheneMatrix}}, _eye::Union{GrapheneVec3, Ref{_GrapheneVec3}}, _center::Union{GrapheneVec3, Ref{_GrapheneVec3}}, _up::Union{GrapheneVec3, Ref{_GrapheneVec3}}) + function init_look_at(instance::GrapheneMatrixLike, _eye::GrapheneVec3Like, _center::GrapheneVec3Like, _up::GrapheneVec3Like) ret = ccall(("graphene_matrix_init_look_at", libgraphene), Ptr{_GrapheneMatrix}, (Ptr{_GrapheneMatrix}, Ptr{_GrapheneVec3}, Ptr{_GrapheneVec3}, Ptr{_GrapheneVec3}), instance, _eye, _center, _up) - ret2 = convert(Union{GrapheneMatrix, Ref{_GrapheneMatrix}}, ret, false) + ret2 = convert(GrapheneMatrixLike, ret, false) ret2 end - function init_ortho(instance::Union{GrapheneMatrix, Ref{_GrapheneMatrix}}, _left::Real, _right::Real, _top::Real, _bottom::Real, _z_near::Real, _z_far::Real) + function init_ortho(instance::GrapheneMatrixLike, _left::Real, _right::Real, _top::Real, _bottom::Real, _z_near::Real, _z_far::Real) ret = ccall(("graphene_matrix_init_ortho", libgraphene), Ptr{_GrapheneMatrix}, (Ptr{_GrapheneMatrix}, Float32, Float32, Float32, Float32, Float32, Float32), instance, _left, _right, _top, _bottom, _z_near, _z_far) - ret2 = convert(Union{GrapheneMatrix, Ref{_GrapheneMatrix}}, ret, false) + ret2 = convert(GrapheneMatrixLike, ret, false) ret2 end - function init_perspective(instance::Union{GrapheneMatrix, Ref{_GrapheneMatrix}}, _fovy::Real, _aspect::Real, _z_near::Real, _z_far::Real) + function init_perspective(instance::GrapheneMatrixLike, _fovy::Real, _aspect::Real, _z_near::Real, _z_far::Real) ret = ccall(("graphene_matrix_init_perspective", libgraphene), Ptr{_GrapheneMatrix}, (Ptr{_GrapheneMatrix}, Float32, Float32, Float32, Float32), instance, _fovy, _aspect, _z_near, _z_far) - ret2 = convert(Union{GrapheneMatrix, Ref{_GrapheneMatrix}}, ret, false) + ret2 = convert(GrapheneMatrixLike, ret, false) ret2 end - function init_rotate(instance::Union{GrapheneMatrix, Ref{_GrapheneMatrix}}, _angle::Real, _axis::Union{GrapheneVec3, Ref{_GrapheneVec3}}) + function init_rotate(instance::GrapheneMatrixLike, _angle::Real, _axis::GrapheneVec3Like) ret = ccall(("graphene_matrix_init_rotate", libgraphene), Ptr{_GrapheneMatrix}, (Ptr{_GrapheneMatrix}, Float32, Ptr{_GrapheneVec3}), instance, _angle, _axis) - ret2 = convert(Union{GrapheneMatrix, Ref{_GrapheneMatrix}}, ret, false) + ret2 = convert(GrapheneMatrixLike, ret, false) ret2 end - function init_scale(instance::Union{GrapheneMatrix, Ref{_GrapheneMatrix}}, _x::Real, _y::Real, _z::Real) + function init_scale(instance::GrapheneMatrixLike, _x::Real, _y::Real, _z::Real) ret = ccall(("graphene_matrix_init_scale", libgraphene), Ptr{_GrapheneMatrix}, (Ptr{_GrapheneMatrix}, Float32, Float32, Float32), instance, _x, _y, _z) - ret2 = convert(Union{GrapheneMatrix, Ref{_GrapheneMatrix}}, ret, false) + ret2 = convert(GrapheneMatrixLike, ret, false) ret2 end - function init_skew(instance::Union{GrapheneMatrix, Ref{_GrapheneMatrix}}, _x_skew::Real, _y_skew::Real) + function init_skew(instance::GrapheneMatrixLike, _x_skew::Real, _y_skew::Real) ret = ccall(("graphene_matrix_init_skew", libgraphene), Ptr{_GrapheneMatrix}, (Ptr{_GrapheneMatrix}, Float32, Float32), instance, _x_skew, _y_skew) - ret2 = convert(Union{GrapheneMatrix, Ref{_GrapheneMatrix}}, ret, false) + ret2 = convert(GrapheneMatrixLike, ret, false) ret2 end - function init_translate(instance::Union{GrapheneMatrix, Ref{_GrapheneMatrix}}, _p::Union{GraphenePoint3D, Ref{_GraphenePoint3D}}) + function init_translate(instance::GrapheneMatrixLike, _p::GraphenePoint3DLike) ret = ccall(("graphene_matrix_init_translate", libgraphene), Ptr{_GrapheneMatrix}, (Ptr{_GrapheneMatrix}, Ptr{_GraphenePoint3D}), instance, _p) - ret2 = convert(Union{GrapheneMatrix, Ref{_GrapheneMatrix}}, ret, false) + ret2 = convert(GrapheneMatrixLike, ret, false) ret2 end - function interpolate(instance::Union{GrapheneMatrix, Ref{_GrapheneMatrix}}, _b::Union{GrapheneMatrix, Ref{_GrapheneMatrix}}, _factor::Real) + function interpolate(instance::GrapheneMatrixLike, _b::GrapheneMatrixLike, _factor::Real) m_res = Ref{_GrapheneMatrix}() ret = ccall(("graphene_matrix_interpolate", libgraphene), Nothing, (Ptr{_GrapheneMatrix}, Ptr{_GrapheneMatrix}, Float64, Ptr{_GrapheneMatrix}), instance, _b, _factor, m_res) _res = m_res[] _res end - function inverse(instance::Union{GrapheneMatrix, Ref{_GrapheneMatrix}}) + function inverse(instance::GrapheneMatrixLike) m_res = Ref{_GrapheneMatrix}() ret = ccall(("graphene_matrix_inverse", libgraphene), Cint, (Ptr{_GrapheneMatrix}, Ptr{_GrapheneMatrix}), instance, m_res) ret2 = convert(Bool, ret) _res = m_res[] (ret2, _res) end - function is_2d(instance::Union{GrapheneMatrix, Ref{_GrapheneMatrix}}) + function is_2d(instance::GrapheneMatrixLike) ret = ccall(("graphene_matrix_is_2d", libgraphene), Cint, (Ptr{_GrapheneMatrix},), instance) ret2 = convert(Bool, ret) ret2 end - function is_backface_visible(instance::Union{GrapheneMatrix, Ref{_GrapheneMatrix}}) + function is_backface_visible(instance::GrapheneMatrixLike) ret = ccall(("graphene_matrix_is_backface_visible", libgraphene), Cint, (Ptr{_GrapheneMatrix},), instance) ret2 = convert(Bool, ret) ret2 end - function is_identity(instance::Union{GrapheneMatrix, Ref{_GrapheneMatrix}}) + function is_identity(instance::GrapheneMatrixLike) ret = ccall(("graphene_matrix_is_identity", libgraphene), Cint, (Ptr{_GrapheneMatrix},), instance) ret2 = convert(Bool, ret) ret2 end - function is_singular(instance::Union{GrapheneMatrix, Ref{_GrapheneMatrix}}) + function is_singular(instance::GrapheneMatrixLike) ret = ccall(("graphene_matrix_is_singular", libgraphene), Cint, (Ptr{_GrapheneMatrix},), instance) ret2 = convert(Bool, ret) ret2 end - function multiply(instance::Union{GrapheneMatrix, Ref{_GrapheneMatrix}}, _b::Union{GrapheneMatrix, Ref{_GrapheneMatrix}}) + function multiply(instance::GrapheneMatrixLike, _b::GrapheneMatrixLike) m_res = Ref{_GrapheneMatrix}() ret = ccall(("graphene_matrix_multiply", libgraphene), Nothing, (Ptr{_GrapheneMatrix}, Ptr{_GrapheneMatrix}, Ptr{_GrapheneMatrix}), instance, _b, m_res) _res = m_res[] _res end - function near(instance::Union{GrapheneMatrix, Ref{_GrapheneMatrix}}, _b::Union{GrapheneMatrix, Ref{_GrapheneMatrix}}, _epsilon::Real) + function near(instance::GrapheneMatrixLike, _b::GrapheneMatrixLike, _epsilon::Real) ret = ccall(("graphene_matrix_near", libgraphene), Cint, (Ptr{_GrapheneMatrix}, Ptr{_GrapheneMatrix}, Float32), instance, _b, _epsilon) ret2 = convert(Bool, ret) ret2 end - function normalize(instance::Union{GrapheneMatrix, Ref{_GrapheneMatrix}}) + function normalize(instance::GrapheneMatrixLike) m_res = Ref{_GrapheneMatrix}() ret = ccall(("graphene_matrix_normalize", libgraphene), Nothing, (Ptr{_GrapheneMatrix}, Ptr{_GrapheneMatrix}), instance, m_res) _res = m_res[] _res end - function perspective(instance::Union{GrapheneMatrix, Ref{_GrapheneMatrix}}, _depth::Real) + function perspective(instance::GrapheneMatrixLike, _depth::Real) m_res = Ref{_GrapheneMatrix}() ret = ccall(("graphene_matrix_perspective", libgraphene), Nothing, (Ptr{_GrapheneMatrix}, Float32, Ptr{_GrapheneMatrix}), instance, _depth, m_res) _res = m_res[] _res end - function print(instance::Union{GrapheneMatrix, Ref{_GrapheneMatrix}}) + function print(instance::GrapheneMatrixLike) ret = ccall(("graphene_matrix_print", libgraphene), Nothing, (Ptr{_GrapheneMatrix},), instance) nothing end - function project_point(instance::Union{GrapheneMatrix, Ref{_GrapheneMatrix}}, _p::Union{GraphenePoint, Ref{_GraphenePoint}}) + function project_point(instance::GrapheneMatrixLike, _p::GraphenePointLike) m_res = Ref{_GraphenePoint}() ret = ccall(("graphene_matrix_project_point", libgraphene), Nothing, (Ptr{_GrapheneMatrix}, Ptr{_GraphenePoint}, Ptr{_GraphenePoint}), instance, _p, m_res) _res = m_res[] _res end - function project_rect(instance::Union{GrapheneMatrix, Ref{_GrapheneMatrix}}, _r::Union{GrapheneRect, Ref{_GrapheneRect}}) + function project_rect(instance::GrapheneMatrixLike, _r::GrapheneRectLike) m_res = Ref{_GrapheneQuad}() ret = ccall(("graphene_matrix_project_rect", libgraphene), Nothing, (Ptr{_GrapheneMatrix}, Ptr{_GrapheneRect}, Ptr{_GrapheneQuad}), instance, _r, m_res) _res = m_res[] _res end - function project_rect_bounds(instance::Union{GrapheneMatrix, Ref{_GrapheneMatrix}}, _r::Union{GrapheneRect, Ref{_GrapheneRect}}) + function project_rect_bounds(instance::GrapheneMatrixLike, _r::GrapheneRectLike) m_res = Ref{_GrapheneRect}() ret = ccall(("graphene_matrix_project_rect_bounds", libgraphene), Nothing, (Ptr{_GrapheneMatrix}, Ptr{_GrapheneRect}, Ptr{_GrapheneRect}), instance, _r, m_res) _res = m_res[] _res end - function rotate(instance::Union{GrapheneMatrix, Ref{_GrapheneMatrix}}, _angle::Real, _axis::Union{GrapheneVec3, Ref{_GrapheneVec3}}) + function rotate(instance::GrapheneMatrixLike, _angle::Real, _axis::GrapheneVec3Like) ret = ccall(("graphene_matrix_rotate", libgraphene), Nothing, (Ptr{_GrapheneMatrix}, Float32, Ptr{_GrapheneVec3}), instance, _angle, _axis) nothing end - function rotate_euler(instance::Union{GrapheneMatrix, Ref{_GrapheneMatrix}}, _e::Union{GrapheneEuler, Ref{_GrapheneEuler}}) + function rotate_euler(instance::GrapheneMatrixLike, _e::GrapheneEulerLike) ret = ccall(("graphene_matrix_rotate_euler", libgraphene), Nothing, (Ptr{_GrapheneMatrix}, Ptr{_GrapheneEuler}), instance, _e) nothing end - function rotate_quaternion(instance::Union{GrapheneMatrix, Ref{_GrapheneMatrix}}, _q::Union{GrapheneQuaternion, Ref{_GrapheneQuaternion}}) + function rotate_quaternion(instance::GrapheneMatrixLike, _q::GrapheneQuaternionLike) ret = ccall(("graphene_matrix_rotate_quaternion", libgraphene), Nothing, (Ptr{_GrapheneMatrix}, Ptr{_GrapheneQuaternion}), instance, _q) nothing end - function rotate_x(instance::Union{GrapheneMatrix, Ref{_GrapheneMatrix}}, _angle::Real) + function rotate_x(instance::GrapheneMatrixLike, _angle::Real) ret = ccall(("graphene_matrix_rotate_x", libgraphene), Nothing, (Ptr{_GrapheneMatrix}, Float32), instance, _angle) nothing end - function rotate_y(instance::Union{GrapheneMatrix, Ref{_GrapheneMatrix}}, _angle::Real) + function rotate_y(instance::GrapheneMatrixLike, _angle::Real) ret = ccall(("graphene_matrix_rotate_y", libgraphene), Nothing, (Ptr{_GrapheneMatrix}, Float32), instance, _angle) nothing end - function rotate_z(instance::Union{GrapheneMatrix, Ref{_GrapheneMatrix}}, _angle::Real) + function rotate_z(instance::GrapheneMatrixLike, _angle::Real) ret = ccall(("graphene_matrix_rotate_z", libgraphene), Nothing, (Ptr{_GrapheneMatrix}, Float32), instance, _angle) nothing end - function scale(instance::Union{GrapheneMatrix, Ref{_GrapheneMatrix}}, _factor_x::Real, _factor_y::Real, _factor_z::Real) + function scale(instance::GrapheneMatrixLike, _factor_x::Real, _factor_y::Real, _factor_z::Real) ret = ccall(("graphene_matrix_scale", libgraphene), Nothing, (Ptr{_GrapheneMatrix}, Float32, Float32, Float32), instance, _factor_x, _factor_y, _factor_z) nothing end - function skew_xy(instance::Union{GrapheneMatrix, Ref{_GrapheneMatrix}}, _factor::Real) + function skew_xy(instance::GrapheneMatrixLike, _factor::Real) ret = ccall(("graphene_matrix_skew_xy", libgraphene), Nothing, (Ptr{_GrapheneMatrix}, Float32), instance, _factor) nothing end - function skew_xz(instance::Union{GrapheneMatrix, Ref{_GrapheneMatrix}}, _factor::Real) + function skew_xz(instance::GrapheneMatrixLike, _factor::Real) ret = ccall(("graphene_matrix_skew_xz", libgraphene), Nothing, (Ptr{_GrapheneMatrix}, Float32), instance, _factor) nothing end - function skew_yz(instance::Union{GrapheneMatrix, Ref{_GrapheneMatrix}}, _factor::Real) + function skew_yz(instance::GrapheneMatrixLike, _factor::Real) ret = ccall(("graphene_matrix_skew_yz", libgraphene), Nothing, (Ptr{_GrapheneMatrix}, Float32), instance, _factor) nothing end - function to_2d(instance::Union{GrapheneMatrix, Ref{_GrapheneMatrix}}) + function to_2d(instance::GrapheneMatrixLike) m_xx = Ref{Float64}() m_yx = Ref{Float64}() m_xy = Ref{Float64}() @@ -565,89 +565,89 @@ $(Expr(:toplevel, quote _y_0 = m_y_0[] (ret2, _xx, _yx, _xy, _yy, _x_0, _y_0) end - function to_float(instance::Union{GrapheneMatrix, Ref{_GrapheneMatrix}}) + function to_float(instance::GrapheneMatrixLike) m_v = Ref{Ptr{Float32}}() ret = ccall(("graphene_matrix_to_float", libgraphene), Nothing, (Ptr{_GrapheneMatrix}, Ptr{Ptr{Float32}}), instance, m_v) _v = m_v[] _v end - function transform_bounds(instance::Union{GrapheneMatrix, Ref{_GrapheneMatrix}}, _r::Union{GrapheneRect, Ref{_GrapheneRect}}) + function transform_bounds(instance::GrapheneMatrixLike, _r::GrapheneRectLike) m_res = Ref{_GrapheneRect}() ret = ccall(("graphene_matrix_transform_bounds", libgraphene), Nothing, (Ptr{_GrapheneMatrix}, Ptr{_GrapheneRect}, Ptr{_GrapheneRect}), instance, _r, m_res) _res = m_res[] _res end - function transform_box(instance::Union{GrapheneMatrix, Ref{_GrapheneMatrix}}, _b::Union{GrapheneBox, Ref{_GrapheneBox}}) + function transform_box(instance::GrapheneMatrixLike, _b::GrapheneBoxLike) m_res = Ref{_GrapheneBox}() ret = ccall(("graphene_matrix_transform_box", libgraphene), Nothing, (Ptr{_GrapheneMatrix}, Ptr{_GrapheneBox}, Ptr{_GrapheneBox}), instance, _b, m_res) _res = m_res[] _res end - function transform_point(instance::Union{GrapheneMatrix, Ref{_GrapheneMatrix}}, _p::Union{GraphenePoint, Ref{_GraphenePoint}}) + function transform_point(instance::GrapheneMatrixLike, _p::GraphenePointLike) m_res = Ref{_GraphenePoint}() ret = ccall(("graphene_matrix_transform_point", libgraphene), Nothing, (Ptr{_GrapheneMatrix}, Ptr{_GraphenePoint}, Ptr{_GraphenePoint}), instance, _p, m_res) _res = m_res[] _res end - function transform_point3d(instance::Union{GrapheneMatrix, Ref{_GrapheneMatrix}}, _p::Union{GraphenePoint3D, Ref{_GraphenePoint3D}}) + function transform_point3d(instance::GrapheneMatrixLike, _p::GraphenePoint3DLike) m_res = Ref{_GraphenePoint3D}() ret = ccall(("graphene_matrix_transform_point3d", libgraphene), Nothing, (Ptr{_GrapheneMatrix}, Ptr{_GraphenePoint3D}, Ptr{_GraphenePoint3D}), instance, _p, m_res) _res = m_res[] _res end - function transform_ray(instance::Union{GrapheneMatrix, Ref{_GrapheneMatrix}}, _r::Union{GrapheneRay, Ref{_GrapheneRay}}) + function transform_ray(instance::GrapheneMatrixLike, _r::GrapheneRayLike) m_res = Ref{_GrapheneRay}() ret = ccall(("graphene_matrix_transform_ray", libgraphene), Nothing, (Ptr{_GrapheneMatrix}, Ptr{_GrapheneRay}, Ptr{_GrapheneRay}), instance, _r, m_res) _res = m_res[] _res end - function transform_rect(instance::Union{GrapheneMatrix, Ref{_GrapheneMatrix}}, _r::Union{GrapheneRect, Ref{_GrapheneRect}}) + function transform_rect(instance::GrapheneMatrixLike, _r::GrapheneRectLike) m_res = Ref{_GrapheneQuad}() ret = ccall(("graphene_matrix_transform_rect", libgraphene), Nothing, (Ptr{_GrapheneMatrix}, Ptr{_GrapheneRect}, Ptr{_GrapheneQuad}), instance, _r, m_res) _res = m_res[] _res end - function transform_sphere(instance::Union{GrapheneMatrix, Ref{_GrapheneMatrix}}, _s::Union{GrapheneSphere, Ref{_GrapheneSphere}}) + function transform_sphere(instance::GrapheneMatrixLike, _s::GrapheneSphereLike) m_res = Ref{_GrapheneSphere}() ret = ccall(("graphene_matrix_transform_sphere", libgraphene), Nothing, (Ptr{_GrapheneMatrix}, Ptr{_GrapheneSphere}, Ptr{_GrapheneSphere}), instance, _s, m_res) _res = m_res[] _res end - function transform_vec3(instance::Union{GrapheneMatrix, Ref{_GrapheneMatrix}}, _v::Union{GrapheneVec3, Ref{_GrapheneVec3}}) + function transform_vec3(instance::GrapheneMatrixLike, _v::GrapheneVec3Like) m_res = Ref{_GrapheneVec3}() ret = ccall(("graphene_matrix_transform_vec3", libgraphene), Nothing, (Ptr{_GrapheneMatrix}, Ptr{_GrapheneVec3}, Ptr{_GrapheneVec3}), instance, _v, m_res) _res = m_res[] _res end - function transform_vec4(instance::Union{GrapheneMatrix, Ref{_GrapheneMatrix}}, _v::Union{GrapheneVec4, Ref{_GrapheneVec4}}) + function transform_vec4(instance::GrapheneMatrixLike, _v::GrapheneVec4Like) m_res = Ref{_GrapheneVec4}() ret = ccall(("graphene_matrix_transform_vec4", libgraphene), Nothing, (Ptr{_GrapheneMatrix}, Ptr{_GrapheneVec4}, Ptr{_GrapheneVec4}), instance, _v, m_res) _res = m_res[] _res end - function translate(instance::Union{GrapheneMatrix, Ref{_GrapheneMatrix}}, _pos::Union{GraphenePoint3D, Ref{_GraphenePoint3D}}) + function translate(instance::GrapheneMatrixLike, _pos::GraphenePoint3DLike) ret = ccall(("graphene_matrix_translate", libgraphene), Nothing, (Ptr{_GrapheneMatrix}, Ptr{_GraphenePoint3D}), instance, _pos) nothing end - function transpose(instance::Union{GrapheneMatrix, Ref{_GrapheneMatrix}}) + function transpose(instance::GrapheneMatrixLike) m_res = Ref{_GrapheneMatrix}() ret = ccall(("graphene_matrix_transpose", libgraphene), Nothing, (Ptr{_GrapheneMatrix}, Ptr{_GrapheneMatrix}), instance, m_res) _res = m_res[] _res end - function unproject_point3d(instance::Union{GrapheneMatrix, Ref{_GrapheneMatrix}}, _modelview::Union{GrapheneMatrix, Ref{_GrapheneMatrix}}, _point::Union{GraphenePoint3D, Ref{_GraphenePoint3D}}) + function unproject_point3d(instance::GrapheneMatrixLike, _modelview::GrapheneMatrixLike, _point::GraphenePoint3DLike) m_res = Ref{_GraphenePoint3D}() ret = ccall(("graphene_matrix_unproject_point3d", libgraphene), Nothing, (Ptr{_GrapheneMatrix}, Ptr{_GrapheneMatrix}, Ptr{_GraphenePoint3D}, Ptr{_GraphenePoint3D}), instance, _modelview, _point, m_res) _res = m_res[] _res end - function untransform_bounds(instance::Union{GrapheneMatrix, Ref{_GrapheneMatrix}}, _r::Union{GrapheneRect, Ref{_GrapheneRect}}, _bounds::Union{GrapheneRect, Ref{_GrapheneRect}}) + function untransform_bounds(instance::GrapheneMatrixLike, _r::GrapheneRectLike, _bounds::GrapheneRectLike) m_res = Ref{_GrapheneRect}() ret = ccall(("graphene_matrix_untransform_bounds", libgraphene), Nothing, (Ptr{_GrapheneMatrix}, Ptr{_GrapheneRect}, Ptr{_GrapheneRect}, Ptr{_GrapheneRect}), instance, _r, _bounds, m_res) _res = m_res[] _res end - function untransform_point(instance::Union{GrapheneMatrix, Ref{_GrapheneMatrix}}, _p::Union{GraphenePoint, Ref{_GraphenePoint}}, _bounds::Union{GrapheneRect, Ref{_GrapheneRect}}) + function untransform_point(instance::GrapheneMatrixLike, _p::GraphenePointLike, _bounds::GrapheneRectLike) m_res = Ref{_GraphenePoint}() ret = ccall(("graphene_matrix_untransform_point", libgraphene), Cint, (Ptr{_GrapheneMatrix}, Ptr{_GraphenePoint}, Ptr{_GrapheneRect}, Ptr{_GraphenePoint}), instance, _p, _bounds, m_res) ret2 = convert(Bool, ret) @@ -656,71 +656,71 @@ $(Expr(:toplevel, quote end function Plane_alloc() ret = ccall(("graphene_plane_alloc", libgraphene), Ptr{_GraphenePlane}, ()) - ret2 = convert(Union{GraphenePlane, Ref{_GraphenePlane}}, ret, true) + ret2 = convert(GraphenePlaneLike, ret, true) ret2 end - function distance(instance::Union{GraphenePlane, Ref{_GraphenePlane}}, _point::Union{GraphenePoint3D, Ref{_GraphenePoint3D}}) + function distance(instance::GraphenePlaneLike, _point::GraphenePoint3DLike) ret = ccall(("graphene_plane_distance", libgraphene), Float32, (Ptr{_GraphenePlane}, Ptr{_GraphenePoint3D}), instance, _point) ret end - function equal(instance::Union{GraphenePlane, Ref{_GraphenePlane}}, _b::Union{GraphenePlane, Ref{_GraphenePlane}}) + function equal(instance::GraphenePlaneLike, _b::GraphenePlaneLike) ret = ccall(("graphene_plane_equal", libgraphene), Cint, (Ptr{_GraphenePlane}, Ptr{_GraphenePlane}), instance, _b) ret2 = convert(Bool, ret) ret2 end - function free(instance::Union{GraphenePlane, Ref{_GraphenePlane}}) + function free(instance::GraphenePlaneLike) ret = ccall(("graphene_plane_free", libgraphene), Nothing, (Ptr{_GraphenePlane},), instance) nothing end - function get_constant(instance::Union{GraphenePlane, Ref{_GraphenePlane}}) + function get_constant(instance::GraphenePlaneLike) ret = ccall(("graphene_plane_get_constant", libgraphene), Float32, (Ptr{_GraphenePlane},), instance) ret end - function get_normal(instance::Union{GraphenePlane, Ref{_GraphenePlane}}) + function get_normal(instance::GraphenePlaneLike) m_normal = Ref{_GrapheneVec3}() ret = ccall(("graphene_plane_get_normal", libgraphene), Nothing, (Ptr{_GraphenePlane}, Ptr{_GrapheneVec3}), instance, m_normal) _normal = m_normal[] _normal end - function init(instance::Union{GraphenePlane, Ref{_GraphenePlane}}, _normal::Maybe(Union{GrapheneVec3, Ref{_GrapheneVec3}}), _constant::Real) + function init(instance::GraphenePlaneLike, _normal::Maybe(GrapheneVec3Like), _constant::Real) _normal_maybe = nothing_to_null(_normal) ret = ccall(("graphene_plane_init", libgraphene), Ptr{_GraphenePlane}, (Ptr{_GraphenePlane}, Ptr{_GrapheneVec3}, Float32), instance, _normal_maybe, _constant) - ret2 = convert(Union{GraphenePlane, Ref{_GraphenePlane}}, ret, false) + ret2 = convert(GraphenePlaneLike, ret, false) ret2 end - function init_from_plane(instance::Union{GraphenePlane, Ref{_GraphenePlane}}, _src::Union{GraphenePlane, Ref{_GraphenePlane}}) + function init_from_plane(instance::GraphenePlaneLike, _src::GraphenePlaneLike) ret = ccall(("graphene_plane_init_from_plane", libgraphene), Ptr{_GraphenePlane}, (Ptr{_GraphenePlane}, Ptr{_GraphenePlane}), instance, _src) - ret2 = convert(Union{GraphenePlane, Ref{_GraphenePlane}}, ret, false) + ret2 = convert(GraphenePlaneLike, ret, false) ret2 end - function init_from_point(instance::Union{GraphenePlane, Ref{_GraphenePlane}}, _normal::Union{GrapheneVec3, Ref{_GrapheneVec3}}, _point::Union{GraphenePoint3D, Ref{_GraphenePoint3D}}) + function init_from_point(instance::GraphenePlaneLike, _normal::GrapheneVec3Like, _point::GraphenePoint3DLike) ret = ccall(("graphene_plane_init_from_point", libgraphene), Ptr{_GraphenePlane}, (Ptr{_GraphenePlane}, Ptr{_GrapheneVec3}, Ptr{_GraphenePoint3D}), instance, _normal, _point) - ret2 = convert(Union{GraphenePlane, Ref{_GraphenePlane}}, ret, false) + ret2 = convert(GraphenePlaneLike, ret, false) ret2 end - function init_from_points(instance::Union{GraphenePlane, Ref{_GraphenePlane}}, _a::Union{GraphenePoint3D, Ref{_GraphenePoint3D}}, _b::Union{GraphenePoint3D, Ref{_GraphenePoint3D}}, _c::Union{GraphenePoint3D, Ref{_GraphenePoint3D}}) + function init_from_points(instance::GraphenePlaneLike, _a::GraphenePoint3DLike, _b::GraphenePoint3DLike, _c::GraphenePoint3DLike) ret = ccall(("graphene_plane_init_from_points", libgraphene), Ptr{_GraphenePlane}, (Ptr{_GraphenePlane}, Ptr{_GraphenePoint3D}, Ptr{_GraphenePoint3D}, Ptr{_GraphenePoint3D}), instance, _a, _b, _c) - ret2 = convert(Union{GraphenePlane, Ref{_GraphenePlane}}, ret, false) + ret2 = convert(GraphenePlaneLike, ret, false) ret2 end - function init_from_vec4(instance::Union{GraphenePlane, Ref{_GraphenePlane}}, _src::Union{GrapheneVec4, Ref{_GrapheneVec4}}) + function init_from_vec4(instance::GraphenePlaneLike, _src::GrapheneVec4Like) ret = ccall(("graphene_plane_init_from_vec4", libgraphene), Ptr{_GraphenePlane}, (Ptr{_GraphenePlane}, Ptr{_GrapheneVec4}), instance, _src) - ret2 = convert(Union{GraphenePlane, Ref{_GraphenePlane}}, ret, false) + ret2 = convert(GraphenePlaneLike, ret, false) ret2 end - function negate(instance::Union{GraphenePlane, Ref{_GraphenePlane}}) + function negate(instance::GraphenePlaneLike) m_res = Ref{_GraphenePlane}() ret = ccall(("graphene_plane_negate", libgraphene), Nothing, (Ptr{_GraphenePlane}, Ptr{_GraphenePlane}), instance, m_res) _res = m_res[] _res end - function normalize(instance::Union{GraphenePlane, Ref{_GraphenePlane}}) + function normalize(instance::GraphenePlaneLike) m_res = Ref{_GraphenePlane}() ret = ccall(("graphene_plane_normalize", libgraphene), Nothing, (Ptr{_GraphenePlane}, Ptr{_GraphenePlane}), instance, m_res) _res = m_res[] _res end - function transform(instance::Union{GraphenePlane, Ref{_GraphenePlane}}, _matrix::Union{GrapheneMatrix, Ref{_GrapheneMatrix}}, _normal_matrix::Maybe(Union{GrapheneMatrix, Ref{_GrapheneMatrix}})) + function transform(instance::GraphenePlaneLike, _matrix::GrapheneMatrixLike, _normal_matrix::Maybe(GrapheneMatrixLike)) _normal_matrix_maybe = nothing_to_null(_normal_matrix) m_res = Ref{_GraphenePlane}() ret = ccall(("graphene_plane_transform", libgraphene), Nothing, (Ptr{_GraphenePlane}, Ptr{_GrapheneMatrix}, Ptr{_GrapheneMatrix}, Ptr{_GraphenePlane}), instance, _matrix, _normal_matrix_maybe, m_res) @@ -729,10 +729,10 @@ $(Expr(:toplevel, quote end function Point_alloc() ret = ccall(("graphene_point_alloc", libgraphene), Ptr{_GraphenePoint}, ()) - ret2 = convert(Union{GraphenePoint, Ref{_GraphenePoint}}, ret, true) + ret2 = convert(GraphenePointLike, ret, true) ret2 end - function distance(instance::Union{GraphenePoint, Ref{_GraphenePoint}}, _b::Union{GraphenePoint, Ref{_GraphenePoint}}) + function distance(instance::GraphenePointLike, _b::GraphenePointLike) m_d_x = Ref{Float32}() m_d_y = Ref{Float32}() ret = ccall(("graphene_point_distance", libgraphene), Float32, (Ptr{_GraphenePoint}, Ptr{_GraphenePoint}, Ptr{Float32}, Ptr{Float32}), instance, _b, m_d_x, m_d_y) @@ -740,42 +740,42 @@ $(Expr(:toplevel, quote _d_y = m_d_y[] (ret, _d_x, _d_y) end - function equal(instance::Union{GraphenePoint, Ref{_GraphenePoint}}, _b::Union{GraphenePoint, Ref{_GraphenePoint}}) + function equal(instance::GraphenePointLike, _b::GraphenePointLike) ret = ccall(("graphene_point_equal", libgraphene), Cint, (Ptr{_GraphenePoint}, Ptr{_GraphenePoint}), instance, _b) ret2 = convert(Bool, ret) ret2 end - function free(instance::Union{GraphenePoint, Ref{_GraphenePoint}}) + function free(instance::GraphenePointLike) ret = ccall(("graphene_point_free", libgraphene), Nothing, (Ptr{_GraphenePoint},), instance) nothing end - function init(instance::Union{GraphenePoint, Ref{_GraphenePoint}}, _x::Real, _y::Real) + function init(instance::GraphenePointLike, _x::Real, _y::Real) ret = ccall(("graphene_point_init", libgraphene), Ptr{_GraphenePoint}, (Ptr{_GraphenePoint}, Float32, Float32), instance, _x, _y) - ret2 = convert(Union{GraphenePoint, Ref{_GraphenePoint}}, ret, false) + ret2 = convert(GraphenePointLike, ret, false) ret2 end - function init_from_point(instance::Union{GraphenePoint, Ref{_GraphenePoint}}, _src::Union{GraphenePoint, Ref{_GraphenePoint}}) + function init_from_point(instance::GraphenePointLike, _src::GraphenePointLike) ret = ccall(("graphene_point_init_from_point", libgraphene), Ptr{_GraphenePoint}, (Ptr{_GraphenePoint}, Ptr{_GraphenePoint}), instance, _src) - ret2 = convert(Union{GraphenePoint, Ref{_GraphenePoint}}, ret, false) + ret2 = convert(GraphenePointLike, ret, false) ret2 end - function init_from_vec2(instance::Union{GraphenePoint, Ref{_GraphenePoint}}, _src::Union{GrapheneVec2, Ref{_GrapheneVec2}}) + function init_from_vec2(instance::GraphenePointLike, _src::GrapheneVec2Like) ret = ccall(("graphene_point_init_from_vec2", libgraphene), Ptr{_GraphenePoint}, (Ptr{_GraphenePoint}, Ptr{_GrapheneVec2}), instance, _src) - ret2 = convert(Union{GraphenePoint, Ref{_GraphenePoint}}, ret, false) + ret2 = convert(GraphenePointLike, ret, false) ret2 end - function interpolate(instance::Union{GraphenePoint, Ref{_GraphenePoint}}, _b::Union{GraphenePoint, Ref{_GraphenePoint}}, _factor::Real) + function interpolate(instance::GraphenePointLike, _b::GraphenePointLike, _factor::Real) m_res = Ref{_GraphenePoint}() ret = ccall(("graphene_point_interpolate", libgraphene), Nothing, (Ptr{_GraphenePoint}, Ptr{_GraphenePoint}, Float64, Ptr{_GraphenePoint}), instance, _b, _factor, m_res) _res = m_res[] _res end - function near(instance::Union{GraphenePoint, Ref{_GraphenePoint}}, _b::Union{GraphenePoint, Ref{_GraphenePoint}}, _epsilon::Real) + function near(instance::GraphenePointLike, _b::GraphenePointLike, _epsilon::Real) ret = ccall(("graphene_point_near", libgraphene), Cint, (Ptr{_GraphenePoint}, Ptr{_GraphenePoint}, Float32), instance, _b, _epsilon) ret2 = convert(Bool, ret) ret2 end - function to_vec2(instance::Union{GraphenePoint, Ref{_GraphenePoint}}) + function to_vec2(instance::GraphenePointLike) m_v = Ref{_GrapheneVec2}() ret = ccall(("graphene_point_to_vec2", libgraphene), Nothing, (Ptr{_GraphenePoint}, Ptr{_GrapheneVec2}), instance, m_v) _v = m_v[] @@ -783,83 +783,83 @@ $(Expr(:toplevel, quote end function Point3D_alloc() ret = ccall(("graphene_point3d_alloc", libgraphene), Ptr{_GraphenePoint3D}, ()) - ret2 = convert(Union{GraphenePoint3D, Ref{_GraphenePoint3D}}, ret, true) + ret2 = convert(GraphenePoint3DLike, ret, true) ret2 end - function cross(instance::Union{GraphenePoint3D, Ref{_GraphenePoint3D}}, _b::Union{GraphenePoint3D, Ref{_GraphenePoint3D}}) + function cross(instance::GraphenePoint3DLike, _b::GraphenePoint3DLike) m_res = Ref{_GraphenePoint3D}() ret = ccall(("graphene_point3d_cross", libgraphene), Nothing, (Ptr{_GraphenePoint3D}, Ptr{_GraphenePoint3D}, Ptr{_GraphenePoint3D}), instance, _b, m_res) _res = m_res[] _res end - function distance(instance::Union{GraphenePoint3D, Ref{_GraphenePoint3D}}, _b::Union{GraphenePoint3D, Ref{_GraphenePoint3D}}) + function distance(instance::GraphenePoint3DLike, _b::GraphenePoint3DLike) m_delta = Ref{_GrapheneVec3}() ret = ccall(("graphene_point3d_distance", libgraphene), Float32, (Ptr{_GraphenePoint3D}, Ptr{_GraphenePoint3D}, Ptr{_GrapheneVec3}), instance, _b, m_delta) _delta = m_delta[] (ret, _delta) end - function dot(instance::Union{GraphenePoint3D, Ref{_GraphenePoint3D}}, _b::Union{GraphenePoint3D, Ref{_GraphenePoint3D}}) + function dot(instance::GraphenePoint3DLike, _b::GraphenePoint3DLike) ret = ccall(("graphene_point3d_dot", libgraphene), Float32, (Ptr{_GraphenePoint3D}, Ptr{_GraphenePoint3D}), instance, _b) ret end - function equal(instance::Union{GraphenePoint3D, Ref{_GraphenePoint3D}}, _b::Union{GraphenePoint3D, Ref{_GraphenePoint3D}}) + function equal(instance::GraphenePoint3DLike, _b::GraphenePoint3DLike) ret = ccall(("graphene_point3d_equal", libgraphene), Cint, (Ptr{_GraphenePoint3D}, Ptr{_GraphenePoint3D}), instance, _b) ret2 = convert(Bool, ret) ret2 end - function free(instance::Union{GraphenePoint3D, Ref{_GraphenePoint3D}}) + function free(instance::GraphenePoint3DLike) ret = ccall(("graphene_point3d_free", libgraphene), Nothing, (Ptr{_GraphenePoint3D},), instance) nothing end - function init(instance::Union{GraphenePoint3D, Ref{_GraphenePoint3D}}, _x::Real, _y::Real, _z::Real) + function init(instance::GraphenePoint3DLike, _x::Real, _y::Real, _z::Real) ret = ccall(("graphene_point3d_init", libgraphene), Ptr{_GraphenePoint3D}, (Ptr{_GraphenePoint3D}, Float32, Float32, Float32), instance, _x, _y, _z) - ret2 = convert(Union{GraphenePoint3D, Ref{_GraphenePoint3D}}, ret, false) + ret2 = convert(GraphenePoint3DLike, ret, false) ret2 end - function init_from_point(instance::Union{GraphenePoint3D, Ref{_GraphenePoint3D}}, _src::Union{GraphenePoint3D, Ref{_GraphenePoint3D}}) + function init_from_point(instance::GraphenePoint3DLike, _src::GraphenePoint3DLike) ret = ccall(("graphene_point3d_init_from_point", libgraphene), Ptr{_GraphenePoint3D}, (Ptr{_GraphenePoint3D}, Ptr{_GraphenePoint3D}), instance, _src) - ret2 = convert(Union{GraphenePoint3D, Ref{_GraphenePoint3D}}, ret, false) + ret2 = convert(GraphenePoint3DLike, ret, false) ret2 end - function init_from_vec3(instance::Union{GraphenePoint3D, Ref{_GraphenePoint3D}}, _v::Union{GrapheneVec3, Ref{_GrapheneVec3}}) + function init_from_vec3(instance::GraphenePoint3DLike, _v::GrapheneVec3Like) ret = ccall(("graphene_point3d_init_from_vec3", libgraphene), Ptr{_GraphenePoint3D}, (Ptr{_GraphenePoint3D}, Ptr{_GrapheneVec3}), instance, _v) - ret2 = convert(Union{GraphenePoint3D, Ref{_GraphenePoint3D}}, ret, false) + ret2 = convert(GraphenePoint3DLike, ret, false) ret2 end - function interpolate(instance::Union{GraphenePoint3D, Ref{_GraphenePoint3D}}, _b::Union{GraphenePoint3D, Ref{_GraphenePoint3D}}, _factor::Real) + function interpolate(instance::GraphenePoint3DLike, _b::GraphenePoint3DLike, _factor::Real) m_res = Ref{_GraphenePoint3D}() ret = ccall(("graphene_point3d_interpolate", libgraphene), Nothing, (Ptr{_GraphenePoint3D}, Ptr{_GraphenePoint3D}, Float64, Ptr{_GraphenePoint3D}), instance, _b, _factor, m_res) _res = m_res[] _res end - function length(instance::Union{GraphenePoint3D, Ref{_GraphenePoint3D}}) + function length(instance::GraphenePoint3DLike) ret = ccall(("graphene_point3d_length", libgraphene), Float32, (Ptr{_GraphenePoint3D},), instance) ret end - function near(instance::Union{GraphenePoint3D, Ref{_GraphenePoint3D}}, _b::Union{GraphenePoint3D, Ref{_GraphenePoint3D}}, _epsilon::Real) + function near(instance::GraphenePoint3DLike, _b::GraphenePoint3DLike, _epsilon::Real) ret = ccall(("graphene_point3d_near", libgraphene), Cint, (Ptr{_GraphenePoint3D}, Ptr{_GraphenePoint3D}, Float32), instance, _b, _epsilon) ret2 = convert(Bool, ret) ret2 end - function normalize(instance::Union{GraphenePoint3D, Ref{_GraphenePoint3D}}) + function normalize(instance::GraphenePoint3DLike) m_res = Ref{_GraphenePoint3D}() ret = ccall(("graphene_point3d_normalize", libgraphene), Nothing, (Ptr{_GraphenePoint3D}, Ptr{_GraphenePoint3D}), instance, m_res) _res = m_res[] _res end - function normalize_viewport(instance::Union{GraphenePoint3D, Ref{_GraphenePoint3D}}, _viewport::Union{GrapheneRect, Ref{_GrapheneRect}}, _z_near::Real, _z_far::Real) + function normalize_viewport(instance::GraphenePoint3DLike, _viewport::GrapheneRectLike, _z_near::Real, _z_far::Real) m_res = Ref{_GraphenePoint3D}() ret = ccall(("graphene_point3d_normalize_viewport", libgraphene), Nothing, (Ptr{_GraphenePoint3D}, Ptr{_GrapheneRect}, Float32, Float32, Ptr{_GraphenePoint3D}), instance, _viewport, _z_near, _z_far, m_res) _res = m_res[] _res end - function scale(instance::Union{GraphenePoint3D, Ref{_GraphenePoint3D}}, _factor::Real) + function scale(instance::GraphenePoint3DLike, _factor::Real) m_res = Ref{_GraphenePoint3D}() ret = ccall(("graphene_point3d_scale", libgraphene), Nothing, (Ptr{_GraphenePoint3D}, Float32, Ptr{_GraphenePoint3D}), instance, _factor, m_res) _res = m_res[] _res end - function to_vec3(instance::Union{GraphenePoint3D, Ref{_GraphenePoint3D}}) + function to_vec3(instance::GraphenePoint3DLike) m_v = Ref{_GrapheneVec3}() ret = ccall(("graphene_point3d_to_vec3", libgraphene), Nothing, (Ptr{_GraphenePoint3D}, Ptr{_GrapheneVec3}), instance, m_v) _v = m_v[] @@ -867,145 +867,145 @@ $(Expr(:toplevel, quote end function Quad_alloc() ret = ccall(("graphene_quad_alloc", libgraphene), Ptr{_GrapheneQuad}, ()) - ret2 = convert(Union{GrapheneQuad, Ref{_GrapheneQuad}}, ret, true) + ret2 = convert(GrapheneQuadLike, ret, true) ret2 end - function bounds(instance::Union{GrapheneQuad, Ref{_GrapheneQuad}}) + function bounds(instance::GrapheneQuadLike) m_r = Ref{_GrapheneRect}() ret = ccall(("graphene_quad_bounds", libgraphene), Nothing, (Ptr{_GrapheneQuad}, Ptr{_GrapheneRect}), instance, m_r) _r = m_r[] _r end - function contains(instance::Union{GrapheneQuad, Ref{_GrapheneQuad}}, _p::Union{GraphenePoint, Ref{_GraphenePoint}}) + function contains(instance::GrapheneQuadLike, _p::GraphenePointLike) ret = ccall(("graphene_quad_contains", libgraphene), Cint, (Ptr{_GrapheneQuad}, Ptr{_GraphenePoint}), instance, _p) ret2 = convert(Bool, ret) ret2 end - function free(instance::Union{GrapheneQuad, Ref{_GrapheneQuad}}) + function free(instance::GrapheneQuadLike) ret = ccall(("graphene_quad_free", libgraphene), Nothing, (Ptr{_GrapheneQuad},), instance) nothing end - function get_point(instance::Union{GrapheneQuad, Ref{_GrapheneQuad}}, _index_::Integer) + function get_point(instance::GrapheneQuadLike, _index_::Integer) ret = ccall(("graphene_quad_get_point", libgraphene), Ptr{_GraphenePoint}, (Ptr{_GrapheneQuad}, UInt32), instance, _index_) - ret2 = convert(Union{GraphenePoint, Ref{_GraphenePoint}}, ret, false) + ret2 = convert(GraphenePointLike, ret, false) ret2 end - function init(instance::Union{GrapheneQuad, Ref{_GrapheneQuad}}, _p1::Union{GraphenePoint, Ref{_GraphenePoint}}, _p2::Union{GraphenePoint, Ref{_GraphenePoint}}, _p3::Union{GraphenePoint, Ref{_GraphenePoint}}, _p4::Union{GraphenePoint, Ref{_GraphenePoint}}) + function init(instance::GrapheneQuadLike, _p1::GraphenePointLike, _p2::GraphenePointLike, _p3::GraphenePointLike, _p4::GraphenePointLike) ret = ccall(("graphene_quad_init", libgraphene), Ptr{_GrapheneQuad}, (Ptr{_GrapheneQuad}, Ptr{_GraphenePoint}, Ptr{_GraphenePoint}, Ptr{_GraphenePoint}, Ptr{_GraphenePoint}), instance, _p1, _p2, _p3, _p4) - ret2 = convert(Union{GrapheneQuad, Ref{_GrapheneQuad}}, ret, false) + ret2 = convert(GrapheneQuadLike, ret, false) ret2 end - function init_from_points(instance::Union{GrapheneQuad, Ref{_GrapheneQuad}}, _points) + function init_from_points(instance::GrapheneQuadLike, _points) _points_arr = convert(Vector{_GraphenePoint}, _points) ret = ccall(("graphene_quad_init_from_points", libgraphene), Ptr{_GrapheneQuad}, (Ptr{_GrapheneQuad}, Ptr{_GraphenePoint}), instance, _points_arr) - ret2 = convert(Union{GrapheneQuad, Ref{_GrapheneQuad}}, ret, false) + ret2 = convert(GrapheneQuadLike, ret, false) ret2 end - function init_from_rect(instance::Union{GrapheneQuad, Ref{_GrapheneQuad}}, _r::Union{GrapheneRect, Ref{_GrapheneRect}}) + function init_from_rect(instance::GrapheneQuadLike, _r::GrapheneRectLike) ret = ccall(("graphene_quad_init_from_rect", libgraphene), Ptr{_GrapheneQuad}, (Ptr{_GrapheneQuad}, Ptr{_GrapheneRect}), instance, _r) - ret2 = convert(Union{GrapheneQuad, Ref{_GrapheneQuad}}, ret, false) + ret2 = convert(GrapheneQuadLike, ret, false) ret2 end function Quaternion_alloc() ret = ccall(("graphene_quaternion_alloc", libgraphene), Ptr{_GrapheneQuaternion}, ()) - ret2 = convert(Union{GrapheneQuaternion, Ref{_GrapheneQuaternion}}, ret, true) + ret2 = convert(GrapheneQuaternionLike, ret, true) ret2 end - function add(instance::Union{GrapheneQuaternion, Ref{_GrapheneQuaternion}}, _b::Union{GrapheneQuaternion, Ref{_GrapheneQuaternion}}) + function add(instance::GrapheneQuaternionLike, _b::GrapheneQuaternionLike) m_res = Ref{_GrapheneQuaternion}() ret = ccall(("graphene_quaternion_add", libgraphene), Nothing, (Ptr{_GrapheneQuaternion}, Ptr{_GrapheneQuaternion}, Ptr{_GrapheneQuaternion}), instance, _b, m_res) _res = m_res[] _res end - function dot(instance::Union{GrapheneQuaternion, Ref{_GrapheneQuaternion}}, _b::Union{GrapheneQuaternion, Ref{_GrapheneQuaternion}}) + function dot(instance::GrapheneQuaternionLike, _b::GrapheneQuaternionLike) ret = ccall(("graphene_quaternion_dot", libgraphene), Float32, (Ptr{_GrapheneQuaternion}, Ptr{_GrapheneQuaternion}), instance, _b) ret end - function equal(instance::Union{GrapheneQuaternion, Ref{_GrapheneQuaternion}}, _b::Union{GrapheneQuaternion, Ref{_GrapheneQuaternion}}) + function equal(instance::GrapheneQuaternionLike, _b::GrapheneQuaternionLike) ret = ccall(("graphene_quaternion_equal", libgraphene), Cint, (Ptr{_GrapheneQuaternion}, Ptr{_GrapheneQuaternion}), instance, _b) ret2 = convert(Bool, ret) ret2 end - function free(instance::Union{GrapheneQuaternion, Ref{_GrapheneQuaternion}}) + function free(instance::GrapheneQuaternionLike) ret = ccall(("graphene_quaternion_free", libgraphene), Nothing, (Ptr{_GrapheneQuaternion},), instance) nothing end - function init(instance::Union{GrapheneQuaternion, Ref{_GrapheneQuaternion}}, _x::Real, _y::Real, _z::Real, _w::Real) + function init(instance::GrapheneQuaternionLike, _x::Real, _y::Real, _z::Real, _w::Real) ret = ccall(("graphene_quaternion_init", libgraphene), Ptr{_GrapheneQuaternion}, (Ptr{_GrapheneQuaternion}, Float32, Float32, Float32, Float32), instance, _x, _y, _z, _w) - ret2 = convert(Union{GrapheneQuaternion, Ref{_GrapheneQuaternion}}, ret, false) + ret2 = convert(GrapheneQuaternionLike, ret, false) ret2 end - function init_from_angle_vec3(instance::Union{GrapheneQuaternion, Ref{_GrapheneQuaternion}}, _angle::Real, _axis::Union{GrapheneVec3, Ref{_GrapheneVec3}}) + function init_from_angle_vec3(instance::GrapheneQuaternionLike, _angle::Real, _axis::GrapheneVec3Like) ret = ccall(("graphene_quaternion_init_from_angle_vec3", libgraphene), Ptr{_GrapheneQuaternion}, (Ptr{_GrapheneQuaternion}, Float32, Ptr{_GrapheneVec3}), instance, _angle, _axis) - ret2 = convert(Union{GrapheneQuaternion, Ref{_GrapheneQuaternion}}, ret, false) + ret2 = convert(GrapheneQuaternionLike, ret, false) ret2 end - function init_from_angles(instance::Union{GrapheneQuaternion, Ref{_GrapheneQuaternion}}, _deg_x::Real, _deg_y::Real, _deg_z::Real) + function init_from_angles(instance::GrapheneQuaternionLike, _deg_x::Real, _deg_y::Real, _deg_z::Real) ret = ccall(("graphene_quaternion_init_from_angles", libgraphene), Ptr{_GrapheneQuaternion}, (Ptr{_GrapheneQuaternion}, Float32, Float32, Float32), instance, _deg_x, _deg_y, _deg_z) - ret2 = convert(Union{GrapheneQuaternion, Ref{_GrapheneQuaternion}}, ret, false) + ret2 = convert(GrapheneQuaternionLike, ret, false) ret2 end - function init_from_euler(instance::Union{GrapheneQuaternion, Ref{_GrapheneQuaternion}}, _e::Union{GrapheneEuler, Ref{_GrapheneEuler}}) + function init_from_euler(instance::GrapheneQuaternionLike, _e::GrapheneEulerLike) ret = ccall(("graphene_quaternion_init_from_euler", libgraphene), Ptr{_GrapheneQuaternion}, (Ptr{_GrapheneQuaternion}, Ptr{_GrapheneEuler}), instance, _e) - ret2 = convert(Union{GrapheneQuaternion, Ref{_GrapheneQuaternion}}, ret, false) + ret2 = convert(GrapheneQuaternionLike, ret, false) ret2 end - function init_from_matrix(instance::Union{GrapheneQuaternion, Ref{_GrapheneQuaternion}}, _m::Union{GrapheneMatrix, Ref{_GrapheneMatrix}}) + function init_from_matrix(instance::GrapheneQuaternionLike, _m::GrapheneMatrixLike) ret = ccall(("graphene_quaternion_init_from_matrix", libgraphene), Ptr{_GrapheneQuaternion}, (Ptr{_GrapheneQuaternion}, Ptr{_GrapheneMatrix}), instance, _m) - ret2 = convert(Union{GrapheneQuaternion, Ref{_GrapheneQuaternion}}, ret, false) + ret2 = convert(GrapheneQuaternionLike, ret, false) ret2 end - function init_from_quaternion(instance::Union{GrapheneQuaternion, Ref{_GrapheneQuaternion}}, _src::Union{GrapheneQuaternion, Ref{_GrapheneQuaternion}}) + function init_from_quaternion(instance::GrapheneQuaternionLike, _src::GrapheneQuaternionLike) ret = ccall(("graphene_quaternion_init_from_quaternion", libgraphene), Ptr{_GrapheneQuaternion}, (Ptr{_GrapheneQuaternion}, Ptr{_GrapheneQuaternion}), instance, _src) - ret2 = convert(Union{GrapheneQuaternion, Ref{_GrapheneQuaternion}}, ret, false) + ret2 = convert(GrapheneQuaternionLike, ret, false) ret2 end - function init_from_radians(instance::Union{GrapheneQuaternion, Ref{_GrapheneQuaternion}}, _rad_x::Real, _rad_y::Real, _rad_z::Real) + function init_from_radians(instance::GrapheneQuaternionLike, _rad_x::Real, _rad_y::Real, _rad_z::Real) ret = ccall(("graphene_quaternion_init_from_radians", libgraphene), Ptr{_GrapheneQuaternion}, (Ptr{_GrapheneQuaternion}, Float32, Float32, Float32), instance, _rad_x, _rad_y, _rad_z) - ret2 = convert(Union{GrapheneQuaternion, Ref{_GrapheneQuaternion}}, ret, false) + ret2 = convert(GrapheneQuaternionLike, ret, false) ret2 end - function init_from_vec4(instance::Union{GrapheneQuaternion, Ref{_GrapheneQuaternion}}, _src::Union{GrapheneVec4, Ref{_GrapheneVec4}}) + function init_from_vec4(instance::GrapheneQuaternionLike, _src::GrapheneVec4Like) ret = ccall(("graphene_quaternion_init_from_vec4", libgraphene), Ptr{_GrapheneQuaternion}, (Ptr{_GrapheneQuaternion}, Ptr{_GrapheneVec4}), instance, _src) - ret2 = convert(Union{GrapheneQuaternion, Ref{_GrapheneQuaternion}}, ret, false) + ret2 = convert(GrapheneQuaternionLike, ret, false) ret2 end - function init_identity(instance::Union{GrapheneQuaternion, Ref{_GrapheneQuaternion}}) + function init_identity(instance::GrapheneQuaternionLike) ret = ccall(("graphene_quaternion_init_identity", libgraphene), Ptr{_GrapheneQuaternion}, (Ptr{_GrapheneQuaternion},), instance) - ret2 = convert(Union{GrapheneQuaternion, Ref{_GrapheneQuaternion}}, ret, false) + ret2 = convert(GrapheneQuaternionLike, ret, false) ret2 end - function invert(instance::Union{GrapheneQuaternion, Ref{_GrapheneQuaternion}}) + function invert(instance::GrapheneQuaternionLike) m_res = Ref{_GrapheneQuaternion}() ret = ccall(("graphene_quaternion_invert", libgraphene), Nothing, (Ptr{_GrapheneQuaternion}, Ptr{_GrapheneQuaternion}), instance, m_res) _res = m_res[] _res end - function multiply(instance::Union{GrapheneQuaternion, Ref{_GrapheneQuaternion}}, _b::Union{GrapheneQuaternion, Ref{_GrapheneQuaternion}}) + function multiply(instance::GrapheneQuaternionLike, _b::GrapheneQuaternionLike) m_res = Ref{_GrapheneQuaternion}() ret = ccall(("graphene_quaternion_multiply", libgraphene), Nothing, (Ptr{_GrapheneQuaternion}, Ptr{_GrapheneQuaternion}, Ptr{_GrapheneQuaternion}), instance, _b, m_res) _res = m_res[] _res end - function normalize(instance::Union{GrapheneQuaternion, Ref{_GrapheneQuaternion}}) + function normalize(instance::GrapheneQuaternionLike) m_res = Ref{_GrapheneQuaternion}() ret = ccall(("graphene_quaternion_normalize", libgraphene), Nothing, (Ptr{_GrapheneQuaternion}, Ptr{_GrapheneQuaternion}), instance, m_res) _res = m_res[] _res end - function scale(instance::Union{GrapheneQuaternion, Ref{_GrapheneQuaternion}}, _factor::Real) + function scale(instance::GrapheneQuaternionLike, _factor::Real) m_res = Ref{_GrapheneQuaternion}() ret = ccall(("graphene_quaternion_scale", libgraphene), Nothing, (Ptr{_GrapheneQuaternion}, Float32, Ptr{_GrapheneQuaternion}), instance, _factor, m_res) _res = m_res[] _res end - function slerp(instance::Union{GrapheneQuaternion, Ref{_GrapheneQuaternion}}, _b::Union{GrapheneQuaternion, Ref{_GrapheneQuaternion}}, _factor::Real) + function slerp(instance::GrapheneQuaternionLike, _b::GrapheneQuaternionLike, _factor::Real) m_res = Ref{_GrapheneQuaternion}() ret = ccall(("graphene_quaternion_slerp", libgraphene), Nothing, (Ptr{_GrapheneQuaternion}, Ptr{_GrapheneQuaternion}, Float32, Ptr{_GrapheneQuaternion}), instance, _b, _factor, m_res) _res = m_res[] _res end - function to_angle_vec3(instance::Union{GrapheneQuaternion, Ref{_GrapheneQuaternion}}) + function to_angle_vec3(instance::GrapheneQuaternionLike) m_angle = Ref{Float32}() m_axis = Ref{_GrapheneVec3}() ret = ccall(("graphene_quaternion_to_angle_vec3", libgraphene), Nothing, (Ptr{_GrapheneQuaternion}, Ptr{Float32}, Ptr{_GrapheneVec3}), instance, m_angle, m_axis) @@ -1013,7 +1013,7 @@ $(Expr(:toplevel, quote _axis = m_axis[] (_angle, _axis) end - function to_angles(instance::Union{GrapheneQuaternion, Ref{_GrapheneQuaternion}}) + function to_angles(instance::GrapheneQuaternionLike) m_deg_x = Ref{Float32}() m_deg_y = Ref{Float32}() m_deg_z = Ref{Float32}() @@ -1023,13 +1023,13 @@ $(Expr(:toplevel, quote _deg_z = m_deg_z[] (_deg_x, _deg_y, _deg_z) end - function to_matrix(instance::Union{GrapheneQuaternion, Ref{_GrapheneQuaternion}}) + function to_matrix(instance::GrapheneQuaternionLike) m_m = Ref{_GrapheneMatrix}() ret = ccall(("graphene_quaternion_to_matrix", libgraphene), Nothing, (Ptr{_GrapheneQuaternion}, Ptr{_GrapheneMatrix}), instance, m_m) _m = m_m[] _m end - function to_radians(instance::Union{GrapheneQuaternion, Ref{_GrapheneQuaternion}}) + function to_radians(instance::GrapheneQuaternionLike) m_rad_x = Ref{Float32}() m_rad_y = Ref{Float32}() m_rad_z = Ref{Float32}() @@ -1039,7 +1039,7 @@ $(Expr(:toplevel, quote _rad_z = m_rad_z[] (_rad_x, _rad_y, _rad_z) end - function to_vec4(instance::Union{GrapheneQuaternion, Ref{_GrapheneQuaternion}}) + function to_vec4(instance::GrapheneQuaternionLike) m_res = Ref{_GrapheneVec4}() ret = ccall(("graphene_quaternion_to_vec4", libgraphene), Nothing, (Ptr{_GrapheneQuaternion}, Ptr{_GrapheneVec4}), instance, m_res) _res = m_res[] @@ -1047,255 +1047,255 @@ $(Expr(:toplevel, quote end function Ray_alloc() ret = ccall(("graphene_ray_alloc", libgraphene), Ptr{_GrapheneRay}, ()) - ret2 = convert(Union{GrapheneRay, Ref{_GrapheneRay}}, ret, true) + ret2 = convert(GrapheneRayLike, ret, true) ret2 end - function equal(instance::Union{GrapheneRay, Ref{_GrapheneRay}}, _b::Union{GrapheneRay, Ref{_GrapheneRay}}) + function equal(instance::GrapheneRayLike, _b::GrapheneRayLike) ret = ccall(("graphene_ray_equal", libgraphene), Cint, (Ptr{_GrapheneRay}, Ptr{_GrapheneRay}), instance, _b) ret2 = convert(Bool, ret) ret2 end - function free(instance::Union{GrapheneRay, Ref{_GrapheneRay}}) + function free(instance::GrapheneRayLike) ret = ccall(("graphene_ray_free", libgraphene), Nothing, (Ptr{_GrapheneRay},), instance) nothing end - function get_closest_point_to_point(instance::Union{GrapheneRay, Ref{_GrapheneRay}}, _p::Union{GraphenePoint3D, Ref{_GraphenePoint3D}}) + function get_closest_point_to_point(instance::GrapheneRayLike, _p::GraphenePoint3DLike) m_res = Ref{_GraphenePoint3D}() ret = ccall(("graphene_ray_get_closest_point_to_point", libgraphene), Nothing, (Ptr{_GrapheneRay}, Ptr{_GraphenePoint3D}, Ptr{_GraphenePoint3D}), instance, _p, m_res) _res = m_res[] _res end - function get_direction(instance::Union{GrapheneRay, Ref{_GrapheneRay}}) + function get_direction(instance::GrapheneRayLike) m_direction = Ref{_GrapheneVec3}() ret = ccall(("graphene_ray_get_direction", libgraphene), Nothing, (Ptr{_GrapheneRay}, Ptr{_GrapheneVec3}), instance, m_direction) _direction = m_direction[] _direction end - function get_distance_to_plane(instance::Union{GrapheneRay, Ref{_GrapheneRay}}, _p::Union{GraphenePlane, Ref{_GraphenePlane}}) + function get_distance_to_plane(instance::GrapheneRayLike, _p::GraphenePlaneLike) ret = ccall(("graphene_ray_get_distance_to_plane", libgraphene), Float32, (Ptr{_GrapheneRay}, Ptr{_GraphenePlane}), instance, _p) ret end - function get_distance_to_point(instance::Union{GrapheneRay, Ref{_GrapheneRay}}, _p::Union{GraphenePoint3D, Ref{_GraphenePoint3D}}) + function get_distance_to_point(instance::GrapheneRayLike, _p::GraphenePoint3DLike) ret = ccall(("graphene_ray_get_distance_to_point", libgraphene), Float32, (Ptr{_GrapheneRay}, Ptr{_GraphenePoint3D}), instance, _p) ret end - function get_origin(instance::Union{GrapheneRay, Ref{_GrapheneRay}}) + function get_origin(instance::GrapheneRayLike) m_origin = Ref{_GraphenePoint3D}() ret = ccall(("graphene_ray_get_origin", libgraphene), Nothing, (Ptr{_GrapheneRay}, Ptr{_GraphenePoint3D}), instance, m_origin) _origin = m_origin[] _origin end - function get_position_at(instance::Union{GrapheneRay, Ref{_GrapheneRay}}, _t::Real) + function get_position_at(instance::GrapheneRayLike, _t::Real) m_position = Ref{_GraphenePoint3D}() ret = ccall(("graphene_ray_get_position_at", libgraphene), Nothing, (Ptr{_GrapheneRay}, Float32, Ptr{_GraphenePoint3D}), instance, _t, m_position) _position = m_position[] _position end - function init(instance::Union{GrapheneRay, Ref{_GrapheneRay}}, _origin::Maybe(Union{GraphenePoint3D, Ref{_GraphenePoint3D}}), _direction::Maybe(Union{GrapheneVec3, Ref{_GrapheneVec3}})) + function init(instance::GrapheneRayLike, _origin::Maybe(GraphenePoint3DLike), _direction::Maybe(GrapheneVec3Like)) _origin_maybe = nothing_to_null(_origin) _direction_maybe = nothing_to_null(_direction) ret = ccall(("graphene_ray_init", libgraphene), Ptr{_GrapheneRay}, (Ptr{_GrapheneRay}, Ptr{_GraphenePoint3D}, Ptr{_GrapheneVec3}), instance, _origin_maybe, _direction_maybe) - ret2 = convert(Union{GrapheneRay, Ref{_GrapheneRay}}, ret, false) + ret2 = convert(GrapheneRayLike, ret, false) ret2 end - function init_from_ray(instance::Union{GrapheneRay, Ref{_GrapheneRay}}, _src::Union{GrapheneRay, Ref{_GrapheneRay}}) + function init_from_ray(instance::GrapheneRayLike, _src::GrapheneRayLike) ret = ccall(("graphene_ray_init_from_ray", libgraphene), Ptr{_GrapheneRay}, (Ptr{_GrapheneRay}, Ptr{_GrapheneRay}), instance, _src) - ret2 = convert(Union{GrapheneRay, Ref{_GrapheneRay}}, ret, false) + ret2 = convert(GrapheneRayLike, ret, false) ret2 end - function init_from_vec3(instance::Union{GrapheneRay, Ref{_GrapheneRay}}, _origin::Maybe(Union{GrapheneVec3, Ref{_GrapheneVec3}}), _direction::Maybe(Union{GrapheneVec3, Ref{_GrapheneVec3}})) + function init_from_vec3(instance::GrapheneRayLike, _origin::Maybe(GrapheneVec3Like), _direction::Maybe(GrapheneVec3Like)) _origin_maybe = nothing_to_null(_origin) _direction_maybe = nothing_to_null(_direction) ret = ccall(("graphene_ray_init_from_vec3", libgraphene), Ptr{_GrapheneRay}, (Ptr{_GrapheneRay}, Ptr{_GrapheneVec3}, Ptr{_GrapheneVec3}), instance, _origin_maybe, _direction_maybe) - ret2 = convert(Union{GrapheneRay, Ref{_GrapheneRay}}, ret, false) + ret2 = convert(GrapheneRayLike, ret, false) ret2 end - function intersect_box(instance::Union{GrapheneRay, Ref{_GrapheneRay}}, _b::Union{GrapheneBox, Ref{_GrapheneBox}}) + function intersect_box(instance::GrapheneRayLike, _b::GrapheneBoxLike) m_t_out = Ref{Float32}() ret = ccall(("graphene_ray_intersect_box", libgraphene), UInt32, (Ptr{_GrapheneRay}, Ptr{_GrapheneBox}, Ptr{Float32}), instance, _b, m_t_out) ret2 = RayIntersectionKind(ret) _t_out = m_t_out[] (ret2, _t_out) end - function intersect_sphere(instance::Union{GrapheneRay, Ref{_GrapheneRay}}, _s::Union{GrapheneSphere, Ref{_GrapheneSphere}}) + function intersect_sphere(instance::GrapheneRayLike, _s::GrapheneSphereLike) m_t_out = Ref{Float32}() ret = ccall(("graphene_ray_intersect_sphere", libgraphene), UInt32, (Ptr{_GrapheneRay}, Ptr{_GrapheneSphere}, Ptr{Float32}), instance, _s, m_t_out) ret2 = RayIntersectionKind(ret) _t_out = m_t_out[] (ret2, _t_out) end - function intersect_triangle(instance::Union{GrapheneRay, Ref{_GrapheneRay}}, _t::Union{GrapheneTriangle, Ref{_GrapheneTriangle}}) + function intersect_triangle(instance::GrapheneRayLike, _t::GrapheneTriangleLike) m_t_out = Ref{Float32}() ret = ccall(("graphene_ray_intersect_triangle", libgraphene), UInt32, (Ptr{_GrapheneRay}, Ptr{_GrapheneTriangle}, Ptr{Float32}), instance, _t, m_t_out) ret2 = RayIntersectionKind(ret) _t_out = m_t_out[] (ret2, _t_out) end - function intersects_box(instance::Union{GrapheneRay, Ref{_GrapheneRay}}, _b::Union{GrapheneBox, Ref{_GrapheneBox}}) + function intersects_box(instance::GrapheneRayLike, _b::GrapheneBoxLike) ret = ccall(("graphene_ray_intersects_box", libgraphene), Cint, (Ptr{_GrapheneRay}, Ptr{_GrapheneBox}), instance, _b) ret2 = convert(Bool, ret) ret2 end - function intersects_sphere(instance::Union{GrapheneRay, Ref{_GrapheneRay}}, _s::Union{GrapheneSphere, Ref{_GrapheneSphere}}) + function intersects_sphere(instance::GrapheneRayLike, _s::GrapheneSphereLike) ret = ccall(("graphene_ray_intersects_sphere", libgraphene), Cint, (Ptr{_GrapheneRay}, Ptr{_GrapheneSphere}), instance, _s) ret2 = convert(Bool, ret) ret2 end - function intersects_triangle(instance::Union{GrapheneRay, Ref{_GrapheneRay}}, _t::Union{GrapheneTriangle, Ref{_GrapheneTriangle}}) + function intersects_triangle(instance::GrapheneRayLike, _t::GrapheneTriangleLike) ret = ccall(("graphene_ray_intersects_triangle", libgraphene), Cint, (Ptr{_GrapheneRay}, Ptr{_GrapheneTriangle}), instance, _t) ret2 = convert(Bool, ret) ret2 end - function contains_point(instance::Union{GrapheneRect, Ref{_GrapheneRect}}, _p::Union{GraphenePoint, Ref{_GraphenePoint}}) + function contains_point(instance::GrapheneRectLike, _p::GraphenePointLike) ret = ccall(("graphene_rect_contains_point", libgraphene), Cint, (Ptr{_GrapheneRect}, Ptr{_GraphenePoint}), instance, _p) ret2 = convert(Bool, ret) ret2 end - function contains_rect(instance::Union{GrapheneRect, Ref{_GrapheneRect}}, _b::Union{GrapheneRect, Ref{_GrapheneRect}}) + function contains_rect(instance::GrapheneRectLike, _b::GrapheneRectLike) ret = ccall(("graphene_rect_contains_rect", libgraphene), Cint, (Ptr{_GrapheneRect}, Ptr{_GrapheneRect}), instance, _b) ret2 = convert(Bool, ret) ret2 end - function equal(instance::Union{GrapheneRect, Ref{_GrapheneRect}}, _b::Union{GrapheneRect, Ref{_GrapheneRect}}) + function equal(instance::GrapheneRectLike, _b::GrapheneRectLike) ret = ccall(("graphene_rect_equal", libgraphene), Cint, (Ptr{_GrapheneRect}, Ptr{_GrapheneRect}), instance, _b) ret2 = convert(Bool, ret) ret2 end - function expand(instance::Union{GrapheneRect, Ref{_GrapheneRect}}, _p::Union{GraphenePoint, Ref{_GraphenePoint}}) + function expand(instance::GrapheneRectLike, _p::GraphenePointLike) m_res = Ref{_GrapheneRect}() ret = ccall(("graphene_rect_expand", libgraphene), Nothing, (Ptr{_GrapheneRect}, Ptr{_GraphenePoint}, Ptr{_GrapheneRect}), instance, _p, m_res) _res = m_res[] _res end - function free(instance::Union{GrapheneRect, Ref{_GrapheneRect}}) + function free(instance::GrapheneRectLike) ret = ccall(("graphene_rect_free", libgraphene), Nothing, (Ptr{_GrapheneRect},), instance) nothing end - function get_area(instance::Union{GrapheneRect, Ref{_GrapheneRect}}) + function get_area(instance::GrapheneRectLike) ret = ccall(("graphene_rect_get_area", libgraphene), Float32, (Ptr{_GrapheneRect},), instance) ret end - function get_bottom_left(instance::Union{GrapheneRect, Ref{_GrapheneRect}}) + function get_bottom_left(instance::GrapheneRectLike) m_p = Ref{_GraphenePoint}() ret = ccall(("graphene_rect_get_bottom_left", libgraphene), Nothing, (Ptr{_GrapheneRect}, Ptr{_GraphenePoint}), instance, m_p) _p = m_p[] _p end - function get_bottom_right(instance::Union{GrapheneRect, Ref{_GrapheneRect}}) + function get_bottom_right(instance::GrapheneRectLike) m_p = Ref{_GraphenePoint}() ret = ccall(("graphene_rect_get_bottom_right", libgraphene), Nothing, (Ptr{_GrapheneRect}, Ptr{_GraphenePoint}), instance, m_p) _p = m_p[] _p end - function get_center(instance::Union{GrapheneRect, Ref{_GrapheneRect}}) + function get_center(instance::GrapheneRectLike) m_p = Ref{_GraphenePoint}() ret = ccall(("graphene_rect_get_center", libgraphene), Nothing, (Ptr{_GrapheneRect}, Ptr{_GraphenePoint}), instance, m_p) _p = m_p[] _p end - function get_height(instance::Union{GrapheneRect, Ref{_GrapheneRect}}) + function get_height(instance::GrapheneRectLike) ret = ccall(("graphene_rect_get_height", libgraphene), Float32, (Ptr{_GrapheneRect},), instance) ret end - function get_top_left(instance::Union{GrapheneRect, Ref{_GrapheneRect}}) + function get_top_left(instance::GrapheneRectLike) m_p = Ref{_GraphenePoint}() ret = ccall(("graphene_rect_get_top_left", libgraphene), Nothing, (Ptr{_GrapheneRect}, Ptr{_GraphenePoint}), instance, m_p) _p = m_p[] _p end - function get_top_right(instance::Union{GrapheneRect, Ref{_GrapheneRect}}) + function get_top_right(instance::GrapheneRectLike) m_p = Ref{_GraphenePoint}() ret = ccall(("graphene_rect_get_top_right", libgraphene), Nothing, (Ptr{_GrapheneRect}, Ptr{_GraphenePoint}), instance, m_p) _p = m_p[] _p end - function get_vertices(instance::Union{GrapheneRect, Ref{_GrapheneRect}}) + function get_vertices(instance::GrapheneRectLike) m_vertices = Ref{Ptr{_GrapheneVec2}}() ret = ccall(("graphene_rect_get_vertices", libgraphene), Nothing, (Ptr{_GrapheneRect}, Ptr{Ptr{_GrapheneVec2}}), instance, m_vertices) _vertices = m_vertices[] _vertices end - function get_width(instance::Union{GrapheneRect, Ref{_GrapheneRect}}) + function get_width(instance::GrapheneRectLike) ret = ccall(("graphene_rect_get_width", libgraphene), Float32, (Ptr{_GrapheneRect},), instance) ret end - function get_x(instance::Union{GrapheneRect, Ref{_GrapheneRect}}) + function get_x(instance::GrapheneRectLike) ret = ccall(("graphene_rect_get_x", libgraphene), Float32, (Ptr{_GrapheneRect},), instance) ret end - function get_y(instance::Union{GrapheneRect, Ref{_GrapheneRect}}) + function get_y(instance::GrapheneRectLike) ret = ccall(("graphene_rect_get_y", libgraphene), Float32, (Ptr{_GrapheneRect},), instance) ret end - function init(instance::Union{GrapheneRect, Ref{_GrapheneRect}}, _x::Real, _y::Real, _width::Real, _height::Real) + function init(instance::GrapheneRectLike, _x::Real, _y::Real, _width::Real, _height::Real) ret = ccall(("graphene_rect_init", libgraphene), Ptr{_GrapheneRect}, (Ptr{_GrapheneRect}, Float32, Float32, Float32, Float32), instance, _x, _y, _width, _height) - ret2 = convert(Union{GrapheneRect, Ref{_GrapheneRect}}, ret, false) + ret2 = convert(GrapheneRectLike, ret, false) ret2 end - function init_from_rect(instance::Union{GrapheneRect, Ref{_GrapheneRect}}, _src::Union{GrapheneRect, Ref{_GrapheneRect}}) + function init_from_rect(instance::GrapheneRectLike, _src::GrapheneRectLike) ret = ccall(("graphene_rect_init_from_rect", libgraphene), Ptr{_GrapheneRect}, (Ptr{_GrapheneRect}, Ptr{_GrapheneRect}), instance, _src) - ret2 = convert(Union{GrapheneRect, Ref{_GrapheneRect}}, ret, false) + ret2 = convert(GrapheneRectLike, ret, false) ret2 end - function inset(instance::Union{GrapheneRect, Ref{_GrapheneRect}}, _d_x::Real, _d_y::Real) + function inset(instance::GrapheneRectLike, _d_x::Real, _d_y::Real) ret = ccall(("graphene_rect_inset", libgraphene), Ptr{_GrapheneRect}, (Ptr{_GrapheneRect}, Float32, Float32), instance, _d_x, _d_y) - ret2 = convert(Union{GrapheneRect, Ref{_GrapheneRect}}, ret, false) + ret2 = convert(GrapheneRectLike, ret, false) ret2 end - function inset_r(instance::Union{GrapheneRect, Ref{_GrapheneRect}}, _d_x::Real, _d_y::Real) + function inset_r(instance::GrapheneRectLike, _d_x::Real, _d_y::Real) m_res = Ref{_GrapheneRect}() ret = ccall(("graphene_rect_inset_r", libgraphene), Nothing, (Ptr{_GrapheneRect}, Float32, Float32, Ptr{_GrapheneRect}), instance, _d_x, _d_y, m_res) _res = m_res[] _res end - function interpolate(instance::Union{GrapheneRect, Ref{_GrapheneRect}}, _b::Union{GrapheneRect, Ref{_GrapheneRect}}, _factor::Real) + function interpolate(instance::GrapheneRectLike, _b::GrapheneRectLike, _factor::Real) m_res = Ref{_GrapheneRect}() ret = ccall(("graphene_rect_interpolate", libgraphene), Nothing, (Ptr{_GrapheneRect}, Ptr{_GrapheneRect}, Float64, Ptr{_GrapheneRect}), instance, _b, _factor, m_res) _res = m_res[] _res end - function intersection(instance::Union{GrapheneRect, Ref{_GrapheneRect}}, _b::Union{GrapheneRect, Ref{_GrapheneRect}}) + function intersection(instance::GrapheneRectLike, _b::GrapheneRectLike) m_res = Ref{_GrapheneRect}() ret = ccall(("graphene_rect_intersection", libgraphene), Cint, (Ptr{_GrapheneRect}, Ptr{_GrapheneRect}, Ptr{_GrapheneRect}), instance, _b, m_res) ret2 = convert(Bool, ret) _res = m_res[] (ret2, _res) end - function normalize(instance::Union{GrapheneRect, Ref{_GrapheneRect}}) + function normalize(instance::GrapheneRectLike) ret = ccall(("graphene_rect_normalize", libgraphene), Ptr{_GrapheneRect}, (Ptr{_GrapheneRect},), instance) - ret2 = convert(Union{GrapheneRect, Ref{_GrapheneRect}}, ret, false) + ret2 = convert(GrapheneRectLike, ret, false) ret2 end - function normalize_r(instance::Union{GrapheneRect, Ref{_GrapheneRect}}) + function normalize_r(instance::GrapheneRectLike) m_res = Ref{_GrapheneRect}() ret = ccall(("graphene_rect_normalize_r", libgraphene), Nothing, (Ptr{_GrapheneRect}, Ptr{_GrapheneRect}), instance, m_res) _res = m_res[] _res end - function offset(instance::Union{GrapheneRect, Ref{_GrapheneRect}}, _d_x::Real, _d_y::Real) + function offset(instance::GrapheneRectLike, _d_x::Real, _d_y::Real) ret = ccall(("graphene_rect_offset", libgraphene), Ptr{_GrapheneRect}, (Ptr{_GrapheneRect}, Float32, Float32), instance, _d_x, _d_y) - ret2 = convert(Union{GrapheneRect, Ref{_GrapheneRect}}, ret, false) + ret2 = convert(GrapheneRectLike, ret, false) ret2 end - function offset_r(instance::Union{GrapheneRect, Ref{_GrapheneRect}}, _d_x::Real, _d_y::Real) + function offset_r(instance::GrapheneRectLike, _d_x::Real, _d_y::Real) m_res = Ref{_GrapheneRect}() ret = ccall(("graphene_rect_offset_r", libgraphene), Nothing, (Ptr{_GrapheneRect}, Float32, Float32, Ptr{_GrapheneRect}), instance, _d_x, _d_y, m_res) _res = m_res[] _res end - function round_extents(instance::Union{GrapheneRect, Ref{_GrapheneRect}}) + function round_extents(instance::GrapheneRectLike) m_res = Ref{_GrapheneRect}() ret = ccall(("graphene_rect_round_extents", libgraphene), Nothing, (Ptr{_GrapheneRect}, Ptr{_GrapheneRect}), instance, m_res) _res = m_res[] _res end - function scale(instance::Union{GrapheneRect, Ref{_GrapheneRect}}, _s_h::Real, _s_v::Real) + function scale(instance::GrapheneRectLike, _s_h::Real, _s_v::Real) m_res = Ref{_GrapheneRect}() ret = ccall(("graphene_rect_scale", libgraphene), Nothing, (Ptr{_GrapheneRect}, Float32, Float32, Ptr{_GrapheneRect}), instance, _s_h, _s_v, m_res) _res = m_res[] _res end - function union(instance::Union{GrapheneRect, Ref{_GrapheneRect}}, _b::Union{GrapheneRect, Ref{_GrapheneRect}}) + function union(instance::GrapheneRectLike, _b::GrapheneRectLike) m_res = Ref{_GrapheneRect}() ret = ccall(("graphene_rect_union", libgraphene), Nothing, (Ptr{_GrapheneRect}, Ptr{_GrapheneRect}, Ptr{_GrapheneRect}), instance, _b, m_res) _res = m_res[] @@ -1303,71 +1303,71 @@ $(Expr(:toplevel, quote end function Sphere_alloc() ret = ccall(("graphene_sphere_alloc", libgraphene), Ptr{_GrapheneSphere}, ()) - ret2 = convert(Union{GrapheneSphere, Ref{_GrapheneSphere}}, ret, true) + ret2 = convert(GrapheneSphereLike, ret, true) ret2 end - function contains_point(instance::Union{GrapheneSphere, Ref{_GrapheneSphere}}, _point::Union{GraphenePoint3D, Ref{_GraphenePoint3D}}) + function contains_point(instance::GrapheneSphereLike, _point::GraphenePoint3DLike) ret = ccall(("graphene_sphere_contains_point", libgraphene), Cint, (Ptr{_GrapheneSphere}, Ptr{_GraphenePoint3D}), instance, _point) ret2 = convert(Bool, ret) ret2 end - function distance(instance::Union{GrapheneSphere, Ref{_GrapheneSphere}}, _point::Union{GraphenePoint3D, Ref{_GraphenePoint3D}}) + function distance(instance::GrapheneSphereLike, _point::GraphenePoint3DLike) ret = ccall(("graphene_sphere_distance", libgraphene), Float32, (Ptr{_GrapheneSphere}, Ptr{_GraphenePoint3D}), instance, _point) ret end - function equal(instance::Union{GrapheneSphere, Ref{_GrapheneSphere}}, _b::Union{GrapheneSphere, Ref{_GrapheneSphere}}) + function equal(instance::GrapheneSphereLike, _b::GrapheneSphereLike) ret = ccall(("graphene_sphere_equal", libgraphene), Cint, (Ptr{_GrapheneSphere}, Ptr{_GrapheneSphere}), instance, _b) ret2 = convert(Bool, ret) ret2 end - function free(instance::Union{GrapheneSphere, Ref{_GrapheneSphere}}) + function free(instance::GrapheneSphereLike) ret = ccall(("graphene_sphere_free", libgraphene), Nothing, (Ptr{_GrapheneSphere},), instance) nothing end - function get_bounding_box(instance::Union{GrapheneSphere, Ref{_GrapheneSphere}}) + function get_bounding_box(instance::GrapheneSphereLike) m_box = Ref{_GrapheneBox}() ret = ccall(("graphene_sphere_get_bounding_box", libgraphene), Nothing, (Ptr{_GrapheneSphere}, Ptr{_GrapheneBox}), instance, m_box) _box = m_box[] _box end - function get_center(instance::Union{GrapheneSphere, Ref{_GrapheneSphere}}) + function get_center(instance::GrapheneSphereLike) m_center = Ref{_GraphenePoint3D}() ret = ccall(("graphene_sphere_get_center", libgraphene), Nothing, (Ptr{_GrapheneSphere}, Ptr{_GraphenePoint3D}), instance, m_center) _center = m_center[] _center end - function get_radius(instance::Union{GrapheneSphere, Ref{_GrapheneSphere}}) + function get_radius(instance::GrapheneSphereLike) ret = ccall(("graphene_sphere_get_radius", libgraphene), Float32, (Ptr{_GrapheneSphere},), instance) ret end - function init(instance::Union{GrapheneSphere, Ref{_GrapheneSphere}}, _center::Maybe(Union{GraphenePoint3D, Ref{_GraphenePoint3D}}), _radius::Real) + function init(instance::GrapheneSphereLike, _center::Maybe(GraphenePoint3DLike), _radius::Real) _center_maybe = nothing_to_null(_center) ret = ccall(("graphene_sphere_init", libgraphene), Ptr{_GrapheneSphere}, (Ptr{_GrapheneSphere}, Ptr{_GraphenePoint3D}, Float32), instance, _center_maybe, _radius) - ret2 = convert(Union{GrapheneSphere, Ref{_GrapheneSphere}}, ret, false) + ret2 = convert(GrapheneSphereLike, ret, false) ret2 end - function init_from_points(instance::Union{GrapheneSphere, Ref{_GrapheneSphere}}, _points, _center::Maybe(Union{GraphenePoint3D, Ref{_GraphenePoint3D}})) + function init_from_points(instance::GrapheneSphereLike, _points, _center::Maybe(GraphenePoint3DLike)) _points_arr = convert(Vector{_GraphenePoint3D}, _points) _center_maybe = nothing_to_null(_center) _n_points = length(_points) ret = ccall(("graphene_sphere_init_from_points", libgraphene), Ptr{_GrapheneSphere}, (Ptr{_GrapheneSphere}, UInt32, Ptr{_GraphenePoint3D}, Ptr{_GraphenePoint3D}), instance, _n_points, _points_arr, _center_maybe) - ret2 = convert(Union{GrapheneSphere, Ref{_GrapheneSphere}}, ret, false) + ret2 = convert(GrapheneSphereLike, ret, false) ret2 end - function init_from_vectors(instance::Union{GrapheneSphere, Ref{_GrapheneSphere}}, _vectors, _center::Maybe(Union{GraphenePoint3D, Ref{_GraphenePoint3D}})) + function init_from_vectors(instance::GrapheneSphereLike, _vectors, _center::Maybe(GraphenePoint3DLike)) _vectors_arr = convert(Vector{_GrapheneVec3}, _vectors) _center_maybe = nothing_to_null(_center) _n_vectors = length(_vectors) ret = ccall(("graphene_sphere_init_from_vectors", libgraphene), Ptr{_GrapheneSphere}, (Ptr{_GrapheneSphere}, UInt32, Ptr{_GrapheneVec3}, Ptr{_GraphenePoint3D}), instance, _n_vectors, _vectors_arr, _center_maybe) - ret2 = convert(Union{GrapheneSphere, Ref{_GrapheneSphere}}, ret, false) + ret2 = convert(GrapheneSphereLike, ret, false) ret2 end - function is_empty(instance::Union{GrapheneSphere, Ref{_GrapheneSphere}}) + function is_empty(instance::GrapheneSphereLike) ret = ccall(("graphene_sphere_is_empty", libgraphene), Cint, (Ptr{_GrapheneSphere},), instance) ret2 = convert(Bool, ret) ret2 end - function translate(instance::Union{GrapheneSphere, Ref{_GrapheneSphere}}, _point::Union{GraphenePoint3D, Ref{_GraphenePoint3D}}) + function translate(instance::GrapheneSphereLike, _point::GraphenePoint3DLike) m_res = Ref{_GrapheneSphere}() ret = ccall(("graphene_sphere_translate", libgraphene), Nothing, (Ptr{_GrapheneSphere}, Ptr{_GraphenePoint3D}, Ptr{_GrapheneSphere}), instance, _point, m_res) _res = m_res[] @@ -1375,28 +1375,28 @@ $(Expr(:toplevel, quote end function Triangle_alloc() ret = ccall(("graphene_triangle_alloc", libgraphene), Ptr{_GrapheneTriangle}, ()) - ret2 = convert(Union{GrapheneTriangle, Ref{_GrapheneTriangle}}, ret, true) + ret2 = convert(GrapheneTriangleLike, ret, true) ret2 end - function contains_point(instance::Union{GrapheneTriangle, Ref{_GrapheneTriangle}}, _p::Union{GraphenePoint3D, Ref{_GraphenePoint3D}}) + function contains_point(instance::GrapheneTriangleLike, _p::GraphenePoint3DLike) ret = ccall(("graphene_triangle_contains_point", libgraphene), Cint, (Ptr{_GrapheneTriangle}, Ptr{_GraphenePoint3D}), instance, _p) ret2 = convert(Bool, ret) ret2 end - function equal(instance::Union{GrapheneTriangle, Ref{_GrapheneTriangle}}, _b::Union{GrapheneTriangle, Ref{_GrapheneTriangle}}) + function equal(instance::GrapheneTriangleLike, _b::GrapheneTriangleLike) ret = ccall(("graphene_triangle_equal", libgraphene), Cint, (Ptr{_GrapheneTriangle}, Ptr{_GrapheneTriangle}), instance, _b) ret2 = convert(Bool, ret) ret2 end - function free(instance::Union{GrapheneTriangle, Ref{_GrapheneTriangle}}) + function free(instance::GrapheneTriangleLike) ret = ccall(("graphene_triangle_free", libgraphene), Nothing, (Ptr{_GrapheneTriangle},), instance) nothing end - function get_area(instance::Union{GrapheneTriangle, Ref{_GrapheneTriangle}}) + function get_area(instance::GrapheneTriangleLike) ret = ccall(("graphene_triangle_get_area", libgraphene), Float32, (Ptr{_GrapheneTriangle},), instance) ret end - function get_barycoords(instance::Union{GrapheneTriangle, Ref{_GrapheneTriangle}}, _p::Maybe(Union{GraphenePoint3D, Ref{_GraphenePoint3D}})) + function get_barycoords(instance::GrapheneTriangleLike, _p::Maybe(GraphenePoint3DLike)) _p_maybe = nothing_to_null(_p) m_res = Ref{_GrapheneVec2}() ret = ccall(("graphene_triangle_get_barycoords", libgraphene), Cint, (Ptr{_GrapheneTriangle}, Ptr{_GraphenePoint3D}, Ptr{_GrapheneVec2}), instance, _p_maybe, m_res) @@ -1404,31 +1404,31 @@ $(Expr(:toplevel, quote _res = m_res[] (ret2, _res) end - function get_bounding_box(instance::Union{GrapheneTriangle, Ref{_GrapheneTriangle}}) + function get_bounding_box(instance::GrapheneTriangleLike) m_res = Ref{_GrapheneBox}() ret = ccall(("graphene_triangle_get_bounding_box", libgraphene), Nothing, (Ptr{_GrapheneTriangle}, Ptr{_GrapheneBox}), instance, m_res) _res = m_res[] _res end - function get_midpoint(instance::Union{GrapheneTriangle, Ref{_GrapheneTriangle}}) + function get_midpoint(instance::GrapheneTriangleLike) m_res = Ref{_GraphenePoint3D}() ret = ccall(("graphene_triangle_get_midpoint", libgraphene), Nothing, (Ptr{_GrapheneTriangle}, Ptr{_GraphenePoint3D}), instance, m_res) _res = m_res[] _res end - function get_normal(instance::Union{GrapheneTriangle, Ref{_GrapheneTriangle}}) + function get_normal(instance::GrapheneTriangleLike) m_res = Ref{_GrapheneVec3}() ret = ccall(("graphene_triangle_get_normal", libgraphene), Nothing, (Ptr{_GrapheneTriangle}, Ptr{_GrapheneVec3}), instance, m_res) _res = m_res[] _res end - function get_plane(instance::Union{GrapheneTriangle, Ref{_GrapheneTriangle}}) + function get_plane(instance::GrapheneTriangleLike) m_res = Ref{_GraphenePlane}() ret = ccall(("graphene_triangle_get_plane", libgraphene), Nothing, (Ptr{_GrapheneTriangle}, Ptr{_GraphenePlane}), instance, m_res) _res = m_res[] _res end - function get_points(instance::Union{GrapheneTriangle, Ref{_GrapheneTriangle}}) + function get_points(instance::GrapheneTriangleLike) m_a = Ref{_GraphenePoint3D}() m_b = Ref{_GraphenePoint3D}() m_c = Ref{_GraphenePoint3D}() @@ -1438,7 +1438,7 @@ $(Expr(:toplevel, quote _c = m_c[] (_a, _b, _c) end - function get_uv(instance::Union{GrapheneTriangle, Ref{_GrapheneTriangle}}, _p::Maybe(Union{GraphenePoint3D, Ref{_GraphenePoint3D}}), _uv_a::Union{GrapheneVec2, Ref{_GrapheneVec2}}, _uv_b::Union{GrapheneVec2, Ref{_GrapheneVec2}}, _uv_c::Union{GrapheneVec2, Ref{_GrapheneVec2}}) + function get_uv(instance::GrapheneTriangleLike, _p::Maybe(GraphenePoint3DLike), _uv_a::GrapheneVec2Like, _uv_b::GrapheneVec2Like, _uv_c::GrapheneVec2Like) _p_maybe = nothing_to_null(_p) m_res = Ref{_GrapheneVec2}() ret = ccall(("graphene_triangle_get_uv", libgraphene), Cint, (Ptr{_GrapheneTriangle}, Ptr{_GraphenePoint3D}, Ptr{_GrapheneVec2}, Ptr{_GrapheneVec2}, Ptr{_GrapheneVec2}, Ptr{_GrapheneVec2}), instance, _p_maybe, _uv_a, _uv_b, _uv_c, m_res) @@ -1446,7 +1446,7 @@ $(Expr(:toplevel, quote _res = m_res[] (ret2, _res) end - function get_vertices(instance::Union{GrapheneTriangle, Ref{_GrapheneTriangle}}) + function get_vertices(instance::GrapheneTriangleLike) m_a = Ref{_GrapheneVec3}() m_b = Ref{_GrapheneVec3}() m_c = Ref{_GrapheneVec3}() @@ -1456,142 +1456,142 @@ $(Expr(:toplevel, quote _c = m_c[] (_a, _b, _c) end - function init_from_float(instance::Union{GrapheneTriangle, Ref{_GrapheneTriangle}}, _a, _b, _c) + function init_from_float(instance::GrapheneTriangleLike, _a, _b, _c) _a_arr = convert(Vector{Float32}, _a) _b_arr = convert(Vector{Float32}, _b) _c_arr = convert(Vector{Float32}, _c) ret = ccall(("graphene_triangle_init_from_float", libgraphene), Ptr{_GrapheneTriangle}, (Ptr{_GrapheneTriangle}, Ptr{Float32}, Ptr{Float32}, Ptr{Float32}), instance, _a_arr, _b_arr, _c_arr) - ret2 = convert(Union{GrapheneTriangle, Ref{_GrapheneTriangle}}, ret, false) + ret2 = convert(GrapheneTriangleLike, ret, false) ret2 end - function init_from_point3d(instance::Union{GrapheneTriangle, Ref{_GrapheneTriangle}}, _a::Maybe(Union{GraphenePoint3D, Ref{_GraphenePoint3D}}), _b::Maybe(Union{GraphenePoint3D, Ref{_GraphenePoint3D}}), _c::Maybe(Union{GraphenePoint3D, Ref{_GraphenePoint3D}})) + function init_from_point3d(instance::GrapheneTriangleLike, _a::Maybe(GraphenePoint3DLike), _b::Maybe(GraphenePoint3DLike), _c::Maybe(GraphenePoint3DLike)) _a_maybe = nothing_to_null(_a) _b_maybe = nothing_to_null(_b) _c_maybe = nothing_to_null(_c) ret = ccall(("graphene_triangle_init_from_point3d", libgraphene), Ptr{_GrapheneTriangle}, (Ptr{_GrapheneTriangle}, Ptr{_GraphenePoint3D}, Ptr{_GraphenePoint3D}, Ptr{_GraphenePoint3D}), instance, _a_maybe, _b_maybe, _c_maybe) - ret2 = convert(Union{GrapheneTriangle, Ref{_GrapheneTriangle}}, ret, false) + ret2 = convert(GrapheneTriangleLike, ret, false) ret2 end - function init_from_vec3(instance::Union{GrapheneTriangle, Ref{_GrapheneTriangle}}, _a::Maybe(Union{GrapheneVec3, Ref{_GrapheneVec3}}), _b::Maybe(Union{GrapheneVec3, Ref{_GrapheneVec3}}), _c::Maybe(Union{GrapheneVec3, Ref{_GrapheneVec3}})) + function init_from_vec3(instance::GrapheneTriangleLike, _a::Maybe(GrapheneVec3Like), _b::Maybe(GrapheneVec3Like), _c::Maybe(GrapheneVec3Like)) _a_maybe = nothing_to_null(_a) _b_maybe = nothing_to_null(_b) _c_maybe = nothing_to_null(_c) ret = ccall(("graphene_triangle_init_from_vec3", libgraphene), Ptr{_GrapheneTriangle}, (Ptr{_GrapheneTriangle}, Ptr{_GrapheneVec3}, Ptr{_GrapheneVec3}, Ptr{_GrapheneVec3}), instance, _a_maybe, _b_maybe, _c_maybe) - ret2 = convert(Union{GrapheneTriangle, Ref{_GrapheneTriangle}}, ret, false) + ret2 = convert(GrapheneTriangleLike, ret, false) ret2 end function Vec2_alloc() ret = ccall(("graphene_vec2_alloc", libgraphene), Ptr{_GrapheneVec2}, ()) - ret2 = convert(Union{GrapheneVec2, Ref{_GrapheneVec2}}, ret, true) + ret2 = convert(GrapheneVec2Like, ret, true) ret2 end - function add(instance::Union{GrapheneVec2, Ref{_GrapheneVec2}}, _b::Union{GrapheneVec2, Ref{_GrapheneVec2}}) + function add(instance::GrapheneVec2Like, _b::GrapheneVec2Like) m_res = Ref{_GrapheneVec2}() ret = ccall(("graphene_vec2_add", libgraphene), Nothing, (Ptr{_GrapheneVec2}, Ptr{_GrapheneVec2}, Ptr{_GrapheneVec2}), instance, _b, m_res) _res = m_res[] _res end - function divide(instance::Union{GrapheneVec2, Ref{_GrapheneVec2}}, _b::Union{GrapheneVec2, Ref{_GrapheneVec2}}) + function divide(instance::GrapheneVec2Like, _b::GrapheneVec2Like) m_res = Ref{_GrapheneVec2}() ret = ccall(("graphene_vec2_divide", libgraphene), Nothing, (Ptr{_GrapheneVec2}, Ptr{_GrapheneVec2}, Ptr{_GrapheneVec2}), instance, _b, m_res) _res = m_res[] _res end - function dot(instance::Union{GrapheneVec2, Ref{_GrapheneVec2}}, _b::Union{GrapheneVec2, Ref{_GrapheneVec2}}) + function dot(instance::GrapheneVec2Like, _b::GrapheneVec2Like) ret = ccall(("graphene_vec2_dot", libgraphene), Float32, (Ptr{_GrapheneVec2}, Ptr{_GrapheneVec2}), instance, _b) ret end - function equal(instance::Union{GrapheneVec2, Ref{_GrapheneVec2}}, _v2::Union{GrapheneVec2, Ref{_GrapheneVec2}}) + function equal(instance::GrapheneVec2Like, _v2::GrapheneVec2Like) ret = ccall(("graphene_vec2_equal", libgraphene), Cint, (Ptr{_GrapheneVec2}, Ptr{_GrapheneVec2}), instance, _v2) ret2 = convert(Bool, ret) ret2 end - function free(instance::Union{GrapheneVec2, Ref{_GrapheneVec2}}) + function free(instance::GrapheneVec2Like) ret = ccall(("graphene_vec2_free", libgraphene), Nothing, (Ptr{_GrapheneVec2},), instance) nothing end - function get_x(instance::Union{GrapheneVec2, Ref{_GrapheneVec2}}) + function get_x(instance::GrapheneVec2Like) ret = ccall(("graphene_vec2_get_x", libgraphene), Float32, (Ptr{_GrapheneVec2},), instance) ret end - function get_y(instance::Union{GrapheneVec2, Ref{_GrapheneVec2}}) + function get_y(instance::GrapheneVec2Like) ret = ccall(("graphene_vec2_get_y", libgraphene), Float32, (Ptr{_GrapheneVec2},), instance) ret end - function init(instance::Union{GrapheneVec2, Ref{_GrapheneVec2}}, _x::Real, _y::Real) + function init(instance::GrapheneVec2Like, _x::Real, _y::Real) ret = ccall(("graphene_vec2_init", libgraphene), Ptr{_GrapheneVec2}, (Ptr{_GrapheneVec2}, Float32, Float32), instance, _x, _y) - ret2 = convert(Union{GrapheneVec2, Ref{_GrapheneVec2}}, ret, false) + ret2 = convert(GrapheneVec2Like, ret, false) ret2 end - function init_from_float(instance::Union{GrapheneVec2, Ref{_GrapheneVec2}}, _src) + function init_from_float(instance::GrapheneVec2Like, _src) _src_arr = convert(Vector{Float32}, _src) ret = ccall(("graphene_vec2_init_from_float", libgraphene), Ptr{_GrapheneVec2}, (Ptr{_GrapheneVec2}, Ptr{Float32}), instance, _src_arr) - ret2 = convert(Union{GrapheneVec2, Ref{_GrapheneVec2}}, ret, false) + ret2 = convert(GrapheneVec2Like, ret, false) ret2 end - function init_from_vec2(instance::Union{GrapheneVec2, Ref{_GrapheneVec2}}, _src::Union{GrapheneVec2, Ref{_GrapheneVec2}}) + function init_from_vec2(instance::GrapheneVec2Like, _src::GrapheneVec2Like) ret = ccall(("graphene_vec2_init_from_vec2", libgraphene), Ptr{_GrapheneVec2}, (Ptr{_GrapheneVec2}, Ptr{_GrapheneVec2}), instance, _src) - ret2 = convert(Union{GrapheneVec2, Ref{_GrapheneVec2}}, ret, false) + ret2 = convert(GrapheneVec2Like, ret, false) ret2 end - function interpolate(instance::Union{GrapheneVec2, Ref{_GrapheneVec2}}, _v2::Union{GrapheneVec2, Ref{_GrapheneVec2}}, _factor::Real) + function interpolate(instance::GrapheneVec2Like, _v2::GrapheneVec2Like, _factor::Real) m_res = Ref{_GrapheneVec2}() ret = ccall(("graphene_vec2_interpolate", libgraphene), Nothing, (Ptr{_GrapheneVec2}, Ptr{_GrapheneVec2}, Float64, Ptr{_GrapheneVec2}), instance, _v2, _factor, m_res) _res = m_res[] _res end - function length(instance::Union{GrapheneVec2, Ref{_GrapheneVec2}}) + function length(instance::GrapheneVec2Like) ret = ccall(("graphene_vec2_length", libgraphene), Float32, (Ptr{_GrapheneVec2},), instance) ret end - function max(instance::Union{GrapheneVec2, Ref{_GrapheneVec2}}, _b::Union{GrapheneVec2, Ref{_GrapheneVec2}}) + function max(instance::GrapheneVec2Like, _b::GrapheneVec2Like) m_res = Ref{_GrapheneVec2}() ret = ccall(("graphene_vec2_max", libgraphene), Nothing, (Ptr{_GrapheneVec2}, Ptr{_GrapheneVec2}, Ptr{_GrapheneVec2}), instance, _b, m_res) _res = m_res[] _res end - function min(instance::Union{GrapheneVec2, Ref{_GrapheneVec2}}, _b::Union{GrapheneVec2, Ref{_GrapheneVec2}}) + function min(instance::GrapheneVec2Like, _b::GrapheneVec2Like) m_res = Ref{_GrapheneVec2}() ret = ccall(("graphene_vec2_min", libgraphene), Nothing, (Ptr{_GrapheneVec2}, Ptr{_GrapheneVec2}, Ptr{_GrapheneVec2}), instance, _b, m_res) _res = m_res[] _res end - function multiply(instance::Union{GrapheneVec2, Ref{_GrapheneVec2}}, _b::Union{GrapheneVec2, Ref{_GrapheneVec2}}) + function multiply(instance::GrapheneVec2Like, _b::GrapheneVec2Like) m_res = Ref{_GrapheneVec2}() ret = ccall(("graphene_vec2_multiply", libgraphene), Nothing, (Ptr{_GrapheneVec2}, Ptr{_GrapheneVec2}, Ptr{_GrapheneVec2}), instance, _b, m_res) _res = m_res[] _res end - function near(instance::Union{GrapheneVec2, Ref{_GrapheneVec2}}, _v2::Union{GrapheneVec2, Ref{_GrapheneVec2}}, _epsilon::Real) + function near(instance::GrapheneVec2Like, _v2::GrapheneVec2Like, _epsilon::Real) ret = ccall(("graphene_vec2_near", libgraphene), Cint, (Ptr{_GrapheneVec2}, Ptr{_GrapheneVec2}, Float32), instance, _v2, _epsilon) ret2 = convert(Bool, ret) ret2 end - function negate(instance::Union{GrapheneVec2, Ref{_GrapheneVec2}}) + function negate(instance::GrapheneVec2Like) m_res = Ref{_GrapheneVec2}() ret = ccall(("graphene_vec2_negate", libgraphene), Nothing, (Ptr{_GrapheneVec2}, Ptr{_GrapheneVec2}), instance, m_res) _res = m_res[] _res end - function normalize(instance::Union{GrapheneVec2, Ref{_GrapheneVec2}}) + function normalize(instance::GrapheneVec2Like) m_res = Ref{_GrapheneVec2}() ret = ccall(("graphene_vec2_normalize", libgraphene), Nothing, (Ptr{_GrapheneVec2}, Ptr{_GrapheneVec2}), instance, m_res) _res = m_res[] _res end - function scale(instance::Union{GrapheneVec2, Ref{_GrapheneVec2}}, _factor::Real) + function scale(instance::GrapheneVec2Like, _factor::Real) m_res = Ref{_GrapheneVec2}() ret = ccall(("graphene_vec2_scale", libgraphene), Nothing, (Ptr{_GrapheneVec2}, Float32, Ptr{_GrapheneVec2}), instance, _factor, m_res) _res = m_res[] _res end - function subtract(instance::Union{GrapheneVec2, Ref{_GrapheneVec2}}, _b::Union{GrapheneVec2, Ref{_GrapheneVec2}}) + function subtract(instance::GrapheneVec2Like, _b::GrapheneVec2Like) m_res = Ref{_GrapheneVec2}() ret = ccall(("graphene_vec2_subtract", libgraphene), Nothing, (Ptr{_GrapheneVec2}, Ptr{_GrapheneVec2}, Ptr{_GrapheneVec2}), instance, _b, m_res) _res = m_res[] _res end - function to_float(instance::Union{GrapheneVec2, Ref{_GrapheneVec2}}) + function to_float(instance::GrapheneVec2Like) m_dest = Ref{Ptr{Float32}}() ret = ccall(("graphene_vec2_to_float", libgraphene), Nothing, (Ptr{_GrapheneVec2}, Ptr{Ptr{Float32}}), instance, m_dest) _dest = m_dest[] @@ -1599,146 +1599,146 @@ $(Expr(:toplevel, quote end function Vec4_alloc() ret = ccall(("graphene_vec4_alloc", libgraphene), Ptr{_GrapheneVec4}, ()) - ret2 = convert(Union{GrapheneVec4, Ref{_GrapheneVec4}}, ret, true) + ret2 = convert(GrapheneVec4Like, ret, true) ret2 end - function add(instance::Union{GrapheneVec4, Ref{_GrapheneVec4}}, _b::Union{GrapheneVec4, Ref{_GrapheneVec4}}) + function add(instance::GrapheneVec4Like, _b::GrapheneVec4Like) m_res = Ref{_GrapheneVec4}() ret = ccall(("graphene_vec4_add", libgraphene), Nothing, (Ptr{_GrapheneVec4}, Ptr{_GrapheneVec4}, Ptr{_GrapheneVec4}), instance, _b, m_res) _res = m_res[] _res end - function divide(instance::Union{GrapheneVec4, Ref{_GrapheneVec4}}, _b::Union{GrapheneVec4, Ref{_GrapheneVec4}}) + function divide(instance::GrapheneVec4Like, _b::GrapheneVec4Like) m_res = Ref{_GrapheneVec4}() ret = ccall(("graphene_vec4_divide", libgraphene), Nothing, (Ptr{_GrapheneVec4}, Ptr{_GrapheneVec4}, Ptr{_GrapheneVec4}), instance, _b, m_res) _res = m_res[] _res end - function dot(instance::Union{GrapheneVec4, Ref{_GrapheneVec4}}, _b::Union{GrapheneVec4, Ref{_GrapheneVec4}}) + function dot(instance::GrapheneVec4Like, _b::GrapheneVec4Like) ret = ccall(("graphene_vec4_dot", libgraphene), Float32, (Ptr{_GrapheneVec4}, Ptr{_GrapheneVec4}), instance, _b) ret end - function equal(instance::Union{GrapheneVec4, Ref{_GrapheneVec4}}, _v2::Union{GrapheneVec4, Ref{_GrapheneVec4}}) + function equal(instance::GrapheneVec4Like, _v2::GrapheneVec4Like) ret = ccall(("graphene_vec4_equal", libgraphene), Cint, (Ptr{_GrapheneVec4}, Ptr{_GrapheneVec4}), instance, _v2) ret2 = convert(Bool, ret) ret2 end - function free(instance::Union{GrapheneVec4, Ref{_GrapheneVec4}}) + function free(instance::GrapheneVec4Like) ret = ccall(("graphene_vec4_free", libgraphene), Nothing, (Ptr{_GrapheneVec4},), instance) nothing end - function get_w(instance::Union{GrapheneVec4, Ref{_GrapheneVec4}}) + function get_w(instance::GrapheneVec4Like) ret = ccall(("graphene_vec4_get_w", libgraphene), Float32, (Ptr{_GrapheneVec4},), instance) ret end - function get_x(instance::Union{GrapheneVec4, Ref{_GrapheneVec4}}) + function get_x(instance::GrapheneVec4Like) ret = ccall(("graphene_vec4_get_x", libgraphene), Float32, (Ptr{_GrapheneVec4},), instance) ret end - function get_xy(instance::Union{GrapheneVec4, Ref{_GrapheneVec4}}) + function get_xy(instance::GrapheneVec4Like) m_res = Ref{_GrapheneVec2}() ret = ccall(("graphene_vec4_get_xy", libgraphene), Nothing, (Ptr{_GrapheneVec4}, Ptr{_GrapheneVec2}), instance, m_res) _res = m_res[] _res end - function get_xyz(instance::Union{GrapheneVec4, Ref{_GrapheneVec4}}) + function get_xyz(instance::GrapheneVec4Like) m_res = Ref{_GrapheneVec3}() ret = ccall(("graphene_vec4_get_xyz", libgraphene), Nothing, (Ptr{_GrapheneVec4}, Ptr{_GrapheneVec3}), instance, m_res) _res = m_res[] _res end - function get_y(instance::Union{GrapheneVec4, Ref{_GrapheneVec4}}) + function get_y(instance::GrapheneVec4Like) ret = ccall(("graphene_vec4_get_y", libgraphene), Float32, (Ptr{_GrapheneVec4},), instance) ret end - function get_z(instance::Union{GrapheneVec4, Ref{_GrapheneVec4}}) + function get_z(instance::GrapheneVec4Like) ret = ccall(("graphene_vec4_get_z", libgraphene), Float32, (Ptr{_GrapheneVec4},), instance) ret end - function init(instance::Union{GrapheneVec4, Ref{_GrapheneVec4}}, _x::Real, _y::Real, _z::Real, _w::Real) + function init(instance::GrapheneVec4Like, _x::Real, _y::Real, _z::Real, _w::Real) ret = ccall(("graphene_vec4_init", libgraphene), Ptr{_GrapheneVec4}, (Ptr{_GrapheneVec4}, Float32, Float32, Float32, Float32), instance, _x, _y, _z, _w) - ret2 = convert(Union{GrapheneVec4, Ref{_GrapheneVec4}}, ret, false) + ret2 = convert(GrapheneVec4Like, ret, false) ret2 end - function init_from_float(instance::Union{GrapheneVec4, Ref{_GrapheneVec4}}, _src) + function init_from_float(instance::GrapheneVec4Like, _src) _src_arr = convert(Vector{Float32}, _src) ret = ccall(("graphene_vec4_init_from_float", libgraphene), Ptr{_GrapheneVec4}, (Ptr{_GrapheneVec4}, Ptr{Float32}), instance, _src_arr) - ret2 = convert(Union{GrapheneVec4, Ref{_GrapheneVec4}}, ret, false) + ret2 = convert(GrapheneVec4Like, ret, false) ret2 end - function init_from_vec2(instance::Union{GrapheneVec4, Ref{_GrapheneVec4}}, _src::Union{GrapheneVec2, Ref{_GrapheneVec2}}, _z::Real, _w::Real) + function init_from_vec2(instance::GrapheneVec4Like, _src::GrapheneVec2Like, _z::Real, _w::Real) ret = ccall(("graphene_vec4_init_from_vec2", libgraphene), Ptr{_GrapheneVec4}, (Ptr{_GrapheneVec4}, Ptr{_GrapheneVec2}, Float32, Float32), instance, _src, _z, _w) - ret2 = convert(Union{GrapheneVec4, Ref{_GrapheneVec4}}, ret, false) + ret2 = convert(GrapheneVec4Like, ret, false) ret2 end - function init_from_vec3(instance::Union{GrapheneVec4, Ref{_GrapheneVec4}}, _src::Union{GrapheneVec3, Ref{_GrapheneVec3}}, _w::Real) + function init_from_vec3(instance::GrapheneVec4Like, _src::GrapheneVec3Like, _w::Real) ret = ccall(("graphene_vec4_init_from_vec3", libgraphene), Ptr{_GrapheneVec4}, (Ptr{_GrapheneVec4}, Ptr{_GrapheneVec3}, Float32), instance, _src, _w) - ret2 = convert(Union{GrapheneVec4, Ref{_GrapheneVec4}}, ret, false) + ret2 = convert(GrapheneVec4Like, ret, false) ret2 end - function init_from_vec4(instance::Union{GrapheneVec4, Ref{_GrapheneVec4}}, _src::Union{GrapheneVec4, Ref{_GrapheneVec4}}) + function init_from_vec4(instance::GrapheneVec4Like, _src::GrapheneVec4Like) ret = ccall(("graphene_vec4_init_from_vec4", libgraphene), Ptr{_GrapheneVec4}, (Ptr{_GrapheneVec4}, Ptr{_GrapheneVec4}), instance, _src) - ret2 = convert(Union{GrapheneVec4, Ref{_GrapheneVec4}}, ret, false) + ret2 = convert(GrapheneVec4Like, ret, false) ret2 end - function interpolate(instance::Union{GrapheneVec4, Ref{_GrapheneVec4}}, _v2::Union{GrapheneVec4, Ref{_GrapheneVec4}}, _factor::Real) + function interpolate(instance::GrapheneVec4Like, _v2::GrapheneVec4Like, _factor::Real) m_res = Ref{_GrapheneVec4}() ret = ccall(("graphene_vec4_interpolate", libgraphene), Nothing, (Ptr{_GrapheneVec4}, Ptr{_GrapheneVec4}, Float64, Ptr{_GrapheneVec4}), instance, _v2, _factor, m_res) _res = m_res[] _res end - function length(instance::Union{GrapheneVec4, Ref{_GrapheneVec4}}) + function length(instance::GrapheneVec4Like) ret = ccall(("graphene_vec4_length", libgraphene), Float32, (Ptr{_GrapheneVec4},), instance) ret end - function max(instance::Union{GrapheneVec4, Ref{_GrapheneVec4}}, _b::Union{GrapheneVec4, Ref{_GrapheneVec4}}) + function max(instance::GrapheneVec4Like, _b::GrapheneVec4Like) m_res = Ref{_GrapheneVec4}() ret = ccall(("graphene_vec4_max", libgraphene), Nothing, (Ptr{_GrapheneVec4}, Ptr{_GrapheneVec4}, Ptr{_GrapheneVec4}), instance, _b, m_res) _res = m_res[] _res end - function min(instance::Union{GrapheneVec4, Ref{_GrapheneVec4}}, _b::Union{GrapheneVec4, Ref{_GrapheneVec4}}) + function min(instance::GrapheneVec4Like, _b::GrapheneVec4Like) m_res = Ref{_GrapheneVec4}() ret = ccall(("graphene_vec4_min", libgraphene), Nothing, (Ptr{_GrapheneVec4}, Ptr{_GrapheneVec4}, Ptr{_GrapheneVec4}), instance, _b, m_res) _res = m_res[] _res end - function multiply(instance::Union{GrapheneVec4, Ref{_GrapheneVec4}}, _b::Union{GrapheneVec4, Ref{_GrapheneVec4}}) + function multiply(instance::GrapheneVec4Like, _b::GrapheneVec4Like) m_res = Ref{_GrapheneVec4}() ret = ccall(("graphene_vec4_multiply", libgraphene), Nothing, (Ptr{_GrapheneVec4}, Ptr{_GrapheneVec4}, Ptr{_GrapheneVec4}), instance, _b, m_res) _res = m_res[] _res end - function near(instance::Union{GrapheneVec4, Ref{_GrapheneVec4}}, _v2::Union{GrapheneVec4, Ref{_GrapheneVec4}}, _epsilon::Real) + function near(instance::GrapheneVec4Like, _v2::GrapheneVec4Like, _epsilon::Real) ret = ccall(("graphene_vec4_near", libgraphene), Cint, (Ptr{_GrapheneVec4}, Ptr{_GrapheneVec4}, Float32), instance, _v2, _epsilon) ret2 = convert(Bool, ret) ret2 end - function negate(instance::Union{GrapheneVec4, Ref{_GrapheneVec4}}) + function negate(instance::GrapheneVec4Like) m_res = Ref{_GrapheneVec4}() ret = ccall(("graphene_vec4_negate", libgraphene), Nothing, (Ptr{_GrapheneVec4}, Ptr{_GrapheneVec4}), instance, m_res) _res = m_res[] _res end - function normalize(instance::Union{GrapheneVec4, Ref{_GrapheneVec4}}) + function normalize(instance::GrapheneVec4Like) m_res = Ref{_GrapheneVec4}() ret = ccall(("graphene_vec4_normalize", libgraphene), Nothing, (Ptr{_GrapheneVec4}, Ptr{_GrapheneVec4}), instance, m_res) _res = m_res[] _res end - function scale(instance::Union{GrapheneVec4, Ref{_GrapheneVec4}}, _factor::Real) + function scale(instance::GrapheneVec4Like, _factor::Real) m_res = Ref{_GrapheneVec4}() ret = ccall(("graphene_vec4_scale", libgraphene), Nothing, (Ptr{_GrapheneVec4}, Float32, Ptr{_GrapheneVec4}), instance, _factor, m_res) _res = m_res[] _res end - function subtract(instance::Union{GrapheneVec4, Ref{_GrapheneVec4}}, _b::Union{GrapheneVec4, Ref{_GrapheneVec4}}) + function subtract(instance::GrapheneVec4Like, _b::GrapheneVec4Like) m_res = Ref{_GrapheneVec4}() ret = ccall(("graphene_vec4_subtract", libgraphene), Nothing, (Ptr{_GrapheneVec4}, Ptr{_GrapheneVec4}, Ptr{_GrapheneVec4}), instance, _b, m_res) _res = m_res[] _res end - function to_float(instance::Union{GrapheneVec4, Ref{_GrapheneVec4}}) + function to_float(instance::GrapheneVec4Like) m_dest = Ref{Ptr{Float32}}() ret = ccall(("graphene_vec4_to_float", libgraphene), Nothing, (Ptr{_GrapheneVec4}, Ptr{Ptr{Float32}}), instance, m_dest) _dest = m_dest[] diff --git a/src/gen/graphene_structs b/src/gen/graphene_structs index d9c70786..baaf0466 100644 --- a/src/gen/graphene_structs +++ b/src/gen/graphene_structs @@ -11,9 +11,15 @@ $(Expr(:toplevel, quote mutable struct GrapheneSimd4F handle::Ptr{_GrapheneSimd4F} end - unsafe_convert(::Type{Ptr{_GrapheneSimd4F}}, box::GrapheneSimd4F) = begin - convert(Ptr{_GrapheneSimd4F}, box.handle) - end + begin + unsafe_convert(::Type{Ptr{_GrapheneSimd4F}}, box::GrapheneSimd4F) = begin + convert(Ptr{_GrapheneSimd4F}, box.handle) + end + convert(::Type{GrapheneSimd4F}, p::Ptr{_GrapheneSimd4F}, owns = false) = begin + GrapheneSimd4F(p, owns) + end + const GrapheneSimd4FLike = Union{Ref{_GrapheneSimd4F}, GrapheneSimd4F} + end end begin struct _GrapheneVec3 @@ -25,7 +31,7 @@ $(Expr(:toplevel, quote (GLib.g_type(::Type{T}) where T <: GrapheneVec3) = begin ccall(("graphene_vec3_get_type", libgraphene), GType, ()) end - function GrapheneVec3(ref::Ptr{T}, own::Bool = false) where T <: GBoxed + function GrapheneVec3(ref::Ptr{T}, own::Bool = false) where T <: Union{GBoxed, _GrapheneVec3} x = new(ref) if own finalizer(x) do x @@ -37,9 +43,15 @@ $(Expr(:toplevel, quote push!(gboxed_types, GrapheneVec3) end end - unsafe_convert(::Type{Ptr{_GrapheneVec3}}, box::GrapheneVec3) = begin - convert(Ptr{_GrapheneVec3}, box.handle) - end + begin + unsafe_convert(::Type{Ptr{_GrapheneVec3}}, box::GrapheneVec3) = begin + convert(Ptr{_GrapheneVec3}, box.handle) + end + convert(::Type{GrapheneVec3}, p::Ptr{_GrapheneVec3}, owns = false) = begin + GrapheneVec3(p, owns) + end + const GrapheneVec3Like = Union{Ref{_GrapheneVec3}, GrapheneVec3} + end end begin struct _GrapheneSimd4X4F @@ -51,9 +63,15 @@ $(Expr(:toplevel, quote mutable struct GrapheneSimd4X4F handle::Ptr{_GrapheneSimd4X4F} end - unsafe_convert(::Type{Ptr{_GrapheneSimd4X4F}}, box::GrapheneSimd4X4F) = begin - convert(Ptr{_GrapheneSimd4X4F}, box.handle) - end + begin + unsafe_convert(::Type{Ptr{_GrapheneSimd4X4F}}, box::GrapheneSimd4X4F) = begin + convert(Ptr{_GrapheneSimd4X4F}, box.handle) + end + convert(::Type{GrapheneSimd4X4F}, p::Ptr{_GrapheneSimd4X4F}, owns = false) = begin + GrapheneSimd4X4F(p, owns) + end + const GrapheneSimd4X4FLike = Union{Ref{_GrapheneSimd4X4F}, GrapheneSimd4X4F} + end end begin struct _GrapheneSize @@ -66,7 +84,7 @@ $(Expr(:toplevel, quote (GLib.g_type(::Type{T}) where T <: GrapheneSize) = begin ccall(("graphene_size_get_type", libgraphene), GType, ()) end - function GrapheneSize(ref::Ptr{T}, own::Bool = false) where T <: GBoxed + function GrapheneSize(ref::Ptr{T}, own::Bool = false) where T <: Union{GBoxed, _GrapheneSize} x = new(ref) if own finalizer(x) do x @@ -78,9 +96,15 @@ $(Expr(:toplevel, quote push!(gboxed_types, GrapheneSize) end end - unsafe_convert(::Type{Ptr{_GrapheneSize}}, box::GrapheneSize) = begin - convert(Ptr{_GrapheneSize}, box.handle) - end + begin + unsafe_convert(::Type{Ptr{_GrapheneSize}}, box::GrapheneSize) = begin + convert(Ptr{_GrapheneSize}, box.handle) + end + convert(::Type{GrapheneSize}, p::Ptr{_GrapheneSize}, owns = false) = begin + GrapheneSize(p, owns) + end + const GrapheneSizeLike = Union{Ref{_GrapheneSize}, GrapheneSize} + end end begin struct _GrapheneBox @@ -93,7 +117,7 @@ $(Expr(:toplevel, quote (GLib.g_type(::Type{T}) where T <: GrapheneBox) = begin ccall(("graphene_box_get_type", libgraphene), GType, ()) end - function GrapheneBox(ref::Ptr{T}, own::Bool = false) where T <: GBoxed + function GrapheneBox(ref::Ptr{T}, own::Bool = false) where T <: Union{GBoxed, _GrapheneBox} x = new(ref) if own finalizer(x) do x @@ -105,9 +129,15 @@ $(Expr(:toplevel, quote push!(gboxed_types, GrapheneBox) end end - unsafe_convert(::Type{Ptr{_GrapheneBox}}, box::GrapheneBox) = begin - convert(Ptr{_GrapheneBox}, box.handle) - end + begin + unsafe_convert(::Type{Ptr{_GrapheneBox}}, box::GrapheneBox) = begin + convert(Ptr{_GrapheneBox}, box.handle) + end + convert(::Type{GrapheneBox}, p::Ptr{_GrapheneBox}, owns = false) = begin + GrapheneBox(p, owns) + end + const GrapheneBoxLike = Union{Ref{_GrapheneBox}, GrapheneBox} + end end begin struct _GrapheneEuler @@ -120,7 +150,7 @@ $(Expr(:toplevel, quote (GLib.g_type(::Type{T}) where T <: GrapheneEuler) = begin ccall(("graphene_euler_get_type", libgraphene), GType, ()) end - function GrapheneEuler(ref::Ptr{T}, own::Bool = false) where T <: GBoxed + function GrapheneEuler(ref::Ptr{T}, own::Bool = false) where T <: Union{GBoxed, _GrapheneEuler} x = new(ref) if own finalizer(x) do x @@ -132,9 +162,15 @@ $(Expr(:toplevel, quote push!(gboxed_types, GrapheneEuler) end end - unsafe_convert(::Type{Ptr{_GrapheneEuler}}, box::GrapheneEuler) = begin - convert(Ptr{_GrapheneEuler}, box.handle) - end + begin + unsafe_convert(::Type{Ptr{_GrapheneEuler}}, box::GrapheneEuler) = begin + convert(Ptr{_GrapheneEuler}, box.handle) + end + convert(::Type{GrapheneEuler}, p::Ptr{_GrapheneEuler}, owns = false) = begin + GrapheneEuler(p, owns) + end + const GrapheneEulerLike = Union{Ref{_GrapheneEuler}, GrapheneEuler} + end end begin mutable struct GrapheneFrustum <: GBoxed @@ -155,6 +191,7 @@ $(Expr(:toplevel, quote push!(gboxed_types, GrapheneFrustum) end end + const GrapheneFrustumLike = GrapheneFrustum const _GrapheneFrustum = GrapheneFrustum end begin @@ -167,7 +204,7 @@ $(Expr(:toplevel, quote (GLib.g_type(::Type{T}) where T <: GrapheneMatrix) = begin ccall(("graphene_matrix_get_type", libgraphene), GType, ()) end - function GrapheneMatrix(ref::Ptr{T}, own::Bool = false) where T <: GBoxed + function GrapheneMatrix(ref::Ptr{T}, own::Bool = false) where T <: Union{GBoxed, _GrapheneMatrix} x = new(ref) if own finalizer(x) do x @@ -179,9 +216,15 @@ $(Expr(:toplevel, quote push!(gboxed_types, GrapheneMatrix) end end - unsafe_convert(::Type{Ptr{_GrapheneMatrix}}, box::GrapheneMatrix) = begin - convert(Ptr{_GrapheneMatrix}, box.handle) - end + begin + unsafe_convert(::Type{Ptr{_GrapheneMatrix}}, box::GrapheneMatrix) = begin + convert(Ptr{_GrapheneMatrix}, box.handle) + end + convert(::Type{GrapheneMatrix}, p::Ptr{_GrapheneMatrix}, owns = false) = begin + GrapheneMatrix(p, owns) + end + const GrapheneMatrixLike = Union{Ref{_GrapheneMatrix}, GrapheneMatrix} + end end begin struct _GraphenePlane @@ -194,7 +237,7 @@ $(Expr(:toplevel, quote (GLib.g_type(::Type{T}) where T <: GraphenePlane) = begin ccall(("graphene_plane_get_type", libgraphene), GType, ()) end - function GraphenePlane(ref::Ptr{T}, own::Bool = false) where T <: GBoxed + function GraphenePlane(ref::Ptr{T}, own::Bool = false) where T <: Union{GBoxed, _GraphenePlane} x = new(ref) if own finalizer(x) do x @@ -206,9 +249,15 @@ $(Expr(:toplevel, quote push!(gboxed_types, GraphenePlane) end end - unsafe_convert(::Type{Ptr{_GraphenePlane}}, box::GraphenePlane) = begin - convert(Ptr{_GraphenePlane}, box.handle) - end + begin + unsafe_convert(::Type{Ptr{_GraphenePlane}}, box::GraphenePlane) = begin + convert(Ptr{_GraphenePlane}, box.handle) + end + convert(::Type{GraphenePlane}, p::Ptr{_GraphenePlane}, owns = false) = begin + GraphenePlane(p, owns) + end + const GraphenePlaneLike = Union{Ref{_GraphenePlane}, GraphenePlane} + end end begin struct _GraphenePoint @@ -221,7 +270,7 @@ $(Expr(:toplevel, quote (GLib.g_type(::Type{T}) where T <: GraphenePoint) = begin ccall(("graphene_point_get_type", libgraphene), GType, ()) end - function GraphenePoint(ref::Ptr{T}, own::Bool = false) where T <: GBoxed + function GraphenePoint(ref::Ptr{T}, own::Bool = false) where T <: Union{GBoxed, _GraphenePoint} x = new(ref) if own finalizer(x) do x @@ -233,9 +282,15 @@ $(Expr(:toplevel, quote push!(gboxed_types, GraphenePoint) end end - unsafe_convert(::Type{Ptr{_GraphenePoint}}, box::GraphenePoint) = begin - convert(Ptr{_GraphenePoint}, box.handle) - end + begin + unsafe_convert(::Type{Ptr{_GraphenePoint}}, box::GraphenePoint) = begin + convert(Ptr{_GraphenePoint}, box.handle) + end + convert(::Type{GraphenePoint}, p::Ptr{_GraphenePoint}, owns = false) = begin + GraphenePoint(p, owns) + end + const GraphenePointLike = Union{Ref{_GraphenePoint}, GraphenePoint} + end end begin struct _GraphenePoint3D @@ -249,7 +304,7 @@ $(Expr(:toplevel, quote (GLib.g_type(::Type{T}) where T <: GraphenePoint3D) = begin ccall(("graphene_point3d_get_type", libgraphene), GType, ()) end - function GraphenePoint3D(ref::Ptr{T}, own::Bool = false) where T <: GBoxed + function GraphenePoint3D(ref::Ptr{T}, own::Bool = false) where T <: Union{GBoxed, _GraphenePoint3D} x = new(ref) if own finalizer(x) do x @@ -261,9 +316,15 @@ $(Expr(:toplevel, quote push!(gboxed_types, GraphenePoint3D) end end - unsafe_convert(::Type{Ptr{_GraphenePoint3D}}, box::GraphenePoint3D) = begin - convert(Ptr{_GraphenePoint3D}, box.handle) - end + begin + unsafe_convert(::Type{Ptr{_GraphenePoint3D}}, box::GraphenePoint3D) = begin + convert(Ptr{_GraphenePoint3D}, box.handle) + end + convert(::Type{GraphenePoint3D}, p::Ptr{_GraphenePoint3D}, owns = false) = begin + GraphenePoint3D(p, owns) + end + const GraphenePoint3DLike = Union{Ref{_GraphenePoint3D}, GraphenePoint3D} + end end begin mutable struct GrapheneQuad <: GBoxed @@ -284,6 +345,7 @@ $(Expr(:toplevel, quote push!(gboxed_types, GrapheneQuad) end end + const GrapheneQuadLike = GrapheneQuad const _GrapheneQuad = GrapheneQuad end begin @@ -299,7 +361,7 @@ $(Expr(:toplevel, quote (GLib.g_type(::Type{T}) where T <: GrapheneQuaternion) = begin ccall(("graphene_quaternion_get_type", libgraphene), GType, ()) end - function GrapheneQuaternion(ref::Ptr{T}, own::Bool = false) where T <: GBoxed + function GrapheneQuaternion(ref::Ptr{T}, own::Bool = false) where T <: Union{GBoxed, _GrapheneQuaternion} x = new(ref) if own finalizer(x) do x @@ -311,9 +373,15 @@ $(Expr(:toplevel, quote push!(gboxed_types, GrapheneQuaternion) end end - unsafe_convert(::Type{Ptr{_GrapheneQuaternion}}, box::GrapheneQuaternion) = begin - convert(Ptr{_GrapheneQuaternion}, box.handle) - end + begin + unsafe_convert(::Type{Ptr{_GrapheneQuaternion}}, box::GrapheneQuaternion) = begin + convert(Ptr{_GrapheneQuaternion}, box.handle) + end + convert(::Type{GrapheneQuaternion}, p::Ptr{_GrapheneQuaternion}, owns = false) = begin + GrapheneQuaternion(p, owns) + end + const GrapheneQuaternionLike = Union{Ref{_GrapheneQuaternion}, GrapheneQuaternion} + end end begin struct _GrapheneRay @@ -326,7 +394,7 @@ $(Expr(:toplevel, quote (GLib.g_type(::Type{T}) where T <: GrapheneRay) = begin ccall(("graphene_ray_get_type", libgraphene), GType, ()) end - function GrapheneRay(ref::Ptr{T}, own::Bool = false) where T <: GBoxed + function GrapheneRay(ref::Ptr{T}, own::Bool = false) where T <: Union{GBoxed, _GrapheneRay} x = new(ref) if own finalizer(x) do x @@ -338,9 +406,15 @@ $(Expr(:toplevel, quote push!(gboxed_types, GrapheneRay) end end - unsafe_convert(::Type{Ptr{_GrapheneRay}}, box::GrapheneRay) = begin - convert(Ptr{_GrapheneRay}, box.handle) - end + begin + unsafe_convert(::Type{Ptr{_GrapheneRay}}, box::GrapheneRay) = begin + convert(Ptr{_GrapheneRay}, box.handle) + end + convert(::Type{GrapheneRay}, p::Ptr{_GrapheneRay}, owns = false) = begin + GrapheneRay(p, owns) + end + const GrapheneRayLike = Union{Ref{_GrapheneRay}, GrapheneRay} + end end begin struct _GrapheneRect @@ -353,7 +427,7 @@ $(Expr(:toplevel, quote (GLib.g_type(::Type{T}) where T <: GrapheneRect) = begin ccall(("graphene_rect_get_type", libgraphene), GType, ()) end - function GrapheneRect(ref::Ptr{T}, own::Bool = false) where T <: GBoxed + function GrapheneRect(ref::Ptr{T}, own::Bool = false) where T <: Union{GBoxed, _GrapheneRect} x = new(ref) if own finalizer(x) do x @@ -365,9 +439,15 @@ $(Expr(:toplevel, quote push!(gboxed_types, GrapheneRect) end end - unsafe_convert(::Type{Ptr{_GrapheneRect}}, box::GrapheneRect) = begin - convert(Ptr{_GrapheneRect}, box.handle) - end + begin + unsafe_convert(::Type{Ptr{_GrapheneRect}}, box::GrapheneRect) = begin + convert(Ptr{_GrapheneRect}, box.handle) + end + convert(::Type{GrapheneRect}, p::Ptr{_GrapheneRect}, owns = false) = begin + GrapheneRect(p, owns) + end + const GrapheneRectLike = Union{Ref{_GrapheneRect}, GrapheneRect} + end end begin struct _GrapheneSphere @@ -380,7 +460,7 @@ $(Expr(:toplevel, quote (GLib.g_type(::Type{T}) where T <: GrapheneSphere) = begin ccall(("graphene_sphere_get_type", libgraphene), GType, ()) end - function GrapheneSphere(ref::Ptr{T}, own::Bool = false) where T <: GBoxed + function GrapheneSphere(ref::Ptr{T}, own::Bool = false) where T <: Union{GBoxed, _GrapheneSphere} x = new(ref) if own finalizer(x) do x @@ -392,9 +472,15 @@ $(Expr(:toplevel, quote push!(gboxed_types, GrapheneSphere) end end - unsafe_convert(::Type{Ptr{_GrapheneSphere}}, box::GrapheneSphere) = begin - convert(Ptr{_GrapheneSphere}, box.handle) - end + begin + unsafe_convert(::Type{Ptr{_GrapheneSphere}}, box::GrapheneSphere) = begin + convert(Ptr{_GrapheneSphere}, box.handle) + end + convert(::Type{GrapheneSphere}, p::Ptr{_GrapheneSphere}, owns = false) = begin + GrapheneSphere(p, owns) + end + const GrapheneSphereLike = Union{Ref{_GrapheneSphere}, GrapheneSphere} + end end begin struct _GrapheneTriangle @@ -408,7 +494,7 @@ $(Expr(:toplevel, quote (GLib.g_type(::Type{T}) where T <: GrapheneTriangle) = begin ccall(("graphene_triangle_get_type", libgraphene), GType, ()) end - function GrapheneTriangle(ref::Ptr{T}, own::Bool = false) where T <: GBoxed + function GrapheneTriangle(ref::Ptr{T}, own::Bool = false) where T <: Union{GBoxed, _GrapheneTriangle} x = new(ref) if own finalizer(x) do x @@ -420,9 +506,15 @@ $(Expr(:toplevel, quote push!(gboxed_types, GrapheneTriangle) end end - unsafe_convert(::Type{Ptr{_GrapheneTriangle}}, box::GrapheneTriangle) = begin - convert(Ptr{_GrapheneTriangle}, box.handle) - end + begin + unsafe_convert(::Type{Ptr{_GrapheneTriangle}}, box::GrapheneTriangle) = begin + convert(Ptr{_GrapheneTriangle}, box.handle) + end + convert(::Type{GrapheneTriangle}, p::Ptr{_GrapheneTriangle}, owns = false) = begin + GrapheneTriangle(p, owns) + end + const GrapheneTriangleLike = Union{Ref{_GrapheneTriangle}, GrapheneTriangle} + end end begin struct _GrapheneVec2 @@ -434,7 +526,7 @@ $(Expr(:toplevel, quote (GLib.g_type(::Type{T}) where T <: GrapheneVec2) = begin ccall(("graphene_vec2_get_type", libgraphene), GType, ()) end - function GrapheneVec2(ref::Ptr{T}, own::Bool = false) where T <: GBoxed + function GrapheneVec2(ref::Ptr{T}, own::Bool = false) where T <: Union{GBoxed, _GrapheneVec2} x = new(ref) if own finalizer(x) do x @@ -446,9 +538,15 @@ $(Expr(:toplevel, quote push!(gboxed_types, GrapheneVec2) end end - unsafe_convert(::Type{Ptr{_GrapheneVec2}}, box::GrapheneVec2) = begin - convert(Ptr{_GrapheneVec2}, box.handle) - end + begin + unsafe_convert(::Type{Ptr{_GrapheneVec2}}, box::GrapheneVec2) = begin + convert(Ptr{_GrapheneVec2}, box.handle) + end + convert(::Type{GrapheneVec2}, p::Ptr{_GrapheneVec2}, owns = false) = begin + GrapheneVec2(p, owns) + end + const GrapheneVec2Like = Union{Ref{_GrapheneVec2}, GrapheneVec2} + end end begin struct _GrapheneVec4 @@ -460,7 +558,7 @@ $(Expr(:toplevel, quote (GLib.g_type(::Type{T}) where T <: GrapheneVec4) = begin ccall(("graphene_vec4_get_type", libgraphene), GType, ()) end - function GrapheneVec4(ref::Ptr{T}, own::Bool = false) where T <: GBoxed + function GrapheneVec4(ref::Ptr{T}, own::Bool = false) where T <: Union{GBoxed, _GrapheneVec4} x = new(ref) if own finalizer(x) do x @@ -472,9 +570,15 @@ $(Expr(:toplevel, quote push!(gboxed_types, GrapheneVec4) end end - unsafe_convert(::Type{Ptr{_GrapheneVec4}}, box::GrapheneVec4) = begin - convert(Ptr{_GrapheneVec4}, box.handle) - end + begin + unsafe_convert(::Type{Ptr{_GrapheneVec4}}, box::GrapheneVec4) = begin + convert(Ptr{_GrapheneVec4}, box.handle) + end + convert(::Type{GrapheneVec4}, p::Ptr{_GrapheneVec4}, owns = false) = begin + GrapheneVec4(p, owns) + end + const GrapheneVec4Like = Union{Ref{_GrapheneVec4}, GrapheneVec4} + end end gboxed_cache_init() = begin append!(GLib.gboxed_types, gboxed_types) @@ -533,6 +637,6 @@ $(Expr(:toplevel, quote function GrapheneVec4() G_.Vec4_alloc() 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 + export GrapheneSimd4F, _GrapheneSimd4F, GrapheneSimd4FLike, GrapheneVec3, _GrapheneVec3, GrapheneVec3Like, GrapheneSimd4X4F, _GrapheneSimd4X4F, GrapheneSimd4X4FLike, GrapheneSize, _GrapheneSize, GrapheneSizeLike, GrapheneBox, GrapheneBoxLike, _GrapheneBox, GrapheneEuler, GrapheneEulerLike, _GrapheneEuler, GrapheneFrustum, GrapheneFrustumLike, _GrapheneFrustum, GrapheneMatrix, GrapheneMatrixLike, _GrapheneMatrix, GraphenePlane, GraphenePlaneLike, _GraphenePlane, GraphenePoint, GraphenePointLike, _GraphenePoint, GraphenePoint3D, GraphenePoint3DLike, _GraphenePoint3D, GrapheneQuad, GrapheneQuadLike, _GrapheneQuad, GrapheneQuaternion, GrapheneQuaternionLike, _GrapheneQuaternion, GrapheneRay, GrapheneRayLike, _GrapheneRay, GrapheneRect, GrapheneRectLike, _GrapheneRect, GrapheneSphere, GrapheneSphereLike, _GrapheneSphere, GrapheneTriangle, GrapheneTriangleLike, _GrapheneTriangle, GrapheneVec2, GrapheneVec2Like, _GrapheneVec2, GrapheneVec4, GrapheneVec4Like, _GrapheneVec4 end)) end diff --git a/src/gen/gsk4_functions b/src/gen/gsk4_functions index af64525e..5a8159fe 100644 --- a/src/gen/gsk4_functions +++ b/src/gen/gsk4_functions @@ -24,11 +24,11 @@ $(Expr(:toplevel, quote _out_transform = convert(GskTransform, _out_transform, true) (ret2, _out_transform) end - function value_set_render_node(_value::Union{GValue, Ref{_GValue}}, _node::GskRenderNode) + function value_set_render_node(_value::GValueLike, _node::GskRenderNode) ret = ccall(("gsk_value_set_render_node", libgtk4), Nothing, (Ptr{_GValue}, Ptr{GskRenderNode}), _value, _node) nothing end - function value_take_render_node(_value::Union{GValue, Ref{_GValue}}, _node::Maybe(GskRenderNode)) + function value_take_render_node(_value::GValueLike, _node::Maybe(GskRenderNode)) _node_maybe = nothing_to_null(_node) ret = ccall(("gsk_value_take_render_node", libgtk4), Nothing, (Ptr{_GValue}, Ptr{GskRenderNode}), _value, _node_maybe) nothing diff --git a/src/gen/gsk4_methods b/src/gen/gsk4_methods index d2e3d2a0..ce0001e7 100644 --- a/src/gen/gsk4_methods +++ b/src/gen/gsk4_methods @@ -19,7 +19,7 @@ $(Expr(:toplevel, quote _bounds = m_bounds[] (ret2, _bounds) end - function get_closest_point(instance::GskPath, _point::Union{GraphenePoint, Ref{_GraphenePoint}}, _threshold::Real) + function get_closest_point(instance::GskPath, _point::GraphenePointLike, _threshold::Real) m_result = Ref{GskPathPoint}() m_distance = Ref{Float32}() ret = ccall(("gsk_path_get_closest_point", libgtk4), Cint, (Ptr{GskPath}, Ptr{_GraphenePoint}, Float32, Ptr{GskPathPoint}, Ptr{Float32}), instance, _point, _threshold, m_result, m_distance) @@ -49,7 +49,7 @@ $(Expr(:toplevel, quote _bounds = m_bounds[] (ret2, _bounds) end - function in_fill(instance::GskPath, _point::Union{GraphenePoint, Ref{_GraphenePoint}}, _fill_rule) + function in_fill(instance::GskPath, _point::GraphenePointLike, _fill_rule) ret = ccall(("gsk_path_in_fill", libgtk4), Cint, (Ptr{GskPath}, Ptr{_GraphenePoint}, UInt32), instance, _point, _fill_rule) ret2 = convert(Bool, ret) ret2 @@ -64,7 +64,7 @@ $(Expr(:toplevel, quote ret2 = convert(Bool, ret) ret2 end - function print(instance::GskPath, _string::Union{GString, Ref{_GString}}) + function print(instance::GskPath, _string::GStringLike) ret = ccall(("gsk_path_print", libgtk4), Nothing, (Ptr{GskPath}, Ptr{_GString}), instance, _string) nothing end @@ -95,7 +95,7 @@ $(Expr(:toplevel, quote ret = ccall(("gsk_path_builder_add_cairo_path", libgtk4), Nothing, (Ptr{GskPathBuilder}, Ptr{cairoPath}), instance, _path) nothing end - function add_circle(instance::GskPathBuilder, _center::Union{GraphenePoint, Ref{_GraphenePoint}}, _radius::Real) + function add_circle(instance::GskPathBuilder, _center::GraphenePointLike, _radius::Real) ret = ccall(("gsk_path_builder_add_circle", libgtk4), Nothing, (Ptr{GskPathBuilder}, Ptr{_GraphenePoint}, Float32), instance, _center, _radius) nothing end @@ -107,7 +107,7 @@ $(Expr(:toplevel, quote ret = ccall(("gsk_path_builder_add_path", libgtk4), Nothing, (Ptr{GskPathBuilder}, Ptr{GskPath}), instance, _path) nothing end - function add_rect(instance::GskPathBuilder, _rect::Union{GrapheneRect, Ref{_GrapheneRect}}) + function add_rect(instance::GskPathBuilder, _rect::GrapheneRectLike) ret = ccall(("gsk_path_builder_add_rect", libgtk4), Nothing, (Ptr{GskPathBuilder}, Ptr{_GrapheneRect}), instance, _rect) nothing end @@ -115,7 +115,7 @@ $(Expr(:toplevel, quote ret = ccall(("gsk_path_builder_add_reverse_path", libgtk4), Nothing, (Ptr{GskPathBuilder}, Ptr{GskPath}), instance, _path) nothing end - function add_rounded_rect(instance::GskPathBuilder, _rect::Union{GskRoundedRect, Ref{_GskRoundedRect}}) + function add_rounded_rect(instance::GskPathBuilder, _rect::GskRoundedRectLike) ret = ccall(("gsk_path_builder_add_rounded_rect", libgtk4), Nothing, (Ptr{GskPathBuilder}, Ptr{_GskRoundedRect}), instance, _rect) nothing end @@ -141,7 +141,7 @@ $(Expr(:toplevel, quote end function get_current_point(instance::GskPathBuilder) ret = ccall(("gsk_path_builder_get_current_point", libgtk4), Ptr{_GraphenePoint}, (Ptr{GskPathBuilder},), instance) - ret2 = convert(Union{GraphenePoint, Ref{_GraphenePoint}}, ret, false) + ret2 = convert(GraphenePointLike, ret, false) ret2 end function html_arc_to(instance::GskPathBuilder, _x1::Real, _y1::Real, _x2::Real, _y2::Real, _radius::Real) @@ -271,7 +271,7 @@ $(Expr(:toplevel, quote m_center = Ref{_GraphenePoint}() ret = ccall(("gsk_path_point_get_curvature", libgtk4), Float32, (Ptr{GskPathPoint}, Ptr{GskPath}, UInt32, Ptr{_GraphenePoint}), instance, _path, _direction, m_center) _center = m_center[] - _center = convert_if_not_null(Union{GraphenePoint, Ref{_GraphenePoint}}, _center, false) + _center = convert_if_not_null(GraphenePointLike, _center, false) (ret, _center) end function get_distance(instance::GskPathPoint, _measure::GskPathMeasure) @@ -294,54 +294,54 @@ $(Expr(:toplevel, quote _tangent = m_tangent[] _tangent end - function contains_point(instance::Union{GskRoundedRect, Ref{_GskRoundedRect}}, _point::Union{GraphenePoint, Ref{_GraphenePoint}}) + function contains_point(instance::GskRoundedRectLike, _point::GraphenePointLike) ret = ccall(("gsk_rounded_rect_contains_point", libgtk4), Cint, (Ptr{_GskRoundedRect}, Ptr{_GraphenePoint}), instance, _point) ret2 = convert(Bool, ret) ret2 end - function contains_rect(instance::Union{GskRoundedRect, Ref{_GskRoundedRect}}, _rect::Union{GrapheneRect, Ref{_GrapheneRect}}) + function contains_rect(instance::GskRoundedRectLike, _rect::GrapheneRectLike) ret = ccall(("gsk_rounded_rect_contains_rect", libgtk4), Cint, (Ptr{_GskRoundedRect}, Ptr{_GrapheneRect}), instance, _rect) ret2 = convert(Bool, ret) ret2 end - function init(instance::Union{GskRoundedRect, Ref{_GskRoundedRect}}, _bounds::Union{GrapheneRect, Ref{_GrapheneRect}}, _top_left::Union{GrapheneSize, Ref{_GrapheneSize}}, _top_right::Union{GrapheneSize, Ref{_GrapheneSize}}, _bottom_right::Union{GrapheneSize, Ref{_GrapheneSize}}, _bottom_left::Union{GrapheneSize, Ref{_GrapheneSize}}) + function init(instance::GskRoundedRectLike, _bounds::GrapheneRectLike, _top_left::GrapheneSizeLike, _top_right::GrapheneSizeLike, _bottom_right::GrapheneSizeLike, _bottom_left::GrapheneSizeLike) ret = ccall(("gsk_rounded_rect_init", libgtk4), Ptr{_GskRoundedRect}, (Ptr{_GskRoundedRect}, Ptr{_GrapheneRect}, Ptr{_GrapheneSize}, Ptr{_GrapheneSize}, Ptr{_GrapheneSize}, Ptr{_GrapheneSize}), instance, _bounds, _top_left, _top_right, _bottom_right, _bottom_left) - ret2 = convert(Union{GskRoundedRect, Ref{_GskRoundedRect}}, ret) + ret2 = convert(GskRoundedRectLike, ret) ret2 end - function init_copy(instance::Union{GskRoundedRect, Ref{_GskRoundedRect}}, _src::Union{GskRoundedRect, Ref{_GskRoundedRect}}) + function init_copy(instance::GskRoundedRectLike, _src::GskRoundedRectLike) ret = ccall(("gsk_rounded_rect_init_copy", libgtk4), Ptr{_GskRoundedRect}, (Ptr{_GskRoundedRect}, Ptr{_GskRoundedRect}), instance, _src) - ret2 = convert(Union{GskRoundedRect, Ref{_GskRoundedRect}}, ret) + ret2 = convert(GskRoundedRectLike, ret) ret2 end - function init_from_rect(instance::Union{GskRoundedRect, Ref{_GskRoundedRect}}, _bounds::Union{GrapheneRect, Ref{_GrapheneRect}}, _radius::Real) + function init_from_rect(instance::GskRoundedRectLike, _bounds::GrapheneRectLike, _radius::Real) ret = ccall(("gsk_rounded_rect_init_from_rect", libgtk4), Ptr{_GskRoundedRect}, (Ptr{_GskRoundedRect}, Ptr{_GrapheneRect}, Float32), instance, _bounds, _radius) - ret2 = convert(Union{GskRoundedRect, Ref{_GskRoundedRect}}, ret) + ret2 = convert(GskRoundedRectLike, ret) ret2 end - function intersects_rect(instance::Union{GskRoundedRect, Ref{_GskRoundedRect}}, _rect::Union{GrapheneRect, Ref{_GrapheneRect}}) + function intersects_rect(instance::GskRoundedRectLike, _rect::GrapheneRectLike) ret = ccall(("gsk_rounded_rect_intersects_rect", libgtk4), Cint, (Ptr{_GskRoundedRect}, Ptr{_GrapheneRect}), instance, _rect) ret2 = convert(Bool, ret) ret2 end - function is_rectilinear(instance::Union{GskRoundedRect, Ref{_GskRoundedRect}}) + function is_rectilinear(instance::GskRoundedRectLike) ret = ccall(("gsk_rounded_rect_is_rectilinear", libgtk4), Cint, (Ptr{_GskRoundedRect},), instance) ret2 = convert(Bool, ret) ret2 end - function normalize(instance::Union{GskRoundedRect, Ref{_GskRoundedRect}}) + function normalize(instance::GskRoundedRectLike) ret = ccall(("gsk_rounded_rect_normalize", libgtk4), Ptr{_GskRoundedRect}, (Ptr{_GskRoundedRect},), instance) - ret2 = convert(Union{GskRoundedRect, Ref{_GskRoundedRect}}, ret) + ret2 = convert(GskRoundedRectLike, ret) ret2 end - function offset(instance::Union{GskRoundedRect, Ref{_GskRoundedRect}}, _dx::Real, _dy::Real) + function offset(instance::GskRoundedRectLike, _dx::Real, _dy::Real) ret = ccall(("gsk_rounded_rect_offset", libgtk4), Ptr{_GskRoundedRect}, (Ptr{_GskRoundedRect}, Float32, Float32), instance, _dx, _dy) - ret2 = convert(Union{GskRoundedRect, Ref{_GskRoundedRect}}, ret) + ret2 = convert(GskRoundedRectLike, ret) ret2 end - function shrink(instance::Union{GskRoundedRect, Ref{_GskRoundedRect}}, _top::Real, _right::Real, _bottom::Real, _left::Real) + function shrink(instance::GskRoundedRectLike, _top::Real, _right::Real, _bottom::Real, _left::Real) ret = ccall(("gsk_rounded_rect_shrink", libgtk4), Ptr{_GskRoundedRect}, (Ptr{_GskRoundedRect}, Float32, Float32, Float32, Float32), instance, _top, _right, _bottom, _left) - ret2 = convert(Union{GskRoundedRect, Ref{_GskRoundedRect}}, ret) + ret2 = convert(GskRoundedRectLike, ret) ret2 end function ShaderArgsBuilder_new(_shader::GskGLShader, _initial_values::Maybe(GBytes)) @@ -371,15 +371,15 @@ $(Expr(:toplevel, quote 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}}) + function set_vec2(instance::GskShaderArgsBuilder, _idx::Integer, _value::GrapheneVec2Like) 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}}) + function set_vec3(instance::GskShaderArgsBuilder, _idx::Integer, _value::GrapheneVec3Like) 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}}) + function set_vec4(instance::GskShaderArgsBuilder, _idx::Integer, _value::GrapheneVec4Like) ret = ccall(("gsk_shader_args_builder_set_vec4", libgtk4), Nothing, (Ptr{GskShaderArgsBuilder}, Int32, Ptr{_GrapheneVec4}), instance, _idx, _value) nothing end @@ -486,7 +486,7 @@ $(Expr(:toplevel, quote ret2 = convert_if_not_null(GskTransform, ret, true) ret2 end - function matrix(instance::GskTransform, _matrix::Union{GrapheneMatrix, Ref{_GrapheneMatrix}}) + function matrix(instance::GskTransform, _matrix::GrapheneMatrixLike) ret = ccall(("gsk_transform_matrix", libgtk4), Ptr{GskTransform}, (Ptr{GskTransform}, Ptr{_GrapheneMatrix}), instance, _matrix) ret2 = convert(GskTransform, ret, true) ret2 @@ -496,7 +496,7 @@ $(Expr(:toplevel, quote ret2 = convert(GskTransform, ret, true) ret2 end - function print(instance::GskTransform, _string::Union{GString, Ref{_GString}}) + function print(instance::GskTransform, _string::GStringLike) ret = ccall(("gsk_transform_print", libgtk4), Nothing, (Ptr{GskTransform}, Ptr{_GString}), instance, _string) nothing end @@ -510,7 +510,7 @@ $(Expr(:toplevel, quote ret2 = convert_if_not_null(GskTransform, ret, true) ret2 end - function rotate_3d(instance::GskTransform, _angle::Real, _axis::Union{GrapheneVec3, Ref{_GrapheneVec3}}) + function rotate_3d(instance::GskTransform, _angle::Real, _axis::GrapheneVec3Like) ret = ccall(("gsk_transform_rotate_3d", libgtk4), Ptr{GskTransform}, (Ptr{GskTransform}, Float32, Ptr{_GrapheneVec3}), instance, _angle, _axis) ret2 = convert_if_not_null(GskTransform, ret, true) ret2 @@ -601,24 +601,24 @@ $(Expr(:toplevel, quote ret2 = convert_if_not_null(GskTransform, ret, true) ret2 end - function transform_bounds(instance::GskTransform, _rect::Union{GrapheneRect, Ref{_GrapheneRect}}) + function transform_bounds(instance::GskTransform, _rect::GrapheneRectLike) m_out_rect = Ref{_GrapheneRect}() ret = ccall(("gsk_transform_transform_bounds", libgtk4), Nothing, (Ptr{GskTransform}, Ptr{_GrapheneRect}, Ptr{_GrapheneRect}), instance, _rect, m_out_rect) _out_rect = m_out_rect[] _out_rect end - function transform_point(instance::GskTransform, _point::Union{GraphenePoint, Ref{_GraphenePoint}}) + function transform_point(instance::GskTransform, _point::GraphenePointLike) m_out_point = Ref{_GraphenePoint}() ret = ccall(("gsk_transform_transform_point", libgtk4), Nothing, (Ptr{GskTransform}, Ptr{_GraphenePoint}, Ptr{_GraphenePoint}), instance, _point, m_out_point) _out_point = m_out_point[] _out_point end - function translate(instance::GskTransform, _point::Union{GraphenePoint, Ref{_GraphenePoint}}) + function translate(instance::GskTransform, _point::GraphenePointLike) ret = ccall(("gsk_transform_translate", libgtk4), Ptr{GskTransform}, (Ptr{GskTransform}, Ptr{_GraphenePoint}), instance, _point) ret2 = convert_if_not_null(GskTransform, ret, true) ret2 end - function translate_3d(instance::GskTransform, _point::Union{GraphenePoint3D, Ref{_GraphenePoint3D}}) + function translate_3d(instance::GskTransform, _point::GraphenePoint3DLike) ret = ccall(("gsk_transform_translate_3d", libgtk4), Ptr{GskTransform}, (Ptr{GskTransform}, Ptr{_GraphenePoint3D}), instance, _point) ret2 = convert_if_not_null(GskTransform, ret, true) ret2 @@ -661,7 +661,7 @@ $(Expr(:toplevel, quote ret = ccall(("gsk_blur_node_get_radius", libgtk4), Float32, (Ptr{GskRenderNode},), instance) ret end - function BorderNode_new(_outline::Union{GskRoundedRect, Ref{_GskRoundedRect}}, _border_width, _border_color) + function BorderNode_new(_outline::GskRoundedRectLike, _border_width, _border_color) _border_width_arr = convert(Vector{Float32}, _border_width) _border_color_arr = convert(Vector{_GdkRGBA}, _border_color) ret = ccall(("gsk_border_node_new", libgtk4), Ptr{GskRenderNode}, (Ptr{_GskRoundedRect}, Ptr{Float32}, Ptr{_GdkRGBA}), _outline, _border_width_arr, _border_color_arr) @@ -670,12 +670,12 @@ $(Expr(:toplevel, quote end function get_colors(instance::GskBorderNode) ret = ccall(("gsk_border_node_get_colors", libgtk4), Ptr{_GdkRGBA}, (Ptr{GskRenderNode},), instance) - ret2 = convert(Union{GdkRGBA, Ref{_GdkRGBA}}, ret, false) + ret2 = convert(GdkRGBALike, ret, false) ret2 end function get_outline(instance::GskBorderNode) ret = ccall(("gsk_border_node_get_outline", libgtk4), Ptr{_GskRoundedRect}, (Ptr{GskRenderNode},), instance) - ret2 = convert(Union{GskRoundedRect, Ref{_GskRoundedRect}}, ret) + ret2 = convert(GskRoundedRectLike, ret) ret2 end function get_widths(instance::GskBorderNode) @@ -687,7 +687,7 @@ $(Expr(:toplevel, quote ret2 = GskBroadwayRendererLeaf(ret, true) ret2 end - function CairoNode_new(_bounds::Union{GrapheneRect, Ref{_GrapheneRect}}) + function CairoNode_new(_bounds::GrapheneRectLike) ret = ccall(("gsk_cairo_node_new", libgtk4), Ptr{GskRenderNode}, (Ptr{_GrapheneRect},), _bounds) ret2 = convert(GskRenderNode, ret) ret2 @@ -707,7 +707,7 @@ $(Expr(:toplevel, quote ret2 = GskCairoRendererLeaf(ret, true) ret2 end - function ClipNode_new(_child::GskRenderNode, _clip::Union{GrapheneRect, Ref{_GrapheneRect}}) + function ClipNode_new(_child::GskRenderNode, _clip::GrapheneRectLike) ret = ccall(("gsk_clip_node_new", libgtk4), Ptr{GskRenderNode}, (Ptr{GskRenderNode}, Ptr{_GrapheneRect}), _child, _clip) ret2 = convert(GskRenderNode, ret) ret2 @@ -719,10 +719,10 @@ $(Expr(:toplevel, quote end function get_clip(instance::GskClipNode) ret = ccall(("gsk_clip_node_get_clip", libgtk4), Ptr{_GrapheneRect}, (Ptr{GskRenderNode},), instance) - ret2 = convert(Union{GrapheneRect, Ref{_GrapheneRect}}, ret, false) + ret2 = convert(GrapheneRectLike, ret, false) ret2 end - function ColorMatrixNode_new(_child::GskRenderNode, _color_matrix::Union{GrapheneMatrix, Ref{_GrapheneMatrix}}, _color_offset::Union{GrapheneVec4, Ref{_GrapheneVec4}}) + function ColorMatrixNode_new(_child::GskRenderNode, _color_matrix::GrapheneMatrixLike, _color_offset::GrapheneVec4Like) ret = ccall(("gsk_color_matrix_node_new", libgtk4), Ptr{GskRenderNode}, (Ptr{GskRenderNode}, Ptr{_GrapheneMatrix}, Ptr{_GrapheneVec4}), _child, _color_matrix, _color_offset) ret2 = convert(GskRenderNode, ret) ret2 @@ -734,25 +734,25 @@ $(Expr(:toplevel, quote end function get_color_matrix(instance::GskColorMatrixNode) ret = ccall(("gsk_color_matrix_node_get_color_matrix", libgtk4), Ptr{_GrapheneMatrix}, (Ptr{GskRenderNode},), instance) - ret2 = convert(Union{GrapheneMatrix, Ref{_GrapheneMatrix}}, ret, false) + ret2 = convert(GrapheneMatrixLike, ret, false) ret2 end function get_color_offset(instance::GskColorMatrixNode) ret = ccall(("gsk_color_matrix_node_get_color_offset", libgtk4), Ptr{_GrapheneVec4}, (Ptr{GskRenderNode},), instance) - ret2 = convert(Union{GrapheneVec4, Ref{_GrapheneVec4}}, ret, false) + ret2 = convert(GrapheneVec4Like, ret, false) ret2 end - function ColorNode_new(_rgba::Union{GdkRGBA, Ref{_GdkRGBA}}, _bounds::Union{GrapheneRect, Ref{_GrapheneRect}}) + function ColorNode_new(_rgba::GdkRGBALike, _bounds::GrapheneRectLike) ret = ccall(("gsk_color_node_new", libgtk4), Ptr{GskRenderNode}, (Ptr{_GdkRGBA}, Ptr{_GrapheneRect}), _rgba, _bounds) ret2 = convert(GskRenderNode, ret) ret2 end function get_color(instance::GskColorNode) ret = ccall(("gsk_color_node_get_color", libgtk4), Ptr{_GdkRGBA}, (Ptr{GskRenderNode},), instance) - ret2 = convert(Union{GdkRGBA, Ref{_GdkRGBA}}, ret, false) + ret2 = convert(GdkRGBALike, ret, false) ret2 end - function ConicGradientNode_new(_bounds::Union{GrapheneRect, Ref{_GrapheneRect}}, _center::Union{GraphenePoint, Ref{_GraphenePoint}}, _rotation::Real, _color_stops) + function ConicGradientNode_new(_bounds::GrapheneRectLike, _center::GraphenePointLike, _rotation::Real, _color_stops) _color_stops_arr = convert(Vector{_GskColorStop}, _color_stops) _n_color_stops = length(_color_stops) ret = ccall(("gsk_conic_gradient_node_new", libgtk4), Ptr{GskRenderNode}, (Ptr{_GrapheneRect}, Ptr{_GraphenePoint}, Float32, Ptr{_GskColorStop}, UInt64), _bounds, _center, _rotation, _color_stops_arr, _n_color_stops) @@ -765,7 +765,7 @@ $(Expr(:toplevel, quote end function get_center(instance::GskConicGradientNode) ret = ccall(("gsk_conic_gradient_node_get_center", libgtk4), Ptr{_GraphenePoint}, (Ptr{GskRenderNode},), instance) - ret2 = convert(Union{GraphenePoint, Ref{_GraphenePoint}}, ret, false) + ret2 = convert(GraphenePointLike, ret, false) ret2 end function get_color_stops(instance::GskConicGradientNode) @@ -896,15 +896,15 @@ $(Expr(:toplevel, quote ret = ccall(("gsk_gl_shader_get_arg_uint", libgtk4), UInt32, (Ptr{GObject}, Ptr{GBytes}, Int32), instance, _args, _idx) ret end - function get_arg_vec2(instance::GskGLShader, _args::GBytes, _idx::Integer, _out_value::Union{GrapheneVec2, Ref{_GrapheneVec2}}) + function get_arg_vec2(instance::GskGLShader, _args::GBytes, _idx::Integer, _out_value::GrapheneVec2Like) ret = ccall(("gsk_gl_shader_get_arg_vec2", libgtk4), Nothing, (Ptr{GObject}, Ptr{GBytes}, Int32, Ptr{_GrapheneVec2}), instance, _args, _idx, _out_value) nothing end - function get_arg_vec3(instance::GskGLShader, _args::GBytes, _idx::Integer, _out_value::Union{GrapheneVec3, Ref{_GrapheneVec3}}) + function get_arg_vec3(instance::GskGLShader, _args::GBytes, _idx::Integer, _out_value::GrapheneVec3Like) ret = ccall(("gsk_gl_shader_get_arg_vec3", libgtk4), Nothing, (Ptr{GObject}, Ptr{GBytes}, Int32, Ptr{_GrapheneVec3}), instance, _args, _idx, _out_value) nothing end - function get_arg_vec4(instance::GskGLShader, _args::GBytes, _idx::Integer, _out_value::Union{GrapheneVec4, Ref{_GrapheneVec4}}) + function get_arg_vec4(instance::GskGLShader, _args::GBytes, _idx::Integer, _out_value::GrapheneVec4Like) ret = ccall(("gsk_gl_shader_get_arg_vec4", libgtk4), Nothing, (Ptr{GObject}, Ptr{GBytes}, Int32, Ptr{_GrapheneVec4}), instance, _args, _idx, _out_value) nothing end @@ -944,7 +944,7 @@ $(Expr(:toplevel, quote ret2 = GLUniformType(ret) ret2 end - function GLShaderNode_new(_shader::GskGLShader, _bounds::Union{GrapheneRect, Ref{_GrapheneRect}}, _args::GBytes, _children) + function GLShaderNode_new(_shader::GskGLShader, _bounds::GrapheneRectLike, _args::GBytes, _children) _children_arr = convert(Vector{Ptr{GskRenderNode}}, _children) _n_children = length(_children) ret = ccall(("gsk_gl_shader_node_new", libgtk4), Ptr{GskRenderNode}, (Ptr{GObject}, Ptr{_GrapheneRect}, Ptr{GBytes}, Ptr{Ptr{GskRenderNode}}, UInt32), _shader, _bounds, _args, _children_arr, _n_children) @@ -970,7 +970,7 @@ $(Expr(:toplevel, quote ret2 = convert(GskGLShader, ret, false) ret2 end - function InsetShadowNode_new(_outline::Union{GskRoundedRect, Ref{_GskRoundedRect}}, _color::Union{GdkRGBA, Ref{_GdkRGBA}}, _dx::Real, _dy::Real, _spread::Real, _blur_radius::Real) + function InsetShadowNode_new(_outline::GskRoundedRectLike, _color::GdkRGBALike, _dx::Real, _dy::Real, _spread::Real, _blur_radius::Real) ret = ccall(("gsk_inset_shadow_node_new", libgtk4), Ptr{GskRenderNode}, (Ptr{_GskRoundedRect}, Ptr{_GdkRGBA}, Float32, Float32, Float32, Float32), _outline, _color, _dx, _dy, _spread, _blur_radius) ret2 = convert(GskRenderNode, ret) ret2 @@ -981,7 +981,7 @@ $(Expr(:toplevel, quote end function get_color(instance::GskInsetShadowNode) ret = ccall(("gsk_inset_shadow_node_get_color", libgtk4), Ptr{_GdkRGBA}, (Ptr{GskRenderNode},), instance) - ret2 = convert(Union{GdkRGBA, Ref{_GdkRGBA}}, ret, false) + ret2 = convert(GdkRGBALike, ret, false) ret2 end function get_dx(instance::GskInsetShadowNode) @@ -994,14 +994,14 @@ $(Expr(:toplevel, quote end function get_outline(instance::GskInsetShadowNode) ret = ccall(("gsk_inset_shadow_node_get_outline", libgtk4), Ptr{_GskRoundedRect}, (Ptr{GskRenderNode},), instance) - ret2 = convert(Union{GskRoundedRect, Ref{_GskRoundedRect}}, ret) + ret2 = convert(GskRoundedRectLike, ret) ret2 end function get_spread(instance::GskInsetShadowNode) ret = ccall(("gsk_inset_shadow_node_get_spread", libgtk4), Float32, (Ptr{GskRenderNode},), instance) ret end - function LinearGradientNode_new(_bounds::Union{GrapheneRect, Ref{_GrapheneRect}}, _start::Union{GraphenePoint, Ref{_GraphenePoint}}, _end::Union{GraphenePoint, Ref{_GraphenePoint}}, _color_stops) + function LinearGradientNode_new(_bounds::GrapheneRectLike, _start::GraphenePointLike, _end::GraphenePointLike, _color_stops) _color_stops_arr = convert(Vector{_GskColorStop}, _color_stops) _n_color_stops = length(_color_stops) ret = ccall(("gsk_linear_gradient_node_new", libgtk4), Ptr{GskRenderNode}, (Ptr{_GrapheneRect}, Ptr{_GraphenePoint}, Ptr{_GraphenePoint}, Ptr{_GskColorStop}, UInt64), _bounds, _start, _end, _color_stops_arr, _n_color_stops) @@ -1017,7 +1017,7 @@ $(Expr(:toplevel, quote end function get_end(instance::GskLinearGradientNode) ret = ccall(("gsk_linear_gradient_node_get_end", libgtk4), Ptr{_GraphenePoint}, (Ptr{GskRenderNode},), instance) - ret2 = convert(Union{GraphenePoint, Ref{_GraphenePoint}}, ret, false) + ret2 = convert(GraphenePointLike, ret, false) ret2 end function get_n_color_stops(instance::GskLinearGradientNode) @@ -1026,7 +1026,7 @@ $(Expr(:toplevel, quote end function get_start(instance::GskLinearGradientNode) ret = ccall(("gsk_linear_gradient_node_get_start", libgtk4), Ptr{_GraphenePoint}, (Ptr{GskRenderNode},), instance) - ret2 = convert(Union{GraphenePoint, Ref{_GraphenePoint}}, ret, false) + ret2 = convert(GraphenePointLike, ret, false) ret2 end function MaskNode_new(_source::GskRenderNode, _mask::GskRenderNode, _mask_mode) @@ -1068,7 +1068,7 @@ $(Expr(:toplevel, quote ret = ccall(("gsk_opacity_node_get_opacity", libgtk4), Float32, (Ptr{GskRenderNode},), instance) ret end - function OutsetShadowNode_new(_outline::Union{GskRoundedRect, Ref{_GskRoundedRect}}, _color::Union{GdkRGBA, Ref{_GdkRGBA}}, _dx::Real, _dy::Real, _spread::Real, _blur_radius::Real) + function OutsetShadowNode_new(_outline::GskRoundedRectLike, _color::GdkRGBALike, _dx::Real, _dy::Real, _spread::Real, _blur_radius::Real) ret = ccall(("gsk_outset_shadow_node_new", libgtk4), Ptr{GskRenderNode}, (Ptr{_GskRoundedRect}, Ptr{_GdkRGBA}, Float32, Float32, Float32, Float32), _outline, _color, _dx, _dy, _spread, _blur_radius) ret2 = convert(GskRenderNode, ret) ret2 @@ -1079,7 +1079,7 @@ $(Expr(:toplevel, quote end function get_color(instance::GskOutsetShadowNode) ret = ccall(("gsk_outset_shadow_node_get_color", libgtk4), Ptr{_GdkRGBA}, (Ptr{GskRenderNode},), instance) - ret2 = convert(Union{GdkRGBA, Ref{_GdkRGBA}}, ret, false) + ret2 = convert(GdkRGBALike, ret, false) ret2 end function get_dx(instance::GskOutsetShadowNode) @@ -1092,14 +1092,14 @@ $(Expr(:toplevel, quote end function get_outline(instance::GskOutsetShadowNode) ret = ccall(("gsk_outset_shadow_node_get_outline", libgtk4), Ptr{_GskRoundedRect}, (Ptr{GskRenderNode},), instance) - ret2 = convert(Union{GskRoundedRect, Ref{_GskRoundedRect}}, ret) + ret2 = convert(GskRoundedRectLike, ret) ret2 end function get_spread(instance::GskOutsetShadowNode) ret = ccall(("gsk_outset_shadow_node_get_spread", libgtk4), Float32, (Ptr{GskRenderNode},), instance) ret end - function RadialGradientNode_new(_bounds::Union{GrapheneRect, Ref{_GrapheneRect}}, _center::Union{GraphenePoint, Ref{_GraphenePoint}}, _hradius::Real, _vradius::Real, _start::Real, _end::Real, _color_stops) + function RadialGradientNode_new(_bounds::GrapheneRectLike, _center::GraphenePointLike, _hradius::Real, _vradius::Real, _start::Real, _end::Real, _color_stops) _color_stops_arr = convert(Vector{_GskColorStop}, _color_stops) _n_color_stops = length(_color_stops) ret = ccall(("gsk_radial_gradient_node_new", libgtk4), Ptr{GskRenderNode}, (Ptr{_GrapheneRect}, Ptr{_GraphenePoint}, Float32, Float32, Float32, Float32, Ptr{_GskColorStop}, UInt64), _bounds, _center, _hradius, _vradius, _start, _end, _color_stops_arr, _n_color_stops) @@ -1108,7 +1108,7 @@ $(Expr(:toplevel, quote end function get_center(instance::GskRadialGradientNode) ret = ccall(("gsk_radial_gradient_node_get_center", libgtk4), Ptr{_GraphenePoint}, (Ptr{GskRenderNode},), instance) - ret2 = convert(Union{GraphenePoint, Ref{_GraphenePoint}}, ret, false) + ret2 = convert(GraphenePointLike, ret, false) ret2 end function get_color_stops(instance::GskRadialGradientNode) @@ -1224,7 +1224,7 @@ $(Expr(:toplevel, quote ret = ccall(("gsk_renderer_render", libgtk4), Nothing, (Ptr{GObject}, Ptr{GskRenderNode}, Ptr{cairoRegion}), instance, _root, _region_maybe) nothing end - function render_texture(instance::GskRenderer, _root::GskRenderNode, _viewport::Maybe(Union{GrapheneRect, Ref{_GrapheneRect}})) + function render_texture(instance::GskRenderer, _root::GskRenderNode, _viewport::Maybe(GrapheneRectLike)) _viewport_maybe = nothing_to_null(_viewport) ret = ccall(("gsk_renderer_render_texture", libgtk4), Ptr{GObject}, (Ptr{GObject}, Ptr{GskRenderNode}, Ptr{_GrapheneRect}), instance, _root, _viewport_maybe) ret2 = convert(GdkTexture, ret, true) @@ -1234,7 +1234,7 @@ $(Expr(:toplevel, quote ret = ccall(("gsk_renderer_unrealize", libgtk4), Nothing, (Ptr{GObject},), instance) nothing end - function RepeatNode_new(_bounds::Union{GrapheneRect, Ref{_GrapheneRect}}, _child::GskRenderNode, _child_bounds::Maybe(Union{GrapheneRect, Ref{_GrapheneRect}})) + function RepeatNode_new(_bounds::GrapheneRectLike, _child::GskRenderNode, _child_bounds::Maybe(GrapheneRectLike)) _child_bounds_maybe = nothing_to_null(_child_bounds) ret = ccall(("gsk_repeat_node_new", libgtk4), Ptr{GskRenderNode}, (Ptr{_GrapheneRect}, Ptr{GskRenderNode}, Ptr{_GrapheneRect}), _bounds, _child, _child_bounds_maybe) ret2 = convert(GskRenderNode, ret) @@ -1247,24 +1247,24 @@ $(Expr(:toplevel, quote end function get_child_bounds(instance::GskRepeatNode) ret = ccall(("gsk_repeat_node_get_child_bounds", libgtk4), Ptr{_GrapheneRect}, (Ptr{GskRenderNode},), instance) - ret2 = convert(Union{GrapheneRect, Ref{_GrapheneRect}}, ret, false) + ret2 = convert(GrapheneRectLike, ret, false) ret2 end - function RepeatingLinearGradientNode_new(_bounds::Union{GrapheneRect, Ref{_GrapheneRect}}, _start::Union{GraphenePoint, Ref{_GraphenePoint}}, _end::Union{GraphenePoint, Ref{_GraphenePoint}}, _color_stops) + function RepeatingLinearGradientNode_new(_bounds::GrapheneRectLike, _start::GraphenePointLike, _end::GraphenePointLike, _color_stops) _color_stops_arr = convert(Vector{_GskColorStop}, _color_stops) _n_color_stops = length(_color_stops) ret = ccall(("gsk_repeating_linear_gradient_node_new", libgtk4), Ptr{GskRenderNode}, (Ptr{_GrapheneRect}, Ptr{_GraphenePoint}, Ptr{_GraphenePoint}, Ptr{_GskColorStop}, UInt64), _bounds, _start, _end, _color_stops_arr, _n_color_stops) ret2 = convert(GskRenderNode, ret) ret2 end - function RepeatingRadialGradientNode_new(_bounds::Union{GrapheneRect, Ref{_GrapheneRect}}, _center::Union{GraphenePoint, Ref{_GraphenePoint}}, _hradius::Real, _vradius::Real, _start::Real, _end::Real, _color_stops) + function RepeatingRadialGradientNode_new(_bounds::GrapheneRectLike, _center::GraphenePointLike, _hradius::Real, _vradius::Real, _start::Real, _end::Real, _color_stops) _color_stops_arr = convert(Vector{_GskColorStop}, _color_stops) _n_color_stops = length(_color_stops) ret = ccall(("gsk_repeating_radial_gradient_node_new", libgtk4), Ptr{GskRenderNode}, (Ptr{_GrapheneRect}, Ptr{_GraphenePoint}, Float32, Float32, Float32, Float32, Ptr{_GskColorStop}, UInt64), _bounds, _center, _hradius, _vradius, _start, _end, _color_stops_arr, _n_color_stops) ret2 = convert(GskRenderNode, ret) ret2 end - function RoundedClipNode_new(_child::GskRenderNode, _clip::Union{GskRoundedRect, Ref{_GskRoundedRect}}) + function RoundedClipNode_new(_child::GskRenderNode, _clip::GskRoundedRectLike) ret = ccall(("gsk_rounded_clip_node_new", libgtk4), Ptr{GskRenderNode}, (Ptr{GskRenderNode}, Ptr{_GskRoundedRect}), _child, _clip) ret2 = convert(GskRenderNode, ret) ret2 @@ -1276,7 +1276,7 @@ $(Expr(:toplevel, quote end function get_clip(instance::GskRoundedClipNode) ret = ccall(("gsk_rounded_clip_node_get_clip", libgtk4), Ptr{_GskRoundedRect}, (Ptr{GskRenderNode},), instance) - ret2 = convert(Union{GskRoundedRect, Ref{_GskRoundedRect}}, ret) + ret2 = convert(GskRoundedRectLike, ret) ret2 end function ShadowNode_new(_child::GskRenderNode, _shadows) @@ -1297,7 +1297,7 @@ $(Expr(:toplevel, quote end function get_shadow(instance::GskShadowNode, _i::Integer) ret = ccall(("gsk_shadow_node_get_shadow", libgtk4), Ptr{_GskShadow}, (Ptr{GskRenderNode}, UInt64), instance, _i) - ret2 = convert(Union{GskShadow, Ref{_GskShadow}}, ret) + ret2 = convert(GskShadowLike, ret) ret2 end function StrokeNode_new(_child::GskRenderNode, _path::GskPath, _stroke::GskStroke) @@ -1325,14 +1325,14 @@ $(Expr(:toplevel, quote ret2 = convert(GskRenderNode, ret) ret2 end - function TextNode_new(_font::PangoFont, _glyphs::Union{PangoGlyphString, Ref{_PangoGlyphString}}, _color::Union{GdkRGBA, Ref{_GdkRGBA}}, _offset::Union{GraphenePoint, Ref{_GraphenePoint}}) + function TextNode_new(_font::PangoFont, _glyphs::PangoGlyphStringLike, _color::GdkRGBALike, _offset::GraphenePointLike) ret = ccall(("gsk_text_node_new", libgtk4), Ptr{GskRenderNode}, (Ptr{GObject}, Ptr{_PangoGlyphString}, Ptr{_GdkRGBA}, Ptr{_GraphenePoint}), _font, _glyphs, _color, _offset) ret2 = convert(GskRenderNode, ret) ret2 end function get_color(instance::GskTextNode) ret = ccall(("gsk_text_node_get_color", libgtk4), Ptr{_GdkRGBA}, (Ptr{GskRenderNode},), instance) - ret2 = convert(Union{GdkRGBA, Ref{_GdkRGBA}}, ret, false) + ret2 = convert(GdkRGBALike, ret, false) ret2 end function get_font(instance::GskTextNode) @@ -1353,7 +1353,7 @@ $(Expr(:toplevel, quote end function get_offset(instance::GskTextNode) ret = ccall(("gsk_text_node_get_offset", libgtk4), Ptr{_GraphenePoint}, (Ptr{GskRenderNode},), instance) - ret2 = convert(Union{GraphenePoint, Ref{_GraphenePoint}}, ret, false) + ret2 = convert(GraphenePointLike, ret, false) ret2 end function has_color_glyphs(instance::GskTextNode) @@ -1361,7 +1361,7 @@ $(Expr(:toplevel, quote ret2 = convert(Bool, ret) ret2 end - function TextureNode_new(_texture::GdkTexture, _bounds::Union{GrapheneRect, Ref{_GrapheneRect}}) + function TextureNode_new(_texture::GdkTexture, _bounds::GrapheneRectLike) ret = ccall(("gsk_texture_node_new", libgtk4), Ptr{GskRenderNode}, (Ptr{GObject}, Ptr{_GrapheneRect}), _texture, _bounds) ret2 = convert(GskRenderNode, ret) ret2 @@ -1371,7 +1371,7 @@ $(Expr(:toplevel, quote ret2 = convert(GdkTexture, ret, false) ret2 end - function TextureScaleNode_new(_texture::GdkTexture, _bounds::Union{GrapheneRect, Ref{_GrapheneRect}}, _filter) + function TextureScaleNode_new(_texture::GdkTexture, _bounds::GrapheneRectLike, _filter) ret = ccall(("gsk_texture_scale_node_new", libgtk4), Ptr{GskRenderNode}, (Ptr{GObject}, Ptr{_GrapheneRect}, UInt32), _texture, _bounds, _filter) ret2 = convert(GskRenderNode, ret) ret2 diff --git a/src/gen/gsk4_structs b/src/gen/gsk4_structs index b7f20c2e..c48e7199 100644 --- a/src/gen/gsk4_structs +++ b/src/gen/gsk4_structs @@ -8,9 +8,15 @@ $(Expr(:toplevel, quote mutable struct GskColorStop handle::Ptr{_GskColorStop} end - unsafe_convert(::Type{Ptr{_GskColorStop}}, box::GskColorStop) = begin - convert(Ptr{_GskColorStop}, box.handle) - end + begin + unsafe_convert(::Type{Ptr{_GskColorStop}}, box::GskColorStop) = begin + convert(Ptr{_GskColorStop}, box.handle) + end + convert(::Type{GskColorStop}, p::Ptr{_GskColorStop}, owns = false) = begin + GskColorStop(p, owns) + end + const GskColorStopLike = Union{Ref{_GskColorStop}, GskColorStop} + end end begin struct _GskParseLocation @@ -23,105 +29,127 @@ $(Expr(:toplevel, quote mutable struct GskParseLocation handle::Ptr{_GskParseLocation} end - unsafe_convert(::Type{Ptr{_GskParseLocation}}, box::GskParseLocation) = begin - convert(Ptr{_GskParseLocation}, box.handle) - end - end - mutable struct GskPath <: GBoxed - handle::Ptr{GskPath} begin - (GLib.g_type(::Type{T}) where T <: GskPath) = begin - ccall(("gsk_path_get_type", libgtk4), GType, ()) + unsafe_convert(::Type{Ptr{_GskParseLocation}}, box::GskParseLocation) = begin + convert(Ptr{_GskParseLocation}, box.handle) + end + convert(::Type{GskParseLocation}, p::Ptr{_GskParseLocation}, owns = false) = begin + GskParseLocation(p, owns) end - function GskPath(ref::Ptr{T}, own::Bool = false) where T <: GBoxed - x = new(ref) - if own - finalizer(x) do x - GLib.delboxed(x) + const GskParseLocationLike = Union{Ref{_GskParseLocation}, GskParseLocation} + end + end + begin + mutable struct GskPath <: GBoxed + handle::Ptr{GskPath} + begin + (GLib.g_type(::Type{T}) where T <: GskPath) = begin + ccall(("gsk_path_get_type", libgtk4), GType, ()) + end + function GskPath(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 - x + push!(gboxed_types, GskPath) end - push!(gboxed_types, GskPath) end + const GskPathLike = GskPath end - mutable struct GskPathBuilder <: GBoxed - handle::Ptr{GskPathBuilder} - begin - (GLib.g_type(::Type{T}) where T <: GskPathBuilder) = begin - ccall(("gsk_path_builder_get_type", libgtk4), GType, ()) - end - function GskPathBuilder(ref::Ptr{T}, own::Bool = false) where T <: GBoxed - x = new(ref) - if own - finalizer(x) do x - GLib.delboxed(x) + begin + mutable struct GskPathBuilder <: GBoxed + handle::Ptr{GskPathBuilder} + begin + (GLib.g_type(::Type{T}) where T <: GskPathBuilder) = begin + ccall(("gsk_path_builder_get_type", libgtk4), GType, ()) end + function GskPathBuilder(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 - x + push!(gboxed_types, GskPathBuilder) end - push!(gboxed_types, GskPathBuilder) end + const GskPathBuilderLike = GskPathBuilder end - mutable struct GskPathMeasure <: GBoxed - handle::Ptr{GskPathMeasure} - begin - (GLib.g_type(::Type{T}) where T <: GskPathMeasure) = begin - ccall(("gsk_path_measure_get_type", libgtk4), GType, ()) - end - function GskPathMeasure(ref::Ptr{T}, own::Bool = false) where T <: GBoxed - x = new(ref) - if own - finalizer(x) do x - GLib.delboxed(x) + begin + mutable struct GskPathMeasure <: GBoxed + handle::Ptr{GskPathMeasure} + begin + (GLib.g_type(::Type{T}) where T <: GskPathMeasure) = begin + ccall(("gsk_path_measure_get_type", libgtk4), GType, ()) + end + function GskPathMeasure(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 - x + push!(gboxed_types, GskPathMeasure) end - push!(gboxed_types, GskPathMeasure) end + const GskPathMeasureLike = GskPathMeasure end - mutable struct GskPathPoint <: GBoxed - handle::Ptr{GskPathPoint} - begin - (GLib.g_type(::Type{T}) where T <: GskPathPoint) = begin - ccall(("gsk_path_point_get_type", libgtk4), GType, ()) - end - function GskPathPoint(ref::Ptr{T}, own::Bool = false) where T <: GBoxed - x = new(ref) - if own - finalizer(x) do x - GLib.delboxed(x) + begin + mutable struct GskPathPoint <: GBoxed + handle::Ptr{GskPathPoint} + begin + (GLib.g_type(::Type{T}) where T <: GskPathPoint) = begin + ccall(("gsk_path_point_get_type", libgtk4), GType, ()) end + function GskPathPoint(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 - x + push!(gboxed_types, GskPathPoint) end - push!(gboxed_types, GskPathPoint) end + const GskPathPointLike = GskPathPoint end begin mutable struct GskRoundedRect handle::Ptr{GskRoundedRect} end + const GskRoundedRectLike = GskRoundedRect 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) + begin + 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 - x + push!(gboxed_types, GskShaderArgsBuilder) end - push!(gboxed_types, GskShaderArgsBuilder) end + const GskShaderArgsBuilderLike = GskShaderArgsBuilder end begin struct _GskShadow @@ -133,45 +161,57 @@ $(Expr(:toplevel, quote mutable struct GskShadow handle::Ptr{_GskShadow} end - unsafe_convert(::Type{Ptr{_GskShadow}}, box::GskShadow) = begin - convert(Ptr{_GskShadow}, box.handle) - end - end - mutable struct GskStroke <: GBoxed - handle::Ptr{GskStroke} begin - (GLib.g_type(::Type{T}) where T <: GskStroke) = begin - ccall(("gsk_stroke_get_type", libgtk4), GType, ()) + unsafe_convert(::Type{Ptr{_GskShadow}}, box::GskShadow) = begin + convert(Ptr{_GskShadow}, box.handle) end - function GskStroke(ref::Ptr{T}, own::Bool = false) where T <: GBoxed - x = new(ref) - if own - finalizer(x) do x - GLib.delboxed(x) + convert(::Type{GskShadow}, p::Ptr{_GskShadow}, owns = false) = begin + GskShadow(p, owns) + end + const GskShadowLike = Union{Ref{_GskShadow}, GskShadow} + end + end + begin + mutable struct GskStroke <: GBoxed + handle::Ptr{GskStroke} + begin + (GLib.g_type(::Type{T}) where T <: GskStroke) = begin + ccall(("gsk_stroke_get_type", libgtk4), GType, ()) + end + function GskStroke(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 - x + push!(gboxed_types, GskStroke) end - push!(gboxed_types, GskStroke) end + const GskStrokeLike = GskStroke end - mutable struct GskTransform <: GBoxed - handle::Ptr{GskTransform} - begin - (GLib.g_type(::Type{T}) where T <: GskTransform) = begin - ccall(("gsk_transform_get_type", libgtk4), GType, ()) - end - function GskTransform(ref::Ptr{T}, own::Bool = false) where T <: GBoxed - x = new(ref) - if own - finalizer(x) do x - GLib.delboxed(x) + begin + mutable struct GskTransform <: GBoxed + handle::Ptr{GskTransform} + begin + (GLib.g_type(::Type{T}) where T <: GskTransform) = begin + ccall(("gsk_transform_get_type", libgtk4), GType, ()) + end + function GskTransform(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 - x + push!(gboxed_types, GskTransform) end - push!(gboxed_types, GskTransform) end + const GskTransformLike = GskTransform 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 @@ -598,28 +638,28 @@ $(Expr(:toplevel, quote function GskBlurNode(_child::GskRenderNode, _radius::Real) G_.BlurNode_new(_child, _radius) end - function GskBorderNode(_outline::Union{GskRoundedRect, Ref{_GskRoundedRect}}, _border_width, _border_color) + function GskBorderNode(_outline::GskRoundedRectLike, _border_width, _border_color) G_.BorderNode_new(_outline, _border_width, _border_color) end function GskBroadwayRenderer() G_.BroadwayRenderer_new() end - function GskCairoNode(_bounds::Union{GrapheneRect, Ref{_GrapheneRect}}) + function GskCairoNode(_bounds::GrapheneRectLike) G_.CairoNode_new(_bounds) end function GskCairoRenderer() G_.CairoRenderer_new() end - function GskClipNode(_child::GskRenderNode, _clip::Union{GrapheneRect, Ref{_GrapheneRect}}) + function GskClipNode(_child::GskRenderNode, _clip::GrapheneRectLike) G_.ClipNode_new(_child, _clip) end - function GskColorMatrixNode(_child::GskRenderNode, _color_matrix::Union{GrapheneMatrix, Ref{_GrapheneMatrix}}, _color_offset::Union{GrapheneVec4, Ref{_GrapheneVec4}}) + function GskColorMatrixNode(_child::GskRenderNode, _color_matrix::GrapheneMatrixLike, _color_offset::GrapheneVec4Like) G_.ColorMatrixNode_new(_child, _color_matrix, _color_offset) end - function GskColorNode(_rgba::Union{GdkRGBA, Ref{_GdkRGBA}}, _bounds::Union{GrapheneRect, Ref{_GrapheneRect}}) + function GskColorNode(_rgba::GdkRGBALike, _bounds::GrapheneRectLike) G_.ColorNode_new(_rgba, _bounds) end - function GskConicGradientNode(_bounds::Union{GrapheneRect, Ref{_GrapheneRect}}, _center::Union{GraphenePoint, Ref{_GraphenePoint}}, _rotation::Real, _color_stops) + function GskConicGradientNode(_bounds::GrapheneRectLike, _center::GraphenePointLike, _rotation::Real, _color_stops) G_.ConicGradientNode_new(_bounds, _center, _rotation, _color_stops) end function GskContainerNode(_children) @@ -647,13 +687,13 @@ $(Expr(:toplevel, quote GLib.setproperties!(obj; kwargs...) obj end - function GskGLShaderNode(_shader::GskGLShader, _bounds::Union{GrapheneRect, Ref{_GrapheneRect}}, _args::GBytes, _children) + function GskGLShaderNode(_shader::GskGLShader, _bounds::GrapheneRectLike, _args::GBytes, _children) G_.GLShaderNode_new(_shader, _bounds, _args, _children) end - function GskInsetShadowNode(_outline::Union{GskRoundedRect, Ref{_GskRoundedRect}}, _color::Union{GdkRGBA, Ref{_GdkRGBA}}, _dx::Real, _dy::Real, _spread::Real, _blur_radius::Real) + function GskInsetShadowNode(_outline::GskRoundedRectLike, _color::GdkRGBALike, _dx::Real, _dy::Real, _spread::Real, _blur_radius::Real) G_.InsetShadowNode_new(_outline, _color, _dx, _dy, _spread, _blur_radius) end - function GskLinearGradientNode(_bounds::Union{GrapheneRect, Ref{_GrapheneRect}}, _start::Union{GraphenePoint, Ref{_GraphenePoint}}, _end::Union{GraphenePoint, Ref{_GraphenePoint}}, _color_stops) + function GskLinearGradientNode(_bounds::GrapheneRectLike, _start::GraphenePointLike, _end::GraphenePointLike, _color_stops) G_.LinearGradientNode_new(_bounds, _start, _end, _color_stops) end function GskMaskNode(_source::GskRenderNode, _mask::GskRenderNode, _mask_mode) @@ -665,10 +705,10 @@ $(Expr(:toplevel, quote function GskOpacityNode(_child::GskRenderNode, _opacity::Real) G_.OpacityNode_new(_child, _opacity) end - function GskOutsetShadowNode(_outline::Union{GskRoundedRect, Ref{_GskRoundedRect}}, _color::Union{GdkRGBA, Ref{_GdkRGBA}}, _dx::Real, _dy::Real, _spread::Real, _blur_radius::Real) + function GskOutsetShadowNode(_outline::GskRoundedRectLike, _color::GdkRGBALike, _dx::Real, _dy::Real, _spread::Real, _blur_radius::Real) G_.OutsetShadowNode_new(_outline, _color, _dx, _dy, _spread, _blur_radius) end - function GskRadialGradientNode(_bounds::Union{GrapheneRect, Ref{_GrapheneRect}}, _center::Union{GraphenePoint, Ref{_GraphenePoint}}, _hradius::Real, _vradius::Real, _start::Real, _end::Real, _color_stops) + function GskRadialGradientNode(_bounds::GrapheneRectLike, _center::GraphenePointLike, _hradius::Real, _vradius::Real, _start::Real, _end::Real, _color_stops) G_.RadialGradientNode_new(_bounds, _center, _hradius, _vradius, _start, _end, _color_stops) end function GskRenderer(_surface::GdkSurface; kwargs...) @@ -676,16 +716,16 @@ $(Expr(:toplevel, quote GLib.setproperties!(obj; kwargs...) obj end - function GskRepeatNode(_bounds::Union{GrapheneRect, Ref{_GrapheneRect}}, _child::GskRenderNode, _child_bounds::Maybe(Union{GrapheneRect, Ref{_GrapheneRect}})) + function GskRepeatNode(_bounds::GrapheneRectLike, _child::GskRenderNode, _child_bounds::Maybe(GrapheneRectLike)) G_.RepeatNode_new(_bounds, _child, _child_bounds) end - function GskRepeatingLinearGradientNode(_bounds::Union{GrapheneRect, Ref{_GrapheneRect}}, _start::Union{GraphenePoint, Ref{_GraphenePoint}}, _end::Union{GraphenePoint, Ref{_GraphenePoint}}, _color_stops) + function GskRepeatingLinearGradientNode(_bounds::GrapheneRectLike, _start::GraphenePointLike, _end::GraphenePointLike, _color_stops) G_.RepeatingLinearGradientNode_new(_bounds, _start, _end, _color_stops) end - function GskRepeatingRadialGradientNode(_bounds::Union{GrapheneRect, Ref{_GrapheneRect}}, _center::Union{GraphenePoint, Ref{_GraphenePoint}}, _hradius::Real, _vradius::Real, _start::Real, _end::Real, _color_stops) + function GskRepeatingRadialGradientNode(_bounds::GrapheneRectLike, _center::GraphenePointLike, _hradius::Real, _vradius::Real, _start::Real, _end::Real, _color_stops) G_.RepeatingRadialGradientNode_new(_bounds, _center, _hradius, _vradius, _start, _end, _color_stops) end - function GskRoundedClipNode(_child::GskRenderNode, _clip::Union{GskRoundedRect, Ref{_GskRoundedRect}}) + function GskRoundedClipNode(_child::GskRenderNode, _clip::GskRoundedRectLike) G_.RoundedClipNode_new(_child, _clip) end function GskShadowNode(_child::GskRenderNode, _shadows) @@ -694,13 +734,13 @@ $(Expr(:toplevel, quote function GskStrokeNode(_child::GskRenderNode, _path::GskPath, _stroke::GskStroke) G_.StrokeNode_new(_child, _path, _stroke) end - function GskTextNode(_font::PangoFont, _glyphs::Union{PangoGlyphString, Ref{_PangoGlyphString}}, _color::Union{GdkRGBA, Ref{_GdkRGBA}}, _offset::Union{GraphenePoint, Ref{_GraphenePoint}}) + function GskTextNode(_font::PangoFont, _glyphs::PangoGlyphStringLike, _color::GdkRGBALike, _offset::GraphenePointLike) G_.TextNode_new(_font, _glyphs, _color, _offset) end - function GskTextureNode(_texture::GdkTexture, _bounds::Union{GrapheneRect, Ref{_GrapheneRect}}) + function GskTextureNode(_texture::GdkTexture, _bounds::GrapheneRectLike) G_.TextureNode_new(_texture, _bounds) end - function GskTextureScaleNode(_texture::GdkTexture, _bounds::Union{GrapheneRect, Ref{_GrapheneRect}}, _filter) + function GskTextureScaleNode(_texture::GdkTexture, _bounds::GrapheneRectLike, _filter) G_.TextureScaleNode_new(_texture, _bounds, _filter) end function GskTransformNode(_child::GskRenderNode, _transform::GskTransform) @@ -762,6 +802,6 @@ $(Expr(:toplevel, quote @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 @doc "See the [GTK docs](https://docs.gtk.org/gsk4/class.VulkanRenderer.html)." GskVulkanRenderer - export GskColorStop, _GskColorStop, GskParseLocation, _GskParseLocation, GskPath, GskPathBuilder, GskPathMeasure, GskPathPoint, GskRoundedRect, _GskRoundedRect, GskShaderArgsBuilder, GskShadow, _GskShadow, GskStroke, 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, GskFillNode, GskFillNodeLeaf, 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, GskStrokeNode, GskStrokeNodeLeaf, GskSubsurfaceNode, GskSubsurfaceNodeLeaf, GskTextNode, GskTextNodeLeaf, GskTextureNode, GskTextureNodeLeaf, GskTextureScaleNode, GskTextureScaleNodeLeaf, GskTransformNode, GskTransformNodeLeaf, GskVulkanRenderer, GskVulkanRendererLeaf + export GskColorStop, GskColorStopLike, _GskColorStop, GskParseLocation, GskParseLocationLike, _GskParseLocation, GskPath, GskPathBuilder, GskPathMeasure, GskPathPoint, GskRoundedRect, GskRoundedRectLike, _GskRoundedRect, GskShaderArgsBuilder, GskShadow, GskShadowLike, _GskShadow, GskStroke, 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, GskFillNode, GskFillNodeLeaf, 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, GskStrokeNode, GskStrokeNodeLeaf, GskSubsurfaceNode, GskSubsurfaceNodeLeaf, GskTextNode, GskTextNodeLeaf, GskTextureNode, GskTextureNodeLeaf, GskTextureScaleNode, GskTextureScaleNodeLeaf, GskTransformNode, GskTransformNodeLeaf, GskVulkanRenderer, GskVulkanRendererLeaf end)) end diff --git a/src/gen/gtk4_functions b/src/gen/gtk4_functions index 00643c1d..abd9bda0 100644 --- a/src/gen/gtk4_functions +++ b/src/gen/gtk4_functions @@ -42,15 +42,15 @@ $(Expr(:toplevel, quote ret2 = convert(Bool, ret) ret2 end - function accessible_property_init_value(_property, _value::Union{GValue, Ref{_GValue}}) + function accessible_property_init_value(_property, _value::GValueLike) ret = ccall(("gtk_accessible_property_init_value", libgtk4), Nothing, (UInt32, Ptr{_GValue}), _property, _value) nothing end - function accessible_relation_init_value(_relation, _value::Union{GValue, Ref{_GValue}}) + function accessible_relation_init_value(_relation, _value::GValueLike) ret = ccall(("gtk_accessible_relation_init_value", libgtk4), Nothing, (UInt32, Ptr{_GValue}), _relation, _value) nothing end - function accessible_state_init_value(_state, _value::Union{GValue, Ref{_GValue}}) + function accessible_state_init_value(_state, _value::GValueLike) ret = ccall(("gtk_accessible_state_init_value", libgtk4), Nothing, (UInt32, Ptr{_GValue}), _state, _value) nothing end @@ -116,12 +116,12 @@ $(Expr(:toplevel, quote ret = ccall(("gtk_distribute_natural_allocation", libgtk4), Int32, (Int32, UInt32, Ptr{_GtkRequestedSize}), _extra_space, _n_requested_sizes, _sizes_arr) ret end - function editable_delegate_get_property(_object::GObject, _prop_id::Integer, _value::Union{GValue, Ref{_GValue}}, _pspec::GParam) + function editable_delegate_get_property(_object::GObject, _prop_id::Integer, _value::GValueLike, _pspec::GParam) ret = ccall(("gtk_editable_delegate_get_property", libgtk4), Cint, (Ptr{GObject}, UInt32, Ptr{_GValue}, Ptr{GParam}), _object, _prop_id, _value, _pspec) ret2 = convert(Bool, ret) ret2 end - function editable_delegate_set_property(_object::GObject, _prop_id::Integer, _value::Union{GValue, Ref{_GValue}}, _pspec::GParam) + function editable_delegate_set_property(_object::GObject, _prop_id::Integer, _value::GValueLike, _pspec::GParam) ret = ccall(("gtk_editable_delegate_set_property", libgtk4), Cint, (Ptr{GObject}, UInt32, Ptr{_GValue}, Ptr{GParam}), _object, _prop_id, _value, _pspec) ret2 = convert(Bool, ret) ret2 @@ -364,7 +364,7 @@ $(Expr(:toplevel, quote ret2 = convert(GdkContentProvider, ret, true) ret2 end - function tree_get_row_drag_data(_value::Union{GValue, Ref{_GValue}}) + function tree_get_row_drag_data(_value::GValueLike) m_tree_model = Ref{Ptr{GObject}}() m_path = Ref{Ptr{GtkTreePath}}() ret = ccall(("gtk_tree_get_row_drag_data", libgtk4), Cint, (Ptr{_GValue}, Ptr{Ptr{GObject}}, Ptr{Ptr{GtkTreePath}}), _value, m_tree_model, m_path) diff --git a/src/gen/gtk4_methods b/src/gen/gtk4_methods index 8386ad0b..13628094 100644 --- a/src/gen/gtk4_methods +++ b/src/gen/gtk4_methods @@ -19,19 +19,19 @@ $(Expr(:toplevel, quote end function Border_new() ret = ccall(("gtk_border_new", libgtk4), Ptr{_GtkBorder}, ()) - ret2 = convert(Union{GtkBorder, Ref{_GtkBorder}}, ret, true) + ret2 = convert(GtkBorderLike, ret, true) ret2 end - function copy(instance::Union{GtkBorder, Ref{_GtkBorder}}) + function copy(instance::GtkBorderLike) ret = ccall(("gtk_border_copy", libgtk4), Ptr{_GtkBorder}, (Ptr{_GtkBorder},), instance) - ret2 = convert(Union{GtkBorder, Ref{_GtkBorder}}, ret, true) + ret2 = convert(GtkBorderLike, ret, true) ret2 end - function free(instance::Union{GtkBorder, Ref{_GtkBorder}}) + function free(instance::GtkBorderLike) ret = ccall(("gtk_border_free", libgtk4), Nothing, (Ptr{_GtkBorder},), instance) nothing end - function evaluate(instance::GtkExpressionWatch, _value::Union{GValue, Ref{_GValue}}) + function evaluate(instance::GtkExpressionWatch, _value::GValueLike) ret = ccall(("gtk_expression_watch_evaluate", libgtk4), Cint, (Ptr{GtkExpressionWatch}, Ptr{_GValue}), instance, _value) ret2 = convert(Bool, ret) ret2 @@ -323,15 +323,15 @@ $(Expr(:toplevel, quote end function Requisition_new() ret = ccall(("gtk_requisition_new", libgtk4), Ptr{_GtkRequisition}, ()) - ret2 = convert(Union{GtkRequisition, Ref{_GtkRequisition}}, ret, true) + ret2 = convert(GtkRequisitionLike, ret, true) ret2 end - function copy(instance::Union{GtkRequisition, Ref{_GtkRequisition}}) + function copy(instance::GtkRequisitionLike) ret = ccall(("gtk_requisition_copy", libgtk4), Ptr{_GtkRequisition}, (Ptr{_GtkRequisition},), instance) - ret2 = convert(Union{GtkRequisition, Ref{_GtkRequisition}}, ret, true) + ret2 = convert(GtkRequisitionLike, ret, true) ret2 end - function free(instance::Union{GtkRequisition, Ref{_GtkRequisition}}) + function free(instance::GtkRequisitionLike) ret = ccall(("gtk_requisition_free", libgtk4), Nothing, (Ptr{_GtkRequisition},), instance) nothing end @@ -367,12 +367,473 @@ $(Expr(:toplevel, quote ret = ccall(("gtk_scroll_info_unref", libgtk4), Nothing, (Ptr{GtkScrollInfo},), instance) nothing end - function copy(instance::Union{GtkTreeIter, Ref{_GtkTreeIter}}) + function assign(instance::GtkTextIterLike, _other::GtkTextIterLike) + ret = ccall(("gtk_text_iter_assign", libgtk4), Nothing, (Ptr{_GtkTextIter}, Ptr{_GtkTextIter}), instance, _other) + nothing + end + function backward_char(instance::GtkTextIterLike) + ret = ccall(("gtk_text_iter_backward_char", libgtk4), Cint, (Ptr{_GtkTextIter},), instance) + ret2 = convert(Bool, ret) + ret2 + end + function backward_chars(instance::GtkTextIterLike, _count::Integer) + ret = ccall(("gtk_text_iter_backward_chars", libgtk4), Cint, (Ptr{_GtkTextIter}, Int32), instance, _count) + ret2 = convert(Bool, ret) + ret2 + end + function backward_cursor_position(instance::GtkTextIterLike) + ret = ccall(("gtk_text_iter_backward_cursor_position", libgtk4), Cint, (Ptr{_GtkTextIter},), instance) + ret2 = convert(Bool, ret) + ret2 + end + function backward_cursor_positions(instance::GtkTextIterLike, _count::Integer) + ret = ccall(("gtk_text_iter_backward_cursor_positions", libgtk4), Cint, (Ptr{_GtkTextIter}, Int32), instance, _count) + ret2 = convert(Bool, ret) + ret2 + end + function backward_find_char(instance::GtkTextIterLike, _pred::Function, _limit::Maybe(GtkTextIterLike)) + begin + _pred_cfunc = @cfunction(GtkTextCharPredicate, Cint, (Nothing, Ref{Function})) + begin + ref = Ref{Any}(_pred) + _pred_closure = unsafe_load(convert(Ptr{Ptr{Nothing}}, Base.unsafe_convert(Ptr{Any}, ref))) + end + end + _limit_maybe = nothing_to_null(_limit) + ret = ccall(("gtk_text_iter_backward_find_char", libgtk4), Cint, (Ptr{_GtkTextIter}, Ptr{Cvoid}, Ptr{Nothing}, Ptr{_GtkTextIter}), instance, _pred_cfunc, _pred_closure, _limit_maybe) + ret2 = convert(Bool, ret) + ret2 + end + function backward_line(instance::GtkTextIterLike) + ret = ccall(("gtk_text_iter_backward_line", libgtk4), Cint, (Ptr{_GtkTextIter},), instance) + ret2 = convert(Bool, ret) + ret2 + end + function backward_lines(instance::GtkTextIterLike, _count::Integer) + ret = ccall(("gtk_text_iter_backward_lines", libgtk4), Cint, (Ptr{_GtkTextIter}, Int32), instance, _count) + ret2 = convert(Bool, ret) + ret2 + end + function backward_search(instance::GtkTextIterLike, _str::Union{AbstractString, Symbol}, _flags, _limit::Maybe(GtkTextIterLike)) + m_match_start = Ref{_GtkTextIter}() + m_match_end = Ref{_GtkTextIter}() + _limit_maybe = nothing_to_null(_limit) + ret = ccall(("gtk_text_iter_backward_search", libgtk4), Cint, (Ptr{_GtkTextIter}, Cstring, UInt32, Ptr{_GtkTextIter}, Ptr{_GtkTextIter}, Ptr{_GtkTextIter}), instance, _str, _flags, m_match_start, m_match_end, _limit_maybe) + ret2 = convert(Bool, ret) + _match_start = m_match_start[] + _match_end = m_match_end[] + (ret2, _match_start, _match_end) + end + function backward_sentence_start(instance::GtkTextIterLike) + ret = ccall(("gtk_text_iter_backward_sentence_start", libgtk4), Cint, (Ptr{_GtkTextIter},), instance) + ret2 = convert(Bool, ret) + ret2 + end + function backward_sentence_starts(instance::GtkTextIterLike, _count::Integer) + ret = ccall(("gtk_text_iter_backward_sentence_starts", libgtk4), Cint, (Ptr{_GtkTextIter}, Int32), instance, _count) + ret2 = convert(Bool, ret) + ret2 + end + function backward_to_tag_toggle(instance::GtkTextIterLike, _tag::Maybe(GtkTextTag)) + _tag_maybe = nothing_to_null(_tag) + ret = ccall(("gtk_text_iter_backward_to_tag_toggle", libgtk4), Cint, (Ptr{_GtkTextIter}, Ptr{GObject}), instance, _tag_maybe) + ret2 = convert(Bool, ret) + ret2 + end + function backward_visible_cursor_position(instance::GtkTextIterLike) + ret = ccall(("gtk_text_iter_backward_visible_cursor_position", libgtk4), Cint, (Ptr{_GtkTextIter},), instance) + ret2 = convert(Bool, ret) + ret2 + end + function backward_visible_cursor_positions(instance::GtkTextIterLike, _count::Integer) + ret = ccall(("gtk_text_iter_backward_visible_cursor_positions", libgtk4), Cint, (Ptr{_GtkTextIter}, Int32), instance, _count) + ret2 = convert(Bool, ret) + ret2 + end + function backward_visible_line(instance::GtkTextIterLike) + ret = ccall(("gtk_text_iter_backward_visible_line", libgtk4), Cint, (Ptr{_GtkTextIter},), instance) + ret2 = convert(Bool, ret) + ret2 + end + function backward_visible_lines(instance::GtkTextIterLike, _count::Integer) + ret = ccall(("gtk_text_iter_backward_visible_lines", libgtk4), Cint, (Ptr{_GtkTextIter}, Int32), instance, _count) + ret2 = convert(Bool, ret) + ret2 + end + function backward_visible_word_start(instance::GtkTextIterLike) + ret = ccall(("gtk_text_iter_backward_visible_word_start", libgtk4), Cint, (Ptr{_GtkTextIter},), instance) + ret2 = convert(Bool, ret) + ret2 + end + function backward_visible_word_starts(instance::GtkTextIterLike, _count::Integer) + ret = ccall(("gtk_text_iter_backward_visible_word_starts", libgtk4), Cint, (Ptr{_GtkTextIter}, Int32), instance, _count) + ret2 = convert(Bool, ret) + ret2 + end + function backward_word_start(instance::GtkTextIterLike) + ret = ccall(("gtk_text_iter_backward_word_start", libgtk4), Cint, (Ptr{_GtkTextIter},), instance) + ret2 = convert(Bool, ret) + ret2 + end + function backward_word_starts(instance::GtkTextIterLike, _count::Integer) + ret = ccall(("gtk_text_iter_backward_word_starts", libgtk4), Cint, (Ptr{_GtkTextIter}, Int32), instance, _count) + ret2 = convert(Bool, ret) + ret2 + end + function can_insert(instance::GtkTextIterLike, _default_editability::Bool) + ret = ccall(("gtk_text_iter_can_insert", libgtk4), Cint, (Ptr{_GtkTextIter}, Cint), instance, _default_editability) + ret2 = convert(Bool, ret) + ret2 + end + function compare(instance::GtkTextIterLike, _rhs::GtkTextIterLike) + ret = ccall(("gtk_text_iter_compare", libgtk4), Int32, (Ptr{_GtkTextIter}, Ptr{_GtkTextIter}), instance, _rhs) + ret + end + function copy(instance::GtkTextIterLike) + ret = ccall(("gtk_text_iter_copy", libgtk4), Ptr{_GtkTextIter}, (Ptr{_GtkTextIter},), instance) + ret2 = convert(GtkTextIterLike, ret, true) + ret2 + end + function editable(instance::GtkTextIterLike, _default_setting::Bool) + ret = ccall(("gtk_text_iter_editable", libgtk4), Cint, (Ptr{_GtkTextIter}, Cint), instance, _default_setting) + ret2 = convert(Bool, ret) + ret2 + end + function ends_line(instance::GtkTextIterLike) + ret = ccall(("gtk_text_iter_ends_line", libgtk4), Cint, (Ptr{_GtkTextIter},), instance) + ret2 = convert(Bool, ret) + ret2 + end + function ends_sentence(instance::GtkTextIterLike) + ret = ccall(("gtk_text_iter_ends_sentence", libgtk4), Cint, (Ptr{_GtkTextIter},), instance) + ret2 = convert(Bool, ret) + ret2 + end + function ends_tag(instance::GtkTextIterLike, _tag::Maybe(GtkTextTag)) + _tag_maybe = nothing_to_null(_tag) + ret = ccall(("gtk_text_iter_ends_tag", libgtk4), Cint, (Ptr{_GtkTextIter}, Ptr{GObject}), instance, _tag_maybe) + ret2 = convert(Bool, ret) + ret2 + end + function ends_word(instance::GtkTextIterLike) + ret = ccall(("gtk_text_iter_ends_word", libgtk4), Cint, (Ptr{_GtkTextIter},), instance) + ret2 = convert(Bool, ret) + ret2 + end + function equal(instance::GtkTextIterLike, _rhs::GtkTextIterLike) + ret = ccall(("gtk_text_iter_equal", libgtk4), Cint, (Ptr{_GtkTextIter}, Ptr{_GtkTextIter}), instance, _rhs) + ret2 = convert(Bool, ret) + ret2 + end + function forward_char(instance::GtkTextIterLike) + ret = ccall(("gtk_text_iter_forward_char", libgtk4), Cint, (Ptr{_GtkTextIter},), instance) + ret2 = convert(Bool, ret) + ret2 + end + function forward_chars(instance::GtkTextIterLike, _count::Integer) + ret = ccall(("gtk_text_iter_forward_chars", libgtk4), Cint, (Ptr{_GtkTextIter}, Int32), instance, _count) + ret2 = convert(Bool, ret) + ret2 + end + function forward_cursor_position(instance::GtkTextIterLike) + ret = ccall(("gtk_text_iter_forward_cursor_position", libgtk4), Cint, (Ptr{_GtkTextIter},), instance) + ret2 = convert(Bool, ret) + ret2 + end + function forward_cursor_positions(instance::GtkTextIterLike, _count::Integer) + ret = ccall(("gtk_text_iter_forward_cursor_positions", libgtk4), Cint, (Ptr{_GtkTextIter}, Int32), instance, _count) + ret2 = convert(Bool, ret) + ret2 + end + function forward_find_char(instance::GtkTextIterLike, _pred::Function, _limit::Maybe(GtkTextIterLike)) + begin + _pred_cfunc = @cfunction(GtkTextCharPredicate, Cint, (Nothing, Ref{Function})) + begin + ref = Ref{Any}(_pred) + _pred_closure = unsafe_load(convert(Ptr{Ptr{Nothing}}, Base.unsafe_convert(Ptr{Any}, ref))) + end + end + _limit_maybe = nothing_to_null(_limit) + ret = ccall(("gtk_text_iter_forward_find_char", libgtk4), Cint, (Ptr{_GtkTextIter}, Ptr{Cvoid}, Ptr{Nothing}, Ptr{_GtkTextIter}), instance, _pred_cfunc, _pred_closure, _limit_maybe) + ret2 = convert(Bool, ret) + ret2 + end + function forward_line(instance::GtkTextIterLike) + ret = ccall(("gtk_text_iter_forward_line", libgtk4), Cint, (Ptr{_GtkTextIter},), instance) + ret2 = convert(Bool, ret) + ret2 + end + function forward_lines(instance::GtkTextIterLike, _count::Integer) + ret = ccall(("gtk_text_iter_forward_lines", libgtk4), Cint, (Ptr{_GtkTextIter}, Int32), instance, _count) + ret2 = convert(Bool, ret) + ret2 + end + function forward_search(instance::GtkTextIterLike, _str::Union{AbstractString, Symbol}, _flags, _limit::Maybe(GtkTextIterLike)) + m_match_start = Ref{_GtkTextIter}() + m_match_end = Ref{_GtkTextIter}() + _limit_maybe = nothing_to_null(_limit) + ret = ccall(("gtk_text_iter_forward_search", libgtk4), Cint, (Ptr{_GtkTextIter}, Cstring, UInt32, Ptr{_GtkTextIter}, Ptr{_GtkTextIter}, Ptr{_GtkTextIter}), instance, _str, _flags, m_match_start, m_match_end, _limit_maybe) + ret2 = convert(Bool, ret) + _match_start = m_match_start[] + _match_end = m_match_end[] + (ret2, _match_start, _match_end) + end + function forward_sentence_end(instance::GtkTextIterLike) + ret = ccall(("gtk_text_iter_forward_sentence_end", libgtk4), Cint, (Ptr{_GtkTextIter},), instance) + ret2 = convert(Bool, ret) + ret2 + end + function forward_sentence_ends(instance::GtkTextIterLike, _count::Integer) + ret = ccall(("gtk_text_iter_forward_sentence_ends", libgtk4), Cint, (Ptr{_GtkTextIter}, Int32), instance, _count) + ret2 = convert(Bool, ret) + ret2 + end + function forward_to_end(instance::GtkTextIterLike) + ret = ccall(("gtk_text_iter_forward_to_end", libgtk4), Nothing, (Ptr{_GtkTextIter},), instance) + nothing + end + function forward_to_line_end(instance::GtkTextIterLike) + ret = ccall(("gtk_text_iter_forward_to_line_end", libgtk4), Cint, (Ptr{_GtkTextIter},), instance) + ret2 = convert(Bool, ret) + ret2 + end + function forward_to_tag_toggle(instance::GtkTextIterLike, _tag::Maybe(GtkTextTag)) + _tag_maybe = nothing_to_null(_tag) + ret = ccall(("gtk_text_iter_forward_to_tag_toggle", libgtk4), Cint, (Ptr{_GtkTextIter}, Ptr{GObject}), instance, _tag_maybe) + ret2 = convert(Bool, ret) + ret2 + end + function forward_visible_cursor_position(instance::GtkTextIterLike) + ret = ccall(("gtk_text_iter_forward_visible_cursor_position", libgtk4), Cint, (Ptr{_GtkTextIter},), instance) + ret2 = convert(Bool, ret) + ret2 + end + function forward_visible_cursor_positions(instance::GtkTextIterLike, _count::Integer) + ret = ccall(("gtk_text_iter_forward_visible_cursor_positions", libgtk4), Cint, (Ptr{_GtkTextIter}, Int32), instance, _count) + ret2 = convert(Bool, ret) + ret2 + end + function forward_visible_line(instance::GtkTextIterLike) + ret = ccall(("gtk_text_iter_forward_visible_line", libgtk4), Cint, (Ptr{_GtkTextIter},), instance) + ret2 = convert(Bool, ret) + ret2 + end + function forward_visible_lines(instance::GtkTextIterLike, _count::Integer) + ret = ccall(("gtk_text_iter_forward_visible_lines", libgtk4), Cint, (Ptr{_GtkTextIter}, Int32), instance, _count) + ret2 = convert(Bool, ret) + ret2 + end + function forward_visible_word_end(instance::GtkTextIterLike) + ret = ccall(("gtk_text_iter_forward_visible_word_end", libgtk4), Cint, (Ptr{_GtkTextIter},), instance) + ret2 = convert(Bool, ret) + ret2 + end + function forward_visible_word_ends(instance::GtkTextIterLike, _count::Integer) + ret = ccall(("gtk_text_iter_forward_visible_word_ends", libgtk4), Cint, (Ptr{_GtkTextIter}, Int32), instance, _count) + ret2 = convert(Bool, ret) + ret2 + end + function forward_word_end(instance::GtkTextIterLike) + ret = ccall(("gtk_text_iter_forward_word_end", libgtk4), Cint, (Ptr{_GtkTextIter},), instance) + ret2 = convert(Bool, ret) + ret2 + end + function forward_word_ends(instance::GtkTextIterLike, _count::Integer) + ret = ccall(("gtk_text_iter_forward_word_ends", libgtk4), Cint, (Ptr{_GtkTextIter}, Int32), instance, _count) + ret2 = convert(Bool, ret) + ret2 + end + function free(instance::GtkTextIterLike) + ret = ccall(("gtk_text_iter_free", libgtk4), Nothing, (Ptr{_GtkTextIter},), instance) + nothing + end + function get_buffer(instance::GtkTextIterLike) + ret = ccall(("gtk_text_iter_get_buffer", libgtk4), Ptr{GObject}, (Ptr{_GtkTextIter},), instance) + ret2 = convert(GtkTextBuffer, ret, false) + ret2 + end + function get_bytes_in_line(instance::GtkTextIterLike) + ret = ccall(("gtk_text_iter_get_bytes_in_line", libgtk4), Int32, (Ptr{_GtkTextIter},), instance) + ret + end + function get_char(instance::GtkTextIterLike) + ret = ccall(("gtk_text_iter_get_char", libgtk4), Nothing, (Ptr{_GtkTextIter},), instance) + nothing + end + function get_chars_in_line(instance::GtkTextIterLike) + ret = ccall(("gtk_text_iter_get_chars_in_line", libgtk4), Int32, (Ptr{_GtkTextIter},), instance) + ret + end + function get_child_anchor(instance::GtkTextIterLike) + ret = ccall(("gtk_text_iter_get_child_anchor", libgtk4), Ptr{GObject}, (Ptr{_GtkTextIter},), instance) + ret2 = convert_if_not_null(GtkTextChildAnchor, ret, false) + ret2 + end + function get_language(instance::GtkTextIterLike) + ret = ccall(("gtk_text_iter_get_language", libgtk4), Ptr{PangoLanguage}, (Ptr{_GtkTextIter},), instance) + ret2 = convert(PangoLanguage, ret, true) + ret2 + end + function get_line(instance::GtkTextIterLike) + ret = ccall(("gtk_text_iter_get_line", libgtk4), Int32, (Ptr{_GtkTextIter},), instance) + ret + end + function get_line_index(instance::GtkTextIterLike) + ret = ccall(("gtk_text_iter_get_line_index", libgtk4), Int32, (Ptr{_GtkTextIter},), instance) + ret + end + function get_line_offset(instance::GtkTextIterLike) + ret = ccall(("gtk_text_iter_get_line_offset", libgtk4), Int32, (Ptr{_GtkTextIter},), instance) + ret + end + function get_marks(instance::GtkTextIterLike) + ret = ccall(("gtk_text_iter_get_marks", libgtk4), Ptr{GLib._GSList{Ptr{GObject}}}, (Ptr{_GtkTextIter},), instance) + ret2 = GLib.GList(ret, false) + ret2 + end + function get_offset(instance::GtkTextIterLike) + ret = ccall(("gtk_text_iter_get_offset", libgtk4), Int32, (Ptr{_GtkTextIter},), instance) + ret + end + function get_paintable(instance::GtkTextIterLike) + ret = ccall(("gtk_text_iter_get_paintable", libgtk4), Ptr{GObject}, (Ptr{_GtkTextIter},), instance) + ret2 = GLib.find_leaf_type_if_not_null(ret, false) + ret2 + end + function get_slice(instance::GtkTextIterLike, _end::GtkTextIterLike) + ret = ccall(("gtk_text_iter_get_slice", libgtk4), Cstring, (Ptr{_GtkTextIter}, Ptr{_GtkTextIter}), instance, _end) + ret2 = string_or_nothing(ret, true) + ret2 + end + function get_tags(instance::GtkTextIterLike) + ret = ccall(("gtk_text_iter_get_tags", libgtk4), Ptr{GLib._GSList{Ptr{GObject}}}, (Ptr{_GtkTextIter},), instance) + ret2 = GLib.GList(ret, false) + ret2 + end + function get_text(instance::GtkTextIterLike, _end::GtkTextIterLike) + ret = ccall(("gtk_text_iter_get_text", libgtk4), Cstring, (Ptr{_GtkTextIter}, Ptr{_GtkTextIter}), instance, _end) + ret2 = string_or_nothing(ret, true) + ret2 + end + function get_toggled_tags(instance::GtkTextIterLike, _toggled_on::Bool) + ret = ccall(("gtk_text_iter_get_toggled_tags", libgtk4), Ptr{GLib._GSList{Ptr{GObject}}}, (Ptr{_GtkTextIter}, Cint), instance, _toggled_on) + ret2 = GLib.GList(ret, false) + ret2 + end + function get_visible_line_index(instance::GtkTextIterLike) + ret = ccall(("gtk_text_iter_get_visible_line_index", libgtk4), Int32, (Ptr{_GtkTextIter},), instance) + ret + end + function get_visible_line_offset(instance::GtkTextIterLike) + ret = ccall(("gtk_text_iter_get_visible_line_offset", libgtk4), Int32, (Ptr{_GtkTextIter},), instance) + ret + end + function get_visible_slice(instance::GtkTextIterLike, _end::GtkTextIterLike) + ret = ccall(("gtk_text_iter_get_visible_slice", libgtk4), Cstring, (Ptr{_GtkTextIter}, Ptr{_GtkTextIter}), instance, _end) + ret2 = string_or_nothing(ret, true) + ret2 + end + function get_visible_text(instance::GtkTextIterLike, _end::GtkTextIterLike) + ret = ccall(("gtk_text_iter_get_visible_text", libgtk4), Cstring, (Ptr{_GtkTextIter}, Ptr{_GtkTextIter}), instance, _end) + ret2 = string_or_nothing(ret, true) + ret2 + end + function has_tag(instance::GtkTextIterLike, _tag::GtkTextTag) + ret = ccall(("gtk_text_iter_has_tag", libgtk4), Cint, (Ptr{_GtkTextIter}, Ptr{GObject}), instance, _tag) + ret2 = convert(Bool, ret) + ret2 + end + function in_range(instance::GtkTextIterLike, _start::GtkTextIterLike, _end::GtkTextIterLike) + ret = ccall(("gtk_text_iter_in_range", libgtk4), Cint, (Ptr{_GtkTextIter}, Ptr{_GtkTextIter}, Ptr{_GtkTextIter}), instance, _start, _end) + ret2 = convert(Bool, ret) + ret2 + end + function inside_sentence(instance::GtkTextIterLike) + ret = ccall(("gtk_text_iter_inside_sentence", libgtk4), Cint, (Ptr{_GtkTextIter},), instance) + ret2 = convert(Bool, ret) + ret2 + end + function inside_word(instance::GtkTextIterLike) + ret = ccall(("gtk_text_iter_inside_word", libgtk4), Cint, (Ptr{_GtkTextIter},), instance) + ret2 = convert(Bool, ret) + ret2 + end + function is_cursor_position(instance::GtkTextIterLike) + ret = ccall(("gtk_text_iter_is_cursor_position", libgtk4), Cint, (Ptr{_GtkTextIter},), instance) + ret2 = convert(Bool, ret) + ret2 + end + function is_end(instance::GtkTextIterLike) + ret = ccall(("gtk_text_iter_is_end", libgtk4), Cint, (Ptr{_GtkTextIter},), instance) + ret2 = convert(Bool, ret) + ret2 + end + function is_start(instance::GtkTextIterLike) + ret = ccall(("gtk_text_iter_is_start", libgtk4), Cint, (Ptr{_GtkTextIter},), instance) + ret2 = convert(Bool, ret) + ret2 + end + function order(instance::GtkTextIterLike, _second::GtkTextIterLike) + ret = ccall(("gtk_text_iter_order", libgtk4), Nothing, (Ptr{_GtkTextIter}, Ptr{_GtkTextIter}), instance, _second) + nothing + end + function set_line(instance::GtkTextIterLike, _line_number::Integer) + ret = ccall(("gtk_text_iter_set_line", libgtk4), Nothing, (Ptr{_GtkTextIter}, Int32), instance, _line_number) + nothing + end + function set_line_index(instance::GtkTextIterLike, _byte_on_line::Integer) + ret = ccall(("gtk_text_iter_set_line_index", libgtk4), Nothing, (Ptr{_GtkTextIter}, Int32), instance, _byte_on_line) + nothing + end + function set_line_offset(instance::GtkTextIterLike, _char_on_line::Integer) + ret = ccall(("gtk_text_iter_set_line_offset", libgtk4), Nothing, (Ptr{_GtkTextIter}, Int32), instance, _char_on_line) + nothing + end + function set_offset(instance::GtkTextIterLike, _char_offset::Integer) + ret = ccall(("gtk_text_iter_set_offset", libgtk4), Nothing, (Ptr{_GtkTextIter}, Int32), instance, _char_offset) + nothing + end + function set_visible_line_index(instance::GtkTextIterLike, _byte_on_line::Integer) + ret = ccall(("gtk_text_iter_set_visible_line_index", libgtk4), Nothing, (Ptr{_GtkTextIter}, Int32), instance, _byte_on_line) + nothing + end + function set_visible_line_offset(instance::GtkTextIterLike, _char_on_line::Integer) + ret = ccall(("gtk_text_iter_set_visible_line_offset", libgtk4), Nothing, (Ptr{_GtkTextIter}, Int32), instance, _char_on_line) + nothing + end + function starts_line(instance::GtkTextIterLike) + ret = ccall(("gtk_text_iter_starts_line", libgtk4), Cint, (Ptr{_GtkTextIter},), instance) + ret2 = convert(Bool, ret) + ret2 + end + function starts_sentence(instance::GtkTextIterLike) + ret = ccall(("gtk_text_iter_starts_sentence", libgtk4), Cint, (Ptr{_GtkTextIter},), instance) + ret2 = convert(Bool, ret) + ret2 + end + function starts_tag(instance::GtkTextIterLike, _tag::Maybe(GtkTextTag)) + _tag_maybe = nothing_to_null(_tag) + ret = ccall(("gtk_text_iter_starts_tag", libgtk4), Cint, (Ptr{_GtkTextIter}, Ptr{GObject}), instance, _tag_maybe) + ret2 = convert(Bool, ret) + ret2 + end + function starts_word(instance::GtkTextIterLike) + ret = ccall(("gtk_text_iter_starts_word", libgtk4), Cint, (Ptr{_GtkTextIter},), instance) + ret2 = convert(Bool, ret) + ret2 + end + function toggles_tag(instance::GtkTextIterLike, _tag::Maybe(GtkTextTag)) + _tag_maybe = nothing_to_null(_tag) + ret = ccall(("gtk_text_iter_toggles_tag", libgtk4), Cint, (Ptr{_GtkTextIter}, Ptr{GObject}), instance, _tag_maybe) + ret2 = convert(Bool, ret) + ret2 + end + function copy(instance::GtkTreeIterLike) ret = ccall(("gtk_tree_iter_copy", libgtk4), Ptr{_GtkTreeIter}, (Ptr{_GtkTreeIter},), instance) - ret2 = convert(Union{GtkTreeIter, Ref{_GtkTreeIter}}, ret, true) + ret2 = convert(GtkTreeIterLike, ret, true) ret2 end - function free(instance::Union{GtkTreeIter, Ref{_GtkTreeIter}}) + function free(instance::GtkTreeIterLike) ret = ccall(("gtk_tree_iter_free", libgtk4), Nothing, (Ptr{_GtkTreeIter},), instance) nothing end @@ -2612,7 +3073,7 @@ $(Expr(:toplevel, quote function get_buildable_id(instance::GtkCalendar) get_buildable_id(GtkBuildable(instance)) end - function activate(instance::GtkCellArea, _context::GtkCellAreaContext, _widget::GtkWidget, _cell_area::Union{GdkRectangle, Ref{_GdkRectangle}}, _flags, _edit_only::Bool) + function activate(instance::GtkCellArea, _context::GtkCellAreaContext, _widget::GtkWidget, _cell_area::GdkRectangleLike, _flags, _edit_only::Bool) ret = ccall(("gtk_cell_area_activate", libgtk4), Cint, (Ptr{GObject}, Ptr{GObject}, Ptr{GObject}, Ptr{_GdkRectangle}, UInt32, Cint), instance, _context, _widget, _cell_area, _flags, _edit_only) ret2 = convert(Bool, ret) ret2 @@ -2625,7 +3086,7 @@ $(Expr(:toplevel, quote ret = ccall(("gtk_cell_area_add_focus_sibling", libgtk4), Nothing, (Ptr{GObject}, Ptr{GObject}, Ptr{GObject}), instance, _renderer, _sibling) nothing end - function apply_attributes(instance::GtkCellArea, _tree_model::GtkTreeModel, _iter::Union{GtkTreeIter, Ref{_GtkTreeIter}}, _is_expander::Bool, _is_expanded::Bool) + function apply_attributes(instance::GtkCellArea, _tree_model::GtkTreeModel, _iter::GtkTreeIterLike, _is_expander::Bool, _is_expanded::Bool) ret = ccall(("gtk_cell_area_apply_attributes", libgtk4), Nothing, (Ptr{GObject}, Ptr{GObject}, Ptr{_GtkTreeIter}, Cint, Cint), instance, _tree_model, _iter, _is_expander, _is_expanded) nothing end @@ -2641,11 +3102,11 @@ $(Expr(:toplevel, quote ret = ccall(("gtk_cell_area_attribute_get_column", libgtk4), Int32, (Ptr{GObject}, Ptr{GObject}, Cstring), instance, _renderer, _attribute) ret end - function cell_get_property(instance::GtkCellArea, _renderer::GtkCellRenderer, _property_name::Union{AbstractString, Symbol}, _value::Union{GValue, Ref{_GValue}}) + function cell_get_property(instance::GtkCellArea, _renderer::GtkCellRenderer, _property_name::Union{AbstractString, Symbol}, _value::GValueLike) ret = ccall(("gtk_cell_area_cell_get_property", libgtk4), Nothing, (Ptr{GObject}, Ptr{GObject}, Cstring, Ptr{_GValue}), instance, _renderer, _property_name, _value) nothing end - function cell_set_property(instance::GtkCellArea, _renderer::GtkCellRenderer, _property_name::Union{AbstractString, Symbol}, _value::Union{GValue, Ref{_GValue}}) + function cell_set_property(instance::GtkCellArea, _renderer::GtkCellRenderer, _property_name::Union{AbstractString, Symbol}, _value::GValueLike) ret = ccall(("gtk_cell_area_cell_set_property", libgtk4), Nothing, (Ptr{GObject}, Ptr{GObject}, Cstring, Ptr{_GValue}), instance, _renderer, _property_name, _value) nothing end @@ -2675,7 +3136,7 @@ $(Expr(:toplevel, quote ret = ccall(("gtk_cell_area_foreach", libgtk4), Nothing, (Ptr{GObject}, Ptr{Cvoid}, Ptr{Nothing}), instance, _callback_cfunc, _callback_closure) nothing end - function foreach_alloc(instance::GtkCellArea, _context::GtkCellAreaContext, _widget::GtkWidget, _cell_area::Union{GdkRectangle, Ref{_GdkRectangle}}, _background_area::Union{GdkRectangle, Ref{_GdkRectangle}}, _callback::Function) + function foreach_alloc(instance::GtkCellArea, _context::GtkCellAreaContext, _widget::GtkWidget, _cell_area::GdkRectangleLike, _background_area::GdkRectangleLike, _callback::Function) begin _callback_cfunc = @cfunction(GtkCellAllocCallback, Cint, (Ptr{GObject}, Ptr{_GdkRectangle}, Ptr{_GdkRectangle}, Ref{Function})) begin @@ -2686,13 +3147,13 @@ $(Expr(:toplevel, quote ret = ccall(("gtk_cell_area_foreach_alloc", libgtk4), Nothing, (Ptr{GObject}, Ptr{GObject}, Ptr{GObject}, Ptr{_GdkRectangle}, Ptr{_GdkRectangle}, Ptr{Cvoid}, Ptr{Nothing}), instance, _context, _widget, _cell_area, _background_area, _callback_cfunc, _callback_closure) nothing end - function get_cell_allocation(instance::GtkCellArea, _context::GtkCellAreaContext, _widget::GtkWidget, _renderer::GtkCellRenderer, _cell_area::Union{GdkRectangle, Ref{_GdkRectangle}}) + function get_cell_allocation(instance::GtkCellArea, _context::GtkCellAreaContext, _widget::GtkWidget, _renderer::GtkCellRenderer, _cell_area::GdkRectangleLike) m_allocation = Ref{_GdkRectangle}() ret = ccall(("gtk_cell_area_get_cell_allocation", libgtk4), Nothing, (Ptr{GObject}, Ptr{GObject}, Ptr{GObject}, Ptr{GObject}, Ptr{_GdkRectangle}, Ptr{_GdkRectangle}), instance, _context, _widget, _renderer, _cell_area, m_allocation) _allocation = m_allocation[] _allocation end - function get_cell_at_position(instance::GtkCellArea, _context::GtkCellAreaContext, _widget::GtkWidget, _cell_area::Union{GdkRectangle, Ref{_GdkRectangle}}, _x::Integer, _y::Integer) + function get_cell_at_position(instance::GtkCellArea, _context::GtkCellAreaContext, _widget::GtkWidget, _cell_area::GdkRectangleLike, _x::Integer, _y::Integer) m_alloc_area = Ref{_GdkRectangle}() ret = ccall(("gtk_cell_area_get_cell_at_position", libgtk4), Ptr{GObject}, (Ptr{GObject}, Ptr{GObject}, Ptr{GObject}, Ptr{_GdkRectangle}, Int32, Int32, Ptr{_GdkRectangle}), instance, _context, _widget, _cell_area, _x, _y, m_alloc_area) ret2 = convert(GtkCellRenderer, ret, false) @@ -2771,7 +3232,7 @@ $(Expr(:toplevel, quote ret2 = convert(Bool, ret) ret2 end - function inner_cell_area(instance::GtkCellArea, _widget::GtkWidget, _cell_area::Union{GdkRectangle, Ref{_GdkRectangle}}) + function inner_cell_area(instance::GtkCellArea, _widget::GtkWidget, _cell_area::GdkRectangleLike) m_inner_area = Ref{_GdkRectangle}() ret = ccall(("gtk_cell_area_inner_cell_area", libgtk4), Nothing, (Ptr{GObject}, Ptr{GObject}, Ptr{_GdkRectangle}, Ptr{_GdkRectangle}), instance, _widget, _cell_area, m_inner_area) _inner_area = m_inner_area[] @@ -2808,7 +3269,7 @@ $(Expr(:toplevel, quote ret = ccall(("gtk_cell_area_set_focus_cell", libgtk4), Nothing, (Ptr{GObject}, Ptr{GObject}), instance, _renderer_maybe) nothing end - function snapshot(instance::GtkCellArea, _context::GtkCellAreaContext, _widget::GtkWidget, _snapshot::GtkSnapshot, _background_area::Union{GdkRectangle, Ref{_GdkRectangle}}, _cell_area::Union{GdkRectangle, Ref{_GdkRectangle}}, _flags, _paint_focus::Bool) + function snapshot(instance::GtkCellArea, _context::GtkCellAreaContext, _widget::GtkWidget, _snapshot::GtkSnapshot, _background_area::GdkRectangleLike, _cell_area::GdkRectangleLike, _flags, _paint_focus::Bool) ret = ccall(("gtk_cell_area_snapshot", libgtk4), Nothing, (Ptr{GObject}, Ptr{GObject}, Ptr{GObject}, Ptr{GObject}, Ptr{_GdkRectangle}, Ptr{_GdkRectangle}, UInt32, Cint), instance, _context, _widget, _snapshot, _background_area, _cell_area, _flags, _paint_focus) nothing end @@ -3494,7 +3955,7 @@ $(Expr(:toplevel, quote ret2 = GtkColorButtonLeaf(ret, false) ret2 end - function ColorButton_new_with_rgba(_rgba::Union{GdkRGBA, Ref{_GdkRGBA}}) + function ColorButton_new_with_rgba(_rgba::GdkRGBALike) ret = ccall(("gtk_color_button_new_with_rgba", libgtk4), Ptr{GObject}, (Ptr{_GdkRGBA},), _rgba) ret2 = GtkColorButtonLeaf(ret, false) ret2 @@ -3577,7 +4038,7 @@ $(Expr(:toplevel, quote function get_use_alpha(instance::GtkColorButton) get_use_alpha(GtkColorChooser(instance)) end - function set_rgba(instance::GtkColorButton, _color::Union{GdkRGBA, Ref{_GdkRGBA}}) + function set_rgba(instance::GtkColorButton, _color::GdkRGBALike) set_rgba(GtkColorChooser(instance), _color) end function set_use_alpha(instance::GtkColorButton, _use_alpha::Bool) @@ -3650,7 +4111,7 @@ $(Expr(:toplevel, quote function get_use_alpha(instance::GtkColorChooserDialog) get_use_alpha(GtkColorChooser(instance)) end - function set_rgba(instance::GtkColorChooserDialog, _color::Union{GdkRGBA, Ref{_GdkRGBA}}) + function set_rgba(instance::GtkColorChooserDialog, _color::GdkRGBALike) set_rgba(GtkColorChooser(instance), _color) end function set_use_alpha(instance::GtkColorChooserDialog, _use_alpha::Bool) @@ -3745,7 +4206,7 @@ $(Expr(:toplevel, quote function get_use_alpha(instance::GtkColorChooserWidget) get_use_alpha(GtkColorChooser(instance)) end - function set_rgba(instance::GtkColorChooserWidget, _color::Union{GdkRGBA, Ref{_GdkRGBA}}) + function set_rgba(instance::GtkColorChooserWidget, _color::GdkRGBALike) set_rgba(GtkColorChooser(instance), _color) end function set_use_alpha(instance::GtkColorChooserWidget, _use_alpha::Bool) @@ -3756,7 +4217,7 @@ $(Expr(:toplevel, quote ret2 = GtkColorDialogLeaf(ret, true) ret2 end - function choose_rgba(instance::GtkColorDialog, _parent::Maybe(GtkWindow), _initial_color::Maybe(Union{GdkRGBA, Ref{_GdkRGBA}}), _cancellable::Maybe(GCancellable), _callback::Maybe(Function)) + function choose_rgba(instance::GtkColorDialog, _parent::Maybe(GtkWindow), _initial_color::Maybe(GdkRGBALike), _cancellable::Maybe(GCancellable), _callback::Maybe(Function)) _parent_maybe = nothing_to_null(_parent) _initial_color_maybe = nothing_to_null(_initial_color) _cancellable_maybe = nothing_to_null(_cancellable) @@ -3822,14 +4283,14 @@ $(Expr(:toplevel, quote end function get_rgba(instance::GtkColorDialogButton) ret = ccall(("gtk_color_dialog_button_get_rgba", libgtk4), Ptr{_GdkRGBA}, (Ptr{GObject},), instance) - ret2 = convert(Union{GdkRGBA, Ref{_GdkRGBA}}, ret, false) + ret2 = convert(GdkRGBALike, ret, false) ret2 end function set_dialog(instance::GtkColorDialogButton, _dialog::GtkColorDialog) ret = ccall(("gtk_color_dialog_button_set_dialog", libgtk4), Nothing, (Ptr{GObject}, Ptr{GObject}), instance, _dialog) nothing end - function set_rgba(instance::GtkColorDialogButton, _color::Union{GdkRGBA, Ref{_GdkRGBA}}) + function set_rgba(instance::GtkColorDialogButton, _color::GdkRGBALike) ret = ccall(("gtk_color_dialog_button_set_rgba", libgtk4), Nothing, (Ptr{GObject}, Ptr{_GdkRGBA}), instance, _color) nothing end @@ -4400,7 +4861,7 @@ $(Expr(:toplevel, quote ret2 = convert(Bool, ret) ret2 end - function set_active_iter(instance::GtkComboBox, _iter::Maybe(Union{GtkTreeIter, Ref{_GtkTreeIter}})) + function set_active_iter(instance::GtkComboBox, _iter::Maybe(GtkTreeIterLike)) _iter_maybe = nothing_to_null(_iter) ret = ccall(("gtk_combo_box_set_active_iter", libgtk4), Nothing, (Ptr{GObject}, Ptr{_GtkTreeIter}), instance, _iter_maybe) nothing @@ -4655,14 +5116,14 @@ $(Expr(:toplevel, quote function set_cell_data_func(instance::GtkComboBoxText, _cell::GtkCellRenderer, _func::Maybe(Function), _destroy::Function) set_cell_data_func(GtkCellLayout(instance), _cell, _func, _destroy) end - function ConstantExpression_new_for_value(_value::Union{GValue, Ref{_GValue}}) + function ConstantExpression_new_for_value(_value::GValueLike) ret = ccall(("gtk_constant_expression_new_for_value", libgtk4), Ptr{GtkExpression}, (Ptr{_GValue},), _value) ret2 = convert(GtkExpression, ret) ret2 end function get_value(instance::GtkConstantExpression) ret = ccall(("gtk_constant_expression_get_value", libgtk4), Ptr{_GValue}, (Ptr{GtkExpression},), instance) - ret2 = convert(Union{GValue, Ref{_GValue}}, ret, false) + ret2 = convert(GValueLike, ret, false) ret2 end function Constraint_new(_target::Maybe(GtkConstraintTarget), _target_attribute, _relation, _source::Maybe(GtkConstraintTarget), _source_attribute, _multiplier::Real, _constant::Real, _strength::Integer) @@ -5068,7 +5529,7 @@ $(Expr(:toplevel, quote function items_changed(instance::GtkDirectoryList, _position::Integer, _removed::Integer, _added::Integer) items_changed(GListModel(instance), _position, _removed, _added) end - function create_widget_for_value(_value::Union{GValue, Ref{_GValue}}) + function create_widget_for_value(_value::GValueLike) ret = ccall(("gtk_drag_icon_create_widget_for_value", libgtk4), Ptr{GObject}, (Ptr{_GValue},), _value) ret2 = convert_if_not_null(GtkWidget, ret, true) ret2 @@ -6622,7 +7083,7 @@ $(Expr(:toplevel, quote ret2 = convert(GtkExpressionWatch, ret, false) ret2 end - function evaluate(instance::GtkExpression, _this_::Maybe(GObject), _value::Union{GValue, Ref{_GValue}}) + function evaluate(instance::GtkExpression, _this_::Maybe(GObject), _value::GValueLike) _this__maybe = nothing_to_null(_this_) ret = ccall(("gtk_expression_evaluate", libgtk4), Cint, (Ptr{GtkExpression}, Ptr{GObject}, Ptr{_GValue}), instance, _this__maybe, _value) ret2 = convert(Bool, ret) @@ -9666,7 +10127,7 @@ $(Expr(:toplevel, quote ret = ccall(("gtk_im_context_set_client_widget", libgtk4), Nothing, (Ptr{GObject}, Ptr{GObject}), instance, _widget_maybe) nothing end - function set_cursor_location(instance::GtkIMContext, _area::Union{GdkRectangle, Ref{_GdkRectangle}}) + function set_cursor_location(instance::GtkIMContext, _area::GdkRectangleLike) ret = ccall(("gtk_im_context_set_cursor_location", libgtk4), Nothing, (Ptr{GObject}, Ptr{_GdkRectangle}), instance, _area) nothing end @@ -11796,14 +12257,14 @@ $(Expr(:toplevel, quote _iter = m_iter[] _iter end - function insert_after(instance::GtkListStore, _sibling::Maybe(Union{GtkTreeIter, Ref{_GtkTreeIter}})) + function insert_after(instance::GtkListStore, _sibling::Maybe(GtkTreeIterLike)) m_iter = Ref{_GtkTreeIter}() _sibling_maybe = nothing_to_null(_sibling) ret = ccall(("gtk_list_store_insert_after", libgtk4), Nothing, (Ptr{GObject}, Ptr{_GtkTreeIter}, Ptr{_GtkTreeIter}), instance, m_iter, _sibling_maybe) _iter = m_iter[] _iter end - function insert_before(instance::GtkListStore, _sibling::Maybe(Union{GtkTreeIter, Ref{_GtkTreeIter}})) + function insert_before(instance::GtkListStore, _sibling::Maybe(GtkTreeIterLike)) m_iter = Ref{_GtkTreeIter}() _sibling_maybe = nothing_to_null(_sibling) ret = ccall(("gtk_list_store_insert_before", libgtk4), Nothing, (Ptr{GObject}, Ptr{_GtkTreeIter}, Ptr{_GtkTreeIter}), instance, m_iter, _sibling_maybe) @@ -11820,17 +12281,17 @@ $(Expr(:toplevel, quote _iter = m_iter[] _iter end - function iter_is_valid(instance::GtkListStore, _iter::Union{GtkTreeIter, Ref{_GtkTreeIter}}) + function iter_is_valid(instance::GtkListStore, _iter::GtkTreeIterLike) ret = ccall(("gtk_list_store_iter_is_valid", libgtk4), Cint, (Ptr{GObject}, Ptr{_GtkTreeIter}), instance, _iter) ret2 = convert(Bool, ret) ret2 end - function move_after(instance::GtkListStore, _iter::Union{GtkTreeIter, Ref{_GtkTreeIter}}, _position::Maybe(Union{GtkTreeIter, Ref{_GtkTreeIter}})) + function move_after(instance::GtkListStore, _iter::GtkTreeIterLike, _position::Maybe(GtkTreeIterLike)) _position_maybe = nothing_to_null(_position) ret = ccall(("gtk_list_store_move_after", libgtk4), Nothing, (Ptr{GObject}, Ptr{_GtkTreeIter}, Ptr{_GtkTreeIter}), instance, _iter, _position_maybe) nothing end - function move_before(instance::GtkListStore, _iter::Union{GtkTreeIter, Ref{_GtkTreeIter}}, _position::Maybe(Union{GtkTreeIter, Ref{_GtkTreeIter}})) + function move_before(instance::GtkListStore, _iter::GtkTreeIterLike, _position::Maybe(GtkTreeIterLike)) _position_maybe = nothing_to_null(_position) ret = ccall(("gtk_list_store_move_before", libgtk4), Nothing, (Ptr{GObject}, Ptr{_GtkTreeIter}, Ptr{_GtkTreeIter}), instance, _iter, _position_maybe) nothing @@ -11841,7 +12302,7 @@ $(Expr(:toplevel, quote _iter = m_iter[] _iter end - function remove(instance::GtkListStore, _iter::Union{GtkTreeIter, Ref{_GtkTreeIter}}) + function remove(instance::GtkListStore, _iter::GtkTreeIterLike) ret = ccall(("gtk_list_store_remove", libgtk4), Cint, (Ptr{GObject}, Ptr{_GtkTreeIter}), instance, _iter) ret2 = convert(Bool, ret) ret2 @@ -11857,11 +12318,11 @@ $(Expr(:toplevel, quote ret = ccall(("gtk_list_store_set_column_types", libgtk4), Nothing, (Ptr{GObject}, Int32, Ptr{UInt64}), instance, _n_columns, _types_arr) nothing end - function set_value(instance::GtkListStore, _iter::Union{GtkTreeIter, Ref{_GtkTreeIter}}, _column::Integer, _value::Union{GValue, Ref{_GValue}}) + function set_value(instance::GtkListStore, _iter::GtkTreeIterLike, _column::Integer, _value::GValueLike) ret = ccall(("gtk_list_store_set_value", libgtk4), Nothing, (Ptr{GObject}, Ptr{_GtkTreeIter}, Int32, Ptr{_GValue}), instance, _iter, _column, _value) nothing end - function set(instance::GtkListStore, _iter::Union{GtkTreeIter, Ref{_GtkTreeIter}}, _columns, _values) + function set(instance::GtkListStore, _iter::GtkTreeIterLike, _columns, _values) _columns_arr = convert(Vector{Int32}, _columns) _values_arr = convert(Vector{_GValue}, _values) _n_values = length(_columns) @@ -11869,17 +12330,17 @@ $(Expr(:toplevel, quote ret = ccall(("gtk_list_store_set_valuesv", libgtk4), Nothing, (Ptr{GObject}, Ptr{_GtkTreeIter}, Ptr{Int32}, Ptr{_GValue}, Int32), instance, _iter, _columns_arr, _values_arr, _n_values) nothing end - function swap(instance::GtkListStore, _a::Union{GtkTreeIter, Ref{_GtkTreeIter}}, _b::Union{GtkTreeIter, Ref{_GtkTreeIter}}) + function swap(instance::GtkListStore, _a::GtkTreeIterLike, _b::GtkTreeIterLike) ret = ccall(("gtk_list_store_swap", libgtk4), Nothing, (Ptr{GObject}, Ptr{_GtkTreeIter}, Ptr{_GtkTreeIter}), instance, _a, _b) nothing end function get_buildable_id(instance::GtkListStore) get_buildable_id(GtkBuildable(instance)) end - function drag_data_received(instance::GtkListStore, _dest::GtkTreePath, _value::Union{GValue, Ref{_GValue}}) + function drag_data_received(instance::GtkListStore, _dest::GtkTreePath, _value::GValueLike) drag_data_received(GtkTreeDragDest(instance), _dest, _value) end - function row_drop_possible(instance::GtkListStore, _dest_path::GtkTreePath, _value::Union{GValue, Ref{_GValue}}) + function row_drop_possible(instance::GtkListStore, _dest_path::GtkTreePath, _value::GValueLike) row_drop_possible(GtkTreeDragDest(instance), _dest_path, _value) end function drag_data_delete(instance::GtkListStore, _path::GtkTreePath) @@ -11915,55 +12376,55 @@ $(Expr(:toplevel, quote function get_n_columns(instance::GtkListStore) get_n_columns(GtkTreeModel(instance)) end - function get_path(instance::GtkListStore, _iter::Union{GtkTreeIter, Ref{_GtkTreeIter}}) + function get_path(instance::GtkListStore, _iter::GtkTreeIterLike) get_path(GtkTreeModel(instance), _iter) end - function get_string_from_iter(instance::GtkListStore, _iter::Union{GtkTreeIter, Ref{_GtkTreeIter}}) + function get_string_from_iter(instance::GtkListStore, _iter::GtkTreeIterLike) get_string_from_iter(GtkTreeModel(instance), _iter) end - function get_value(instance::GtkListStore, _iter::Union{GtkTreeIter, Ref{_GtkTreeIter}}, _column::Integer) + function get_value(instance::GtkListStore, _iter::GtkTreeIterLike, _column::Integer) get_value(GtkTreeModel(instance), _iter, _column) end - function iter_children(instance::GtkListStore, _parent::Maybe(Union{GtkTreeIter, Ref{_GtkTreeIter}})) + function iter_children(instance::GtkListStore, _parent::Maybe(GtkTreeIterLike)) iter_children(GtkTreeModel(instance), _parent) end - function iter_has_child(instance::GtkListStore, _iter::Union{GtkTreeIter, Ref{_GtkTreeIter}}) + function iter_has_child(instance::GtkListStore, _iter::GtkTreeIterLike) iter_has_child(GtkTreeModel(instance), _iter) end - function iter_n_children(instance::GtkListStore, _iter::Maybe(Union{GtkTreeIter, Ref{_GtkTreeIter}})) + function iter_n_children(instance::GtkListStore, _iter::Maybe(GtkTreeIterLike)) iter_n_children(GtkTreeModel(instance), _iter) end - function iter_next(instance::GtkListStore, _iter::Union{GtkTreeIter, Ref{_GtkTreeIter}}) + function iter_next(instance::GtkListStore, _iter::GtkTreeIterLike) iter_next(GtkTreeModel(instance), _iter) end - function iter_nth_child(instance::GtkListStore, _parent::Maybe(Union{GtkTreeIter, Ref{_GtkTreeIter}}), _n::Integer) + function iter_nth_child(instance::GtkListStore, _parent::Maybe(GtkTreeIterLike), _n::Integer) iter_nth_child(GtkTreeModel(instance), _parent, _n) end - function iter_parent(instance::GtkListStore, _child::Union{GtkTreeIter, Ref{_GtkTreeIter}}) + function iter_parent(instance::GtkListStore, _child::GtkTreeIterLike) iter_parent(GtkTreeModel(instance), _child) end - function iter_previous(instance::GtkListStore, _iter::Union{GtkTreeIter, Ref{_GtkTreeIter}}) + function iter_previous(instance::GtkListStore, _iter::GtkTreeIterLike) iter_previous(GtkTreeModel(instance), _iter) end - function ref_node(instance::GtkListStore, _iter::Union{GtkTreeIter, Ref{_GtkTreeIter}}) + function ref_node(instance::GtkListStore, _iter::GtkTreeIterLike) ref_node(GtkTreeModel(instance), _iter) end - function row_changed(instance::GtkListStore, _path::GtkTreePath, _iter::Union{GtkTreeIter, Ref{_GtkTreeIter}}) + function row_changed(instance::GtkListStore, _path::GtkTreePath, _iter::GtkTreeIterLike) row_changed(GtkTreeModel(instance), _path, _iter) end function row_deleted(instance::GtkListStore, _path::GtkTreePath) row_deleted(GtkTreeModel(instance), _path) end - function row_has_child_toggled(instance::GtkListStore, _path::GtkTreePath, _iter::Union{GtkTreeIter, Ref{_GtkTreeIter}}) + function row_has_child_toggled(instance::GtkListStore, _path::GtkTreePath, _iter::GtkTreeIterLike) row_has_child_toggled(GtkTreeModel(instance), _path, _iter) end - function row_inserted(instance::GtkListStore, _path::GtkTreePath, _iter::Union{GtkTreeIter, Ref{_GtkTreeIter}}) + function row_inserted(instance::GtkListStore, _path::GtkTreePath, _iter::GtkTreeIterLike) row_inserted(GtkTreeModel(instance), _path, _iter) end - function rows_reordered(instance::GtkListStore, _path::GtkTreePath, _iter::Maybe(Union{GtkTreeIter, Ref{_GtkTreeIter}}), _new_order) + function rows_reordered(instance::GtkListStore, _path::GtkTreePath, _iter::Maybe(GtkTreeIterLike), _new_order) rows_reordered(GtkTreeModel(instance), _path, _iter, _new_order) end - function unref_node(instance::GtkListStore, _iter::Union{GtkTreeIter, Ref{_GtkTreeIter}}) + function unref_node(instance::GtkListStore, _iter::GtkTreeIterLike) unref_node(GtkTreeModel(instance), _iter) end function get_sort_column_id(instance::GtkListStore) @@ -14228,7 +14689,7 @@ $(Expr(:toplevel, quote ret = ccall(("gtk_popover_set_offset", libgtk4), Nothing, (Ptr{GObject}, Int32, Int32), instance, _x_offset, _y_offset) nothing end - function set_pointing_to(instance::GtkPopover, _rect::Maybe(Union{GdkRectangle, Ref{_GdkRectangle}})) + function set_pointing_to(instance::GtkPopover, _rect::Maybe(GdkRectangleLike)) _rect_maybe = nothing_to_null(_rect) ret = ccall(("gtk_popover_set_pointing_to", libgtk4), Nothing, (Ptr{GObject}, Ptr{_GdkRectangle}), instance, _rect_maybe) nothing @@ -16271,7 +16732,7 @@ $(Expr(:toplevel, quote ret2 = convert(Bool, ret) ret2 end - function print(instance::GtkShortcutAction, _string::Union{GString, Ref{_GString}}) + function print(instance::GtkShortcutAction, _string::GStringLike) ret = ccall(("gtk_shortcut_action_print", libgtk4), Nothing, (Ptr{GObject}, Ptr{_GString}), instance, _string) nothing end @@ -16424,11 +16885,11 @@ $(Expr(:toplevel, quote ret = ccall(("gtk_shortcut_trigger_hash", libgtk4), UInt32, (Ptr{GObject},), instance) ret end - function print(instance::GtkShortcutTrigger, _string::Union{GString, Ref{_GString}}) + function print(instance::GtkShortcutTrigger, _string::GStringLike) ret = ccall(("gtk_shortcut_trigger_print", libgtk4), Nothing, (Ptr{GObject}, Ptr{_GString}), instance, _string) nothing end - function print_label(instance::GtkShortcutTrigger, _display::GdkDisplay, _string::Union{GString, Ref{_GString}}) + function print_label(instance::GtkShortcutTrigger, _display::GdkDisplay, _string::GStringLike) ret = ccall(("gtk_shortcut_trigger_print_label", libgtk4), Cint, (Ptr{GObject}, Ptr{GObject}, Ptr{_GString}), instance, _display, _string) ret2 = convert(Bool, ret) ret2 @@ -16908,76 +17369,76 @@ $(Expr(:toplevel, quote ret2 = GtkSnapshotLeaf(ret, true) ret2 end - function append_border(instance::GtkSnapshot, _outline::Union{GskRoundedRect, Ref{_GskRoundedRect}}, _border_width, _border_color) + function append_border(instance::GtkSnapshot, _outline::GskRoundedRectLike, _border_width, _border_color) _border_width_arr = convert(Vector{Float32}, _border_width) _border_color_arr = convert(Vector{_GdkRGBA}, _border_color) ret = ccall(("gtk_snapshot_append_border", libgtk4), Nothing, (Ptr{GObject}, Ptr{_GskRoundedRect}, Ptr{Float32}, Ptr{_GdkRGBA}), instance, _outline, _border_width_arr, _border_color_arr) nothing end - function append_cairo(instance::GtkSnapshot, _bounds::Union{GrapheneRect, Ref{_GrapheneRect}}) + function append_cairo(instance::GtkSnapshot, _bounds::GrapheneRectLike) ret = ccall(("gtk_snapshot_append_cairo", libgtk4), Ptr{cairoContext}, (Ptr{GObject}, Ptr{_GrapheneRect}), instance, _bounds) ret2 = convert(cairoContext, ret, true) ret2 end - function append_color(instance::GtkSnapshot, _color::Union{GdkRGBA, Ref{_GdkRGBA}}, _bounds::Union{GrapheneRect, Ref{_GrapheneRect}}) + function append_color(instance::GtkSnapshot, _color::GdkRGBALike, _bounds::GrapheneRectLike) ret = ccall(("gtk_snapshot_append_color", libgtk4), Nothing, (Ptr{GObject}, Ptr{_GdkRGBA}, Ptr{_GrapheneRect}), instance, _color, _bounds) nothing end - function append_conic_gradient(instance::GtkSnapshot, _bounds::Union{GrapheneRect, Ref{_GrapheneRect}}, _center::Union{GraphenePoint, Ref{_GraphenePoint}}, _rotation::Real, _stops) + function append_conic_gradient(instance::GtkSnapshot, _bounds::GrapheneRectLike, _center::GraphenePointLike, _rotation::Real, _stops) _stops_arr = convert(Vector{_GskColorStop}, _stops) _n_stops = length(_stops) ret = ccall(("gtk_snapshot_append_conic_gradient", libgtk4), Nothing, (Ptr{GObject}, Ptr{_GrapheneRect}, Ptr{_GraphenePoint}, Float32, Ptr{_GskColorStop}, UInt64), instance, _bounds, _center, _rotation, _stops_arr, _n_stops) nothing end - function append_fill(instance::GtkSnapshot, _path::GskPath, _fill_rule, _color::Union{GdkRGBA, Ref{_GdkRGBA}}) + function append_fill(instance::GtkSnapshot, _path::GskPath, _fill_rule, _color::GdkRGBALike) ret = ccall(("gtk_snapshot_append_fill", libgtk4), Nothing, (Ptr{GObject}, Ptr{GskPath}, UInt32, Ptr{_GdkRGBA}), instance, _path, _fill_rule, _color) nothing end - function append_inset_shadow(instance::GtkSnapshot, _outline::Union{GskRoundedRect, Ref{_GskRoundedRect}}, _color::Union{GdkRGBA, Ref{_GdkRGBA}}, _dx::Real, _dy::Real, _spread::Real, _blur_radius::Real) + function append_inset_shadow(instance::GtkSnapshot, _outline::GskRoundedRectLike, _color::GdkRGBALike, _dx::Real, _dy::Real, _spread::Real, _blur_radius::Real) ret = ccall(("gtk_snapshot_append_inset_shadow", libgtk4), Nothing, (Ptr{GObject}, Ptr{_GskRoundedRect}, Ptr{_GdkRGBA}, Float32, Float32, Float32, Float32), instance, _outline, _color, _dx, _dy, _spread, _blur_radius) nothing end - function append_layout(instance::GtkSnapshot, _layout::PangoLayout, _color::Union{GdkRGBA, Ref{_GdkRGBA}}) + function append_layout(instance::GtkSnapshot, _layout::PangoLayout, _color::GdkRGBALike) ret = ccall(("gtk_snapshot_append_layout", libgtk4), Nothing, (Ptr{GObject}, Ptr{GObject}, Ptr{_GdkRGBA}), instance, _layout, _color) nothing end - function append_linear_gradient(instance::GtkSnapshot, _bounds::Union{GrapheneRect, Ref{_GrapheneRect}}, _start_point::Union{GraphenePoint, Ref{_GraphenePoint}}, _end_point::Union{GraphenePoint, Ref{_GraphenePoint}}, _stops) + function append_linear_gradient(instance::GtkSnapshot, _bounds::GrapheneRectLike, _start_point::GraphenePointLike, _end_point::GraphenePointLike, _stops) _stops_arr = convert(Vector{_GskColorStop}, _stops) _n_stops = length(_stops) ret = ccall(("gtk_snapshot_append_linear_gradient", libgtk4), Nothing, (Ptr{GObject}, Ptr{_GrapheneRect}, Ptr{_GraphenePoint}, Ptr{_GraphenePoint}, Ptr{_GskColorStop}, UInt64), instance, _bounds, _start_point, _end_point, _stops_arr, _n_stops) nothing end - function append_outset_shadow(instance::GtkSnapshot, _outline::Union{GskRoundedRect, Ref{_GskRoundedRect}}, _color::Union{GdkRGBA, Ref{_GdkRGBA}}, _dx::Real, _dy::Real, _spread::Real, _blur_radius::Real) + function append_outset_shadow(instance::GtkSnapshot, _outline::GskRoundedRectLike, _color::GdkRGBALike, _dx::Real, _dy::Real, _spread::Real, _blur_radius::Real) ret = ccall(("gtk_snapshot_append_outset_shadow", libgtk4), Nothing, (Ptr{GObject}, Ptr{_GskRoundedRect}, Ptr{_GdkRGBA}, Float32, Float32, Float32, Float32), instance, _outline, _color, _dx, _dy, _spread, _blur_radius) nothing end - function append_radial_gradient(instance::GtkSnapshot, _bounds::Union{GrapheneRect, Ref{_GrapheneRect}}, _center::Union{GraphenePoint, Ref{_GraphenePoint}}, _hradius::Real, _vradius::Real, _start::Real, _end::Real, _stops) + function append_radial_gradient(instance::GtkSnapshot, _bounds::GrapheneRectLike, _center::GraphenePointLike, _hradius::Real, _vradius::Real, _start::Real, _end::Real, _stops) _stops_arr = convert(Vector{_GskColorStop}, _stops) _n_stops = length(_stops) ret = ccall(("gtk_snapshot_append_radial_gradient", libgtk4), Nothing, (Ptr{GObject}, Ptr{_GrapheneRect}, Ptr{_GraphenePoint}, Float32, Float32, Float32, Float32, Ptr{_GskColorStop}, UInt64), instance, _bounds, _center, _hradius, _vradius, _start, _end, _stops_arr, _n_stops) nothing end - function append_repeating_linear_gradient(instance::GtkSnapshot, _bounds::Union{GrapheneRect, Ref{_GrapheneRect}}, _start_point::Union{GraphenePoint, Ref{_GraphenePoint}}, _end_point::Union{GraphenePoint, Ref{_GraphenePoint}}, _stops) + function append_repeating_linear_gradient(instance::GtkSnapshot, _bounds::GrapheneRectLike, _start_point::GraphenePointLike, _end_point::GraphenePointLike, _stops) _stops_arr = convert(Vector{_GskColorStop}, _stops) _n_stops = length(_stops) ret = ccall(("gtk_snapshot_append_repeating_linear_gradient", libgtk4), Nothing, (Ptr{GObject}, Ptr{_GrapheneRect}, Ptr{_GraphenePoint}, Ptr{_GraphenePoint}, Ptr{_GskColorStop}, UInt64), instance, _bounds, _start_point, _end_point, _stops_arr, _n_stops) nothing end - function append_repeating_radial_gradient(instance::GtkSnapshot, _bounds::Union{GrapheneRect, Ref{_GrapheneRect}}, _center::Union{GraphenePoint, Ref{_GraphenePoint}}, _hradius::Real, _vradius::Real, _start::Real, _end::Real, _stops) + function append_repeating_radial_gradient(instance::GtkSnapshot, _bounds::GrapheneRectLike, _center::GraphenePointLike, _hradius::Real, _vradius::Real, _start::Real, _end::Real, _stops) _stops_arr = convert(Vector{_GskColorStop}, _stops) _n_stops = length(_stops) ret = ccall(("gtk_snapshot_append_repeating_radial_gradient", libgtk4), Nothing, (Ptr{GObject}, Ptr{_GrapheneRect}, Ptr{_GraphenePoint}, Float32, Float32, Float32, Float32, Ptr{_GskColorStop}, UInt64), instance, _bounds, _center, _hradius, _vradius, _start, _end, _stops_arr, _n_stops) nothing end - function append_scaled_texture(instance::GtkSnapshot, _texture::GdkTexture, _filter, _bounds::Union{GrapheneRect, Ref{_GrapheneRect}}) + function append_scaled_texture(instance::GtkSnapshot, _texture::GdkTexture, _filter, _bounds::GrapheneRectLike) ret = ccall(("gtk_snapshot_append_scaled_texture", libgtk4), Nothing, (Ptr{GObject}, Ptr{GObject}, UInt32, Ptr{_GrapheneRect}), instance, _texture, _filter, _bounds) nothing end - function append_stroke(instance::GtkSnapshot, _path::GskPath, _stroke::GskStroke, _color::Union{GdkRGBA, Ref{_GdkRGBA}}) + function append_stroke(instance::GtkSnapshot, _path::GskPath, _stroke::GskStroke, _color::GdkRGBALike) ret = ccall(("gtk_snapshot_append_stroke", libgtk4), Nothing, (Ptr{GObject}, Ptr{GskPath}, Ptr{GskStroke}, Ptr{_GdkRGBA}), instance, _path, _stroke, _color) nothing end - function append_texture(instance::GtkSnapshot, _texture::GdkTexture, _bounds::Union{GrapheneRect, Ref{_GrapheneRect}}) + function append_texture(instance::GtkSnapshot, _texture::GdkTexture, _bounds::GrapheneRectLike) ret = ccall(("gtk_snapshot_append_texture", libgtk4), Nothing, (Ptr{GObject}, Ptr{GObject}, Ptr{_GrapheneRect}), instance, _texture, _bounds) nothing end @@ -17001,11 +17462,11 @@ $(Expr(:toplevel, quote ret = ccall(("gtk_snapshot_push_blur", libgtk4), Nothing, (Ptr{GObject}, Float64), instance, _radius) nothing end - function push_clip(instance::GtkSnapshot, _bounds::Union{GrapheneRect, Ref{_GrapheneRect}}) + function push_clip(instance::GtkSnapshot, _bounds::GrapheneRectLike) ret = ccall(("gtk_snapshot_push_clip", libgtk4), Nothing, (Ptr{GObject}, Ptr{_GrapheneRect}), instance, _bounds) nothing end - function push_color_matrix(instance::GtkSnapshot, _color_matrix::Union{GrapheneMatrix, Ref{_GrapheneMatrix}}, _color_offset::Union{GrapheneVec4, Ref{_GrapheneVec4}}) + function push_color_matrix(instance::GtkSnapshot, _color_matrix::GrapheneMatrixLike, _color_offset::GrapheneVec4Like) ret = ccall(("gtk_snapshot_push_color_matrix", libgtk4), Nothing, (Ptr{GObject}, Ptr{_GrapheneMatrix}, Ptr{_GrapheneVec4}), instance, _color_matrix, _color_offset) nothing end @@ -17017,7 +17478,7 @@ $(Expr(:toplevel, quote ret = ccall(("gtk_snapshot_push_fill", libgtk4), Nothing, (Ptr{GObject}, Ptr{GskPath}, UInt32), instance, _path, _fill_rule) nothing end - function push_gl_shader(instance::GtkSnapshot, _shader::GskGLShader, _bounds::Union{GrapheneRect, Ref{_GrapheneRect}}, _take_args::GBytes) + function push_gl_shader(instance::GtkSnapshot, _shader::GskGLShader, _bounds::GrapheneRectLike, _take_args::GBytes) ret = ccall(("gtk_snapshot_push_gl_shader", libgtk4), Nothing, (Ptr{GObject}, Ptr{GObject}, Ptr{_GrapheneRect}, Ptr{GBytes}), instance, _shader, _bounds, _take_args) nothing end @@ -17029,12 +17490,12 @@ $(Expr(:toplevel, quote ret = ccall(("gtk_snapshot_push_opacity", libgtk4), Nothing, (Ptr{GObject}, Float64), instance, _opacity) nothing end - function push_repeat(instance::GtkSnapshot, _bounds::Union{GrapheneRect, Ref{_GrapheneRect}}, _child_bounds::Maybe(Union{GrapheneRect, Ref{_GrapheneRect}})) + function push_repeat(instance::GtkSnapshot, _bounds::GrapheneRectLike, _child_bounds::Maybe(GrapheneRectLike)) _child_bounds_maybe = nothing_to_null(_child_bounds) ret = ccall(("gtk_snapshot_push_repeat", libgtk4), Nothing, (Ptr{GObject}, Ptr{_GrapheneRect}, Ptr{_GrapheneRect}), instance, _bounds, _child_bounds_maybe) nothing end - function push_rounded_clip(instance::GtkSnapshot, _bounds::Union{GskRoundedRect, Ref{_GskRoundedRect}}) + function push_rounded_clip(instance::GtkSnapshot, _bounds::GskRoundedRectLike) ret = ccall(("gtk_snapshot_push_rounded_clip", libgtk4), Nothing, (Ptr{GObject}, Ptr{_GskRoundedRect}), instance, _bounds) nothing end @@ -17076,7 +17537,7 @@ $(Expr(:toplevel, quote ret = ccall(("gtk_snapshot_rotate", libgtk4), Nothing, (Ptr{GObject}, Float32), instance, _angle) nothing end - function rotate_3d(instance::GtkSnapshot, _angle::Real, _axis::Union{GrapheneVec3, Ref{_GrapheneVec3}}) + function rotate_3d(instance::GtkSnapshot, _angle::Real, _axis::GrapheneVec3Like) ret = ccall(("gtk_snapshot_rotate_3d", libgtk4), Nothing, (Ptr{GObject}, Float32, Ptr{_GrapheneVec3}), instance, _angle, _axis) nothing end @@ -17097,7 +17558,7 @@ $(Expr(:toplevel, quote ret2 = convert(GskRenderNode, ret) ret2 end - function to_paintable(instance::GtkSnapshot, _size::Maybe(Union{GrapheneSize, Ref{_GrapheneSize}})) + function to_paintable(instance::GtkSnapshot, _size::Maybe(GrapheneSizeLike)) _size_maybe = nothing_to_null(_size) ret = ccall(("gtk_snapshot_to_paintable", libgtk4), Ptr{GObject}, (Ptr{GObject}, Ptr{_GrapheneSize}), instance, _size_maybe) ret2 = GLib.find_leaf_type_if_not_null(ret, true) @@ -17108,15 +17569,15 @@ $(Expr(:toplevel, quote ret = ccall(("gtk_snapshot_transform", libgtk4), Nothing, (Ptr{GObject}, Ptr{GskTransform}), instance, _transform_maybe) nothing end - function transform_matrix(instance::GtkSnapshot, _matrix::Union{GrapheneMatrix, Ref{_GrapheneMatrix}}) + function transform_matrix(instance::GtkSnapshot, _matrix::GrapheneMatrixLike) ret = ccall(("gtk_snapshot_transform_matrix", libgtk4), Nothing, (Ptr{GObject}, Ptr{_GrapheneMatrix}), instance, _matrix) nothing end - function translate(instance::GtkSnapshot, _point::Union{GraphenePoint, Ref{_GraphenePoint}}) + function translate(instance::GtkSnapshot, _point::GraphenePointLike) ret = ccall(("gtk_snapshot_translate", libgtk4), Nothing, (Ptr{GObject}, Ptr{_GraphenePoint}), instance, _point) nothing end - function translate_3d(instance::GtkSnapshot, _point::Union{GraphenePoint3D, Ref{_GraphenePoint3D}}) + function translate_3d(instance::GtkSnapshot, _point::GraphenePoint3DLike) ret = ccall(("gtk_snapshot_translate_3d", libgtk4), Nothing, (Ptr{GObject}, Ptr{_GraphenePoint3D}), instance, _point) nothing end @@ -18664,7 +19125,7 @@ $(Expr(:toplevel, quote ret2 = GtkTextBufferLeaf(ret, true) ret2 end - function add_mark(instance::GtkTextBuffer, _mark::GtkTextMark, _where::Union{GtkTextIter, Ref{_GtkTextIter}}) + function add_mark(instance::GtkTextBuffer, _mark::GtkTextMark, _where::GtkTextIterLike) ret = ccall(("gtk_text_buffer_add_mark", libgtk4), Nothing, (Ptr{GObject}, Ptr{GObject}, Ptr{_GtkTextIter}), instance, _mark, _where) nothing end @@ -18672,15 +19133,15 @@ $(Expr(:toplevel, quote ret = ccall(("gtk_text_buffer_add_selection_clipboard", libgtk4), Nothing, (Ptr{GObject}, Ptr{GObject}), instance, _clipboard) nothing end - function apply_tag(instance::GtkTextBuffer, _tag::GtkTextTag, _start::Union{GtkTextIter, Ref{_GtkTextIter}}, _end::Union{GtkTextIter, Ref{_GtkTextIter}}) + function apply_tag(instance::GtkTextBuffer, _tag::GtkTextTag, _start::GtkTextIterLike, _end::GtkTextIterLike) ret = ccall(("gtk_text_buffer_apply_tag", libgtk4), Nothing, (Ptr{GObject}, Ptr{GObject}, Ptr{_GtkTextIter}, Ptr{_GtkTextIter}), instance, _tag, _start, _end) nothing end - function apply_tag_by_name(instance::GtkTextBuffer, _name::Union{AbstractString, Symbol}, _start::Union{GtkTextIter, Ref{_GtkTextIter}}, _end::Union{GtkTextIter, Ref{_GtkTextIter}}) + function apply_tag_by_name(instance::GtkTextBuffer, _name::Union{AbstractString, Symbol}, _start::GtkTextIterLike, _end::GtkTextIterLike) ret = ccall(("gtk_text_buffer_apply_tag_by_name", libgtk4), Nothing, (Ptr{GObject}, Cstring, Ptr{_GtkTextIter}, Ptr{_GtkTextIter}), instance, _name, _start, _end) nothing end - function backspace(instance::GtkTextBuffer, _iter::Union{GtkTextIter, Ref{_GtkTextIter}}, _interactive::Bool, _default_editable::Bool) + function backspace(instance::GtkTextBuffer, _iter::GtkTextIterLike, _interactive::Bool, _default_editable::Bool) ret = ccall(("gtk_text_buffer_backspace", libgtk4), Cint, (Ptr{GObject}, Ptr{_GtkTextIter}, Cint, Cint), instance, _iter, _interactive, _default_editable) ret2 = convert(Bool, ret) ret2 @@ -18697,12 +19158,12 @@ $(Expr(:toplevel, quote ret = ccall(("gtk_text_buffer_copy_clipboard", libgtk4), Nothing, (Ptr{GObject}, Ptr{GObject}), instance, _clipboard) nothing end - function create_child_anchor(instance::GtkTextBuffer, _iter::Union{GtkTextIter, Ref{_GtkTextIter}}) + function create_child_anchor(instance::GtkTextBuffer, _iter::GtkTextIterLike) ret = ccall(("gtk_text_buffer_create_child_anchor", libgtk4), Ptr{GObject}, (Ptr{GObject}, Ptr{_GtkTextIter}), instance, _iter) ret2 = convert(GtkTextChildAnchor, ret, false) ret2 end - function create_mark(instance::GtkTextBuffer, _mark_name::Maybe(Union{AbstractString, Symbol}), _where::Union{GtkTextIter, Ref{_GtkTextIter}}, _left_gravity::Bool) + function create_mark(instance::GtkTextBuffer, _mark_name::Maybe(Union{AbstractString, Symbol}), _where::GtkTextIterLike, _left_gravity::Bool) _mark_name_maybe = nothing_to_null(_mark_name) ret = ccall(("gtk_text_buffer_create_mark", libgtk4), Ptr{GObject}, (Ptr{GObject}, Cstring, Ptr{_GtkTextIter}, Cint), instance, _mark_name_maybe, _where, _left_gravity) ret2 = convert(GtkTextMark, ret, false) @@ -18712,11 +19173,11 @@ $(Expr(:toplevel, quote ret = ccall(("gtk_text_buffer_cut_clipboard", libgtk4), Nothing, (Ptr{GObject}, Ptr{GObject}, Cint), instance, _clipboard, _default_editable) nothing end - function delete(instance::GtkTextBuffer, _start::Union{GtkTextIter, Ref{_GtkTextIter}}, _end::Union{GtkTextIter, Ref{_GtkTextIter}}) + function delete(instance::GtkTextBuffer, _start::GtkTextIterLike, _end::GtkTextIterLike) ret = ccall(("gtk_text_buffer_delete", libgtk4), Nothing, (Ptr{GObject}, Ptr{_GtkTextIter}, Ptr{_GtkTextIter}), instance, _start, _end) nothing end - function delete_interactive(instance::GtkTextBuffer, _start_iter::Union{GtkTextIter, Ref{_GtkTextIter}}, _end_iter::Union{GtkTextIter, Ref{_GtkTextIter}}, _default_editable::Bool) + function delete_interactive(instance::GtkTextBuffer, _start_iter::GtkTextIterLike, _end_iter::GtkTextIterLike, _default_editable::Bool) ret = ccall(("gtk_text_buffer_delete_interactive", libgtk4), Cint, (Ptr{GObject}, Ptr{_GtkTextIter}, Ptr{_GtkTextIter}, Cint), instance, _start_iter, _end_iter, _default_editable) ret2 = convert(Bool, ret) ret2 @@ -18861,7 +19322,7 @@ $(Expr(:toplevel, quote ret2 = convert(GdkContentProvider, ret, true) ret2 end - function get_slice(instance::GtkTextBuffer, _start::Union{GtkTextIter, Ref{_GtkTextIter}}, _end::Union{GtkTextIter, Ref{_GtkTextIter}}, _include_hidden_chars::Bool) + function get_slice(instance::GtkTextBuffer, _start::GtkTextIterLike, _end::GtkTextIterLike, _include_hidden_chars::Bool) ret = ccall(("gtk_text_buffer_get_slice", libgtk4), Cstring, (Ptr{GObject}, Ptr{_GtkTextIter}, Ptr{_GtkTextIter}, Cint), instance, _start, _end, _include_hidden_chars) ret2 = string_or_nothing(ret, true) ret2 @@ -18877,12 +19338,12 @@ $(Expr(:toplevel, quote ret2 = convert(GtkTextTagTable, ret, false) ret2 end - function get_text(instance::GtkTextBuffer, _start::Union{GtkTextIter, Ref{_GtkTextIter}}, _end::Union{GtkTextIter, Ref{_GtkTextIter}}, _include_hidden_chars::Bool) + function get_text(instance::GtkTextBuffer, _start::GtkTextIterLike, _end::GtkTextIterLike, _include_hidden_chars::Bool) ret = ccall(("gtk_text_buffer_get_text", libgtk4), Cstring, (Ptr{GObject}, Ptr{_GtkTextIter}, Ptr{_GtkTextIter}, Cint), instance, _start, _end, _include_hidden_chars) ret2 = string_or_nothing(ret, true) ret2 end - function insert(instance::GtkTextBuffer, _iter::Union{GtkTextIter, Ref{_GtkTextIter}}, _text::Union{AbstractString, Symbol}, _len::Integer) + function insert(instance::GtkTextBuffer, _iter::GtkTextIterLike, _text::Union{AbstractString, Symbol}, _len::Integer) ret = ccall(("gtk_text_buffer_insert", libgtk4), Nothing, (Ptr{GObject}, Ptr{_GtkTextIter}, Cstring, Int32), instance, _iter, _text, _len) nothing end @@ -18890,11 +19351,11 @@ $(Expr(:toplevel, quote ret = ccall(("gtk_text_buffer_insert_at_cursor", libgtk4), Nothing, (Ptr{GObject}, Cstring, Int32), instance, _text, _len) nothing end - function insert_child_anchor(instance::GtkTextBuffer, _iter::Union{GtkTextIter, Ref{_GtkTextIter}}, _anchor::GtkTextChildAnchor) + function insert_child_anchor(instance::GtkTextBuffer, _iter::GtkTextIterLike, _anchor::GtkTextChildAnchor) ret = ccall(("gtk_text_buffer_insert_child_anchor", libgtk4), Nothing, (Ptr{GObject}, Ptr{_GtkTextIter}, Ptr{GObject}), instance, _iter, _anchor) nothing end - function insert_interactive(instance::GtkTextBuffer, _iter::Union{GtkTextIter, Ref{_GtkTextIter}}, _text::Union{AbstractString, Symbol}, _len::Integer, _default_editable::Bool) + function insert_interactive(instance::GtkTextBuffer, _iter::GtkTextIterLike, _text::Union{AbstractString, Symbol}, _len::Integer, _default_editable::Bool) ret = ccall(("gtk_text_buffer_insert_interactive", libgtk4), Cint, (Ptr{GObject}, Ptr{_GtkTextIter}, Cstring, Int32, Cint), instance, _iter, _text, _len, _default_editable) ret2 = convert(Bool, ret) ret2 @@ -18904,37 +19365,37 @@ $(Expr(:toplevel, quote ret2 = convert(Bool, ret) ret2 end - function insert_markup(instance::GtkTextBuffer, _iter::Union{GtkTextIter, Ref{_GtkTextIter}}, _markup::Union{AbstractString, Symbol}, _len::Integer) + function insert_markup(instance::GtkTextBuffer, _iter::GtkTextIterLike, _markup::Union{AbstractString, Symbol}, _len::Integer) ret = ccall(("gtk_text_buffer_insert_markup", libgtk4), Nothing, (Ptr{GObject}, Ptr{_GtkTextIter}, Cstring, Int32), instance, _iter, _markup, _len) nothing end - function insert_paintable(instance::GtkTextBuffer, _iter::Union{GtkTextIter, Ref{_GtkTextIter}}, _paintable::GdkPaintable) + function insert_paintable(instance::GtkTextBuffer, _iter::GtkTextIterLike, _paintable::GdkPaintable) ret = ccall(("gtk_text_buffer_insert_paintable", libgtk4), Nothing, (Ptr{GObject}, Ptr{_GtkTextIter}, Ptr{GObject}), instance, _iter, _paintable) nothing end - function insert_range(instance::GtkTextBuffer, _iter::Union{GtkTextIter, Ref{_GtkTextIter}}, _start::Union{GtkTextIter, Ref{_GtkTextIter}}, _end::Union{GtkTextIter, Ref{_GtkTextIter}}) + function insert_range(instance::GtkTextBuffer, _iter::GtkTextIterLike, _start::GtkTextIterLike, _end::GtkTextIterLike) ret = ccall(("gtk_text_buffer_insert_range", libgtk4), Nothing, (Ptr{GObject}, Ptr{_GtkTextIter}, Ptr{_GtkTextIter}, Ptr{_GtkTextIter}), instance, _iter, _start, _end) nothing end - function insert_range_interactive(instance::GtkTextBuffer, _iter::Union{GtkTextIter, Ref{_GtkTextIter}}, _start::Union{GtkTextIter, Ref{_GtkTextIter}}, _end::Union{GtkTextIter, Ref{_GtkTextIter}}, _default_editable::Bool) + function insert_range_interactive(instance::GtkTextBuffer, _iter::GtkTextIterLike, _start::GtkTextIterLike, _end::GtkTextIterLike, _default_editable::Bool) ret = ccall(("gtk_text_buffer_insert_range_interactive", libgtk4), Cint, (Ptr{GObject}, Ptr{_GtkTextIter}, Ptr{_GtkTextIter}, Ptr{_GtkTextIter}, Cint), instance, _iter, _start, _end, _default_editable) ret2 = convert(Bool, ret) ret2 end - function move_mark(instance::GtkTextBuffer, _mark::GtkTextMark, _where::Union{GtkTextIter, Ref{_GtkTextIter}}) + function move_mark(instance::GtkTextBuffer, _mark::GtkTextMark, _where::GtkTextIterLike) ret = ccall(("gtk_text_buffer_move_mark", libgtk4), Nothing, (Ptr{GObject}, Ptr{GObject}, Ptr{_GtkTextIter}), instance, _mark, _where) nothing end - function move_mark_by_name(instance::GtkTextBuffer, _name::Union{AbstractString, Symbol}, _where::Union{GtkTextIter, Ref{_GtkTextIter}}) + function move_mark_by_name(instance::GtkTextBuffer, _name::Union{AbstractString, Symbol}, _where::GtkTextIterLike) ret = ccall(("gtk_text_buffer_move_mark_by_name", libgtk4), Nothing, (Ptr{GObject}, Cstring, Ptr{_GtkTextIter}), instance, _name, _where) nothing end - function paste_clipboard(instance::GtkTextBuffer, _clipboard::GdkClipboard, _override_location::Maybe(Union{GtkTextIter, Ref{_GtkTextIter}}), _default_editable::Bool) + function paste_clipboard(instance::GtkTextBuffer, _clipboard::GdkClipboard, _override_location::Maybe(GtkTextIterLike), _default_editable::Bool) _override_location_maybe = nothing_to_null(_override_location) ret = ccall(("gtk_text_buffer_paste_clipboard", libgtk4), Nothing, (Ptr{GObject}, Ptr{GObject}, Ptr{_GtkTextIter}, Cint), instance, _clipboard, _override_location_maybe, _default_editable) nothing end - function place_cursor(instance::GtkTextBuffer, _where::Union{GtkTextIter, Ref{_GtkTextIter}}) + function place_cursor(instance::GtkTextBuffer, _where::GtkTextIterLike) ret = ccall(("gtk_text_buffer_place_cursor", libgtk4), Nothing, (Ptr{GObject}, Ptr{_GtkTextIter}), instance, _where) nothing end @@ -18942,7 +19403,7 @@ $(Expr(:toplevel, quote ret = ccall(("gtk_text_buffer_redo", libgtk4), Nothing, (Ptr{GObject},), instance) nothing end - function remove_all_tags(instance::GtkTextBuffer, _start::Union{GtkTextIter, Ref{_GtkTextIter}}, _end::Union{GtkTextIter, Ref{_GtkTextIter}}) + function remove_all_tags(instance::GtkTextBuffer, _start::GtkTextIterLike, _end::GtkTextIterLike) ret = ccall(("gtk_text_buffer_remove_all_tags", libgtk4), Nothing, (Ptr{GObject}, Ptr{_GtkTextIter}, Ptr{_GtkTextIter}), instance, _start, _end) nothing end @@ -18950,15 +19411,15 @@ $(Expr(:toplevel, quote ret = ccall(("gtk_text_buffer_remove_selection_clipboard", libgtk4), Nothing, (Ptr{GObject}, Ptr{GObject}), instance, _clipboard) nothing end - function remove_tag(instance::GtkTextBuffer, _tag::GtkTextTag, _start::Union{GtkTextIter, Ref{_GtkTextIter}}, _end::Union{GtkTextIter, Ref{_GtkTextIter}}) + function remove_tag(instance::GtkTextBuffer, _tag::GtkTextTag, _start::GtkTextIterLike, _end::GtkTextIterLike) ret = ccall(("gtk_text_buffer_remove_tag", libgtk4), Nothing, (Ptr{GObject}, Ptr{GObject}, Ptr{_GtkTextIter}, Ptr{_GtkTextIter}), instance, _tag, _start, _end) nothing end - function remove_tag_by_name(instance::GtkTextBuffer, _name::Union{AbstractString, Symbol}, _start::Union{GtkTextIter, Ref{_GtkTextIter}}, _end::Union{GtkTextIter, Ref{_GtkTextIter}}) + function remove_tag_by_name(instance::GtkTextBuffer, _name::Union{AbstractString, Symbol}, _start::GtkTextIterLike, _end::GtkTextIterLike) ret = ccall(("gtk_text_buffer_remove_tag_by_name", libgtk4), Nothing, (Ptr{GObject}, Cstring, Ptr{_GtkTextIter}, Ptr{_GtkTextIter}), instance, _name, _start, _end) nothing end - function select_range(instance::GtkTextBuffer, _ins::Union{GtkTextIter, Ref{_GtkTextIter}}, _bound::Union{GtkTextIter, Ref{_GtkTextIter}}) + function select_range(instance::GtkTextBuffer, _ins::GtkTextIterLike, _bound::GtkTextIterLike) ret = ccall(("gtk_text_buffer_select_range", libgtk4), Nothing, (Ptr{GObject}, Ptr{_GtkTextIter}, Ptr{_GtkTextIter}), instance, _ins, _bound) nothing end @@ -19116,12 +19577,12 @@ $(Expr(:toplevel, quote ret = ccall(("gtk_text_view_add_overlay", libgtk4), Nothing, (Ptr{GObject}, Ptr{GObject}, Int32, Int32), instance, _child, _xpos, _ypos) nothing end - function backward_display_line(instance::GtkTextView, _iter::Union{GtkTextIter, Ref{_GtkTextIter}}) + function backward_display_line(instance::GtkTextView, _iter::GtkTextIterLike) ret = ccall(("gtk_text_view_backward_display_line", libgtk4), Cint, (Ptr{GObject}, Ptr{_GtkTextIter}), instance, _iter) ret2 = convert(Bool, ret) ret2 end - function backward_display_line_start(instance::GtkTextView, _iter::Union{GtkTextIter, Ref{_GtkTextIter}}) + function backward_display_line_start(instance::GtkTextView, _iter::GtkTextIterLike) ret = ccall(("gtk_text_view_backward_display_line_start", libgtk4), Cint, (Ptr{GObject}, Ptr{_GtkTextIter}), instance, _iter) ret2 = convert(Bool, ret) ret2 @@ -19134,12 +19595,12 @@ $(Expr(:toplevel, quote _window_y = m_window_y[] (_window_x, _window_y) end - function forward_display_line(instance::GtkTextView, _iter::Union{GtkTextIter, Ref{_GtkTextIter}}) + function forward_display_line(instance::GtkTextView, _iter::GtkTextIterLike) ret = ccall(("gtk_text_view_forward_display_line", libgtk4), Cint, (Ptr{GObject}, Ptr{_GtkTextIter}), instance, _iter) ret2 = convert(Bool, ret) ret2 end - function forward_display_line_end(instance::GtkTextView, _iter::Union{GtkTextIter, Ref{_GtkTextIter}}) + function forward_display_line_end(instance::GtkTextView, _iter::GtkTextIterLike) ret = ccall(("gtk_text_view_forward_display_line_end", libgtk4), Cint, (Ptr{GObject}, Ptr{_GtkTextIter}), instance, _iter) ret2 = convert(Bool, ret) ret2 @@ -19158,7 +19619,7 @@ $(Expr(:toplevel, quote ret2 = convert(GtkTextBuffer, ret, false) ret2 end - function get_cursor_locations(instance::GtkTextView, _iter::Maybe(Union{GtkTextIter, Ref{_GtkTextIter}})) + function get_cursor_locations(instance::GtkTextView, _iter::Maybe(GtkTextIterLike)) _iter_maybe = nothing_to_null(_iter) m_strong = Ref{_GdkRectangle}() m_weak = Ref{_GdkRectangle}() @@ -19217,7 +19678,7 @@ $(Expr(:toplevel, quote _trailing = m_trailing[] (ret2, _iter, _trailing) end - function get_iter_location(instance::GtkTextView, _iter::Union{GtkTextIter, Ref{_GtkTextIter}}) + function get_iter_location(instance::GtkTextView, _iter::GtkTextIterLike) m_location = Ref{_GdkRectangle}() ret = ccall(("gtk_text_view_get_iter_location", libgtk4), Nothing, (Ptr{GObject}, Ptr{_GtkTextIter}, Ptr{_GdkRectangle}), instance, _iter, m_location) _location = m_location[] @@ -19240,7 +19701,7 @@ $(Expr(:toplevel, quote _line_top = m_line_top[] (_target_iter, _line_top) end - function get_line_yrange(instance::GtkTextView, _iter::Union{GtkTextIter, Ref{_GtkTextIter}}) + function get_line_yrange(instance::GtkTextView, _iter::GtkTextIterLike) m_y = Ref{Int32}() m_height = Ref{Int32}() ret = ccall(("gtk_text_view_get_line_yrange", libgtk4), Nothing, (Ptr{GObject}, Ptr{_GtkTextIter}, Ptr{Int32}, Ptr{Int32}), instance, _iter, m_y, m_height) @@ -19313,7 +19774,7 @@ $(Expr(:toplevel, quote ret = ccall(("gtk_text_view_move_overlay", libgtk4), Nothing, (Ptr{GObject}, Ptr{GObject}, Int32, Int32), instance, _child, _xpos, _ypos) nothing end - function move_visually(instance::GtkTextView, _iter::Union{GtkTextIter, Ref{_GtkTextIter}}, _count::Integer) + function move_visually(instance::GtkTextView, _iter::GtkTextIterLike, _count::Integer) ret = ccall(("gtk_text_view_move_visually", libgtk4), Cint, (Ptr{GObject}, Ptr{_GtkTextIter}, Int32), instance, _iter, _count) ret2 = convert(Bool, ret) ret2 @@ -19339,7 +19800,7 @@ $(Expr(:toplevel, quote ret = ccall(("gtk_text_view_scroll_mark_onscreen", libgtk4), Nothing, (Ptr{GObject}, Ptr{GObject}), instance, _mark) nothing end - function scroll_to_iter(instance::GtkTextView, _iter::Union{GtkTextIter, Ref{_GtkTextIter}}, _within_margin::Real, _use_align::Bool, _xalign::Real, _yalign::Real) + function scroll_to_iter(instance::GtkTextView, _iter::GtkTextIterLike, _within_margin::Real, _use_align::Bool, _xalign::Real, _yalign::Real) ret = ccall(("gtk_text_view_scroll_to_iter", libgtk4), Cint, (Ptr{GObject}, Ptr{_GtkTextIter}, Float64, Cint, Float64, Float64), instance, _iter, _within_margin, _use_align, _xalign, _yalign) ret2 = convert(Bool, ret) ret2 @@ -19435,7 +19896,7 @@ $(Expr(:toplevel, quote ret = ccall(("gtk_text_view_set_wrap_mode", libgtk4), Nothing, (Ptr{GObject}, UInt32), instance, _wrap_mode) nothing end - function starts_display_line(instance::GtkTextView, _iter::Union{GtkTextIter, Ref{_GtkTextIter}}) + function starts_display_line(instance::GtkTextView, _iter::GtkTextIterLike) ret = ccall(("gtk_text_view_starts_display_line", libgtk4), Cint, (Ptr{GObject}, Ptr{_GtkTextIter}), instance, _iter) ret2 = convert(Bool, ret) ret2 @@ -19664,7 +20125,7 @@ $(Expr(:toplevel, quote ret = ccall(("gtk_tooltip_set_text", libgtk4), Nothing, (Ptr{GObject}, Cstring), instance, _text_maybe) nothing end - function set_tip_area(instance::GtkTooltip, _rect::Union{GdkRectangle, Ref{_GdkRectangle}}) + function set_tip_area(instance::GtkTooltip, _rect::GdkRectangleLike) ret = ccall(("gtk_tooltip_set_tip_area", libgtk4), Nothing, (Ptr{GObject}, Ptr{_GdkRectangle}), instance, _rect) nothing end @@ -19887,7 +20348,7 @@ $(Expr(:toplevel, quote ret = ccall(("gtk_tree_model_filter_clear_cache", libgtk4), Nothing, (Ptr{GObject},), instance) nothing end - function convert_child_iter_to_iter(instance::GtkTreeModelFilter, _child_iter::Union{GtkTreeIter, Ref{_GtkTreeIter}}) + function convert_child_iter_to_iter(instance::GtkTreeModelFilter, _child_iter::GtkTreeIterLike) m_filter_iter = Ref{_GtkTreeIter}() ret = ccall(("gtk_tree_model_filter_convert_child_iter_to_iter", libgtk4), Cint, (Ptr{GObject}, Ptr{_GtkTreeIter}, Ptr{_GtkTreeIter}), instance, m_filter_iter, _child_iter) ret2 = convert(Bool, ret) @@ -19899,7 +20360,7 @@ $(Expr(:toplevel, quote ret2 = convert_if_not_null(GtkTreePath, ret, true) ret2 end - function convert_iter_to_child_iter(instance::GtkTreeModelFilter, _filter_iter::Union{GtkTreeIter, Ref{_GtkTreeIter}}) + function convert_iter_to_child_iter(instance::GtkTreeModelFilter, _filter_iter::GtkTreeIterLike) m_child_iter = Ref{_GtkTreeIter}() ret = ccall(("gtk_tree_model_filter_convert_iter_to_child_iter", libgtk4), Nothing, (Ptr{GObject}, Ptr{_GtkTreeIter}, Ptr{_GtkTreeIter}), instance, m_child_iter, _filter_iter) _child_iter = m_child_iter[] @@ -19959,55 +20420,55 @@ $(Expr(:toplevel, quote function get_n_columns(instance::GtkTreeModelFilter) get_n_columns(GtkTreeModel(instance)) end - function get_path(instance::GtkTreeModelFilter, _iter::Union{GtkTreeIter, Ref{_GtkTreeIter}}) + function get_path(instance::GtkTreeModelFilter, _iter::GtkTreeIterLike) get_path(GtkTreeModel(instance), _iter) end - function get_string_from_iter(instance::GtkTreeModelFilter, _iter::Union{GtkTreeIter, Ref{_GtkTreeIter}}) + function get_string_from_iter(instance::GtkTreeModelFilter, _iter::GtkTreeIterLike) get_string_from_iter(GtkTreeModel(instance), _iter) end - function get_value(instance::GtkTreeModelFilter, _iter::Union{GtkTreeIter, Ref{_GtkTreeIter}}, _column::Integer) + function get_value(instance::GtkTreeModelFilter, _iter::GtkTreeIterLike, _column::Integer) get_value(GtkTreeModel(instance), _iter, _column) end - function iter_children(instance::GtkTreeModelFilter, _parent::Maybe(Union{GtkTreeIter, Ref{_GtkTreeIter}})) + function iter_children(instance::GtkTreeModelFilter, _parent::Maybe(GtkTreeIterLike)) iter_children(GtkTreeModel(instance), _parent) end - function iter_has_child(instance::GtkTreeModelFilter, _iter::Union{GtkTreeIter, Ref{_GtkTreeIter}}) + function iter_has_child(instance::GtkTreeModelFilter, _iter::GtkTreeIterLike) iter_has_child(GtkTreeModel(instance), _iter) end - function iter_n_children(instance::GtkTreeModelFilter, _iter::Maybe(Union{GtkTreeIter, Ref{_GtkTreeIter}})) + function iter_n_children(instance::GtkTreeModelFilter, _iter::Maybe(GtkTreeIterLike)) iter_n_children(GtkTreeModel(instance), _iter) end - function iter_next(instance::GtkTreeModelFilter, _iter::Union{GtkTreeIter, Ref{_GtkTreeIter}}) + function iter_next(instance::GtkTreeModelFilter, _iter::GtkTreeIterLike) iter_next(GtkTreeModel(instance), _iter) end - function iter_nth_child(instance::GtkTreeModelFilter, _parent::Maybe(Union{GtkTreeIter, Ref{_GtkTreeIter}}), _n::Integer) + function iter_nth_child(instance::GtkTreeModelFilter, _parent::Maybe(GtkTreeIterLike), _n::Integer) iter_nth_child(GtkTreeModel(instance), _parent, _n) end - function iter_parent(instance::GtkTreeModelFilter, _child::Union{GtkTreeIter, Ref{_GtkTreeIter}}) + function iter_parent(instance::GtkTreeModelFilter, _child::GtkTreeIterLike) iter_parent(GtkTreeModel(instance), _child) end - function iter_previous(instance::GtkTreeModelFilter, _iter::Union{GtkTreeIter, Ref{_GtkTreeIter}}) + function iter_previous(instance::GtkTreeModelFilter, _iter::GtkTreeIterLike) iter_previous(GtkTreeModel(instance), _iter) end - function ref_node(instance::GtkTreeModelFilter, _iter::Union{GtkTreeIter, Ref{_GtkTreeIter}}) + function ref_node(instance::GtkTreeModelFilter, _iter::GtkTreeIterLike) ref_node(GtkTreeModel(instance), _iter) end - function row_changed(instance::GtkTreeModelFilter, _path::GtkTreePath, _iter::Union{GtkTreeIter, Ref{_GtkTreeIter}}) + function row_changed(instance::GtkTreeModelFilter, _path::GtkTreePath, _iter::GtkTreeIterLike) row_changed(GtkTreeModel(instance), _path, _iter) end function row_deleted(instance::GtkTreeModelFilter, _path::GtkTreePath) row_deleted(GtkTreeModel(instance), _path) end - function row_has_child_toggled(instance::GtkTreeModelFilter, _path::GtkTreePath, _iter::Union{GtkTreeIter, Ref{_GtkTreeIter}}) + function row_has_child_toggled(instance::GtkTreeModelFilter, _path::GtkTreePath, _iter::GtkTreeIterLike) row_has_child_toggled(GtkTreeModel(instance), _path, _iter) end - function row_inserted(instance::GtkTreeModelFilter, _path::GtkTreePath, _iter::Union{GtkTreeIter, Ref{_GtkTreeIter}}) + function row_inserted(instance::GtkTreeModelFilter, _path::GtkTreePath, _iter::GtkTreeIterLike) row_inserted(GtkTreeModel(instance), _path, _iter) end - function rows_reordered(instance::GtkTreeModelFilter, _path::GtkTreePath, _iter::Maybe(Union{GtkTreeIter, Ref{_GtkTreeIter}}), _new_order) + function rows_reordered(instance::GtkTreeModelFilter, _path::GtkTreePath, _iter::Maybe(GtkTreeIterLike), _new_order) rows_reordered(GtkTreeModel(instance), _path, _iter, _new_order) end - function unref_node(instance::GtkTreeModelFilter, _iter::Union{GtkTreeIter, Ref{_GtkTreeIter}}) + function unref_node(instance::GtkTreeModelFilter, _iter::GtkTreeIterLike) unref_node(GtkTreeModel(instance), _iter) end function TreeModelSort_new_with_model(_child_model::GtkTreeModel) @@ -20019,7 +20480,7 @@ $(Expr(:toplevel, quote ret = ccall(("gtk_tree_model_sort_clear_cache", libgtk4), Nothing, (Ptr{GObject},), instance) nothing end - function convert_child_iter_to_iter(instance::GtkTreeModelSort, _child_iter::Union{GtkTreeIter, Ref{_GtkTreeIter}}) + function convert_child_iter_to_iter(instance::GtkTreeModelSort, _child_iter::GtkTreeIterLike) m_sort_iter = Ref{_GtkTreeIter}() ret = ccall(("gtk_tree_model_sort_convert_child_iter_to_iter", libgtk4), Cint, (Ptr{GObject}, Ptr{_GtkTreeIter}, Ptr{_GtkTreeIter}), instance, m_sort_iter, _child_iter) ret2 = convert(Bool, ret) @@ -20031,7 +20492,7 @@ $(Expr(:toplevel, quote ret2 = convert_if_not_null(GtkTreePath, ret, true) ret2 end - function convert_iter_to_child_iter(instance::GtkTreeModelSort, _sorted_iter::Union{GtkTreeIter, Ref{_GtkTreeIter}}) + function convert_iter_to_child_iter(instance::GtkTreeModelSort, _sorted_iter::GtkTreeIterLike) m_child_iter = Ref{_GtkTreeIter}() ret = ccall(("gtk_tree_model_sort_convert_iter_to_child_iter", libgtk4), Nothing, (Ptr{GObject}, Ptr{_GtkTreeIter}, Ptr{_GtkTreeIter}), instance, m_child_iter, _sorted_iter) _child_iter = m_child_iter[] @@ -20050,7 +20511,7 @@ $(Expr(:toplevel, quote end ret2 end - function iter_is_valid(instance::GtkTreeModelSort, _iter::Union{GtkTreeIter, Ref{_GtkTreeIter}}) + function iter_is_valid(instance::GtkTreeModelSort, _iter::GtkTreeIterLike) ret = ccall(("gtk_tree_model_sort_iter_is_valid", libgtk4), Cint, (Ptr{GObject}, Ptr{_GtkTreeIter}), instance, _iter) ret2 = convert(Bool, ret) ret2 @@ -20092,55 +20553,55 @@ $(Expr(:toplevel, quote function get_n_columns(instance::GtkTreeModelSort) get_n_columns(GtkTreeModel(instance)) end - function get_path(instance::GtkTreeModelSort, _iter::Union{GtkTreeIter, Ref{_GtkTreeIter}}) + function get_path(instance::GtkTreeModelSort, _iter::GtkTreeIterLike) get_path(GtkTreeModel(instance), _iter) end - function get_string_from_iter(instance::GtkTreeModelSort, _iter::Union{GtkTreeIter, Ref{_GtkTreeIter}}) + function get_string_from_iter(instance::GtkTreeModelSort, _iter::GtkTreeIterLike) get_string_from_iter(GtkTreeModel(instance), _iter) end - function get_value(instance::GtkTreeModelSort, _iter::Union{GtkTreeIter, Ref{_GtkTreeIter}}, _column::Integer) + function get_value(instance::GtkTreeModelSort, _iter::GtkTreeIterLike, _column::Integer) get_value(GtkTreeModel(instance), _iter, _column) end - function iter_children(instance::GtkTreeModelSort, _parent::Maybe(Union{GtkTreeIter, Ref{_GtkTreeIter}})) + function iter_children(instance::GtkTreeModelSort, _parent::Maybe(GtkTreeIterLike)) iter_children(GtkTreeModel(instance), _parent) end - function iter_has_child(instance::GtkTreeModelSort, _iter::Union{GtkTreeIter, Ref{_GtkTreeIter}}) + function iter_has_child(instance::GtkTreeModelSort, _iter::GtkTreeIterLike) iter_has_child(GtkTreeModel(instance), _iter) end - function iter_n_children(instance::GtkTreeModelSort, _iter::Maybe(Union{GtkTreeIter, Ref{_GtkTreeIter}})) + function iter_n_children(instance::GtkTreeModelSort, _iter::Maybe(GtkTreeIterLike)) iter_n_children(GtkTreeModel(instance), _iter) end - function iter_next(instance::GtkTreeModelSort, _iter::Union{GtkTreeIter, Ref{_GtkTreeIter}}) + function iter_next(instance::GtkTreeModelSort, _iter::GtkTreeIterLike) iter_next(GtkTreeModel(instance), _iter) end - function iter_nth_child(instance::GtkTreeModelSort, _parent::Maybe(Union{GtkTreeIter, Ref{_GtkTreeIter}}), _n::Integer) + function iter_nth_child(instance::GtkTreeModelSort, _parent::Maybe(GtkTreeIterLike), _n::Integer) iter_nth_child(GtkTreeModel(instance), _parent, _n) end - function iter_parent(instance::GtkTreeModelSort, _child::Union{GtkTreeIter, Ref{_GtkTreeIter}}) + function iter_parent(instance::GtkTreeModelSort, _child::GtkTreeIterLike) iter_parent(GtkTreeModel(instance), _child) end - function iter_previous(instance::GtkTreeModelSort, _iter::Union{GtkTreeIter, Ref{_GtkTreeIter}}) + function iter_previous(instance::GtkTreeModelSort, _iter::GtkTreeIterLike) iter_previous(GtkTreeModel(instance), _iter) end - function ref_node(instance::GtkTreeModelSort, _iter::Union{GtkTreeIter, Ref{_GtkTreeIter}}) + function ref_node(instance::GtkTreeModelSort, _iter::GtkTreeIterLike) ref_node(GtkTreeModel(instance), _iter) end - function row_changed(instance::GtkTreeModelSort, _path::GtkTreePath, _iter::Union{GtkTreeIter, Ref{_GtkTreeIter}}) + function row_changed(instance::GtkTreeModelSort, _path::GtkTreePath, _iter::GtkTreeIterLike) row_changed(GtkTreeModel(instance), _path, _iter) end function row_deleted(instance::GtkTreeModelSort, _path::GtkTreePath) row_deleted(GtkTreeModel(instance), _path) end - function row_has_child_toggled(instance::GtkTreeModelSort, _path::GtkTreePath, _iter::Union{GtkTreeIter, Ref{_GtkTreeIter}}) + function row_has_child_toggled(instance::GtkTreeModelSort, _path::GtkTreePath, _iter::GtkTreeIterLike) row_has_child_toggled(GtkTreeModel(instance), _path, _iter) end - function row_inserted(instance::GtkTreeModelSort, _path::GtkTreePath, _iter::Union{GtkTreeIter, Ref{_GtkTreeIter}}) + function row_inserted(instance::GtkTreeModelSort, _path::GtkTreePath, _iter::GtkTreeIterLike) row_inserted(GtkTreeModel(instance), _path, _iter) end - function rows_reordered(instance::GtkTreeModelSort, _path::GtkTreePath, _iter::Maybe(Union{GtkTreeIter, Ref{_GtkTreeIter}}), _new_order) + function rows_reordered(instance::GtkTreeModelSort, _path::GtkTreePath, _iter::Maybe(GtkTreeIterLike), _new_order) rows_reordered(GtkTreeModel(instance), _path, _iter, _new_order) end - function unref_node(instance::GtkTreeModelSort, _iter::Union{GtkTreeIter, Ref{_GtkTreeIter}}) + function unref_node(instance::GtkTreeModelSort, _iter::GtkTreeIterLike) unref_node(GtkTreeModel(instance), _iter) end function get_sort_column_id(instance::GtkTreeModelSort) @@ -20199,7 +20660,7 @@ $(Expr(:toplevel, quote ret2 = convert(GtkTreeView, ret, false) ret2 end - function iter_is_selected(instance::GtkTreeSelection, _iter::Union{GtkTreeIter, Ref{_GtkTreeIter}}) + function iter_is_selected(instance::GtkTreeSelection, _iter::GtkTreeIterLike) ret = ccall(("gtk_tree_selection_iter_is_selected", libgtk4), Cint, (Ptr{GObject}, Ptr{_GtkTreeIter}), instance, _iter) ret2 = convert(Bool, ret) ret2 @@ -20213,7 +20674,7 @@ $(Expr(:toplevel, quote ret = ccall(("gtk_tree_selection_select_all", libgtk4), Nothing, (Ptr{GObject},), instance) nothing end - function select_iter(instance::GtkTreeSelection, _iter::Union{GtkTreeIter, Ref{_GtkTreeIter}}) + function select_iter(instance::GtkTreeSelection, _iter::GtkTreeIterLike) ret = ccall(("gtk_tree_selection_select_iter", libgtk4), Nothing, (Ptr{GObject}, Ptr{_GtkTreeIter}), instance, _iter) nothing end @@ -20244,7 +20705,7 @@ $(Expr(:toplevel, quote ret = ccall(("gtk_tree_selection_unselect_all", libgtk4), Nothing, (Ptr{GObject},), instance) nothing end - function unselect_iter(instance::GtkTreeSelection, _iter::Union{GtkTreeIter, Ref{_GtkTreeIter}}) + function unselect_iter(instance::GtkTreeSelection, _iter::GtkTreeIterLike) ret = ccall(("gtk_tree_selection_unselect_iter", libgtk4), Nothing, (Ptr{GObject}, Ptr{_GtkTreeIter}), instance, _iter) nothing end @@ -20263,7 +20724,7 @@ $(Expr(:toplevel, quote ret2 = GtkTreeStoreLeaf(ret, true) ret2 end - function append(instance::GtkTreeStore, _parent::Maybe(Union{GtkTreeIter, Ref{_GtkTreeIter}})) + function append(instance::GtkTreeStore, _parent::Maybe(GtkTreeIterLike)) m_iter = Ref{_GtkTreeIter}() _parent_maybe = nothing_to_null(_parent) ret = ccall(("gtk_tree_store_append", libgtk4), Nothing, (Ptr{GObject}, Ptr{_GtkTreeIter}, Ptr{_GtkTreeIter}), instance, m_iter, _parent_maybe) @@ -20274,14 +20735,14 @@ $(Expr(:toplevel, quote ret = ccall(("gtk_tree_store_clear", libgtk4), Nothing, (Ptr{GObject},), instance) nothing end - function insert(instance::GtkTreeStore, _parent::Maybe(Union{GtkTreeIter, Ref{_GtkTreeIter}}), _position::Integer) + function insert(instance::GtkTreeStore, _parent::Maybe(GtkTreeIterLike), _position::Integer) m_iter = Ref{_GtkTreeIter}() _parent_maybe = nothing_to_null(_parent) ret = ccall(("gtk_tree_store_insert", libgtk4), Nothing, (Ptr{GObject}, Ptr{_GtkTreeIter}, Ptr{_GtkTreeIter}, Int32), instance, m_iter, _parent_maybe, _position) _iter = m_iter[] _iter end - function insert_after(instance::GtkTreeStore, _parent::Maybe(Union{GtkTreeIter, Ref{_GtkTreeIter}}), _sibling::Maybe(Union{GtkTreeIter, Ref{_GtkTreeIter}})) + function insert_after(instance::GtkTreeStore, _parent::Maybe(GtkTreeIterLike), _sibling::Maybe(GtkTreeIterLike)) m_iter = Ref{_GtkTreeIter}() _parent_maybe = nothing_to_null(_parent) _sibling_maybe = nothing_to_null(_sibling) @@ -20289,7 +20750,7 @@ $(Expr(:toplevel, quote _iter = m_iter[] _iter end - function insert_before(instance::GtkTreeStore, _parent::Maybe(Union{GtkTreeIter, Ref{_GtkTreeIter}}), _sibling::Maybe(Union{GtkTreeIter, Ref{_GtkTreeIter}})) + function insert_before(instance::GtkTreeStore, _parent::Maybe(GtkTreeIterLike), _sibling::Maybe(GtkTreeIterLike)) m_iter = Ref{_GtkTreeIter}() _parent_maybe = nothing_to_null(_parent) _sibling_maybe = nothing_to_null(_sibling) @@ -20297,7 +20758,7 @@ $(Expr(:toplevel, quote _iter = m_iter[] _iter end - function insert_with_values(instance::GtkTreeStore, _parent::Maybe(Union{GtkTreeIter, Ref{_GtkTreeIter}}), _position::Integer, _columns, _values) + function insert_with_values(instance::GtkTreeStore, _parent::Maybe(GtkTreeIterLike), _position::Integer, _columns, _values) m_iter = Ref{_GtkTreeIter}() _parent_maybe = nothing_to_null(_parent) _columns_arr = convert(Vector{Int32}, _columns) @@ -20308,38 +20769,38 @@ $(Expr(:toplevel, quote _iter = m_iter[] _iter end - function is_ancestor(instance::GtkTreeStore, _iter::Union{GtkTreeIter, Ref{_GtkTreeIter}}, _descendant::Union{GtkTreeIter, Ref{_GtkTreeIter}}) + function is_ancestor(instance::GtkTreeStore, _iter::GtkTreeIterLike, _descendant::GtkTreeIterLike) ret = ccall(("gtk_tree_store_is_ancestor", libgtk4), Cint, (Ptr{GObject}, Ptr{_GtkTreeIter}, Ptr{_GtkTreeIter}), instance, _iter, _descendant) ret2 = convert(Bool, ret) ret2 end - function iter_depth(instance::GtkTreeStore, _iter::Union{GtkTreeIter, Ref{_GtkTreeIter}}) + function iter_depth(instance::GtkTreeStore, _iter::GtkTreeIterLike) ret = ccall(("gtk_tree_store_iter_depth", libgtk4), Int32, (Ptr{GObject}, Ptr{_GtkTreeIter}), instance, _iter) ret end - function iter_is_valid(instance::GtkTreeStore, _iter::Union{GtkTreeIter, Ref{_GtkTreeIter}}) + function iter_is_valid(instance::GtkTreeStore, _iter::GtkTreeIterLike) ret = ccall(("gtk_tree_store_iter_is_valid", libgtk4), Cint, (Ptr{GObject}, Ptr{_GtkTreeIter}), instance, _iter) ret2 = convert(Bool, ret) ret2 end - function move_after(instance::GtkTreeStore, _iter::Union{GtkTreeIter, Ref{_GtkTreeIter}}, _position::Maybe(Union{GtkTreeIter, Ref{_GtkTreeIter}})) + function move_after(instance::GtkTreeStore, _iter::GtkTreeIterLike, _position::Maybe(GtkTreeIterLike)) _position_maybe = nothing_to_null(_position) ret = ccall(("gtk_tree_store_move_after", libgtk4), Nothing, (Ptr{GObject}, Ptr{_GtkTreeIter}, Ptr{_GtkTreeIter}), instance, _iter, _position_maybe) nothing end - function move_before(instance::GtkTreeStore, _iter::Union{GtkTreeIter, Ref{_GtkTreeIter}}, _position::Maybe(Union{GtkTreeIter, Ref{_GtkTreeIter}})) + function move_before(instance::GtkTreeStore, _iter::GtkTreeIterLike, _position::Maybe(GtkTreeIterLike)) _position_maybe = nothing_to_null(_position) ret = ccall(("gtk_tree_store_move_before", libgtk4), Nothing, (Ptr{GObject}, Ptr{_GtkTreeIter}, Ptr{_GtkTreeIter}), instance, _iter, _position_maybe) nothing end - function prepend(instance::GtkTreeStore, _parent::Maybe(Union{GtkTreeIter, Ref{_GtkTreeIter}})) + function prepend(instance::GtkTreeStore, _parent::Maybe(GtkTreeIterLike)) m_iter = Ref{_GtkTreeIter}() _parent_maybe = nothing_to_null(_parent) ret = ccall(("gtk_tree_store_prepend", libgtk4), Nothing, (Ptr{GObject}, Ptr{_GtkTreeIter}, Ptr{_GtkTreeIter}), instance, m_iter, _parent_maybe) _iter = m_iter[] _iter end - function remove(instance::GtkTreeStore, _iter::Union{GtkTreeIter, Ref{_GtkTreeIter}}) + function remove(instance::GtkTreeStore, _iter::GtkTreeIterLike) ret = ccall(("gtk_tree_store_remove", libgtk4), Cint, (Ptr{GObject}, Ptr{_GtkTreeIter}), instance, _iter) ret2 = convert(Bool, ret) ret2 @@ -20350,11 +20811,11 @@ $(Expr(:toplevel, quote ret = ccall(("gtk_tree_store_set_column_types", libgtk4), Nothing, (Ptr{GObject}, Int32, Ptr{UInt64}), instance, _n_columns, _types_arr) nothing end - function set_value(instance::GtkTreeStore, _iter::Union{GtkTreeIter, Ref{_GtkTreeIter}}, _column::Integer, _value::Union{GValue, Ref{_GValue}}) + function set_value(instance::GtkTreeStore, _iter::GtkTreeIterLike, _column::Integer, _value::GValueLike) ret = ccall(("gtk_tree_store_set_value", libgtk4), Nothing, (Ptr{GObject}, Ptr{_GtkTreeIter}, Int32, Ptr{_GValue}), instance, _iter, _column, _value) nothing end - function set(instance::GtkTreeStore, _iter::Union{GtkTreeIter, Ref{_GtkTreeIter}}, _columns, _values) + function set(instance::GtkTreeStore, _iter::GtkTreeIterLike, _columns, _values) _columns_arr = convert(Vector{Int32}, _columns) _values_arr = convert(Vector{_GValue}, _values) _n_values = length(_columns) @@ -20362,17 +20823,17 @@ $(Expr(:toplevel, quote ret = ccall(("gtk_tree_store_set_valuesv", libgtk4), Nothing, (Ptr{GObject}, Ptr{_GtkTreeIter}, Ptr{Int32}, Ptr{_GValue}, Int32), instance, _iter, _columns_arr, _values_arr, _n_values) nothing end - function swap(instance::GtkTreeStore, _a::Union{GtkTreeIter, Ref{_GtkTreeIter}}, _b::Union{GtkTreeIter, Ref{_GtkTreeIter}}) + function swap(instance::GtkTreeStore, _a::GtkTreeIterLike, _b::GtkTreeIterLike) ret = ccall(("gtk_tree_store_swap", libgtk4), Nothing, (Ptr{GObject}, Ptr{_GtkTreeIter}, Ptr{_GtkTreeIter}), instance, _a, _b) nothing end function get_buildable_id(instance::GtkTreeStore) get_buildable_id(GtkBuildable(instance)) end - function drag_data_received(instance::GtkTreeStore, _dest::GtkTreePath, _value::Union{GValue, Ref{_GValue}}) + function drag_data_received(instance::GtkTreeStore, _dest::GtkTreePath, _value::GValueLike) drag_data_received(GtkTreeDragDest(instance), _dest, _value) end - function row_drop_possible(instance::GtkTreeStore, _dest_path::GtkTreePath, _value::Union{GValue, Ref{_GValue}}) + function row_drop_possible(instance::GtkTreeStore, _dest_path::GtkTreePath, _value::GValueLike) row_drop_possible(GtkTreeDragDest(instance), _dest_path, _value) end function drag_data_delete(instance::GtkTreeStore, _path::GtkTreePath) @@ -20408,55 +20869,55 @@ $(Expr(:toplevel, quote function get_n_columns(instance::GtkTreeStore) get_n_columns(GtkTreeModel(instance)) end - function get_path(instance::GtkTreeStore, _iter::Union{GtkTreeIter, Ref{_GtkTreeIter}}) + function get_path(instance::GtkTreeStore, _iter::GtkTreeIterLike) get_path(GtkTreeModel(instance), _iter) end - function get_string_from_iter(instance::GtkTreeStore, _iter::Union{GtkTreeIter, Ref{_GtkTreeIter}}) + function get_string_from_iter(instance::GtkTreeStore, _iter::GtkTreeIterLike) get_string_from_iter(GtkTreeModel(instance), _iter) end - function get_value(instance::GtkTreeStore, _iter::Union{GtkTreeIter, Ref{_GtkTreeIter}}, _column::Integer) + function get_value(instance::GtkTreeStore, _iter::GtkTreeIterLike, _column::Integer) get_value(GtkTreeModel(instance), _iter, _column) end - function iter_children(instance::GtkTreeStore, _parent::Maybe(Union{GtkTreeIter, Ref{_GtkTreeIter}})) + function iter_children(instance::GtkTreeStore, _parent::Maybe(GtkTreeIterLike)) iter_children(GtkTreeModel(instance), _parent) end - function iter_has_child(instance::GtkTreeStore, _iter::Union{GtkTreeIter, Ref{_GtkTreeIter}}) + function iter_has_child(instance::GtkTreeStore, _iter::GtkTreeIterLike) iter_has_child(GtkTreeModel(instance), _iter) end - function iter_n_children(instance::GtkTreeStore, _iter::Maybe(Union{GtkTreeIter, Ref{_GtkTreeIter}})) + function iter_n_children(instance::GtkTreeStore, _iter::Maybe(GtkTreeIterLike)) iter_n_children(GtkTreeModel(instance), _iter) end - function iter_next(instance::GtkTreeStore, _iter::Union{GtkTreeIter, Ref{_GtkTreeIter}}) + function iter_next(instance::GtkTreeStore, _iter::GtkTreeIterLike) iter_next(GtkTreeModel(instance), _iter) end - function iter_nth_child(instance::GtkTreeStore, _parent::Maybe(Union{GtkTreeIter, Ref{_GtkTreeIter}}), _n::Integer) + function iter_nth_child(instance::GtkTreeStore, _parent::Maybe(GtkTreeIterLike), _n::Integer) iter_nth_child(GtkTreeModel(instance), _parent, _n) end - function iter_parent(instance::GtkTreeStore, _child::Union{GtkTreeIter, Ref{_GtkTreeIter}}) + function iter_parent(instance::GtkTreeStore, _child::GtkTreeIterLike) iter_parent(GtkTreeModel(instance), _child) end - function iter_previous(instance::GtkTreeStore, _iter::Union{GtkTreeIter, Ref{_GtkTreeIter}}) + function iter_previous(instance::GtkTreeStore, _iter::GtkTreeIterLike) iter_previous(GtkTreeModel(instance), _iter) end - function ref_node(instance::GtkTreeStore, _iter::Union{GtkTreeIter, Ref{_GtkTreeIter}}) + function ref_node(instance::GtkTreeStore, _iter::GtkTreeIterLike) ref_node(GtkTreeModel(instance), _iter) end - function row_changed(instance::GtkTreeStore, _path::GtkTreePath, _iter::Union{GtkTreeIter, Ref{_GtkTreeIter}}) + function row_changed(instance::GtkTreeStore, _path::GtkTreePath, _iter::GtkTreeIterLike) row_changed(GtkTreeModel(instance), _path, _iter) end function row_deleted(instance::GtkTreeStore, _path::GtkTreePath) row_deleted(GtkTreeModel(instance), _path) end - function row_has_child_toggled(instance::GtkTreeStore, _path::GtkTreePath, _iter::Union{GtkTreeIter, Ref{_GtkTreeIter}}) + function row_has_child_toggled(instance::GtkTreeStore, _path::GtkTreePath, _iter::GtkTreeIterLike) row_has_child_toggled(GtkTreeModel(instance), _path, _iter) end - function row_inserted(instance::GtkTreeStore, _path::GtkTreePath, _iter::Union{GtkTreeIter, Ref{_GtkTreeIter}}) + function row_inserted(instance::GtkTreeStore, _path::GtkTreePath, _iter::GtkTreeIterLike) row_inserted(GtkTreeModel(instance), _path, _iter) end - function rows_reordered(instance::GtkTreeStore, _path::GtkTreePath, _iter::Maybe(Union{GtkTreeIter, Ref{_GtkTreeIter}}), _new_order) + function rows_reordered(instance::GtkTreeStore, _path::GtkTreePath, _iter::Maybe(GtkTreeIterLike), _new_order) rows_reordered(GtkTreeModel(instance), _path, _iter, _new_order) end - function unref_node(instance::GtkTreeStore, _iter::Union{GtkTreeIter, Ref{_GtkTreeIter}}) + function unref_node(instance::GtkTreeStore, _iter::GtkTreeIterLike) unref_node(GtkTreeModel(instance), _iter) end function get_sort_column_id(instance::GtkTreeStore) @@ -21068,7 +21529,7 @@ $(Expr(:toplevel, quote ret2 = convert(Bool, ret) ret2 end - function cell_set_cell_data(instance::GtkTreeViewColumn, _tree_model::GtkTreeModel, _iter::Union{GtkTreeIter, Ref{_GtkTreeIter}}, _is_expander::Bool, _is_expanded::Bool) + function cell_set_cell_data(instance::GtkTreeViewColumn, _tree_model::GtkTreeModel, _iter::GtkTreeIterLike, _is_expander::Bool, _is_expanded::Bool) ret = ccall(("gtk_tree_view_column_cell_set_cell_data", libgtk4), Nothing, (Ptr{GObject}, Ptr{GObject}, Ptr{_GtkTreeIter}, Cint, Cint), instance, _tree_model, _iter, _is_expander, _is_expanded) nothing end @@ -21676,7 +22137,7 @@ $(Expr(:toplevel, quote ret2 = convert(Bool, ret) ret2 end - function compute_point(instance::GtkWidget, _target::GtkWidget, _point::Union{GraphenePoint, Ref{_GraphenePoint}}) + function compute_point(instance::GtkWidget, _target::GtkWidget, _point::GraphenePointLike) m_out_point = Ref{_GraphenePoint}() ret = ccall(("gtk_widget_compute_point", libgtk4), Cint, (Ptr{GObject}, Ptr{GObject}, Ptr{_GraphenePoint}, Ptr{_GraphenePoint}), instance, _target, _point, m_out_point) ret2 = convert(Bool, ret) @@ -22363,7 +22824,7 @@ $(Expr(:toplevel, quote ret = ccall(("gtk_widget_show", libgtk4), Nothing, (Ptr{GObject},), instance) nothing end - function size_allocate(instance::GtkWidget, _allocation::Union{GdkRectangle, Ref{_GdkRectangle}}, _baseline::Integer) + function size_allocate(instance::GtkWidget, _allocation::GdkRectangleLike, _baseline::Integer) ret = ccall(("gtk_widget_size_allocate", libgtk4), Nothing, (Ptr{GObject}, Ptr{_GdkRectangle}, Int32), instance, _allocation, _baseline) nothing end @@ -23225,7 +23686,7 @@ $(Expr(:toplevel, quote ret2 = convert(Bool, ret) ret2 end - function set_rgba(instance::GtkColorChooser, _color::Union{GdkRGBA, Ref{_GdkRGBA}}) + function set_rgba(instance::GtkColorChooser, _color::GdkRGBALike) ret = ccall(("gtk_color_chooser_set_rgba", libgtk4), Nothing, (Ptr{GObject}, Ptr{_GdkRGBA}), instance, _color) nothing end @@ -23233,12 +23694,12 @@ $(Expr(:toplevel, quote ret = ccall(("gtk_color_chooser_set_use_alpha", libgtk4), Nothing, (Ptr{GObject}, Cint), instance, _use_alpha) nothing end - function delegate_get_property(_object::GObject, _prop_id::Integer, _value::Union{GValue, Ref{_GValue}}, _pspec::GParam) + function delegate_get_property(_object::GObject, _prop_id::Integer, _value::GValueLike, _pspec::GParam) ret = ccall(("gtk_editable_delegate_get_property", libgtk4), Cint, (Ptr{GObject}, UInt32, Ptr{_GValue}, Ptr{GParam}), _object, _prop_id, _value, _pspec) ret2 = convert(Bool, ret) ret2 end - function delegate_set_property(_object::GObject, _prop_id::Integer, _value::Union{GValue, Ref{_GValue}}, _pspec::GParam) + function delegate_set_property(_object::GObject, _prop_id::Integer, _value::GValueLike, _pspec::GParam) ret = ccall(("gtk_editable_delegate_set_property", libgtk4), Cint, (Ptr{GObject}, UInt32, Ptr{_GValue}, Ptr{GParam}), _object, _prop_id, _value, _pspec) ret2 = convert(Bool, ret) ret2 @@ -23743,12 +24204,12 @@ $(Expr(:toplevel, quote ret = ccall(("gtk_symbolic_paintable_snapshot_symbolic", libgtk4), Nothing, (Ptr{GObject}, Ptr{GObject}, Float64, Float64, Ptr{_GdkRGBA}, UInt64), instance, _snapshot, _width, _height, _colors_arr, _n_colors) nothing end - function drag_data_received(instance::GtkTreeDragDest, _dest::GtkTreePath, _value::Union{GValue, Ref{_GValue}}) + function drag_data_received(instance::GtkTreeDragDest, _dest::GtkTreePath, _value::GValueLike) ret = ccall(("gtk_tree_drag_dest_drag_data_received", libgtk4), Cint, (Ptr{GObject}, Ptr{GtkTreePath}, Ptr{_GValue}), instance, _dest, _value) ret2 = convert(Bool, ret) ret2 end - function row_drop_possible(instance::GtkTreeDragDest, _dest_path::GtkTreePath, _value::Union{GValue, Ref{_GValue}}) + function row_drop_possible(instance::GtkTreeDragDest, _dest_path::GtkTreePath, _value::GValueLike) ret = ccall(("gtk_tree_drag_dest_row_drop_possible", libgtk4), Cint, (Ptr{GObject}, Ptr{GtkTreePath}, Ptr{_GValue}), instance, _dest_path, _value) ret2 = convert(Bool, ret) ret2 @@ -23822,23 +24283,23 @@ $(Expr(:toplevel, quote ret = ccall(("gtk_tree_model_get_n_columns", libgtk4), Int32, (Ptr{GObject},), instance) ret end - function get_path(instance::GtkTreeModel, _iter::Union{GtkTreeIter, Ref{_GtkTreeIter}}) + function get_path(instance::GtkTreeModel, _iter::GtkTreeIterLike) ret = ccall(("gtk_tree_model_get_path", libgtk4), Ptr{GtkTreePath}, (Ptr{GObject}, Ptr{_GtkTreeIter}), instance, _iter) ret2 = convert(GtkTreePath, ret, true) ret2 end - function get_string_from_iter(instance::GtkTreeModel, _iter::Union{GtkTreeIter, Ref{_GtkTreeIter}}) + function get_string_from_iter(instance::GtkTreeModel, _iter::GtkTreeIterLike) ret = ccall(("gtk_tree_model_get_string_from_iter", libgtk4), Cstring, (Ptr{GObject}, Ptr{_GtkTreeIter}), instance, _iter) ret2 = string_or_nothing(ret, true) ret2 end - function get_value(instance::GtkTreeModel, _iter::Union{GtkTreeIter, Ref{_GtkTreeIter}}, _column::Integer) + function get_value(instance::GtkTreeModel, _iter::GtkTreeIterLike, _column::Integer) m_value = Ref{_GValue}() ret = ccall(("gtk_tree_model_get_value", libgtk4), Nothing, (Ptr{GObject}, Ptr{_GtkTreeIter}, Int32, Ptr{_GValue}), instance, _iter, _column, m_value) _value = m_value[] _value end - function iter_children(instance::GtkTreeModel, _parent::Maybe(Union{GtkTreeIter, Ref{_GtkTreeIter}})) + function iter_children(instance::GtkTreeModel, _parent::Maybe(GtkTreeIterLike)) m_iter = Ref{_GtkTreeIter}() _parent_maybe = nothing_to_null(_parent) ret = ccall(("gtk_tree_model_iter_children", libgtk4), Cint, (Ptr{GObject}, Ptr{_GtkTreeIter}, Ptr{_GtkTreeIter}), instance, m_iter, _parent_maybe) @@ -23846,22 +24307,22 @@ $(Expr(:toplevel, quote _iter = m_iter[] (ret2, _iter) end - function iter_has_child(instance::GtkTreeModel, _iter::Union{GtkTreeIter, Ref{_GtkTreeIter}}) + function iter_has_child(instance::GtkTreeModel, _iter::GtkTreeIterLike) ret = ccall(("gtk_tree_model_iter_has_child", libgtk4), Cint, (Ptr{GObject}, Ptr{_GtkTreeIter}), instance, _iter) ret2 = convert(Bool, ret) ret2 end - function iter_n_children(instance::GtkTreeModel, _iter::Maybe(Union{GtkTreeIter, Ref{_GtkTreeIter}})) + function iter_n_children(instance::GtkTreeModel, _iter::Maybe(GtkTreeIterLike)) _iter_maybe = nothing_to_null(_iter) ret = ccall(("gtk_tree_model_iter_n_children", libgtk4), Int32, (Ptr{GObject}, Ptr{_GtkTreeIter}), instance, _iter_maybe) ret end - function iter_next(instance::GtkTreeModel, _iter::Union{GtkTreeIter, Ref{_GtkTreeIter}}) + function iter_next(instance::GtkTreeModel, _iter::GtkTreeIterLike) ret = ccall(("gtk_tree_model_iter_next", libgtk4), Cint, (Ptr{GObject}, Ptr{_GtkTreeIter}), instance, _iter) ret2 = convert(Bool, ret) ret2 end - function iter_nth_child(instance::GtkTreeModel, _parent::Maybe(Union{GtkTreeIter, Ref{_GtkTreeIter}}), _n::Integer) + function iter_nth_child(instance::GtkTreeModel, _parent::Maybe(GtkTreeIterLike), _n::Integer) m_iter = Ref{_GtkTreeIter}() _parent_maybe = nothing_to_null(_parent) ret = ccall(("gtk_tree_model_iter_nth_child", libgtk4), Cint, (Ptr{GObject}, Ptr{_GtkTreeIter}, Ptr{_GtkTreeIter}, Int32), instance, m_iter, _parent_maybe, _n) @@ -23869,23 +24330,23 @@ $(Expr(:toplevel, quote _iter = m_iter[] (ret2, _iter) end - function iter_parent(instance::GtkTreeModel, _child::Union{GtkTreeIter, Ref{_GtkTreeIter}}) + function iter_parent(instance::GtkTreeModel, _child::GtkTreeIterLike) m_iter = Ref{_GtkTreeIter}() ret = ccall(("gtk_tree_model_iter_parent", libgtk4), Cint, (Ptr{GObject}, Ptr{_GtkTreeIter}, Ptr{_GtkTreeIter}), instance, m_iter, _child) ret2 = convert(Bool, ret) _iter = m_iter[] (ret2, _iter) end - function iter_previous(instance::GtkTreeModel, _iter::Union{GtkTreeIter, Ref{_GtkTreeIter}}) + function iter_previous(instance::GtkTreeModel, _iter::GtkTreeIterLike) ret = ccall(("gtk_tree_model_iter_previous", libgtk4), Cint, (Ptr{GObject}, Ptr{_GtkTreeIter}), instance, _iter) ret2 = convert(Bool, ret) ret2 end - function ref_node(instance::GtkTreeModel, _iter::Union{GtkTreeIter, Ref{_GtkTreeIter}}) + function ref_node(instance::GtkTreeModel, _iter::GtkTreeIterLike) ret = ccall(("gtk_tree_model_ref_node", libgtk4), Nothing, (Ptr{GObject}, Ptr{_GtkTreeIter}), instance, _iter) nothing end - function row_changed(instance::GtkTreeModel, _path::GtkTreePath, _iter::Union{GtkTreeIter, Ref{_GtkTreeIter}}) + function row_changed(instance::GtkTreeModel, _path::GtkTreePath, _iter::GtkTreeIterLike) ret = ccall(("gtk_tree_model_row_changed", libgtk4), Nothing, (Ptr{GObject}, Ptr{GtkTreePath}, Ptr{_GtkTreeIter}), instance, _path, _iter) nothing end @@ -23893,22 +24354,22 @@ $(Expr(:toplevel, quote ret = ccall(("gtk_tree_model_row_deleted", libgtk4), Nothing, (Ptr{GObject}, Ptr{GtkTreePath}), instance, _path) nothing end - function row_has_child_toggled(instance::GtkTreeModel, _path::GtkTreePath, _iter::Union{GtkTreeIter, Ref{_GtkTreeIter}}) + function row_has_child_toggled(instance::GtkTreeModel, _path::GtkTreePath, _iter::GtkTreeIterLike) ret = ccall(("gtk_tree_model_row_has_child_toggled", libgtk4), Nothing, (Ptr{GObject}, Ptr{GtkTreePath}, Ptr{_GtkTreeIter}), instance, _path, _iter) nothing end - function row_inserted(instance::GtkTreeModel, _path::GtkTreePath, _iter::Union{GtkTreeIter, Ref{_GtkTreeIter}}) + function row_inserted(instance::GtkTreeModel, _path::GtkTreePath, _iter::GtkTreeIterLike) ret = ccall(("gtk_tree_model_row_inserted", libgtk4), Nothing, (Ptr{GObject}, Ptr{GtkTreePath}, Ptr{_GtkTreeIter}), instance, _path, _iter) nothing end - function rows_reordered(instance::GtkTreeModel, _path::GtkTreePath, _iter::Maybe(Union{GtkTreeIter, Ref{_GtkTreeIter}}), _new_order) + function rows_reordered(instance::GtkTreeModel, _path::GtkTreePath, _iter::Maybe(GtkTreeIterLike), _new_order) _iter_maybe = nothing_to_null(_iter) _new_order_arr = convert(Vector{Int32}, _new_order) _length = length(_new_order) ret = ccall(("gtk_tree_model_rows_reordered_with_length", libgtk4), Nothing, (Ptr{GObject}, Ptr{GtkTreePath}, Ptr{_GtkTreeIter}, Ptr{Int32}, Int32), instance, _path, _iter_maybe, _new_order_arr, _length) nothing end - function unref_node(instance::GtkTreeModel, _iter::Union{GtkTreeIter, Ref{_GtkTreeIter}}) + function unref_node(instance::GtkTreeModel, _iter::GtkTreeIterLike) ret = ccall(("gtk_tree_model_unref_node", libgtk4), Nothing, (Ptr{GObject}, Ptr{_GtkTreeIter}), instance, _iter) nothing end diff --git a/src/gen/gtk4_structs b/src/gen/gtk4_structs index eb59e8d3..a77f03b7 100644 --- a/src/gen/gtk4_structs +++ b/src/gen/gtk4_structs @@ -1,22 +1,25 @@ quote $(Expr(:toplevel, quote - mutable struct GtkAccessibleList <: GBoxed - handle::Ptr{GtkAccessibleList} - begin - (GLib.g_type(::Type{T}) where T <: GtkAccessibleList) = begin - ccall(("gtk_accessible_list_get_type", libgtk4), GType, ()) - end - function GtkAccessibleList(ref::Ptr{T}, own::Bool = false) where T <: GBoxed - x = new(ref) - if own - finalizer(x) do x - GLib.delboxed(x) + begin + mutable struct GtkAccessibleList <: GBoxed + handle::Ptr{GtkAccessibleList} + begin + (GLib.g_type(::Type{T}) where T <: GtkAccessibleList) = begin + ccall(("gtk_accessible_list_get_type", libgtk4), GType, ()) + end + function GtkAccessibleList(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 - x + push!(gboxed_types, GtkAccessibleList) end - push!(gboxed_types, GtkAccessibleList) end + const GtkAccessibleListLike = GtkAccessibleList end begin struct _GtkAccessibleTextRange @@ -26,27 +29,36 @@ $(Expr(:toplevel, quote mutable struct GtkAccessibleTextRange handle::Ptr{_GtkAccessibleTextRange} end - unsafe_convert(::Type{Ptr{_GtkAccessibleTextRange}}, box::GtkAccessibleTextRange) = begin - convert(Ptr{_GtkAccessibleTextRange}, box.handle) - end - end - mutable struct GtkBitset <: GBoxed - handle::Ptr{GtkBitset} begin - (GLib.g_type(::Type{T}) where T <: GtkBitset) = begin - ccall(("gtk_bitset_get_type", libgtk4), GType, ()) - end - function GtkBitset(ref::Ptr{T}, own::Bool = false) where T <: GBoxed - x = new(ref) - if own - finalizer(x) do x - GLib.delboxed(x) + unsafe_convert(::Type{Ptr{_GtkAccessibleTextRange}}, box::GtkAccessibleTextRange) = begin + convert(Ptr{_GtkAccessibleTextRange}, box.handle) + end + convert(::Type{GtkAccessibleTextRange}, p::Ptr{_GtkAccessibleTextRange}, owns = false) = begin + GtkAccessibleTextRange(p, owns) + end + const GtkAccessibleTextRangeLike = Union{Ref{_GtkAccessibleTextRange}, GtkAccessibleTextRange} + end + end + begin + mutable struct GtkBitset <: GBoxed + handle::Ptr{GtkBitset} + begin + (GLib.g_type(::Type{T}) where T <: GtkBitset) = begin + ccall(("gtk_bitset_get_type", libgtk4), GType, ()) end + function GtkBitset(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 - x + push!(gboxed_types, GtkBitset) end - push!(gboxed_types, GtkBitset) end + const GtkBitsetLike = GtkBitset end begin mutable struct GtkBitsetIter <: GBoxed @@ -67,6 +79,7 @@ $(Expr(:toplevel, quote push!(gboxed_types, GtkBitsetIter) end end + const GtkBitsetIterLike = GtkBitsetIter const _GtkBitsetIter = GtkBitsetIter end begin @@ -82,7 +95,7 @@ $(Expr(:toplevel, quote (GLib.g_type(::Type{T}) where T <: GtkBorder) = begin ccall(("gtk_border_get_type", libgtk4), GType, ()) end - function GtkBorder(ref::Ptr{T}, own::Bool = false) where T <: GBoxed + function GtkBorder(ref::Ptr{T}, own::Bool = false) where T <: Union{GBoxed, _GtkBorder} x = new(ref) if own finalizer(x) do x @@ -94,17 +107,27 @@ $(Expr(:toplevel, quote push!(gboxed_types, GtkBorder) end end - unsafe_convert(::Type{Ptr{_GtkBorder}}, box::GtkBorder) = begin - convert(Ptr{_GtkBorder}, box.handle) - end + begin + unsafe_convert(::Type{Ptr{_GtkBorder}}, box::GtkBorder) = begin + convert(Ptr{_GtkBorder}, box.handle) + end + convert(::Type{GtkBorder}, p::Ptr{_GtkBorder}, owns = false) = begin + GtkBorder(p, owns) + end + const GtkBorderLike = Union{Ref{_GtkBorder}, GtkBorder} + end end - mutable struct GtkBuildableParseContext - handle::Ptr{GtkBuildableParseContext} + begin + mutable struct GtkBuildableParseContext + handle::Ptr{GtkBuildableParseContext} + end + const GtkBuildableParseContextLike = GtkBuildableParseContext end begin mutable struct GtkBuildableParser handle::Ptr{GtkBuildableParser} end + const GtkBuildableParserLike = GtkBuildableParser const _GtkBuildableParser = GtkBuildableParser end begin @@ -118,48 +141,63 @@ $(Expr(:toplevel, quote mutable struct GtkCssLocation handle::Ptr{_GtkCssLocation} end - unsafe_convert(::Type{Ptr{_GtkCssLocation}}, box::GtkCssLocation) = begin - convert(Ptr{_GtkCssLocation}, box.handle) - end - end - mutable struct GtkCssSection <: GBoxed - handle::Ptr{GtkCssSection} begin - (GLib.g_type(::Type{T}) where T <: GtkCssSection) = begin - ccall(("gtk_css_section_get_type", libgtk4), GType, ()) - end - function GtkCssSection(ref::Ptr{T}, own::Bool = false) where T <: GBoxed - x = new(ref) - if own - finalizer(x) do x - GLib.delboxed(x) + unsafe_convert(::Type{Ptr{_GtkCssLocation}}, box::GtkCssLocation) = begin + convert(Ptr{_GtkCssLocation}, box.handle) + end + convert(::Type{GtkCssLocation}, p::Ptr{_GtkCssLocation}, owns = false) = begin + GtkCssLocation(p, owns) + end + const GtkCssLocationLike = Union{Ref{_GtkCssLocation}, GtkCssLocation} + end + end + begin + mutable struct GtkCssSection <: GBoxed + handle::Ptr{GtkCssSection} + begin + (GLib.g_type(::Type{T}) where T <: GtkCssSection) = begin + ccall(("gtk_css_section_get_type", libgtk4), GType, ()) + end + function GtkCssSection(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 - x + push!(gboxed_types, GtkCssSection) end - push!(gboxed_types, GtkCssSection) end + const GtkCssSectionLike = GtkCssSection end - mutable struct GtkCssStyleChange - handle::Ptr{GtkCssStyleChange} + begin + mutable struct GtkCssStyleChange + handle::Ptr{GtkCssStyleChange} + end + const GtkCssStyleChangeLike = GtkCssStyleChange end - mutable struct GtkExpressionWatch <: GBoxed - handle::Ptr{GtkExpressionWatch} - begin - (GLib.g_type(::Type{T}) where T <: GtkExpressionWatch) = begin - ccall(("gtk_expression_watch_get_type", libgtk4), GType, ()) - end - function GtkExpressionWatch(ref::Ptr{T}, own::Bool = false) where T <: GBoxed - x = new(ref) - if own - finalizer(x) do x - GLib.delboxed(x) + begin + mutable struct GtkExpressionWatch <: GBoxed + handle::Ptr{GtkExpressionWatch} + begin + (GLib.g_type(::Type{T}) where T <: GtkExpressionWatch) = begin + ccall(("gtk_expression_watch_get_type", libgtk4), GType, ()) end + function GtkExpressionWatch(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 - x + push!(gboxed_types, GtkExpressionWatch) end - push!(gboxed_types, GtkExpressionWatch) end + const GtkExpressionWatchLike = GtkExpressionWatch end begin struct _GtkPadActionEntry @@ -172,48 +210,63 @@ $(Expr(:toplevel, quote mutable struct GtkPadActionEntry handle::Ptr{_GtkPadActionEntry} end - unsafe_convert(::Type{Ptr{_GtkPadActionEntry}}, box::GtkPadActionEntry) = begin - convert(Ptr{_GtkPadActionEntry}, box.handle) - end - end - mutable struct GtkPaperSize <: GBoxed - handle::Ptr{GtkPaperSize} begin - (GLib.g_type(::Type{T}) where T <: GtkPaperSize) = begin - ccall(("gtk_paper_size_get_type", libgtk4), GType, ()) - end - function GtkPaperSize(ref::Ptr{T}, own::Bool = false) where T <: GBoxed - x = new(ref) - if own - finalizer(x) do x - GLib.delboxed(x) + unsafe_convert(::Type{Ptr{_GtkPadActionEntry}}, box::GtkPadActionEntry) = begin + convert(Ptr{_GtkPadActionEntry}, box.handle) + end + convert(::Type{GtkPadActionEntry}, p::Ptr{_GtkPadActionEntry}, owns = false) = begin + GtkPadActionEntry(p, owns) + end + const GtkPadActionEntryLike = Union{Ref{_GtkPadActionEntry}, GtkPadActionEntry} + end + end + begin + mutable struct GtkPaperSize <: GBoxed + handle::Ptr{GtkPaperSize} + begin + (GLib.g_type(::Type{T}) where T <: GtkPaperSize) = begin + ccall(("gtk_paper_size_get_type", libgtk4), GType, ()) end + function GtkPaperSize(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 - x + push!(gboxed_types, GtkPaperSize) end - push!(gboxed_types, GtkPaperSize) end + const GtkPaperSizeLike = GtkPaperSize end - mutable struct GtkPrintBackend - handle::Ptr{GtkPrintBackend} + begin + mutable struct GtkPrintBackend + handle::Ptr{GtkPrintBackend} + end + const GtkPrintBackendLike = GtkPrintBackend end - mutable struct GtkPrintSetup <: GBoxed - handle::Ptr{GtkPrintSetup} - begin - (GLib.g_type(::Type{T}) where T <: GtkPrintSetup) = begin - ccall(("gtk_print_setup_get_type", libgtk4), GType, ()) - end - function GtkPrintSetup(ref::Ptr{T}, own::Bool = false) where T <: GBoxed - x = new(ref) - if own - finalizer(x) do x - GLib.delboxed(x) + begin + mutable struct GtkPrintSetup <: GBoxed + handle::Ptr{GtkPrintSetup} + begin + (GLib.g_type(::Type{T}) where T <: GtkPrintSetup) = begin + ccall(("gtk_print_setup_get_type", libgtk4), GType, ()) + end + function GtkPrintSetup(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 - x + push!(gboxed_types, GtkPrintSetup) end - push!(gboxed_types, GtkPrintSetup) end + const GtkPrintSetupLike = GtkPrintSetup end begin struct _GtkRecentData @@ -228,27 +281,36 @@ $(Expr(:toplevel, quote mutable struct GtkRecentData handle::Ptr{_GtkRecentData} end - unsafe_convert(::Type{Ptr{_GtkRecentData}}, box::GtkRecentData) = begin - convert(Ptr{_GtkRecentData}, box.handle) - end - end - mutable struct GtkRecentInfo <: GBoxed - handle::Ptr{GtkRecentInfo} begin - (GLib.g_type(::Type{T}) where T <: GtkRecentInfo) = begin - ccall(("gtk_recent_info_get_type", libgtk4), GType, ()) - end - function GtkRecentInfo(ref::Ptr{T}, own::Bool = false) where T <: GBoxed - x = new(ref) - if own - finalizer(x) do x - GLib.delboxed(x) + unsafe_convert(::Type{Ptr{_GtkRecentData}}, box::GtkRecentData) = begin + convert(Ptr{_GtkRecentData}, box.handle) + end + convert(::Type{GtkRecentData}, p::Ptr{_GtkRecentData}, owns = false) = begin + GtkRecentData(p, owns) + end + const GtkRecentDataLike = Union{Ref{_GtkRecentData}, GtkRecentData} + end + end + begin + mutable struct GtkRecentInfo <: GBoxed + handle::Ptr{GtkRecentInfo} + begin + (GLib.g_type(::Type{T}) where T <: GtkRecentInfo) = begin + ccall(("gtk_recent_info_get_type", libgtk4), GType, ()) end + function GtkRecentInfo(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 - x + push!(gboxed_types, GtkRecentInfo) end - push!(gboxed_types, GtkRecentInfo) end + const GtkRecentInfoLike = GtkRecentInfo end begin struct _GtkRequestedSize @@ -259,9 +321,15 @@ $(Expr(:toplevel, quote mutable struct GtkRequestedSize handle::Ptr{_GtkRequestedSize} end - unsafe_convert(::Type{Ptr{_GtkRequestedSize}}, box::GtkRequestedSize) = begin - convert(Ptr{_GtkRequestedSize}, box.handle) - end + begin + unsafe_convert(::Type{Ptr{_GtkRequestedSize}}, box::GtkRequestedSize) = begin + convert(Ptr{_GtkRequestedSize}, box.handle) + end + convert(::Type{GtkRequestedSize}, p::Ptr{_GtkRequestedSize}, owns = false) = begin + GtkRequestedSize(p, owns) + end + const GtkRequestedSizeLike = Union{Ref{_GtkRequestedSize}, GtkRequestedSize} + end end begin struct _GtkRequisition @@ -274,7 +342,7 @@ $(Expr(:toplevel, quote (GLib.g_type(::Type{T}) where T <: GtkRequisition) = begin ccall(("gtk_requisition_get_type", libgtk4), GType, ()) end - function GtkRequisition(ref::Ptr{T}, own::Bool = false) where T <: GBoxed + function GtkRequisition(ref::Ptr{T}, own::Bool = false) where T <: Union{GBoxed, _GtkRequisition} x = new(ref) if own finalizer(x) do x @@ -286,27 +354,36 @@ $(Expr(:toplevel, quote push!(gboxed_types, GtkRequisition) end end - unsafe_convert(::Type{Ptr{_GtkRequisition}}, box::GtkRequisition) = begin - convert(Ptr{_GtkRequisition}, box.handle) - end - end - mutable struct GtkScrollInfo <: GBoxed - handle::Ptr{GtkScrollInfo} begin - (GLib.g_type(::Type{T}) where T <: GtkScrollInfo) = begin - ccall(("gtk_scroll_info_get_type", libgtk4), GType, ()) - end - function GtkScrollInfo(ref::Ptr{T}, own::Bool = false) where T <: GBoxed - x = new(ref) - if own - finalizer(x) do x - GLib.delboxed(x) + unsafe_convert(::Type{Ptr{_GtkRequisition}}, box::GtkRequisition) = begin + convert(Ptr{_GtkRequisition}, box.handle) + end + convert(::Type{GtkRequisition}, p::Ptr{_GtkRequisition}, owns = false) = begin + GtkRequisition(p, owns) + end + const GtkRequisitionLike = Union{Ref{_GtkRequisition}, GtkRequisition} + end + end + begin + mutable struct GtkScrollInfo <: GBoxed + handle::Ptr{GtkScrollInfo} + begin + (GLib.g_type(::Type{T}) where T <: GtkScrollInfo) = begin + ccall(("gtk_scroll_info_get_type", libgtk4), GType, ()) + end + function GtkScrollInfo(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 - x + push!(gboxed_types, GtkScrollInfo) end - push!(gboxed_types, GtkScrollInfo) end + const GtkScrollInfoLike = GtkScrollInfo end begin struct _GtkTextIter @@ -331,7 +408,7 @@ $(Expr(:toplevel, quote (GLib.g_type(::Type{T}) where T <: GtkTextIter) = begin ccall(("gtk_text_iter_get_type", libgtk4), GType, ()) end - function GtkTextIter(ref::Ptr{T}, own::Bool = false) where T <: GBoxed + function GtkTextIter(ref::Ptr{T}, own::Bool = false) where T <: Union{GBoxed, _GtkTextIter} x = new(ref) if own finalizer(x) do x @@ -343,9 +420,15 @@ $(Expr(:toplevel, quote push!(gboxed_types, GtkTextIter) end end - unsafe_convert(::Type{Ptr{_GtkTextIter}}, box::GtkTextIter) = begin - convert(Ptr{_GtkTextIter}, box.handle) - end + begin + unsafe_convert(::Type{Ptr{_GtkTextIter}}, box::GtkTextIter) = begin + convert(Ptr{_GtkTextIter}, box.handle) + end + convert(::Type{GtkTextIter}, p::Ptr{_GtkTextIter}, owns = false) = begin + GtkTextIter(p, owns) + end + const GtkTextIterLike = Union{Ref{_GtkTextIter}, GtkTextIter} + end end begin struct _GtkTreeIter @@ -360,7 +443,7 @@ $(Expr(:toplevel, quote (GLib.g_type(::Type{T}) where T <: GtkTreeIter) = begin ccall(("gtk_tree_iter_get_type", libgtk4), GType, ()) end - function GtkTreeIter(ref::Ptr{T}, own::Bool = false) where T <: GBoxed + function GtkTreeIter(ref::Ptr{T}, own::Bool = false) where T <: Union{GBoxed, _GtkTreeIter} x = new(ref) if own finalizer(x) do x @@ -372,27 +455,36 @@ $(Expr(:toplevel, quote push!(gboxed_types, GtkTreeIter) end end - unsafe_convert(::Type{Ptr{_GtkTreeIter}}, box::GtkTreeIter) = begin - convert(Ptr{_GtkTreeIter}, box.handle) - end - end - mutable struct GtkTreePath <: GBoxed - handle::Ptr{GtkTreePath} begin - (GLib.g_type(::Type{T}) where T <: GtkTreePath) = begin - ccall(("gtk_tree_path_get_type", libgtk4), GType, ()) - end - function GtkTreePath(ref::Ptr{T}, own::Bool = false) where T <: GBoxed - x = new(ref) - if own - finalizer(x) do x - GLib.delboxed(x) + unsafe_convert(::Type{Ptr{_GtkTreeIter}}, box::GtkTreeIter) = begin + convert(Ptr{_GtkTreeIter}, box.handle) + end + convert(::Type{GtkTreeIter}, p::Ptr{_GtkTreeIter}, owns = false) = begin + GtkTreeIter(p, owns) + end + const GtkTreeIterLike = Union{Ref{_GtkTreeIter}, GtkTreeIter} + end + end + begin + mutable struct GtkTreePath <: GBoxed + handle::Ptr{GtkTreePath} + begin + (GLib.g_type(::Type{T}) where T <: GtkTreePath) = begin + ccall(("gtk_tree_path_get_type", libgtk4), GType, ()) + end + function GtkTreePath(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 - x + push!(gboxed_types, GtkTreePath) end - push!(gboxed_types, GtkTreePath) end + const GtkTreePathLike = GtkTreePath end @doc "See the [GTK docs](https://docs.gtk.org/gtk4/struct.AccessibleList.html)." GtkAccessibleList @doc "See the [GTK docs](https://docs.gtk.org/gtk4/struct.AccessibleTextRange.html)." GtkAccessibleTextRange @@ -7550,7 +7642,7 @@ $(Expr(:toplevel, quote GLib.setproperties!(obj; kwargs...) obj end - function GtkColorButton(_rgba::Union{GdkRGBA, Ref{_GdkRGBA}}; kwargs...) + function GtkColorButton(_rgba::GdkRGBALike; kwargs...) obj = G_.ColorButton_new_with_rgba(_rgba) GLib.setproperties!(obj; kwargs...) obj @@ -7598,7 +7690,7 @@ $(Expr(:toplevel, quote function GtkComboBoxText() G_.ComboBoxText_new() end - function GtkConstantExpression(_value::Union{GValue, Ref{_GValue}}) + function GtkConstantExpression(_value::GValueLike) G_.ConstantExpression_new_for_value(_value) end function GtkConstraint(_target::Maybe(GtkConstraintTarget), _target_attribute, _relation, _source::Maybe(GtkConstraintTarget), _source_attribute, _multiplier::Real, _constant::Real, _strength::Integer; kwargs...) @@ -8548,7 +8640,7 @@ $(Expr(:toplevel, quote function GtkBorder() G_.Border_new() end - function GtkCssSection(_file::Maybe(GFile), _start::Union{GtkCssLocation, Ref{_GtkCssLocation}}, _end::Union{GtkCssLocation, Ref{_GtkCssLocation}}) + function GtkCssSection(_file::Maybe(GFile), _start::GtkCssLocationLike, _end::GtkCssLocationLike) G_.CssSection_new(_file, _start, _end) end function GtkPaperSize(_name::Maybe(Union{AbstractString, Symbol})) @@ -10134,8 +10226,8 @@ $(Expr(:toplevel, quote end function GtkCellAllocCallback(renderer, cell_area, cell_background, data) renderer = convert(GtkCellRenderer, renderer, false) - cell_area = convert(Union{GdkRectangle, Ref{_GdkRectangle}}, cell_area, false) - cell_background = convert(Union{GdkRectangle, Ref{_GdkRectangle}}, cell_background, false) + cell_area = convert(GdkRectangleLike, cell_area, false) + cell_background = convert(GdkRectangleLike, cell_background, false) f = data ret = f(renderer, cell_area, cell_background) convert(Cint, ret) @@ -10156,7 +10248,7 @@ $(Expr(:toplevel, quote leaftype = GLib.find_leaf_type(tree_model) convert(leaftype, tree_model, false) end - iter = convert(Union{GtkTreeIter, Ref{_GtkTreeIter}}, iter, false) + iter = convert(GtkTreeIterLike, iter, false) f = data ret = f(cell_layout, cell, tree_model, iter) nothing @@ -10177,7 +10269,7 @@ $(Expr(:toplevel, quote function GtkEntryCompletionMatchFunc(completion, key, iter, user_data) completion = convert(GtkEntryCompletion, completion, false) key = string_or_nothing(key, false) - iter = convert(Union{GtkTreeIter, Ref{_GtkTreeIter}}, iter, false) + iter = convert(GtkTreeIterLike, iter, false) f = user_data ret = f(completion, key, iter) convert(Cint, ret) @@ -10338,7 +10430,7 @@ $(Expr(:toplevel, quote leaftype = GLib.find_leaf_type(tree_model) convert(leaftype, tree_model, false) end - iter = convert(Union{GtkTreeIter, Ref{_GtkTreeIter}}, iter, false) + iter = convert(GtkTreeIterLike, iter, false) f = data ret = f(tree_column, cell, tree_model, iter) nothing @@ -10348,8 +10440,8 @@ $(Expr(:toplevel, quote leaftype = GLib.find_leaf_type(model) convert(leaftype, model, false) end - a = convert(Union{GtkTreeIter, Ref{_GtkTreeIter}}, a, false) - b = convert(Union{GtkTreeIter, Ref{_GtkTreeIter}}, b, false) + a = convert(GtkTreeIterLike, a, false) + b = convert(GtkTreeIterLike, b, false) f = user_data ret = f(model, a, b) convert(Int32, ret) @@ -10368,7 +10460,7 @@ $(Expr(:toplevel, quote leaftype = GLib.find_leaf_type(model) convert(leaftype, model, false) end - iter = convert(Union{GtkTreeIter, Ref{_GtkTreeIter}}, iter, false) + iter = convert(GtkTreeIterLike, iter, false) f = data ret = f(model, iter, value, column) nothing @@ -10378,7 +10470,7 @@ $(Expr(:toplevel, quote leaftype = GLib.find_leaf_type(model) convert(leaftype, model, false) end - iter = convert(Union{GtkTreeIter, Ref{_GtkTreeIter}}, iter, false) + iter = convert(GtkTreeIterLike, iter, false) f = data ret = f(model, iter) convert(Cint, ret) @@ -10389,7 +10481,7 @@ $(Expr(:toplevel, quote convert(leaftype, model, false) end path = convert(GtkTreePath, path, false) - iter = convert(Union{GtkTreeIter, Ref{_GtkTreeIter}}, iter, false) + iter = convert(GtkTreeIterLike, iter, false) f = data ret = f(model, path, iter) convert(Cint, ret) @@ -10400,7 +10492,7 @@ $(Expr(:toplevel, quote convert(leaftype, model, false) end path = convert(GtkTreePath, path, false) - iter = convert(Union{GtkTreeIter, Ref{_GtkTreeIter}}, iter, false) + iter = convert(GtkTreeIterLike, iter, false) f = data ret = f(model, path, iter) nothing @@ -10438,7 +10530,7 @@ $(Expr(:toplevel, quote leaftype = GLib.find_leaf_type(model) convert(leaftype, model, false) end - iter = convert(Union{GtkTreeIter, Ref{_GtkTreeIter}}, iter, false) + iter = convert(GtkTreeIterLike, iter, false) f = data ret = f(model, iter) convert(Cint, ret) @@ -10449,11 +10541,11 @@ $(Expr(:toplevel, quote convert(leaftype, model, false) end key = string_or_nothing(key, false) - iter = convert(Union{GtkTreeIter, Ref{_GtkTreeIter}}, iter, false) + iter = convert(GtkTreeIterLike, iter, false) f = search_data ret = f(model, column, key, iter) convert(Cint, ret) end - export GtkAccessibleList, GtkAccessibleTextRange, _GtkAccessibleTextRange, GtkBitset, GtkBitsetIter, _GtkBitsetIter, GtkBorder, _GtkBorder, GtkBuildableParseContext, GtkBuildableParser, _GtkBuildableParser, GtkCssLocation, _GtkCssLocation, GtkCssSection, GtkCssStyleChange, GtkExpressionWatch, GtkPadActionEntry, _GtkPadActionEntry, GtkPaperSize, GtkPrintBackend, GtkPrintSetup, GtkRecentData, _GtkRecentData, GtkRecentInfo, GtkRequestedSize, _GtkRequestedSize, GtkRequisition, _GtkRequisition, GtkScrollInfo, GtkTextIter, _GtkTextIter, GtkTreeIter, _GtkTreeIter, GtkTreePath, GtkAccessible, GtkAccessibleRange, GtkAccessibleText, GtkActionable, GtkAppChooser, GtkBuildable, GtkBuilderScope, GtkCellEditable, GtkCellLayout, GtkColorChooser, GtkConstraintTarget, GtkEditable, GtkFileChooser, GtkFontChooser, GtkNative, GtkOrientable, GtkPrintOperationPreview, GtkRoot, GtkScrollable, GtkSectionModel, GtkSelectionModel, GtkShortcutManager, GtkStyleProvider, GtkSymbolicPaintable, GtkTreeDragDest, GtkTreeDragSource, GtkTreeModel, GtkTreeSortable, GtkATContext, GtkAboutDialog, GtkAboutDialogLeaf, GtkActionBar, GtkActionBarLeaf, GtkActivateAction, GtkActivateActionLeaf, GtkAdjustment, GtkAdjustmentLeaf, GtkAlertDialog, GtkAlertDialogLeaf, GtkAlternativeTrigger, GtkAlternativeTriggerLeaf, GtkAnyFilter, GtkAnyFilterLeaf, GtkAppChooserButton, GtkAppChooserButtonLeaf, GtkAppChooserDialog, GtkAppChooserDialogLeaf, GtkAppChooserWidget, GtkAppChooserWidgetLeaf, GtkApplication, GtkApplicationLeaf, GtkApplicationWindow, GtkApplicationWindowLeaf, GtkAspectFrame, GtkAspectFrameLeaf, GtkAssistant, GtkAssistantLeaf, GtkAssistantPage, GtkAssistantPageLeaf, GtkBinLayout, GtkBinLayoutLeaf, GtkBookmarkList, GtkBookmarkListLeaf, GtkBoolFilter, GtkBoolFilterLeaf, GtkBox, GtkBoxLeaf, GtkBoxLayout, GtkBoxLayoutLeaf, GtkBuilder, GtkBuilderLeaf, GtkBuilderCScope, GtkBuilderCScopeLeaf, GtkBuilderListItemFactory, GtkBuilderListItemFactoryLeaf, GtkButton, GtkButtonLeaf, GtkCalendar, GtkCalendarLeaf, GtkCallbackAction, GtkCallbackActionLeaf, GtkCellArea, GtkCellAreaBox, GtkCellAreaBoxLeaf, GtkCellAreaContext, GtkCellAreaContextLeaf, GtkCellRenderer, GtkCellRendererAccel, GtkCellRendererAccelLeaf, GtkCellRendererCombo, GtkCellRendererComboLeaf, GtkCellRendererPixbuf, GtkCellRendererPixbufLeaf, GtkCellRendererProgress, GtkCellRendererProgressLeaf, GtkCellRendererSpin, GtkCellRendererSpinLeaf, GtkCellRendererSpinner, GtkCellRendererSpinnerLeaf, GtkCellRendererText, GtkCellRendererTextLeaf, GtkCellRendererToggle, GtkCellRendererToggleLeaf, GtkCellView, GtkCellViewLeaf, GtkCenterBox, GtkCenterBoxLeaf, GtkCenterLayout, GtkCenterLayoutLeaf, GtkCheckButton, GtkCheckButtonLeaf, GtkColorButton, GtkColorButtonLeaf, GtkColorChooserDialog, GtkColorChooserDialogLeaf, GtkColorChooserWidget, GtkColorChooserWidgetLeaf, GtkColorDialog, GtkColorDialogLeaf, GtkColorDialogButton, GtkColorDialogButtonLeaf, GtkColumnView, GtkColumnViewLeaf, GtkColumnViewCell, GtkColumnViewCellLeaf, GtkColumnViewColumn, GtkColumnViewColumnLeaf, GtkColumnViewRow, GtkColumnViewRowLeaf, GtkColumnViewSorter, GtkColumnViewSorterLeaf, GtkComboBox, GtkComboBoxLeaf, GtkComboBoxText, GtkComboBoxTextLeaf, GtkConstantExpression, GtkConstantExpressionLeaf, GtkConstraint, GtkConstraintLeaf, GtkConstraintGuide, GtkConstraintGuideLeaf, GtkConstraintLayout, GtkConstraintLayoutLeaf, GtkConstraintLayoutChild, GtkConstraintLayoutChildLeaf, GtkCssProvider, GtkCssProviderLeaf, GtkCustomFilter, GtkCustomFilterLeaf, GtkCustomLayout, GtkCustomLayoutLeaf, GtkCustomSorter, GtkCustomSorterLeaf, GtkDialog, GtkDialogLeaf, GtkDirectoryList, GtkDirectoryListLeaf, GtkDragIcon, GtkDragIconLeaf, GtkDragSource, GtkDragSourceLeaf, GtkDrawingArea, GtkDrawingAreaLeaf, GtkDropControllerMotion, GtkDropControllerMotionLeaf, GtkDropDown, GtkDropDownLeaf, GtkDropTarget, GtkDropTargetLeaf, GtkDropTargetAsync, GtkDropTargetAsyncLeaf, GtkEditableLabel, GtkEditableLabelLeaf, GtkEmojiChooser, GtkEmojiChooserLeaf, GtkEntry, GtkEntryLeaf, GtkEntryBuffer, GtkEntryBufferLeaf, GtkEntryCompletion, GtkEntryCompletionLeaf, GtkEventController, GtkEventControllerFocus, GtkEventControllerFocusLeaf, GtkEventControllerKey, GtkEventControllerKeyLeaf, GtkEventControllerLegacy, GtkEventControllerLegacyLeaf, GtkEventControllerMotion, GtkEventControllerMotionLeaf, GtkEventControllerScroll, GtkEventControllerScrollLeaf, GtkEveryFilter, GtkEveryFilterLeaf, GtkExpander, GtkExpanderLeaf, GtkExpression, GtkFileChooserDialog, GtkFileChooserDialogLeaf, GtkFileChooserNative, GtkFileChooserNativeLeaf, GtkFileChooserWidget, GtkFileChooserWidgetLeaf, GtkFileDialog, GtkFileDialogLeaf, GtkFileFilter, GtkFileFilterLeaf, GtkFileLauncher, GtkFileLauncherLeaf, GtkFilter, GtkFilterLeaf, GtkFilterListModel, GtkFilterListModelLeaf, GtkFixed, GtkFixedLeaf, GtkFixedLayout, GtkFixedLayoutLeaf, GtkFixedLayoutChild, GtkFixedLayoutChildLeaf, GtkFlattenListModel, GtkFlattenListModelLeaf, GtkFlowBox, GtkFlowBoxLeaf, GtkFlowBoxChild, GtkFlowBoxChildLeaf, GtkFontButton, GtkFontButtonLeaf, GtkFontChooserDialog, GtkFontChooserDialogLeaf, GtkFontChooserWidget, GtkFontChooserWidgetLeaf, GtkFontDialog, GtkFontDialogLeaf, GtkFontDialogButton, GtkFontDialogButtonLeaf, GtkFrame, GtkFrameLeaf, GtkGLArea, GtkGLAreaLeaf, GtkGesture, GtkGestureClick, GtkGestureClickLeaf, GtkGestureDrag, GtkGestureDragLeaf, GtkGestureLongPress, GtkGestureLongPressLeaf, GtkGesturePan, GtkGesturePanLeaf, GtkGestureRotate, GtkGestureRotateLeaf, GtkGestureSingle, GtkGestureSingleLeaf, GtkGestureStylus, GtkGestureStylusLeaf, GtkGestureSwipe, GtkGestureSwipeLeaf, GtkGestureZoom, GtkGestureZoomLeaf, GtkGraphicsOffload, GtkGraphicsOffloadLeaf, GtkGrid, GtkGridLeaf, GtkGridLayout, GtkGridLayoutLeaf, GtkGridLayoutChild, GtkGridLayoutChildLeaf, GtkGridView, GtkGridViewLeaf, GtkHeaderBar, GtkHeaderBarLeaf, GtkIMContext, GtkIMContextSimple, GtkIMContextSimpleLeaf, GtkIMMulticontext, GtkIMMulticontextLeaf, GtkIconPaintable, GtkIconPaintableLeaf, GtkIconTheme, GtkIconThemeLeaf, GtkIconView, GtkIconViewLeaf, GtkImage, GtkImageLeaf, GtkInfoBar, GtkInfoBarLeaf, GtkInscription, GtkInscriptionLeaf, GtkKeyvalTrigger, GtkKeyvalTriggerLeaf, GtkLabel, GtkLabelLeaf, GtkLayoutChild, GtkLayoutManager, GtkLevelBar, GtkLevelBarLeaf, GtkLinkButton, GtkLinkButtonLeaf, GtkListBase, GtkListBox, GtkListBoxLeaf, GtkListBoxRow, GtkListBoxRowLeaf, GtkListHeader, GtkListHeaderLeaf, GtkListItem, GtkListItemLeaf, GtkListItemFactory, GtkListItemFactoryLeaf, GtkListStore, GtkListStoreLeaf, GtkListView, GtkListViewLeaf, GtkLockButton, GtkLockButtonLeaf, GtkMapListModel, GtkMapListModelLeaf, GtkMediaControls, GtkMediaControlsLeaf, GtkMediaFile, GtkMediaStream, GtkMenuButton, GtkMenuButtonLeaf, GtkMessageDialog, GtkMessageDialogLeaf, GtkMnemonicAction, GtkMnemonicActionLeaf, GtkMnemonicTrigger, GtkMnemonicTriggerLeaf, GtkMountOperation, GtkMountOperationLeaf, GtkMultiFilter, GtkMultiSelection, GtkMultiSelectionLeaf, GtkMultiSorter, GtkMultiSorterLeaf, GtkNamedAction, GtkNamedActionLeaf, GtkNativeDialog, GtkNeverTrigger, GtkNeverTriggerLeaf, GtkNoSelection, GtkNoSelectionLeaf, GtkNotebook, GtkNotebookLeaf, GtkNotebookPage, GtkNotebookPageLeaf, GtkNothingAction, GtkNothingActionLeaf, GtkNumericSorter, GtkNumericSorterLeaf, GtkObjectExpression, GtkObjectExpressionLeaf, GtkOverlay, GtkOverlayLeaf, GtkOverlayLayout, GtkOverlayLayoutLeaf, GtkOverlayLayoutChild, GtkOverlayLayoutChildLeaf, GtkPadController, GtkPadControllerLeaf, GtkPageSetup, GtkPageSetupLeaf, GtkPaned, GtkPanedLeaf, GtkPasswordEntry, GtkPasswordEntryLeaf, GtkPasswordEntryBuffer, GtkPasswordEntryBufferLeaf, GtkPicture, GtkPictureLeaf, GtkPopover, GtkPopoverLeaf, GtkPopoverMenu, GtkPopoverMenuLeaf, GtkPopoverMenuBar, GtkPopoverMenuBarLeaf, GtkPrintContext, GtkPrintContextLeaf, GtkPrintDialog, GtkPrintDialogLeaf, GtkPrintJob, GtkPrintJobLeaf, GtkPrintOperation, GtkPrintOperationLeaf, GtkPrintSettings, GtkPrintSettingsLeaf, GtkPrinter, GtkPrinterLeaf, GtkProgressBar, GtkProgressBarLeaf, GtkPropertyExpression, GtkPropertyExpressionLeaf, GtkRange, GtkRangeLeaf, GtkRecentManager, GtkRecentManagerLeaf, GtkRevealer, GtkRevealerLeaf, GtkScale, GtkScaleLeaf, GtkScaleButton, GtkScaleButtonLeaf, GtkScrollbar, GtkScrollbarLeaf, GtkScrolledWindow, GtkScrolledWindowLeaf, GtkSearchBar, GtkSearchBarLeaf, GtkSearchEntry, GtkSearchEntryLeaf, GtkSelectionFilterModel, GtkSelectionFilterModelLeaf, GtkSeparator, GtkSeparatorLeaf, GtkSettings, GtkSettingsLeaf, GtkShortcut, GtkShortcutLeaf, GtkShortcutAction, GtkShortcutController, GtkShortcutControllerLeaf, GtkShortcutLabel, GtkShortcutLabelLeaf, GtkShortcutTrigger, GtkShortcutsGroup, GtkShortcutsGroupLeaf, GtkShortcutsSection, GtkShortcutsSectionLeaf, GtkShortcutsShortcut, GtkShortcutsShortcutLeaf, GtkShortcutsWindow, GtkShortcutsWindowLeaf, GtkSignalAction, GtkSignalActionLeaf, GtkSignalListItemFactory, GtkSignalListItemFactoryLeaf, GtkSingleSelection, GtkSingleSelectionLeaf, GtkSizeGroup, GtkSizeGroupLeaf, GtkSliceListModel, GtkSliceListModelLeaf, GtkSnapshot, GtkSnapshotLeaf, GtkSortListModel, GtkSortListModelLeaf, GtkSorter, GtkSorterLeaf, GtkSpinButton, GtkSpinButtonLeaf, GtkSpinner, GtkSpinnerLeaf, GtkStack, GtkStackLeaf, GtkStackPage, GtkStackPageLeaf, GtkStackSidebar, GtkStackSidebarLeaf, GtkStackSwitcher, GtkStackSwitcherLeaf, GtkStatusbar, GtkStatusbarLeaf, GtkStringFilter, GtkStringFilterLeaf, GtkStringList, GtkStringListLeaf, GtkStringObject, GtkStringObjectLeaf, GtkStringSorter, GtkStringSorterLeaf, GtkStyleContext, GtkStyleContextLeaf, GtkSwitch, GtkSwitchLeaf, GtkText, GtkTextLeaf, GtkTextBuffer, GtkTextBufferLeaf, GtkTextChildAnchor, GtkTextChildAnchorLeaf, GtkTextMark, GtkTextMarkLeaf, GtkTextTag, GtkTextTagLeaf, GtkTextTagTable, GtkTextTagTableLeaf, GtkTextView, GtkTextViewLeaf, GtkToggleButton, GtkToggleButtonLeaf, GtkTooltip, GtkTooltipLeaf, GtkTreeExpander, GtkTreeExpanderLeaf, GtkTreeListModel, GtkTreeListModelLeaf, GtkTreeListRow, GtkTreeListRowLeaf, GtkTreeListRowSorter, GtkTreeListRowSorterLeaf, GtkTreeModelFilter, GtkTreeModelFilterLeaf, GtkTreeModelSort, GtkTreeModelSortLeaf, GtkTreeSelection, GtkTreeSelectionLeaf, GtkTreeStore, GtkTreeStoreLeaf, GtkTreeView, GtkTreeViewLeaf, GtkTreeViewColumn, GtkTreeViewColumnLeaf, GtkUriLauncher, GtkUriLauncherLeaf, GtkVideo, GtkVideoLeaf, GtkViewport, GtkViewportLeaf, GtkVolumeButton, GtkVolumeButtonLeaf, GtkWidget, GtkWidgetPaintable, GtkWidgetPaintableLeaf, GtkWindow, GtkWindowLeaf, GtkWindowControls, GtkWindowControlsLeaf, GtkWindowGroup, GtkWindowGroupLeaf, GtkWindowHandle, GtkWindowHandleLeaf, GtkAssistantPageFunc, GtkCellAllocCallback, GtkCellCallback, GtkCellLayoutDataFunc, GtkCustomFilterFunc, GtkDrawingAreaDrawFunc, GtkEntryCompletionMatchFunc, GtkExpressionNotify, GtkFlowBoxCreateWidgetFunc, GtkFlowBoxFilterFunc, GtkFlowBoxForeachFunc, GtkFlowBoxSortFunc, GtkFontFilterFunc, GtkIconViewForeachFunc, GtkListBoxCreateWidgetFunc, GtkListBoxFilterFunc, GtkListBoxForeachFunc, GtkListBoxSortFunc, GtkListBoxUpdateHeaderFunc, GtkMapListModelMapFunc, GtkMenuButtonCreatePopupFunc, GtkPageSetupDoneFunc, GtkPrintSettingsFunc, GtkPrinterFunc, GtkScaleFormatValueFunc, GtkShortcutFunc, GtkTextCharPredicate, GtkTextTagTableForeach, GtkTickCallback, GtkTreeCellDataFunc, GtkTreeIterCompareFunc, GtkTreeListModelCreateModelFunc, GtkTreeModelFilterModifyFunc, GtkTreeModelFilterVisibleFunc, GtkTreeModelForeachFunc, GtkTreeSelectionForeachFunc, GtkTreeSelectionFunc, GtkTreeViewColumnDropFunc, GtkTreeViewMappingFunc, GtkTreeViewRowSeparatorFunc, GtkTreeViewSearchEqualFunc + export GtkAccessibleList, GtkAccessibleTextRange, GtkAccessibleTextRangeLike, _GtkAccessibleTextRange, GtkBitset, GtkBitsetIter, GtkBitsetIterLike, _GtkBitsetIter, GtkBorder, GtkBorderLike, _GtkBorder, GtkBuildableParseContext, GtkBuildableParser, GtkBuildableParserLike, _GtkBuildableParser, GtkCssLocation, GtkCssLocationLike, _GtkCssLocation, GtkCssSection, GtkCssStyleChange, GtkExpressionWatch, GtkPadActionEntry, GtkPadActionEntryLike, _GtkPadActionEntry, GtkPaperSize, GtkPrintBackend, GtkPrintSetup, GtkRecentData, GtkRecentDataLike, _GtkRecentData, GtkRecentInfo, GtkRequestedSize, GtkRequestedSizeLike, _GtkRequestedSize, GtkRequisition, GtkRequisitionLike, _GtkRequisition, GtkScrollInfo, GtkTextIter, GtkTextIterLike, _GtkTextIter, GtkTreeIter, GtkTreeIterLike, _GtkTreeIter, GtkTreePath, GtkAccessible, GtkAccessibleRange, GtkAccessibleText, GtkActionable, GtkAppChooser, GtkBuildable, GtkBuilderScope, GtkCellEditable, GtkCellLayout, GtkColorChooser, GtkConstraintTarget, GtkEditable, GtkFileChooser, GtkFontChooser, GtkNative, GtkOrientable, GtkPrintOperationPreview, GtkRoot, GtkScrollable, GtkSectionModel, GtkSelectionModel, GtkShortcutManager, GtkStyleProvider, GtkSymbolicPaintable, GtkTreeDragDest, GtkTreeDragSource, GtkTreeModel, GtkTreeSortable, GtkATContext, GtkAboutDialog, GtkAboutDialogLeaf, GtkActionBar, GtkActionBarLeaf, GtkActivateAction, GtkActivateActionLeaf, GtkAdjustment, GtkAdjustmentLeaf, GtkAlertDialog, GtkAlertDialogLeaf, GtkAlternativeTrigger, GtkAlternativeTriggerLeaf, GtkAnyFilter, GtkAnyFilterLeaf, GtkAppChooserButton, GtkAppChooserButtonLeaf, GtkAppChooserDialog, GtkAppChooserDialogLeaf, GtkAppChooserWidget, GtkAppChooserWidgetLeaf, GtkApplication, GtkApplicationLeaf, GtkApplicationWindow, GtkApplicationWindowLeaf, GtkAspectFrame, GtkAspectFrameLeaf, GtkAssistant, GtkAssistantLeaf, GtkAssistantPage, GtkAssistantPageLeaf, GtkBinLayout, GtkBinLayoutLeaf, GtkBookmarkList, GtkBookmarkListLeaf, GtkBoolFilter, GtkBoolFilterLeaf, GtkBox, GtkBoxLeaf, GtkBoxLayout, GtkBoxLayoutLeaf, GtkBuilder, GtkBuilderLeaf, GtkBuilderCScope, GtkBuilderCScopeLeaf, GtkBuilderListItemFactory, GtkBuilderListItemFactoryLeaf, GtkButton, GtkButtonLeaf, GtkCalendar, GtkCalendarLeaf, GtkCallbackAction, GtkCallbackActionLeaf, GtkCellArea, GtkCellAreaBox, GtkCellAreaBoxLeaf, GtkCellAreaContext, GtkCellAreaContextLeaf, GtkCellRenderer, GtkCellRendererAccel, GtkCellRendererAccelLeaf, GtkCellRendererCombo, GtkCellRendererComboLeaf, GtkCellRendererPixbuf, GtkCellRendererPixbufLeaf, GtkCellRendererProgress, GtkCellRendererProgressLeaf, GtkCellRendererSpin, GtkCellRendererSpinLeaf, GtkCellRendererSpinner, GtkCellRendererSpinnerLeaf, GtkCellRendererText, GtkCellRendererTextLeaf, GtkCellRendererToggle, GtkCellRendererToggleLeaf, GtkCellView, GtkCellViewLeaf, GtkCenterBox, GtkCenterBoxLeaf, GtkCenterLayout, GtkCenterLayoutLeaf, GtkCheckButton, GtkCheckButtonLeaf, GtkColorButton, GtkColorButtonLeaf, GtkColorChooserDialog, GtkColorChooserDialogLeaf, GtkColorChooserWidget, GtkColorChooserWidgetLeaf, GtkColorDialog, GtkColorDialogLeaf, GtkColorDialogButton, GtkColorDialogButtonLeaf, GtkColumnView, GtkColumnViewLeaf, GtkColumnViewCell, GtkColumnViewCellLeaf, GtkColumnViewColumn, GtkColumnViewColumnLeaf, GtkColumnViewRow, GtkColumnViewRowLeaf, GtkColumnViewSorter, GtkColumnViewSorterLeaf, GtkComboBox, GtkComboBoxLeaf, GtkComboBoxText, GtkComboBoxTextLeaf, GtkConstantExpression, GtkConstantExpressionLeaf, GtkConstraint, GtkConstraintLeaf, GtkConstraintGuide, GtkConstraintGuideLeaf, GtkConstraintLayout, GtkConstraintLayoutLeaf, GtkConstraintLayoutChild, GtkConstraintLayoutChildLeaf, GtkCssProvider, GtkCssProviderLeaf, GtkCustomFilter, GtkCustomFilterLeaf, GtkCustomLayout, GtkCustomLayoutLeaf, GtkCustomSorter, GtkCustomSorterLeaf, GtkDialog, GtkDialogLeaf, GtkDirectoryList, GtkDirectoryListLeaf, GtkDragIcon, GtkDragIconLeaf, GtkDragSource, GtkDragSourceLeaf, GtkDrawingArea, GtkDrawingAreaLeaf, GtkDropControllerMotion, GtkDropControllerMotionLeaf, GtkDropDown, GtkDropDownLeaf, GtkDropTarget, GtkDropTargetLeaf, GtkDropTargetAsync, GtkDropTargetAsyncLeaf, GtkEditableLabel, GtkEditableLabelLeaf, GtkEmojiChooser, GtkEmojiChooserLeaf, GtkEntry, GtkEntryLeaf, GtkEntryBuffer, GtkEntryBufferLeaf, GtkEntryCompletion, GtkEntryCompletionLeaf, GtkEventController, GtkEventControllerFocus, GtkEventControllerFocusLeaf, GtkEventControllerKey, GtkEventControllerKeyLeaf, GtkEventControllerLegacy, GtkEventControllerLegacyLeaf, GtkEventControllerMotion, GtkEventControllerMotionLeaf, GtkEventControllerScroll, GtkEventControllerScrollLeaf, GtkEveryFilter, GtkEveryFilterLeaf, GtkExpander, GtkExpanderLeaf, GtkExpression, GtkFileChooserDialog, GtkFileChooserDialogLeaf, GtkFileChooserNative, GtkFileChooserNativeLeaf, GtkFileChooserWidget, GtkFileChooserWidgetLeaf, GtkFileDialog, GtkFileDialogLeaf, GtkFileFilter, GtkFileFilterLeaf, GtkFileLauncher, GtkFileLauncherLeaf, GtkFilter, GtkFilterLeaf, GtkFilterListModel, GtkFilterListModelLeaf, GtkFixed, GtkFixedLeaf, GtkFixedLayout, GtkFixedLayoutLeaf, GtkFixedLayoutChild, GtkFixedLayoutChildLeaf, GtkFlattenListModel, GtkFlattenListModelLeaf, GtkFlowBox, GtkFlowBoxLeaf, GtkFlowBoxChild, GtkFlowBoxChildLeaf, GtkFontButton, GtkFontButtonLeaf, GtkFontChooserDialog, GtkFontChooserDialogLeaf, GtkFontChooserWidget, GtkFontChooserWidgetLeaf, GtkFontDialog, GtkFontDialogLeaf, GtkFontDialogButton, GtkFontDialogButtonLeaf, GtkFrame, GtkFrameLeaf, GtkGLArea, GtkGLAreaLeaf, GtkGesture, GtkGestureClick, GtkGestureClickLeaf, GtkGestureDrag, GtkGestureDragLeaf, GtkGestureLongPress, GtkGestureLongPressLeaf, GtkGesturePan, GtkGesturePanLeaf, GtkGestureRotate, GtkGestureRotateLeaf, GtkGestureSingle, GtkGestureSingleLeaf, GtkGestureStylus, GtkGestureStylusLeaf, GtkGestureSwipe, GtkGestureSwipeLeaf, GtkGestureZoom, GtkGestureZoomLeaf, GtkGraphicsOffload, GtkGraphicsOffloadLeaf, GtkGrid, GtkGridLeaf, GtkGridLayout, GtkGridLayoutLeaf, GtkGridLayoutChild, GtkGridLayoutChildLeaf, GtkGridView, GtkGridViewLeaf, GtkHeaderBar, GtkHeaderBarLeaf, GtkIMContext, GtkIMContextSimple, GtkIMContextSimpleLeaf, GtkIMMulticontext, GtkIMMulticontextLeaf, GtkIconPaintable, GtkIconPaintableLeaf, GtkIconTheme, GtkIconThemeLeaf, GtkIconView, GtkIconViewLeaf, GtkImage, GtkImageLeaf, GtkInfoBar, GtkInfoBarLeaf, GtkInscription, GtkInscriptionLeaf, GtkKeyvalTrigger, GtkKeyvalTriggerLeaf, GtkLabel, GtkLabelLeaf, GtkLayoutChild, GtkLayoutManager, GtkLevelBar, GtkLevelBarLeaf, GtkLinkButton, GtkLinkButtonLeaf, GtkListBase, GtkListBox, GtkListBoxLeaf, GtkListBoxRow, GtkListBoxRowLeaf, GtkListHeader, GtkListHeaderLeaf, GtkListItem, GtkListItemLeaf, GtkListItemFactory, GtkListItemFactoryLeaf, GtkListStore, GtkListStoreLeaf, GtkListView, GtkListViewLeaf, GtkLockButton, GtkLockButtonLeaf, GtkMapListModel, GtkMapListModelLeaf, GtkMediaControls, GtkMediaControlsLeaf, GtkMediaFile, GtkMediaStream, GtkMenuButton, GtkMenuButtonLeaf, GtkMessageDialog, GtkMessageDialogLeaf, GtkMnemonicAction, GtkMnemonicActionLeaf, GtkMnemonicTrigger, GtkMnemonicTriggerLeaf, GtkMountOperation, GtkMountOperationLeaf, GtkMultiFilter, GtkMultiSelection, GtkMultiSelectionLeaf, GtkMultiSorter, GtkMultiSorterLeaf, GtkNamedAction, GtkNamedActionLeaf, GtkNativeDialog, GtkNeverTrigger, GtkNeverTriggerLeaf, GtkNoSelection, GtkNoSelectionLeaf, GtkNotebook, GtkNotebookLeaf, GtkNotebookPage, GtkNotebookPageLeaf, GtkNothingAction, GtkNothingActionLeaf, GtkNumericSorter, GtkNumericSorterLeaf, GtkObjectExpression, GtkObjectExpressionLeaf, GtkOverlay, GtkOverlayLeaf, GtkOverlayLayout, GtkOverlayLayoutLeaf, GtkOverlayLayoutChild, GtkOverlayLayoutChildLeaf, GtkPadController, GtkPadControllerLeaf, GtkPageSetup, GtkPageSetupLeaf, GtkPaned, GtkPanedLeaf, GtkPasswordEntry, GtkPasswordEntryLeaf, GtkPasswordEntryBuffer, GtkPasswordEntryBufferLeaf, GtkPicture, GtkPictureLeaf, GtkPopover, GtkPopoverLeaf, GtkPopoverMenu, GtkPopoverMenuLeaf, GtkPopoverMenuBar, GtkPopoverMenuBarLeaf, GtkPrintContext, GtkPrintContextLeaf, GtkPrintDialog, GtkPrintDialogLeaf, GtkPrintJob, GtkPrintJobLeaf, GtkPrintOperation, GtkPrintOperationLeaf, GtkPrintSettings, GtkPrintSettingsLeaf, GtkPrinter, GtkPrinterLeaf, GtkProgressBar, GtkProgressBarLeaf, GtkPropertyExpression, GtkPropertyExpressionLeaf, GtkRange, GtkRangeLeaf, GtkRecentManager, GtkRecentManagerLeaf, GtkRevealer, GtkRevealerLeaf, GtkScale, GtkScaleLeaf, GtkScaleButton, GtkScaleButtonLeaf, GtkScrollbar, GtkScrollbarLeaf, GtkScrolledWindow, GtkScrolledWindowLeaf, GtkSearchBar, GtkSearchBarLeaf, GtkSearchEntry, GtkSearchEntryLeaf, GtkSelectionFilterModel, GtkSelectionFilterModelLeaf, GtkSeparator, GtkSeparatorLeaf, GtkSettings, GtkSettingsLeaf, GtkShortcut, GtkShortcutLeaf, GtkShortcutAction, GtkShortcutController, GtkShortcutControllerLeaf, GtkShortcutLabel, GtkShortcutLabelLeaf, GtkShortcutTrigger, GtkShortcutsGroup, GtkShortcutsGroupLeaf, GtkShortcutsSection, GtkShortcutsSectionLeaf, GtkShortcutsShortcut, GtkShortcutsShortcutLeaf, GtkShortcutsWindow, GtkShortcutsWindowLeaf, GtkSignalAction, GtkSignalActionLeaf, GtkSignalListItemFactory, GtkSignalListItemFactoryLeaf, GtkSingleSelection, GtkSingleSelectionLeaf, GtkSizeGroup, GtkSizeGroupLeaf, GtkSliceListModel, GtkSliceListModelLeaf, GtkSnapshot, GtkSnapshotLeaf, GtkSortListModel, GtkSortListModelLeaf, GtkSorter, GtkSorterLeaf, GtkSpinButton, GtkSpinButtonLeaf, GtkSpinner, GtkSpinnerLeaf, GtkStack, GtkStackLeaf, GtkStackPage, GtkStackPageLeaf, GtkStackSidebar, GtkStackSidebarLeaf, GtkStackSwitcher, GtkStackSwitcherLeaf, GtkStatusbar, GtkStatusbarLeaf, GtkStringFilter, GtkStringFilterLeaf, GtkStringList, GtkStringListLeaf, GtkStringObject, GtkStringObjectLeaf, GtkStringSorter, GtkStringSorterLeaf, GtkStyleContext, GtkStyleContextLeaf, GtkSwitch, GtkSwitchLeaf, GtkText, GtkTextLeaf, GtkTextBuffer, GtkTextBufferLeaf, GtkTextChildAnchor, GtkTextChildAnchorLeaf, GtkTextMark, GtkTextMarkLeaf, GtkTextTag, GtkTextTagLeaf, GtkTextTagTable, GtkTextTagTableLeaf, GtkTextView, GtkTextViewLeaf, GtkToggleButton, GtkToggleButtonLeaf, GtkTooltip, GtkTooltipLeaf, GtkTreeExpander, GtkTreeExpanderLeaf, GtkTreeListModel, GtkTreeListModelLeaf, GtkTreeListRow, GtkTreeListRowLeaf, GtkTreeListRowSorter, GtkTreeListRowSorterLeaf, GtkTreeModelFilter, GtkTreeModelFilterLeaf, GtkTreeModelSort, GtkTreeModelSortLeaf, GtkTreeSelection, GtkTreeSelectionLeaf, GtkTreeStore, GtkTreeStoreLeaf, GtkTreeView, GtkTreeViewLeaf, GtkTreeViewColumn, GtkTreeViewColumnLeaf, GtkUriLauncher, GtkUriLauncherLeaf, GtkVideo, GtkVideoLeaf, GtkViewport, GtkViewportLeaf, GtkVolumeButton, GtkVolumeButtonLeaf, GtkWidget, GtkWidgetPaintable, GtkWidgetPaintableLeaf, GtkWindow, GtkWindowLeaf, GtkWindowControls, GtkWindowControlsLeaf, GtkWindowGroup, GtkWindowGroupLeaf, GtkWindowHandle, GtkWindowHandleLeaf, GtkAssistantPageFunc, GtkCellAllocCallback, GtkCellCallback, GtkCellLayoutDataFunc, GtkCustomFilterFunc, GtkDrawingAreaDrawFunc, GtkEntryCompletionMatchFunc, GtkExpressionNotify, GtkFlowBoxCreateWidgetFunc, GtkFlowBoxFilterFunc, GtkFlowBoxForeachFunc, GtkFlowBoxSortFunc, GtkFontFilterFunc, GtkIconViewForeachFunc, GtkListBoxCreateWidgetFunc, GtkListBoxFilterFunc, GtkListBoxForeachFunc, GtkListBoxSortFunc, GtkListBoxUpdateHeaderFunc, GtkMapListModelMapFunc, GtkMenuButtonCreatePopupFunc, GtkPageSetupDoneFunc, GtkPrintSettingsFunc, GtkPrinterFunc, GtkScaleFormatValueFunc, GtkShortcutFunc, GtkTextCharPredicate, GtkTextTagTableForeach, GtkTickCallback, GtkTreeCellDataFunc, GtkTreeIterCompareFunc, GtkTreeListModelCreateModelFunc, GtkTreeModelFilterModifyFunc, GtkTreeModelFilterVisibleFunc, GtkTreeModelForeachFunc, GtkTreeSelectionForeachFunc, GtkTreeSelectionFunc, GtkTreeViewColumnDropFunc, GtkTreeViewMappingFunc, GtkTreeViewRowSeparatorFunc, GtkTreeViewSearchEqualFunc end)) end diff --git a/src/gen/pango_functions b/src/gen/pango_functions index f9352857..3de10cf6 100644 --- a/src/gen/pango_functions +++ b/src/gen/pango_functions @@ -2,22 +2,22 @@ quote $(Expr(:toplevel, quote function attr_allow_breaks_new(_allow_breaks::Bool) ret = ccall(("pango_attr_allow_breaks_new", libpango), Ptr{_PangoAttribute}, (Cint,), _allow_breaks) - ret2 = convert(Union{PangoAttribute, Ref{_PangoAttribute}}, ret, true) + ret2 = convert(PangoAttributeLike, ret, true) ret2 end function attr_background_alpha_new(_alpha::Integer) ret = ccall(("pango_attr_background_alpha_new", libpango), Ptr{_PangoAttribute}, (UInt16,), _alpha) - ret2 = convert(Union{PangoAttribute, Ref{_PangoAttribute}}, ret, true) + ret2 = convert(PangoAttributeLike, ret, true) ret2 end function attr_background_new(_red::Integer, _green::Integer, _blue::Integer) ret = ccall(("pango_attr_background_new", libpango), Ptr{_PangoAttribute}, (UInt16, UInt16, UInt16), _red, _green, _blue) - ret2 = convert(Union{PangoAttribute, Ref{_PangoAttribute}}, ret, true) + ret2 = convert(PangoAttributeLike, ret, true) ret2 end function attr_baseline_shift_new(_shift::Integer) ret = ccall(("pango_attr_baseline_shift_new", libpango), Ptr{_PangoAttribute}, (Int32,), _shift) - ret2 = convert(Union{PangoAttribute, Ref{_PangoAttribute}}, ret, true) + ret2 = convert(PangoAttributeLike, ret, true) ret2 end function attr_break(_text::Union{AbstractString, Symbol}, _length::Integer, _attr_list::PangoAttrList, _offset::Integer, _attrs) @@ -28,72 +28,72 @@ $(Expr(:toplevel, quote end function attr_fallback_new(_enable_fallback::Bool) ret = ccall(("pango_attr_fallback_new", libpango), Ptr{_PangoAttribute}, (Cint,), _enable_fallback) - ret2 = convert(Union{PangoAttribute, Ref{_PangoAttribute}}, ret, true) + ret2 = convert(PangoAttributeLike, ret, true) ret2 end function attr_family_new(_family::Union{AbstractString, Symbol}) ret = ccall(("pango_attr_family_new", libpango), Ptr{_PangoAttribute}, (Cstring,), _family) - ret2 = convert(Union{PangoAttribute, Ref{_PangoAttribute}}, ret, true) + ret2 = convert(PangoAttributeLike, ret, true) ret2 end function attr_font_desc_new(_desc::PangoFontDescription) ret = ccall(("pango_attr_font_desc_new", libpango), Ptr{_PangoAttribute}, (Ptr{PangoFontDescription},), _desc) - ret2 = convert(Union{PangoAttribute, Ref{_PangoAttribute}}, ret, true) + ret2 = convert(PangoAttributeLike, ret, true) ret2 end function attr_font_features_new(_features::Union{AbstractString, Symbol}) ret = ccall(("pango_attr_font_features_new", libpango), Ptr{_PangoAttribute}, (Cstring,), _features) - ret2 = convert(Union{PangoAttribute, Ref{_PangoAttribute}}, ret, true) + ret2 = convert(PangoAttributeLike, ret, true) ret2 end function attr_font_scale_new(_scale) ret = ccall(("pango_attr_font_scale_new", libpango), Ptr{_PangoAttribute}, (UInt32,), _scale) - ret2 = convert(Union{PangoAttribute, Ref{_PangoAttribute}}, ret, true) + ret2 = convert(PangoAttributeLike, ret, true) ret2 end function attr_foreground_alpha_new(_alpha::Integer) ret = ccall(("pango_attr_foreground_alpha_new", libpango), Ptr{_PangoAttribute}, (UInt16,), _alpha) - ret2 = convert(Union{PangoAttribute, Ref{_PangoAttribute}}, ret, true) + ret2 = convert(PangoAttributeLike, ret, true) ret2 end function attr_foreground_new(_red::Integer, _green::Integer, _blue::Integer) ret = ccall(("pango_attr_foreground_new", libpango), Ptr{_PangoAttribute}, (UInt16, UInt16, UInt16), _red, _green, _blue) - ret2 = convert(Union{PangoAttribute, Ref{_PangoAttribute}}, ret, true) + ret2 = convert(PangoAttributeLike, ret, true) ret2 end function attr_gravity_hint_new(_hint) ret = ccall(("pango_attr_gravity_hint_new", libpango), Ptr{_PangoAttribute}, (UInt32,), _hint) - ret2 = convert(Union{PangoAttribute, Ref{_PangoAttribute}}, ret, true) + ret2 = convert(PangoAttributeLike, ret, true) ret2 end function attr_gravity_new(_gravity) ret = ccall(("pango_attr_gravity_new", libpango), Ptr{_PangoAttribute}, (UInt32,), _gravity) - ret2 = convert(Union{PangoAttribute, Ref{_PangoAttribute}}, ret, true) + ret2 = convert(PangoAttributeLike, ret, true) ret2 end function attr_insert_hyphens_new(_insert_hyphens::Bool) ret = ccall(("pango_attr_insert_hyphens_new", libpango), Ptr{_PangoAttribute}, (Cint,), _insert_hyphens) - ret2 = convert(Union{PangoAttribute, Ref{_PangoAttribute}}, ret, true) + ret2 = convert(PangoAttributeLike, ret, true) ret2 end function attr_language_new(_language::PangoLanguage) ret = ccall(("pango_attr_language_new", libpango), Ptr{_PangoAttribute}, (Ptr{PangoLanguage},), _language) - ret2 = convert(Union{PangoAttribute, Ref{_PangoAttribute}}, ret, true) + ret2 = convert(PangoAttributeLike, ret, true) ret2 end function attr_letter_spacing_new(_letter_spacing::Integer) ret = ccall(("pango_attr_letter_spacing_new", libpango), Ptr{_PangoAttribute}, (Int32,), _letter_spacing) - ret2 = convert(Union{PangoAttribute, Ref{_PangoAttribute}}, ret, true) + ret2 = convert(PangoAttributeLike, ret, true) ret2 end function attr_line_height_new(_factor::Real) ret = ccall(("pango_attr_line_height_new", libpango), Ptr{_PangoAttribute}, (Float64,), _factor) - ret2 = convert(Union{PangoAttribute, Ref{_PangoAttribute}}, ret, true) + ret2 = convert(PangoAttributeLike, ret, true) ret2 end function attr_line_height_new_absolute(_height::Integer) ret = ccall(("pango_attr_line_height_new_absolute", libpango), Ptr{_PangoAttribute}, (Int32,), _height) - ret2 = convert(Union{PangoAttribute, Ref{_PangoAttribute}}, ret, true) + ret2 = convert(PangoAttributeLike, ret, true) ret2 end function attr_list_from_string(_text::Union{AbstractString, Symbol}) @@ -103,72 +103,72 @@ $(Expr(:toplevel, quote end function attr_overline_color_new(_red::Integer, _green::Integer, _blue::Integer) ret = ccall(("pango_attr_overline_color_new", libpango), Ptr{_PangoAttribute}, (UInt16, UInt16, UInt16), _red, _green, _blue) - ret2 = convert(Union{PangoAttribute, Ref{_PangoAttribute}}, ret, true) + ret2 = convert(PangoAttributeLike, ret, true) ret2 end function attr_overline_new(_overline) ret = ccall(("pango_attr_overline_new", libpango), Ptr{_PangoAttribute}, (UInt32,), _overline) - ret2 = convert(Union{PangoAttribute, Ref{_PangoAttribute}}, ret, true) + ret2 = convert(PangoAttributeLike, ret, true) ret2 end function attr_rise_new(_rise::Integer) ret = ccall(("pango_attr_rise_new", libpango), Ptr{_PangoAttribute}, (Int32,), _rise) - ret2 = convert(Union{PangoAttribute, Ref{_PangoAttribute}}, ret, true) + ret2 = convert(PangoAttributeLike, ret, true) ret2 end function attr_scale_new(_scale_factor::Real) ret = ccall(("pango_attr_scale_new", libpango), Ptr{_PangoAttribute}, (Float64,), _scale_factor) - ret2 = convert(Union{PangoAttribute, Ref{_PangoAttribute}}, ret, true) + ret2 = convert(PangoAttributeLike, ret, true) ret2 end function attr_sentence_new() ret = ccall(("pango_attr_sentence_new", libpango), Ptr{_PangoAttribute}, ()) - ret2 = convert(Union{PangoAttribute, Ref{_PangoAttribute}}, ret, true) + ret2 = convert(PangoAttributeLike, ret, true) ret2 end - function attr_shape_new(_ink_rect::Union{PangoRectangle, Ref{_PangoRectangle}}, _logical_rect::Union{PangoRectangle, Ref{_PangoRectangle}}) + function attr_shape_new(_ink_rect::PangoRectangleLike, _logical_rect::PangoRectangleLike) ret = ccall(("pango_attr_shape_new", libpango), Ptr{_PangoAttribute}, (Ptr{_PangoRectangle}, Ptr{_PangoRectangle}), _ink_rect, _logical_rect) - ret2 = convert(Union{PangoAttribute, Ref{_PangoAttribute}}, ret, true) + ret2 = convert(PangoAttributeLike, ret, true) ret2 end function attr_show_new(_flags) ret = ccall(("pango_attr_show_new", libpango), Ptr{_PangoAttribute}, (UInt32,), _flags) - ret2 = convert(Union{PangoAttribute, Ref{_PangoAttribute}}, ret, true) + ret2 = convert(PangoAttributeLike, ret, true) ret2 end function attr_size_new(_size::Integer) ret = ccall(("pango_attr_size_new", libpango), Ptr{_PangoAttribute}, (Int32,), _size) - ret2 = convert(Union{PangoAttribute, Ref{_PangoAttribute}}, ret, true) + ret2 = convert(PangoAttributeLike, ret, true) ret2 end function attr_size_new_absolute(_size::Integer) ret = ccall(("pango_attr_size_new_absolute", libpango), Ptr{_PangoAttribute}, (Int32,), _size) - ret2 = convert(Union{PangoAttribute, Ref{_PangoAttribute}}, ret, true) + ret2 = convert(PangoAttributeLike, ret, true) ret2 end function attr_stretch_new(_stretch) ret = ccall(("pango_attr_stretch_new", libpango), Ptr{_PangoAttribute}, (UInt32,), _stretch) - ret2 = convert(Union{PangoAttribute, Ref{_PangoAttribute}}, ret, true) + ret2 = convert(PangoAttributeLike, ret, true) ret2 end function attr_strikethrough_color_new(_red::Integer, _green::Integer, _blue::Integer) ret = ccall(("pango_attr_strikethrough_color_new", libpango), Ptr{_PangoAttribute}, (UInt16, UInt16, UInt16), _red, _green, _blue) - ret2 = convert(Union{PangoAttribute, Ref{_PangoAttribute}}, ret, true) + ret2 = convert(PangoAttributeLike, ret, true) ret2 end function attr_strikethrough_new(_strikethrough::Bool) ret = ccall(("pango_attr_strikethrough_new", libpango), Ptr{_PangoAttribute}, (Cint,), _strikethrough) - ret2 = convert(Union{PangoAttribute, Ref{_PangoAttribute}}, ret, true) + ret2 = convert(PangoAttributeLike, ret, true) ret2 end function attr_style_new(_style) ret = ccall(("pango_attr_style_new", libpango), Ptr{_PangoAttribute}, (UInt32,), _style) - ret2 = convert(Union{PangoAttribute, Ref{_PangoAttribute}}, ret, true) + ret2 = convert(PangoAttributeLike, ret, true) ret2 end function attr_text_transform_new(_transform) ret = ccall(("pango_attr_text_transform_new", libpango), Ptr{_PangoAttribute}, (UInt32,), _transform) - ret2 = convert(Union{PangoAttribute, Ref{_PangoAttribute}}, ret, true) + ret2 = convert(PangoAttributeLike, ret, true) ret2 end function attr_type_get_name(_type) @@ -183,27 +183,27 @@ $(Expr(:toplevel, quote end function attr_underline_color_new(_red::Integer, _green::Integer, _blue::Integer) ret = ccall(("pango_attr_underline_color_new", libpango), Ptr{_PangoAttribute}, (UInt16, UInt16, UInt16), _red, _green, _blue) - ret2 = convert(Union{PangoAttribute, Ref{_PangoAttribute}}, ret, true) + ret2 = convert(PangoAttributeLike, ret, true) ret2 end function attr_underline_new(_underline) ret = ccall(("pango_attr_underline_new", libpango), Ptr{_PangoAttribute}, (UInt32,), _underline) - ret2 = convert(Union{PangoAttribute, Ref{_PangoAttribute}}, ret, true) + ret2 = convert(PangoAttributeLike, ret, true) ret2 end function attr_variant_new(_variant) ret = ccall(("pango_attr_variant_new", libpango), Ptr{_PangoAttribute}, (UInt32,), _variant) - ret2 = convert(Union{PangoAttribute, Ref{_PangoAttribute}}, ret, true) + ret2 = convert(PangoAttributeLike, ret, true) ret2 end function attr_weight_new(_weight) ret = ccall(("pango_attr_weight_new", libpango), Ptr{_PangoAttribute}, (UInt32,), _weight) - ret2 = convert(Union{PangoAttribute, Ref{_PangoAttribute}}, ret, true) + ret2 = convert(PangoAttributeLike, ret, true) ret2 end function attr_word_new() ret = ccall(("pango_attr_word_new", libpango), Ptr{_PangoAttribute}, ()) - ret2 = convert(Union{PangoAttribute, Ref{_PangoAttribute}}, ret, true) + ret2 = convert(PangoAttributeLike, ret, true) ret2 end function bidi_type_for_unichar(_ch) @@ -211,12 +211,12 @@ $(Expr(:toplevel, quote ret2 = BidiType(ret) ret2 end - function default_break(_text::Union{AbstractString, Symbol}, _length::Integer, _analysis::Maybe(Union{PangoAnalysis, Ref{_PangoAnalysis}}), _attrs::Union{PangoLogAttr, Ref{_PangoLogAttr}}, _attrs_len::Integer) + function default_break(_text::Union{AbstractString, Symbol}, _length::Integer, _analysis::Maybe(PangoAnalysisLike), _attrs::PangoLogAttrLike, _attrs_len::Integer) _analysis_maybe = nothing_to_null(_analysis) ret = ccall(("pango_default_break", libpango), Nothing, (Cstring, Int32, Ptr{_PangoAnalysis}, Ptr{_PangoLogAttr}, Int32), _text, _length, _analysis_maybe, _attrs, _attrs_len) nothing end - function extents_to_pixels(_inclusive::Maybe(Union{PangoRectangle, Ref{_PangoRectangle}}), _nearest::Maybe(Union{PangoRectangle, Ref{_PangoRectangle}})) + function extents_to_pixels(_inclusive::Maybe(PangoRectangleLike), _nearest::Maybe(PangoRectangleLike)) _inclusive_maybe = nothing_to_null(_inclusive) _nearest_maybe = nothing_to_null(_nearest) ret = ccall(("pango_extents_to_pixels", libpango), Nothing, (Ptr{_PangoRectangle}, Ptr{_PangoRectangle}), _inclusive_maybe, _nearest_maybe) @@ -246,7 +246,7 @@ $(Expr(:toplevel, quote ret = ccall(("pango_get_log_attrs", libpango), Nothing, (Cstring, Int32, Int32, Ptr{PangoLanguage}, Ptr{_PangoLogAttr}, Int32), _text, _length, _level, _language, _attrs_arr, _attrs_len) nothing end - function gravity_get_for_matrix(_matrix::Maybe(Union{PangoMatrix, Ref{_PangoMatrix}})) + function gravity_get_for_matrix(_matrix::Maybe(PangoMatrixLike)) _matrix_maybe = nothing_to_null(_matrix) ret = ccall(("pango_gravity_get_for_matrix", libpango), UInt32, (Ptr{_PangoMatrix},), _matrix_maybe) ret2 = Gravity(ret) @@ -390,22 +390,22 @@ $(Expr(:toplevel, quote ret2 = convert_if_not_null(PangoLanguage, ret, true) ret2 end - function shape(_text::Union{AbstractString, Symbol}, _length::Integer, _analysis::Union{PangoAnalysis, Ref{_PangoAnalysis}}, _glyphs::Union{PangoGlyphString, Ref{_PangoGlyphString}}) + function shape(_text::Union{AbstractString, Symbol}, _length::Integer, _analysis::PangoAnalysisLike, _glyphs::PangoGlyphStringLike) ret = ccall(("pango_shape", libpango), Nothing, (Cstring, Int32, Ptr{_PangoAnalysis}, Ptr{_PangoGlyphString}), _text, _length, _analysis, _glyphs) nothing end - function shape_full(_item_text::Union{AbstractString, Symbol}, _item_length::Integer, _paragraph_text::Maybe(Union{AbstractString, Symbol}), _paragraph_length::Integer, _analysis::Union{PangoAnalysis, Ref{_PangoAnalysis}}, _glyphs::Union{PangoGlyphString, Ref{_PangoGlyphString}}) + function shape_full(_item_text::Union{AbstractString, Symbol}, _item_length::Integer, _paragraph_text::Maybe(Union{AbstractString, Symbol}), _paragraph_length::Integer, _analysis::PangoAnalysisLike, _glyphs::PangoGlyphStringLike) _paragraph_text_maybe = nothing_to_null(_paragraph_text) ret = ccall(("pango_shape_full", libpango), Nothing, (Cstring, Int32, Cstring, Int32, Ptr{_PangoAnalysis}, Ptr{_PangoGlyphString}), _item_text, _item_length, _paragraph_text_maybe, _paragraph_length, _analysis, _glyphs) nothing end - function shape_item(_item::Union{PangoItem, Ref{_PangoItem}}, _paragraph_text::Maybe(Union{AbstractString, Symbol}), _paragraph_length::Integer, _log_attrs::Maybe(Union{PangoLogAttr, Ref{_PangoLogAttr}}), _glyphs::Union{PangoGlyphString, Ref{_PangoGlyphString}}, _flags) + function shape_item(_item::PangoItemLike, _paragraph_text::Maybe(Union{AbstractString, Symbol}), _paragraph_length::Integer, _log_attrs::Maybe(PangoLogAttrLike), _glyphs::PangoGlyphStringLike, _flags) _paragraph_text_maybe = nothing_to_null(_paragraph_text) _log_attrs_maybe = nothing_to_null(_log_attrs) ret = ccall(("pango_shape_item", libpango), Nothing, (Ptr{_PangoItem}, Cstring, Int32, Ptr{_PangoLogAttr}, Ptr{_PangoGlyphString}, UInt32), _item, _paragraph_text_maybe, _paragraph_length, _log_attrs_maybe, _glyphs, _flags) nothing end - function shape_with_flags(_item_text::Union{AbstractString, Symbol}, _item_length::Integer, _paragraph_text::Maybe(Union{AbstractString, Symbol}), _paragraph_length::Integer, _analysis::Union{PangoAnalysis, Ref{_PangoAnalysis}}, _glyphs::Union{PangoGlyphString, Ref{_PangoGlyphString}}, _flags) + function shape_with_flags(_item_text::Union{AbstractString, Symbol}, _item_length::Integer, _paragraph_text::Maybe(Union{AbstractString, Symbol}), _paragraph_length::Integer, _analysis::PangoAnalysisLike, _glyphs::PangoGlyphStringLike, _flags) _paragraph_text_maybe = nothing_to_null(_paragraph_text) ret = ccall(("pango_shape_with_flags", libpango), Nothing, (Cstring, Int32, Cstring, Int32, Ptr{_PangoAnalysis}, Ptr{_PangoGlyphString}, UInt32), _item_text, _item_length, _paragraph_text_maybe, _paragraph_length, _analysis, _glyphs, _flags) nothing @@ -415,7 +415,7 @@ $(Expr(:toplevel, quote ret2 = convert_if_not_null(PangoTabArray, ret, true) ret2 end - function tailor_break(_text::Union{AbstractString, Symbol}, _length::Integer, _analysis::Union{PangoAnalysis, Ref{_PangoAnalysis}}, _offset::Integer, _attrs) + function tailor_break(_text::Union{AbstractString, Symbol}, _length::Integer, _analysis::PangoAnalysisLike, _offset::Integer, _attrs) _attrs_arr = convert(Vector{_PangoLogAttr}, _attrs) _attrs_len = length(_attrs) ret = ccall(("pango_tailor_break", libpango), Nothing, (Cstring, Int32, Ptr{_PangoAnalysis}, Int32, Ptr{_PangoLogAttr}, Int32), _text, _length, _analysis, _offset, _attrs_arr, _attrs_len) diff --git a/src/gen/pango_methods b/src/gen/pango_methods index 9edef38f..d47561cf 100644 --- a/src/gen/pango_methods +++ b/src/gen/pango_methods @@ -47,7 +47,7 @@ $(Expr(:toplevel, quote ret2 = convert(PangoAttrList, ret, true) ret2 end - function change(instance::PangoAttrList, _attr::Union{PangoAttribute, Ref{_PangoAttribute}}) + function change(instance::PangoAttrList, _attr::PangoAttributeLike) ret = ccall(("pango_attr_list_change", libpango), Nothing, (Ptr{PangoAttrList}, Ptr{_PangoAttribute}), instance, _attr) nothing end @@ -71,11 +71,11 @@ $(Expr(:toplevel, quote ret2 = convert(PangoAttrIterator, ret, true) ret2 end - function insert(instance::PangoAttrList, _attr::Union{PangoAttribute, Ref{_PangoAttribute}}) + function insert(instance::PangoAttrList, _attr::PangoAttributeLike) ret = ccall(("pango_attr_list_insert", libpango), Nothing, (Ptr{PangoAttrList}, Ptr{_PangoAttribute}), instance, _attr) nothing end - function insert_before(instance::PangoAttrList, _attr::Union{PangoAttribute, Ref{_PangoAttribute}}) + function insert_before(instance::PangoAttrList, _attr::PangoAttributeLike) ret = ccall(("pango_attr_list_insert_before", libpango), Nothing, (Ptr{PangoAttrList}, Ptr{_PangoAttribute}), instance, _attr) nothing end @@ -101,91 +101,91 @@ $(Expr(:toplevel, quote ret = ccall(("pango_attr_list_update", libpango), Nothing, (Ptr{PangoAttrList}, Int32, Int32, Int32), instance, _pos, _remove, _add) nothing end - function as_color(instance::Union{PangoAttribute, Ref{_PangoAttribute}}) + function as_color(instance::PangoAttributeLike) ret = ccall(("pango_attribute_as_color", libpango), Ptr{_PangoAttrColor}, (Ptr{_PangoAttribute},), instance) - ret2 = convert(Union{PangoAttrColor, Ref{_PangoAttrColor}}, ret) + ret2 = convert(PangoAttrColorLike, ret) ret2 end - function as_float(instance::Union{PangoAttribute, Ref{_PangoAttribute}}) + function as_float(instance::PangoAttributeLike) ret = ccall(("pango_attribute_as_float", libpango), Ptr{_PangoAttrFloat}, (Ptr{_PangoAttribute},), instance) - ret2 = convert(Union{PangoAttrFloat, Ref{_PangoAttrFloat}}, ret) + ret2 = convert(PangoAttrFloatLike, ret) ret2 end - function as_font_desc(instance::Union{PangoAttribute, Ref{_PangoAttribute}}) + function as_font_desc(instance::PangoAttributeLike) ret = ccall(("pango_attribute_as_font_desc", libpango), Ptr{_PangoAttrFontDesc}, (Ptr{_PangoAttribute},), instance) - ret2 = convert(Union{PangoAttrFontDesc, Ref{_PangoAttrFontDesc}}, ret) + ret2 = convert(PangoAttrFontDescLike, ret) ret2 end - function as_font_features(instance::Union{PangoAttribute, Ref{_PangoAttribute}}) + function as_font_features(instance::PangoAttributeLike) ret = ccall(("pango_attribute_as_font_features", libpango), Ptr{_PangoAttrFontFeatures}, (Ptr{_PangoAttribute},), instance) - ret2 = convert(Union{PangoAttrFontFeatures, Ref{_PangoAttrFontFeatures}}, ret) + ret2 = convert(PangoAttrFontFeaturesLike, ret) ret2 end - function as_int(instance::Union{PangoAttribute, Ref{_PangoAttribute}}) + function as_int(instance::PangoAttributeLike) ret = ccall(("pango_attribute_as_int", libpango), Ptr{_PangoAttrInt}, (Ptr{_PangoAttribute},), instance) - ret2 = convert(Union{PangoAttrInt, Ref{_PangoAttrInt}}, ret) + ret2 = convert(PangoAttrIntLike, ret) ret2 end - function as_language(instance::Union{PangoAttribute, Ref{_PangoAttribute}}) + function as_language(instance::PangoAttributeLike) ret = ccall(("pango_attribute_as_language", libpango), Ptr{_PangoAttrLanguage}, (Ptr{_PangoAttribute},), instance) - ret2 = convert(Union{PangoAttrLanguage, Ref{_PangoAttrLanguage}}, ret) + ret2 = convert(PangoAttrLanguageLike, ret) ret2 end - function as_shape(instance::Union{PangoAttribute, Ref{_PangoAttribute}}) + function as_shape(instance::PangoAttributeLike) ret = ccall(("pango_attribute_as_shape", libpango), Ptr{_PangoAttrShape}, (Ptr{_PangoAttribute},), instance) - ret2 = convert(Union{PangoAttrShape, Ref{_PangoAttrShape}}, ret) + ret2 = convert(PangoAttrShapeLike, ret) ret2 end - function as_size(instance::Union{PangoAttribute, Ref{_PangoAttribute}}) + function as_size(instance::PangoAttributeLike) ret = ccall(("pango_attribute_as_size", libpango), Ptr{_PangoAttrSize}, (Ptr{_PangoAttribute},), instance) - ret2 = convert(Union{PangoAttrSize, Ref{_PangoAttrSize}}, ret) + ret2 = convert(PangoAttrSizeLike, ret) ret2 end - function as_string(instance::Union{PangoAttribute, Ref{_PangoAttribute}}) + function as_string(instance::PangoAttributeLike) ret = ccall(("pango_attribute_as_string", libpango), Ptr{_PangoAttrString}, (Ptr{_PangoAttribute},), instance) - ret2 = convert(Union{PangoAttrString, Ref{_PangoAttrString}}, ret) + ret2 = convert(PangoAttrStringLike, ret) ret2 end - function copy(instance::Union{PangoAttribute, Ref{_PangoAttribute}}) + function copy(instance::PangoAttributeLike) ret = ccall(("pango_attribute_copy", libpango), Ptr{_PangoAttribute}, (Ptr{_PangoAttribute},), instance) - ret2 = convert(Union{PangoAttribute, Ref{_PangoAttribute}}, ret, true) + ret2 = convert(PangoAttributeLike, ret, true) ret2 end - function destroy(instance::Union{PangoAttribute, Ref{_PangoAttribute}}) + function destroy(instance::PangoAttributeLike) ret = ccall(("pango_attribute_destroy", libpango), Nothing, (Ptr{_PangoAttribute},), instance) nothing end - function equal(instance::Union{PangoAttribute, Ref{_PangoAttribute}}, _attr2::Union{PangoAttribute, Ref{_PangoAttribute}}) + function equal(instance::PangoAttributeLike, _attr2::PangoAttributeLike) ret = ccall(("pango_attribute_equal", libpango), Cint, (Ptr{_PangoAttribute}, Ptr{_PangoAttribute}), instance, _attr2) ret2 = convert(Bool, ret) ret2 end - function init(instance::Union{PangoAttribute, Ref{_PangoAttribute}}, _klass::Union{PangoAttrClass, Ref{_PangoAttrClass}}) + function init(instance::PangoAttributeLike, _klass::PangoAttrClassLike) ret = ccall(("pango_attribute_init", libpango), Nothing, (Ptr{_PangoAttribute}, Ptr{_PangoAttrClass}), instance, _klass) nothing end - function copy(instance::Union{PangoColor, Ref{_PangoColor}}) + function copy(instance::PangoColorLike) ret = ccall(("pango_color_copy", libpango), Ptr{_PangoColor}, (Ptr{_PangoColor},), instance) ret2 = convert_if_not_null(PangoColor, ret, true) ret2 end - function free(instance::Union{PangoColor, Ref{_PangoColor}}) + function free(instance::PangoColorLike) ret = ccall(("pango_color_free", libpango), Nothing, (Ptr{_PangoColor},), instance) nothing end - function parse(instance::Union{PangoColor, Ref{_PangoColor}}, _spec::Union{AbstractString, Symbol}) + function parse(instance::PangoColorLike, _spec::Union{AbstractString, Symbol}) ret = ccall(("pango_color_parse", libpango), Cint, (Ptr{_PangoColor}, Cstring), instance, _spec) ret2 = convert(Bool, ret) ret2 end - function parse_with_alpha(instance::Union{PangoColor, Ref{_PangoColor}}, _spec::Union{AbstractString, Symbol}) + function parse_with_alpha(instance::PangoColorLike, _spec::Union{AbstractString, Symbol}) m_alpha = Ref{UInt16}() ret = ccall(("pango_color_parse_with_alpha", libpango), Cint, (Ptr{_PangoColor}, Ptr{UInt16}, Cstring), instance, m_alpha, _spec) ret2 = convert(Bool, ret) _alpha = m_alpha[] (ret2, _alpha) end - function to_string(instance::Union{PangoColor, Ref{_PangoColor}}) + function to_string(instance::PangoColorLike) ret = ccall(("pango_color_to_string", libpango), Cstring, (Ptr{_PangoColor},), instance) ret2 = string_or_nothing(ret, true) ret2 @@ -341,120 +341,120 @@ $(Expr(:toplevel, quote ret = ccall(("pango_font_description_unset_fields", libpango), Nothing, (Ptr{PangoFontDescription}, UInt32), instance, _to_unset) nothing end - function get_approximate_char_width(instance::Union{PangoFontMetrics, Ref{_PangoFontMetrics}}) + function get_approximate_char_width(instance::PangoFontMetricsLike) ret = ccall(("pango_font_metrics_get_approximate_char_width", libpango), Int32, (Ptr{_PangoFontMetrics},), instance) ret end - function get_approximate_digit_width(instance::Union{PangoFontMetrics, Ref{_PangoFontMetrics}}) + function get_approximate_digit_width(instance::PangoFontMetricsLike) ret = ccall(("pango_font_metrics_get_approximate_digit_width", libpango), Int32, (Ptr{_PangoFontMetrics},), instance) ret end - function get_ascent(instance::Union{PangoFontMetrics, Ref{_PangoFontMetrics}}) + function get_ascent(instance::PangoFontMetricsLike) ret = ccall(("pango_font_metrics_get_ascent", libpango), Int32, (Ptr{_PangoFontMetrics},), instance) ret end - function get_descent(instance::Union{PangoFontMetrics, Ref{_PangoFontMetrics}}) + function get_descent(instance::PangoFontMetricsLike) ret = ccall(("pango_font_metrics_get_descent", libpango), Int32, (Ptr{_PangoFontMetrics},), instance) ret end - function get_height(instance::Union{PangoFontMetrics, Ref{_PangoFontMetrics}}) + function get_height(instance::PangoFontMetricsLike) ret = ccall(("pango_font_metrics_get_height", libpango), Int32, (Ptr{_PangoFontMetrics},), instance) ret end - function get_strikethrough_position(instance::Union{PangoFontMetrics, Ref{_PangoFontMetrics}}) + function get_strikethrough_position(instance::PangoFontMetricsLike) ret = ccall(("pango_font_metrics_get_strikethrough_position", libpango), Int32, (Ptr{_PangoFontMetrics},), instance) ret end - function get_strikethrough_thickness(instance::Union{PangoFontMetrics, Ref{_PangoFontMetrics}}) + function get_strikethrough_thickness(instance::PangoFontMetricsLike) ret = ccall(("pango_font_metrics_get_strikethrough_thickness", libpango), Int32, (Ptr{_PangoFontMetrics},), instance) ret end - function get_underline_position(instance::Union{PangoFontMetrics, Ref{_PangoFontMetrics}}) + function get_underline_position(instance::PangoFontMetricsLike) ret = ccall(("pango_font_metrics_get_underline_position", libpango), Int32, (Ptr{_PangoFontMetrics},), instance) ret end - function get_underline_thickness(instance::Union{PangoFontMetrics, Ref{_PangoFontMetrics}}) + function get_underline_thickness(instance::PangoFontMetricsLike) ret = ccall(("pango_font_metrics_get_underline_thickness", libpango), Int32, (Ptr{_PangoFontMetrics},), instance) ret end - function ref(instance::Union{PangoFontMetrics, Ref{_PangoFontMetrics}}) + function ref(instance::PangoFontMetricsLike) ret = ccall(("pango_font_metrics_ref", libpango), Ptr{_PangoFontMetrics}, (Ptr{_PangoFontMetrics},), instance) ret2 = convert_if_not_null(PangoFontMetrics, ret, true) ret2 end - function unref(instance::Union{PangoFontMetrics, Ref{_PangoFontMetrics}}) + function unref(instance::PangoFontMetricsLike) ret = ccall(("pango_font_metrics_unref", libpango), Nothing, (Ptr{_PangoFontMetrics},), instance) nothing end - function apply_attrs(instance::Union{PangoGlyphItem, Ref{_PangoGlyphItem}}, _text::Union{AbstractString, Symbol}, _list::PangoAttrList) + function apply_attrs(instance::PangoGlyphItemLike, _text::Union{AbstractString, Symbol}, _list::PangoAttrList) ret = ccall(("pango_glyph_item_apply_attrs", libpango), Ptr{GLib._GSList{_PangoGlyphItem}}, (Ptr{_PangoGlyphItem}, Cstring, Ptr{PangoAttrList}), instance, _text, _list) ret2 = GLib.GList(ret, true) ret2 end - function copy(instance::Union{PangoGlyphItem, Ref{_PangoGlyphItem}}) + function copy(instance::PangoGlyphItemLike) ret = ccall(("pango_glyph_item_copy", libpango), Ptr{_PangoGlyphItem}, (Ptr{_PangoGlyphItem},), instance) ret2 = convert_if_not_null(PangoGlyphItem, ret, true) ret2 end - function free(instance::Union{PangoGlyphItem, Ref{_PangoGlyphItem}}) + function free(instance::PangoGlyphItemLike) ret = ccall(("pango_glyph_item_free", libpango), Nothing, (Ptr{_PangoGlyphItem},), instance) nothing end - function get_logical_widths(instance::Union{PangoGlyphItem, Ref{_PangoGlyphItem}}, _text::Union{AbstractString, Symbol}, _logical_widths) + function get_logical_widths(instance::PangoGlyphItemLike, _text::Union{AbstractString, Symbol}, _logical_widths) _logical_widths_arr = convert(Vector{Int32}, _logical_widths) ret = ccall(("pango_glyph_item_get_logical_widths", libpango), Nothing, (Ptr{_PangoGlyphItem}, Cstring, Ptr{Int32}), instance, _text, _logical_widths_arr) nothing end - function letter_space(instance::Union{PangoGlyphItem, Ref{_PangoGlyphItem}}, _text::Union{AbstractString, Symbol}, _log_attrs, _letter_spacing::Integer) + function letter_space(instance::PangoGlyphItemLike, _text::Union{AbstractString, Symbol}, _log_attrs, _letter_spacing::Integer) _log_attrs_arr = convert(Vector{_PangoLogAttr}, _log_attrs) ret = ccall(("pango_glyph_item_letter_space", libpango), Nothing, (Ptr{_PangoGlyphItem}, Cstring, Ptr{_PangoLogAttr}, Int32), instance, _text, _log_attrs_arr, _letter_spacing) nothing end - function split(instance::Union{PangoGlyphItem, Ref{_PangoGlyphItem}}, _text::Union{AbstractString, Symbol}, _split_index::Integer) + function split(instance::PangoGlyphItemLike, _text::Union{AbstractString, Symbol}, _split_index::Integer) ret = ccall(("pango_glyph_item_split", libpango), Ptr{_PangoGlyphItem}, (Ptr{_PangoGlyphItem}, Cstring, Int32), instance, _text, _split_index) ret2 = convert_if_not_null(PangoGlyphItem, ret, true) ret2 end - function copy(instance::Union{PangoGlyphItemIter, Ref{_PangoGlyphItemIter}}) + function copy(instance::PangoGlyphItemIterLike) ret = ccall(("pango_glyph_item_iter_copy", libpango), Ptr{_PangoGlyphItemIter}, (Ptr{_PangoGlyphItemIter},), instance) ret2 = convert_if_not_null(PangoGlyphItemIter, ret, true) ret2 end - function free(instance::Union{PangoGlyphItemIter, Ref{_PangoGlyphItemIter}}) + function free(instance::PangoGlyphItemIterLike) ret = ccall(("pango_glyph_item_iter_free", libpango), Nothing, (Ptr{_PangoGlyphItemIter},), instance) nothing end - function init_end(instance::Union{PangoGlyphItemIter, Ref{_PangoGlyphItemIter}}, _glyph_item::Union{PangoGlyphItem, Ref{_PangoGlyphItem}}, _text::Union{AbstractString, Symbol}) + function init_end(instance::PangoGlyphItemIterLike, _glyph_item::PangoGlyphItemLike, _text::Union{AbstractString, Symbol}) ret = ccall(("pango_glyph_item_iter_init_end", libpango), Cint, (Ptr{_PangoGlyphItemIter}, Ptr{_PangoGlyphItem}, Cstring), instance, _glyph_item, _text) ret2 = convert(Bool, ret) ret2 end - function init_start(instance::Union{PangoGlyphItemIter, Ref{_PangoGlyphItemIter}}, _glyph_item::Union{PangoGlyphItem, Ref{_PangoGlyphItem}}, _text::Union{AbstractString, Symbol}) + function init_start(instance::PangoGlyphItemIterLike, _glyph_item::PangoGlyphItemLike, _text::Union{AbstractString, Symbol}) ret = ccall(("pango_glyph_item_iter_init_start", libpango), Cint, (Ptr{_PangoGlyphItemIter}, Ptr{_PangoGlyphItem}, Cstring), instance, _glyph_item, _text) ret2 = convert(Bool, ret) ret2 end - function next_cluster(instance::Union{PangoGlyphItemIter, Ref{_PangoGlyphItemIter}}) + function next_cluster(instance::PangoGlyphItemIterLike) ret = ccall(("pango_glyph_item_iter_next_cluster", libpango), Cint, (Ptr{_PangoGlyphItemIter},), instance) ret2 = convert(Bool, ret) ret2 end - function prev_cluster(instance::Union{PangoGlyphItemIter, Ref{_PangoGlyphItemIter}}) + function prev_cluster(instance::PangoGlyphItemIterLike) ret = ccall(("pango_glyph_item_iter_prev_cluster", libpango), Cint, (Ptr{_PangoGlyphItemIter},), instance) ret2 = convert(Bool, ret) ret2 end function GlyphString_new() ret = ccall(("pango_glyph_string_new", libpango), Ptr{_PangoGlyphString}, ()) - ret2 = convert(Union{PangoGlyphString, Ref{_PangoGlyphString}}, ret, true) + ret2 = convert(PangoGlyphStringLike, ret, true) ret2 end - function copy(instance::Union{PangoGlyphString, Ref{_PangoGlyphString}}) + function copy(instance::PangoGlyphStringLike) ret = ccall(("pango_glyph_string_copy", libpango), Ptr{_PangoGlyphString}, (Ptr{_PangoGlyphString},), instance) ret2 = convert_if_not_null(PangoGlyphString, ret, true) ret2 end - function extents(instance::Union{PangoGlyphString, Ref{_PangoGlyphString}}, _font::PangoFont) + function extents(instance::PangoGlyphStringLike, _font::PangoFont) m_ink_rect = Ref{_PangoRectangle}() m_logical_rect = Ref{_PangoRectangle}() ret = ccall(("pango_glyph_string_extents", libpango), Nothing, (Ptr{_PangoGlyphString}, Ptr{GObject}, Ptr{_PangoRectangle}, Ptr{_PangoRectangle}), instance, _font, m_ink_rect, m_logical_rect) @@ -464,7 +464,7 @@ $(Expr(:toplevel, quote _logical_rect = convert(_PangoRectangle, _logical_rect) (_ink_rect, _logical_rect) end - function extents_range(instance::Union{PangoGlyphString, Ref{_PangoGlyphString}}, _start::Integer, _end::Integer, _font::PangoFont) + function extents_range(instance::PangoGlyphStringLike, _start::Integer, _end::Integer, _font::PangoFont) m_ink_rect = Ref{_PangoRectangle}() m_logical_rect = Ref{_PangoRectangle}() ret = ccall(("pango_glyph_string_extents_range", libpango), Nothing, (Ptr{_PangoGlyphString}, Int32, Int32, Ptr{GObject}, Ptr{_PangoRectangle}, Ptr{_PangoRectangle}), instance, _start, _end, _font, m_ink_rect, m_logical_rect) @@ -474,37 +474,37 @@ $(Expr(:toplevel, quote _logical_rect = convert(_PangoRectangle, _logical_rect) (_ink_rect, _logical_rect) end - function free(instance::Union{PangoGlyphString, Ref{_PangoGlyphString}}) + function free(instance::PangoGlyphStringLike) ret = ccall(("pango_glyph_string_free", libpango), Nothing, (Ptr{_PangoGlyphString},), instance) nothing end - function get_logical_widths(instance::Union{PangoGlyphString, Ref{_PangoGlyphString}}, _text::Union{AbstractString, Symbol}, _length::Integer, _embedding_level::Integer, _logical_widths) + function get_logical_widths(instance::PangoGlyphStringLike, _text::Union{AbstractString, Symbol}, _length::Integer, _embedding_level::Integer, _logical_widths) _logical_widths_arr = convert(Vector{Int32}, _logical_widths) ret = ccall(("pango_glyph_string_get_logical_widths", libpango), Nothing, (Ptr{_PangoGlyphString}, Cstring, Int32, Int32, Ptr{Int32}), instance, _text, _length, _embedding_level, _logical_widths_arr) nothing end - function get_width(instance::Union{PangoGlyphString, Ref{_PangoGlyphString}}) + function get_width(instance::PangoGlyphStringLike) ret = ccall(("pango_glyph_string_get_width", libpango), Int32, (Ptr{_PangoGlyphString},), instance) ret end - function index_to_x(instance::Union{PangoGlyphString, Ref{_PangoGlyphString}}, _text::Union{AbstractString, Symbol}, _length::Integer, _analysis::Union{PangoAnalysis, Ref{_PangoAnalysis}}, _index_::Integer, _trailing::Bool) + function index_to_x(instance::PangoGlyphStringLike, _text::Union{AbstractString, Symbol}, _length::Integer, _analysis::PangoAnalysisLike, _index_::Integer, _trailing::Bool) m_x_pos = Ref{Int32}() ret = ccall(("pango_glyph_string_index_to_x", libpango), Nothing, (Ptr{_PangoGlyphString}, Cstring, Int32, Ptr{_PangoAnalysis}, Int32, Cint, Ptr{Int32}), instance, _text, _length, _analysis, _index_, _trailing, m_x_pos) _x_pos = m_x_pos[] _x_pos end - function index_to_x_full(instance::Union{PangoGlyphString, Ref{_PangoGlyphString}}, _text::Union{AbstractString, Symbol}, _length::Integer, _analysis::Union{PangoAnalysis, Ref{_PangoAnalysis}}, _attrs::Maybe(Union{PangoLogAttr, Ref{_PangoLogAttr}}), _index_::Integer, _trailing::Bool) + function index_to_x_full(instance::PangoGlyphStringLike, _text::Union{AbstractString, Symbol}, _length::Integer, _analysis::PangoAnalysisLike, _attrs::Maybe(PangoLogAttrLike), _index_::Integer, _trailing::Bool) _attrs_maybe = nothing_to_null(_attrs) m_x_pos = Ref{Int32}() ret = ccall(("pango_glyph_string_index_to_x_full", libpango), Nothing, (Ptr{_PangoGlyphString}, Cstring, Int32, Ptr{_PangoAnalysis}, Ptr{_PangoLogAttr}, Int32, Cint, Ptr{Int32}), instance, _text, _length, _analysis, _attrs_maybe, _index_, _trailing, m_x_pos) _x_pos = m_x_pos[] _x_pos end - function set_size(instance::Union{PangoGlyphString, Ref{_PangoGlyphString}}, _new_len::Integer) + function set_size(instance::PangoGlyphStringLike, _new_len::Integer) ret = ccall(("pango_glyph_string_set_size", libpango), Nothing, (Ptr{_PangoGlyphString}, Int32), instance, _new_len) nothing end - function x_to_index(instance::Union{PangoGlyphString, Ref{_PangoGlyphString}}, _text::Union{AbstractString, Symbol}, _length::Integer, _analysis::Union{PangoAnalysis, Ref{_PangoAnalysis}}, _x_pos::Integer) + function x_to_index(instance::PangoGlyphStringLike, _text::Union{AbstractString, Symbol}, _length::Integer, _analysis::PangoAnalysisLike, _x_pos::Integer) m_index_ = Ref{Int32}() m_trailing = Ref{Int32}() ret = ccall(("pango_glyph_string_x_to_index", libpango), Nothing, (Ptr{_PangoGlyphString}, Cstring, Int32, Ptr{_PangoAnalysis}, Int32, Ptr{Int32}, Ptr{Int32}), instance, _text, _length, _analysis, _x_pos, m_index_, m_trailing) @@ -514,29 +514,29 @@ $(Expr(:toplevel, quote end function Item_new() ret = ccall(("pango_item_new", libpango), Ptr{_PangoItem}, ()) - ret2 = convert(Union{PangoItem, Ref{_PangoItem}}, ret, true) + ret2 = convert(PangoItemLike, ret, true) ret2 end - function apply_attrs(instance::Union{PangoItem, Ref{_PangoItem}}, _iter::PangoAttrIterator) + function apply_attrs(instance::PangoItemLike, _iter::PangoAttrIterator) ret = ccall(("pango_item_apply_attrs", libpango), Nothing, (Ptr{_PangoItem}, Ptr{PangoAttrIterator}), instance, _iter) nothing end - function copy(instance::Union{PangoItem, Ref{_PangoItem}}) + function copy(instance::PangoItemLike) ret = ccall(("pango_item_copy", libpango), Ptr{_PangoItem}, (Ptr{_PangoItem},), instance) ret2 = convert_if_not_null(PangoItem, ret, true) ret2 end - function free(instance::Union{PangoItem, Ref{_PangoItem}}) + function free(instance::PangoItemLike) ret = ccall(("pango_item_free", libpango), Nothing, (Ptr{_PangoItem},), instance) nothing end - function get_char_offset(instance::Union{PangoItem, Ref{_PangoItem}}) + function get_char_offset(instance::PangoItemLike) ret = ccall(("pango_item_get_char_offset", libpango), Int32, (Ptr{_PangoItem},), instance) ret end - function split(instance::Union{PangoItem, Ref{_PangoItem}}, _split_index::Integer, _split_offset::Integer) + function split(instance::PangoItemLike, _split_index::Integer, _split_offset::Integer) ret = ccall(("pango_item_split", libpango), Ptr{_PangoItem}, (Ptr{_PangoItem}, Int32, Int32), instance, _split_index, _split_offset) - ret2 = convert(Union{PangoItem, Ref{_PangoItem}}, ret, true) + ret2 = convert(PangoItemLike, ret, true) ret2 end function get_sample_string(instance::PangoLanguage) @@ -692,7 +692,7 @@ $(Expr(:toplevel, quote ret2 = convert(Bool, ret) ret2 end - function get_extents(instance::Union{PangoLayoutLine, Ref{_PangoLayoutLine}}) + function get_extents(instance::PangoLayoutLineLike) m_ink_rect = Ref{_PangoRectangle}() m_logical_rect = Ref{_PangoRectangle}() ret = ccall(("pango_layout_line_get_extents", libpango), Nothing, (Ptr{_PangoLayoutLine}, Ptr{_PangoRectangle}, Ptr{_PangoRectangle}), instance, m_ink_rect, m_logical_rect) @@ -702,17 +702,17 @@ $(Expr(:toplevel, quote _logical_rect = convert(_PangoRectangle, _logical_rect) (_ink_rect, _logical_rect) end - function get_height(instance::Union{PangoLayoutLine, Ref{_PangoLayoutLine}}) + function get_height(instance::PangoLayoutLineLike) m_height = Ref{Int32}() ret = ccall(("pango_layout_line_get_height", libpango), Nothing, (Ptr{_PangoLayoutLine}, Ptr{Int32}), instance, m_height) _height = m_height[] _height end - function get_length(instance::Union{PangoLayoutLine, Ref{_PangoLayoutLine}}) + function get_length(instance::PangoLayoutLineLike) ret = ccall(("pango_layout_line_get_length", libpango), Int32, (Ptr{_PangoLayoutLine},), instance) ret end - function get_pixel_extents(instance::Union{PangoLayoutLine, Ref{_PangoLayoutLine}}) + function get_pixel_extents(instance::PangoLayoutLineLike) m_ink_rect = Ref{_PangoRectangle}() m_logical_rect = Ref{_PangoRectangle}() ret = ccall(("pango_layout_line_get_pixel_extents", libpango), Nothing, (Ptr{_PangoLayoutLine}, Ptr{_PangoRectangle}, Ptr{_PangoRectangle}), instance, m_ink_rect, m_logical_rect) @@ -722,16 +722,16 @@ $(Expr(:toplevel, quote _logical_rect = convert(_PangoRectangle, _logical_rect) (_ink_rect, _logical_rect) end - function get_resolved_direction(instance::Union{PangoLayoutLine, Ref{_PangoLayoutLine}}) + function get_resolved_direction(instance::PangoLayoutLineLike) ret = ccall(("pango_layout_line_get_resolved_direction", libpango), UInt32, (Ptr{_PangoLayoutLine},), instance) ret2 = Direction(ret) ret2 end - function get_start_index(instance::Union{PangoLayoutLine, Ref{_PangoLayoutLine}}) + function get_start_index(instance::PangoLayoutLineLike) ret = ccall(("pango_layout_line_get_start_index", libpango), Int32, (Ptr{_PangoLayoutLine},), instance) ret end - function get_x_ranges(instance::Union{PangoLayoutLine, Ref{_PangoLayoutLine}}, _start_index::Integer, _end_index::Integer) + function get_x_ranges(instance::PangoLayoutLineLike, _start_index::Integer, _end_index::Integer) m_ranges = Ref{Ptr{Int32}}() m_n_ranges = Ref{Int32}() ret = ccall(("pango_layout_line_get_x_ranges", libpango), Nothing, (Ptr{_PangoLayoutLine}, Int32, Int32, Ptr{Ptr{Int32}}, Ptr{Int32}), instance, _start_index, _end_index, m_ranges, m_n_ranges) @@ -744,27 +744,27 @@ $(Expr(:toplevel, quote _n_ranges = m_n_ranges[] _ranges end - function index_to_x(instance::Union{PangoLayoutLine, Ref{_PangoLayoutLine}}, _index_::Integer, _trailing::Bool) + function index_to_x(instance::PangoLayoutLineLike, _index_::Integer, _trailing::Bool) m_x_pos = Ref{Int32}() ret = ccall(("pango_layout_line_index_to_x", libpango), Nothing, (Ptr{_PangoLayoutLine}, Int32, Cint, Ptr{Int32}), instance, _index_, _trailing, m_x_pos) _x_pos = m_x_pos[] _x_pos end - function is_paragraph_start(instance::Union{PangoLayoutLine, Ref{_PangoLayoutLine}}) + function is_paragraph_start(instance::PangoLayoutLineLike) ret = ccall(("pango_layout_line_is_paragraph_start", libpango), Cint, (Ptr{_PangoLayoutLine},), instance) ret2 = convert(Bool, ret) ret2 end - function ref(instance::Union{PangoLayoutLine, Ref{_PangoLayoutLine}}) + function ref(instance::PangoLayoutLineLike) ret = ccall(("pango_layout_line_ref", libpango), Ptr{_PangoLayoutLine}, (Ptr{_PangoLayoutLine},), instance) ret2 = convert_if_not_null(PangoLayoutLine, ret, true) ret2 end - function unref(instance::Union{PangoLayoutLine, Ref{_PangoLayoutLine}}) + function unref(instance::PangoLayoutLineLike) ret = ccall(("pango_layout_line_unref", libpango), Nothing, (Ptr{_PangoLayoutLine},), instance) nothing end - function x_to_index(instance::Union{PangoLayoutLine, Ref{_PangoLayoutLine}}, _x_pos::Integer) + function x_to_index(instance::PangoLayoutLineLike, _x_pos::Integer) m_index_ = Ref{Int32}() m_trailing = Ref{Int32}() ret = ccall(("pango_layout_line_x_to_index", libpango), Cint, (Ptr{_PangoLayoutLine}, Int32, Ptr{Int32}, Ptr{Int32}), instance, _x_pos, m_index_, m_trailing) @@ -773,24 +773,24 @@ $(Expr(:toplevel, quote _trailing = m_trailing[] (ret2, _index_, _trailing) end - function concat(instance::Union{PangoMatrix, Ref{_PangoMatrix}}, _new_matrix::Union{PangoMatrix, Ref{_PangoMatrix}}) + function concat(instance::PangoMatrixLike, _new_matrix::PangoMatrixLike) ret = ccall(("pango_matrix_concat", libpango), Nothing, (Ptr{_PangoMatrix}, Ptr{_PangoMatrix}), instance, _new_matrix) nothing end - function copy(instance::Union{PangoMatrix, Ref{_PangoMatrix}}) + function copy(instance::PangoMatrixLike) ret = ccall(("pango_matrix_copy", libpango), Ptr{_PangoMatrix}, (Ptr{_PangoMatrix},), instance) ret2 = convert_if_not_null(PangoMatrix, ret, true) ret2 end - function free(instance::Union{PangoMatrix, Ref{_PangoMatrix}}) + function free(instance::PangoMatrixLike) ret = ccall(("pango_matrix_free", libpango), Nothing, (Ptr{_PangoMatrix},), instance) nothing end - function get_font_scale_factor(instance::Union{PangoMatrix, Ref{_PangoMatrix}}) + function get_font_scale_factor(instance::PangoMatrixLike) ret = ccall(("pango_matrix_get_font_scale_factor", libpango), Float64, (Ptr{_PangoMatrix},), instance) ret end - function get_font_scale_factors(instance::Union{PangoMatrix, Ref{_PangoMatrix}}) + function get_font_scale_factors(instance::PangoMatrixLike) m_xscale = Ref{Float64}() m_yscale = Ref{Float64}() ret = ccall(("pango_matrix_get_font_scale_factors", libpango), Nothing, (Ptr{_PangoMatrix}, Ptr{Float64}, Ptr{Float64}), instance, m_xscale, m_yscale) @@ -798,19 +798,19 @@ $(Expr(:toplevel, quote _yscale = m_yscale[] (_xscale, _yscale) end - function get_slant_ratio(instance::Union{PangoMatrix, Ref{_PangoMatrix}}) + function get_slant_ratio(instance::PangoMatrixLike) ret = ccall(("pango_matrix_get_slant_ratio", libpango), Float64, (Ptr{_PangoMatrix},), instance) ret end - function rotate(instance::Union{PangoMatrix, Ref{_PangoMatrix}}, _degrees::Real) + function rotate(instance::PangoMatrixLike, _degrees::Real) ret = ccall(("pango_matrix_rotate", libpango), Nothing, (Ptr{_PangoMatrix}, Float64), instance, _degrees) nothing end - function scale(instance::Union{PangoMatrix, Ref{_PangoMatrix}}, _scale_x::Real, _scale_y::Real) + function scale(instance::PangoMatrixLike, _scale_x::Real, _scale_y::Real) ret = ccall(("pango_matrix_scale", libpango), Nothing, (Ptr{_PangoMatrix}, Float64, Float64), instance, _scale_x, _scale_y) nothing end - function transform_distance(instance::Union{PangoMatrix, Ref{_PangoMatrix}}, _dx::Real, _dy::Real) + function transform_distance(instance::PangoMatrixLike, _dx::Real, _dy::Real) m_dx = Ref{Float64}() m_dx[] = Base.cconvert(Float64, _dx) m_dy = Ref{Float64}() @@ -820,7 +820,7 @@ $(Expr(:toplevel, quote _dy = m_dy[] (_dx, _dy) end - function transform_pixel_rectangle(instance::Union{PangoMatrix, Ref{_PangoMatrix}}, _rect::_PangoRectangle) + function transform_pixel_rectangle(instance::PangoMatrixLike, _rect::_PangoRectangle) m_rect = Ref{_PangoRectangle}() m_rect[] = Base.cconvert(_PangoRectangle, _rect) ret = ccall(("pango_matrix_transform_pixel_rectangle", libpango), Nothing, (Ptr{_PangoMatrix}, Ptr{_PangoRectangle}), instance, m_rect) @@ -828,7 +828,7 @@ $(Expr(:toplevel, quote _rect = convert(_PangoRectangle, _rect) _rect end - function transform_point(instance::Union{PangoMatrix, Ref{_PangoMatrix}}, _x::Real, _y::Real) + function transform_point(instance::PangoMatrixLike, _x::Real, _y::Real) m_x = Ref{Float64}() m_x[] = Base.cconvert(Float64, _x) m_y = Ref{Float64}() @@ -838,7 +838,7 @@ $(Expr(:toplevel, quote _y = m_y[] (_x, _y) end - function transform_rectangle(instance::Union{PangoMatrix, Ref{_PangoMatrix}}, _rect::_PangoRectangle) + function transform_rectangle(instance::PangoMatrixLike, _rect::_PangoRectangle) m_rect = Ref{_PangoRectangle}() m_rect[] = Base.cconvert(_PangoRectangle, _rect) ret = ccall(("pango_matrix_transform_rectangle", libpango), Nothing, (Ptr{_PangoMatrix}, Ptr{_PangoRectangle}), instance, m_rect) @@ -846,7 +846,7 @@ $(Expr(:toplevel, quote _rect = convert(_PangoRectangle, _rect) _rect end - function translate(instance::Union{PangoMatrix, Ref{_PangoMatrix}}, _tx::Real, _ty::Real) + function translate(instance::PangoMatrixLike, _tx::Real, _ty::Real) ret = ccall(("pango_matrix_translate", libpango), Nothing, (Ptr{_PangoMatrix}, Float64, Float64), instance, _tx, _ty) nothing end @@ -991,7 +991,7 @@ $(Expr(:toplevel, quote _desc_maybe = nothing_to_null(_desc) _language_maybe = nothing_to_null(_language) ret = ccall(("pango_context_get_metrics", libpango), Ptr{_PangoFontMetrics}, (Ptr{GObject}, Ptr{PangoFontDescription}, Ptr{PangoLanguage}), instance, _desc_maybe, _language_maybe) - ret2 = convert(Union{PangoFontMetrics, Ref{_PangoFontMetrics}}, ret, true) + ret2 = convert(PangoFontMetricsLike, ret, true) ret2 end function get_round_glyph_positions(instance::PangoContext) @@ -1053,7 +1053,7 @@ $(Expr(:toplevel, quote ret = ccall(("pango_context_set_language", libpango), Nothing, (Ptr{GObject}, Ptr{PangoLanguage}), instance, _language_maybe) nothing end - function set_matrix(instance::PangoContext, _matrix::Maybe(Union{PangoMatrix, Ref{_PangoMatrix}})) + function set_matrix(instance::PangoContext, _matrix::Maybe(PangoMatrixLike)) _matrix_maybe = nothing_to_null(_matrix) ret = ccall(("pango_context_set_matrix", libpango), Nothing, (Ptr{GObject}, Ptr{_PangoMatrix}), instance, _matrix_maybe) nothing @@ -1132,7 +1132,7 @@ $(Expr(:toplevel, quote function get_metrics(instance::PangoFont, _language::Maybe(PangoLanguage)) _language_maybe = nothing_to_null(_language) ret = ccall(("pango_font_get_metrics", libpango), Ptr{_PangoFontMetrics}, (Ptr{GObject}, Ptr{PangoLanguage}), instance, _language_maybe) - ret2 = convert(Union{PangoFontMetrics, Ref{_PangoFontMetrics}}, ret, true) + ret2 = convert(PangoFontMetricsLike, ret, true) ret2 end function has_char(instance::PangoFont, _wc) @@ -1302,7 +1302,7 @@ $(Expr(:toplevel, quote end function get_metrics(instance::PangoFontset) ret = ccall(("pango_fontset_get_metrics", libpango), Ptr{_PangoFontMetrics}, (Ptr{GObject},), instance) - ret2 = convert(Union{PangoFontMetrics, Ref{_PangoFontMetrics}}, ret, true) + ret2 = convert(PangoFontMetricsLike, ret, true) ret2 end function FontsetSimple_new(_language::PangoLanguage) @@ -1693,12 +1693,12 @@ $(Expr(:toplevel, quote ret = ccall(("pango_renderer_draw_glyph", libpango), Nothing, (Ptr{GObject}, Ptr{GObject}, UInt32, Float64, Float64), instance, _font, _glyph, _x, _y) nothing end - function draw_glyph_item(instance::PangoRenderer, _text::Maybe(Union{AbstractString, Symbol}), _glyph_item::Union{PangoGlyphItem, Ref{_PangoGlyphItem}}, _x::Integer, _y::Integer) + function draw_glyph_item(instance::PangoRenderer, _text::Maybe(Union{AbstractString, Symbol}), _glyph_item::PangoGlyphItemLike, _x::Integer, _y::Integer) _text_maybe = nothing_to_null(_text) ret = ccall(("pango_renderer_draw_glyph_item", libpango), Nothing, (Ptr{GObject}, Cstring, Ptr{_PangoGlyphItem}, Int32, Int32), instance, _text_maybe, _glyph_item, _x, _y) nothing end - function draw_glyphs(instance::PangoRenderer, _font::PangoFont, _glyphs::Union{PangoGlyphString, Ref{_PangoGlyphString}}, _x::Integer, _y::Integer) + function draw_glyphs(instance::PangoRenderer, _font::PangoFont, _glyphs::PangoGlyphStringLike, _x::Integer, _y::Integer) ret = ccall(("pango_renderer_draw_glyphs", libpango), Nothing, (Ptr{GObject}, Ptr{GObject}, Ptr{_PangoGlyphString}, Int32, Int32), instance, _font, _glyphs, _x, _y) nothing end @@ -1706,7 +1706,7 @@ $(Expr(:toplevel, quote ret = ccall(("pango_renderer_draw_layout", libpango), Nothing, (Ptr{GObject}, Ptr{GObject}, Int32, Int32), instance, _layout, _x, _y) nothing end - function draw_layout_line(instance::PangoRenderer, _line::Union{PangoLayoutLine, Ref{_PangoLayoutLine}}, _x::Integer, _y::Integer) + function draw_layout_line(instance::PangoRenderer, _line::PangoLayoutLineLike, _x::Integer, _y::Integer) ret = ccall(("pango_renderer_draw_layout_line", libpango), Nothing, (Ptr{GObject}, Ptr{_PangoLayoutLine}, Int32, Int32), instance, _line, _x, _y) nothing end @@ -1750,12 +1750,12 @@ $(Expr(:toplevel, quote ret = ccall(("pango_renderer_set_alpha", libpango), Nothing, (Ptr{GObject}, UInt32, UInt16), instance, _part, _alpha) nothing end - function set_color(instance::PangoRenderer, _part, _color::Maybe(Union{PangoColor, Ref{_PangoColor}})) + function set_color(instance::PangoRenderer, _part, _color::Maybe(PangoColorLike)) _color_maybe = nothing_to_null(_color) ret = ccall(("pango_renderer_set_color", libpango), Nothing, (Ptr{GObject}, UInt32, Ptr{_PangoColor}), instance, _part, _color_maybe) nothing end - function set_matrix(instance::PangoRenderer, _matrix::Maybe(Union{PangoMatrix, Ref{_PangoMatrix}})) + function set_matrix(instance::PangoRenderer, _matrix::Maybe(PangoMatrixLike)) _matrix_maybe = nothing_to_null(_matrix) ret = ccall(("pango_renderer_set_matrix", libpango), Nothing, (Ptr{GObject}, Ptr{_PangoMatrix}), instance, _matrix_maybe) nothing diff --git a/src/gen/pango_structs b/src/gen/pango_structs index 83bd27c5..961b2d13 100644 --- a/src/gen/pango_structs +++ b/src/gen/pango_structs @@ -1,23 +1,26 @@ quote $(Expr(:toplevel, quote const gboxed_types = Any[] - mutable struct PangoLanguage <: GBoxed - handle::Ptr{PangoLanguage} - begin - (GLib.g_type(::Type{T}) where T <: PangoLanguage) = begin - ccall(("pango_language_get_type", libpango), GType, ()) - end - function PangoLanguage(ref::Ptr{T}, own::Bool = false) where T <: GBoxed - x = new(ref) - if own - finalizer(x) do x - GLib.delboxed(x) + begin + mutable struct PangoLanguage <: GBoxed + handle::Ptr{PangoLanguage} + begin + (GLib.g_type(::Type{T}) where T <: PangoLanguage) = begin + ccall(("pango_language_get_type", libpango), GType, ()) + end + function PangoLanguage(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 - x + push!(gboxed_types, PangoLanguage) end - push!(gboxed_types, PangoLanguage) end + const PangoLanguageLike = PangoLanguage end begin struct _PangoColor @@ -31,7 +34,7 @@ $(Expr(:toplevel, quote (GLib.g_type(::Type{T}) where T <: PangoColor) = begin ccall(("pango_color_get_type", libpango), GType, ()) end - function PangoColor(ref::Ptr{T}, own::Bool = false) where T <: GBoxed + function PangoColor(ref::Ptr{T}, own::Bool = false) where T <: Union{GBoxed, _PangoColor} x = new(ref) if own finalizer(x) do x @@ -43,9 +46,15 @@ $(Expr(:toplevel, quote push!(gboxed_types, PangoColor) end end - unsafe_convert(::Type{Ptr{_PangoColor}}, box::PangoColor) = begin - convert(Ptr{_PangoColor}, box.handle) - end + begin + unsafe_convert(::Type{Ptr{_PangoColor}}, box::PangoColor) = begin + convert(Ptr{_PangoColor}, box.handle) + end + convert(::Type{PangoColor}, p::Ptr{_PangoColor}, owns = false) = begin + PangoColor(p, owns) + end + const PangoColorLike = Union{Ref{_PangoColor}, PangoColor} + end end begin struct _PangoAttrClass @@ -57,9 +66,15 @@ $(Expr(:toplevel, quote mutable struct PangoAttrClass handle::Ptr{_PangoAttrClass} end - unsafe_convert(::Type{Ptr{_PangoAttrClass}}, box::PangoAttrClass) = begin - convert(Ptr{_PangoAttrClass}, box.handle) - end + begin + unsafe_convert(::Type{Ptr{_PangoAttrClass}}, box::PangoAttrClass) = begin + convert(Ptr{_PangoAttrClass}, box.handle) + end + convert(::Type{PangoAttrClass}, p::Ptr{_PangoAttrClass}, owns = false) = begin + PangoAttrClass(p, owns) + end + const PangoAttrClassLike = Union{Ref{_PangoAttrClass}, PangoAttrClass} + end end begin struct _PangoRectangle @@ -71,27 +86,36 @@ $(Expr(:toplevel, quote mutable struct PangoRectangle handle::Ptr{_PangoRectangle} end - unsafe_convert(::Type{Ptr{_PangoRectangle}}, box::PangoRectangle) = begin - convert(Ptr{_PangoRectangle}, box.handle) - end - end - mutable struct PangoFontDescription <: GBoxed - handle::Ptr{PangoFontDescription} begin - (GLib.g_type(::Type{T}) where T <: PangoFontDescription) = begin - ccall(("pango_font_description_get_type", libpango), GType, ()) + unsafe_convert(::Type{Ptr{_PangoRectangle}}, box::PangoRectangle) = begin + convert(Ptr{_PangoRectangle}, box.handle) + end + convert(::Type{PangoRectangle}, p::Ptr{_PangoRectangle}, owns = false) = begin + PangoRectangle(p, owns) end - function PangoFontDescription(ref::Ptr{T}, own::Bool = false) where T <: GBoxed - x = new(ref) - if own - finalizer(x) do x - GLib.delboxed(x) + const PangoRectangleLike = Union{Ref{_PangoRectangle}, PangoRectangle} + end + end + begin + mutable struct PangoFontDescription <: GBoxed + handle::Ptr{PangoFontDescription} + begin + (GLib.g_type(::Type{T}) where T <: PangoFontDescription) = begin + ccall(("pango_font_description_get_type", libpango), GType, ()) + end + function PangoFontDescription(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 - x + push!(gboxed_types, PangoFontDescription) end - push!(gboxed_types, PangoFontDescription) end + const PangoFontDescriptionLike = PangoFontDescription end begin struct _PangoAttribute @@ -105,7 +129,7 @@ $(Expr(:toplevel, quote (GLib.g_type(::Type{T}) where T <: PangoAttribute) = begin ccall(("pango_attribute_get_type", libpango), GType, ()) end - function PangoAttribute(ref::Ptr{T}, own::Bool = false) where T <: GBoxed + function PangoAttribute(ref::Ptr{T}, own::Bool = false) where T <: Union{GBoxed, _PangoAttribute} x = new(ref) if own finalizer(x) do x @@ -117,9 +141,15 @@ $(Expr(:toplevel, quote push!(gboxed_types, PangoAttribute) end end - unsafe_convert(::Type{Ptr{_PangoAttribute}}, box::PangoAttribute) = begin - convert(Ptr{_PangoAttribute}, box.handle) - end + begin + unsafe_convert(::Type{Ptr{_PangoAttribute}}, box::PangoAttribute) = begin + convert(Ptr{_PangoAttribute}, box.handle) + end + convert(::Type{PangoAttribute}, p::Ptr{_PangoAttribute}, owns = false) = begin + PangoAttribute(p, owns) + end + const PangoAttributeLike = Union{Ref{_PangoAttribute}, PangoAttribute} + end end begin struct _PangoAnalysis @@ -136,9 +166,15 @@ $(Expr(:toplevel, quote mutable struct PangoAnalysis handle::Ptr{_PangoAnalysis} end - unsafe_convert(::Type{Ptr{_PangoAnalysis}}, box::PangoAnalysis) = begin - convert(Ptr{_PangoAnalysis}, box.handle) - end + begin + unsafe_convert(::Type{Ptr{_PangoAnalysis}}, box::PangoAnalysis) = begin + convert(Ptr{_PangoAnalysis}, box.handle) + end + convert(::Type{PangoAnalysis}, p::Ptr{_PangoAnalysis}, owns = false) = begin + PangoAnalysis(p, owns) + end + const PangoAnalysisLike = Union{Ref{_PangoAnalysis}, PangoAnalysis} + end end begin struct _PangoItem @@ -153,7 +189,7 @@ $(Expr(:toplevel, quote (GLib.g_type(::Type{T}) where T <: PangoItem) = begin ccall(("pango_item_get_type", libpango), GType, ()) end - function PangoItem(ref::Ptr{T}, own::Bool = false) where T <: GBoxed + function PangoItem(ref::Ptr{T}, own::Bool = false) where T <: Union{GBoxed, _PangoItem} x = new(ref) if own finalizer(x) do x @@ -165,9 +201,15 @@ $(Expr(:toplevel, quote push!(gboxed_types, PangoItem) end end - unsafe_convert(::Type{Ptr{_PangoItem}}, box::PangoItem) = begin - convert(Ptr{_PangoItem}, box.handle) - end + begin + unsafe_convert(::Type{Ptr{_PangoItem}}, box::PangoItem) = begin + convert(Ptr{_PangoItem}, box.handle) + end + convert(::Type{PangoItem}, p::Ptr{_PangoItem}, owns = false) = begin + PangoItem(p, owns) + end + const PangoItemLike = Union{Ref{_PangoItem}, PangoItem} + end end begin struct _PangoGlyphVisAttr @@ -177,9 +219,15 @@ $(Expr(:toplevel, quote mutable struct PangoGlyphVisAttr handle::Ptr{_PangoGlyphVisAttr} end - unsafe_convert(::Type{Ptr{_PangoGlyphVisAttr}}, box::PangoGlyphVisAttr) = begin - convert(Ptr{_PangoGlyphVisAttr}, box.handle) - end + begin + unsafe_convert(::Type{Ptr{_PangoGlyphVisAttr}}, box::PangoGlyphVisAttr) = begin + convert(Ptr{_PangoGlyphVisAttr}, box.handle) + end + convert(::Type{PangoGlyphVisAttr}, p::Ptr{_PangoGlyphVisAttr}, owns = false) = begin + PangoGlyphVisAttr(p, owns) + end + const PangoGlyphVisAttrLike = Union{Ref{_PangoGlyphVisAttr}, PangoGlyphVisAttr} + end end begin struct _PangoGlyphGeometry @@ -190,9 +238,15 @@ $(Expr(:toplevel, quote mutable struct PangoGlyphGeometry handle::Ptr{_PangoGlyphGeometry} end - unsafe_convert(::Type{Ptr{_PangoGlyphGeometry}}, box::PangoGlyphGeometry) = begin - convert(Ptr{_PangoGlyphGeometry}, box.handle) - end + begin + unsafe_convert(::Type{Ptr{_PangoGlyphGeometry}}, box::PangoGlyphGeometry) = begin + convert(Ptr{_PangoGlyphGeometry}, box.handle) + end + convert(::Type{PangoGlyphGeometry}, p::Ptr{_PangoGlyphGeometry}, owns = false) = begin + PangoGlyphGeometry(p, owns) + end + const PangoGlyphGeometryLike = Union{Ref{_PangoGlyphGeometry}, PangoGlyphGeometry} + end end begin struct _PangoGlyphInfo @@ -203,9 +257,15 @@ $(Expr(:toplevel, quote mutable struct PangoGlyphInfo handle::Ptr{_PangoGlyphInfo} end - unsafe_convert(::Type{Ptr{_PangoGlyphInfo}}, box::PangoGlyphInfo) = begin - convert(Ptr{_PangoGlyphInfo}, box.handle) - end + begin + unsafe_convert(::Type{Ptr{_PangoGlyphInfo}}, box::PangoGlyphInfo) = begin + convert(Ptr{_PangoGlyphInfo}, box.handle) + end + convert(::Type{PangoGlyphInfo}, p::Ptr{_PangoGlyphInfo}, owns = false) = begin + PangoGlyphInfo(p, owns) + end + const PangoGlyphInfoLike = Union{Ref{_PangoGlyphInfo}, PangoGlyphInfo} + end end begin struct _PangoGlyphString @@ -220,7 +280,7 @@ $(Expr(:toplevel, quote (GLib.g_type(::Type{T}) where T <: PangoGlyphString) = begin ccall(("pango_glyph_string_get_type", libpango), GType, ()) end - function PangoGlyphString(ref::Ptr{T}, own::Bool = false) where T <: GBoxed + function PangoGlyphString(ref::Ptr{T}, own::Bool = false) where T <: Union{GBoxed, _PangoGlyphString} x = new(ref) if own finalizer(x) do x @@ -232,9 +292,15 @@ $(Expr(:toplevel, quote push!(gboxed_types, PangoGlyphString) end end - unsafe_convert(::Type{Ptr{_PangoGlyphString}}, box::PangoGlyphString) = begin - convert(Ptr{_PangoGlyphString}, box.handle) - end + begin + unsafe_convert(::Type{Ptr{_PangoGlyphString}}, box::PangoGlyphString) = begin + convert(Ptr{_PangoGlyphString}, box.handle) + end + convert(::Type{PangoGlyphString}, p::Ptr{_PangoGlyphString}, owns = false) = begin + PangoGlyphString(p, owns) + end + const PangoGlyphStringLike = Union{Ref{_PangoGlyphString}, PangoGlyphString} + end end begin struct _PangoGlyphItem @@ -250,7 +316,7 @@ $(Expr(:toplevel, quote (GLib.g_type(::Type{T}) where T <: PangoGlyphItem) = begin ccall(("pango_glyph_item_get_type", libpango), GType, ()) end - function PangoGlyphItem(ref::Ptr{T}, own::Bool = false) where T <: GBoxed + function PangoGlyphItem(ref::Ptr{T}, own::Bool = false) where T <: Union{GBoxed, _PangoGlyphItem} x = new(ref) if own finalizer(x) do x @@ -262,9 +328,15 @@ $(Expr(:toplevel, quote push!(gboxed_types, PangoGlyphItem) end end - unsafe_convert(::Type{Ptr{_PangoGlyphItem}}, box::PangoGlyphItem) = begin - convert(Ptr{_PangoGlyphItem}, box.handle) - end + begin + unsafe_convert(::Type{Ptr{_PangoGlyphItem}}, box::PangoGlyphItem) = begin + convert(Ptr{_PangoGlyphItem}, box.handle) + end + convert(::Type{PangoGlyphItem}, p::Ptr{_PangoGlyphItem}, owns = false) = begin + PangoGlyphItem(p, owns) + end + const PangoGlyphItemLike = Union{Ref{_PangoGlyphItem}, PangoGlyphItem} + end end begin struct _PangoAttrColor @@ -274,9 +346,15 @@ $(Expr(:toplevel, quote mutable struct PangoAttrColor handle::Ptr{_PangoAttrColor} end - unsafe_convert(::Type{Ptr{_PangoAttrColor}}, box::PangoAttrColor) = begin - convert(Ptr{_PangoAttrColor}, box.handle) - end + begin + unsafe_convert(::Type{Ptr{_PangoAttrColor}}, box::PangoAttrColor) = begin + convert(Ptr{_PangoAttrColor}, box.handle) + end + convert(::Type{PangoAttrColor}, p::Ptr{_PangoAttrColor}, owns = false) = begin + PangoAttrColor(p, owns) + end + const PangoAttrColorLike = Union{Ref{_PangoAttrColor}, PangoAttrColor} + end end begin struct _PangoAttrFloat @@ -286,9 +364,15 @@ $(Expr(:toplevel, quote mutable struct PangoAttrFloat handle::Ptr{_PangoAttrFloat} end - unsafe_convert(::Type{Ptr{_PangoAttrFloat}}, box::PangoAttrFloat) = begin - convert(Ptr{_PangoAttrFloat}, box.handle) - end + begin + unsafe_convert(::Type{Ptr{_PangoAttrFloat}}, box::PangoAttrFloat) = begin + convert(Ptr{_PangoAttrFloat}, box.handle) + end + convert(::Type{PangoAttrFloat}, p::Ptr{_PangoAttrFloat}, owns = false) = begin + PangoAttrFloat(p, owns) + end + const PangoAttrFloatLike = Union{Ref{_PangoAttrFloat}, PangoAttrFloat} + end end begin struct _PangoAttrFontDesc @@ -298,9 +382,15 @@ $(Expr(:toplevel, quote mutable struct PangoAttrFontDesc handle::Ptr{_PangoAttrFontDesc} end - unsafe_convert(::Type{Ptr{_PangoAttrFontDesc}}, box::PangoAttrFontDesc) = begin - convert(Ptr{_PangoAttrFontDesc}, box.handle) - end + begin + unsafe_convert(::Type{Ptr{_PangoAttrFontDesc}}, box::PangoAttrFontDesc) = begin + convert(Ptr{_PangoAttrFontDesc}, box.handle) + end + convert(::Type{PangoAttrFontDesc}, p::Ptr{_PangoAttrFontDesc}, owns = false) = begin + PangoAttrFontDesc(p, owns) + end + const PangoAttrFontDescLike = Union{Ref{_PangoAttrFontDesc}, PangoAttrFontDesc} + end end begin struct _PangoAttrFontFeatures @@ -310,9 +400,15 @@ $(Expr(:toplevel, quote mutable struct PangoAttrFontFeatures handle::Ptr{_PangoAttrFontFeatures} end - unsafe_convert(::Type{Ptr{_PangoAttrFontFeatures}}, box::PangoAttrFontFeatures) = begin - convert(Ptr{_PangoAttrFontFeatures}, box.handle) - end + begin + unsafe_convert(::Type{Ptr{_PangoAttrFontFeatures}}, box::PangoAttrFontFeatures) = begin + convert(Ptr{_PangoAttrFontFeatures}, box.handle) + end + convert(::Type{PangoAttrFontFeatures}, p::Ptr{_PangoAttrFontFeatures}, owns = false) = begin + PangoAttrFontFeatures(p, owns) + end + const PangoAttrFontFeaturesLike = Union{Ref{_PangoAttrFontFeatures}, PangoAttrFontFeatures} + end end begin struct _PangoAttrInt @@ -322,27 +418,36 @@ $(Expr(:toplevel, quote mutable struct PangoAttrInt handle::Ptr{_PangoAttrInt} end - unsafe_convert(::Type{Ptr{_PangoAttrInt}}, box::PangoAttrInt) = begin - convert(Ptr{_PangoAttrInt}, box.handle) - end - end - mutable struct PangoAttrIterator <: GBoxed - handle::Ptr{PangoAttrIterator} begin - (GLib.g_type(::Type{T}) where T <: PangoAttrIterator) = begin - ccall(("pango_attr_iterator_get_type", libpango), GType, ()) + unsafe_convert(::Type{Ptr{_PangoAttrInt}}, box::PangoAttrInt) = begin + convert(Ptr{_PangoAttrInt}, box.handle) + end + convert(::Type{PangoAttrInt}, p::Ptr{_PangoAttrInt}, owns = false) = begin + PangoAttrInt(p, owns) end - function PangoAttrIterator(ref::Ptr{T}, own::Bool = false) where T <: GBoxed - x = new(ref) - if own - finalizer(x) do x - GLib.delboxed(x) + const PangoAttrIntLike = Union{Ref{_PangoAttrInt}, PangoAttrInt} + end + end + begin + mutable struct PangoAttrIterator <: GBoxed + handle::Ptr{PangoAttrIterator} + begin + (GLib.g_type(::Type{T}) where T <: PangoAttrIterator) = begin + ccall(("pango_attr_iterator_get_type", libpango), GType, ()) + end + function PangoAttrIterator(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 - x + push!(gboxed_types, PangoAttrIterator) end - push!(gboxed_types, PangoAttrIterator) end + const PangoAttrIteratorLike = PangoAttrIterator end begin struct _PangoAttrLanguage @@ -352,27 +457,36 @@ $(Expr(:toplevel, quote mutable struct PangoAttrLanguage handle::Ptr{_PangoAttrLanguage} end - unsafe_convert(::Type{Ptr{_PangoAttrLanguage}}, box::PangoAttrLanguage) = begin - convert(Ptr{_PangoAttrLanguage}, box.handle) - end - end - mutable struct PangoAttrList <: GBoxed - handle::Ptr{PangoAttrList} begin - (GLib.g_type(::Type{T}) where T <: PangoAttrList) = begin - ccall(("pango_attr_list_get_type", libpango), GType, ()) + unsafe_convert(::Type{Ptr{_PangoAttrLanguage}}, box::PangoAttrLanguage) = begin + convert(Ptr{_PangoAttrLanguage}, box.handle) end - function PangoAttrList(ref::Ptr{T}, own::Bool = false) where T <: GBoxed - x = new(ref) - if own - finalizer(x) do x - GLib.delboxed(x) + convert(::Type{PangoAttrLanguage}, p::Ptr{_PangoAttrLanguage}, owns = false) = begin + PangoAttrLanguage(p, owns) + end + const PangoAttrLanguageLike = Union{Ref{_PangoAttrLanguage}, PangoAttrLanguage} + end + end + begin + mutable struct PangoAttrList <: GBoxed + handle::Ptr{PangoAttrList} + begin + (GLib.g_type(::Type{T}) where T <: PangoAttrList) = begin + ccall(("pango_attr_list_get_type", libpango), GType, ()) + end + function PangoAttrList(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 - x + push!(gboxed_types, PangoAttrList) end - push!(gboxed_types, PangoAttrList) end + const PangoAttrListLike = PangoAttrList end begin struct _PangoAttrShape @@ -386,9 +500,15 @@ $(Expr(:toplevel, quote mutable struct PangoAttrShape handle::Ptr{_PangoAttrShape} end - unsafe_convert(::Type{Ptr{_PangoAttrShape}}, box::PangoAttrShape) = begin - convert(Ptr{_PangoAttrShape}, box.handle) - end + begin + unsafe_convert(::Type{Ptr{_PangoAttrShape}}, box::PangoAttrShape) = begin + convert(Ptr{_PangoAttrShape}, box.handle) + end + convert(::Type{PangoAttrShape}, p::Ptr{_PangoAttrShape}, owns = false) = begin + PangoAttrShape(p, owns) + end + const PangoAttrShapeLike = Union{Ref{_PangoAttrShape}, PangoAttrShape} + end end begin struct _PangoAttrSize @@ -399,9 +519,15 @@ $(Expr(:toplevel, quote mutable struct PangoAttrSize handle::Ptr{_PangoAttrSize} end - unsafe_convert(::Type{Ptr{_PangoAttrSize}}, box::PangoAttrSize) = begin - convert(Ptr{_PangoAttrSize}, box.handle) - end + begin + unsafe_convert(::Type{Ptr{_PangoAttrSize}}, box::PangoAttrSize) = begin + convert(Ptr{_PangoAttrSize}, box.handle) + end + convert(::Type{PangoAttrSize}, p::Ptr{_PangoAttrSize}, owns = false) = begin + PangoAttrSize(p, owns) + end + const PangoAttrSizeLike = Union{Ref{_PangoAttrSize}, PangoAttrSize} + end end begin struct _PangoAttrString @@ -411,9 +537,15 @@ $(Expr(:toplevel, quote mutable struct PangoAttrString handle::Ptr{_PangoAttrString} end - unsafe_convert(::Type{Ptr{_PangoAttrString}}, box::PangoAttrString) = begin - convert(Ptr{_PangoAttrString}, box.handle) - end + begin + unsafe_convert(::Type{Ptr{_PangoAttrString}}, box::PangoAttrString) = begin + convert(Ptr{_PangoAttrString}, box.handle) + end + convert(::Type{PangoAttrString}, p::Ptr{_PangoAttrString}, owns = false) = begin + PangoAttrString(p, owns) + end + const PangoAttrStringLike = Union{Ref{_PangoAttrString}, PangoAttrString} + end end begin struct _PangoFontMetrics @@ -434,7 +566,7 @@ $(Expr(:toplevel, quote (GLib.g_type(::Type{T}) where T <: PangoFontMetrics) = begin ccall(("pango_font_metrics_get_type", libpango), GType, ()) end - function PangoFontMetrics(ref::Ptr{T}, own::Bool = false) where T <: GBoxed + function PangoFontMetrics(ref::Ptr{T}, own::Bool = false) where T <: Union{GBoxed, _PangoFontMetrics} x = new(ref) if own finalizer(x) do x @@ -446,9 +578,15 @@ $(Expr(:toplevel, quote push!(gboxed_types, PangoFontMetrics) end end - unsafe_convert(::Type{Ptr{_PangoFontMetrics}}, box::PangoFontMetrics) = begin - convert(Ptr{_PangoFontMetrics}, box.handle) - end + begin + unsafe_convert(::Type{Ptr{_PangoFontMetrics}}, box::PangoFontMetrics) = begin + convert(Ptr{_PangoFontMetrics}, box.handle) + end + convert(::Type{PangoFontMetrics}, p::Ptr{_PangoFontMetrics}, owns = false) = begin + PangoFontMetrics(p, owns) + end + const PangoFontMetricsLike = Union{Ref{_PangoFontMetrics}, PangoFontMetrics} + end end begin struct _PangoGlyphItemIter @@ -467,7 +605,7 @@ $(Expr(:toplevel, quote (GLib.g_type(::Type{T}) where T <: PangoGlyphItemIter) = begin ccall(("pango_glyph_item_iter_get_type", libpango), GType, ()) end - function PangoGlyphItemIter(ref::Ptr{T}, own::Bool = false) where T <: GBoxed + function PangoGlyphItemIter(ref::Ptr{T}, own::Bool = false) where T <: Union{GBoxed, _PangoGlyphItemIter} x = new(ref) if own finalizer(x) do x @@ -479,27 +617,36 @@ $(Expr(:toplevel, quote push!(gboxed_types, PangoGlyphItemIter) end end - unsafe_convert(::Type{Ptr{_PangoGlyphItemIter}}, box::PangoGlyphItemIter) = begin - convert(Ptr{_PangoGlyphItemIter}, box.handle) - end - end - mutable struct PangoLayoutIter <: GBoxed - handle::Ptr{PangoLayoutIter} begin - (GLib.g_type(::Type{T}) where T <: PangoLayoutIter) = begin - ccall(("pango_layout_iter_get_type", libpango), GType, ()) + unsafe_convert(::Type{Ptr{_PangoGlyphItemIter}}, box::PangoGlyphItemIter) = begin + convert(Ptr{_PangoGlyphItemIter}, box.handle) + end + convert(::Type{PangoGlyphItemIter}, p::Ptr{_PangoGlyphItemIter}, owns = false) = begin + PangoGlyphItemIter(p, owns) end - function PangoLayoutIter(ref::Ptr{T}, own::Bool = false) where T <: GBoxed - x = new(ref) - if own - finalizer(x) do x - GLib.delboxed(x) + const PangoGlyphItemIterLike = Union{Ref{_PangoGlyphItemIter}, PangoGlyphItemIter} + end + end + begin + mutable struct PangoLayoutIter <: GBoxed + handle::Ptr{PangoLayoutIter} + begin + (GLib.g_type(::Type{T}) where T <: PangoLayoutIter) = begin + ccall(("pango_layout_iter_get_type", libpango), GType, ()) + end + function PangoLayoutIter(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 - x + push!(gboxed_types, PangoLayoutIter) end - push!(gboxed_types, PangoLayoutIter) end + const PangoLayoutIterLike = PangoLayoutIter end begin struct _PangoLayoutLine @@ -516,7 +663,7 @@ $(Expr(:toplevel, quote (GLib.g_type(::Type{T}) where T <: PangoLayoutLine) = begin ccall(("pango_layout_line_get_type", libpango), GType, ()) end - function PangoLayoutLine(ref::Ptr{T}, own::Bool = false) where T <: GBoxed + function PangoLayoutLine(ref::Ptr{T}, own::Bool = false) where T <: Union{GBoxed, _PangoLayoutLine} x = new(ref) if own finalizer(x) do x @@ -528,9 +675,15 @@ $(Expr(:toplevel, quote push!(gboxed_types, PangoLayoutLine) end end - unsafe_convert(::Type{Ptr{_PangoLayoutLine}}, box::PangoLayoutLine) = begin - convert(Ptr{_PangoLayoutLine}, box.handle) - end + begin + unsafe_convert(::Type{Ptr{_PangoLayoutLine}}, box::PangoLayoutLine) = begin + convert(Ptr{_PangoLayoutLine}, box.handle) + end + convert(::Type{PangoLayoutLine}, p::Ptr{_PangoLayoutLine}, owns = false) = begin + PangoLayoutLine(p, owns) + end + const PangoLayoutLineLike = Union{Ref{_PangoLayoutLine}, PangoLayoutLine} + end end begin struct _PangoLogAttr @@ -554,9 +707,15 @@ $(Expr(:toplevel, quote mutable struct PangoLogAttr handle::Ptr{_PangoLogAttr} end - unsafe_convert(::Type{Ptr{_PangoLogAttr}}, box::PangoLogAttr) = begin - convert(Ptr{_PangoLogAttr}, box.handle) - end + begin + unsafe_convert(::Type{Ptr{_PangoLogAttr}}, box::PangoLogAttr) = begin + convert(Ptr{_PangoLogAttr}, box.handle) + end + convert(::Type{PangoLogAttr}, p::Ptr{_PangoLogAttr}, owns = false) = begin + PangoLogAttr(p, owns) + end + const PangoLogAttrLike = Union{Ref{_PangoLogAttr}, PangoLogAttr} + end end begin struct _PangoMatrix @@ -573,7 +732,7 @@ $(Expr(:toplevel, quote (GLib.g_type(::Type{T}) where T <: PangoMatrix) = begin ccall(("pango_matrix_get_type", libpango), GType, ()) end - function PangoMatrix(ref::Ptr{T}, own::Bool = false) where T <: GBoxed + function PangoMatrix(ref::Ptr{T}, own::Bool = false) where T <: Union{GBoxed, _PangoMatrix} x = new(ref) if own finalizer(x) do x @@ -585,45 +744,57 @@ $(Expr(:toplevel, quote push!(gboxed_types, PangoMatrix) end end - unsafe_convert(::Type{Ptr{_PangoMatrix}}, box::PangoMatrix) = begin - convert(Ptr{_PangoMatrix}, box.handle) - end - end - mutable struct PangoScriptIter <: GBoxed - handle::Ptr{PangoScriptIter} begin - (GLib.g_type(::Type{T}) where T <: PangoScriptIter) = begin - ccall(("pango_script_iter_get_type", libpango), GType, ()) + unsafe_convert(::Type{Ptr{_PangoMatrix}}, box::PangoMatrix) = begin + convert(Ptr{_PangoMatrix}, box.handle) + end + convert(::Type{PangoMatrix}, p::Ptr{_PangoMatrix}, owns = false) = begin + PangoMatrix(p, owns) end - function PangoScriptIter(ref::Ptr{T}, own::Bool = false) where T <: GBoxed - x = new(ref) - if own - finalizer(x) do x - GLib.delboxed(x) + const PangoMatrixLike = Union{Ref{_PangoMatrix}, PangoMatrix} + end + end + begin + mutable struct PangoScriptIter <: GBoxed + handle::Ptr{PangoScriptIter} + begin + (GLib.g_type(::Type{T}) where T <: PangoScriptIter) = begin + ccall(("pango_script_iter_get_type", libpango), GType, ()) + end + function PangoScriptIter(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 - x + push!(gboxed_types, PangoScriptIter) end - push!(gboxed_types, PangoScriptIter) end + const PangoScriptIterLike = PangoScriptIter end - mutable struct PangoTabArray <: GBoxed - handle::Ptr{PangoTabArray} - begin - (GLib.g_type(::Type{T}) where T <: PangoTabArray) = begin - ccall(("pango_tab_array_get_type", libpango), GType, ()) - end - function PangoTabArray(ref::Ptr{T}, own::Bool = false) where T <: GBoxed - x = new(ref) - if own - finalizer(x) do x - GLib.delboxed(x) + begin + mutable struct PangoTabArray <: GBoxed + handle::Ptr{PangoTabArray} + begin + (GLib.g_type(::Type{T}) where T <: PangoTabArray) = begin + ccall(("pango_tab_array_get_type", libpango), GType, ()) + end + function PangoTabArray(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 - x + push!(gboxed_types, PangoTabArray) end - push!(gboxed_types, PangoTabArray) end + const PangoTabArrayLike = PangoTabArray end gboxed_cache_init() = begin append!(GLib.gboxed_types, gboxed_types) @@ -912,7 +1083,7 @@ $(Expr(:toplevel, quote convert(Ptr{Nothing}, ret) end function PangoAttrFilterFunc(attribute, user_data) - attribute = convert(Union{PangoAttribute, Ref{_PangoAttribute}}, attribute, false) + attribute = convert(PangoAttributeLike, attribute, false) f = user_data ret = f(attribute) convert(Cint, ret) @@ -924,6 +1095,6 @@ $(Expr(:toplevel, quote ret = f(fontset, font) convert(Cint, ret) end - export PangoLanguage, PangoColor, _PangoColor, PangoAttrClass, _PangoAttrClass, PangoRectangle, _PangoRectangle, PangoFontDescription, PangoAttribute, _PangoAttribute, PangoAnalysis, _PangoAnalysis, PangoItem, _PangoItem, PangoGlyphVisAttr, _PangoGlyphVisAttr, PangoGlyphGeometry, _PangoGlyphGeometry, PangoGlyphInfo, _PangoGlyphInfo, PangoGlyphString, _PangoGlyphString, PangoGlyphItem, _PangoGlyphItem, PangoAttrColor, _PangoAttrColor, PangoAttrFloat, _PangoAttrFloat, PangoAttrFontDesc, _PangoAttrFontDesc, PangoAttrFontFeatures, _PangoAttrFontFeatures, PangoAttrInt, _PangoAttrInt, PangoAttrIterator, PangoAttrLanguage, _PangoAttrLanguage, PangoAttrList, PangoAttrShape, _PangoAttrShape, PangoAttrSize, _PangoAttrSize, PangoAttrString, _PangoAttrString, PangoFontMetrics, _PangoFontMetrics, PangoGlyphItemIter, _PangoGlyphItemIter, PangoLayoutIter, PangoLayoutLine, _PangoLayoutLine, PangoLogAttr, _PangoLogAttr, PangoMatrix, _PangoMatrix, PangoScriptIter, PangoTabArray, PangoContext, PangoContextLeaf, PangoCoverage, PangoCoverageLeaf, PangoFont, PangoFontFace, PangoFontFamily, PangoFontMap, PangoFontset, PangoFontsetSimple, PangoFontsetSimpleLeaf, PangoLayout, PangoLayoutLeaf, PangoRenderer, PangoAttrDataCopyFunc, PangoAttrFilterFunc, PangoFontsetForeachFunc + export PangoLanguage, PangoColor, _PangoColor, PangoColorLike, PangoAttrClass, _PangoAttrClass, PangoAttrClassLike, PangoRectangle, _PangoRectangle, PangoRectangleLike, PangoFontDescription, PangoAttribute, _PangoAttribute, PangoAttributeLike, PangoAnalysis, _PangoAnalysis, PangoAnalysisLike, PangoItem, _PangoItem, PangoItemLike, PangoGlyphVisAttr, _PangoGlyphVisAttr, PangoGlyphVisAttrLike, PangoGlyphGeometry, _PangoGlyphGeometry, PangoGlyphGeometryLike, PangoGlyphInfo, _PangoGlyphInfo, PangoGlyphInfoLike, PangoGlyphString, _PangoGlyphString, PangoGlyphStringLike, PangoGlyphItem, _PangoGlyphItem, PangoGlyphItemLike, PangoAttrColor, PangoAttrColorLike, _PangoAttrColor, PangoAttrFloat, PangoAttrFloatLike, _PangoAttrFloat, PangoAttrFontDesc, PangoAttrFontDescLike, _PangoAttrFontDesc, PangoAttrFontFeatures, PangoAttrFontFeaturesLike, _PangoAttrFontFeatures, PangoAttrInt, PangoAttrIntLike, _PangoAttrInt, PangoAttrIterator, PangoAttrLanguage, PangoAttrLanguageLike, _PangoAttrLanguage, PangoAttrList, PangoAttrShape, PangoAttrShapeLike, _PangoAttrShape, PangoAttrSize, PangoAttrSizeLike, _PangoAttrSize, PangoAttrString, PangoAttrStringLike, _PangoAttrString, PangoFontMetrics, PangoFontMetricsLike, _PangoFontMetrics, PangoGlyphItemIter, PangoGlyphItemIterLike, _PangoGlyphItemIter, PangoLayoutIter, PangoLayoutLine, PangoLayoutLineLike, _PangoLayoutLine, PangoLogAttr, PangoLogAttrLike, _PangoLogAttr, PangoMatrix, PangoMatrixLike, _PangoMatrix, PangoScriptIter, PangoTabArray, PangoContext, PangoContextLeaf, PangoCoverage, PangoCoverageLeaf, PangoFont, PangoFontFace, PangoFontFamily, PangoFontMap, PangoFontset, PangoFontsetSimple, PangoFontsetSimpleLeaf, PangoLayout, PangoLayoutLeaf, PangoRenderer, PangoAttrDataCopyFunc, PangoAttrFilterFunc, PangoFontsetForeachFunc end)) end diff --git a/src/gen/pangocairo_structs b/src/gen/pangocairo_structs index 53eeedf7..e5af5c5e 100644 --- a/src/gen/pangocairo_structs +++ b/src/gen/pangocairo_structs @@ -16,7 +16,7 @@ $(Expr(:toplevel, quote end function PangoCairoShapeRendererFunc(cr, attr, do_path, data) cr = convert(cairoContext, cr, false) - attr = convert(Union{PangoAttrShape, Ref{_PangoAttrShape}}, attr) + attr = convert(PangoAttrShapeLike, attr) do_path = convert(Bool, do_path) f = data ret = f(cr, attr, do_path) diff --git a/src/input.jl b/src/input.jl index 2156ff24..4fc2db2b 100644 --- a/src/input.jl +++ b/src/input.jl @@ -23,16 +23,16 @@ complete(completion::GtkEntryCompletion) = G_.complete(completion) Create a scale widget with horizontal (:h) or vertical (:v) orientation and an optional range. Keyword arguments can be used to set properties. """ -GtkScale(orientation::Symbol; kwargs...) = GtkScale(convert(Gtk4.Orientation,orientation), nothing; kwargs...) -GtkScale(orientation::Symbol, adj::GtkAdjustment; kwargs...) = GtkScale(convert(Gtk4.Orientation,orientation), adj; kwargs...) -GtkScale(orientation::Symbol, min::Real, max::Real, step::Real; kwargs...) = GtkScale(convert(Gtk4.Orientation,orientation), min, max, step; kwargs...) -GtkScale(orientation, scale::AbstractRange; kwargs...) = GtkScale(convert(Gtk4.Orientation,orientation), minimum(scale), maximum(scale), step(scale); kwargs...) +GtkScale(orientation::Symbol; kwargs...) = GtkScale(convert(Orientation,orientation), nothing; kwargs...) +GtkScale(orientation::Symbol, adj::GtkAdjustment; kwargs...) = GtkScale(convert(Orientation,orientation), adj; kwargs...) +GtkScale(orientation::Symbol, min::Real, max::Real, step::Real; kwargs...) = GtkScale(convert(Orientation,orientation), min, max, step; kwargs...) +GtkScale(orientation, scale::AbstractRange; kwargs...) = GtkScale(convert(Orientation,orientation), minimum(scale), maximum(scale), step(scale); kwargs...) function push!(scale::GtkScale, value, position, markup::AbstractString) - G_.add_mark(scale, value, convert(Gtk4.PositionType,position), markup) + G_.add_mark(scale, value, convert(PositionType,position), markup) scale end function push!(scale::GtkScale, value::Real, position) - G_.add_mark(scale, value, convert(Gtk4.PositionType,position), nothing) + G_.add_mark(scale, value, convert(PositionType,position), nothing) scale end function empty!(scale::GtkScale) diff --git a/src/layout.jl b/src/layout.jl index 3ef8da68..aaa66b29 100644 --- a/src/layout.jl +++ b/src/layout.jl @@ -1,22 +1,22 @@ -function convert(::Type{Gtk4.Orientation}, x::Symbol) +function convert(::Type{Orientation}, x::Symbol) if x === :h - Gtk4.Orientation_HORIZONTAL + Orientation_HORIZONTAL elseif x === :v - Gtk4.Orientation_VERTICAL + Orientation_VERTICAL else error("can't convert $x to GtkOrientation") end end -function convert(::Type{Gtk4.PositionType}, x::Symbol) +function convert(::Type{PositionType}, x::Symbol) if x === :left - Gtk4.PositionType_LEFT + PositionType_LEFT elseif x === :right - Gtk4.PositionType_RIGHT + PositionType_RIGHT elseif x === :top - Gtk4.PositionType_TOP + PositionType_TOP elseif x === :bottom - Gtk4.PositionType_BOTTOM + PositionType_BOTTOM else error("can't convert $x to GtkPositionType") end @@ -32,7 +32,7 @@ horizontal, or `:v` for vertical. The `spacing` argument controls the spacing between child widgets in pixels. Keyword arguments allow you to set GObject properties. """ -GtkBox(orientation::Symbol, spacing::Integer=0; kwargs...) = GtkBox(convert(Gtk4.Orientation, orientation), spacing; kwargs...) +GtkBox(orientation::Symbol, spacing::Integer=0; kwargs...) = GtkBox(convert(Orientation, orientation), spacing; kwargs...) function push!(b::GtkBox,w::GtkWidget) hasparent(w) && error("Widget already has a parent") @@ -61,7 +61,7 @@ end ## GtkSeparator -GtkSeparator(orientation::Symbol; kwargs...) = GtkSeparator(convert(Gtk4.Orientation, orientation); kwargs...) +GtkSeparator(orientation::Symbol; kwargs...) = GtkSeparator(convert(Orientation, orientation); kwargs...) ## GtkCenterBox @@ -74,7 +74,7 @@ GObject properties. """ function GtkCenterBox(orientation::Symbol; kwargs...) b = GtkCenterBox(;kwargs...) - G_.set_orientation(GtkOrientable(b), convert(Gtk4.Orientation, orientation)) + G_.set_orientation(GtkOrientable(b), convert(Orientation, orientation)) b end @@ -110,7 +110,7 @@ Create and return a `GtkPaned` widget. The `orientation` argument can be `:h` for horizontal, or `:v` for vertical. Keyword arguments allow you to set GObject properties. """ -GtkPaned(orientation::Symbol; kwargs...) = GtkPaned(convert(Gtk4.Orientation, orientation); kwargs...) +GtkPaned(orientation::Symbol; kwargs...) = GtkPaned(convert(Orientation, orientation); kwargs...) function getindex(pane::GtkPaned, i::Integer) if i == 1 @@ -151,21 +151,21 @@ function setindex!(grid::GtkGrid, child, i::Union{T, AbstractRange{T}}, j::Union end function insert!(grid::GtkGrid, i::Integer, side) - side = convert(Gtk4.PositionType, side) - if side == Gtk4.PositionType_LEFT + side = convert(PositionType, side) + if side == PositionType_LEFT G_.insert_column(grid, i - 1) - elseif side == Gtk4.PositionType_RIGHT + elseif side == PositionType_RIGHT G_.insert_column(grid, i) - elseif side == Gtk4.PositionType_TOP + elseif side == PositionType_TOP G_.insert_row(grid, i - 1) - elseif side == Gtk4.PositionType_BOTTOM + elseif side == PositionType_BOTTOM G_.insert_row(grid, i) end grid end function insert!(grid::GtkGrid, sibling, side) - side = convert(Gtk4.PositionType, side) + side = convert(PositionType, side) G_.insert_next_to(grid, sibling, side) grid end diff --git a/src/lists.jl b/src/lists.jl index 6fa5b913..4da6ae15 100644 --- a/src/lists.jl +++ b/src/lists.jl @@ -274,7 +274,7 @@ function set_filter_func(cf::GtkCustomFilter, ::Nothing) ccall(("gtk_custom_filter_set_filter_func", libgtk4), Nothing, (Ptr{GObject}, Ptr{Nothing}, Ptr{Nothing}, Ptr{Nothing}), cf, C_NULL, C_NULL, C_NULL) end -changed(cf::GtkCustomFilter, _change = Gtk4.FilterChange_DIFFERENT) = G_.changed(cf, _change) +changed(cf::GtkCustomFilter, _change = FilterChange_DIFFERENT) = G_.changed(cf, _change) ## GtkCustomSorter @@ -294,7 +294,7 @@ function set_sort_func(cf::GtkCustomSorter, ::Nothing) ccall(("gtk_custom_sorter_set_sort_func", libgtk4), Nothing, (Ptr{GObject}, Ptr{Nothing}, Ptr{Nothing}, Ptr{Nothing}), cf, C_NULL, C_NULL, C_NULL) end -changed(cs::GtkCustomSorter, _change = Gtk4.FilterChange_DIFFERENT) = G_.changed(cs, _change) +changed(cs::GtkCustomSorter, _change = FilterChange_DIFFERENT) = G_.changed(cs, _change) ## GtkExpressions diff --git a/src/precompile.jl b/src/precompile.jl index 374d8f21..13634e07 100644 --- a/src/precompile.jl +++ b/src/precompile.jl @@ -6,13 +6,13 @@ function _precompile_() ccall(:jl_generating_output, Cint, ()) == 1 || return nothing precompile(Tuple{typeof(__init__)}) precompile(Tuple{typeof(Gtk4.GLib.GClosureMarshal), Ptr{Nothing}, Ptr{Gtk4.GLib.GValue}, UInt32, Ptr{Gtk4.GLib.GValue}, Ptr{Nothing}, Ptr{Nothing}}) - precompile(Tuple{typeof(Gtk4.GLib.uv_prepare), Ptr{Nothing}, Ptr{Int32}}) - precompile(Tuple{typeof(Gtk4.GLib.uv_check), Ptr{Nothing}}) - precompile(Tuple{typeof(Gtk4.GLib.uv_dispatch), Ptr{Nothing}, Ptr{Nothing}, Int64}) - precompile(Tuple{typeof(Gtk4.GLib.g_yield), UInt64}) - precompile(Tuple{typeof(Gtk4.GLib.__init__)}) - precompile(Tuple{typeof(Gtk4.Pango.__init__)}) - precompile(Tuple{typeof(Gtk4.GdkPixbufLib.__init__)}) + precompile(Tuple{typeof(GLib.uv_prepare), Ptr{Nothing}, Ptr{Int32}}) + precompile(Tuple{typeof(GLib.uv_check), Ptr{Nothing}}) + precompile(Tuple{typeof(GLib.uv_dispatch), Ptr{Nothing}, Ptr{Nothing}, Int64}) + precompile(Tuple{typeof(GLib.g_yield), UInt64}) + precompile(Tuple{typeof(GLib.__init__)}) + precompile(Tuple{typeof(Pango.__init__)}) + precompile(Tuple{typeof(GdkPixbufLib.__init__)}) precompile(Tuple{Type{GtkWindow},String}) precompile(Tuple{Type{GtkWindow},String,Int64,Int64}) precompile(Tuple{Type{GtkCanvas}}) diff --git a/src/text.jl b/src/text.jl index 6975c1ea..b640b7fd 100644 --- a/src/text.jl +++ b/src/text.jl @@ -1,58 +1,47 @@ -GtkTextBuffer() = G_.TextBuffer_new(nothing) +GtkTextBuffer(; kwargs...) = GtkTextBuffer(nothing; kwargs...) -GtkTextMark(left_gravity::Bool = false) = G_.TextMark_new(nothing, left_gravity) +GtkTextMark(left_gravity::Bool = false; kwargs...) = GtkTextMark(nothing, left_gravity; kwargs...) -GtkTextTag() = G_.TextTag_new(nothing) +GtkTextTag(; kwargs...) = GtkTextTag(nothing; kwargs...) -const TI = Union{Ref{_GtkTextIter}, _GtkTextIter} +const TI = Union{Ref{_GtkTextIter}, GtkTextIter} zero(::Type{_GtkTextIter}) = _GtkTextIter() copy(ti::_GtkTextIter) = Ref(ti) copy(ti::Ref{_GtkTextIter}) = Ref(ti[]) """ - _GtkTextIter(text::GtkTextBuffer, char_offset::Integer) + GtkTextIter(text::GtkTextBuffer, char_offset::Integer) -Creates a `_GtkTextIter` with offset `char_offset` (one-based index). +Creates a `GtkTextIter` with offset `char_offset` (one-based index). """ -function _GtkTextIter(text::GtkTextBuffer, char_offset::Integer) - iter = Ref{_GtkTextIter}() - ccall((:gtk_text_buffer_get_iter_at_offset, libgtk4), Nothing, - (Ptr{GObject}, Ptr{_GtkTextIter}, Cint), text, iter, char_offset - 1) - iter[] +function GtkTextIter(text::GtkTextBuffer, char_offset::Integer) + i = G_.get_iter_at_offset(text, char_offset - 1) + Ref(i) end -function _GtkTextIter(text::GtkTextBuffer, line::Integer, char_offset::Integer) - iter = Ref{_GtkTextIter}() - ccall((:gtk_text_buffer_get_iter_at_line_offset, libgtk4), Nothing, - (Ptr{GObject}, Ptr{_GtkTextIter}, Cint, Cint), text, iter, line - 1, char_offset - 1) - iter[] +function GtkTextIter(text::GtkTextBuffer, line::Integer, char_offset::Integer) + i = G_.get_iter_at_line_offset(text, line - 1, char_offset - 1) + Ref(i) end -function _GtkTextIter(text::GtkTextBuffer) - iter = Ref{_GtkTextIter}() - ccall((:gtk_text_buffer_get_start_iter, libgtk4), Nothing, - (Ptr{GObject}, Ptr{_GtkTextIter}), text, iter) - iter[] +function GtkTextIter(text::GtkTextBuffer) + i = G_.get_start_iter(text) + Ref(i) end -function _GtkTextIter(text::GtkTextBuffer, mark::GtkTextMark) - iter = Ref{_GtkTextIter}() - ccall((:gtk_text_buffer_get_iter_at_mark, libgtk4), Nothing, - (Ptr{GObject}, Ptr{_GtkTextIter}, Ptr{GObject}), text, iter, mark) - iter[] +function GtkTextIter(text::GtkTextBuffer, mark::GtkTextMark) + i = G_.get_iter_at_mark(text, mark) + Ref(i) end show(io::IO, iter::_GtkTextIter) = println("_GtkTextIter($(iter.offset) ))") -""" - buffer(iter::Union{Ref{_GtkTextIter}, _GtkTextIter}) - -Returns the buffer associated with `iter`. -""" -buffer(iter::TI) = convert(GtkTextBuffer, - ccall((:gtk_text_iter_get_buffer, libgtk4),Ptr{GtkTextBuffer},(Ref{_GtkTextIter},),iter) -) +#""" +# buffer(iter::Union{Ref{_GtkTextIter}, GtkTextIter}) +# +#Returns the buffer associated with `iter`. +#""" """ - char_offset(iter::Union{Ref{_GtkTextIter}, _GtkTextIter}) + char_offset(iter::Union{Ref{_GtkTextIter}, GtkTextIter}) Returns the offset of `iter` (one-based index). """ @@ -60,7 +49,7 @@ char_offset(iter::TI) = iter.offset+1 Base.cconvert(::Type{Ref{_GtkTextIter}}, it::_GtkTextIter) = Ref(it) Base.cconvert(::Type{Ref{_GtkTextIter}}, it::Ref{_GtkTextIter}) = Ref(it[]) -Base.convert(::Type{_GtkTextIter}, it::Ref{_GtkTextIter}) = _GtkTextIter(buffer(it), char_offset(it))#there's a -1 in the constructor +Base.convert(::Type{_GtkTextIter}, it::Ref{_GtkTextIter}) = GtkTextIter(buffer(it), char_offset(it))#there's a -1 in the constructor struct GtkTextRange <: AbstractRange{Char} a::Base.RefValue{_GtkTextIter} @@ -68,61 +57,54 @@ struct GtkTextRange <: AbstractRange{Char} GtkTextRange(a, b) = new(copy(a), copy(b)) end -#type GtkClipboard -#TODO -#end - ##### _GtkTextIter ##### #TODO: search function getproperty(text::TI, key::Symbol) Base.in(key, fieldnames(typeof(text))) && return getfield(text, key) - if isa(text,_GtkTextIter) - text = Ref(text) - end if key === :offset - ccall((:gtk_text_iter_get_offset, libgtk4), Cint, (Ptr{_GtkTextIter},), text) + G_.get_offset(text) elseif key === :line - ccall((:gtk_text_iter_get_line, libgtk4), Cint, (Ptr{_GtkTextIter},), text) + G_.get_line(text) elseif key === :line_offset - ccall((:gtk_text_iter_get_line_offset, libgtk4), Cint, (Ptr{_GtkTextIter},), text) + G_.get_line_offset(text) elseif key === :line_index - ccall((:gtk_text_iter_get_line_index, libgtk4), Cint, (Ptr{_GtkTextIter},), text) + G_.get_line_index(text) elseif key === :visible_line_index - ccall((:gtk_text_iter_get_visible_line_index, libgtk4), Cint, (Ptr{_GtkTextIter},), text) + G_.get_visible_line_index(text) elseif key === :visible_line_offset - ccall((:gtk_text_iter_get_visible_line_offset, libgtk4), Cint, (Ptr{_GtkTextIter},), text) + G_.get_visible_line_offset(text) elseif key === :marks - ccall((:gtk_text_iter_get_marks, libgtk4), Ptr{_GSList{GtkTextMark}}, (Ptr{_GtkTextIter},), text) # GtkTextMark iter + G_.get_marks(text) elseif key === :toggled_on_tags - ccall((:gtk_text_iter_get_toggled_tags, libgtk4), Ptr{_GSList{GtkTextTag}}, (Ptr{_GtkTextIter}, Cint), text, true) # GtkTextTag iter + G_.get_toggled_tags(text, true) elseif key === :toggled_off_tags - ccall((:gtk_text_iter_get_toggled_tags, libgtk4), Ptr{_GSList{GtkTextTag}}, (Ptr{_GtkTextIter}, Cint), text, false) # GtkTextTag iter + G_.get_toggled_tags(text, false) # elseif key === :child_anchor # convert(GtkTextChildAnchor, ccall((:gtk_text_iter_get_child_anchor, libgtk4), Ptr{GtkTextChildAnchor}, (Ptr{_GtkTextIter}, Cint), text, false)) elseif key === :can_insert - Bool(ccall((:gtk_text_iter_can_insert, libgtk4), Cint, (Ptr{_GtkTextIter}, Cint), text, true)) + G_.can_insert(text, true) elseif key === :starts_word - Bool(ccall((:gtk_text_iter_starts_word, libgtk4), Cint, (Ptr{_GtkTextIter},), text)) + G_.starts_word(text) elseif key === :ends_word - Bool(ccall((:gtk_text_iter_ends_word, libgtk4), Cint, (Ptr{_GtkTextIter},), text)) + G_.ends_word(text) elseif key === :inside_word - Bool(ccall((:gtk_text_iter_inside_word, libgtk4), Cint, (Ptr{_GtkTextIter},), text)) + G_.inside_word(text) elseif key === :starts_line - Bool(ccall((:gtk_text_iter_starts_line, libgtk4), Cint, (Ptr{_GtkTextIter},), text)) + G_.starts_line(text) elseif key === :ends_line - Bool(ccall((:gtk_text_iter_ends_line, libgtk4), Cint, (Ptr{_GtkTextIter},), text)) + G_.ends_line(text) elseif key === :starts_sentence - Bool(ccall((:gtk_text_iter_starts_sentence, libgtk4), Cint, (Ptr{_GtkTextIter},), text)) + G_.starts_sentence(text) elseif key === :ends_sentence - Bool(ccall((:gtk_text_iter_ends_sentence, libgtk4), Cint, (Ptr{_GtkTextIter},), text)) + G_.ends_sentence(text) elseif key === :inside_sentence - Bool(ccall((:gtk_text_iter_inside_sentence, libgtk4), Cint, (Ptr{_GtkTextIter},), text)) + G_.inside_sentence(text) elseif key === :is_cursor_position - Bool(ccall((:gtk_text_iter_is_cursor_position, libgtk4), Cint, (Ptr{_GtkTextIter},), text)) + G_.is_cursor_position(text) elseif key === :chars_in_line - ccall((:gtk_text_iter_get_chars_in_line, libgtk4), Cint, (Ptr{_GtkTextIter},), text) + G_.get_chars_in_line(text) elseif key === :bytes_in_line - ccall((:gtk_text_iter_get_bytes_in_line, libgtk4), Cint, (Ptr{_GtkTextIter},), text) + G_.get_bytes_in_line(text) # elseif key === :attributes # view = get_gtk_property(text, :view)::GtkTextView # attrs = get_gtk_property(view, :default_attributes)::GtkTextAttributes @@ -131,9 +113,9 @@ function getproperty(text::TI, key::Symbol) # elseif key === :language # ccall((:gtk_text_iter_get_language, libgtk4), Ptr{PangoLanguage}, (Ptr{_GtkTextIter}, Ptr{GtkTextAttributes}), text) elseif key === :is_end - Bool(ccall((:gtk_text_iter_is_end, libgtk4), Cint, (Ptr{_GtkTextIter},), text)) + G_.is_end(text) elseif key === :is_start - Bool(ccall((:gtk_text_iter_is_start, libgtk4), Cint, (Ptr{_GtkTextIter},), text)) + G_.is_start(text) elseif key === :char convert(Char, ccall((:gtk_text_iter_get_char, libgtk4), UInt32, (Ptr{_GtkTextIter},), text)) elseif key === :pixbuf @@ -144,20 +126,20 @@ function getproperty(text::TI, key::Symbol) end end -function setproperty!(text::Ref{_GtkTextIter}, key::Symbol, value) +function setproperty!(text::TI, key::Symbol, value) Base.in(key, fieldnames(typeof(text))) && return setfield!(text, key, value) if key === :offset - ccall((:gtk_text_iter_set_offset, libgtk4), Cint, (Ptr{_GtkTextIter}, Cint), text, value) + G_.set_offset(text, value) elseif key === :line - ccall((:gtk_text_iter_set_line, libgtk4), Cint, (Ptr{_GtkTextIter}, Cint), text, value) + G_.set_line(text, value) elseif key === :line_offset - ccall((:gtk_text_iter_set_line_offset, libgtk4), Cint, (Ptr{_GtkTextIter}, Cint), text, value) + G_.set_line_offset(text, value) elseif key === :line_index - ccall((:gtk_text_iter_set_line_index, libgtk4), Cint, (Ptr{_GtkTextIter}, Cint), text, value) + G_.set_line_index(text, value) elseif key === :visible_line_index - ccall((:gtk_text_iter_set_visible_line_index, libgtk4), Cint, (Ptr{_GtkTextIter}, Cint), text, value) + G_.set_visible_line_index(text, value) elseif key === :visible_line_offset - ccall((:gtk_text_iter_set_visible_line_offset, libgtk4), Cint, (Ptr{_GtkTextIter}, Cint), text, value) + G_.set_visible_line_offset(text, value) else @warn "_GtkTextIter doesn't have attribute with key $key" false @@ -165,16 +147,11 @@ function setproperty!(text::Ref{_GtkTextIter}, key::Symbol, value) return text end -Base.:(==)(lhs::TI, rhs::TI) = Bool(ccall((:gtk_text_iter_equal, libgtk4), - Cint, (Ref{_GtkTextIter}, Ref{_GtkTextIter}), lhs, rhs)) -Base.:(<)(lhs::TI, rhs::TI) = ccall((:gtk_text_iter_compare, libgtk4), Cint, - (Ref{_GtkTextIter}, Ref{_GtkTextIter}), lhs, rhs) < 0 -Base.:(<=)(lhs::TI, rhs::TI) = ccall((:gtk_text_iter_compare, libgtk4), Cint, - (Ref{_GtkTextIter}, Ref{_GtkTextIter}), lhs, rhs) <= 0 -Base.:(>)(lhs::TI, rhs::TI) = ccall((:gtk_text_iter_compare, libgtk4), Cint, - (Ref{_GtkTextIter}, Ref{_GtkTextIter}), lhs, rhs) > 0 -Base.:(>=)(lhs::TI, rhs::TI) = ccall((:gtk_text_iter_compare, libgtk4), Cint, - (Ref{_GtkTextIter}, Ref{_GtkTextIter}), lhs, rhs) >= 0 +Base.:(==)(lhs::TI, rhs::TI) = G_.equal(lhs, rhs) +Base.:(<)(lhs::TI, rhs::TI) = G_.compare(lhs, rhs) < 0 +Base.:(<=)(lhs::TI, rhs::TI) = G_.compare(lhs, rhs) <= 0 +Base.:(>)(lhs::TI, rhs::TI) = G_.compare(lhs, rhs) > 0 +Base.:(>=)(lhs::TI, rhs::TI) = G_.compare(lhs, rhs) >= 0 start_(iter::TI) = Ref(iter) iterate(::TI, iter=start_(iter)) = iter.is_end ? nothing : (iter.char, iter + 1) @@ -188,9 +165,7 @@ Base.:-(iter::TI, count::Integer) = (iter = copy(iter); skip(iter, -count); iter Moves `iter` `count` characters. Returns a Bool indicating if the move was successful. """ -Base.skip(iter::Ref{_GtkTextIter}, count::Integer) = - Bool(ccall((:gtk_text_iter_forward_chars, libgtk4), Cint, - (Ptr{_GtkTextIter}, Cint), iter, count)) +Base.skip(iter::TI, count::Integer) = G_.forward_chars(iter, count) """ skip(iter::Ref{_GtkTextIter}, what::Symbol) @@ -206,28 +181,21 @@ Operations are : * `:backward_sentence_start` (`gtk_text_iter_backward_sentence_start`) * `:forward_sentence_end` (`gtk_text_iter_forward_sentence_end`) """ -function Base.skip(iter::Ref{_GtkTextIter}, what::Symbol) +function Base.skip(iter::TI, what::Symbol) if what === :backward_line - Bool(ccall((:gtk_text_iter_backward_line, libgtk4), Cint, - (Ptr{_GtkTextIter},), iter)) + G_.backward_line(iter) elseif what === :forward_line - Bool(ccall((:gtk_text_iter_forward_line, libgtk4), Cint, - (Ptr{_GtkTextIter},), iter)) + G_.forward_line(iter) elseif what === :forward_to_line_end - Bool(ccall((:gtk_text_iter_forward_to_line_end, libgtk4), Cint, - (Ptr{_GtkTextIter},), iter)) + G_.forward_to_line_end(iter) elseif what === :forward_word_end - Bool(ccall((:gtk_text_iter_forward_word_end, libgtk4), Cint, - (Ptr{_GtkTextIter},), iter)) + G_.forward_word_end(iter) elseif what === :backward_word_start - Bool(ccall((:gtk_text_iter_backward_word_start, libgtk4), Cint, - (Ptr{_GtkTextIter},), iter)) + G_.backward_word_start(iter) elseif what === :backward_sentence_start - Bool(ccall((:gtk_text_iter_backward_sentence_start, libgtk4), Cint, - (Ptr{_GtkTextIter},), iter)) + G_.backward_sentence_start(iter) elseif what === :forward_sentence_end - Bool(ccall((:gtk_text_iter_forward_sentence_end, libgtk4), Cint, - (Ptr{_GtkTextIter},), iter)) + G_.forward_sentence_end(iter) else @warn "_GtkTextIter doesn't have iterator of type $what" false @@ -252,36 +220,27 @@ Operations are : * `:visible_lines` (`gtk_text_iter_forward_visible_lines`) * `:line_ends` (`gtk_text_iter_forward_visible_lines`) """ -function Base.skip(iter::Ref{_GtkTextIter}, count::Integer, what::Symbol) +function Base.skip(iter::TI, count::Integer, what::Symbol) if what === :char || what === :chars - Bool(ccall((:gtk_text_iter_forward_chars, libgtk4), Cint, - (Ptr{_GtkTextIter}, Cint), iter, count)) + G_.forward_chars(iter, count) elseif what === :line || what === :lines - Bool(ccall((:gtk_text_iter_forward_lines, libgtk4), Cint, - (Ptr{_GtkTextIter}, Cint), iter, count)) + G_.forward_lines(iter, count) elseif what === :word || what === :words - Bool(ccall((:gtk_text_iter_forward_word_ends, libgtk4), Cint, - (Ptr{_GtkTextIter}, Cint), iter, count)) + G_.forward_word_ends(iter, count) elseif what === :word_cursor_position || what === :word_cursor_positions - Bool(ccall((:gtk_text_iter_forward_cursor_positions, libgtk4), Cint, - (Ptr{_GtkTextIter}, Cint), iter, count)) + G_.forward_cursor_positions(iter, count) elseif what === :sentence || what === :sentences - Bool(ccall((:gtk_text_iter_forward_sentence_ends, libgtk4), Cint, - (Ptr{_GtkTextIter}, Cint), iter, count)) + G_.forward_sentence_ends(iter, count) elseif what === :visible_word || what === :visible_words - Bool(ccall((:gtk_text_iter_forward_visible_word_ends, libgtk4), Cint, - (Ptr{_GtkTextIter}, Cint), iter, count)) + G_.forward_visible_word_ends(iter, count) elseif what === :visible_cursor_position || what === :visible_cursor_positions - Bool(ccall((:gtk_text_iter_forward_visible_cursor_positions, libgtk4), Cint, - (Ptr{_GtkTextIter}, Cint), iter, count)) + G_.forward_visible_cursor_positions(iter, count) elseif what === :visible_line || what === :visible_lines - Bool(ccall((:gtk_text_iter_forward_visible_lines, libgtk4), Cint, - (Ptr{_GtkTextIter}, Cint), iter, count)) + G_.forward_visible_lines(iter, count) elseif what === :line_end || what === :line_ends count >= 0 || error("_GtkTextIter cannot iterate line_ends backwards") for i = 1:count - if !Bool(ccall((:gtk_text_iter_forward_visible_lines, libgtk4), Cint, - (Ptr{_GtkTextIter}, Cint), iter, count)) + if !G_.forward_visible_lines(iter,count) return false end end @@ -308,15 +267,15 @@ end Implements `gtk_text_iter_forward_search`. """ -function forward_search(iter::Ref{_GtkTextIter}, +function forward_search(iter::TI, str::AbstractString, start::Ref{_GtkTextIter}, stop::Ref{_GtkTextIter}, limit::Ref{_GtkTextIter}, flag) - Bool(ccall((:gtk_text_iter_forward_search, libgtk4), - Cint, - (Ptr{_GtkTextIter}, Ptr{UInt8}, Cuint, Ptr{_GtkTextIter}, Ptr{_GtkTextIter}, Ptr{_GtkTextIter}), - iter, string(str), flag, start, stop, limit - )) + found, start_out, stop_out = G_.forward_search(iter, str, flag, limit) + + start[] = start_out + stop[] = stop_out + found end """ @@ -326,20 +285,20 @@ end Implements `gtk_text_iter_backward_search`. """ -function backward_search(iter::Ref{_GtkTextIter}, +function backward_search(iter::TI, str::AbstractString, start::Ref{_GtkTextIter}, stop::Ref{_GtkTextIter}, limit::Ref{_GtkTextIter}, flag) - Bool(ccall((:gtk_text_iter_backward_search, libgtk4), - Cint, - (Ptr{_GtkTextIter}, Ptr{UInt8}, Cuint, Ptr{_GtkTextIter}, Ptr{_GtkTextIter}, Ptr{_GtkTextIter}), - iter, string(str), flag, start, stop, limit - )) + found, start_out, stop_out = G_.backward_search(iter, str, flag, limit) + + start[] = start_out + stop[] = stop_out + found end """ search(buffer::GtkTextBuffer, str::AbstractString, direction = :forward, - flag = GtkTextSearchFlags.GTK_TEXT_SEARCH_TEXT_ONLY) + flag = TextSearchFlags_TEXT_ONLY) Search text `str` in buffer in `direction` :forward or :backward starting from the cursor position in the buffer. @@ -348,17 +307,17 @@ Returns a tuple `(found, start, stop)` where `found` indicates whether the searc was successful and `start` and `stop` are _GtkTextIters containing the location of the match. """ function search(buffer::GtkTextBuffer, str::AbstractString, direction = :forward, - flag = Gtk4.TextSearchFlags_TEXT_ONLY) + flag = TextSearchFlags_TEXT_ONLY) - start = Ref(_GtkTextIter(buffer)) - stop = Ref(_GtkTextIter(buffer)) - iter = Ref(_GtkTextIter(buffer, buffer.cursor_position)) + start = GtkTextIter(buffer) + stop = GtkTextIter(buffer) + iter = GtkTextIter(buffer, buffer.cursor_position) if direction == :forward - limit = Ref(_GtkTextIter(buffer, length(buffer)+1)) + limit = GtkTextIter(buffer, length(buffer)+1) found = forward_search( iter, str, start, stop, limit, flag) elseif direction == :backward - limit = Ref(_GtkTextIter(buffer, 1)) + limit = GtkTextIter(buffer, 1) found = backward_search(iter, str, start, stop, limit, flag) else error("Search direction must be :forward or :backward.") @@ -399,7 +358,7 @@ function next_(r::GtkTextRange, i) skip(i, 1) (c,i) end -done_(r::GtkTextRange, i) = i[] == last(r) +done_(r::GtkTextRange, i) = i == last(r) iterate(r::GtkTextRange, i=start_(r)) = done_(r,i) ? nothing : next_(r, i) function getproperty(text::GtkTextRange, key::Symbol) @@ -407,38 +366,31 @@ function getproperty(text::GtkTextRange, key::Symbol) starttext = first(text) endtext = last(text) if key === :slice - bytestring(ccall((:gtk_text_iter_get_slice, libgtk4), Ptr{UInt8}, - (Ptr{_GtkTextIter}, Ptr{_GtkTextIter}), starttext, endtext)) + G_.get_slice(starttext, endtext) elseif key === :visible_slice - bytestring(ccall((:gtk_text_iter_get_visible_slice, libgtk4), Ptr{UInt8}, - (Ptr{_GtkTextIter}, Ptr{_GtkTextIter}), starttext, endtext)) + G_.get_visible_slice(starttext, endtext) elseif key === :text - bytestring(ccall((:gtk_text_iter_get_text, libgtk4), Ptr{UInt8}, - (Ptr{_GtkTextIter}, Ptr{_GtkTextIter}), starttext, endtext)) + G_.get_text(starttext, endtext) elseif key === :visible_text - bytestring(ccall((:gtk_text_iter_get_visible_text, libgtk4), Ptr{UInt8}, - (Ptr{_GtkTextIter}, Ptr{_GtkTextIter}), starttext, endtext)) + G_.get_visible_text(starttext, endtext) end end function splice!(text::GtkTextBuffer, index::GtkTextRange) - ccall((:gtk_text_buffer_delete, libgtk4), Nothing, - (Ptr{GObject}, Ref{_GtkTextIter}, Ref{_GtkTextIter}), text, first(index), last(index)) + G_.delete(text, first(index), last(index)) text end -in(x::TI, r::GtkTextRange) = Bool(ccall((:gtk_text_iter_in_range, libgtk4), Cint, - (Ptr{_GtkTextIter}, Ptr{_GtkTextIter}, Ptr{_GtkTextIter}), Ref(x), first(r), last(r))) +in(x::TI, r::GtkTextRange) = G_.in_range(x, first(r), last(r)) ##### GtkTextBuffer ##### #TODO: tags, marks #TODO: clipboard, selection/cursor, user_action_groups -iterate(text::GtkTextBuffer, iter=start_(_GtkTextIter(text))) = iterate(iter, iter) +iterate(text::GtkTextBuffer, iter=start_(GtkTextIter(text))) = iterate(iter, iter) length(text::GtkTextBuffer) = G_.get_char_count(text) #get_line_count(text::GtkTextBuffer) = ccall((:gtk_text_buffer_get_line_count, libgtk4), Cint, (Ptr{GObject},), text) function insert!(text::GtkTextBuffer, index::TI, str::AbstractString) - ccall((:gtk_text_buffer_insert, libgtk4), Nothing, - (Ptr{GObject}, Ptr{_GtkTextIter}, Ptr{UInt8}, Cint), text, Ref(index), bytestring(str), sizeof(str)) + G_.insert(text, index, str, sizeof(str)) text end function insert!(text::GtkTextBuffer, str::AbstractString) @@ -446,8 +398,7 @@ function insert!(text::GtkTextBuffer, str::AbstractString) text end function splice!(text::GtkTextBuffer, index::TI) - ccall((:gtk_text_buffer_backspace, libgtk4), Nothing, - (Ptr{GObject}, Ptr{_GtkTextIter}, Cint, Cint), text, Ref(index), false, true) + G_.backspace(text, index, false, true) text end function splice!(text::GtkTextBuffer) @@ -467,23 +418,20 @@ the selected text. Implements `gtk_text_buffer_get_selection_bounds`. """ function selection_bounds(buffer::GtkTextBuffer) - start = Ref(_GtkTextIter(buffer)) - stop = Ref(_GtkTextIter(buffer)) - selected = Bool(ccall((:gtk_text_buffer_get_selection_bounds,libgtk4), Cint, - (Ptr{GObject}, Ptr{_GtkTextIter}, Ptr{_GtkTextIter}), buffer, start, stop)) - return (selected, start, stop) + selected, start, stop = G_.get_selection_bounds(buffer) # returns the _GtkTextIter, not refs to it + return (selected, Ref(start), Ref(stop)) end """ select_range(buffer::GtkTextBuffer, ins::TI, bound::TI) select_range(buffer::GtkTextBuffer, range::GtkTextRange) -Select the text in `buffer` accorind to _GtkTextIter `ins` and `bound`. +Select the text in `buffer` according to _GtkTextIter `ins` and `bound`. Implements `gtk_text_buffer_select_range`. """ function select_range(buffer::GtkTextBuffer, ins::TI, bound::TI) - ccall((:gtk_text_buffer_select_range, libgtk4), Cvoid, (Ptr{GObject}, Ref{_GtkTextIter}, Ref{_GtkTextIter}), buffer, ins, bound) + G_.select_range(buffer, ins, bound) end select_range(buffer::GtkTextBuffer, range::GtkTextRange) = select_range(buffer, range.a, range.b) @@ -493,10 +441,8 @@ select_range(buffer::GtkTextBuffer, range::GtkTextRange) = select_range(buffer, Place the cursor at indicated position. """ -place_cursor(buffer::GtkTextBuffer, it::_GtkTextIter) = - ccall((:gtk_text_buffer_place_cursor, libgtk4), Cvoid, (Ptr{GObject}, Ref{_GtkTextIter}), buffer, it) -place_cursor(buffer::GtkTextBuffer, pos::Int) = place_cursor(buffer, _GtkTextIter(buffer, pos)) -place_cursor(buffer::GtkTextBuffer, it::Ref{_GtkTextIter}) = place_cursor(buffer, it[]) +place_cursor(buffer::GtkTextBuffer, pos::Int) = place_cursor(buffer, GtkTextIter(buffer, pos)) +place_cursor(buffer::GtkTextBuffer, it::TI) = G_.place_cursor(buffer, it) begin_user_action(buffer::GtkTextBuffer) = G_.begin_user_action(buffer) end_user_action(buffer::GtkTextBuffer) = G_.end_user_action(buffer) @@ -522,21 +468,15 @@ function create_tag(buffer::GtkTextBuffer, tag_name::AbstractString; properties. end function apply_tag(buffer::GtkTextBuffer, name::AbstractString, itstart::TI, itend::TI) - ccall((:gtk_text_buffer_apply_tag_by_name, libgtk4), Nothing, - (Ptr{GObject}, Ptr{UInt8}, Ref{_GtkTextIter}, Ref{_GtkTextIter}), - buffer, bytestring(name), itstart, itend) + G_.apply_tag_by_name(buffer, name, itstart, itend) end function remove_tag(buffer::GtkTextBuffer, name::AbstractString, itstart::TI, itend::TI) - ccall((:gtk_text_buffer_remove_tag_by_name, libgtk4), Nothing, - (Ptr{GObject}, Ptr{UInt8}, Ref{_GtkTextIter}, Ref{_GtkTextIter}), - buffer, bytestring(name), itstart, itend) + G_.remove_tag_by_name(buffer, name, itstart, itend) end function remove_all_tags(buffer::GtkTextBuffer, itstart::TI, itend::TI) - ccall((:gtk_text_buffer_remove_all_tags, libgtk4), Nothing, - (Ptr{GObject}, Ref{_GtkTextIter}, Ref{_GtkTextIter}), - buffer, itstart, itend) + G_.remove_all_tags(buffer, itstart, itend) end """ @@ -578,18 +518,13 @@ function getindex(text::GtkTextView, sym::Symbol, ::Type{Bool}) end function insert!(text::GtkTextView, index::TI, child::GtkWidget) - index = Ref(index) - anchor = ccall((:gtk_text_buffer_create_child_anchor, libgtk4), Ptr{Nothing}, - (Ptr{GObject}, Ptr{_GtkTextIter}), G_.get_buffer(text), index) - ccall((:gtk_text_view_add_child_at_anchor, libgtk4), Nothing, - (Ptr{GObject}, Ptr{GObject}, Ptr{_GtkTextIter}), text, index, anchor) + anchor = G_.create_child_anchor(G_.get_buffer(text), index) + G_.add_child_at_anchor(text, child, anchor) text end function insert!(text::GtkTextView, index::TI, str::AbstractString) - Bool(ccall((:gtk_text_buffer_insert_interactive, libgtk4), Cint, - (Ptr{GObject}, Ptr{_GtkTextIter}, Ptr{UInt8}, Cint, Cint), - G_.get_buffer(text), index, bytestring(str), sizeof(str), G_.get_editable(text))) + G_.insert_interactive(G_.get_buffer(text), index, str, sizeof(str), G_.get_editable(text)) text end function insert!(text::GtkTextView, str::AbstractString) @@ -597,9 +532,7 @@ function insert!(text::GtkTextView, str::AbstractString) text end function splice!(text::GtkTextView, index::TI) - ccall((:gtk_text_buffer_backspace, libgtk4), Nothing, - (Ptr{GObject}, Ptr{_GtkTextIter}, Cint, Cint), - G_.get_buffer(text), Ref(index), true, G_.get_editable(text)) + G_.backspace(G_.get_buffer(text), index, true, G_.get_editable(text)) text end function splice!(text::GtkTextView) @@ -623,9 +556,8 @@ end function scroll_to(view::GtkTextView, iter::TI, within_margin::Real, use_align::Bool, xalign::Real, yalign::Real) - ccall((:gtk_text_view_scroll_to_iter, libgtk4), Nothing, - (Ptr{GObject}, Ptr{_GtkTextIter}, Cdouble, Cint, Cdouble, Cdouble), - view, iter, within_margin, use_align, xalign, yalign) + G_.scroll_to_iter(view, iter, within_margin, use_align, xalign, yalign) + nothing end @@ -635,7 +567,7 @@ end Implements `gtk_text_view_buffer_to_window_coords`. """ function buffer_to_window_coords(view::GtkTextView, buffer_x::Integer, buffer_y::Integer, wintype = TextWindowType_WIDGET) - G_.buffer_to_window_coords(view, wintype, buffer_x, buffer_y) + G_.buffer_to_window_coords(view, wintype, buffer_x, buffer_y) end """ @@ -654,31 +586,58 @@ Implements `gtk_text_view_get_iter_at_position`. """ function text_iter_at_position(view::GtkTextView, x::Integer, y::Integer) buffer = view.buffer - iter = Ref(_GtkTextIter(buffer)) - text_iter_at_position(view, iter, C_NULL, Int32(x), Int32(y)) - return _GtkTextIter(buffer, char_offset(iter)) + iter = GtkTextIter(buffer) + text_iter_at_position(view, iter, nothing, Int32(x), Int32(y)) + return GtkTextIter(buffer, char_offset(iter)) end -text_iter_at_position(view::GtkTextView, iter::Ref{_GtkTextIter}, trailing, x::Int32, y::Int32) = ccall( - (:gtk_text_view_get_iter_at_position, libgtk4), Cvoid, - (Ptr{GObject}, Ptr{_GtkTextIter}, Ptr{Cint}, Cint, Cint), - view, iter, trailing, x, y -) +function text_iter_at_position(view::GtkTextView, iter::Ref{_GtkTextIter}, trailing, x::Int32, y::Int32) + ret, iter_ret, trailing_ret = G_.get_iter_at_position(view, x, y) + iter[] = iter_ret + if trailing !== nothing + trailing[] = trailing_ret + end +end function cursor_locations(view::GtkTextView) weak = Ref{_GdkRectangle}() strong = Ref{_GdkRectangle}() buffer = view.buffer - iter = Ref(_GtkTextIter(buffer, buffer.cursor_position)) + iter = GtkTextIter(buffer, buffer.cursor_position) + + string, weak = G_.get_cursor_locations(view, iter) + return (iter, strong, weak) +end + +function convert(::Type{Gtk4.TextWindowType}, x::Symbol) + if x === :left + Gtk4.TextWindowType_LEFT + elseif x === :right + Gtk4.TextWindowType_RIGHT + elseif x === :top + Gtk4.TextWindowType_TOP + elseif x === :bottom + Gtk4.TextWindowType_BOTTOM + elseif x === :widget + Gtk4.TextWindowType_WIDGET + elseif x === :text + Gtk4.TextWindowType_TEXT + else + error("can't convert $x to GtkTextWindowType") + end +end - ccall( - (:gtk_text_view_get_cursor_locations, libgtk4), Cvoid, - (Ptr{GObject}, Ptr{_GtkTextIter}, Ptr{_GdkRectangle}, Ptr{_GdkRectangle}), - view, iter, strong, weak - ) - return (iter, strong[], weak[]) +function gutter(view::GtkTextView, type::TextWindowType, widget::GtkWidget) + G_.set_gutter(view, type, widget) end +function gutter(view::GtkTextView, type::Symbol, widget::GtkWidget) + G_.set_gutter(view, convert(TextWindowType, type), widget) +end + +gutter(view::GtkTextView, type::TextWindowType) = G_.get_gutter(view, type) +gutter(view::GtkTextView, type::Symbol) = G_.get_gutter(view, type) + #### GtkTextMark #### show(w::GtkTextMark) = visible(w, true) diff --git a/src/windows.jl b/src/windows.jl index ddeb20c3..615562c9 100644 --- a/src/windows.jl +++ b/src/windows.jl @@ -1,10 +1,11 @@ @doc """ GtkWindow(title::Union{Nothing, AbstractString}, w::Real = -1, h::Real = -1, resizable::Bool = true, show_window::Bool = true) -Create an empty `GtkWindow` with a title. A default width and height can be -provided with `w` and `h`. If `resizable` is false, the window will have a -fixed size `w` and `h`. If `show_window` is false, the window will be initially -invisible. +Create an empty `GtkWindow` with a title. A default width and height can be provided with +`w` and `h`. If `resizable` is false, the window will have a fixed size `w` and `h`. If +`show_window` is false, the window will be initially invisible. + +GTK docs: [`GtkWindow`]($(gtkdoc_struc_url("gtk4","Window"))) """ function GtkWindow(title::Union{Nothing, AbstractString}, w::Real = -1, h::Real = -1, resizable::Bool = true, show_window::Bool = true) win = G_.Window_new() @@ -42,8 +43,10 @@ default_size(win::GtkWindow, w, h) = G_.set_default_size(win, w, h) """ isactive(win::GtkWindow) -Returns whether `win` is the currently active toplevel. This is the window that -receives keystrokes. +Returns whether `win` is the currently active toplevel. This is the window that receives +keystrokes. + +Related GTK function: [`gtk_window_is_active`()]($(gtkdoc_method_url("gtk4","Window","is_active"))) """ isactive(win::GtkWindow) = G_.is_active(win) @@ -61,34 +64,23 @@ end """ close(win::GtkWindow) -Request that `win` is closed. +Request that `win` be closed. Related GTK function: [`gtk_window_close`()]($(gtkdoc_method_url("gtk4","Window","close"))) """ close(w::GtkWindow) = G_.close(w) """ - fullscreen(win::GtkWindow) + fullscreen(win::GtkWindow [, mon::GdkMonitor]) -Set `win` to fullscreen mode. +Set `win` to fullscreen mode, optionally on a particular monitor `mon.` The windowing +system (outside GTK's control) may not allow this, so it may not work on some platforms. See also [`unfullscreen`](@ref). -Related GTK function: [`gtk_window_fullscreen`()]($(gtkdoc_method_url("gtk4","Window","fullscreen"))) +Related GTK functions: [`gtk_window_fullscreen`()]($(gtkdoc_method_url("gtk4","Window","fullscreen"))), [`gtk_window_fullscreen_on_monitor`()]($(gtkdoc_method_url("gtk4","Window","fullscreen_on_monitor"))) """ fullscreen(win::GtkWindow) = G_.fullscreen(win) - -""" - fullscreen(win::GtkWindow, mon::GdkMonitor) - -Set `win` to fullscreen mode on a particular monitor `mon.` The windowing -system (outside GTK's control) may not allow this, so it may not work on some -platforms. - -See also [`unfullscreen`](@ref). - -Related GTK function: [`gtk_window_fullscreen_on_monitor`()]($(gtkdoc_method_url("gtk4","Window","fullscreen_on_monitor"))) -""" fullscreen(win::GtkWindow, mon::GdkMonitor) = G_.fullscreen_on_monitor(win, mon) """ @@ -145,8 +137,7 @@ Related GTK function: [`gtk_window_unmaximize`()]($(gtkdoc_method_url("gtk4","Wi unmaximize(win::GtkWindow) = G_.unmaximize(win) """ - present(win::GtkWindow) - present(win::GtkWindow, timestamp) + present(win::GtkWindow [, timestamp]) Presents a window to the user. Usually means move it to the front. @@ -188,6 +179,8 @@ end Create an empty `GtkApplicationWindow` for a `GtkApplication` app and a title. Keyword arguments can be used to set GObject properties. + +GTK docs: [`GtkApplicationWindow`]($(gtkdoc_struc_url("gtk4","ApplicationWindow"))) """ function GtkApplicationWindow(app::GtkApplication, title::AbstractString; kwargs...) win = GtkApplicationWindow(app; kwargs...) @@ -204,57 +197,28 @@ push!(hb::GtkHeaderBar, w::GtkWidget) = (G_.pack_end(hb, w); hb) pushfirst!(hb::GtkHeaderBar, w::GtkWidget) = (G_.pack_start(hb, w); hb) delete!(hb::GtkHeaderBar, w::GtkWidget) = (G_.remove(hb, w); hb) -## GtkDialog - -function push!(d::GtkDialog, s::AbstractString, response) - G_.add_button(d, s, Int32(response)) - d -end - -function response(widget::GtkDialog, response_id) - G_.response(widget, Int32(response_id)) -end - -function GtkDialog(title::AbstractString, buttons, flags, parent = nothing; kwargs...) - parent = (parent === nothing ? C_NULL : parent) - w = GtkDialogLeaf(ccall((:gtk_dialog_new_with_buttons, libgtk4), Ptr{GObject}, - (Ptr{UInt8}, Ptr{GObject}, Cint, Ptr{Nothing}), - title, parent, flags, C_NULL)) - GLib.setproperties!(w; kwargs...) - for (k, v) in buttons - push!(w, k, v) - end - w -end - -function GtkMessageDialog(message::AbstractString, buttons, flags, typ, parent = nothing; kwargs...) - parent = (parent === nothing ? C_NULL : parent) - w = GtkMessageDialogLeaf(ccall((:gtk_message_dialog_new, libgtk4), Ptr{GObject}, - (Ptr{GObject}, Cuint, Cint, Cint, Ptr{UInt8}), - parent, flags, typ, ButtonsType_NONE, message)) - GLib.setproperties!(w; kwargs...) - for (k, v) in buttons - push!(w, k, v) - end - w -end - """ - ask_dialog(question::AbstractString, parent = nothing; timeout = -1) + ask_dialog(callback::Function, question::AbstractString, parent = nothing) + ask_dialog(question::AbstractString, parent = nothing) -Create a dialog with a message `question` and two buttons "No" and "Yes". Returns `true` if -"Yes" is selected and `false` if "No" is selected or the dialog (or its parent window -`parent`) is closed. The optional input `timeout` (disabled by default) can be used to set -a time in seconds after which the dialog will close and `false` will be returned. -""" -ask_dialog(question::AbstractString, parent = nothing; timeout = -1) = - ask_dialog(question, "No", "Yes", parent; timeout = timeout) +Create a dialog with a `question` and two buttons "No" and "Yes". The form with a +`callback` function argument is intended for use in GUI callbacks, while the form without +`callback` is only useful in interactive scripts. If `callback` is provided, it should take +a single boolean argument. This function is called with `true` if "Yes" is selected and +`false` if "No" is selected or the dialog is closed. Passing in a `parent` window is +strongly recommended. The dialog will appear in front of the parent window by default. -function ask_dialog(message::AbstractString, no_text, yes_text, parent = nothing; timeout = -1) +Keyword arguments: +- `timeout = -1` to set a time in seconds after which the dialog will close and `false` will be returned. Disabled if negative. +- `no_text = "No"` to change the text for the response that produces `false`. +- `yes_text = "Yes"` to change the text for the response that produces `true`. +- `modal = true` sets whether the dialog is modal (i.e. stays on top of its parent window) +""" +function ask_dialog(question::AbstractString, parent = nothing; timeout = -1, no_text = "No", yes_text = "Yes") res = Ref{Bool}(false) c = Condition() - ask_dialog(message, no_text, yes_text, parent; timeout) do res_ + ask_dialog(question, parent; timeout, no_text, yes_text) do res_ res[] = res_ notify(c) end @@ -262,85 +226,93 @@ function ask_dialog(message::AbstractString, no_text, yes_text, parent = nothing return res[] end -function ask_dialog(callback::Function, message::AbstractString, no_text, yes_text, parent = nothing; timeout = -1) - dlg = GtkMessageDialog(message, ((no_text, ResponseType_NO), (yes_text, ResponseType_YES)), - DialogFlags_DESTROY_WITH_PARENT, MessageType_QUESTION, parent) - - function on_response(dlg, response_id) - callback(response_id == Int32(ResponseType_YES)) - G_.set_transient_for(dlg, nothing) - destroy(dlg) - end - - signal_connect(on_response, dlg, "response") - show(dlg) - - if timeout > 0 - emit(timer) = response(dlg, Gtk4.ResponseType_NO) - Timer(emit, timeout) +function ask_dialog(callback::Function, question::AbstractString, parent = nothing; timeout = -1, no_text = "No", yes_text = "Yes", modal = true) + dlg = GtkAlertDialog(question; modal = modal) + G_.set_buttons(dlg, [no_text, yes_text]) + + cancellable = GLib.cancel_after_delay(timeout) + choose(dlg, parent, cancellable) do dlg, resobj + res = try + choose_finish(dlg, resobj) + catch e + if !isa(e, Gtk4.GLib.GErrorException) + rethrow(e) + end + 0 + end + callback(Bool(res)) end return dlg end """ - info_dialog(message::AbstractString, parent = nothing; timeout = -1) + info_dialog(callback::Function, message::AbstractString, parent = nothing) + info_dialog(message::AbstractString, parent = nothing) -Create a dialog with an informational message `message`. Returns when the dialog (or its -parent window `parent`) is closed. The optional input `timeout` (disabled by default) can be -used to set a time in seconds after which the dialog will close and `false` will be -returned. -""" info_dialog +Create a dialog that displays an informational `message`. The form with a `callback` +function argument is intended for use in GUI callbacks, while the form without `callback` +is only useful in interactive scripts. If `callback` is provided, it should take no +arguments. This function is called when the user closes the dialog. If `callback` is not +provided, this function returns when the dialog is closed. Passing in a `parent` window +is strongly recommended. The dialog will appear in front of the parent window by default. -for (func, flag) in ( - (:info_dialog, :(MessageType_INFO)), - (:warn_dialog, :(MessageType_WARNING)), - (:error_dialog, :(MessageType_ERROR))) - @eval function $func(message::AbstractString, parent = nothing; timeout = -1) - res = Ref{String}("") - c = Condition() +Keyword arguments: +- `timeout = -1` to set a time in seconds after which the dialog will close and `false` will be returned. Disabled if negative. +- `modal = true` sets whether the dialog is modal (i.e. stays on top of its parent window) +""" info_dialog - $func(message, parent; timeout) do - notify(c) - end - wait(c) - return +function info_dialog(message::AbstractString, parent = nothing; timeout = -1) + c = Condition() + + info_dialog(message, parent; timeout) do + notify(c) end - - @eval function $func(callback::Function, message::AbstractString, parent = nothing; timeout = -1) - dlg = GtkMessageDialog(message, (("Close",0),), DialogFlags_DESTROY_WITH_PARENT, $flag, parent) - - function destroy_dialog(dlg, response_id) - callback() - G_.set_transient_for(dlg, nothing) - destroy(dlg) - end - - signal_connect(destroy_dialog, dlg, "response") - show(dlg) - - if timeout > 0 - emit(timer) = response(dlg, Gtk4.ResponseType_CANCEL) - Timer(emit, timeout) + wait(c) + return +end + +function info_dialog(callback::Function, message::AbstractString, parent = nothing; timeout = -1, modal = true) + dlg = GtkAlertDialog(message; modal = modal) + + function cb(dlg, resobj) + try + Gtk4.choose_finish(dlg, resobj) + catch e + if !isa(e, Gtk4.GLib.GErrorException) + rethrow(e) + end end - - return dlg + callback() end + + cancellable = GLib.cancel_after_delay(timeout) + choose(cb, dlg, parent, cancellable) + + return dlg end """ - input_dialog(message::AbstractString, entry_default::AbstractString, buttons = (("Cancel", 0), ("Accept", 1)), parent = nothing; timeout = -1) + input_dialog(callback::Function, message::AbstractString, entry_default::AbstractString, parent = nothing) + input_dialog(message::AbstractString, entry_default::AbstractString, parent = nothing) -Create a dialog with a message `message` and a text entry. Returns the string in the entry -when the "Accept" button is pressed, or `entry_default` if "Cancel" is pressed or the dialog -or its parent window `parent` is closed. The optional input `timeout` (disabled by default) -can be used to set a time in seconds after which the dialog will close and `entry_default` -will be returned. +Create a dialog with a `message` and a text entry. The form with a `callback` function +argument is intended for use in GUI callbacks, while the form without `callback` is only +useful in interactive scripts. If `callback` is provided, it should be a function that +takes a single `String` argument. When the "Accept" button is pressed, the callback +function is called with the user's input text. If "Cancel" is pressed (or the dialog or its +parent window `parent` is closed), `entry_default` will be passed to the callback. If no +callback function is provided, the string from the dialog is returned. Passing in a +`parent` window is strongly recommended. The dialog will appear in front of the parent +window by default. + +Keyword arguments: +- `timeout = -1` to set a time in seconds after which the dialog will close and `false` will be returned. Disabled if negative. """ -function input_dialog(message::AbstractString, entry_default::AbstractString, buttons = (("Cancel", 0), ("Accept", 1)), parent = nothing; timeout = -1) +function input_dialog(message::AbstractString, entry_default::AbstractString, parent = nothing; timeout = -1) res = Ref{String}("") c = Condition() - input_dialog(message, entry_default, buttons, parent; timeout) do res_ + input_dialog(message, entry_default, parent; timeout) do res_ res[] = res_ notify(c) end @@ -348,31 +320,44 @@ function input_dialog(message::AbstractString, entry_default::AbstractString, bu return res[] end +function _callback_and_destroy(dlg, callback, txt) + callback(txt) + G_.set_transient_for(dlg, nothing) + destroy(dlg) +end + function input_dialog(callback::Function, message::AbstractString, entry_default::AbstractString, - buttons = (("Cancel", 0), ("Accept", 1)), parent = nothing; timeout = -1) - dlg = GtkMessageDialog(message, buttons, DialogFlags_DESTROY_WITH_PARENT, MessageType_INFO, parent) - box = content_area(dlg) - entry = GtkEntry() + parent = nothing; timeout = -1) + dlg = GtkWindow() + box = GtkBox(:v) + push!(box, GtkLabel(message)) + entry = GtkEntry(; activates_default = true) entry.text = entry_default push!(box, entry) - - function on_response(dlg, response_id) - if response_id == 1 - res = text(GtkEditable(entry)) - else - res = "" - end - callback(res) - G_.set_transient_for(dlg, nothing) - destroy(dlg) + boxb = GtkBox(:h) + push!(box, boxb) + accept = GtkButton("Accept"; hexpand = true) + default_widget(dlg, accept) + cancel = GtkButton("Cancel"; hexpand = true) + push!(boxb, cancel) + push!(boxb, accept) + isnothing(parent) && (G_.set_transient_for(dlg, parent); G_.set_modal(dlg, true)) + dlg[] = box + + signal_connect(cancel, "clicked") do b + _callback_and_destroy(dlg, callback, entry_default) + end + + signal_connect(accept, "clicked") do b + _callback_and_destroy(dlg, callback, text(GtkEditable(entry))) end - signal_connect(on_response, dlg, "response") show(dlg) if timeout > 0 - emit(timer) = response(dlg, 0) - Timer(emit, timeout) + Timer(timeout) do timer + _callback_and_destroy(dlg, callback, entry_default) + end end return dlg end @@ -452,14 +437,23 @@ hide(d::GtkNativeDialog) = G_.hide(d) destroy(d::GtkNativeDialog) = G_.destroy(d) """ - open_dialog(title::AbstractString, parent = nothing, filters::Union{AbstractVector, Tuple} = String[]; timeout = -1, multiple = false, start_folder = "") + open_dialog(callback::Function, title::AbstractString, parent = nothing, filters::Union{AbstractVector, Tuple} = String[]) + open_dialog(title::AbstractString, parent = nothing, filters::Union{AbstractVector, Tuple} = String[]) -Create a dialog for choosing a file or folder to be opened. Returns the path chosen by the user, or "" if "Cancel" is pressed or the dialog or its parent window `parent` is closed. The dialog title is set using `title`. The argument `filters` can be used to show only directory contents that match certain file extensions. +Create a dialog for choosing a file or folder to be opened. The form with a `callback` +function argument is intended for use in GUI callbacks, while the form without `callback` +is only useful in interactive scripts. If `callback` is provided, it should be a function +that takes a single `String` argument (or a vector of strings if `multiple` is set to +true). The `callback` is called with the file path chosen by the user or "" if "Cancel" is +pressed. The dialog title is set using `title`. Passing in a `parent` window is strongly +recommended. The dialog will appear in front of the parent window by default. The argument +`filters` can be used to show only directory contents that match certain file extensions. Keyword arguments: -`timeout`: The optional input `timeout` (disabled by default) can be used to set a time in seconds after which the dialog will close and "" will be returned. -`multiple`: if `true`, multiple files can be selected, and a list of file paths is returned rather than a single path. -`start_folder`: if set, the dialog will start out browsing a particular folder. Otherwise GTK will decide. +- `timeout = -1` to set a time in seconds after which the dialog will close and `false` will be returned. Disabled if negative. +- `multiple = false`: if `true`, multiple files can be selected, and an array of file paths is returned rather than a single path. +- `select_folder = false`: set to `true` to allow the user to select a folder rather than a file. +- `start_folder = ""`: if set to a path, the dialog will start out browsing a particular folder. Otherwise GTK will decide. """ function open_dialog(title::AbstractString, parent = nothing, filters::Union{AbstractVector, Tuple} = String[]; timeout = -1, multiple = false, select_folder = false, start_folder = "") res = Ref{String}("") @@ -498,20 +492,28 @@ function open_dialog(callback::Function, title::AbstractString, parent = nothing show(dlg) if timeout > 0 - emit(timer) = on_response(dlg, Int32(Gtk4.ResponseType_CANCEL)) + emit(timer) = on_response(dlg, Int32(ResponseType_CANCEL)) Timer(emit, timeout) end return dlg end """ - save_dialog(title::AbstractString, parent = nothing, filters::Union{AbstractVector, Tuple} = String[]; timeout = -1, start_folder = "") + save_dialog(callback::Function, title::AbstractString, parent = nothing, filters::Union{AbstractVector, Tuple} = String[]) + save_dialog(title::AbstractString, parent = nothing, filters::Union{AbstractVector, Tuple} = String[]) -Create a dialog for choosing a file to be saved to. Returns the path chosen by the user, or "" if "Cancel" is pressed or the dialog or its parent window `parent` is closed. The window title is set using `title`. The argument `filters` can be used to show only directory contents that match certain file extensions. +Create a dialog for choosing a file to be saved to. The form with a `callback` function +argument is intended for use in GUI callbacks, while the form without `callback` is only +useful in interactive scripts. If `callback` is provided, it should be a function that +takes a single `String` argument. The `callback` is called with the file path chosen by the +user or "" if "Cancel" is pressed. The window title is set using `title`. Passing in a +`parent` window is strongly recommended. The dialog will appear in front of the parent +window by default. The argument `filters` can be used to show only directory contents that +match certain file extensions. Keyword arguments: -`timeout`: The optional input `timeout` (disabled by default) can be used to set a time in seconds after which the dialog will close and "" will be returned. -`start_folder`: if set, the dialog will start out browsing a particular folder. Otherwise GTK will decide. +- `timeout = -1` to set a time in seconds after which the dialog will close and `false` will be returned. Disabled if negative. +- `start_folder = ""`: if set, the dialog will start out browsing a particular folder. Otherwise GTK will decide. """ function save_dialog(title::AbstractString, parent = nothing, filters::Union{AbstractVector, Tuple} = String[]; timeout = -1, start_folder = "") res = Ref{String}("") @@ -561,7 +563,7 @@ end ## Other chooser dialogs function color_dialog(title::AbstractString, parent = nothing; timeout=-1) - color = Ref{Union{Nothing,_GdkRGBA}}() + color = Ref{Union{Nothing,GdkRGBA}}() c = Condition() color_dialog(title, parent; timeout) do col @@ -572,39 +574,46 @@ function color_dialog(title::AbstractString, parent = nothing; timeout=-1) return color[] end -function color_dialog(callback::Function, title::AbstractString, parent = nothing; timeout=-1) - dlg = GtkColorChooserDialog(title, parent) +function color_dialog(callback::Function, title::AbstractString, parent = nothing; timeout=-1, initial_color = nothing) + dlg = GtkColorDialog() + G_.set_title(dlg, title) - function on_response(dlg, response_id) - dlgp = GtkColorChooser(dlg) - if unsafe_trunc(UInt16, response_id) == ResponseType_OK - res = G_.get_rgba(dlgp) - else - res = nothing + function cb(dlg, resobj) + rgba = try + Gtk4.G_.choose_rgba_finish(dlg, GAsyncResult(resobj)) + catch e + if !isa(e, Gtk4.GLib.GErrorException) + rethrow(e) + end + nothing end - callback(res) - G_.set_transient_for(dlg, nothing) - destroy(dlg) + callback(rgba) end - signal_connect(on_response, dlg, "response") - show(dlg) + cancellable = GLib.cancel_after_delay(timeout) + G_.choose_rgba(dlg, parent, initial_color, cancellable, cb) - if timeout > 0 - emit(timer) = response(dlg, Gtk4.ResponseType_CANCEL) - Timer(emit, timeout) - end return dlg end ## New dialogs (new in GTK 4.10) -function GtkAlertDialog(message::AbstractString) +function GtkAlertDialog(message::AbstractString; kwargs...) ptr = ccall((:gtk_alert_dialog_new, libgtk4), Ptr{GObject}, (Ptr{UInt8},), message) - GtkAlertDialogLeaf(ptr, true) + d = GtkAlertDialogLeaf(ptr, true) + GLib.setproperties!(d; kwargs...) + d end show(dlg::GtkAlertDialog, parent=nothing) = G_.show(dlg, parent) +function choose(cb, dlg::GtkAlertDialog, parent = nothing, cancellable = nothing) + G_.choose(dlg, parent, cancellable, cb) +end +function choose_finish(dlg, resobj) + G_.choose_finish(dlg, GAsyncResult(resobj)) +end + +### New file dialogs function _path_finish(f, dlg, resobj) gfile = f(dlg, Gtk4.GLib.GAsyncResult(resobj)) diff --git a/test/gdkpixbuf.jl b/test/gdkpixbuf.jl index f0a712f2..5faf6183 100644 --- a/test/gdkpixbuf.jl +++ b/test/gdkpixbuf.jl @@ -9,6 +9,8 @@ using Test, Gtk4, Gtk4.GdkPixbufLib, Colors, TestImages t2 = GdkMemoryTexture(img,false) @test size(t2) == size(img) + arr = Gtk4.toarray(t2) + @test size(arr) == size(img) end @testset "pixbuf" begin diff --git a/test/gui/canvas.jl b/test/gui/canvas.jl index bee5572b..8b2748be 100644 --- a/test/gui/canvas.jl +++ b/test/gui/canvas.jl @@ -10,7 +10,8 @@ gs = GtkEventControllerScroll(Gtk4.EventControllerScrollFlags_VERTICAL,c) gk = GtkEventControllerKey(c) ggc = GtkGestureClick(c) ggd = GtkGestureDrag(c) -gsc = GtkShortcutController(c) + gsc = GtkShortcutController(c) + Gtk4.add_action_shortcut(gsc,"S","win.copy") ggz = GtkGestureZoom(c) t = Gtk4.find_controller(c,GtkEventControllerMotion) @test t==gm diff --git a/test/gui/dialogs.jl b/test/gui/dialogs.jl index b3af6eb2..df57abb6 100644 --- a/test/gui/dialogs.jl +++ b/test/gui/dialogs.jl @@ -19,10 +19,6 @@ main_window = GtkWindow("Dialog example") info_dialog("Here's some information", main_window; timeout = 0.25) sleep(1.0) -warn_dialog("Here's some alarming information", main_window; timeout = 0.25) -sleep(1.0) -error_dialog("Here's an error", main_window; timeout = 0.25) -sleep(1.0) GC.gc() sleep(1.0) close(main_window) @@ -46,7 +42,7 @@ color_dialog("What is your favorite color?", main_window; timeout = 0.25) sleep(1.0) -input_dialog("What is the meaning of life, the universe, and everything?", "42", (("Cancel", 0), ("Accept", 1)), main_window; timeout = 0.25) +input_dialog("Whadya know?", "Not much, you?", main_window; timeout = 0.25) sleep(1.0) diff --git a/test/gui/examples.jl b/test/gui/examples.jl index 7ac20f34..1c6716e2 100644 --- a/test/gui/examples.jl +++ b/test/gui/examples.jl @@ -66,4 +66,13 @@ end destroy(main_window) end + @testset "Show Image" begin + include(joinpath(@__DIR__, "..", "..", "examples", "show_image.jl")) + destroy(win) + end + + @testset "CSS Style" begin + include(joinpath(@__DIR__, "..", "..", "examples", "css-style.jl")) + end + end diff --git a/test/gui/input.jl b/test/gui/input.jl index 1530c307..f503df0a 100644 --- a/test/gui/input.jl +++ b/test/gui/input.jl @@ -7,7 +7,7 @@ Gtk4.value(sl, 3) push!(sl,π,:right,"pi") push!(sl,-3,:left) @test Gtk4.value(sl) == 3 -adj = GtkAdjustment(sl) +adj = adjustment(sl) @test get_gtk_property(adj,:value,Float64) == 3 set_gtk_property!(adj,:upper,11) empty!(sl) @@ -28,7 +28,7 @@ destroy(w) adj = GtkAdjustment(5.0,0.0,10.0,1.0,5.0,5.0) sp2 = GtkSpinButton(adj, 1.0, 2) -adj2 = GtkAdjustment(sp2) +adj2 = adjustment(sp2) @test adj == adj2 configure!(adj2; value = 2.0, lower = 1.0, upper = 20.0, step_increment = 2.0, page_increment = 10.0, page_size = 10.0) @@ -107,7 +107,7 @@ end @testset "ScaleButton" begin sb = GtkScaleButton(0.0:1.0:10.0) -adj = GtkAdjustment(sb) +adj = adjustment(sb) end diff --git a/test/gui/layout.jl b/test/gui/layout.jl index 3b2fce42..861915e4 100644 --- a/test/gui/layout.jl +++ b/test/gui/layout.jl @@ -86,6 +86,8 @@ end push!(nb, four, "tab _four") @test pagenumber(nb, four) == 4 @test length(nb) == 4 + deleteat!(nb, 3) + @test length(nb) == 3 empty!(nb) @test length(nb) == 0 destroy(w) diff --git a/test/gui/misc.jl b/test/gui/misc.jl index dbe30bcb..28b479c8 100644 --- a/test/gui/misc.jl +++ b/test/gui/misc.jl @@ -1,5 +1,9 @@ using Test, Gtk4, Gtk4.G_, Gtk4.GLib +@testset "Initialization" begin + @test Gtk4.isinitialized() +end + @testset "get/set property and binding" begin w = GtkWindow("Window", 400, 300) @test w.title == "Window" @@ -125,6 +129,9 @@ Gtk4.child(w,f) l = GtkLabel("label"); push!(f,l) b = GtkButton("button"); push!(f,b) +add_css_class(b,"error") +remove_css_class(b,"error") + counter = 0 id = signal_connect(b, "activate") do widget counter::Int += 1 @@ -151,7 +158,7 @@ destroy(w) end @testset "Builder" begin -b=GtkBuilder("test.ui") +b=GtkBuilder(joinpath(dirname(@__FILE__), "test.ui")) widgets = [w for w in b] @test length(widgets)==length(b) @test length(b)==6 @@ -165,7 +172,9 @@ destroy(a_window) @test button == b["a_button"] -s = open("test.ui","r") do f +testui = joinpath(dirname(@__FILE__), "test.ui") + +s = open(testui,"r") do f read(f,String) end b3 = GtkBuilder(s,-1) @@ -173,7 +182,7 @@ win = b3["a_window"] destroy(win) b4 = GtkBuilder() -push!(b4; filename="test.ui") +push!(b4; filename=testui) win = b4["a_window"] destroy(win) @@ -206,7 +215,7 @@ end w = GtkWindow(l) show(w) - ### add css tests here + delete!(sc, provider) destroy(w) end @@ -215,9 +224,15 @@ end @test keyval("H") == Gtk4.KEY_H end -@testset "IconTheme" begin - i = GtkIconTheme(GdkDisplay()) +@testset "IconTheme and CSS for GdkDisplay" begin + d = GdkDisplay() + i = GtkIconTheme(d) Gtk4.icon_theme_add_search_path(i, ".") + + css = "GtkLabel { color: blue; }" + provider = GtkCssProvider(css) + push!(d, provider, 500) + delete!(d, provider) end @testset "Menus" begin @@ -239,6 +254,7 @@ push!(filemenu, quit) GLib.submenu(menubar,"File",filemenu) mb = GtkPopoverMenuBar(menubar) +@test Gtk4.menu_model(mb) == menubar b = GtkBox(:h) push!(b,mb) win = GtkWindow(b, "Menus", 200, 40) diff --git a/test/test.ui b/test/gui/test.ui similarity index 100% rename from test/test.ui rename to test/gui/test.ui diff --git a/test/runtests.jl b/test/runtests.jl index 7c2efbbc..ef8a5eed 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -40,8 +40,8 @@ include("gui/input.jl") include("gui/layout.jl") include("gui/window.jl") include("gui/listviews.jl") -#include("gui/examples.jl") -#include("gui/application.jl") # needs to be last because it messes with the main loop +include("gui/examples.jl") +include("gui/application.jl") # needs to be last because it messes with the main loop end GC.gc() diff --git a/test/text.jl b/test/text.jl index 1ee1b8e1..b1613261 100644 --- a/test/text.jl +++ b/test/text.jl @@ -16,8 +16,8 @@ v = GtkTextView(b) push!(w, v) -its = _GtkTextIter(b, 1) -ite = _GtkTextIter(b, 2) +its = GtkTextIter(b, 1) +ite = GtkTextIter(b, 2) @test buffer(its) == b @test (its:ite).text == "t" @@ -25,10 +25,10 @@ ite = _GtkTextIter(b, 2) splice!(b, its:ite) @test b.text == "est" -insert!(b, _GtkTextIter(b, 1), "t") +insert!(b, GtkTextIter(b, 1), "t") @test b.text == "test" -it = _GtkTextIter(b) +it = GtkTextIter(b) @test it.line == 0 #lines are 0-based @test it.starts_line == true @test it.ends_line == false @@ -40,7 +40,7 @@ it = _GtkTextIter(b) @test it.ends_sentence == false b.text = "line1\nline2" -it = Ref(_GtkTextIter(b)) +it = GtkTextIter(b) it.line = 1 @test it.line == 1 @@ -58,18 +58,18 @@ it.visible_line_index = 0 @test it.can_insert -it1 = _GtkTextIter(b, 1) -it2 = _GtkTextIter(b, 1) +it1 = GtkTextIter(b, 1) +it2 = GtkTextIter(b, 1) @test it1 == it2 -it2 = _GtkTextIter(b, 2) +it2 = GtkTextIter(b, 2) @test (it1 == it2) == false @test it1 < it2 @test it1 <= it2 @test it2 > it1 it2 -= 1 -@test Ref(it1) == it2 +@test it1 == it2 -it3 = _GtkTextIter(b, 2, 1) +it3 = GtkTextIter(b, 2, 1) m = GtkTextMark() #it4 = _GtkTextIter(b, m) @@ -80,17 +80,16 @@ show(m) # tags Gtk4.create_tag(b, "big"; size_points = 24) Gtk4.create_tag(b, "red"; foreground = "red") -f(buffer)=Gtk4.apply_tag(buffer, "big", _GtkTextIter(b, 1), _GtkTextIter(b, 6)) +f(buffer)=Gtk4.apply_tag(buffer, "big", GtkTextIter(b, 1), GtkTextIter(b, 6)) user_action(f, b) -Gtk4.apply_tag(b, "red", _GtkTextIter(b, 1), _GtkTextIter(b, 6)) -Gtk4.remove_tag(b, "red", _GtkTextIter(b, 1), _GtkTextIter(b, 3)) -Gtk4.remove_all_tags(b, _GtkTextIter(b, 4), _GtkTextIter(b, 6)) +Gtk4.apply_tag(b, "red", GtkTextIter(b, 1), GtkTextIter(b, 6)) +Gtk4.remove_tag(b, "red", GtkTextIter(b, 1), GtkTextIter(b, 3)) +Gtk4.remove_all_tags(b, GtkTextIter(b, 4), GtkTextIter(b, 6)) # getproperty @test it1.offset == 0 #Gtk indices are zero based @test it2.offset == 0 -it1 = Ref(it1) it1.offset = 1 @test it1.offset == 1 @@ -106,8 +105,8 @@ skip(it2, :backward_line) skip(it2, :forward_line) @test it2.line == 1 skip(it2, :forward_to_line_end) -it1 = Ref(_GtkTextIter(b, it2.offset-1)) -(it1[]:it2[]).text == "2" +it1 = GtkTextIter(b, it2.offset-1) +(it1:it2).text == "2" whats = [:forward_word_end, :backward_word_start, :backward_sentence_start, :forward_sentence_end] for what in whats @@ -176,15 +175,15 @@ tv.buffer = b insert!(b, "text") -splice!(b, _GtkTextIter(b, 5)) +splice!(b, GtkTextIter(b, 5)) @test b.text == "tex" b[String] = "text" -st=_GtkTextIter(b, 1) -mi=_GtkTextIter(b, 3) -en=_GtkTextIter(b, 5) +st=GtkTextIter(b, 1) +mi=GtkTextIter(b, 3) +en=GtkTextIter(b, 5) @test in(mi, st:en) @@ -195,12 +194,12 @@ splice!(tv) @test b.text == "" b.text = "new" -st = _GtkTextIter(b, 4) +st = GtkTextIter(b, 4) place_cursor(b, st) insert!(tv, " text") @test b.text == "new text" -en = _GtkTextIter(b, 9) +en = GtkTextIter(b, 9) splice!(tv, en) @test b.text == "new tex"