diff --git a/Adwaita/src/gen/adw_consts b/Adwaita/src/gen/adw_consts index 438d8df1..f9c9b5e5 100644 --- a/Adwaita/src/gen/adw_consts +++ b/Adwaita/src/gen/adw_consts @@ -3,9 +3,9 @@ $(Expr(:toplevel, quote begin const DURATION_INFINITE = 0xffffffff const MAJOR_VERSION = 1 - const MICRO_VERSION = 4 + const MICRO_VERSION = 5 const MINOR_VERSION = 5 - const VERSION_S = "1.5.4" + const VERSION_S = "1.5.5" 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 diff --git a/GI/src/giexport.jl b/GI/src/giexport.jl index 4ddf3b7b..477002b2 100644 --- a/GI/src/giexport.jl +++ b/GI/src/giexport.jl @@ -1,17 +1,17 @@ # functions that output expressions for a library in bulk ## Constants, enums, and flags -function _enums_and_flags(es, skiplist, incl_typeinit, const_mod, const_exports, loaded) +function _enums_and_flags(es, skiplist, incl_typeinit, const_mod, const_exports, loaded, export_constants = true) for e in es name = Symbol(get_name(e)) in(name, skiplist) && continue push!(const_mod.args, unblock(decl(e,incl_typeinit))) - push!(const_exports.args, name) + export_constants && push!(const_exports.args, name) push!(loaded,name) end end -function all_const_exprs!(const_mod, const_exports, ns;print_summary=true,incl_typeinit=true,skiplist=Symbol[]) +function all_const_exprs!(const_mod, const_exports, ns;print_summary=true,incl_typeinit=true,skiplist=Symbol[], export_constants = true) loaded=Symbol[] c = get_consts(ns) @@ -25,14 +25,14 @@ function all_const_exprs!(const_mod, const_exports, ns;print_summary=true,incl_t end es=get_all(ns,GIEnumInfo) - _enums_and_flags(es, skiplist, incl_typeinit, const_mod, const_exports, loaded) + _enums_and_flags(es, skiplist, incl_typeinit, const_mod, const_exports, loaded, export_constants) if print_summary && length(es)>0 printstyled("Generated ",length(es)," enums\n";color=:green) end es=get_all(ns,GIFlagsInfo) - _enums_and_flags(es, skiplist, incl_typeinit, const_mod, const_exports, loaded) + _enums_and_flags(es, skiplist, incl_typeinit, const_mod, const_exports, loaded, export_constants) if print_summary && length(es)>0 printstyled("Generated ",length(es)," flags\n";color=:green) @@ -45,11 +45,11 @@ function export_consts!(ns,path,prefix,skiplist = Symbol[]; doc_prefix = prefix, const_mod = Expr(:block) - c = all_const_exprs!(const_mod, exports, ns; skiplist= skiplist) + c = all_const_exprs!(const_mod, exports, ns; skiplist= skiplist, export_constants) if doc_xml !== nothing GI.append_const_docs!(const_mod.args, doc_prefix, doc_xml, c) end - export_constants && push!(const_mod.args, exports) + isempty(exports.args) || push!(const_mod.args, exports) push!(exprs, const_mod) @@ -438,11 +438,11 @@ function all_interface_methods!(exprs,ns;skiplist=Symbol[],interface_skiplist=Sy end end -function export_methods!(ns,path,prefix;struct_method_skiplist = Symbol[], object_method_skiplist = Symbol[],interface_method_skiplist = Symbol[], struct_skiplist = Symbol[], interface_skiplist = Symbol[], object_skiplist = Symbol[], exclude_deprecated = true) +function export_methods!(ns,path,prefix;struct_method_skiplist = Symbol[], object_method_skiplist = Symbol[],interface_method_skiplist = Symbol[], struct_skiplist = Symbol[], interface_skiplist = Symbol[], object_skiplist = Symbol[], exclude_deprecated = true, interface_helpers = true) toplevel, exprs, exports = GI.output_exprs() all_struct_methods!(exprs,ns, struct_skiplist = struct_skiplist, skiplist = struct_method_skiplist, exclude_deprecated = exclude_deprecated) - all_object_methods!(exprs,ns; skiplist = object_method_skiplist, object_skiplist = object_skiplist, exclude_deprecated = exclude_deprecated) + all_object_methods!(exprs,ns; skiplist = object_method_skiplist, object_skiplist = object_skiplist, exclude_deprecated = exclude_deprecated, interface_helpers) all_interface_methods!(exprs,ns; skiplist = interface_method_skiplist, interface_skiplist = interface_skiplist, exclude_deprecated = exclude_deprecated) write_to_file(path,"$(prefix)_methods",toplevel) diff --git a/gen/gen_gio.jl b/gen/gen_gio.jl index c0681e40..5026d0c4 100644 --- a/gen/gen_gio.jl +++ b/gen/gen_gio.jl @@ -29,7 +29,7 @@ struct_skiplist = GI.export_struct_exprs!(ns,path, "gio", struct_skiplist, impor object_method_skiplist=[:new_for_bus,:export,:add_option_group,:make_pollfd,:get_info, :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] +: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] object_skiplist=vcat(obj_skiplist,[:AppInfoMonitor,:DBusConnection,:DBusMenuModel,:DBusProxy,:DBusMethodInvocation,:IOModule,:SimpleProxyResolver,:UnixMountMonitor]) diff --git a/src/GLib/GLib.jl b/src/GLib/GLib.jl index 0cd1773c..0609cda0 100644 --- a/src/GLib/GLib.jl +++ b/src/GLib/GLib.jl @@ -177,6 +177,7 @@ module G_ using Glib_jll using ..GLib +using ..GLib: BookmarkFileError, ChecksumType, ConvertError, DateDMY, DateMonth, DateWeekday, ErrorType, FileError, IOChannelError, IOError, IOStatus, KeyFileError, LogWriterOutput, MarkupError, NormalizeMode, NumberParserError, OnceStatus, OptionArg, OptionError, RegexError, SeekType, ShellError, SliceConfig, SpawnError, TestFileType, TestLogType, TestResult, ThreadError, TimeType, TokenType, TraverseType, UnicodeBreakType, UnicodeScript, UnicodeType, UnixPipeEnd, UriError, UserDirectory, VariantClass, VariantParseError, BusType, ConverterResult, CredentialsType, DBusError, DBusMessageByteOrder, DBusMessageHeaderField, DBusMessageType, DataStreamByteOrder, DataStreamNewlineType, DriveStartStopType, EmblemOrigin, FileAttributeStatus, FileAttributeType, FileMonitorEvent, FileType, FilesystemPreviewType, IOErrorEnum, IOModuleScopeFlags, MemoryMonitorWarningLevel, MountOperationResult, NetworkConnectivity, NotificationPriority, PasswordSave, PollableReturn, ResolverError, ResolverRecordType, ResourceError, SocketClientEvent, SocketFamily, SocketListenerEvent, SocketProtocol, SocketType, TlsAuthenticationMode, TlsCertificateRequestFlags, TlsChannelBindingError, TlsChannelBindingType, TlsDatabaseLookupFlags, TlsError, TlsInteractionResult, UnixSocketAddressType, ZlibCompressorFormat, AsciiType, FileSetContentsFlags, FileTest, FormatSizeFlags, HookFlagMask, IOCondition, IOFlags, KeyFileFlags, LogLevelFlags, MainContextFlags, MarkupCollectType, MarkupParseFlags, OptionFlags, RegexCompileFlags, RegexMatchFlags, SpawnFlags, TestSubprocessFlags, TraverseFlags, UriFlags, UriHideFlags, UriParamsFlags, BindingFlags, ConnectFlags, IOCondition, ParamFlags, SignalFlags, SignalMatchType, TypeFlags, TypeFundamentalFlags, AppInfoCreateFlags, ApplicationFlags, AskPasswordFlags, BusNameOwnerFlags, BusNameWatcherFlags, ConverterFlags, DBusCallFlags, DBusCapabilityFlags, DBusConnectionFlags, DBusInterfaceSkeletonFlags, DBusMessageFlags, DBusObjectManagerClientFlags, DBusPropertyInfoFlags, DBusProxyFlags, DBusSendMessageFlags, DBusServerFlags, DBusSignalFlags, DBusSubtreeFlags, DriveStartFlags, FileAttributeInfoFlags, FileCopyFlags, FileCreateFlags, FileMeasureFlags, FileMonitorFlags, FileQueryInfoFlags, IOStreamSpliceFlags, MountMountFlags, MountUnmountFlags, OutputStreamSpliceFlags, ResolverNameLookupFlags, ResourceFlags, ResourceLookupFlags, SettingsBindFlags, SocketMsgFlags, SubprocessFlags, TestDBusFlags, TlsCertificateFlags, TlsDatabaseVerifyFlags, TlsPasswordFlags import Base: convert, copy, run diff --git a/src/Gdk4.jl b/src/Gdk4.jl index ad95bbfc..1e71053f 100644 --- a/src/Gdk4.jl +++ b/src/Gdk4.jl @@ -144,3 +144,6 @@ end function glib_unref(x::Ptr{GdkEvent}) ccall((:gdk_event_unref, libgtk4), Nothing, (Ptr{GdkEvent},), x) end + +Base.show(io::IO, t::GskTransform) = print(io,"GskTransform("*G_.to_string(t)*")") + diff --git a/src/GdkPixbufLib.jl b/src/GdkPixbufLib.jl index 4920568c..08e392fe 100644 --- a/src/GdkPixbufLib.jl +++ b/src/GdkPixbufLib.jl @@ -28,6 +28,7 @@ using gdk_pixbuf_jll using ..GLib using ..GdkPixbufLib +using ..GdkPixbufLib: Colorspace, InterpType, PixbufError, PixbufRotation import Base: convert, copy diff --git a/src/Graphene.jl b/src/Graphene.jl index e5c90f7b..ce6baf7a 100644 --- a/src/Graphene.jl +++ b/src/Graphene.jl @@ -25,6 +25,11 @@ eval(include("gen/graphene_methods")) end _GrapheneRect(x::Number,y::Number,w::Number,h::Number) = _GrapheneRect(_GraphenePoint(x,y),_GrapheneSize(w,h)) +# this constructor returns a RefValue{_GrapheneRect}, which is GrapheneRectLike +# This seems to result in one less (Julia) allocation than constructing a Ptr{GrapheneRect} by calling "alloc", "init" +GrapheneRect(x::Number,y::Number,w::Number,h::Number) = Ref(_GrapheneRect(x,y,w,h)) + +GraphenePoint(x::Number, y::Number) = Ref(_GraphenePoint(x,y)) function __init__() gtype_wrapper_cache_init() diff --git a/src/Gtk4.jl b/src/Gtk4.jl index 4a54cdc3..fe06b5f9 100644 --- a/src/Gtk4.jl +++ b/src/Gtk4.jl @@ -52,6 +52,8 @@ using ..Graphene using ..GdkPixbufLib using ..Gtk4 +using ..Gtk4: BlendMode, Corner, FillRule, GLUniformType, LineCap, LineJoin, MaskMode, PathDirection, PathOperation, RenderNodeType, ScalingFilter, SerializationError, TransformCategory, PathForeachFlags, AxisUse, CrossingMode, DevicePadFeature, DeviceToolType, DmabufError, DragCancelReason, EventType, FullscreenMode, GLError, Gravity, InputSource, KeyMatch, MemoryFormat, NotifyType, ScrollDirection, ScrollUnit, SubpixelLayout, SurfaceEdge, TextureError, TitlebarGesture, TouchpadGesturePhase, VulkanError, AnchorHints, AxisFlags, DragAction, FrameClockPhase, GLAPI, ModifierType, PaintableFlags, SeatCapabilities, ToplevelState, AccessibleAnnouncementPriority, AccessibleAutocomplete, AccessibleInvalidState, AccessiblePlatformState, AccessibleProperty, AccessibleRelation, AccessibleRole, AccessibleSort, AccessibleState, AccessibleTextContentChange, AccessibleTextGranularity, AccessibleTristate, Align, ArrowType, AssistantPageType, BaselinePosition, BorderStyle, BuilderError, ButtonsType, CellRendererAccelMode, CellRendererMode, Collation, ConstraintAttribute, ConstraintRelation, ConstraintStrength, ConstraintVflParserError, ContentFit, CornerType, CssParserError, CssParserWarning, DeleteType, DialogError, DirectionType, EditableProperties, EntryIconPosition, EventSequenceState, FileChooserAction, FileChooserError, FilterChange, FilterMatch, FontLevel, GraphicsOffloadEnabled, IconSize, IconThemeError, IconViewDropPosition, ImageType, InputPurpose, InscriptionOverflow, Justification, LevelBarMode, License, ListTabBehavior, MessageType, MovementStep, NaturalWrapMode, NotebookTab, NumberUpLayout, Ordering, Orientation, Overflow, PackType, PadActionType, PageOrientation, PageSet, PanDirection, PolicyType, PositionType, PrintDuplex, PrintError, PrintOperationAction, PrintOperationResult, PrintPages, PrintQuality, PrintStatus, PropagationLimit, PropagationPhase, RecentManagerError, ResponseType, RevealerTransitionType, ScrollStep, ScrollType, ScrollablePolicy, SelectionMode, SensitivityType, ShortcutScope, ShortcutType, SizeGroupMode, SizeRequestMode, SortType, SorterChange, SorterOrder, SpinButtonUpdatePolicy, SpinType, StackTransitionType, StringFilterMatchMode, SymbolicColor, SystemSetting, TextDirection, TextExtendSelection, TextViewLayer, TextWindowType, TreeViewColumnSizing, TreeViewDropPosition, TreeViewGridLines, Unit, WrapMode, ApplicationInhibitFlags, BuilderClosureFlags, CellRendererState, DebugFlags, DialogFlags, EventControllerScrollFlags, FontChooserLevel, IconLookupFlags, InputHints, ListScrollFlags, PickFlags, PopoverMenuFlags, PrintCapabilities, ShortcutActionFlags, StateFlags, StyleContextPrintFlags, TextSearchFlags + eval(include("gen/gdk4_methods")) eval(include("gen/gdk4_functions")) eval(include("gen/gsk4_methods")) diff --git a/src/Pango/Pango.jl b/src/Pango/Pango.jl index 686687f4..2371510f 100644 --- a/src/Pango/Pango.jl +++ b/src/Pango/Pango.jl @@ -25,6 +25,7 @@ using Pango_jll, Glib_jll using ..GLib using ..Pango +using ..Pango: Alignment, AttrType, BaselineShift, CoverageLevel, Direction, EllipsizeMode, FontScale, Gravity, GravityHint, LayoutDeserializeError, Overline, RenderPart, Script, Stretch, Style, TabAlign, TextTransform, Underline, Variant, Weight, WrapMode, FontMask, LayoutDeserializeFlags, LayoutSerializeFlags, ShapeFlags, ShowFlags using ..Pango.Cairo eval(include("../gen/pango_methods")) diff --git a/src/base.jl b/src/base.jl index a2fd8c72..327dd052 100644 --- a/src/base.jl +++ b/src/base.jl @@ -34,7 +34,7 @@ toplevel(w::GtkWidget) = G_.get_root(w) Returns the allocated width of `w` in pixels. -Related GTK function: [`gtk_widget_get_allocated_width`()]($(gtkdoc_method_url("gtk4","Widget","get_allocated_width"))) +Related GTK function: [`gtk_widget_get_width`()]($(gtkdoc_method_url("gtk4","Widget","get_width"))) """ width @doc """ @@ -42,7 +42,7 @@ Related GTK function: [`gtk_widget_get_allocated_width`()]($(gtkdoc_method_url(" Returns the allocated height of `w` in pixels. -Related GTK function: [`gtk_widget_get_allocated_height`()]($(gtkdoc_method_url("gtk4","Widget","get_allocated_height"))) +Related GTK function: [`gtk_widget_get_height`()]($(gtkdoc_method_url("gtk4","Widget","get_height"))) """ height size(w::GtkWidget) = (width(w), height(w)) diff --git a/src/gen/gio_methods b/src/gen/gio_methods index 2a403a90..3411e4fa 100644 --- a/src/gen/gio_methods +++ b/src/gen/gio_methods @@ -4069,6 +4069,10 @@ $(Expr(:toplevel, quote function to_string(instance::GProxyAddress) to_string(GSocketConnectable(instance)) end + function get_timeout(instance::GResolver) + ret = ccall(("g_resolver_get_timeout", libgio), UInt32, (Ptr{GObject},), instance) + ret + end function lookup_by_address(instance::GResolver, _address::GInetAddress, _cancellable::Maybe(GCancellable)) _cancellable_maybe = nothing_to_null(_cancellable) err = err_buf() @@ -4208,6 +4212,10 @@ $(Expr(:toplevel, quote ret = ccall(("g_resolver_set_default", libgio), Nothing, (Ptr{GObject},), instance) nothing end + function set_timeout(instance::GResolver, _timeout_ms::Integer) + ret = ccall(("g_resolver_set_timeout", libgio), Nothing, (Ptr{GObject}, UInt32), instance, _timeout_ms) + nothing + end function Settings_new(_schema_id::Union{AbstractString, Symbol}) ret = ccall(("g_settings_new", libgio), Ptr{GObject}, (Cstring,), _schema_id) ret2 = GSettingsLeaf(ret, true) @@ -4745,6 +4753,10 @@ $(Expr(:toplevel, quote ret2 = SocketType(ret) ret2 end + function get_timeout(instance::GSocket) + ret = ccall(("g_socket_get_timeout", libgio), UInt32, (Ptr{GObject},), instance) + ret + end function get_ttl(instance::GSocket) ret = ccall(("g_socket_get_ttl", libgio), UInt32, (Ptr{GObject},), instance) ret @@ -4938,6 +4950,10 @@ $(Expr(:toplevel, quote ret2 = convert(Bool, ret) ret2 end + function set_timeout(instance::GSocket, _timeout::Integer) + ret = ccall(("g_socket_set_timeout", libgio), Nothing, (Ptr{GObject}, UInt32), instance, _timeout) + nothing + end function set_ttl(instance::GSocket, _ttl::Integer) ret = ccall(("g_socket_set_ttl", libgio), Nothing, (Ptr{GObject}, UInt32), instance, _ttl) nothing @@ -5168,6 +5184,10 @@ $(Expr(:toplevel, quote ret2 = SocketType(ret) ret2 end + function get_timeout(instance::GSocketClient) + ret = ccall(("g_socket_client_get_timeout", libgio), UInt32, (Ptr{GObject},), instance) + ret + end function get_tls(instance::GSocketClient) ret = ccall(("g_socket_client_get_tls", libgio), Cint, (Ptr{GObject},), instance) ret2 = convert(Bool, ret) @@ -5199,6 +5219,10 @@ $(Expr(:toplevel, quote ret = ccall(("g_socket_client_set_socket_type", libgio), Nothing, (Ptr{GObject}, UInt32), instance, _type) nothing end + function set_timeout(instance::GSocketClient, _timeout::Integer) + ret = ccall(("g_socket_client_set_timeout", libgio), Nothing, (Ptr{GObject}, UInt32), instance, _timeout) + nothing + end function set_tls(instance::GSocketClient, _tls::Bool) ret = ccall(("g_socket_client_set_tls", libgio), Nothing, (Ptr{GObject}, Cint), instance, _tls) nothing diff --git a/src/lists.jl b/src/lists.jl index b2280394..0bfc9dbb 100644 --- a/src/lists.jl +++ b/src/lists.jl @@ -70,7 +70,7 @@ function show(io::IO, sl::GtkStringList) end end else - println(io, "0-element GtkStringList") + print(io, "0-element GtkStringList") end end string(obj::GtkStringObject) = G_.get_string(obj) diff --git a/test/gdkpixbuf.jl b/test/gdkpixbuf.jl index 5faf6183..c117c598 100644 --- a/test/gdkpixbuf.jl +++ b/test/gdkpixbuf.jl @@ -31,6 +31,8 @@ pb[1:3,1:3]=x pb[1,1]=colorant"blue" @test pb[1,1] == GdkPixbufLib.RGB(0,0,0xff) +cs = GdkPixbufLib.G_.get_colorspace(pb) + end @testset "Transparent pixbuf" begin