-
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.
Build imgui_test_engine in cimgui-pack
This is needed for linking.
- Loading branch information
1 parent
637507e
commit bc37505
Showing
51 changed files
with
6,980 additions
and
5 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
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
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,2 +1,4 @@ | ||
[deps] | ||
CxxWrap = "1f15a43c-97ca-5a2a-ae31-89f07a497df4" | ||
GLFW_jll = "0656b61e-2033-5cc2-a64a-77c0f6c09b89" | ||
WrapIt = "962878d8-9763-11ee-8c14-fbf60c98afae" |
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 |
---|---|---|
@@ -0,0 +1,4 @@ | ||
[deps] | ||
CImGuiPack_jll = "333409e9-af72-5310-9767-d6ad21a76a05" | ||
CxxWrap = "1f15a43c-97ca-5a2a-ae31-89f07a497df4" | ||
WrapIt = "962878d8-9763-11ee-8c14-fbf60c98afae" |
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,17 @@ | ||
module_name = "ImGuiTestEngine" | ||
uuid = "d6eb4cb6-1e07-14c4-5835-ae91bedf8555" | ||
include_dirs = [".", "./imgui_test_engine/imgui_test_engine", "../cimgui/imgui"] | ||
input = ["imgui_te_engine.h", "imgui_te_internal.h", "imgui_te_context.h", | ||
"imgui_te_perftool.h", "imgui_te_ui.h", "imgui_te_utils.h", "imgui_te_exporters.h", | ||
"overrides.h"] | ||
cxx-std = "c++17" | ||
out_cxx_dir = "src" | ||
|
||
veto_list = "veto_list.txt" | ||
extra_headers = ["imgui.h", "imgui_internal.h", "thirdparty/Str/Str.h"] | ||
clang_opts = ["-DIMGUI_TEST_ENGINE_ENABLE_STD_FUNCTION=1", "-DIMGUI_DISABLE_OBSOLETE_FUNCTIONS=1", | ||
"-I{CXXWRAP_INCLUDE_DIR}", | ||
"-I{JULIA_INCLUDE_DIR}"] | ||
lib_basename = "$(@__DIR__)/../../../build/libcimgui" | ||
export = "none" | ||
vetoed_copy_ctor_classes = ["ImGuiContext"] |
Submodule imgui_test_engine
added at
c3a507
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,43 @@ | ||
#ifndef OVERRIDES_H | ||
#define OVERRIDES_H | ||
|
||
#include "imgui_internal.h" | ||
#include "imgui_te_engine.h" | ||
#include "jlcxx/array.hpp" | ||
|
||
inline void* TestFunc(ImGuiTest* test) { | ||
return reinterpret_cast<void*>(test->TestFunc); | ||
} | ||
|
||
inline void* set_TestFunc(ImGuiTest* test, void* func) { | ||
test->TestFunc = reinterpret_cast<ImGuiTestTestFunc*>(func); | ||
return func; | ||
} | ||
|
||
inline void* GuiFunc(ImGuiTest* test) { | ||
return reinterpret_cast<void*>(test->GuiFunc); | ||
} | ||
|
||
inline void* set_GuiFunc(ImGuiTest* test, void* func) { | ||
test->GuiFunc = reinterpret_cast<ImGuiTestGuiFunc*>(func); | ||
return func; | ||
} | ||
|
||
inline ImGuiContext* Ptr2ImGuiContext(void* ctx) { | ||
return static_cast<ImGuiContext*>(ctx); | ||
} | ||
|
||
inline jlcxx::Array<ImGuiTest*> TestsAll(ImGuiTestEngine* engine) { | ||
auto size{ engine->TestsAll.size() }; | ||
jlcxx::Array<ImGuiTest*> tests{ static_cast<size_t>(size) }; | ||
|
||
ImGuiTest** data_ptr{ jl_array_data(tests.wrapped(), ImGuiTest*) }; | ||
|
||
for (int i = 0; i < size; ++i) { | ||
data_ptr[i] = engine->TestsAll[i]; | ||
} | ||
|
||
return tests; | ||
} | ||
|
||
#endif |
Oops, something went wrong.