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 ImGuiStyle
Browse files Browse the repository at this point in the history
  • Loading branch information
Gnimuc committed May 29, 2021
1 parent fdf0a3d commit 9af63ee
Show file tree
Hide file tree
Showing 16 changed files with 674 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "LibCImGui"
uuid = "9be01004-c4f5-478b-abeb-cb32b114cf5e"
authors = ["Yupei Qi <[email protected]>"]
version = "1.82.1"
version = "1.82.2"

[deps]
CEnum = "fa961155-64e5-5f13-b03f-caf6b980ea82"
Expand Down
1 change: 1 addition & 0 deletions gen/generator.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,5 @@ field_access_method_list = [
"ImVec2",
"ImVec4",
"ImGuiPlatformMonitor",
"ImGuiStyle",
]
48 changes: 48 additions & 0 deletions lib/aarch64-apple-darwin20.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1544,6 +1544,54 @@ struct ImGuiStyle
Colors::NTuple{55, ImVec4}
end

function Base.getproperty(x::Ptr{ImGuiStyle}, f::Symbol)
f === :Alpha && return Ptr{Cfloat}(x + 0)
f === :WindowPadding && return Ptr{ImVec2}(x + 4)
f === :WindowRounding && return Ptr{Cfloat}(x + 12)
f === :WindowBorderSize && return Ptr{Cfloat}(x + 16)
f === :WindowMinSize && return Ptr{ImVec2}(x + 20)
f === :WindowTitleAlign && return Ptr{ImVec2}(x + 28)
f === :WindowMenuButtonPosition && return Ptr{ImGuiDir}(x + 36)
f === :ChildRounding && return Ptr{Cfloat}(x + 40)
f === :ChildBorderSize && return Ptr{Cfloat}(x + 44)
f === :PopupRounding && return Ptr{Cfloat}(x + 48)
f === :PopupBorderSize && return Ptr{Cfloat}(x + 52)
f === :FramePadding && return Ptr{ImVec2}(x + 56)
f === :FrameRounding && return Ptr{Cfloat}(x + 64)
f === :FrameBorderSize && return Ptr{Cfloat}(x + 68)
f === :ItemSpacing && return Ptr{ImVec2}(x + 72)
f === :ItemInnerSpacing && return Ptr{ImVec2}(x + 80)
f === :CellPadding && return Ptr{ImVec2}(x + 88)
f === :TouchExtraPadding && return Ptr{ImVec2}(x + 96)
f === :IndentSpacing && return Ptr{Cfloat}(x + 104)
f === :ColumnsMinSpacing && return Ptr{Cfloat}(x + 108)
f === :ScrollbarSize && return Ptr{Cfloat}(x + 112)
f === :ScrollbarRounding && return Ptr{Cfloat}(x + 116)
f === :GrabMinSize && return Ptr{Cfloat}(x + 120)
f === :GrabRounding && return Ptr{Cfloat}(x + 124)
f === :LogSliderDeadzone && return Ptr{Cfloat}(x + 128)
f === :TabRounding && return Ptr{Cfloat}(x + 132)
f === :TabBorderSize && return Ptr{Cfloat}(x + 136)
f === :TabMinWidthForCloseButton && return Ptr{Cfloat}(x + 140)
f === :ColorButtonPosition && return Ptr{ImGuiDir}(x + 144)
f === :ButtonTextAlign && return Ptr{ImVec2}(x + 148)
f === :SelectableTextAlign && return Ptr{ImVec2}(x + 156)
f === :DisplayWindowPadding && return Ptr{ImVec2}(x + 164)
f === :DisplaySafeAreaPadding && return Ptr{ImVec2}(x + 172)
f === :MouseCursorScale && return Ptr{Cfloat}(x + 180)
f === :AntiAliasedLines && return Ptr{Bool}(x + 184)
f === :AntiAliasedLinesUseTex && return Ptr{Bool}(x + 185)
f === :AntiAliasedFill && return Ptr{Bool}(x + 186)
f === :CurveTessellationTol && return Ptr{Cfloat}(x + 188)
f === :CircleTessellationMaxError && return Ptr{Cfloat}(x + 192)
f === :Colors && return Ptr{NTuple{55, ImVec4}}(x + 196)
return getfield(x, f)
end

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

struct ImGuiSizeCallbackData
UserData::Ptr{Cvoid}
Pos::ImVec2
Expand Down
48 changes: 48 additions & 0 deletions lib/aarch64-linux-gnu.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1544,6 +1544,54 @@ struct ImGuiStyle
Colors::NTuple{55, ImVec4}
end

