imgui-bindings 0.1.3 → 0.1.4

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: 8ecd0711005debbc893498e3512237755a62c489a0355c42b126ca83e9968295
4
+ data.tar.gz: 3ec44fee4b91bf293c2470f80be0b975eab6715027edb126937048e06c19f353
5
5
  SHA512:
6
- metadata.gz: e04d4b1540aa983aacc7c3bad99a92c340f5d038d67be264dfb7f42b76306ef6b3ed15698713cc0797552bae083f0bad37f5ef5f9bcbfd9565313581532a404b
7
- data.tar.gz: 0e0c6e296594b472b11ca1fd332079300da68159baa4e6bec91404c53b855907ede56ad57ab13fe7f3f8c9d77cee4065e5a4a85c2e1eebb03904a4d80a03a112
6
+ metadata.gz: a286359ad4882026a276ba01d1cee4830c2997dc0c700a3b199bd2610d9eecf781cf0c57e15c2e33270e02d5315374e536c84135314701f90b36fb48ddd08bf9
7
+ data.tar.gz: 990ea8cbaaa20a2217173d9be5e5910a9372006b7eb48cbc386d7c675c76bb079a24c0e1536c9cb5ec6d9d5d02cd4863668d18267e12b38283a102c7365239ba
data/ChangeLog CHANGED
@@ -1,3 +1,7 @@
1
+ 2023-03-19 vaiorabbit <http://twitter.com/vaiorabbit>
2
+
3
+ * ImGui v1.89.4
4
+
1
5
  2023-02-23 vaiorabbit <http://twitter.com/vaiorabbit>
2
6
 
3
7
  * 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-03-19
7
7
 
8
8
  <img src="https://raw.githubusercontent.com/vaiorabbit/ruby-imgui/master/doc/jpfont_test.png" width="250">
9
9
 
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
@@ -223,7 +223,7 @@ ImGuiCond_Appearing = 8 # 1 << 3 # Set the variable if the object/window is a
223
223
  # ImGuiConfigFlags_
224
224
  # Configuration flags stored in io.ConfigFlags. Set by user/application.
225
225
  ImGuiConfigFlags_None = 0 # 0
226
- ImGuiConfigFlags_NavEnableKeyboard = 1 # 1 << 0 # Master keyboard navigation enable flag.
226
+ ImGuiConfigFlags_NavEnableKeyboard = 1 # 1 << 0 # Master keyboard navigation enable flag. Enable full Tabbing + directional arrows + space/enter to activate.
227
227
  ImGuiConfigFlags_NavEnableGamepad = 2 # 1 << 1 # Master gamepad navigation enable flag. Backend also needs to set ImGuiBackendFlags_HasGamepad.
228
228
  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
229
  ImGuiConfigFlags_NavNoCaptureKeyboard = 8 # 1 << 3 # Instruct navigation to not set the io.WantCaptureKeyboard flag when io.NavActive is set.
@@ -329,6 +329,7 @@ ImGuiInputTextFlags_EscapeClearsAll = 1048576 # 1 << 20 # Escape key clears con
329
329
  # All our named keys are >= 512. Keys value 0 to 511 are left unused as legacy native/opaque key values (< 1.87).
330
330
  # Since >= 1.89 we increased typing (went from int to enum), some legacy code may need a cast to ImGuiKey.
331
331
  # Read details about the 1.87 and 1.89 transition : https://github.com/ocornut/imgui/issues/4921
332
+ # Note that "Keys" related to physical keys and are not the same concept as input "Characters", the later are submitted via io.AddInputCharacter().
332
333
  ImGuiKey_None = 0 # 0
333
334
  ImGuiKey_Tab = 512 # 512 # == ImGuiKey_NamedKey_BEGIN
334
335
  ImGuiKey_LeftArrow = 513 # 513
