Skip to content

Commit

Permalink
update auto-generated code for GLib and gdkpixbuf
Browse files Browse the repository at this point in the history
  • Loading branch information
jwahlstrand committed Dec 30, 2024
1 parent c60c1be commit f0e7080
Show file tree
Hide file tree
Showing 9 changed files with 411 additions and 74 deletions.
9 changes: 5 additions & 4 deletions gen/gen_gio.jl
Original file line number Diff line number Diff line change
Expand Up @@ -29,21 +29,22 @@ 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_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,:bind_with_mapping]

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]
:writev_nonblocking,:dup_default,:remove_action_entries,:new_build_filenamev,:copy_async,:move_async]
# skips are to avoid method name collisions

interface_skiplist=[:App,:AppInfo,:DBusObjectManager,:Drive,:Icon,:Mount,:NetworkMonitor,:PollableOutputStream,:ProxyResolver,:SocketConnectable,:TlsBackend,:TlsClientConnection,:Volume,:DtlsServerConnection]
interface_skiplist=[:App,:DBusObjectManager,:Drive,:Icon,:Mount,:NetworkMonitor,:PollableOutputStream,:ProxyResolver,:SocketConnectable,:TlsBackend,:TlsClientConnection,:Volume,:DtlsServerConnection]

GI.export_methods!(ns,path,"gio"; interface_method_skiplist = interface_method_skiplist, interface_skiplist = interface_skiplist, object_method_skiplist = object_method_skiplist, object_skiplist = object_skiplist, struct_skiplist = struct_skiplist)

skiplist=[:bus_own_name_on_connection,:bus_own_name,:bus_watch_name_on_connection,:bus_watch_name,:dbus_annotation_info_lookup,:dbus_error_encode_gerror,:dbus_error_get_remote_error,:dbus_error_is_remote_error,:dbus_error_new_for_dbus_error,
:dbus_error_strip_remote_error,:dbus_error_register_error_domain,:io_modules_load_all_in_directory_with_scope,:io_modules_scan_all_in_directory_with_scope,:dbus_gvariant_to_gvalue,:unix_mount_at,:unix_mount_copy,:unix_mount_compare,:unix_mount_for,:unix_mount_free,
:unix_mount_get_device_path,:unix_mount_get_fs_type,:unix_mount_get_mount_path,:unix_mount_get_options,:unix_mount_get_root_path,:unix_mount_guess_can_eject,:unix_mount_guess_icon,:unix_mount_guess_name,:unix_mount_guess_should_display,:unix_mount_guess_symbolic_icon,
:unix_mount_is_readonly,:unix_mount_is_system_internal,:unix_mount_point_at,:unix_mount_points_changed_since,:unix_mount_points_get,:unix_mounts_get,:file_new_build_filenamev,:io_extension_point_implement,:io_extension_point_lookup,:io_extension_point_register]
:unix_mount_is_readonly,:unix_mount_is_system_internal,:unix_mount_point_at,:unix_mount_points_changed_since,:unix_mount_points_get,:unix_mounts_get,:file_new_build_filenamev,:io_extension_point_implement,:io_extension_point_lookup,:io_extension_point_register,
:unix_mount_points_get_from_file,:unix_mounts_get_from_file]