function Base.getproperty(x::Ptr{ImGuiStyle}, f::Symbol)
f === :Alpha && return Ptr{Cfloat}(x + 0)
f === :WindowPadding && return Ptr{ImVec2}(x + 4)
f === :WindowRounding && return Ptr{Cfloat}(x + 12)
f === :WindowBorderSize && return Ptr{Cfloat}(x + 16)
f === :WindowMinSize && return Ptr{ImVec2}(x + 20)
f === :WindowTitleAlign && return Ptr{ImVec2}(x + 28)
f === :WindowMenuButtonPosition && return Ptr{ImGuiDir}(x + 36)
f === :ChildRounding && return Ptr{Cfloat}(x + 40)
f === :ChildBorderSize && return Ptr{Cfloat}(x + 44)
f === :PopupRounding && return Ptr{Cfloat}(x + 48)
f === :PopupBorderSize && return Ptr{Cfloat}(x + 52)
f === :FramePadding && return Ptr{ImVec2}(x + 56)
f === :FrameRounding && return Ptr{Cfloat}(x + 64)
f === :FrameBorderSize && return Ptr{Cfloat}(x + 68)
f === :ItemSpacing && return Ptr{ImVec2}(x + 72)
f === :ItemInnerSpacing && return Ptr{ImVec2}(x + 80)
f === :CellPadding && return Ptr{ImVec2}(x + 88)
f === :TouchExtraPadding && return Ptr{ImVec2}(x + 96)
f === :IndentSpacing && return Ptr{Cfloat}(x + 104)
f === :ColumnsMinSpacing && return Ptr{Cfloat}(x + 108)
f === :ScrollbarSize && return Ptr{Cfloat}(x + 112)
f === :ScrollbarRounding && return Ptr{Cfloat}(x + 116)
f === :GrabMinSize && return Ptr{Cfloat}(x + 120)
f === :GrabRounding && return Ptr{Cfloat}(x + 124)
f === :LogSliderDeadzone && return Ptr{Cfloat}(x + 128)
f === :TabRounding && return Ptr{Cfloat}(x + 132)
f === :TabBorderSize && return Ptr{Cfloat}(x + 136)
f === :TabMinWidthForCloseButton && return Ptr{Cfloat}(x + 140)
f === :ColorButtonPosition && return Ptr{ImGuiDir}(x + 144)
f === :ButtonTextAlign && return Ptr{ImVec2}(x + 148)
f === :SelectableTextAlign && return Ptr{ImVec2}(x + 156)
f === :DisplayWindowPadding && return Ptr{ImVec2}(x + 164)
f === :DisplaySafeAreaPadding && return Ptr{ImVec2}(x + 172)
f === :MouseCursorScale && return Ptr{Cfloat}(x + 180)
f === :AntiAliasedLines && return Ptr{Bool}(x + 184)
f === :AntiAliasedLinesUseTex && return Ptr{Bool}(x + 185)
f === :AntiAliasedFill && return Ptr{Bool}(x + 186)
f === :CurveTessellationTol && return Ptr{Cfloat}(x + 188)
f === :CircleTessellationMaxError && return Ptr{Cfloat}(x + 192)
f === :Colors && return Ptr{NTuple{55, ImVec4}}(x + 196)
return getfield(x, f)
end

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

struct ImGuiSizeCallbackData
UserData::Ptr{Cvoid}
Pos::ImVec2
Expand Down
48 changes: 48 additions & 0 deletions lib/aarch64-linux-musl.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1542,6 +1542,54 @@ struct ImGuiStyle
Colors::NTuple{55, ImVec4}
end

