-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #119 from Gnimuc/merge-deps
Merge cimgui-pack and LibCImGui.jl
- Loading branch information
Showing
31 changed files
with
192,933 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,9 @@ | ||
name: CI | ||
|
||
on: | ||
- push | ||
- pull_request | ||
|
||
jobs: | ||
loading: | ||
name: Loading only - Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} | ||
|
@@ -30,11 +32,14 @@ jobs: | |
with: | ||
version: ${{ matrix.version }} | ||
arch: ${{ matrix.arch }} | ||
- run: | | ||
julia --project=. -e 'using Pkg; Pkg.develop(PackageSpec(path="LibCImGui.jl"))' | ||
- uses: julia-actions/julia-buildpkg@v1 | ||
- uses: julia-actions/julia-runtest@v1 | ||
- uses: julia-actions/[email protected] | ||
env: | ||
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | ||
|
||
tests: | ||
name: Tests - Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} | ||
runs-on: ${{ matrix.os }} | ||
|
@@ -54,6 +59,8 @@ jobs: | |
with: | ||
version: ${{ matrix.version }} | ||
arch: ${{ matrix.arch }} | ||
- run: | | ||
julia --project=. -e 'using Pkg; Pkg.develop(PackageSpec(path="LibCImGui.jl"))' | ||
- uses: julia-actions/julia-buildpkg@v1 | ||
- uses: julia-actions/julia-runtest@v1 | ||
with: | ||
|
@@ -63,6 +70,7 @@ jobs: | |
- uses: julia-actions/[email protected] | ||
env: | ||
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | ||
|
||
docs: | ||
name: Documentation | ||
runs-on: ubuntu-latest | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,4 +5,6 @@ | |
*.jl.mem | ||
*.ini | ||
imgui_log.txt | ||
.vscode | ||
.vscode | ||
*Manifest.toml | ||
build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
[submodule "cimgui"] | ||
path = cimgui-pack/cimgui | ||
url = https://github.com/cimgui/cimgui.git | ||
[submodule "cimplot"] | ||
path = cimgui-pack/cimplot | ||
url = https://github.com/cimgui/cimplot.git | ||
[submodule "cimnodes"] | ||
path = cimgui-pack/cimnodes | ||
url = https://github.com/cimgui/cimnodes.git |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2021 Yupei Qi | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
name = "LibCImGui" | ||
uuid = "9be01004-c4f5-478b-abeb-cb32b114cf5e" | ||
authors = ["Yupei Qi <[email protected]>"] | ||
version = "1.89.5" | ||
|
||
[deps] | ||
CEnum = "fa961155-64e5-5f13-b03f-caf6b980ea82" | ||
CImGuiPack_jll = "333409e9-af72-5310-9767-d6ad21a76a05" | ||
|
||
[compat] | ||
CEnum = "0.4,0.5" | ||
CImGuiPack_jll = "~0.2" | ||
julia = "1.6" | ||
|
||
[extras] | ||
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" | ||
|
||
[targets] | ||
test = ["Test"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
# LibCImGui | ||
|
||
[![CI](https://github.com/JuliaImGui/LibCImGui.jl/actions/workflows/ci.yml/badge.svg)](https://github.com/JuliaImGui/LibCImGui.jl/actions/workflows/ci.yml) | ||
[![TagBot](https://github.com/JuliaImGui/LibCImGui.jl/actions/workflows/TagBot.yml/badge.svg)](https://github.com/JuliaImGui/LibCImGui.jl/actions/workflows/TagBot.yml) | ||
[![Coverage](https://codecov.io/gh/JuliaImGui/LibCImGui.jl/branch/master/graph/badge.svg)](https://codecov.io/gh/JuliaImGui/LibCImGui.jl) | ||
|
||
Julia language binding for [cimgui](https://github.com/cimgui/cimgui)(docking | ||
branch), [cimplot](https://github.com/cimgui/cimplot), and | ||
[cimnodes](https://github.com/cimgui/cimnodes). | ||
|
||
The code the bindings are generated from come from the | ||
[CImGuiPack](https://github.com/JuliaPackaging/Yggdrasil/tree/master/C/CImGuiPack) | ||
JLL, which is built from the | ||
[cimgui-pack](https://github.com/JuliaImGui/cimgui-pack) repo. Note that the | ||
versioning of this repo *does not* exactly match upstream Dear ImGui, we only | ||
match the major and minor version. The patch version is specific to | ||
LibCImGui.jl. See the release notes for the exact Dear ImGui version used for | ||
each LibCImGui.jl release. | ||
|
||
## Installation | ||
``` | ||
pkg> add LibCImGui | ||
``` | ||
|
||
If you are looking for a high-level Julian API you might wish to take a look at [CImGui.jl](https://github.com/Gnimuc/CImGui.jl). | ||
|
||
## Updating | ||
The bindings for the different platforms in [lib/](lib/) are generated by the | ||
files in [gen/](gen/). To update the bindings you'll first need to update | ||
`CImGuiPack_jll`, then run: | ||
``` | ||
julia --project=gen generator.jl | ||
``` | ||
|
||
The first time might take a while since it has to download artifacts for each | ||
platform. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
[deps] | ||
CEnum = "fa961155-64e5-5f13-b03f-caf6b980ea82" | ||
CImGuiPack_jll = "333409e9-af72-5310-9767-d6ad21a76a05" | ||
Clang = "40e3b903-d033-50b4-a0cc-940c62c95e31" | ||
|
||
[compat] | ||
CEnum = "0.2,0.3,0.4" | ||
CImGuiPack_jll = "~0.1" | ||
Clang = "0.17" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
using Clang.Generators | ||
using Clang.JLLEnvs | ||
using CImGuiPack_jll | ||
|
||
cd(@__DIR__) | ||
|
||
include_dir = joinpath(CImGuiPack_jll.artifact_dir, "include") | ||
|
||
cimgui_h = joinpath(include_dir, "cimgui.h") |> normpath | ||
cimplot_h = joinpath(include_dir, "cimplot.h") |> normpath | ||
cimnodes_h = joinpath(include_dir, "cimnodes.h") |> normpath | ||
|
||
for target in JLLEnvs.JLL_ENV_TRIPLES | ||
@info "processing $target" | ||
|
||
options = load_options(joinpath(@__DIR__, "generator.toml")) | ||
options["general"]["output_file_path"] = joinpath(@__DIR__, "..", "lib", "$target.jl") | ||
|
||
args = get_default_args(target) | ||
push!(args, "-I$include_dir", "-DCIMGUI_DEFINE_ENUMS_AND_STRUCTS") | ||
|
||
ctx = create_context([cimgui_h, cimplot_h, cimnodes_h], args, options) | ||
|
||
build!(ctx) | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
[general] | ||
library_name = "libcimgui" | ||
|
||
output_ignorelist = [ | ||
"API", | ||
"EXTERN", | ||
"CIMGUI_API", | ||
"CONST", | ||
"CIMGUI_INCLUDED", | ||
] | ||
|
||
[codegen] | ||
field_access_method_list = [ | ||
"ImGuiIO", | ||
"ImDrawList", | ||
"ImDrawData", | ||
"ImDrawCmd", | ||
"ImFontAtlas", | ||
"ImGuiSizeCallbackData", | ||
"ImFontConfig", | ||
"ImGuiPlatformIO", | ||
"ImGuiViewport", | ||
"ImVec2", | ||
"ImVec4", | ||
"ImGuiPlatformMonitor", | ||
"ImGuiStyle", | ||
] | ||
wrap_variadic_function = true |
Oops, something went wrong.