GI.export_functions!(ns,path,"gio"; skiplist = skiplist)
2 changes: 1 addition & 1 deletion gen/gen_glib.jl
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ skiplist=[:convert,:atomic_rc_box_release_full,:child_watch_add,:datalist_foreac
:pattern_match_string,:log_structured_array,:log_writer_default,:log_writer_format_fields,
:log_writer_journald,:log_writer_standard_streams,:parse_debug_string,:lstat,:stat,
:child_watch_source_new,:date_strftime,:idle_source_new,:main_current_source,
:timeout_source_new,:timeout_source_new_seconds,:unix_fd_source_new,
:timeout_source_new,:timeout_source_new_seconds,:unix_fd_source_new,:async_queue_new,
:unix_signal_source_new,:datalist_id_remove_multiple,:base64_encode_close,
:base64_encode_step,:sequence_insert_before,:sequence_range_get_midpoint,
:list_push_allocator,:node_push_allocator,:slist_push_allocator,:sequence_foreach_range,:sequence_sort_changed,:sequence_sort_changed_iter]
Expand Down
75 changes: 74 additions & 1 deletion src/gen/cairo_structs
Original file line number Diff line number Diff line change
Expand Up @@ -257,9 +257,82 @@ $(Expr(:toplevel, quote
end
end
end
begin
struct _cairoGlyph
index::UInt64
x::Float64
y::Float64
end
mutable struct cairoGlyph <: GBoxed
handle::Ptr{_cairoGlyph}
begin
(GLib.g_type(::Type{T}) where T <: cairoGlyph) = begin
ccall(("cairo_gobject_glyph_get_type", libcairo_gobject), GType, ())
end
function cairoGlyph(ref::Ptr{T}, own::Bool = false) where T <: Union{GBoxed, _cairoGlyph}
x = new(ref)
if own
finalizer(x) do x
GLib.delboxed(x)
end
end
x
end
push!(gboxed_types, cairoGlyph)
end
end
begin
unsafe_convert(::Type{Ptr{_cairoGlyph}}, box::cairoGlyph) = begin
convert(Ptr{_cairoGlyph}, box.handle)
end
convert(::Type{cairoGlyph}, p::Ptr{_cairoGlyph}, owns = false) = begin
cairoGlyph(p, owns)
end
const cairoGlyphLike = Union{Ref{_cairoGlyph}, cairoGlyph}
convert(::Type{cairoGlyphLike}, p, owns) = begin
convert(cairoGlyph, p, owns)
end
end
end
begin
struct _cairoTextCluster
num_bytes::Int32
num_glyphs::Int32
end
mutable struct cairoTextCluster <: GBoxed
handle::Ptr{_cairoTextCluster}
begin
(GLib.g_type(::Type{T}) where T <: cairoTextCluster) = begin
ccall(("cairo_gobject_text_cluster_get_type", libcairo_gobject), GType, ())
end
function cairoTextCluster(ref::Ptr{T}, own::Bool = false) where T <: Union{GBoxed, _cairoTextCluster}
x = new(ref)
if own
finalizer(x) do x
GLib.delboxed(x)
end
end
x
end
push!(gboxed_types, cairoTextCluster)
end
end
begin
unsafe_convert(::Type{Ptr{_cairoTextCluster}}, box::cairoTextCluster) = begin
convert(Ptr{_cairoTextCluster}, box.handle)
end
convert(::Type{cairoTextCluster}, p::Ptr{_cairoTextCluster}, owns = false) = begin
cairoTextCluster(p, owns)
end
const cairoTextClusterLike = Union{Ref{_cairoTextCluster}, cairoTextCluster}
convert(::Type{cairoTextClusterLike}, p, owns) = begin
convert(cairoTextCluster, p, owns)
end
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, cairoRectangleLike, _cairoRectangle, cairoRectangleInt, cairoRectangleIntLike, _cairoRectangleInt
export cairoContext, cairoDevice, cairoSurface, cairoMatrix, cairoPattern, cairoRegion, cairoFontOptions, cairoFontFace, cairoScaledFont, cairoPath, cairoRectangle, cairoRectangleLike, _cairoRectangle, cairoRectangleInt, cairoRectangleIntLike, _cairoRectangleInt, cairoGlyph, cairoGlyphLike, _cairoGlyph, cairoTextCluster, cairoTextClusterLike, _cairoTextCluster
end))
end
4 changes: 2 additions & 2 deletions src/gen/gdkpixbuf_consts
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ quote
$(Expr(:toplevel, quote
begin
const PIXBUF_MAJOR = 2
const PIXBUF_MICRO = 10
const PIXBUF_MICRO = 12
const PIXBUF_MINOR = 42
const PIXBUF_VERSION = "2.42.10"
const PIXBUF_VERSION = "2.42.12"
begin
@cenum Colorspace::Int32 Colorspace_RGB = 0
(GLib.g_type(::Type{T}) where T <: Colorspace) = begin
Expand Down
6 changes: 3 additions & 3 deletions src/gen/gdkpixbuf_methods
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ quote
$(Expr(:toplevel, quote
function copy(instance::GdkPixbufFormatLike)
ret = ccall(("gdk_pixbuf_format_copy", libgdkpixbuf), Ptr{_GdkPixbufFormat}, (Ptr{_GdkPixbufFormat},), instance)
ret2 = convert(GdkPixbufFormatLike, ret, true)
ret2 = convert_if_not_null(GdkPixbufFormat, ret, true)
ret2
end
function free(instance::GdkPixbufFormatLike)
Expand Down Expand Up @@ -151,7 +151,7 @@ $(Expr(:toplevel, quote
end
function Pixbuf_new_from_xpm_data(_data)
ret = ccall(("gdk_pixbuf_new_from_xpm_data", libgdkpixbuf), Ptr{GObject}, (Ptr{Cstring},), _data)
ret2 = GdkPixbufLeaf(ret, true)
ret2 = convert_if_not_null(GdkPixbuf, ret, true)
ret2
end
function calculate_rowstride(_colorspace, _has_alpha::Bool, _bits_per_sample::Integer, _width::Integer, _height::Integer)
Expand Down Expand Up @@ -212,7 +212,7 @@ $(Expr(:toplevel, quote
end
function add_alpha(instance::GdkPixbuf, _substitute_color::Bool, _r::Integer, _g::Integer, _b::Integer)
ret = ccall(("gdk_pixbuf_add_alpha", libgdkpixbuf), Ptr{GObject}, (Ptr{GObject}, Cint, UInt8, UInt8, UInt8), instance, _substitute_color, _r, _g, _b)
ret2 = convert(GdkPixbuf, ret, true)
ret2 = convert_if_not_null(GdkPixbuf, ret, true)
ret2
end
function apply_embedded_orientation(instance::GdkPixbuf)
Expand Down
Loading

0 comments on commit f0e7080

Please sign in to comment.