function Base.getproperty(x::Ptr{ImGuiStyle}, f::Symbol)
f === :Alpha && return Ptr{Cfloat}(x + 0)
f === :WindowPadding && return Ptr{ImVec2}(x + 4)
f === :WindowRounding && return Ptr{Cfloat}(x + 12)
f === :WindowBorderSize && return Ptr{Cfloat}(x + 16)
f === :WindowMinSize && return Ptr{ImVec2}(x + 20)
f === :WindowTitleAlign && return Ptr{ImVec2}(x + 28)
f === :WindowMenuButtonPosition && return Ptr{ImGuiDir}(x + 36)
f === :ChildRounding && return Ptr{Cfloat}(x + 40)
f === :ChildBorderSize && return Ptr{Cfloat}(x + 44)
f === :PopupRounding && return Ptr{Cfloat}(x + 48)
f === :PopupBorderSize && return Ptr{Cfloat}(x + 52)
f === :FramePadding && return Ptr{ImVec2}(x + 56)
f === :FrameRounding && return Ptr{Cfloat}(x + 64)
f === :FrameBorderSize && return Ptr{Cfloat}(x + 68)
f === :ItemSpacing && return Ptr{ImVec2}(x + 72)
f === :ItemInnerSpacing && return Ptr{ImVec2}(x + 80)
f === :CellPadding && return Ptr{ImVec2}(x + 88)
f === :TouchExtraPadding && return Ptr{ImVec2}(x + 96)
f === :IndentSpacing && return Ptr{Cfloat}(x + 104)
f === :ColumnsMinSpacing && return Ptr{Cfloat}(x + 108)
f === :ScrollbarSize && return Ptr{Cfloat}(x + 112)
f === :ScrollbarRounding && return Ptr{Cfloat}(x + 116)
f === :GrabMinSize && return Ptr{Cfloat}(x + 120)
f === :GrabRounding && return Ptr{Cfloat}(x + 124)
f === :LogSliderDeadzone && return Ptr{Cfloat}(x + 128)
f === :TabRounding && return Ptr{Cfloat}(x + 132)
f === :TabBorderSize && return Ptr{Cfloat}(x + 136)
f === :TabMinWidthForCloseButton && return Ptr{Cfloat}(x + 140)
f === :ColorButtonPosition && return Ptr{ImGuiDir}(x + 144)
f === :ButtonTextAlign && return Ptr{ImVec2}(x + 148)
f === :SelectableTextAlign && return Ptr{ImVec2}(x + 156)
f === :DisplayWindowPadding && return Ptr{ImVec2}(x + 164)
f === :DisplaySafeAreaPadding && return Ptr{ImVec2}(x + 172)
f === :MouseCursorScale && return Ptr{Cfloat}(x + 180)
f === :AntiAliasedLines && return Ptr{Bool}(x + 184)
f === :AntiAliasedLinesUseTex && return Ptr{Bool}(x + 185)
f === :AntiAliasedFill && return Ptr{Bool}(x + 186)
f === :CurveTessellationTol && return Ptr{Cfloat}(x + 188)
f === :CircleTessellationMaxError && return Ptr{Cfloat}(x + 192)
f === :Colors && return Ptr{NTuple{55, ImVec4}}(x + 196)
return getfield(x, f)
end

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

struct ImGuiSizeCallbackData
UserData::Ptr{Cvoid}
Pos::ImVec2
Expand Down
48 changes: 48 additions & 0 deletions lib/armv7l-linux-gnueabihf.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1544,6 +1544,54 @@ struct ImGuiStyle
Colors::NTuple{55, ImVec4}
end

function Base.getproperty(x::Ptr{ImGuiStyle}, f::Symbol)
f === :Alpha && return Ptr{Cfloat}(x + 0)
f === :WindowPadding && return Ptr{ImVec2}(x + 4)
f === :WindowRounding && return Ptr{Cfloat}(x + 12)
f === :WindowBorderSize && return Ptr{Cfloat}(x + 16)
f === :WindowMinSize && return Ptr{ImVec2}(x + 20)
f === :WindowTitleAlign && return Ptr{ImVec2}(x + 28)
f === :WindowMenuButtonPosition && return Ptr{ImGuiDir}(x + 36)
f === :ChildRounding && return Ptr{Cfloat}(x + 40)
f === :ChildBorderSize && return Ptr{Cfloat}(x + 44)
f === :PopupRounding && return Ptr{Cfloat}(x + 48)
f === :PopupBorderSize && return Ptr{Cfloat}(x + 52)
f === :FramePadding && return Ptr{ImVec2}(x + 56)
f === :FrameRounding && return Ptr{Cfloat}(x + 64)
f === :FrameBorderSize && return Ptr{Cfloat}(x + 68)
f === :ItemSpacing && return Ptr{ImVec2}(x + 72)
f === :ItemInnerSpacing && return Ptr{ImVec2}(x + 80)
f === :CellPadding && return Ptr{ImVec2}(x + 88)
f === :TouchExtraPadding && return Ptr{ImVec2}(x + 96)
f === :IndentSpacing && return Ptr{Cfloat}(x + 104)
f === :ColumnsMinSpacing && return Ptr{Cfloat}(x + 108)
f === :ScrollbarSize && return Ptr{Cfloat}(x + 112)
f === :ScrollbarRounding && return Ptr{Cfloat}(x + 116)
f === :GrabMinSize && return Ptr{Cfloat}(x + 120)
f === :GrabRounding && return Ptr{Cfloat}(x + 124)
f === :LogSliderDeadzone && return Ptr{Cfloat}(x + 128)
f === :TabRounding && return Ptr{Cfloat}(x + 132)
f === :TabBorderSize && return Ptr{Cfloat}(x + 136)
f === :TabMinWidthForCloseButton && return Ptr{Cfloat}(x + 140)
f === :ColorButtonPosition && return Ptr{ImGuiDir}(x + 144)
f === :ButtonTextAlign && return Ptr{ImVec2}(x + 148)
f === :SelectableTextAlign && return Ptr{ImVec2}(x + 156)
f === :DisplayWindowPadding && return Ptr{ImVec2}(x + 164)
f === :DisplaySafeAreaPadding && return Ptr{ImVec2}(x + 172)
f === :MouseCursorScale && return Ptr{Cfloat}(x + 180)
f === :AntiAliasedLines && return Ptr{Bool}(x + 184)
f === :AntiAliasedLinesUseTex && return Ptr{Bool}(x + 185)
f === :AntiAliasedFill && return Ptr{Bool}(x + 186)
f === :CurveTessellationTol && return Ptr{Cfloat}(x + 188)
f === :CircleTessellationMaxError && return Ptr{Cfloat}(x + 192)
f === :Colors && return Ptr{NTuple{55, ImVec4}}(x + 196)
return getfield(x, f)
end

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

