imgui-bindings 0.0.4 → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/ChangeLog +12 -0
- data/README.md +33 -13
- data/lib/imgui.dll +0 -0
- data/lib/imgui.dylib +0 -0
- data/lib/imgui.rb +2 -30
- data/lib/imgui_impl_opengl3.rb +3 -3
- data/lib/imgui_impl_sdl2.rb +1 -1
- data/lib/imgui_impl_sdlrenderer.rb +0 -1
- data/lib/imgui_internal.rb +49 -0
- data/lib/imnodes.dll +0 -0
- data/lib/imnodes.dylib +0 -0
- data/lib/imnodes.rb +161 -0
- metadata +7 -5
- data/lib/imgui_debug.dll +0 -0
- data/lib/imgui_debug.dylib +0 -0
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 9d85ab51913e9f7e8f1a53d6ec0da01c5d6622242beebd9bada8d09bc0fe7023
|
|
4
|
+
data.tar.gz: e5e0393ed8d1f481c6ed735f2ef09caefdf8f0049ddf66c4cd8ba461a8e6e5c6
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 701c4754521d32d9a951492a55ce1f6a18b83d1a420053ce8aaeae1bdfc7b053807c719a3b79c07668a6b613dc18793e71e12741ae1346a2e484344a8d15db83
|
|
7
|
+
data.tar.gz: 1ec45b3575411a865285bd6aea1af87925321d592154edd4759bc4ba91da993c503058d4115fae02cf1dd4a4fceb7a72bfcb16e10321e7039018b5f94180413c
|
data/ChangeLog
CHANGED
|
@@ -1,7 +1,19 @@
|
|
|
1
|
+
2022-08-14 vaiorabbit <http://twitter.com/vaiorabbit>
|
|
2
|
+
|
|
3
|
+
* Added ImNodes ( https://github.com/rokups/ImNodes ) support
|
|
4
|
+
* Moved cimgui location
|
|
5
|
+
* Removed unmaintained debug version of shared libraries
|
|
6
|
+
* Added hand-written binding code for imgui_internal.h
|
|
7
|
+
|
|
8
|
+
2022-08-06 vaiorabbit <http://twitter.com/vaiorabbit>
|
|
9
|
+
|
|
10
|
+
* Fixed several warnings
|
|
11
|
+
|
|
1
12
|
2022-07-02 vaiorabbit <http://twitter.com/vaiorabbit>
|
|
2
13
|
|
|
3
14
|
* (macOS) ImGui 1.88
|
|
4
15
|
* (Windows) ImGui 1.88
|
|
16
|
+
* Updated tested Ruby version
|
|
5
17
|
|
|
6
18
|
2022-02-12 vaiorabbit <http://twitter.com/vaiorabbit>
|
|
7
19
|
|
data/README.md
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
# Yet another ImGui wrapper for Ruby #
|
|
4
4
|
|
|
5
5
|
* Created : 2019-01-05
|
|
6
|
-
* Last modified : 2022-
|
|
6
|
+
* Last modified : 2022-08-14
|
|
7
7
|
|
|
8
8
|
<img src="https://raw.githubusercontent.com/vaiorabbit/ruby-imgui/master/doc/jpfont_test.png" width="250">
|
|
9
9
|
|
|
@@ -14,16 +14,9 @@
|
|
|
14
14
|
* Ruby interpreter
|
|
15
15
|
* Tested on:
|
|
16
16
|
* [Windows] https://rubyinstaller.org/downloads/ Ruby+Devkit
|
|
17
|
-
* ruby 3.
|
|
18
|
-
* ~~ruby 3.0.0p0 (2020-12-25 revision 95aff21468) [x64-mingw32]~~
|
|
19
|
-
* ~~ruby 2.7.1p83 (2020-03-31 revision a0c7c23c9c) [x64-mingw32]~~
|
|
17
|
+
* ruby 3.1.2p20 (2022-04-12 revision 4491bb740a) [x64-mingw-ucrt]
|
|
20
18
|
* [macOS]
|
|
21
|
-
* ruby 3.1.
|
|
22
|
-
* ruby 3.0.2p107 (2021-07-07 revision 0db68f0233) [arm64-darwin20]
|
|
23
|
-
* ~~ruby 3.0.1p64 (2021-04-05 revision 0fb782ee38) [arm64-darwin20]~~
|
|
24
|
-
* ~~ruby 3.0.0p0 (2020-12-25 revision 95aff21468) [arm64-darwin20]~~
|
|
25
|
-
* ~~ruby 2.7.0p0 (2019-12-25 revision 647ee6f091) [x86_64-darwin19]~~
|
|
26
|
-
* ~~ruby 2.6.0p0 (2018-12-25 revision 66547) [x86_64-darwin18]~~
|
|
19
|
+
* ruby 3.1.2p20 (2022-04-12 revision 4491bb740a) [arm64-darwin21]
|
|
27
20
|
* Ruby Gems
|
|
28
21
|
* opengl-bindings
|
|
29
22
|
* gem install opengl-bindings
|
|
@@ -32,9 +25,32 @@
|
|
|
32
25
|
* Compiler
|
|
33
26
|
* Tested on:
|
|
34
27
|
* [Windows] gcc (Rev1, Built by MSYS2 project) 8.2.1 20181214
|
|
35
|
-
* [macOS] clang (Apple clang version
|
|
28
|
+
* [macOS] clang (Apple clang version 13.1.6 (clang-1316.0.21.2.5), Target: arm64-apple-darwin21.5.0)
|
|
36
29
|
* CMake https://cmake.org/download/
|
|
37
30
|
|
|
31
|
+
<details>
|
|
32
|
+
<summary>Older versions</summary>
|
|
33
|
+
|
|
34
|
+
* Ruby interpreter
|
|
35
|
+
* Tested on:
|
|
36
|
+
* [Windows] https://rubyinstaller.org/downloads/ Ruby+Devkit
|
|
37
|
+
* ruby 3.0.2p107 (2021-07-07 revision 0db68f0233) [x64-mingw32]
|
|
38
|
+
* ruby 3.0.0p0 (2020-12-25 revision 95aff21468) [x64-mingw32]
|
|
39
|
+
* ruby 2.7.1p83 (2020-03-31 revision a0c7c23c9c) [x64-mingw32]
|
|
40
|
+
* [macOS]
|
|
41
|
+
* ruby 3.1.2p20 (2022-04-12 revision 4491bb740a) [arm64-darwin21]
|
|
42
|
+
* ruby 3.1.0p0 (2021-12-25 revision fb4df44d16) [arm64-darwin20]
|
|
43
|
+
* ruby 3.0.2p107 (2021-07-07 revision 0db68f0233) [arm64-darwin20]
|
|
44
|
+
* ruby 3.0.1p64 (2021-04-05 revision 0fb782ee38) [arm64-darwin20]
|
|
45
|
+
* ruby 3.0.0p0 (2020-12-25 revision 95aff21468) [arm64-darwin20]
|
|
46
|
+
* ruby 2.7.0p0 (2019-12-25 revision 647ee6f091) [x86_64-darwin19]
|
|
47
|
+
* ruby 2.6.0p0 (2018-12-25 revision 66547) [x86_64-darwin18]
|
|
48
|
+
|
|
49
|
+
* Compiler
|
|
50
|
+
* Tested on:
|
|
51
|
+
* [Windows] gcc (Rev1, Built by MSYS2 project) 8.2.1 20181214
|
|
52
|
+
* [macOS] clang (Apple clang version 12.0.5 (clang-1205.0.22.11), Target: arm64-apple-darwin20.6.0)
|
|
53
|
+
</details>
|
|
38
54
|
|
|
39
55
|
## Setting up and run sample ##
|
|
40
56
|
|
|
@@ -42,7 +58,7 @@
|
|
|
42
58
|
* For the first time:
|
|
43
59
|
* git submodule update --init --recursive
|
|
44
60
|
* Update:
|
|
45
|
-
* cd cimgui
|
|
61
|
+
* cd imgui_dll/cimgui
|
|
46
62
|
* git pull origin master <- to get latest cimgui
|
|
47
63
|
* git submodule update <- to get specific revision of imgui required by cimgui
|
|
48
64
|
2. Get GLFW or SDL2
|
|
@@ -60,14 +76,17 @@
|
|
|
60
76
|
|
|
61
77
|
## License ##
|
|
62
78
|
|
|
63
|
-
|
|
79
|
+
All shared libraries found in `lib` directory are built on top of these products and are available under the terms of the MIT License.
|
|
64
80
|
* cimgui ( https://github.com/cimgui/cimgui )
|
|
65
81
|
* https://github.com/cimgui/cimgui/blob/master/LICENSE
|
|
66
82
|
* Dear ImGui ( https://github.com/ocornut/imgui )
|
|
67
83
|
* https://github.com/ocornut/imgui/blob/master/LICENSE.txt
|
|
84
|
+
* ImNodes ( https://github.com/rokups/ImNodes )
|
|
85
|
+
* https://github.com/rokups/ImNodes/blob/master/LICENSE
|
|
68
86
|
|
|
69
87
|
All ruby codes here are available under the terms of the zlib/libpng License ( http://opensource.org/licenses/Zlib ).
|
|
70
88
|
|
|
89
|
+
```
|
|
71
90
|
Ruby-Imgui : Yet another ImGui wrapper for Ruby
|
|
72
91
|
Copyright (c) 2019-2022 vaiorabbit <http://twitter.com/vaiorabbit>
|
|
73
92
|
|
|
@@ -89,3 +108,4 @@ freely, subject to the following restrictions:
|
|
|
89
108
|
|
|
90
109
|
3. This notice may not be removed or altered from any source
|
|
91
110
|
distribution.
|
|
111
|
+
```
|
data/lib/imgui.dll
CHANGED
|
Binary file
|
data/lib/imgui.dylib
CHANGED
|
Binary file
|
data/lib/imgui.rb
CHANGED
|
@@ -1635,34 +1635,6 @@ class ImGuiTextFilter < FFI::Struct
|
|
|
1635
1635
|
|
|
1636
1636
|
end
|
|
1637
1637
|
|
|
1638
|
-
class ImGuiTextRange < FFI::Struct
|
|
1639
|
-
layout(
|
|
1640
|
-
:b, :pointer,
|
|
1641
|
-
:e, :pointer
|
|
1642
|
-
)
|
|
1643
|
-
|
|
1644
|
-
def self.create()
|
|
1645
|
-
return ImGuiTextRange.new(ImGui::ImGuiTextRange_ImGuiTextRange_Nil())
|
|
1646
|
-
end
|
|
1647
|
-
|
|
1648
|
-
def self.create(_b, _e)
|
|
1649
|
-
return ImGuiTextRange.new(ImGui::ImGuiTextRange_ImGuiTextRange_Str(_b, _e))
|
|
1650
|
-
end
|
|
1651
|
-
|
|
1652
|
-
def destroy()
|
|
1653
|
-
ImGui::ImGuiTextRange_destroy(self)
|
|
1654
|
-
end
|
|
1655
|
-
|
|
1656
|
-
def empty()
|
|
1657
|
-
ImGui::ImGuiTextRange_empty(self)
|
|
1658
|
-
end
|
|
1659
|
-
|
|
1660
|
-
def split(separator, out)
|
|
1661
|
-
ImGui::ImGuiTextRange_split(self, separator, out)
|
|
1662
|
-
end
|
|
1663
|
-
|
|
1664
|
-
end
|
|
1665
|
-
|
|
1666
1638
|
class ImGuiViewport < FFI::Struct
|
|
1667
1639
|
layout(
|
|
1668
1640
|
:Flags, :int,
|
|
@@ -3235,8 +3207,8 @@ module ImGui
|
|
|
3235
3207
|
symbols.each do |sym|
|
|
3236
3208
|
begin
|
|
3237
3209
|
attach_function sym, args[sym], retvals[sym]
|
|
3238
|
-
rescue FFI::NotFoundError
|
|
3239
|
-
$stderr.puts("[Warning] Failed to import #{
|
|
3210
|
+
rescue FFI::NotFoundError
|
|
3211
|
+
$stderr.puts("[Warning] Failed to import #{sym}.\n") if output_error
|
|
3240
3212
|
end
|
|
3241
3213
|
end
|
|
3242
3214
|
|
data/lib/imgui_impl_opengl3.rb
CHANGED
|
@@ -140,8 +140,8 @@ module ImGui
|
|
|
140
140
|
draw_data[:CmdListsCount].times do |n|
|
|
141
141
|
|
|
142
142
|
cmd_list = ImDrawList.new((draw_data[:CmdLists].pointer + 8 * n).read_pointer) # 8 == const ImDrawList*
|
|
143
|
-
vtx_buffer = ImDrawVert.new(cmd_list[:VtxBuffer][:Data]) # const ImDrawVert*
|
|
144
|
-
idx_buffer = cmd_list[:IdxBuffer][:Data] # const ImDrawIdx*
|
|
143
|
+
# vtx_buffer = ImDrawVert.new(cmd_list[:VtxBuffer][:Data]) # const ImDrawVert*
|
|
144
|
+
# idx_buffer = cmd_list[:IdxBuffer][:Data] # const ImDrawIdx*
|
|
145
145
|
|
|
146
146
|
# Upload vertex/index buffers
|
|
147
147
|
GL.BufferData(GL::ARRAY_BUFFER, cmd_list[:VtxBuffer][:Size] * ImDrawVert.size, Fiddle::Pointer.new(cmd_list[:VtxBuffer][:Data]), GL::STREAM_DRAW)
|
|
@@ -185,7 +185,7 @@ module ImGui
|
|
|
185
185
|
end
|
|
186
186
|
|
|
187
187
|
end
|
|
188
|
-
idx_buffer += pcmd[:ElemCount] * 2 # 2 == ImDrawIdx(:ushort).size
|
|
188
|
+
# idx_buffer += pcmd[:ElemCount] * 2 # 2 == ImDrawIdx(:ushort).size
|
|
189
189
|
end
|
|
190
190
|
end
|
|
191
191
|
|
data/lib/imgui_impl_sdl2.rb
CHANGED
|
@@ -17,7 +17,7 @@ module ImGui
|
|
|
17
17
|
@window = nil # SDL_Window*
|
|
18
18
|
@renderer = nil # SDL_Renderer*
|
|
19
19
|
@time = 0.0 # Uint64
|
|
20
|
-
@mouseButtonsDown
|
|
20
|
+
@mouseButtonsDown = 0 # int
|
|
21
21
|
@mouseCursors = Array.new(ImGuiMouseCursor_COUNT) { 0 } # SDL_Cursor*
|
|
22
22
|
@clipboardTextData = nil # char*
|
|
23
23
|
@mouseCanUseGlobalState = false # bool
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
# imgui-bindings : Yet another ImGui wrapper for Ruby
|
|
2
|
+
#
|
|
3
|
+
# * https://github.com/vaiorabbit/ruby-imgui
|
|
4
|
+
|
|
5
|
+
require 'ffi'
|
|
6
|
+
|
|
7
|
+
module ImGui
|
|
8
|
+
|
|
9
|
+
extend FFI::Library
|
|
10
|
+
|
|
11
|
+
@@imgui_import_internal_done = false
|
|
12
|
+
|
|
13
|
+
def self.import_internal_symbols(output_error = false)
|
|
14
|
+
|
|
15
|
+
symbols = [
|
|
16
|
+
:igFocusWindow,
|
|
17
|
+
:igGetCurrentWindow,
|
|
18
|
+
]
|
|
19
|
+
|
|
20
|
+
args = {
|
|
21
|
+
:igFocusWindow => [:pointer],
|
|
22
|
+
:igGetCurrentWindow => [],
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
retvals = {
|
|
26
|
+
:igFocusWindow => :void,
|
|
27
|
+
:igGetCurrentWindow => :pointer,
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
symbols.each do |sym|
|
|
31
|
+
begin
|
|
32
|
+
attach_function sym, args[sym], retvals[sym]
|
|
33
|
+
rescue FFI::NotFoundError
|
|
34
|
+
$stderr.puts("[Warning] Failed to import #{sym}.\n") if output_error
|
|
35
|
+
end
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
@@imgui_import_internal_done = true
|
|
39
|
+
end # self.import_internal_symbols
|
|
40
|
+
|
|
41
|
+
def self.GetCurrentWindow()
|
|
42
|
+
igGetCurrentWindow()
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
def self.FocusWindow(window)
|
|
46
|
+
igFocusWindow(window)
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
end # module ImGui
|
data/lib/imnodes.dll
ADDED
|
Binary file
|
data/lib/imnodes.dylib
ADDED
|
Binary file
|
data/lib/imnodes.rb
ADDED
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
# imgui-bindings : Yet another ImGui wrapper for Ruby
|
|
2
|
+
#
|
|
3
|
+
# * https://github.com/vaiorabbit/ruby-imgui
|
|
4
|
+
|
|
5
|
+
require 'ffi'
|
|
6
|
+
|
|
7
|
+
# ImNodes::StyleColor
|
|
8
|
+
ImNodesStyleColor_ColCanvasLines = 0
|
|
9
|
+
ImNodesStyleColor_ColNodeBg = 1
|
|
10
|
+
ImNodesStyleColor_ColNodeActiveBg = 2
|
|
11
|
+
ImNodesStyleColor_ColNodeBorder = 3
|
|
12
|
+
ImNodesStyleColor_ColConnection = 4
|
|
13
|
+
ImNodesStyleColor_ColConnectionActive = 5
|
|
14
|
+
ImNodesStyleColor_ColSelectBg = 6
|
|
15
|
+
ImNodesStyleColor_ColSelectBorder = 7
|
|
16
|
+
ImNodesStyleColor_ColMax = 8
|
|
17
|
+
|
|
18
|
+
# ImNodesStyleVar
|
|
19
|
+
ImNodesStyleVar_GridSpacing = 0 # float
|
|
20
|
+
ImNodesStyleVar_CurveThickness = 1 # float
|
|
21
|
+
ImNodesStyleVar_CurveStrength = 2 # float
|
|
22
|
+
ImNodesStyleVar_SlotRadius = 3 # float
|
|
23
|
+
ImNodesStyleVar_NodeRounding = 4 # float
|
|
24
|
+
ImNodesStyleVar_NodeSpacing = 5 # ImVec2
|
|
25
|
+
ImNodesStyleVar_ItemSpacing = 6 # ImVec2
|
|
26
|
+
ImNodesStyleVar_COUNT = 7
|
|
27
|
+
|
|
28
|
+
# ImNodesStyleCol
|
|
29
|
+
ImNodesStyleCol_GridLines = 0
|
|
30
|
+
ImNodesStyleCol_NodeBodyBg = 1
|
|
31
|
+
ImNodesStyleCol_NodeBodyBgHovered = 2
|
|
32
|
+
ImNodesStyleCol_NodeBodyBgActive = 3
|
|
33
|
+
ImNodesStyleCol_NodeBorder = 4
|
|
34
|
+
ImNodesStyleCol_Connection = 5
|
|
35
|
+
ImNodesStyleCol_ConnectionActive = 6
|
|
36
|
+
ImNodesStyleCol_SelectBg = 7
|
|
37
|
+
ImNodesStyleCol_SelectBorder = 8
|
|
38
|
+
ImNodesStyleCol_NodeTitleBarBg = 9
|
|
39
|
+
ImNodesStyleCol_NodeTitleBarBgHovered = 10
|
|
40
|
+
ImNodesStyleCol_NodeTitleBarBgActive = 11
|
|
41
|
+
ImNodesStyleCol_COUNT = 12
|
|
42
|
+
|
|
43
|
+
module ImNodes
|
|
44
|
+
|
|
45
|
+
extend FFI::Library
|
|
46
|
+
|
|
47
|
+
@@imnodes_import_done = false
|
|
48
|
+
|
|
49
|
+
class CanvasStyle < FFI::Struct
|
|
50
|
+
layout(
|
|
51
|
+
# Thickness of curves that connect slots together.
|
|
52
|
+
:CurveThickness, :float,
|
|
53
|
+
# Indent connection into slot widget a little. Useful when slot content covers connection end with some kind
|
|
54
|
+
# of icon (like a circle) and then no seam between icon and connection end is visible.
|
|
55
|
+
:ConnectionIndent, :float,
|
|
56
|
+
:GridSpacing, :float,
|
|
57
|
+
:CurveStrength, :float,
|
|
58
|
+
:NodeRounding, :float,
|
|
59
|
+
:NodeSpacing, ImVec2.by_value
|
|
60
|
+
)
|
|
61
|
+
end
|
|
62
|
+
|
|
63
|
+
class CanvasState < FFI::Struct
|
|
64
|
+
layout(
|
|
65
|
+
# Current zoom of canvas.
|
|
66
|
+
:Zoom, :float,
|
|
67
|
+
# Current scroll offset of canvas.
|
|
68
|
+
:Offset, ImVec2.by_value,
|
|
69
|
+
# Colors used to style elements of this canvas.
|
|
70
|
+
:Colors, [ImColor.by_value, ImNodesStyleColor_ColMax],
|
|
71
|
+
# Style parameters
|
|
72
|
+
:Style, CanvasStyle.by_value,
|
|
73
|
+
# Implementation detail.
|
|
74
|
+
:_Impl, :pointer
|
|
75
|
+
)
|
|
76
|
+
|
|
77
|
+
def self.create()
|
|
78
|
+
return CanvasState.new(ImNodesCanvasStateCtor())
|
|
79
|
+
end
|
|
80
|
+
|
|
81
|
+
def destroy()
|
|
82
|
+
ImNodesCanvasStateDtor(self)
|
|
83
|
+
end
|
|
84
|
+
end
|
|
85
|
+
|
|
86
|
+
class SlotInfo < FFI::Struct
|
|
87
|
+
layout(
|
|
88
|
+
:title, :pointer,
|
|
89
|
+
:kind, :int
|
|
90
|
+
)
|
|
91
|
+
|
|
92
|
+
def self.create(title, kind)
|
|
93
|
+
instance = SlotInfo.new
|
|
94
|
+
instance[:title] = FFI::MemoryPointer.from_string(title)
|
|
95
|
+
instance[:kind] = kind
|
|
96
|
+
return instance
|
|
97
|
+
end
|
|
98
|
+
end
|
|
99
|
+
|
|
100
|
+
def self.load_lib(libpath = './imnodes.dylib', output_error = false)
|
|
101
|
+
ffi_lib_flags :now, :global
|
|
102
|
+
ffi_lib libpath
|
|
103
|
+
import_symbols(output_error) unless @@imnodes_import_done
|
|
104
|
+
end
|
|
105
|
+
|
|
106
|
+
def self.import_symbols(output_error = false)
|
|
107
|
+
|
|
108
|
+
symbols = [
|
|
109
|
+
# name, func, args, returns
|
|
110
|
+
[:CanvasStateCtor, :ImNodesCanvasStateCtor, [], :pointer],
|
|
111
|
+
[:CanvasStateDtor, :ImNodesCanvasStateDtor, [:pointer], :void],
|
|
112
|
+
[:BeginCanvas, :ImNodesBeginCanvas, [:pointer], :void],
|
|
113
|
+
[:EndCanvas, :ImNodesEndCanvas, [], :void],
|
|
114
|
+
[:BeginNode, :ImNodesBeginNode, [:pointer, :pointer, :pointer], :bool],
|
|
115
|
+
[:EndNode, :ImNodesEndNode, [], :void],
|
|
116
|
+
[:IsNodeHovered, :ImNodesIsNodeHovered, [], :bool],
|
|
117
|
+
[:AutoPositionNode, :ImNodesAutoPositionNode, [:pointer], :void],
|
|
118
|
+
[:GetNewConnection, :ImNodesGetNewConnection, [:pointer, :pointer, :pointer, :pointer], :bool],
|
|
119
|
+
[:GetPendingConnection, :ImNodesGetPendingConnection, [:pointer, :pointer, :pointer], :bool],
|
|
120
|
+
[:Connection, :ImNodesConnection, [:pointer, :pointer, :pointer, :pointer], :bool],
|
|
121
|
+
[:GetCurrentCanvas, :ImNodesGetCurrentCanvas, [], :pointer],
|
|
122
|
+
[:InputSlotKind, :ImNodesInputSlotKind, [:int], :int],
|
|
123
|
+
[:OutputSlotKind, :ImNodesOutputSlotKind, [:int], :int],
|
|
124
|
+
[:IsInputSlotKind, :ImNodesIsInputSlotKind, [:int], :bool],
|
|
125
|
+
[:IsOutputSlotKind, :ImNodesIsOutputSlotKind, [:int], :bool],
|
|
126
|
+
[:BeginSlot, :ImNodesBeginSlot, [:pointer, :int], :bool],
|
|
127
|
+
[:BeginInputSlot, :ImNodesBeginInputSlot, [:pointer, :int], :bool],
|
|
128
|
+
[:BeginOutputSlot, :ImNodesBeginOutputSlot, [:pointer, :int], :bool],
|
|
129
|
+
[:EndSlot, :ImNodesEndSlot, [], :void],
|
|
130
|
+
[:IsSlotCurveHovered, :ImNodesIsSlotCurveHovered, [], :bool],
|
|
131
|
+
[:IsConnectingCompatibleSlot, :ImNodesIsConnectingCompatibleSlot, [], :bool],
|
|
132
|
+
[:EzCreateContext, :ImNodesEzCreateContext, [], :pointer],
|
|
133
|
+
[:EzFreeContext, :ImNodesEzFreeContext, [:pointer], :void],
|
|
134
|
+
[:EzSetContext, :ImNodesEzSetContext, [:pointer], :void],
|
|
135
|
+
[:EzGetState, :ImNodesEzGetState, [], :pointer],
|
|
136
|
+
[:EzBeginCanvas, :ImNodesEzBeginCanvas, [], :void],
|
|
137
|
+
[:EzEndCanvas, :ImNodesEzEndCanvas, [], :void],
|
|
138
|
+
[:EzBeginNode, :ImNodesEzBeginNode, [:pointer, :pointer, :pointer, :pointer], :bool],
|
|
139
|
+
[:EzEndNode, :ImNodesEzEndNode, [], :void],
|
|
140
|
+
[:EzInputSlots, :ImNodesEzInputSlots, [:pointer, :int], :void],
|
|
141
|
+
[:EzOutputSlots, :ImNodesEzOutputSlots, [:pointer, :int], :void],
|
|
142
|
+
[:EzConnection, :ImNodesEzConnection, [:pointer, :pointer, :pointer, :pointer], :bool],
|
|
143
|
+
[:EzPushStyleVarFloat, :ImNodesEzPushStyleVarFloat, [:int, :float], :void],
|
|
144
|
+
[:EzPushStyleVarVec2, :ImNodesEzPushStyleVarVec2, [:int, :pointer], :void],
|
|
145
|
+
[:EzPopStyleVar, :ImNodesEzPopStyleVar, [:int], :void],
|
|
146
|
+
[:EzPushStyleColorU32, :ImNodesEzPushStyleColorU32, [:int, :uint], :void],
|
|
147
|
+
[:EzPushStyleColorVec4, :ImNodesEzPushStyleColorVec4, [:int, :pointer], :void],
|
|
148
|
+
[:EzPopStyleColor, :ImNodesEzPopStyleColor, [:int], :void],
|
|
149
|
+
]
|
|
150
|
+
|
|
151
|
+
symbols.each do |sym|
|
|
152
|
+
begin
|
|
153
|
+
attach_function *sym
|
|
154
|
+
rescue FFI::NotFoundError
|
|
155
|
+
$stderr.puts("[Warning] Failed to import #{sym}.\n") if output_error
|
|
156
|
+
end
|
|
157
|
+
end
|
|
158
|
+
|
|
159
|
+
end # self.import_symbols
|
|
160
|
+
|
|
161
|
+
end # module ImNodes
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: imgui-bindings
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0
|
|
4
|
+
version: 0.1.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- vaiorabbit
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2022-
|
|
11
|
+
date: 2022-08-14 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: ffi
|
|
@@ -53,14 +53,16 @@ files:
|
|
|
53
53
|
- lib/imgui.dll
|
|
54
54
|
- lib/imgui.dylib
|
|
55
55
|
- lib/imgui.rb
|
|
56
|
-
- lib/imgui_debug.dll
|
|
57
|
-
- lib/imgui_debug.dylib
|
|
58
56
|
- lib/imgui_impl_glfw.rb
|
|
59
57
|
- lib/imgui_impl_opengl2.rb
|
|
60
58
|
- lib/imgui_impl_opengl3.rb
|
|
61
59
|
- lib/imgui_impl_raylib.rb
|
|
62
60
|
- lib/imgui_impl_sdl2.rb
|
|
63
61
|
- lib/imgui_impl_sdlrenderer.rb
|
|
62
|
+
- lib/imgui_internal.rb
|
|
63
|
+
- lib/imnodes.dll
|
|
64
|
+
- lib/imnodes.dylib
|
|
65
|
+
- lib/imnodes.rb
|
|
64
66
|
homepage: https://github.com/vaiorabbit/ruby-imgui
|
|
65
67
|
licenses:
|
|
66
68
|
- Zlib
|
|
@@ -73,7 +75,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
73
75
|
requirements:
|
|
74
76
|
- - ">="
|
|
75
77
|
- !ruby/object:Gem::Version
|
|
76
|
-
version:
|
|
78
|
+
version: 3.0.0
|
|
77
79
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
78
80
|
requirements:
|
|
79
81
|
- - ">="
|
data/lib/imgui_debug.dll
DELETED
|
Binary file
|
data/lib/imgui_debug.dylib
DELETED
|
Binary file
|