imgui-bindings 0.1.3 → 0.1.5

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: 72d19d82cafd6b2a8d449e0d69a20e3b5265e06673d18abcec7ba7d8c13c9c89
4
- data.tar.gz: d5c1c9f41f13b18206cd94c0ad61768b9c397f3c2f08cb5f22bf009b6d6d6cbb
3
+ metadata.gz: 953ebd938f07e22b04fd3b5b731b39af52cefc662756aef62e379911ec6b4069
4
+ data.tar.gz: d9c4141d0061ab02a812040f235fc2ba0f934aa52becba340c9d1556055b936e
5
5
  SHA512:
6
- metadata.gz: e04d4b1540aa983aacc7c3bad99a92c340f5d038d67be264dfb7f42b76306ef6b3ed15698713cc0797552bae083f0bad37f5ef5f9bcbfd9565313581532a404b
7
- data.tar.gz: 0e0c6e296594b472b11ca1fd332079300da68159baa4e6bec91404c53b855907ede56ad57ab13fe7f3f8c9d77cee4065e5a4a85c2e1eebb03904a4d80a03a112
6
+ metadata.gz: 33267f484dad0070ed7ccb5f3abe07c5f279d810847792e37efaac8222aae5b3fb99b722e4986645ed940c0283c520b55d62405c150c978098988d139a6ddc3c
7
+ data.tar.gz: a275549e370cac4bfe71ae0c28fd719193204c999663391b5b9c2e2df23ebc7acc80f22a002ef70734fc29aa38b6e28500d122a71c05c43a96ae38abbb4e4e7e
data/ChangeLog CHANGED
@@ -1,3 +1,11 @@
1
+ 2023-04-15 vaiorabbit <http://twitter.com/vaiorabbit>
2
+
3
+ * ImGui v1.89.5
4
+
5
+ 2023-03-19 vaiorabbit <http://twitter.com/vaiorabbit>
6
+
7
+ * ImGui v1.89.4
8
+
1
9
  2023-02-23 vaiorabbit <http://twitter.com/vaiorabbit>
2
10
 
3
11
  * ImGui v1.89.3
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 : 2023-02-23
6
+ * Last modified : 2023-04-15
7
7
 
8
8
  <img src="https://raw.githubusercontent.com/vaiorabbit/ruby-imgui/master/doc/jpfont_test.png" width="250">
9
9
 
@@ -16,7 +16,7 @@
16
16
  * [Windows] https://rubyinstaller.org/downloads/ Ruby+Devkit
17
17
  * ruby 3.2.0 (2022-12-25 revision a528908271) [x64-mingw-ucrt]
18
18
  * [macOS]
19
- * ruby 3.2.0 (2022-12-25 revision a528908271) [arm64-darwin21]
19
+ * ruby 3.2.1 (2023-02-08 revision 31819e82c8) [arm64-darwin22]
20
20
  * [Linux]
21
21
  * ruby 3.2.0 (2022-12-25 revision a528908271) [aarch64-linux]
22
22
  * Ruby Gems
@@ -42,6 +42,7 @@
42
42
  * ruby 3.0.0p0 (2020-12-25 revision 95aff21468) [x64-mingw32]
43
43
  * ruby 2.7.1p83 (2020-03-31 revision a0c7c23c9c) [x64-mingw32]
44
44
  * [macOS]
45
+ * ruby 3.2.0 (2022-12-25 revision a528908271) [arm64-darwin21]
45
46
  * ruby 3.1.2p20 (2022-04-12 revision 4491bb740a) [arm64-darwin21]
46
47
  * ruby 3.1.2p20 (2022-04-12 revision 4491bb740a) [arm64-darwin21]
47
48
  * ruby 3.1.0p0 (2021-12-25 revision fb4df44d16) [arm64-darwin20]
data/lib/imgui.aarch64.so CHANGED
Binary file
data/lib/imgui.dll CHANGED
Binary file
data/lib/imgui.dylib CHANGED
Binary file
data/lib/imgui.rb CHANGED
@@ -57,6 +57,7 @@ FFI.typedef :ushort, :ImWchar
57
57
  FFI.typedef :ushort, :ImWchar16