struct ImGuiSizeCallbackData
UserData::Ptr{Cvoid}
Pos::ImVec2
Expand Down
48 changes: 48 additions & 0 deletions lib/armv7l-linux-musleabihf.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1542,6 +1542,54 @@ struct ImGuiStyle
Colors::NTuple{55, ImVec4}
end

function Base.getproperty(x::Ptr{ImGuiStyle}, f::Symbol)
f === :Alpha && return Ptr{Cfloat}(x + 0)
f === :WindowPadding && return Ptr{ImVec2}(x + 4)
f === :WindowRounding && return Ptr{Cfloat}(x + 12)
f === :WindowBorderSize && return Ptr{Cfloat}(x + 16)
f === :WindowMinSize && return Ptr{ImVec2}(x + 20)
f === :WindowTitleAlign && return Ptr{ImVec2}(x + 28)
f === :WindowMenuButtonPosition && return Ptr{ImGuiDir}(x + 36)
f === :ChildRounding && return Ptr{Cfloat}(x + 40)
f === :ChildBorderSize && return Ptr{Cfloat}(x + 44)
f === :PopupRounding && return Ptr{Cfloat}(x + 48)
f === :PopupBorderSize && return Ptr{Cfloat}(x + 52)
f === :FramePadding && return Ptr{ImVec2}(x + 56)
f === :FrameRounding && return Ptr{Cfloat}(x + 64)
f === :FrameBorderSize && return Ptr{Cfloat}(x + 68)
f === :ItemSpacing && return Ptr{ImVec2}(x + 72)
f === :ItemInnerSpacing && return Ptr{ImVec2}(x + 80)
f === :CellPadding && return Ptr{ImVec2}(x + 88)
f === :TouchExtraPadding && return Ptr{ImVec2}(x + 96)
f === :IndentSpacing && return Ptr{Cfloat}(x + 104)
f === :ColumnsMinSpacing && return Ptr{Cfloat}(x + 108)
f === :ScrollbarSize && return Ptr{Cfloat}(x + 112)
f === :ScrollbarRounding && return Ptr{Cfloat}(x + 116)
f === :GrabMinSize && return Ptr{Cfloat}(x + 120)
f === :GrabRounding && return Ptr{Cfloat}(x + 124)
f === :LogSliderDeadzone && return Ptr{Cfloat}(x + 128)
f === :TabRounding && return Ptr{Cfloat}(x + 132)
f === :TabBorderSize && return Ptr{Cfloat}(x + 136)
f === :TabMinWidthForCloseButton && return Ptr{Cfloat}(x + 140)
f === :ColorButtonPosition && return Ptr{ImGuiDir}(x + 144)
f === :ButtonTextAlign && return Ptr{ImVec2}(x + 148)
f === :SelectableTextAlign && return Ptr{ImVec2}(x + 156)
f === :DisplayWindowPadding && return Ptr{ImVec2}(x + 164)
f === :DisplaySafeAreaPadding && return Ptr{ImVec2}(x + 172)
f === :MouseCursorScale && return Ptr{Cfloat}(x + 180)
f === :AntiAliasedLines && return Ptr{Bool}(x + 184)
f === :AntiAliasedLinesUseTex && return Ptr{Bool}(x + 185)
f === :AntiAliasedFill && return Ptr{Bool}(x + 186)
f === :CurveTessellationTol && return Ptr{Cfloat}(x + 188)
f === :CircleTessellationMaxError && return Ptr{Cfloat}(x + 192)
f === :Colors && return Ptr{NTuple{55, ImVec4}}(x + 196)
return getfield(x, f)
end

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

