Skip to content
This repository has been archived by the owner on Jun 9, 2024. It is now read-only.

Commit

Permalink
Generate field access methods for ImGuiPlatformMonitor
Browse files Browse the repository at this point in the history
  • Loading branch information
Gnimuc committed May 26, 2021
1 parent 8160a17 commit 75ef988
Show file tree
Hide file tree
Showing 15 changed files with 183 additions and 0 deletions.
1 change: 1 addition & 0 deletions gen/generator.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,5 @@ field_access_method_list = [
"ImGuiViewport",
"ImVec2",
"ImVec4",
"ImGuiPlatformMonitor",
]
13 changes: 13 additions & 0 deletions lib/aarch64-apple-darwin20.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1571,6 +1571,19 @@ struct ImGuiPlatformMonitor
DpiScale::Cfloat
end

function Base.getproperty(x::Ptr{ImGuiPlatformMonitor}, f::Symbol)
f === :MainPos && return Ptr{ImVec2}(x + 0)
f === :MainSize && return Ptr{ImVec2}(x + 8)
f === :WorkPos && return Ptr{ImVec2}(x + 16)
f === :WorkSize && return Ptr{ImVec2}(x + 24)
f === :DpiScale && return Ptr{Cfloat}(x + 32)
return getfield(x, f)
end

function Base.setproperty!(x::Ptr{ImGuiPlatformMonitor}, f::Symbol, v)
unsafe_store!(getproperty(x, f), v)
end

struct ImVector_ImGuiPlatformMonitor
Size::Cint
Capacity::Cint
Expand Down
13 changes: 13 additions & 0 deletions lib/aarch64-linux-gnu.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1571,6 +1571,19 @@ struct ImGuiPlatformMonitor
DpiScale::Cfloat
end

function Base.getproperty(x::Ptr{ImGuiPlatformMonitor}, f::Symbol)
f === :MainPos && return Ptr{ImVec2}(x + 0)
f === :MainSize && return Ptr{ImVec2}(x + 8)
f === :WorkPos && return Ptr{ImVec2}(x + 16)
f === :WorkSize && return Ptr{ImVec2}(x + 24)
f === :DpiScale && return Ptr{Cfloat}(x + 32)
return getfield(x, f)
end

function Base.setproperty!(x::Ptr{ImGuiPlatformMonitor}, f::Symbol, v)
unsafe_store!(getproperty(x, f), v)
end

struct ImVector_ImGuiPlatformMonitor
Size::Cint
Capacity::Cint
Expand Down
13 changes: 13 additions & 0 deletions lib/aarch64-linux-musl.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1569,6 +1569,19 @@ struct ImGuiPlatformMonitor
DpiScale::Cfloat
end

function Base.getproperty(x::Ptr{ImGuiPlatformMonitor}, f::Symbol)
f === :MainPos && return Ptr{ImVec2}(x + 0)
f === :MainSize && return Ptr{ImVec2}(x + 8)
f === :WorkPos && return Ptr{ImVec2}(x + 16)
f === :WorkSize && return Ptr{ImVec2}(x + 24)
f === :DpiScale && return Ptr{Cfloat}(x + 32)
return getfield(x, f)
end

function Base.setproperty!(x::Ptr{ImGuiPlatformMonitor}, f::Symbol, v)
unsafe_store!(getproperty(x, f), v)
end

struct ImVector_ImGuiPlatformMonitor
Size::Cint
Capacity::Cint
Expand Down
13 changes: 13 additions & 0 deletions lib/armv7l-linux-gnueabihf.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1571,6 +1571,19 @@ struct ImGuiPlatformMonitor
DpiScale::Cfloat
end

function Base.getproperty(x::Ptr{ImGuiPlatformMonitor}, f::Symbol)
f === :MainPos && return Ptr{ImVec2}(x + 0)
f === :MainSize && return Ptr{ImVec2}(x + 8)
f === :WorkPos && return Ptr{ImVec2}(x + 16)
f === :WorkSize && return Ptr{ImVec2}(x + 24)
f === :DpiScale && return Ptr{Cfloat}(x + 32)
return getfield(x, f)
end

function Base.setproperty!(x::Ptr{ImGuiPlatformMonitor}, f::Symbol, v)
unsafe_store!(getproperty(x, f), v)
end

struct ImVector_ImGuiPlatformMonitor
Size::Cint
Capacity::Cint
Expand Down
13 changes: 13 additions & 0 deletions lib/armv7l-linux-musleabihf.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1569,6 +1569,19 @@ struct ImGuiPlatformMonitor
DpiScale::Cfloat
end

