Skip to content

Commit

Permalink
update autogenerated code
Browse files Browse the repository at this point in the history
  • Loading branch information
jwahlstrand committed Mar 11, 2024
1 parent a8c4018 commit f6dc0b7
Show file tree
Hide file tree
Showing 8 changed files with 779 additions and 59 deletions.
4 changes: 2 additions & 2 deletions src/gen/gdk4_consts
Original file line number Diff line number Diff line change
Expand Up @@ -2355,7 +2355,7 @@ $(Expr(:toplevel, quote
end
end
begin
@cenum MemoryFormat::Int32 MemoryFormat_B8G8R8A8_PREMULTIPLIED = 0 MemoryFormat_A8R8G8B8_PREMULTIPLIED = 1 MemoryFormat_R8G8B8A8_PREMULTIPLIED = 2 MemoryFormat_B8G8R8A8 = 3 MemoryFormat_A8R8G8B8 = 4 MemoryFormat_R8G8B8A8 = 5 MemoryFormat_A8B8G8R8 = 6 MemoryFormat_R8G8B8 = 7 MemoryFormat_B8G8R8 = 8 MemoryFormat_R16G16B16 = 9 MemoryFormat_R16G16B16A16_PREMULTIPLIED = 10 MemoryFormat_R16G16B16A16 = 11 MemoryFormat_R16G16B16_FLOAT = 12 MemoryFormat_R16G16B16A16_FLOAT_PREMULTIPLIED = 13 MemoryFormat_R16G16B16A16_FLOAT = 14 MemoryFormat_R32G32B32_FLOAT = 15 MemoryFormat_R32G32B32A32_FLOAT_PREMULTIPLIED = 16 MemoryFormat_R32G32B32A32_FLOAT = 17 MemoryFormat_N_FORMATS = 18
@cenum MemoryFormat::Int32 MemoryFormat_B8G8R8A8_PREMULTIPLIED = 0 MemoryFormat_A8R8G8B8_PREMULTIPLIED = 1 MemoryFormat_R8G8B8A8_PREMULTIPLIED = 2 MemoryFormat_B8G8R8A8 = 3 MemoryFormat_A8R8G8B8 = 4 MemoryFormat_R8G8B8A8 = 5 MemoryFormat_A8B8G8R8 = 6 MemoryFormat_R8G8B8 = 7 MemoryFormat_B8G8R8 = 8 MemoryFormat_R16G16B16 = 9 MemoryFormat_R16G16B16A16_PREMULTIPLIED = 10 MemoryFormat_R16G16B16A16 = 11 MemoryFormat_R16G16B16_FLOAT = 12 MemoryFormat_R16G16B16A16_FLOAT_PREMULTIPLIED = 13 MemoryFormat_R16G16B16A16_FLOAT = 14 MemoryFormat_R32G32B32_FLOAT = 15 MemoryFormat_R32G32B32A32_FLOAT_PREMULTIPLIED = 16 MemoryFormat_R32G32B32A32_FLOAT = 17 MemoryFormat_G8A8_PREMULTIPLIED = 18 MemoryFormat_G8A8 = 19 MemoryFormat_G8 = 20 MemoryFormat_G16A16_PREMULTIPLIED = 21 MemoryFormat_G16A16 = 22 MemoryFormat_G16 = 23 MemoryFormat_A8 = 24 MemoryFormat_A16 = 25 MemoryFormat_A16_FLOAT = 26 MemoryFormat_A32_FLOAT = 27 MemoryFormat_N_FORMATS = 28
(GLib.g_type(::Type{T}) where T <: MemoryFormat) = begin
ccall(("gdk_memory_format_get_type", libgtk4), GType, ())
end
Expand Down Expand Up @@ -2463,7 +2463,7 @@ $(Expr(:toplevel, quote
end
end
begin
@bitflag ToplevelState::UInt32 ToplevelState_MINIMIZED = 1 ToplevelState_MAXIMIZED = 2 ToplevelState_STICKY = 4 ToplevelState_FULLSCREEN = 8 ToplevelState_ABOVE = 16 ToplevelState_BELOW = 32 ToplevelState_FOCUSED = 64 ToplevelState_TILED = 128 ToplevelState_TOP_TILED = 256 ToplevelState_TOP_RESIZABLE = 512 ToplevelState_RIGHT_TILED = 1024 ToplevelState_RIGHT_RESIZABLE = 2048 ToplevelState_BOTTOM_TILED = 4096 ToplevelState_BOTTOM_RESIZABLE = 8192 ToplevelState_LEFT_TILED = 16384 ToplevelState_LEFT_RESIZABLE = 32768 ToplevelState_NONE = 0
@bitflag ToplevelState::UInt32 ToplevelState_MINIMIZED = 1 ToplevelState_MAXIMIZED = 2 ToplevelState_STICKY = 4 ToplevelState_FULLSCREEN = 8 ToplevelState_ABOVE = 16 ToplevelState_BELOW = 32 ToplevelState_FOCUSED = 64 ToplevelState_TILED = 128 ToplevelState_TOP_TILED = 256 ToplevelState_TOP_RESIZABLE = 512 ToplevelState_RIGHT_TILED = 1024 ToplevelState_RIGHT_RESIZABLE = 2048 ToplevelState_BOTTOM_TILED = 4096 ToplevelState_BOTTOM_RESIZABLE = 8192 ToplevelState_LEFT_TILED = 16384 ToplevelState_LEFT_RESIZABLE = 32768 ToplevelState_SUSPENDED = 65536 ToplevelState_NONE = 0
(GLib.g_type(::Type{T}) where T <: ToplevelState) = begin
ccall(("gdk_toplevel_state_get_type", libgtk4), GType, ())
end
Expand Down
14 changes: 4 additions & 10 deletions src/gen/gdk4_functions
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,10 @@ $(Expr(:toplevel, quote
ret2 = convert(Bool, ret)
ret2
end
function drag_surface_size_get_type()
ret = ccall(("gdk_drag_surface_size_get_type", libgtk4), UInt64, ())
ret
end
function gl_error_quark()
ret = ccall(("gdk_gl_error_quark", libgtk4), UInt32, ())
ret
Expand Down Expand Up @@ -127,16 +131,6 @@ $(Expr(:toplevel, quote
end
ret2
end
function pixbuf_get_from_surface(_surface::cairoSurface, _src_x::Integer, _src_y::Integer, _width::Integer, _height::Integer)
ret = ccall(("gdk_pixbuf_get_from_surface", libgtk4), Ptr{GObject}, (Ptr{cairoSurface}, Int32, Int32, Int32, Int32), _surface, _src_x, _src_y, _width, _height)
ret2 = convert_if_not_null(GdkPixbuf, ret, true)
ret2
end
function pixbuf_get_from_texture(_texture::GdkTexture)
ret = ccall(("gdk_pixbuf_get_from_texture", libgtk4), Ptr{GObject}, (Ptr{GObject},), _texture)
ret2 = convert_if_not_null(GdkPixbuf, ret, true)
ret2
end
function set_allowed_backends(_backends::Union{AbstractString, Symbol})
ret = ccall(("gdk_set_allowed_backends", libgtk4), Nothing, (Cstring,), _backends)
nothing
Expand Down
105 changes: 98 additions & 7 deletions src/gen/gdk4_methods
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ $(Expr(:toplevel, quote
ret = ccall(("gdk_content_formats_builder_unref", libgtk4), Nothing, (Ptr{GdkContentFormatsBuilder},), instance)
nothing
end
function set_size(instance::GdkDragSurfaceSize, _width::Integer, _height::Integer)
ret = ccall(("gdk_drag_surface_size_set_size", libgtk4), Nothing, (Ptr{GdkDragSurfaceSize}, Int32, Int32), instance, _width, _height)
nothing
end
function FileList_new_from_array(_files)
_files_arr = convert(Vector{Ptr{GObject}}, _files)
_n_files = length(_files)
Expand Down Expand Up @@ -961,8 +965,9 @@ $(Expr(:toplevel, quote
ret2 = GLib.GList(ret, false)
ret2
end
function open_display(instance::GdkDisplayManager, _name::Union{AbstractString, Symbol})
ret = ccall(("gdk_display_manager_open_display", libgtk4), Ptr{GObject}, (Ptr{GObject}, Cstring), instance, _name)
function open_display(instance::GdkDisplayManager, _name::Maybe(Union{AbstractString, Symbol}))
_name_maybe = nothing_to_null(_name)
ret = ccall(("gdk_display_manager_open_display", libgtk4), Ptr{GObject}, (Ptr{GObject}, Cstring), instance, _name_maybe)
ret2 = convert_if_not_null(GdkDisplay, ret, false)
ret2
end
Expand Down Expand Up @@ -1454,6 +1459,93 @@ $(Expr(:toplevel, quote
function load_finish(instance::GdkGLTexture, _res::GAsyncResult)
load_finish(GLoadableIcon(instance), _res)
end
function GLTextureBuilder_new()
ret = ccall(("gdk_gl_texture_builder_new", libgtk4), Ptr{GObject}, ())
ret2 = GdkGLTextureBuilderLeaf(ret, true)
ret2
end
function get_context(instance::GdkGLTextureBuilder)
ret = ccall(("gdk_gl_texture_builder_get_context", libgtk4), Ptr{GObject}, (Ptr{GObject},), instance)
ret2 = convert_if_not_null(GdkGLContext, ret, false)
ret2
end
function get_format(instance::GdkGLTextureBuilder)
ret = ccall(("gdk_gl_texture_builder_get_format", libgtk4), UInt32, (Ptr{GObject},), instance)
ret2 = MemoryFormat(ret)
ret2
end
function get_has_mipmap(instance::GdkGLTextureBuilder)
ret = ccall(("gdk_gl_texture_builder_get_has_mipmap", libgtk4), Cint, (Ptr{GObject},), instance)
ret2 = convert(Bool, ret)
ret2
end
function get_height(instance::GdkGLTextureBuilder)
ret = ccall(("gdk_gl_texture_builder_get_height", libgtk4), Int32, (Ptr{GObject},), instance)
ret
end
function get_id(instance::GdkGLTextureBuilder)
ret = ccall(("gdk_gl_texture_builder_get_id", libgtk4), UInt32, (Ptr{GObject},), instance)
ret
end
function get_sync(instance::GdkGLTextureBuilder)
ret = ccall(("gdk_gl_texture_builder_get_sync", libgtk4), Ptr{Nothing}, (Ptr{GObject},), instance)
ret2 = convert(Nothing, ret)
ret2
end
function get_update_region(instance::GdkGLTextureBuilder)
ret = ccall(("gdk_gl_texture_builder_get_update_region", libgtk4), Ptr{cairoRegion}, (Ptr{GObject},), instance)
ret2 = convert_if_not_null(cairoRegion, ret, false)
ret2
end
function get_update_texture(instance::GdkGLTextureBuilder)
ret = ccall(("gdk_gl_texture_builder_get_update_texture", libgtk4), Ptr{GObject}, (Ptr{GObject},), instance)
ret2 = convert_if_not_null(GdkTexture, ret, false)
ret2
end
function get_width(instance::GdkGLTextureBuilder)
ret = ccall(("gdk_gl_texture_builder_get_width", libgtk4), Int32, (Ptr{GObject},), instance)
ret
end
function set_context(instance::GdkGLTextureBuilder, _context::Maybe(GdkGLContext))
_context_maybe = nothing_to_null(_context)
ret = ccall(("gdk_gl_texture_builder_set_context", libgtk4), Nothing, (Ptr{GObject}, Ptr{GObject}), instance, _context_maybe)
nothing
end
function set_format(instance::GdkGLTextureBuilder, _format)
ret = ccall(("gdk_gl_texture_builder_set_format", libgtk4), Nothing, (Ptr{GObject}, UInt32), instance, _format)
nothing
end
function set_has_mipmap(instance::GdkGLTextureBuilder, _has_mipmap::Bool)
ret = ccall(("gdk_gl_texture_builder_set_has_mipmap", libgtk4), Nothing, (Ptr{GObject}, Cint), instance, _has_mipmap)
nothing
end
function set_height(instance::GdkGLTextureBuilder, _height::Integer)
ret = ccall(("gdk_gl_texture_builder_set_height", libgtk4), Nothing, (Ptr{GObject}, Int32), instance, _height)
nothing
end
function set_id(instance::GdkGLTextureBuilder, _id::Integer)
ret = ccall(("gdk_gl_texture_builder_set_id", libgtk4), Nothing, (Ptr{GObject}, UInt32), instance, _id)
nothing
end
function set_sync(instance::GdkGLTextureBuilder, _sync::Maybe(Nothing))
_sync_maybe = nothing_to_null(_sync)
ret = ccall(("gdk_gl_texture_builder_set_sync", libgtk4), Nothing, (Ptr{GObject}, Ptr{Nothing}), instance, _sync_maybe)
nothing
end
function set_update_region(instance::GdkGLTextureBuilder, _region::Maybe(cairoRegion))
_region_maybe = nothing_to_null(_region)
ret = ccall(("gdk_gl_texture_builder_set_update_region", libgtk4), Nothing, (Ptr{GObject}, Ptr{cairoRegion}), instance, _region_maybe)
nothing
end
function set_update_texture(instance::GdkGLTextureBuilder, _texture::Maybe(GdkTexture))
_texture_maybe = nothing_to_null(_texture)
ret = ccall(("gdk_gl_texture_builder_set_update_texture", libgtk4), Nothing, (Ptr{GObject}, Ptr{GObject}), instance, _texture_maybe)
nothing
end
function set_width(instance::GdkGLTextureBuilder, _width::Integer)
ret = ccall(("gdk_gl_texture_builder_set_width", libgtk4), Nothing, (Ptr{GObject}, Int32), instance, _width)
nothing
end
function get_grab_surface(instance::GdkGrabBrokenEvent)
ret = ccall(("gdk_grab_broken_event_get_grab_surface", libgtk4), Ptr{GObject}, (Ptr{GdkEvent},), instance)
ret2 = convert(GdkSurface, ret, false)
Expand Down Expand Up @@ -1714,11 +1806,6 @@ $(Expr(:toplevel, quote
ret2 = convert(GdkGLContext, ret, true)
ret2
end
function create_similar_surface(instance::GdkSurface, _content, _width::Integer, _height::Integer)
ret = ccall(("gdk_surface_create_similar_surface", libgtk4), Ptr{cairoSurface}, (Ptr{GObject}, UInt32, Int32, Int32), instance, _content, _width, _height)
ret2 = convert(cairoSurface, ret, true)
ret2
end
function create_vulkan_context(instance::GdkSurface)
err = err_buf()
ret = ccall(("gdk_surface_create_vulkan_context", libgtk4), Ptr{GObject}, (Ptr{GObject}, Ptr{Ptr{GError}}), instance, err)
Expand Down Expand Up @@ -1771,6 +1858,10 @@ $(Expr(:toplevel, quote
ret2 = convert(Bool, ret)
ret2
end
function get_scale(instance::GdkSurface)
ret = ccall(("gdk_surface_get_scale", libgtk4), Float64, (Ptr{GObject},), instance)
ret
end
function get_scale_factor(instance::GdkSurface)
ret = ccall(("gdk_surface_get_scale_factor", libgtk4), Int32, (Ptr{GObject},), instance)
ret
Expand Down
35 changes: 32 additions & 3 deletions src/gen/gdk4_structs
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ $(Expr(:toplevel, quote
push!(gboxed_types, GdkContentFormatsBuilder)
end
end
mutable struct GdkDragSurfaceSize
handle::Ptr{GdkDragSurfaceSize}
end
mutable struct GdkEventSequence <: GBoxed
handle::Ptr{GdkEventSequence}
begin
Expand Down Expand Up @@ -230,6 +233,7 @@ $(Expr(:toplevel, quote
end
@doc "See the [GTK docs](https://docs.gtk.org/gdk4/struct.ContentFormats.html)." GdkContentFormats
@doc "See the [GTK docs](https://docs.gtk.org/gdk4/struct.ContentFormatsBuilder.html)." GdkContentFormatsBuilder
@doc "See the [GTK docs](https://docs.gtk.org/gdk4/struct.DragSurfaceSize.html)." GdkDragSurfaceSize
@doc "See the [GTK docs](https://docs.gtk.org/gdk4/struct.EventSequence.html)." GdkEventSequence
@doc "See the [GTK docs](https://docs.gtk.org/gdk4/struct.FileList.html)." GdkFileList
@doc "See the [GTK docs](https://docs.gtk.org/gdk4/struct.FrameTimings.html)." GdkFrameTimings
Expand Down Expand Up @@ -762,6 +766,28 @@ $(Expr(:toplevel, quote
end
end
end
begin
abstract type GdkGLTextureBuilder <: GObject end
mutable struct GdkGLTextureBuilderLeaf <: GdkGLTextureBuilder
handle::Ptr{GObject}
function GdkGLTextureBuilderLeaf(handle::Ptr{GObject}, owns = false)
if handle == C_NULL
error("Cannot construct GdkGLTextureBuilderLeaf with a NULL pointer")
end
GLib.gobject_maybe_sink(handle, owns)
return gobject_ref(new(handle))
end
end
gtype_wrapper_cache[:GdkGLTextureBuilder] = GdkGLTextureBuilderLeaf
(GLib.g_type(::Type{T}) where T <: GdkGLTextureBuilder) = begin
ccall(("gdk_gl_texture_builder_get_type", libgtk4), GType, ())
end
end
begin
function GLib.signalnames(::Type{GdkGLTextureBuilder})
signalnames(supertype(GdkGLTextureBuilder))
end
end
begin
abstract type GdkGrabBrokenEvent <: GdkEvent end
end
Expand Down Expand Up @@ -1028,8 +1054,10 @@ $(Expr(:toplevel, quote
GLib.setproperties!(obj; kwargs...)
obj
end
function GdkGLTexture(_context::GdkGLContext, _id::Integer, _width::Integer, _height::Integer, _destroy::Function, _data::Maybe(Nothing))
G_.GLTexture_new(_context, _id, _width, _height, _destroy, _data)
function GdkGLTextureBuilder(; kwargs...)
obj = G_.GLTextureBuilder_new()
GLib.setproperties!(obj; kwargs...)
obj
end
function GdkMemoryTexture(_width::Integer, _height::Integer, _format, _bytes::GBytes, _stride::Integer)
G_.MemoryTexture_new(_width, _height, _format, _bytes, _stride)
Expand Down Expand Up @@ -1087,6 +1115,7 @@ $(Expr(:toplevel, quote
@doc "See the [GTK docs](https://docs.gtk.org/gdk4/class.FrameClock.html)." GdkFrameClock
@doc "See the [GTK docs](https://docs.gtk.org/gdk4/class.GLContext.html)." GdkGLContext
@doc "See the [GTK docs](https://docs.gtk.org/gdk4/class.GLTexture.html)." GdkGLTexture
@doc "See the [GTK docs](https://docs.gtk.org/gdk4/class.GLTextureBuilder.html)." GdkGLTextureBuilder
@doc "See the [GTK docs](https://docs.gtk.org/gdk4/class.GrabBrokenEvent.html)." GdkGrabBrokenEvent
@doc "See the [GTK docs](https://docs.gtk.org/gdk4/class.KeyEvent.html)." GdkKeyEvent
@doc "See the [GTK docs](https://docs.gtk.org/gdk4/class.MemoryTexture.html)." GdkMemoryTexture
Expand Down Expand Up @@ -1248,6 +1277,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, GdkEventSequence, GdkFileList, GdkFrameTimings, GdkKeymapKey, _GdkKeymapKey, GdkPopupLayout, GdkRGBA, _GdkRGBA, GdkRectangle, _GdkRectangle, GdkTimeCoord, _GdkTimeCoord, GdkToplevelLayout, GdkAppLaunchContext, GdkAppLaunchContextLeaf, GdkButtonEvent, GdkButtonEventLeaf, GdkCairoContext, GdkClipboard, GdkClipboardLeaf, GdkContentDeserializer, GdkContentDeserializerLeaf, GdkContentProvider, GdkContentProviderLeaf, GdkContentSerializer, GdkContentSerializerLeaf, GdkCrossingEvent, GdkCrossingEventLeaf, GdkCursor, GdkCursorLeaf, GdkDNDEvent, GdkDNDEventLeaf, GdkDeleteEvent, GdkDeleteEventLeaf, GdkDevice, GdkDeviceTool, GdkDeviceToolLeaf, GdkDisplay, GdkDisplayLeaf, GdkDisplayManager, GdkDisplayManagerLeaf, GdkDrag, GdkDrawContext, GdkDrop, GdkEvent, GdkFocusEvent, GdkFocusEventLeaf, GdkFrameClock, GdkGLContext, GdkGLTexture, GdkGLTextureLeaf, 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, GdkDevicePad, GdkDragSurface, GdkPaintable, GdkPopup, GdkToplevel
export GdkContentFormats, GdkContentFormatsBuilder, GdkDragSurfaceSize, GdkEventSequence, GdkFileList, GdkFrameTimings, GdkKeymapKey, _GdkKeymapKey, GdkPopupLayout, GdkRGBA, _GdkRGBA, GdkRectangle, _GdkRectangle, GdkTimeCoord, _GdkTimeCoord, GdkToplevelLayout, GdkAppLaunchContext, GdkAppLaunchContextLeaf, GdkButtonEvent, GdkButtonEventLeaf, GdkCairoContext, GdkClipboard, GdkClipboardLeaf, GdkContentDeserializer, GdkContentDeserializerLeaf, GdkContentProvider, GdkContentProviderLeaf, GdkContentSerializer, GdkContentSerializerLeaf, GdkCrossingEvent, GdkCrossingEventLeaf, GdkCursor, GdkCursorLeaf, GdkDNDEvent, GdkDNDEventLeaf, GdkDeleteEvent, GdkDeleteEventLeaf, GdkDevice, GdkDeviceTool, GdkDeviceToolLeaf, GdkDisplay, GdkDisplayLeaf, GdkDisplayManager, GdkDisplayManagerLeaf, GdkDrag, GdkDrawContext, GdkDrop, GdkEvent, GdkFocusEvent, GdkFocusEventLeaf, GdkFrameClock, GdkGLContext, GdkGLTexture, GdkGLTextureLeaf, GdkGLTextureBuilder, GdkGLTextureBuilderLeaf, GdkGrabBrokenEvent, GdkGrabBrokenEventLeaf, GdkKeyEvent, GdkKeyEventLeaf, GdkMemoryTexture, GdkMemoryTextureLeaf, GdkMonitor, GdkMonitorLeaf, GdkMotionEvent, GdkMotionEventLeaf, GdkPadEvent, GdkPadEventLeaf, GdkProximityEvent, GdkProximityEventLeaf, GdkScrollEvent, GdkScrollEventLeaf, GdkSeat, GdkSnapshot, GdkSurface, GdkTexture, GdkTouchEvent, GdkTouchEventLeaf, GdkTouchpadEvent, GdkTouchpadEventLeaf, GdkVulkanContext, GdkDevicePad, GdkDragSurface, GdkPaintable, GdkPopup, GdkToplevel
end))
end
Loading

0 comments on commit f6dc0b7

Please sign in to comment.