@@ -482,7 +483,7 @@ ImGuiKey_NamedKey_BEGIN = 512 # 512
482
483
  ImGuiKey_NamedKey_END = 652 # ImGuiKey_COUNT
483
484
  ImGuiKey_NamedKey_COUNT = 140 # ImGuiKey_NamedKey_END - ImGuiKey_NamedKey_BEGIN
484
485
  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).
486
+ ImGuiKey_KeysData_OFFSET = 0 # 0 # Accesses to io.KeysData[] must use (key - ImGuiKey_KeysData_OFFSET) index.
486
487
 
487
488
  # ImGuiMouseButton_
488
489
  # Identify a mouse button.
@@ -1526,6 +1527,8 @@ class ImGuiIO < FFI::Struct
1526
1527
  :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
1528
  :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
1529
  :ConfigMemoryCompactTimer, :float, # = 60.0f // Timer (in seconds) to free transient windows/tables memory buffers when unused. Set to -1.0f to disable.
1530
+ :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.
1531
+ :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
1532
  :BackendPlatformName, :pointer, # = NULL
1530
1533
  :BackendRendererName, :pointer, # = NULL
1531
1534
  :BackendPlatformUserData, :pointer, # = NULL // User data for platform backend
@@ -1553,6 +1556,7 @@ class ImGuiIO < FFI::Struct
1553
1556
  :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
1557
  :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
1558
  :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.
1559
+ :Ctx, :pointer, # Parent UI context (needs to be set explicitly by parent).
1556
1560
  :MousePos, ImVec2.by_value, # Mouse position, in pixels. Set to ImVec2(-FLT_MAX, -FLT_MAX) if mouse is unavailable (on another screen, etc.)
1557
1561
  :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
1562
  :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.
@@ -1659,6 +1663,7 @@ end
1659
1663
  # - ImGuiInputTextFlags_CallbackResize: Callback on buffer capacity changes request (beyond 'buf_size' parameter value), allowing the string to grow.
1660
1664
  class ImGuiInputTextCallbackData < FFI::Struct