function Base.getproperty(x::Ptr{ImGuiPlatformMonitor}, f::Symbol)
f === :MainPos && return Ptr{ImVec2}(x + 0)
f === :MainSize && return Ptr{ImVec2}(x + 8)
f === :WorkPos && return Ptr{ImVec2}(x + 16)
f === :WorkSize && return Ptr{ImVec2}(x + 24)
f === :DpiScale && return Ptr{Cfloat}(x + 32)
return getfield(x, f)
end

function Base.setproperty!(x::Ptr{ImGuiPlatformMonitor}, f::Symbol, v)
unsafe_store!(getproperty(x, f), v)
end

struct ImVector_ImGuiPlatformMonitor
Size::Cint
Capacity::Cint
Expand Down
13 changes: 13 additions & 0 deletions lib/i686-linux-gnu.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1571,6 +1571,19 @@ struct ImGuiPlatformMonitor
DpiScale::Cfloat
end

function Base.getproperty(x::Ptr{ImGuiPlatformMonitor}, f::Symbol)
f === :MainPos && return Ptr{ImVec2}(x + 0)
f === :MainSize && return Ptr{ImVec2}(x + 8)
f === :WorkPos && return Ptr{ImVec2}(x + 16)
f === :WorkSize && return Ptr{ImVec2}(x + 24)
f === :DpiScale && return Ptr{Cfloat}(x + 32)
return getfield(x, f)
end

function Base.setproperty!(x::Ptr{ImGuiPlatformMonitor}, f::Symbol, v)
unsafe_store!(getproperty(x, f), v)
end

struct ImVector_ImGuiPlatformMonitor
Size::Cint
Capacity::Cint
Expand Down
13 changes: 13 additions & 0 deletions lib/i686-linux-musl.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1569,6 +1569,19 @@ struct ImGuiPlatformMonitor
DpiScale::Cfloat
end

function Base.getproperty(x::Ptr{ImGuiPlatformMonitor}, f::Symbol)
f === :MainPos && return Ptr{ImVec2}(x + 0)
f === :MainSize && return Ptr{ImVec2}(x + 8)
f === :WorkPos && return Ptr{ImVec2}(x + 16)
f === :WorkSize && return Ptr{ImVec2}(x + 24)
f === :DpiScale && return Ptr{Cfloat}(x + 32)
return getfield(x, f)
end

function Base.setproperty!(x::Ptr{ImGuiPlatformMonitor}, f::Symbol, v)
unsafe_store!(getproperty(x, f), v)
end

struct ImVector_ImGuiPlatformMonitor
Size::Cint
Capacity::Cint
Expand Down
13 changes: 13 additions & 0 deletions lib/i686-w64-mingw32.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1585,6 +1585,19 @@ struct ImGuiPlatformMonitor
DpiScale::Cfloat
end

function Base.getproperty(x::Ptr{ImGuiPlatformMonitor}, f::Symbol)
f === :MainPos && return Ptr{ImVec2}(x + 0)
f === :MainSize && return Ptr{ImVec2}(x + 8)
f === :WorkPos && return Ptr{ImVec2}(x + 16)
f === :WorkSize && return Ptr{ImVec2}(x + 24)
f === :DpiScale && return Ptr{Cfloat}(x + 32)
return getfield(x, f)
end

function Base.setproperty!(x::Ptr{ImGuiPlatformMonitor}, f::Symbol, v)
unsafe_store!(getproperty(x, f), v)
end

struct ImVector_ImGuiPlatformMonitor
Size::Cint
Capacity::Cint
Expand Down
13 changes: 13 additions & 0 deletions lib/powerpc64le-linux-gnu.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1571,6 +1571,19 @@ struct ImGuiPlatformMonitor
DpiScale::Cfloat
end

function Base.getproperty(x::Ptr{ImGuiPlatformMonitor}, f::Symbol)
f === :MainPos && return Ptr{ImVec2}(x + 0)
f === :MainSize && return Ptr{ImVec2}(x + 8)
f === :WorkPos && return Ptr{ImVec2}(x + 16)
f === :WorkSize && return Ptr{ImVec2}(x + 24)
f === :DpiScale && return Ptr{Cfloat}(x + 32)
return getfield(x, f)
end

function Base.setproperty!(x::Ptr{ImGuiPlatformMonitor}, f::Symbol, v)
unsafe_store!(getproperty(x, f), v)
end

struct ImVector_ImGuiPlatformMonitor
Size::Cint
Capacity::Cint
Expand Down
13 changes: 13 additions & 0 deletions lib/x86_64-apple-darwin14.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1571,6 +1571,19 @@ struct ImGuiPlatformMonitor
DpiScale::Cfloat
end

