imgui-bindings 0.0.4 → 0.1.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5bbd987161848c4f790e55cfffd04dfb2ae144186f451b278b4d1eb2e77d69d5
4
- data.tar.gz: c4ef36ccc46ec591c516374e69224ca54e08a8b9131f39d95c1cc1f250a64ba7
3
+ metadata.gz: 75d3fa201633832f66d5c9c43c8ee5d7bcf5e09c297dcb3f2c7a59a1db591d4c
4
+ data.tar.gz: 1beba6e9a6eec45dbad4fb44117f56b4b6f7ec50a5aea7d8ee8da05c5a5bcb47
5
5
  SHA512:
6
- metadata.gz: c485d9548d2a35387cee22080ea30d6f19f16ad240dbffc0c0922e4d16d1f96847078388ce1506569b378bf7e48bd6f3f180bdc1b706240e7e0a3ef5bada8607
7
- data.tar.gz: 596bb4901a35014d5688d539c7c87671652a95e9317db863268ae83f9d4fab062612da9549eca3e26e715c8bdfc80179ffabc4afab8136e83d535105924d66b6
6
+ metadata.gz: fc3d24741acae0e5132433fd121a3172ad2f41cad961d02a8e08c0e840b0484394cfe5239cfff9b1cff99287921107d3393858f0ceaa4c9ae2b4f845b8bae894
7
+ data.tar.gz: 7dc72767c7b35a38e50100adc077a9f9c7c2ab98d52291ffeb532b38ee6cf1f141b1dcbaad9eab6d96946731e388fc262b5dd3f1c259c96fb45e85fa2fbaaea2
data/ChangeLog CHANGED
@@ -1,7 +1,23 @@
1
+ 2022-12-25 vaiorabbit <http://twitter.com/vaiorabbit>
2
+
3
+ * ImGui v1.89.1
4
+
5
+ 2022-08-14 vaiorabbit <http://twitter.com/vaiorabbit>
6
+
7
+ * Added ImNodes ( https://github.com/rokups/ImNodes ) support
8
+ * Moved cimgui location
9
+ * Removed unmaintained debug version of shared libraries
10
+ * Added hand-written binding code for imgui_internal.h
11
+
12
+ 2022-08-06 vaiorabbit <http://twitter.com/vaiorabbit>
13
+
14
+ * Fixed several warnings
15
+
1
16
  2022-07-02 vaiorabbit <http://twitter.com/vaiorabbit>
2
17
 
3
18
  * (macOS) ImGui 1.88
4
19
  * (Windows) ImGui 1.88
20
+ * Updated tested Ruby version
5
21
 
6
22
  2022-02-12 vaiorabbit <http://twitter.com/vaiorabbit>
7
23
 
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-07-02
6
+ * Last modified : 2022-12-25
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.0.2p107 (2021-07-07 revision 0db68f0233) [x64-mingw32]
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.0p0 (2021-12-25 revision fb4df44d16) [arm64-darwin20]
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
@@ -31,10 +24,33 @@
31
24
  * gem install ffi
32
25
  * Compiler
33
26
  * Tested on:
34
- * [Windows] gcc (Rev1, Built by MSYS2 project) 8.2.1 20181214
35
- * [macOS] clang (Apple clang version 12.0.5 (clang-1205.0.22.11), Target: arm64-apple-darwin20.6.0)
27
+ * [Windows] gcc (Rev10, Built by MSYS2 project) 11.2.0
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
- 'imgui.dylib', 'imgui.dll' and 'imgui_debug.dll' are built on top of these products and are available under the terms of the MIT License.
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
@@ -9,6 +9,7 @@ require 'ffi'
9
9
  FFI.typedef :int, :ImDrawFlags
10
10
  FFI.typedef :ushort, :ImDrawIdx
11
11
  FFI.typedef :int, :ImDrawListFlags
12
+ FFI.typedef :pointer, :ImDrawListSharedData
12
13
  FFI.typedef :int, :ImFontAtlasFlags
13
14
  FFI.typedef :int, :ImGuiBackendFlags
14
15
  FFI.typedef :int, :ImGuiButtonFlags
@@ -24,13 +25,11 @@ FFI.typedef :int, :ImGuiFocusedFlags
24
25
  FFI.typedef :int, :ImGuiHoveredFlags
25
26
  FFI.typedef :uint, :ImGuiID
26
27
  FFI.typedef :int, :ImGuiInputTextFlags
27
- FFI.typedef :int, :ImGuiKey
28
+ FFI.typedef :int, :ImGuiKeyChord
28
29
  FFI.typedef :pointer, :ImGuiMemAllocFunc
29
30
  FFI.typedef :pointer, :ImGuiMemFreeFunc
30
- FFI.typedef :int, :ImGuiModFlags
31
31
  FFI.typedef :int, :ImGuiMouseButton
32
32
  FFI.typedef :int, :ImGuiMouseCursor
33
- FFI.typedef :int, :ImGuiNavInput
34
33
  FFI.typedef :int, :ImGuiPopupFlags
35
34
  FFI.typedef :int, :ImGuiSelectableFlags
36
35
  FFI.typedef :int, :ImGuiSliderFlags
@@ -57,6 +56,7 @@ FFI.typedef :uchar, :ImU8
57
56
  FFI.typedef :ushort, :ImWchar
58
57
  FFI.typedef :ushort, :ImWchar16
59
58
  FFI.typedef :uint, :ImWchar32
59
+ FFI.typedef :int, :ImGuiKey
60
60
 
61
61
  # ImDrawFlags_
62
62
  ImDrawFlags_None = 0 # 0
@@ -273,6 +273,9 @@ ImGuiHoveredFlags_AllowWhenDisabled = 512 # 1 << 9
273
273
  ImGuiHoveredFlags_NoNavOverride = 1024 # 1 << 10
274
274
  ImGuiHoveredFlags_RectOnly = 416 # ImGuiHoveredFlags_AllowWhenBlockedByPopup | ImGuiHoveredFlags_AllowWhenBlockedByActiveItem | ImGuiHoveredFlags_AllowWhenOverlapped
275
275
  ImGuiHoveredFlags_RootAndChildWindows = 3 # ImGuiHoveredFlags_RootWindow | ImGuiHoveredFlags_ChildWindows
276
+ ImGuiHoveredFlags_DelayNormal = 2048 # 1 << 11
277
+ ImGuiHoveredFlags_DelayShort = 4096 # 1 << 12
278
+ ImGuiHoveredFlags_NoSharedDelay = 8192 # 1 << 13
276
279
 
277
280
  # ImGuiInputTextFlags_
278
281
  ImGuiInputTextFlags_None = 0 # 0
@@ -296,8 +299,9 @@ ImGuiInputTextFlags_NoUndoRedo = 65536 # 1 << 16
296
299
  ImGuiInputTextFlags_CharsScientific = 131072 # 1 << 17
297
300
  ImGuiInputTextFlags_CallbackResize = 262144 # 1 << 18
298
301
  ImGuiInputTextFlags_CallbackEdit = 524288 # 1 << 19
302
+ ImGuiInputTextFlags_EscapeClearsAll = 1048576 # 1 << 20
299
303
 
300
- # ImGuiKey_
304
+ # ImGuiKey
301
305
  ImGuiKey_None = 0 # 0
302
306
  ImGuiKey_Tab = 512 # 512
303
307
  ImGuiKey_LeftArrow = 513 # 513
@@ -406,46 +410,53 @@ ImGuiKey_KeypadEnter = 615 # 615
406
410
  ImGuiKey_KeypadEqual = 616 # 616
407
411
  ImGuiKey_GamepadStart = 617 # 617
408
412
  ImGuiKey_GamepadBack = 618 # 618
409
- ImGuiKey_GamepadFaceUp = 619 # 619
410
- ImGuiKey_GamepadFaceDown = 620 # 620
411
- ImGuiKey_GamepadFaceLeft = 621 # 621
412
- ImGuiKey_GamepadFaceRight = 622 # 622
413
- ImGuiKey_GamepadDpadUp = 623 # 623
414
- ImGuiKey_GamepadDpadDown = 624 # 624
415
- ImGuiKey_GamepadDpadLeft = 625 # 625
416
- ImGuiKey_GamepadDpadRight = 626 # 626
413
+ ImGuiKey_GamepadFaceLeft = 619 # 619
414
+ ImGuiKey_GamepadFaceRight = 620 # 620
415
+ ImGuiKey_GamepadFaceUp = 621 # 621
416
+ ImGuiKey_GamepadFaceDown = 622 # 622
417
+ ImGuiKey_GamepadDpadLeft = 623 # 623
418
+ ImGuiKey_GamepadDpadRight = 624 # 624
419
+ ImGuiKey_GamepadDpadUp = 625 # 625
420
+ ImGuiKey_GamepadDpadDown = 626 # 626
417
421
  ImGuiKey_GamepadL1 = 627 # 627
418
422
  ImGuiKey_GamepadR1 = 628 # 628
419
423
  ImGuiKey_GamepadL2 = 629 # 629
420
424
  ImGuiKey_GamepadR2 = 630 # 630
421
425
  ImGuiKey_GamepadL3 = 631 # 631
422
426
  ImGuiKey_GamepadR3 = 632 # 632
423
- ImGuiKey_GamepadLStickUp = 633 # 633
424
- ImGuiKey_GamepadLStickDown = 634 # 634
425
- ImGuiKey_GamepadLStickLeft = 635 # 635
426
- ImGuiKey_GamepadLStickRight = 636 # 636
427
- ImGuiKey_GamepadRStickUp = 637 # 637
428
- ImGuiKey_GamepadRStickDown = 638 # 638
429
- ImGuiKey_GamepadRStickLeft = 639 # 639
430
- ImGuiKey_GamepadRStickRight = 640 # 640
431
- ImGuiKey_ModCtrl = 641 # 641
432
- ImGuiKey_ModShift = 642 # 642
433
- ImGuiKey_ModAlt = 643 # 643
434
- ImGuiKey_ModSuper = 644 # 644
435
- ImGuiKey_COUNT = 645 # 645
427
+ ImGuiKey_GamepadLStickLeft = 633 # 633
428
+ ImGuiKey_GamepadLStickRight = 634 # 634
429
+ ImGuiKey_GamepadLStickUp = 635 # 635
430
+ ImGuiKey_GamepadLStickDown = 636 # 636
431
+ ImGuiKey_GamepadRStickLeft = 637 # 637
432
+ ImGuiKey_GamepadRStickRight = 638 # 638
433
+ ImGuiKey_GamepadRStickUp = 639 # 639
434
+ ImGuiKey_GamepadRStickDown = 640 # 640
435
+ ImGuiKey_MouseLeft = 641 # 641
436
+ ImGuiKey_MouseRight = 642 # 642
437
+ ImGuiKey_MouseMiddle = 643 # 643
438
+ ImGuiKey_MouseX1 = 644 # 644
439
+ ImGuiKey_MouseX2 = 645 # 645
440
+ ImGuiKey_MouseWheelX = 646 # 646
441
+ ImGuiKey_MouseWheelY = 647 # 647
442
+ ImGuiKey_ReservedForModCtrl = 648 # 648
443
+ ImGuiKey_ReservedForModShift = 649 # 649
444
+ ImGuiKey_ReservedForModAlt = 650 # 650
445
+ ImGuiKey_ReservedForModSuper = 651 # 651
446
+ ImGuiKey_COUNT = 652 # 652
447
+ ImGuiMod_None = 0 # 0
448
+ ImGuiMod_Ctrl = 4096 # 1 << 12
449
+ ImGuiMod_Shift = 8192 # 1 << 13
450
+ ImGuiMod_Alt = 16384 # 1 << 14
451
+ ImGuiMod_Super = 32768 # 1 << 15
452
+ ImGuiMod_Mask_ = 61440 # 0xF000
453
+ ImGuiMod_Shortcut = 32768 # ImGuiMod_Super
436
454
  ImGuiKey_NamedKey_BEGIN = 512 # 512
437
- ImGuiKey_NamedKey_END = 645 # ImGuiKey_COUNT
438
- ImGuiKey_NamedKey_COUNT = 133 # ImGuiKey_NamedKey_END - ImGuiKey_NamedKey_BEGIN
439
- ImGuiKey_KeysData_SIZE = 645 # ImGuiKey_COUNT
455
+ ImGuiKey_NamedKey_END = 652 # ImGuiKey_COUNT
456
+ ImGuiKey_NamedKey_COUNT = 140 # ImGuiKey_NamedKey_END - ImGuiKey_NamedKey_BEGIN
457
+ ImGuiKey_KeysData_SIZE = 652 # ImGuiKey_COUNT
440
458
  ImGuiKey_KeysData_OFFSET = 0 # 0
441
459
 
442
- # ImGuiModFlags_
443
- ImGuiModFlags_None = 0 # 0
444
- ImGuiModFlags_Ctrl = 1 # 1 << 0
445
- ImGuiModFlags_Shift = 2 # 1 << 1
446
- ImGuiModFlags_Alt = 4 # 1 << 2
447
- ImGuiModFlags_Super = 8 # 1 << 3
448
-
449
460
  # ImGuiMouseButton_
450
461
  ImGuiMouseButton_Left = 0 # 0
451
462
  ImGuiMouseButton_Right = 1 # 1
@@ -465,7 +476,7 @@ ImGuiMouseCursor_Hand = 7 # 7
465
476
  ImGuiMouseCursor_NotAllowed = 8 # 8
466
477
  ImGuiMouseCursor_COUNT = 9 # 9
467
478
 
468
- # ImGuiNavInput_
479
+ # ImGuiNavInput
469
480
  ImGuiNavInput_Activate = 0 # 0
470
481
  ImGuiNavInput_Cancel = 1 # 1
471
482
  ImGuiNavInput_Input = 2 # 2
@@ -482,11 +493,7 @@ ImGuiNavInput_FocusPrev = 12 # 12
482
493
  ImGuiNavInput_FocusNext = 13 # 13
483
494
  ImGuiNavInput_TweakSlow = 14 # 14
484
495
  ImGuiNavInput_TweakFast = 15 # 15
485
- ImGuiNavInput_KeyLeft_ = 16 # 16
486
- ImGuiNavInput_KeyRight_ = 17 # 17
487
- ImGuiNavInput_KeyUp_ = 18 # 18
488
- ImGuiNavInput_KeyDown_ = 19 # 19
489
- ImGuiNavInput_COUNT = 20 # 20
496
+ ImGuiNavInput_COUNT = 16 # 16
490
497
 
491
498
  # ImGuiPopupFlags_
492
499
  ImGuiPopupFlags_None = 0 # 0
@@ -1150,6 +1157,10 @@ class ImFontAtlas < FFI::Struct
1150
1157
  ImGui::ImFontAtlas_GetGlyphRangesDefault(self)
1151
1158
  end
1152
1159
 
1160
+ def GetGlyphRangesGreek()
1161
+ ImGui::ImFontAtlas_GetGlyphRangesGreek(self)
1162
+ end
1163
+
1153
1164
  def GetGlyphRangesJapanese()
1154
1165
  ImGui::ImFontAtlas_GetGlyphRangesJapanese(self)
1155
1166
  end
@@ -1350,6 +1361,8 @@ class ImGuiIO < FFI::Struct
1350
1361
  :MouseDragThreshold, :float,
1351
1362
  :KeyRepeatDelay, :float,
1352
1363
  :KeyRepeatRate, :float,
1364
+ :HoverDelayNormal, :float,
1365
+ :HoverDelayShort, :float,
1353
1366
  :UserData, :pointer,
1354
1367
  :Fonts, ImFontAtlas.ptr,
1355
1368
  :FontGlobalScale, :float,
@@ -1360,6 +1373,7 @@ class ImGuiIO < FFI::Struct
1360
1373
  :ConfigMacOSXBehaviors, :bool,
1361
1374
  :ConfigInputTrickleEventQueue, :bool,
1362
1375
  :ConfigInputTextCursorBlink, :bool,
1376
+ :ConfigInputTextEnterKeepActive, :bool,
1363
1377
  :ConfigDragClickToInputText, :bool,
1364
1378
  :ConfigWindowsResizeFromEdges, :bool,
1365
1379
  :ConfigWindowsMoveFromTitleBarOnly, :bool,
@@ -1388,8 +1402,9 @@ class ImGuiIO < FFI::Struct
1388
1402
  :MetricsActiveWindows, :int,
1389
1403
  :MetricsActiveAllocations, :int,
1390
1404
  :MouseDelta, ImVec2.by_value,
1391
- :KeyMap, [:int, 645],
1392
- :KeysDown, [:bool, 645],
1405
+ :KeyMap, [:int, 652],
1406
+ :KeysDown, [:bool, 652],
1407
+ :NavInputs, [:float, 16],
1393
1408
  :MousePos, ImVec2.by_value,
1394
1409
  :MouseDown, [:bool, 5],
1395
1410
  :MouseWheel, :float,
@@ -1398,9 +1413,8 @@ class ImGuiIO < FFI::Struct
1398
1413
  :KeyShift, :bool,
1399
1414
  :KeyAlt, :bool,
1400
1415
  :KeySuper, :bool,
1401
- :NavInputs, [:float, 20],
1402
1416
  :KeyMods, :int,
1403
- :KeysData, [ImGuiKeyData.by_value, 645],
1417
+ :KeysData, [ImGuiKeyData.by_value, 652],
1404
1418
  :WantCaptureMouseUnlessPopupClose, :bool,
1405
1419
  :MousePosPrev, ImVec2.by_value,
1406
1420
  :MouseClickedPos, [ImVec2.by_value, 5],
@@ -1415,8 +1429,6 @@ class ImGuiIO < FFI::Struct
1415
1429
  :MouseDownDuration, [:float, 5],
1416
1430
  :MouseDownDurationPrev, [:float, 5],
1417
1431
  :MouseDragMaxDistanceSqr, [:float, 5],
1418
- :NavInputsDownDuration, [:float, 20],
1419
- :NavInputsDownDurationPrev, [:float, 20],
1420
1432
  :PenPressure, :float,
1421
1433
  :AppFocusLost, :bool,
1422
1434
  :AppAcceptingEvents, :bool,
@@ -1635,34 +1647,6 @@ class ImGuiTextFilter < FFI::Struct
1635
1647
 
1636
1648
  end
1637
1649
 
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
1650
  class ImGuiViewport < FFI::Struct
1667
1651
  layout(
1668
1652
  :Flags, :int,
@@ -1813,6 +1797,7 @@ module ImGui
1813
1797
  :ImFontAtlas_GetGlyphRangesChineseSimplifiedCommon,
1814
1798
  :ImFontAtlas_GetGlyphRangesCyrillic,
1815
1799
  :ImFontAtlas_GetGlyphRangesDefault,
1800
+ :ImFontAtlas_GetGlyphRangesGreek,
1816
1801
  :ImFontAtlas_GetGlyphRangesJapanese,
1817
1802
  :ImFontAtlas_GetGlyphRangesKorean,
1818
1803
  :ImFontAtlas_GetGlyphRangesThai,
@@ -2145,6 +2130,7 @@ module ImGui
2145
2130
  :igSetNextWindowContentSize,
2146
2131
  :igSetNextWindowFocus,
2147
2132
  :igSetNextWindowPos,
2133
+ :igSetNextWindowScroll,
2148
2134
  :igSetNextWindowSize,
2149
2135
  :igSetNextWindowSizeConstraints,
2150
2136
  :igSetScrollFromPosX,
@@ -2314,6 +2300,7 @@ module ImGui
2314
2300
  :ImFontAtlas_GetGlyphRangesChineseSimplifiedCommon => [:pointer],
2315
2301
  :ImFontAtlas_GetGlyphRangesCyrillic => [:pointer],
2316
2302
  :ImFontAtlas_GetGlyphRangesDefault => [:pointer],
2303
+ :ImFontAtlas_GetGlyphRangesGreek => [:pointer],
2317
2304
  :ImFontAtlas_GetGlyphRangesJapanese => [:pointer],
2318
2305
  :ImFontAtlas_GetGlyphRangesKorean => [:pointer],
2319
2306
  :ImFontAtlas_GetGlyphRangesThai => [:pointer],
@@ -2515,7 +2502,7 @@ module ImGui
2515
2502
  :igGetWindowSize => [:pointer],
2516
2503
  :igGetWindowWidth => [],
2517
2504
  :igImage => [:pointer, ImVec2.by_value, ImVec2.by_value, ImVec2.by_value, ImVec4.by_value, ImVec4.by_value],
2518
- :igImageButton => [:pointer, ImVec2.by_value, ImVec2.by_value, ImVec2.by_value, :int, ImVec4.by_value, ImVec4.by_value],
2505
+ :igImageButton => [:pointer, :pointer, ImVec2.by_value, ImVec2.by_value, ImVec2.by_value, ImVec4.by_value, ImVec4.by_value],
2519
2506
  :igIndent => [:float],
2520
2507
  :igInputDouble => [:pointer, :pointer, :double, :double, :pointer, :int],
2521
2508
  :igInputFloat => [:pointer, :pointer, :float, :float, :pointer, :int],
@@ -2646,6 +2633,7 @@ module ImGui
2646
2633
  :igSetNextWindowContentSize => [ImVec2.by_value],
2647
2634
  :igSetNextWindowFocus => [],
2648
2635
  :igSetNextWindowPos => [ImVec2.by_value, :int, ImVec2.by_value],
2636
+ :igSetNextWindowScroll => [ImVec2.by_value],
2649
2637
  :igSetNextWindowSize => [ImVec2.by_value, :int],
2650
2638
  :igSetNextWindowSizeConstraints => [ImVec2.by_value, ImVec2.by_value, :ImGuiSizeCallback, :pointer],
2651
2639
  :igSetScrollFromPosX => [:float, :float],
@@ -2815,6 +2803,7 @@ module ImGui
2815
2803
  :ImFontAtlas_GetGlyphRangesChineseSimplifiedCommon => :pointer,
2816
2804
  :ImFontAtlas_GetGlyphRangesCyrillic => :pointer,
2817
2805
  :ImFontAtlas_GetGlyphRangesDefault => :pointer,
2806
+ :ImFontAtlas_GetGlyphRangesGreek => :pointer,
2818
2807
  :ImFontAtlas_GetGlyphRangesJapanese => :pointer,
2819
2808
  :ImFontAtlas_GetGlyphRangesKorean => :pointer,
2820
2809
  :ImFontAtlas_GetGlyphRangesThai => :pointer,
@@ -3147,6 +3136,7 @@ module ImGui
3147
3136
  :igSetNextWindowContentSize => :void,
3148
3137
  :igSetNextWindowFocus => :void,
3149
3138
  :igSetNextWindowPos => :void,
3139
+ :igSetNextWindowScroll => :void,
3150
3140
  :igSetNextWindowSize => :void,
3151
3141
  :igSetNextWindowSizeConstraints => :void,
3152
3142
  :igSetScrollFromPosX => :void,
@@ -3235,8 +3225,8 @@ module ImGui
3235
3225
  symbols.each do |sym|
3236
3226
  begin
3237
3227
  attach_function sym, args[sym], retvals[sym]
3238
- rescue FFI::NotFoundError => error
3239
- $stderr.puts("[Warning] Failed to import #{s}.\n") if output_error
3228
+ rescue FFI::NotFoundError
3229
+ $stderr.puts("[Warning] Failed to import #{sym}.\n") if output_error
3240
3230
  end
3241
3231
  end
3242
3232
 
@@ -3244,7 +3234,8 @@ module ImGui
3244
3234
  attach_function :ImVector_ImWchar_destroy, :ImVector_ImWchar_destroy, [:pointer], :void
3245
3235
  attach_function :ImVector_ImWchar_Init, :ImVector_ImWchar_destroy, [:pointer], :void
3246
3236
  attach_function :ImVector_ImWchar_UnInit, :ImVector_ImWchar_destroy, [:pointer], :void
3247
- end # self.import_symbols
3237
+
3238
+ @@imgui_import_done = true end # self.import_symbols
3248
3239
 
3249
3240
  # arg: type(const char*), flags(ImGuiDragDropFlags)
3250
3241
  # ret: pointer
@@ -4101,10 +4092,10 @@ module ImGui
4101
4092
  igImage(user_texture_id, size, uv0, uv1, tint_col, border_col)
4102
4093
  end
4103
4094
 
4104
- # arg: user_texture_id(ImTextureID), size(ImVec2), uv0(ImVec2), uv1(ImVec2), frame_padding(int), bg_col(ImVec4), tint_col(ImVec4)
4095
+ # arg: str_id(const char*), user_texture_id(ImTextureID), size(ImVec2), uv0(ImVec2), uv1(ImVec2), bg_col(ImVec4), tint_col(ImVec4)
4105
4096
  # ret: bool
4106
- def self.ImageButton(user_texture_id, size, uv0 = ImVec2.create(0,0), uv1 = ImVec2.create(1,1), frame_padding = -1, bg_col = ImVec4.create(0,0,0,0), tint_col = ImVec4.create(1,1,1,1))
4107
- igImageButton(user_texture_id, size, uv0, uv1, frame_padding, bg_col, tint_col)
4097
+ def self.ImageButton(str_id, user_texture_id, size, uv0 = ImVec2.create(0,0), uv1 = ImVec2.create(1,1), bg_col = ImVec4.create(0,0,0,0), tint_col = ImVec4.create(1,1,1,1))
4098
+ igImageButton(str_id, user_texture_id, size, uv0, uv1, bg_col, tint_col)
4108
4099
  end
4109
4100
 
4110
4101
  # arg: indent_w(float)
@@ -4856,6 +4847,12 @@ module ImGui
4856
4847
  igSetNextWindowPos(pos, cond, pivot)
4857
4848
  end
4858
4849
 
4850
+ # arg: scroll(ImVec2)
4851
+ # ret: void
4852
+ def self.SetNextWindowScroll(scroll)
4853
+ igSetNextWindowScroll(scroll)
4854
+ end
4855
+
4859
4856
  # arg: size(ImVec2), cond(ImGuiCond)
4860
4857
  # ret: void
4861
4858
  def self.SetNextWindowSize(size, cond = 0)
@@ -5292,7 +5289,7 @@ module ImGui
5292
5289
 
5293
5290
  # arg: ptr_id(const void*)
5294
5291
  # ret: void
5295
- def self.TreePush_Ptr(ptr_id = nil)
5292
+ def self.TreePush_Ptr(ptr_id)
5296
5293
  igTreePush_Ptr(ptr_id)
5297
5294
  end
5298
5295
 
@@ -173,10 +173,10 @@ module ImGui
173
173
 
174
174
  def self.ImGui_ImplGlfw_UpdateKeyModifiers(mods)
175
175
  io = ImGuiIO.new(ImGui::GetIO())
176
- io.AddKeyEvent(ImGuiKey_ModCtrl, (mods & GLFW::MOD_CONTROL) != 0)
177
- io.AddKeyEvent(ImGuiKey_ModShift, (mods & GLFW::MOD_SHIFT) != 0)
178
- io.AddKeyEvent(ImGuiKey_ModAlt, (mods & GLFW::MOD_ALT) != 0)
179
- io.AddKeyEvent(ImGuiKey_ModSuper, (mods & GLFW::MOD_SUPER) != 0)
176
+ io.AddKeyEvent(ImGuiMod_Ctrl, (mods & GLFW::MOD_CONTROL) != 0)
177
+ io.AddKeyEvent(ImGuiMod_Shift, (mods & GLFW::MOD_SHIFT) != 0)
178
+ io.AddKeyEvent(ImGuiMod_Alt, (mods & GLFW::MOD_ALT) != 0)
179
+ io.AddKeyEvent(ImGuiMod_Super, (mods & GLFW::MOD_SUPER) != 0)
180
180
  end
181
181
 
182
182
  @@ImplGlfw_MouseButtonCallback = GLFW::create_callback(:GLFWmousebuttonfun) do |window, button, action, mods|
@@ -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
 
@@ -260,10 +260,10 @@ module ImGui
260
260
  # [INTERNAL]
261
261
  def self.ImGui_ImplRaylib_UpdateKeyModifiers()
262
262
  io = ImGuiIO.new(ImGui::GetIO())
263
- io.AddKeyEvent(ImGuiKey_ModCtrl, Raylib.IsKeyDown(Raylib::KEY_RIGHT_CONTROL) || Raylib.IsKeyDown(Raylib::KEY_LEFT_CONTROL))
264
- io.AddKeyEvent(ImGuiKey_ModShift, Raylib.IsKeyDown(Raylib::KEY_RIGHT_SHIFT) || Raylib.IsKeyDown(Raylib::KEY_LEFT_SHIFT))
265
- io.AddKeyEvent(ImGuiKey_ModAlt, Raylib.IsKeyDown(Raylib::KEY_RIGHT_ALT) || Raylib.IsKeyDown(Raylib::KEY_LEFT_ALT))
266
- io.AddKeyEvent(ImGuiKey_ModSuper, Raylib.IsKeyDown(Raylib::KEY_RIGHT_SUPER) || Raylib.IsKeyDown(Raylib::KEY_LEFT_SUPER))
263
+ io.AddKeyEvent(ImGuiMod_Ctrl, Raylib.IsKeyDown(Raylib::KEY_RIGHT_CONTROL) || Raylib.IsKeyDown(Raylib::KEY_LEFT_CONTROL))
264
+ io.AddKeyEvent(ImGuiMod_Shift, Raylib.IsKeyDown(Raylib::KEY_RIGHT_SHIFT) || Raylib.IsKeyDown(Raylib::KEY_LEFT_SHIFT))
265
+ io.AddKeyEvent(ImGuiMod_Alt, Raylib.IsKeyDown(Raylib::KEY_RIGHT_ALT) || Raylib.IsKeyDown(Raylib::KEY_LEFT_ALT))
266
+ io.AddKeyEvent(ImGuiMod_Super, Raylib.IsKeyDown(Raylib::KEY_RIGHT_SUPER) || Raylib.IsKeyDown(Raylib::KEY_LEFT_SUPER))
267
267
  end
268
268
 
269
269
  def self.ImplRaylib_ProcessKeyboard()
@@ -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 # int
20
+ @mouseButtonsDown = 0 # int
21
21
  @mouseCursors = Array.new(ImGuiMouseCursor_COUNT) { 0 } # SDL_Cursor*
22
22
  @clipboardTextData = nil # char*
23
23
  @mouseCanUseGlobalState = false # bool
@@ -170,10 +170,10 @@ module ImGui
170
170
  # [INTERNAL]
171
171
  def self.ImGui_ImplSDL2_UpdateKeyModifiers(sdl_key_mods)
172
172
  io = ImGuiIO.new(ImGui::GetIO())
173
- io.AddKeyEvent(ImGuiKey_ModCtrl, (sdl_key_mods & SDL::KMOD_CTRL) != 0)
174
- io.AddKeyEvent(ImGuiKey_ModShift, (sdl_key_mods & SDL::KMOD_SHIFT) != 0)
175
- io.AddKeyEvent(ImGuiKey_ModAlt, (sdl_key_mods & SDL::KMOD_ALT) != 0)
176
- io.AddKeyEvent(ImGuiKey_ModSuper, (sdl_key_mods & SDL::KMOD_GUI) != 0)
173
+ io.AddKeyEvent(ImGuiMod_Ctrl, (sdl_key_mods & SDL::KMOD_CTRL) != 0)
174
+ io.AddKeyEvent(ImGuiMod_Shift, (sdl_key_mods & SDL::KMOD_SHIFT) != 0)
175
+ io.AddKeyEvent(ImGuiMod_Alt, (sdl_key_mods & SDL::KMOD_ALT) != 0)
176
+ io.AddKeyEvent(ImGuiMod_Super, (sdl_key_mods & SDL::KMOD_GUI) != 0)
177
177
  end
178
178
 
179
179
  # You can read the io.WantCaptureMouse, io.WantCaptureKeyboard flags to tell if dear imgui wants to use your inputs.
@@ -60,7 +60,6 @@ module ImGui
60
60
  end
61
61
 
62
62
  def self.ImplSDLRenderer_NewFrame()
63
- io = ImGuiIO.new(ImGui::GetIO())
64
63
  bd = ImGui_ImplSDLRenderer_GetBackendData()
65
64
  ImGui::ImplSDLRenderer_CreateDeviceObjects() if bd[:FontTexture] == nil
66
65
  end
@@ -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
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - vaiorabbit
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-07-02 00:00:00.000000000 Z
11
+ date: 2022-12-25 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: 2.6.0
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
Binary file