58
58
  FFI.typedef :uint, :ImWchar32
59
59
  FFI.typedef :int, :ImGuiKey
60
+ FFI.typedef :int, :ImGuiMouseSource
60
61
 
61
62
  # ImDrawFlags_
62
63
  # Flags for ImDrawList functions
@@ -223,7 +224,7 @@ ImGuiCond_Appearing = 8 # 1 << 3 # Set the variable if the object/window is a
223
224
  # ImGuiConfigFlags_
224
225
  # Configuration flags stored in io.ConfigFlags. Set by user/application.
225
226
  ImGuiConfigFlags_None = 0 # 0
226
- ImGuiConfigFlags_NavEnableKeyboard = 1 # 1 << 0 # Master keyboard navigation enable flag.
227
+ ImGuiConfigFlags_NavEnableKeyboard = 1 # 1 << 0 # Master keyboard navigation enable flag. Enable full Tabbing + directional arrows + space/enter to activate.
227
228
  ImGuiConfigFlags_NavEnableGamepad = 2 # 1 << 1 # Master gamepad navigation enable flag. Backend also needs to set ImGuiBackendFlags_HasGamepad.
228
229
  ImGuiConfigFlags_NavEnableSetMousePos = 4 # 1 << 2 # Instruct navigation to move the mouse cursor. May be useful on TV/console systems where moving a virtual mouse is awkward. Will update io.MousePos and set io.WantSetMousePos=true. If enabled you MUST honor io.WantSetMousePos requests in your backend, otherwise ImGui will react as if the mouse is jumping around back and forth.
229
230
  ImGuiConfigFlags_NavNoCaptureKeyboard = 8 # 1 << 3 # Instruct navigation to not set the io.WantCaptureKeyboard flag when io.NavActive is set.
@@ -329,6 +330,7 @@ ImGuiInputTextFlags_EscapeClearsAll = 1048576 # 1 << 20 # Escape key clears con
329
330
  # All our named keys are >= 512. Keys value 0 to 511 are left unused as legacy native/opaque key values (< 1.87).
330
331
  # Since >= 1.89 we increased typing (went from int to enum), some legacy code may need a cast to ImGuiKey.
331
332
  # Read details about the 1.87 and 1.89 transition : https://github.com/ocornut/imgui/issues/4921
333
+ # Note that "Keys" related to physical keys and are not the same concept as input "Characters", the later are submitted via io.AddInputCharacter().
332
334
  ImGuiKey_None = 0 # 0
333
335
  ImGuiKey_Tab = 512 # 512 # == ImGuiKey_NamedKey_BEGIN
334
336
  ImGuiKey_LeftArrow = 513 # 513
@@ -482,7 +484,7 @@ ImGuiKey_NamedKey_BEGIN = 512 # 512
482
484
  ImGuiKey_NamedKey_END = 652 # ImGuiKey_COUNT
483
485
  ImGuiKey_NamedKey_COUNT = 140 # ImGuiKey_NamedKey_END - ImGuiKey_NamedKey_BEGIN
484
486
  ImGuiKey_KeysData_SIZE = 652 # ImGuiKey_COUNT # Size of KeysData[]: hold legacy 0..512 keycodes + named keys
485
- ImGuiKey_KeysData_OFFSET = 0 # 0 # First key stored in io.KeysData[0]. Accesses to io.KeysData[] must use (key - ImGuiKey_KeysData_OFFSET).
487
+ ImGuiKey_KeysData_OFFSET = 0 # 0 # Accesses to io.KeysData[] must use (key - ImGuiKey_KeysData_OFFSET) index.
486
488
 
487
489
  # ImGuiMouseButton_
488
490
  # Identify a mouse button.
@@ -507,6 +509,16 @@ ImGuiMouseCursor_Hand = 7 # 7 # (Unused by Dear ImGui functions. Use for e
507
509
  ImGuiMouseCursor_NotAllowed = 8 # 8 # When hovering something with disallowed interaction. Usually a crossed circle.
508
510
  ImGuiMouseCursor_COUNT = 9 # 9