function Base.getproperty(x::Ptr{ImGuiPlatformMonitor}, f::Symbol)
f === :MainPos && return Ptr{ImVec2}(x + 0)
f === :MainSize && return Ptr{ImVec2}(x + 8)
f === :WorkPos && return Ptr{ImVec2}(x + 16)
f === :WorkSize && return Ptr{ImVec2}(x + 24)
f === :DpiScale && return Ptr{Cfloat}(x + 32)
return getfield(x, f)
end

function Base.setproperty!(x::Ptr{ImGuiPlatformMonitor}, f::Symbol, v)
unsafe_store!(getproperty(x, f), v)
end

struct ImVector_ImGuiPlatformMonitor
Size::Cint
Capacity::Cint
Expand Down
13 changes: 13 additions & 0 deletions lib/x86_64-linux-gnu.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1571,6 +1571,19 @@ struct ImGuiPlatformMonitor
DpiScale::Cfloat
end

function Base.getproperty(x::Ptr{ImGuiPlatformMonitor}, f::Symbol)
f === :MainPos && return Ptr{ImVec2}(x + 0)
f === :MainSize && return Ptr{ImVec2}(x + 8)
f === :WorkPos && return Ptr{ImVec2}(x + 16)
f === :WorkSize && return Ptr{ImVec2}(x + 24)
f === :DpiScale && return Ptr{Cfloat}(x + 32)
return getfield(x, f)
end

function Base.setproperty!(x::Ptr{ImGuiPlatformMonitor}, f::Symbol, v)
unsafe_store!(getproperty(x, f), v)
end

struct ImVector_ImGuiPlatformMonitor
Size::Cint
Capacity::Cint
Expand Down
13 changes: 13 additions & 0 deletions lib/x86_64-linux-musl.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1569,6 +1569,19 @@ struct ImGuiPlatformMonitor
DpiScale::Cfloat
end

function Base.getproperty(x::Ptr{ImGuiPlatformMonitor}, f::Symbol)
f === :MainPos && return Ptr{ImVec2}(x + 0)
f === :MainSize && return Ptr{ImVec2}(x + 8)
f === :WorkPos && return Ptr{ImVec2}(x + 16)
f === :WorkSize && return Ptr{ImVec2}(x + 24)
f === :DpiScale && return Ptr{Cfloat}(x + 32)
return getfield(x, f)
end

function Base.setproperty!(x::Ptr{ImGuiPlatformMonitor}, f::Symbol, v)
unsafe_store!(getproperty(x, f), v)
end

struct ImVector_ImGuiPlatformMonitor
Size::Cint
Capacity::Cint
Expand Down
13 changes: 13 additions & 0 deletions lib/x86_64-unknown-freebsd11.1.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1571,6 +1571,19 @@ struct ImGuiPlatformMonitor
DpiScale::Cfloat
end

function Base.getproperty(x::Ptr{ImGuiPlatformMonitor}, f::Symbol)
f === :MainPos && return Ptr{ImVec2}(x + 0)
f === :MainSize && return Ptr{ImVec2}(x + 8)
f === :WorkPos && return Ptr{ImVec2}(x + 16)
f === :WorkSize && return Ptr{ImVec2}(x + 24)
f === :DpiScale && return Ptr{Cfloat}(x + 32)
return getfield(x, f)
end

function Base.setproperty!(x::Ptr{ImGuiPlatformMonitor}, f::Symbol, v)
unsafe_store!(getproperty(x, f), v)
end

struct ImVector_ImGuiPlatformMonitor
Size::Cint
Capacity::Cint
Expand Down
13 changes: 13 additions & 0 deletions lib/x86_64-w64-mingw32.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1585,6 +1585,19 @@ struct ImGuiPlatformMonitor
DpiScale::Cfloat
end

function Base.getproperty(x::Ptr{ImGuiPlatformMonitor}, f::Symbol)
f === :MainPos && return Ptr{ImVec2}(x + 0)
f === :MainSize && return Ptr{ImVec2}(x + 8)
f === :WorkPos && return Ptr{ImVec2}(x + 16)
f === :WorkSize && return Ptr{ImVec2}(x + 24)
f === :DpiScale && return Ptr{Cfloat}(x + 32)
return getfield(x, f)
end

function Base.setproperty!(x::Ptr{ImGuiPlatformMonitor}, f::Symbol, v)
unsafe_store!(getproperty(x, f), v)
end

struct ImVector_ImGuiPlatformMonitor
Size::Cint
Capacity::Cint
Expand Down

0 comments on commit 75ef988

Please sign in to comment.