1661
1665
  layout(
1666
+ :Ctx, :pointer, # Parent UI context
1662
1667
  :EventFlag, :int, # One ImGuiInputTextFlags_Callback* // Read-only
1663
1668
  :Flags, :int, # What user passed to InputText() // Read-only
1664
1669
  :UserData, :pointer, # What user passed to InputText() // Read-only
@@ -2050,7 +2055,7 @@ module ImGui
2050
2055
  [:igBeginTabBar, [:pointer, :int], :bool],
2051
2056
  [:igBeginTabItem, [:pointer, :pointer, :int], :bool],
2052
2057
  [:igBeginTable, [:pointer, :int, :int, ImVec2.by_value, :float], :bool],
2053
- [:igBeginTooltip, [], :void],
2058
+ [:igBeginTooltip, [], :bool],
2054
2059
  [:igBullet, [], :void],
2055
2060
  [:igBulletText, [:pointer, :varargs], :void],
2056
2061
  [:igButton, [:pointer, ImVec2.by_value], :bool],
@@ -2249,7 +2254,6 @@ module ImGui
2249
2254
  [:igPlotHistogram_FnFloatPtr, [:pointer, :pointer, :pointer, :int, :int, :pointer, :float, :float, ImVec2.by_value], :void],
2250
2255
  [:igPlotLines_FloatPtr, [:pointer, :pointer, :int, :int, :pointer, :float, :float, ImVec2.by_value, :int], :void],
2251
2256
  [:igPlotLines_FnFloatPtr, [:pointer, :pointer, :pointer, :int, :int, :pointer, :float, :float, ImVec2.by_value], :void],
2252
- [:igPopAllowKeyboardFocus, [], :void],
2253
2257
  [:igPopButtonRepeat, [], :void],
2254
2258
  [:igPopClipRect, [], :void],
2255
2259
  [:igPopFont, [], :void],
@@ -2257,9 +2261,9 @@ module ImGui
2257
2261
  [:igPopItemWidth, [], :void],
2258
2262
  [:igPopStyleColor, [:int], :void],
2259
2263
  [:igPopStyleVar, [:int], :void],
2264
+ [:igPopTabStop, [], :void],
2260
2265
  [:igPopTextWrapPos, [], :void],
2261
2266
  [:igProgressBar, [:float, ImVec2.by_value, :pointer], :void],
2262
- [:igPushAllowKeyboardFocus, [:bool], :void],
2263
2267
  [:igPushButtonRepeat, [:bool], :void],
2264
2268
  [:igPushClipRect, [ImVec2.by_value, ImVec2.by_value, :bool], :void],
2265
2269
  [:igPushFont, [:pointer], :void],
@@ -2272,6 +2276,7 @@ module ImGui
2272
2276
  [:igPushStyleColor_Vec4, [:int, ImVec4.by_value], :void],
2273
2277
  [:igPushStyleVar_Float, [:int, :float], :void],
2274
2278
  [:igPushStyleVar_Vec2, [:int, ImVec2.by_value], :void],
2279
+ [:igPushTabStop, [:bool], :void],
2275
2280
  [:igPushTextWrapPos, [:float], :void],
2276
2281
  [:igRadioButton_Bool, [:pointer, :bool], :bool],
2277
2282
  [:igRadioButton_IntPtr, [:pointer, :pointer, :int], :bool],
@@ -2624,7 +2629,7 @@ module ImGui
2624
2629
  igBeginTable(str_id, column, flags, outer_size, inner_width)
2625
2630
  end
2626
2631
 
2627
- # ret: void
2632
+ # ret: bool
2628
2633
  #
2629
2634
  # Tooltips
2630
2635
  # - Tooltip are windows following the mouse. They do not take focus away.
@@ -3000,7 +3005,7 @@ module ImGui
3000
3005
  end
3001
3006
 
3002
3007
  # ret: void
3003
- def self.EndTooltip()
3008
+ def self.EndTooltip() # only call EndTooltip() if BeginTooltip() returns true!
3004
3009
  igEndTooltip()
3005
3010
  end
3006
3011
 
@@ -3863,11 +3868,6 @@ module ImGui
3863
3868
  igPlotLines_FnFloatPtr(label, values_getter, data, values_count, values_offset, overlay_text, scale_min, scale_max, graph_size)
3864
3869
  end
3865
3870
 
3866
- # ret: void
3867
- def self.PopAllowKeyboardFocus()
3868
- igPopAllowKeyboardFocus()
3869
- end
3870
-
3871
3871
  # ret: void
3872
3872
  def self.PopButtonRepeat()
3873
3873
  igPopButtonRepeat()
@@ -3905,6 +3905,11 @@ module ImGui
3905
3905
  igPopStyleVar(count)
3906
3906
  end
3907
3907
 
3908
+ # ret: void
3909
+ def self.PopTabStop()
3910
+ igPopTabStop()
3911
+ end
3912
+
3908
3913
  # ret: void
3909
3914
  def self.PopTextWrapPos()
3910
3915
  igPopTextWrapPos()
@@ -3916,12 +3921,6 @@ module ImGui
3916
3921
  igProgressBar(fraction, size_arg, overlay)
3917
3922
  end
3918
3923
 
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
3924
  # arg: repeat(bool)
3926
3925
  # ret: void
3927
3926
  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 +4000,12 @@ module ImGui
4001
4000
  igPushStyleVar_Vec2(idx, val)
4002
4001
  end
4003
4002
 
4003
+ # arg: tab_stop(bool)
4004
+ # ret: void
4005
+ 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
4006
+ igPushTabStop(tab_stop)
4007
+ end
4008
+
4004
4009
  # arg: wrap_local_pos_x(float)
4005
4010
  # ret: void
4006
4011
  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
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.4
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-03-21 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