509
511
 
512
+ # ImGuiMouseSource
513
+ # Enumeration for AddMouseSourceEvent() actual source of Mouse Input data.
514
+ # Historically we use "Mouse" terminology everywhere to indicate pointer data, e.g. MousePos, IsMousePressed(), io.AddMousePosEvent()
515
+ # But that "Mouse" data can come from different source which occasionally may be useful for application to know about.
516
+ # You can submit a change of pointer type using io.AddMouseSourceEvent().
517
+ ImGuiMouseSource_Mouse = 0 # 0 # Input is coming from an actual mouse.
518
+ ImGuiMouseSource_TouchScreen = 1 # 1 # Input is coming from a touch screen (no hovering prior to initial press, less precise initial press aiming, dual-axis wheeling possible).
519
+ ImGuiMouseSource_Pen = 2 # 2 # Input is coming from a pressure/magnetic pen (often used in conjunction with high-sampling rates).
520
+ ImGuiMouseSource_COUNT = 3 # 3
521
+
510
522
  # ImGuiNavInput
511
523
  # OBSOLETED in 1.88 (from July 2022): ImGuiNavInput and io.NavInputs[].
512
524
  # Official backends between 1.60 and 1.86: will keep working and feed gamepad inputs as long as IMGUI_DISABLE_OBSOLETE_KEYIO is not set.
@@ -1526,6 +1538,8 @@ class ImGuiIO < FFI::Struct
1526
1538
  :ConfigWindowsResizeFromEdges, :bool, # = true // Enable resizing of windows from their edges and from the lower-left corner. This requires (io.BackendFlags & ImGuiBackendFlags_HasMouseCursors) because it needs mouse cursor feedback. (This used to be a per-window ImGuiWindowFlags_ResizeFromAnySide flag)
1527
1539
  :ConfigWindowsMoveFromTitleBarOnly, :bool, # = false // Enable allowing to move windows only when clicking on their title bar. Does not apply to windows without a title bar.
1528
1540
  :ConfigMemoryCompactTimer, :float, # = 60.0f // Timer (in seconds) to free transient windows/tables memory buffers when unused. Set to -1.0f to disable.
1541
+ :ConfigDebugBeginReturnValueOnce, :bool, # = false // First-time calls to Begin()/BeginChild() will return false. NEEDS TO BE SET AT APPLICATION BOOT TIME if you don't want to miss windows.
1542
+ :ConfigDebugBeginReturnValueLoop, :bool, # = false // Some calls to Begin()/BeginChild() will return false. Will cycle through window depths then repeat. Suggested use: add "io.ConfigDebugBeginReturnValue = io.KeyShift" in your main loop then occasionally press SHIFT. Windows should be flickering while running.
1529
1543
  :BackendPlatformName, :pointer, # = NULL
1530
1544
  :BackendRendererName, :pointer, # = NULL
1531
1545
  :BackendPlatformUserData, :pointer, # = NULL // User data for platform backend
@@ -1553,10 +1567,12 @@ class ImGuiIO < FFI::Struct
1553
1567
  :KeyMap, [:int, 652], # [LEGACY] Input: map of indices into the KeysDown[512] entries array which represent your "native" keyboard state. The first 512 are now unused and should be kept zero. Legacy backend will write into KeyMap[] using ImGuiKey_ indices which are always >512.
1554
1568
  :KeysDown, [:bool, 652], # [LEGACY] Input: Keyboard keys that are pressed (ideally left in the "native" order your engine has access to keyboard keys, so you can use your own defines/enums for keys). This used to be [512] sized. It is now ImGuiKey_COUNT to allow legacy io.KeysDown[GetKeyIndex(...)] to work without an overflow.
1555
1569
  :NavInputs, [:float, 16], # [LEGACY] Since 1.88, NavInputs[] was removed. Backends from 1.60 to 1.86 won't build. Feed gamepad inputs via io.AddKeyEvent() and ImGuiKey_GamepadXXX enums.