struct ImGuiSizeCallbackData
UserData::Ptr{Cvoid}
Pos::ImVec2
Expand Down
48 changes: 48 additions & 0 deletions lib/i686-linux-gnu.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1544,6 +1544,54 @@ struct ImGuiStyle
Colors::NTuple{55, ImVec4}
end

function Base.getproperty(x::Ptr{ImGuiStyle}, f::Symbol)
f === :Alpha && return Ptr{Cfloat}(x + 0)
f === :WindowPadding && return Ptr{ImVec2}(x + 4)
f === :WindowRounding && return Ptr{Cfloat}(x + 12)
f === :WindowBorderSize && return Ptr{Cfloat}(x + 16)
f === :WindowMinSize && return Ptr{ImVec2}(x + 20)
f === :WindowTitleAlign && return Ptr{ImVec2}(x + 28)
f === :WindowMenuButtonPosition && return Ptr{ImGuiDir}(x + 36)
f === :ChildRounding && return Ptr{Cfloat}(x + 40)
f === :ChildBorderSize && return Ptr{Cfloat}(x + 44)
f === :PopupRounding && return Ptr{Cfloat}(x + 48)
f === :PopupBorderSize && return Ptr{Cfloat}(x + 52)
f === :FramePadding && return Ptr{ImVec2}(x + 56)
f === :FrameRounding && return Ptr{Cfloat}(x + 64)
f === :FrameBorderSize && return Ptr{Cfloat}(x + 68)
f === :ItemSpacing && return Ptr{ImVec2}(x + 72)
f === :ItemInnerSpacing && return Ptr{ImVec2}(x + 80)
f === :CellPadding && return Ptr{ImVec2}(x + 88)
f === :TouchExtraPadding && return Ptr{ImVec2}(x + 96)
f === :IndentSpacing && return Ptr{Cfloat}(x + 104)
f === :ColumnsMinSpacing && return Ptr{Cfloat}(x + 108)
f === :ScrollbarSize && return Ptr{Cfloat}(x + 112)
f === :ScrollbarRounding && return Ptr{Cfloat}(x + 116)
f === :GrabMinSize && return Ptr{Cfloat}(x + 120)
f === :GrabRounding && return Ptr{Cfloat}(x + 124)
f === :LogSliderDeadzone && return Ptr{Cfloat}(x + 128)
f === :TabRounding && return Ptr{Cfloat}(x + 132)
f === :TabBorderSize && return Ptr{Cfloat}(x + 136)
f === :TabMinWidthForCloseButton && return Ptr{Cfloat}(x + 140)
f === :ColorButtonPosition && return Ptr{ImGuiDir}(x + 144)
f === :ButtonTextAlign && return Ptr{ImVec2}(x + 148)
f === :SelectableTextAlign && return Ptr{ImVec2}(x + 156)
f === :DisplayWindowPadding && return Ptr{ImVec2}(x + 164)
f === :DisplaySafeAreaPadding && return Ptr{ImVec2}(x + 172)
f === :MouseCursorScale && return Ptr{Cfloat}(x + 180)
f === :AntiAliasedLines && return Ptr{Bool}(x + 184)
f === :AntiAliasedLinesUseTex && return Ptr{Bool}(x + 185)
f === :AntiAliasedFill && return Ptr{Bool}(x + 186)
f === :CurveTessellationTol && return Ptr{Cfloat}(x + 188)
f === :CircleTessellationMaxError && return Ptr{Cfloat}(x + 192)
f === :Colors && return Ptr{NTuple{55, ImVec4}}(x + 196)
return getfield(x, f)
end

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

struct ImGuiSizeCallbackData
UserData::Ptr{Cvoid}
Pos::ImVec2
Expand Down
Loading

2 comments on commit 9af63ee

@Gnimuc
Copy link
Member Author

@Gnimuc Gnimuc commented on 9af63ee May 29, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/37770

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v1.82.2 -m "<description of version>" 9af63ee69dc109000dabdb30ef86073d546738c3
git push origin v1.82.2

Please sign in to comment.