diff --git a/examples/glarea.jl b/examples/glarea.jl index 887a6e1a..453922a6 100644 --- a/examples/glarea.jl +++ b/examples/glarea.jl @@ -198,6 +198,7 @@ end wh = 600 w = GtkWindow("GL example", wh, wh) glarea = GtkGLArea() +Gtk4.allowed_apis(glarea, Gtk4.GLAPI_GL) signal_connect(on_realized, glarea, "realize") Gtk4.on_render(render, glarea) diff --git a/src/Gdk4.jl b/src/Gdk4.jl index 1e71053f..df3e26a8 100644 --- a/src/Gdk4.jl +++ b/src/Gdk4.jl @@ -21,6 +21,8 @@ end 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)) +Base.show(io::IO, c::GdkRGBA) = print(io,"GdkRGBA(\""*G_.to_string(c)*"\")") + ## GdkCursor GdkCursor(name::AbstractString; kwargs...) = GdkCursor(name, nothing; kwargs...) diff --git a/src/Pango/Pango.jl b/src/Pango/Pango.jl index 2371510f..b50ec010 100644 --- a/src/Pango/Pango.jl +++ b/src/Pango/Pango.jl @@ -79,7 +79,7 @@ eltype(::Type{PangoFontFamily}) = PangoFontFace Base.keys(ff::PangoFontFamily) = 1:length(ff) PangoFontDescription(s::AbstractString) = G_.font_description_from_string(s) -Base.show(io::IO, pfd::PangoFontDescription) = print(io, "PangoFontDescription(" * G_.to_string(pfd) * ")") +Base.show(io::IO, pfd::PangoFontDescription) = print(io, "PangoFontDescription(\"" * G_.to_string(pfd) * "\")") PangoLayout(cr::cairoContext) = G_.create_layout(cr) diff --git a/src/base.jl b/src/base.jl index 327dd052..d1b5691a 100644 --- a/src/base.jl +++ b/src/base.jl @@ -227,6 +227,8 @@ function GtkCssProvider(data::Union{AbstractString,Nothing}, filename = nothing) return provider end +Base.show(io::IO, cssp::GtkCssProvider) = print(io,"GtkCssProviderLeaf(\""*G_.to_string(cssp)*"\")") + function push!(context::GtkStyleContext, provider, priority=STYLE_PROVIDER_PRIORITY_USER) G_.add_provider(context, GtkStyleProvider(provider), priority) context