1570
+ :Ctx, :pointer, # Parent UI context (needs to be set explicitly by parent).
1556
1571
  :MousePos, ImVec2.by_value, # Mouse position, in pixels. Set to ImVec2(-FLT_MAX, -FLT_MAX) if mouse is unavailable (on another screen, etc.)
1557
1572
  :MouseDown, [:bool, 5], # Mouse buttons: 0=left, 1=right, 2=middle + extras (ImGuiMouseButton_COUNT == 5). Dear ImGui mostly uses left and right buttons. Other buttons allow us to track if the mouse is being used by your application + available to user as a convenience via IsMouse** API.
1558
1573
  :MouseWheel, :float, # Mouse wheel Vertical: 1 unit scrolls about 5 lines text. >0 scrolls Up, <0 scrolls Down. Hold SHIFT to turn vertical scroll into horizontal scroll.
1559
1574
  :MouseWheelH, :float, # Mouse wheel Horizontal. >0 scrolls Left, <0 scrolls Right. Most users don't have a mouse with a horizontal wheel, may not be filled by all backends.
1575
+ :MouseSource, :int, # Mouse actual input peripheral (Mouse/TouchScreen/Pen).
1560
1576
  :KeyCtrl, :bool, # Keyboard modifier down: Control
1561
1577
  :KeyShift, :bool, # Keyboard modifier down: Shift
1562
1578
  :KeyAlt, :bool, # Keyboard modifier down: Alt
@@ -1574,6 +1590,7 @@ class ImGuiIO < FFI::Struct
1574
1590
  :MouseReleased, [:bool, 5], # Mouse button went from Down to !Down
1575
1591
  :MouseDownOwned, [:bool, 5], # Track if button was clicked inside a dear imgui window or over void blocked by a popup. We don't request mouse capture from the application if click started outside ImGui bounds.
1576
1592
  :MouseDownOwnedUnlessPopupClose, [:bool, 5], # Track if button was clicked inside a dear imgui window.
1593
+ :MouseWheelRequestAxisSwap, :bool, # On a non-Mac system, holding SHIFT requests WheelY to perform the equivalent of a WheelX event. On a Mac system this is already enforced by the system.
1577
1594
  :MouseDownDuration, [:float, 5], # Duration the mouse button has been down (0.0f == just clicked)
1578
1595
  :MouseDownDurationPrev, [:float, 5], # Previous time the mouse button has been down
1579
1596
  :MouseDragMaxDistanceSqr, [:float, 5], # Squared maximum distance of how much mouse has traveled from the clicking point (used for moving thresholds)
@@ -1618,6 +1635,10 @@ class ImGuiIO < FFI::Struct
1618
1635
  ImGui::ImGuiIO_AddMousePosEvent(self, x, y)
1619
1636
  end
1620
1637
 
1638
+ def AddMouseSourceEvent(source)
1639
+ ImGui::ImGuiIO_AddMouseSourceEvent(self, source)
1640
+ end
1641
+
1621
1642
  def AddMouseWheelEvent(wheel_x, wheel_y)
1622
1643
  ImGui::ImGuiIO_AddMouseWheelEvent(self, wheel_x, wheel_y)
1623
1644
  end
@@ -1659,6 +1680,7 @@ end
1659
1680
  # - ImGuiInputTextFlags_CallbackResize: Callback on buffer capacity changes request (beyond 'buf_size' parameter value), allowing the string to grow.
1660
1681
  class ImGuiInputTextCallbackData < FFI::Struct
1661
1682
  layout(
1683
+ :Ctx, :pointer, # Parent UI context
1662
1684
  :EventFlag, :int, # One ImGuiInputTextFlags_Callback* // Read-only
1663
1685
  :Flags, :int, # What user passed to InputText() // Read-only
1664
1686
  :UserData, :pointer, # What user passed to InputText() // Read-only
@@ -2004,6 +2026,7 @@ module ImGui
2004
2026
  [:ImGuiIO_AddKeyEvent, [:pointer, :int, :bool], :void],
2005
2027
  [:ImGuiIO_AddMouseButtonEvent, [:pointer, :int, :bool], :void],
2006
2028
  [:ImGuiIO_AddMousePosEvent, [:pointer, :float, :float], :void],
2029
+ [:ImGuiIO_AddMouseSourceEvent, [:pointer, :int], :void],
2007
2030
  [:ImGuiIO_AddMouseWheelEvent, [:pointer, :float, :float], :void],
2008
2031
  [:ImGuiIO_ClearInputCharacters, [:pointer], :void],
2009
2032
  [:ImGuiIO_ClearInputKeys, [:pointer], :void],
@@ -2050,7 +2073,7 @@ module ImGui
2050
2073
  [:igBeginTabBar, [:pointer, :int], :bool],
2051
2074
  [:igBeginTabItem, [:pointer, :pointer, :int], :bool],
2052
2075
  [:igBeginTable, [:pointer, :int, :int, ImVec2.by_value, :float], :bool],
2053
- [:igBeginTooltip, [], :void],
2076
+ [:igBeginTooltip, [], :bool],
2054
2077
  [:igBullet, [], :void],
2055
2078
  [:igBulletText, [:pointer, :varargs], :void],
2056
2079
  [:igButton, [:pointer, ImVec2.by_value], :bool],
@@ -2249,7 +2272,6 @@ module ImGui
2249
2272
  [:igPlotHistogram_FnFloatPtr, [:pointer, :pointer, :pointer, :int, :int, :pointer, :float, :float, ImVec2.by_value], :void],
2250
2273
  [:igPlotLines_FloatPtr, [:pointer, :pointer, :int, :int, :pointer, :float, :float, ImVec2.by_value, :int], :void],
2251
2274
  [:igPlotLines_FnFloatPtr, [:pointer, :pointer, :pointer, :int, :int, :pointer, :float, :float, ImVec2.by_value], :void],
2252
- [:igPopAllowKeyboardFocus, [], :void],
2253
2275
  [:igPopButtonRepeat, [], :void],
2254
2276
  [:igPopClipRect, [], :void],
2255
2277
  [:igPopFont, [], :void],
@@ -2257,9 +2279,9 @@ module ImGui
2257
2279
  [:igPopItemWidth, [], :void],
2258
2280
  [:igPopStyleColor, [:int], :void],
2259
2281
  [:igPopStyleVar, [:int], :void],
2282
+ [:igPopTabStop, [], :void],
2260
2283
  [:igPopTextWrapPos, [], :void],
2261
2284
  [:igProgressBar, [:float, ImVec2.by_value, :pointer], :void],
2262
- [:igPushAllowKeyboardFocus, [:bool], :void],
2263
2285
  [:igPushButtonRepeat, [:bool], :void],
2264
2286
  [:igPushClipRect, [ImVec2.by_value, ImVec2.by_value, :bool], :void],
2265
2287
  [:igPushFont, [:pointer], :void],
@@ -2272,6 +2294,7 @@ module ImGui
2272
2294
  [:igPushStyleColor_Vec4, [:int, ImVec4.by_value], :void],
2273
2295
  [:igPushStyleVar_Float, [:int, :float], :void],
2274
2296
  [:igPushStyleVar_Vec2, [:int, ImVec2.by_value], :void],
2297
+ [:igPushTabStop, [:bool], :void],
2275
2298
  [:igPushTextWrapPos, [:float], :void],
2276
2299
  [:igRadioButton_Bool, [:pointer, :bool], :bool],
2277
2300
  [:igRadioButton_IntPtr, [:pointer, :pointer, :int], :bool],
@@ -2624,7 +2647,7 @@ module ImGui
2624
2647
  igBeginTable(str_id, column, flags, outer_size, inner_width)
2625
2648
  end
2626
2649
 
2627
- # ret: void
2650
+ # ret: bool
2628
2651
  #
2629
2652
  # Tooltips
2630
2653
  # - Tooltip are windows following the mouse. They do not take focus away.
@@ -3000,7 +3023,7 @@ module ImGui
3000
3023
  end
3001
3024
 
3002
3025
  # ret: void
3003
- def self.EndTooltip()
3026
+ def self.EndTooltip() # only call EndTooltip() if BeginTooltip() returns true!
3004
3027
  igEndTooltip()
3005
3028
  end
3006
3029
 
@@ -3863,11 +3886,6 @@ module ImGui
3863
3886
  igPlotLines_FnFloatPtr(label, values_getter, data, values_count, values_offset, overlay_text, scale_min, scale_max, graph_size)
3864
3887
  end
3865
3888
 
3866
- # ret: void
3867
- def self.PopAllowKeyboardFocus()
3868
- igPopAllowKeyboardFocus()
3869
- end
3870
-
3871
3889
  # ret: void
3872
3890
  def self.PopButtonRepeat()
3873
3891
  igPopButtonRepeat()
@@ -3905,6 +3923,11 @@ module ImGui
3905
3923
  igPopStyleVar(count)
3906
3924
  end
3907
3925
 
3926
+ # ret: void
3927
+ def self.PopTabStop()
3928
+ igPopTabStop()
3929
+ end
3930
+
3908
3931
  # ret: void
3909
3932
  def self.PopTextWrapPos()
3910
3933
  igPopTextWrapPos()
@@ -3916,12 +3939,6 @@ module ImGui
3916
3939
  igProgressBar(fraction, size_arg, overlay)
3917
3940
  end
3918
3941
 
3919
- # arg: allow_keyboard_focus(bool)
3920
- # ret: void
3921
- def self.PushAllowKeyboardFocus(allow_keyboard_focus) # == tab stop enable. Allow focusing using TAB/Shift-TAB, enabled by default but you can disable it for certain widgets
3922
- igPushAllowKeyboardFocus(allow_keyboard_focus)
3923
- end
3924
-
3925
3942
  # arg: repeat(bool)
3926
3943
  # ret: void
3927
3944
  def self.PushButtonRepeat(repeat) # in 'repeat' mode, Button*() functions return repeated true in a typematic manner (using io.KeyRepeatDelay/io.KeyRepeatRate setting). Note that you can call IsItemActive() after any Button() to tell if the button is held in the current frame.
@@ -4001,6 +4018,12 @@ module ImGui
4001
4018
  igPushStyleVar_Vec2(idx, val)
4002
4019
  end
4003
4020
 
4021
+ # arg: tab_stop(bool)
4022
+ # ret: void
4023
+ def self.PushTabStop(tab_stop) # == tab stop enable. Allow focusing using TAB/Shift-TAB, enabled by default but you can disable it for certain widgets
4024
+ igPushTabStop(tab_stop)
4025
+ end
4026
+
4004
4027
  # arg: wrap_local_pos_x(float)
4005
4028
  # ret: void
4006
4029
  def self.PushTextWrapPos(wrap_local_pos_x = 0.0) # push word-wrapping position for Text*() commands. < 0.0f: no wrapping; 0.0f: wrap to end of window (or column); > 0.0f: wrap at 'wrap_pos_x' position in window local space
@@ -4908,7 +4931,7 @@ module ImGui
4908
4931
 
4909
4932
  #
4910
4933
  # ID stack/scopes
4911
- # Read the FAQ (docs/FAQ.md or http://dearimgui.org/faq) for more details about how ID are handled in dear imgui.
4934
+ # Read the FAQ (docs/FAQ.md or http://dearimgui.com/faq) for more details about how ID are handled in dear imgui.
4912
4935
  # - Those questions are answered and impacted by understanding of the ID stack system:
4913
4936
  # - "Q: Why is my widget not reacting when I click on it?"
4914
4937
  # - "Q: How can I have widgets with an empty label?"
data/lib/imgui.x86_64.so CHANGED
Binary file
Binary file
data/lib/imnodes.dll CHANGED
Binary file
data/lib/imnodes.dylib CHANGED
Binary file
Binary file
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.1.3
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - vaiorabbit
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-02-23 00:00:00.000000000 Z
11
+ date: 2023-04-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: ffi
@@ -86,7 +86,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
86
86
  - !ruby/object:Gem::Version
87
87
  version: '0'
88
88
  requirements: []
89
- rubygems_version: 3.4.1
89
+ rubygems_version: 3.4.6
90
90
  signing_key:
91
91
  specification_version: 4
92
92
  summary: Bindings for Dear ImGui