@opentui/core 0.3.2 → 0.3.3

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.
@@ -11459,6 +11459,7 @@ class OptimizedBuffer {
11459
11459
  }
11460
11460
  }
11461
11461
  fillRect(x, y, width, height, bg2) {
11462
+ this.guard();
11462
11463
  this.lib.bufferFillRect(this.bufferPtr, x, y, width, height, bg2);
11463
11464
  }
11464
11465
  colorMatrix(matrix, cellMask, strength = 1, target = 3 /* Both */) {
@@ -11484,6 +11485,7 @@ class OptimizedBuffer {
11484
11485
  if (this._destroyed)
11485
11486
  return;
11486
11487
  this._destroyed = true;
11488
+ this._rawBuffers = null;
11487
11489
  this.lib.destroyOptimizedBuffer(this.bufferPtr);
11488
11490
  }
11489
11491
  drawTextBuffer(textBufferView, x, y) {
@@ -11524,7 +11526,7 @@ class OptimizedBuffer {
11524
11526
  const style = parseBorderStyle(options.borderStyle, "single");
11525
11527
  const borderChars = options.customBorderChars ?? BorderCharArrays[style];
11526
11528
  const packedOptions = packDrawOptions(options.border, options.shouldFill ?? false, options.titleAlignment || "left", options.bottomTitleAlignment || "left");
11527
- this.lib.bufferDrawBox(this.bufferPtr, options.x, options.y, options.width, options.height, borderChars, packedOptions, options.borderColor, options.backgroundColor, options.title ?? null, options.bottomTitle ?? null);
11529
+ this.lib.bufferDrawBox(this.bufferPtr, options.x, options.y, options.width, options.height, borderChars, packedOptions, options.borderColor, options.backgroundColor, options.titleColor ?? options.borderColor, options.title ?? null, options.bottomTitle ?? null);
11528
11530
  }
11529
11531
  pushScissorRect(x, y, width, height) {
11530
11532
  this.guard();
@@ -12535,7 +12537,7 @@ function validateLinuxLibcOverride() {
12535
12537
  const libc = process.env.OPENTUI_LIBC;
12536
12538
  if (libc === undefined || libc === "" || libc === "glibc" || libc === "musl")
12537
12539
  return;
12538
- throw new Error(`OPENTUI_LIBC must be "glibc" or "musl", got "${libc}"`);
12540
+ throw new Error(`On Linux, OPENTUI_LIBC must be unset, empty, "glibc", or "musl", got "${libc}"`);
12539
12541
  }
12540
12542
  async function resolveNativePackage() {
12541
12543
  if (process.platform === "darwin") {
@@ -12637,190 +12639,190 @@ function getOpenTUILib(libPath) {
12637
12639
  },
12638
12640
  createEventSink: {
12639
12641
  args: ["ptr"],
12640
- returns: "ptr"
12642
+ returns: "u32"
12641
12643
  },
12642
12644
  destroyEventSink: {
12643
- args: ["ptr"],
12645
+ args: ["u32"],
12644
12646
  returns: "void"
12645
12647
  },
12646
12648
  createRenderer: {
12647
12649
  args: ["u32", "u32", "u8", "u8", "ptr"],
12648
- returns: "ptr"
12650
+ returns: "u32"
12649
12651
  },
12650
12652
  setTerminalEnvVar: {
12651
- args: ["ptr", "ptr", "usize", "ptr", "usize"],
12653
+ args: ["u32", "ptr", "usize", "ptr", "usize"],
12652
12654
  returns: "bool"
12653
12655
  },
12654
12656
  destroyRenderer: {
12655
- args: ["ptr"],
12657
+ args: ["u32"],
12656
12658
  returns: "void"
12657
12659
  },
12658
12660
  setUseThread: {
12659
- args: ["ptr", "bool"],
12661
+ args: ["u32", "bool"],
12660
12662
  returns: "void"
12661
12663
  },
12662
12664
  setClearOnShutdown: {
12663
- args: ["ptr", "bool"],
12665
+ args: ["u32", "bool"],
12664
12666
  returns: "void"
12665
12667
  },
12666
12668
  setBackgroundColor: {
12667
- args: ["ptr", "ptr"],
12669
+ args: ["u32", "ptr"],
12668
12670
  returns: "void"
12669
12671
  },
12670
12672
  setRenderOffset: {
12671
- args: ["ptr", "u32"],
12673
+ args: ["u32", "u32"],
12672
12674
  returns: "void"
12673
12675
  },
12674
12676
  resetSplitScrollback: {
12675
- args: ["ptr", "u32", "u32"],
12677
+ args: ["u32", "u32", "u32"],
12676
12678
  returns: "u32"
12677
12679
  },
12678
12680
  syncSplitScrollback: {
12679
- args: ["ptr", "u32"],
12681
+ args: ["u32", "u32"],
12680
12682
  returns: "u32"
12681
12683
  },
12682
12684
  getSplitOutputOffset: {
12683
- args: ["ptr", "u32"],
12685
+ args: ["u32", "u32"],
12684
12686
  returns: "u32"
12685
12687
  },
12686
12688
  setPendingSplitFooterTransition: {
12687
- args: ["ptr", "u8", "u32", "u32", "u32", "u32", "u32"],
12689
+ args: ["u32", "u8", "u32", "u32", "u32", "u32", "u32"],
12688
12690
  returns: "void"
12689
12691
  },
12690
12692
  clearPendingSplitFooterTransition: {
12691
- args: ["ptr"],
12693
+ args: ["u32"],
12692
12694
  returns: "void"
12693
12695
  },
12694
12696
  updateStats: {
12695
- args: ["ptr", "f64", "u32", "f64"],
12697
+ args: ["u32", "f64", "u32", "f64"],
12696
12698
  returns: "void"
12697
12699
  },
12698
12700
  updateMemoryStats: {
12699
- args: ["ptr", "u32", "u32", "u32"],
12701
+ args: ["u32", "u32", "u32", "u32"],
12700
12702
  returns: "void"
12701
12703
  },
12702
12704
  getRenderStats: {
12703
- args: ["ptr", "ptr"],
12705
+ args: ["u32", "ptr"],
12704
12706
  returns: "void"
12705
12707
  },
12706
12708
  render: {
12707
- args: ["ptr", "bool"],
12709
+ args: ["u32", "bool"],
12708
12710
  returns: "u8"
12709
12711
  },
12710
12712
  repaintSplitFooter: {
12711
- args: ["ptr", "u32", "bool"],
12713
+ args: ["u32", "u32", "bool"],
12712
12714
  returns: "u64"
12713
12715
  },
12714
12716
  commitSplitFooterSnapshot: {
12715
- args: ["ptr", "ptr", "u32", "bool", "bool", "u32", "bool", "bool", "bool"],
12717
+ args: ["u32", "u32", "u32", "bool", "bool", "u32", "bool", "bool", "bool"],
12716
12718
  returns: "u64"
12717
12719
  },
12718
12720
  getNextBuffer: {
12719
- args: ["ptr"],
12720
- returns: "ptr"
12721
+ args: ["u32"],
12722
+ returns: "u32"
12721
12723
  },
12722
12724
  getCurrentBuffer: {
12723
- args: ["ptr"],
12724
- returns: "ptr"
12725
+ args: ["u32"],
12726
+ returns: "u32"
12725
12727
  },
12726
12728
  rendererSetPaletteState: {
12727
- args: ["ptr", "ptr", "usize", "ptr", "ptr", "u32"],
12729
+ args: ["u32", "ptr", "usize", "ptr", "ptr", "u32"],
12728
12730
  returns: "void"
12729
12731
  },
12730
12732
  queryPixelResolution: {
12731
- args: ["ptr"],
12733
+ args: ["u32"],
12732
12734
  returns: "void"
12733
12735
  },
12734
12736
  queryThemeColors: {
12735
- args: ["ptr"],
12737
+ args: ["u32"],
12736
12738
  returns: "void"
12737
12739
  },
12738
12740
  createOptimizedBuffer: {
12739
12741
  args: ["u32", "u32", "bool", "u8", "ptr", "usize"],
12740
- returns: "ptr"
12742
+ returns: "u32"
12741
12743
  },
12742
12744
  destroyOptimizedBuffer: {
12743
- args: ["ptr"],
12745
+ args: ["u32"],
12744
12746
  returns: "void"
12745
12747
  },
12746
12748
  drawFrameBuffer: {
12747
- args: ["ptr", "i32", "i32", "ptr", "u32", "u32", "u32", "u32"],
12749
+ args: ["u32", "i32", "i32", "u32", "u32", "u32", "u32", "u32"],
12748
12750
  returns: "void"
12749
12751
  },
12750
12752
  getBufferWidth: {
12751
- args: ["ptr"],
12753
+ args: ["u32"],
12752
12754
  returns: "u32"
12753
12755
  },
12754
12756
  getBufferHeight: {
12755
- args: ["ptr"],
12757
+ args: ["u32"],
12756
12758
  returns: "u32"
12757
12759
  },
12758
12760
  bufferClear: {
12759
- args: ["ptr", "ptr"],
12761
+ args: ["u32", "ptr"],
12760
12762
  returns: "void"
12761
12763
  },
12762
12764
  bufferGetCharPtr: {
12763
- args: ["ptr"],
12765
+ args: ["u32"],
12764
12766
  returns: "ptr"
12765
12767
  },
12766
12768
  bufferGetFgPtr: {
12767
- args: ["ptr"],
12769
+ args: ["u32"],
12768
12770
  returns: "ptr"
12769
12771
  },
12770
12772
  bufferGetBgPtr: {
12771
- args: ["ptr"],
12773
+ args: ["u32"],
12772
12774
  returns: "ptr"
12773
12775
  },
12774
12776
  bufferGetAttributesPtr: {
12775
- args: ["ptr"],
12777
+ args: ["u32"],
12776
12778
  returns: "ptr"
12777
12779
  },
12778
12780
  bufferGetRespectAlpha: {
12779
- args: ["ptr"],
12781
+ args: ["u32"],
12780
12782
  returns: "bool"
12781
12783
  },
12782
12784
  bufferSetRespectAlpha: {
12783
- args: ["ptr", "bool"],
12785
+ args: ["u32", "bool"],
12784
12786
  returns: "void"
12785
12787
  },
12786
12788
  bufferGetId: {
12787
- args: ["ptr", "ptr", "usize"],
12789
+ args: ["u32", "ptr", "usize"],
12788
12790
  returns: "usize"
12789
12791
  },
12790
12792
  bufferGetRealCharSize: {
12791
- args: ["ptr"],
12793
+ args: ["u32"],
12792
12794
  returns: "u32"
12793
12795
  },
12794
12796
  bufferWriteResolvedChars: {
12795
- args: ["ptr", "ptr", "usize", "bool"],
12797
+ args: ["u32", "ptr", "usize", "bool"],
12796
12798
  returns: "u32"
12797
12799
  },
12798
12800
  bufferDrawText: {
12799
- args: ["ptr", "ptr", "u32", "u32", "u32", "ptr", "ptr", "u32"],
12801
+ args: ["u32", "ptr", "u32", "u32", "u32", "ptr", "ptr", "u32"],
12800
12802
  returns: "void"
12801
12803
  },
12802
12804
  bufferSetCellWithAlphaBlending: {
12803
- args: ["ptr", "u32", "u32", "u32", "ptr", "ptr", "u32"],
12805
+ args: ["u32", "u32", "u32", "u32", "ptr", "ptr", "u32"],
12804
12806
  returns: "void"
12805
12807
  },
12806
12808
  bufferSetCell: {
12807
- args: ["ptr", "u32", "u32", "u32", "ptr", "ptr", "u32"],
12809
+ args: ["u32", "u32", "u32", "u32", "ptr", "ptr", "u32"],
12808
12810
  returns: "void"
12809
12811
  },
12810
12812
  bufferFillRect: {
12811
- args: ["ptr", "u32", "u32", "u32", "u32", "ptr"],
12813
+ args: ["u32", "u32", "u32", "u32", "u32", "ptr"],
12812
12814
  returns: "void"
12813
12815
  },
12814
12816
  bufferColorMatrix: {
12815
- args: ["ptr", "ptr", "ptr", "usize", "f32", "u8"],
12817
+ args: ["u32", "ptr", "ptr", "usize", "f32", "u8"],
12816
12818
  returns: "void"
12817
12819
  },
12818
12820
  bufferColorMatrixUniform: {
12819
- args: ["ptr", "ptr", "f32", "u8"],
12821
+ args: ["u32", "ptr", "f32", "u8"],
12820
12822
  returns: "void"
12821
12823
  },
12822
12824
  bufferResize: {
12823
- args: ["ptr", "u32", "u32"],
12825
+ args: ["u32", "u32", "u32"],
12824
12826
  returns: "void"
12825
12827
  },
12826
12828
  linkAlloc: {
@@ -12840,303 +12842,303 @@ function getOpenTUILib(libPath) {
12840
12842
  returns: "u32"
12841
12843
  },
12842
12844
  resizeRenderer: {
12843
- args: ["ptr", "u32", "u32"],
12845
+ args: ["u32", "u32", "u32"],
12844
12846
  returns: "void"
12845
12847
  },
12846
12848
  setCursorPosition: {
12847
- args: ["ptr", "i32", "i32", "bool"],
12849
+ args: ["u32", "i32", "i32", "bool"],
12848
12850
  returns: "void"
12849
12851
  },
12850
12852
  setCursorColor: {
12851
- args: ["ptr", "ptr"],
12853
+ args: ["u32", "ptr"],
12852
12854
  returns: "void"
12853
12855
  },
12854
12856
  getCursorState: {
12855
- args: ["ptr", "ptr"],
12857
+ args: ["u32", "ptr"],
12856
12858
  returns: "void"
12857
12859
  },
12858
12860
  setCursorStyleOptions: {
12859
- args: ["ptr", "ptr"],
12861
+ args: ["u32", "ptr"],
12860
12862
  returns: "void"
12861
12863
  },
12862
12864
  setDebugOverlay: {
12863
- args: ["ptr", "bool", "u8"],
12865
+ args: ["u32", "bool", "u8"],
12864
12866
  returns: "void"
12865
12867
  },
12866
12868
  clearTerminal: {
12867
- args: ["ptr"],
12869
+ args: ["u32"],
12868
12870
  returns: "void"
12869
12871
  },
12870
12872
  setTerminalTitle: {
12871
- args: ["ptr", "ptr", "usize"],
12873
+ args: ["u32", "ptr", "usize"],
12872
12874
  returns: "void"
12873
12875
  },
12874
12876
  copyToClipboardOSC52: {
12875
- args: ["ptr", "u8", "ptr", "usize"],
12877
+ args: ["u32", "u8", "ptr", "usize"],
12876
12878
  returns: "bool"
12877
12879
  },
12878
12880
  clearClipboardOSC52: {
12879
- args: ["ptr", "u8"],
12881
+ args: ["u32", "u8"],
12880
12882
  returns: "bool"
12881
12883
  },
12882
12884
  triggerNotification: {
12883
- args: ["ptr", "ptr", "usize", "ptr", "usize"],
12885
+ args: ["u32", "ptr", "usize", "ptr", "usize"],
12884
12886
  returns: "bool"
12885
12887
  },
12886
12888
  bufferDrawSuperSampleBuffer: {
12887
- args: ["ptr", "u32", "u32", "ptr", "usize", "u8", "u32"],
12889
+ args: ["u32", "u32", "u32", "ptr", "usize", "u8", "u32"],
12888
12890
  returns: "void"
12889
12891
  },
12890
12892
  bufferDrawPackedBuffer: {
12891
- args: ["ptr", "ptr", "usize", "u32", "u32", "u32", "u32"],
12893
+ args: ["u32", "ptr", "usize", "u32", "u32", "u32", "u32"],
12892
12894
  returns: "void"
12893
12895
  },
12894
12896
  bufferDrawGrayscaleBuffer: {
12895
- args: ["ptr", "i32", "i32", "ptr", "u32", "u32", "ptr", "ptr"],
12897
+ args: ["u32", "i32", "i32", "ptr", "u32", "u32", "ptr", "ptr"],
12896
12898
  returns: "void"
12897
12899
  },
12898
12900
  bufferDrawGrayscaleBufferSupersampled: {
12899
- args: ["ptr", "i32", "i32", "ptr", "u32", "u32", "ptr", "ptr"],
12901
+ args: ["u32", "i32", "i32", "ptr", "u32", "u32", "ptr", "ptr"],
12900
12902
  returns: "void"
12901
12903
  },
12902
12904
  bufferDrawGrid: {
12903
- args: ["ptr", "ptr", "ptr", "ptr", "ptr", "u32", "ptr", "u32", "ptr"],
12905
+ args: ["u32", "ptr", "ptr", "ptr", "ptr", "u32", "ptr", "u32", "ptr"],
12904
12906
  returns: "void"
12905
12907
  },
12906
12908
  bufferDrawBox: {
12907
- args: ["ptr", "i32", "i32", "u32", "u32", "ptr", "u32", "ptr", "ptr", "ptr", "u32", "ptr", "u32"],
12909
+ args: ["u32", "i32", "i32", "u32", "u32", "ptr", "u32", "ptr", "ptr", "ptr", "ptr", "u32", "ptr", "u32"],
12908
12910
  returns: "void"
12909
12911
  },
12910
12912
  bufferPushScissorRect: {
12911
- args: ["ptr", "i32", "i32", "u32", "u32"],
12913
+ args: ["u32", "i32", "i32", "u32", "u32"],
12912
12914
  returns: "void"
12913
12915
  },
12914
12916
  bufferPopScissorRect: {
12915
- args: ["ptr"],
12917
+ args: ["u32"],
12916
12918
  returns: "void"
12917
12919
  },
12918
12920
  bufferClearScissorRects: {
12919
- args: ["ptr"],
12921
+ args: ["u32"],
12920
12922
  returns: "void"
12921
12923
  },
12922
12924
  bufferPushOpacity: {
12923
- args: ["ptr", "f32"],
12925
+ args: ["u32", "f32"],
12924
12926
  returns: "void"
12925
12927
  },
12926
12928
  bufferPopOpacity: {
12927
- args: ["ptr"],
12929
+ args: ["u32"],
12928
12930
  returns: "void"
12929
12931
  },
12930
12932
  bufferGetCurrentOpacity: {
12931
- args: ["ptr"],
12933
+ args: ["u32"],
12932
12934
  returns: "f32"
12933
12935
  },
12934
12936
  bufferClearOpacity: {
12935
- args: ["ptr"],
12937
+ args: ["u32"],
12936
12938
  returns: "void"
12937
12939
  },
12938
12940
  addToHitGrid: {
12939
- args: ["ptr", "i32", "i32", "u32", "u32", "u32"],
12941
+ args: ["u32", "i32", "i32", "u32", "u32", "u32"],
12940
12942
  returns: "void"
12941
12943
  },
12942
12944
  clearCurrentHitGrid: {
12943
- args: ["ptr"],
12945
+ args: ["u32"],
12944
12946
  returns: "void"
12945
12947
  },
12946
12948
  hitGridPushScissorRect: {
12947
- args: ["ptr", "i32", "i32", "u32", "u32"],
12949
+ args: ["u32", "i32", "i32", "u32", "u32"],
12948
12950
  returns: "void"
12949
12951
  },
12950
12952
  hitGridPopScissorRect: {
12951
- args: ["ptr"],
12953
+ args: ["u32"],
12952
12954
  returns: "void"
12953
12955
  },
12954
12956
  hitGridClearScissorRects: {
12955
- args: ["ptr"],
12957
+ args: ["u32"],
12956
12958
  returns: "void"
12957
12959
  },
12958
12960
  addToCurrentHitGridClipped: {
12959
- args: ["ptr", "i32", "i32", "u32", "u32", "u32"],
12961
+ args: ["u32", "i32", "i32", "u32", "u32", "u32"],
12960
12962
  returns: "void"
12961
12963
  },
12962
12964
  checkHit: {
12963
- args: ["ptr", "u32", "u32"],
12965
+ args: ["u32", "u32", "u32"],
12964
12966
  returns: "u32"
12965
12967
  },
12966
12968
  getHitGridDirty: {
12967
- args: ["ptr"],
12969
+ args: ["u32"],
12968
12970
  returns: "bool"
12969
12971
  },
12970
12972
  dumpHitGrid: {
12971
- args: ["ptr"],
12973
+ args: ["u32"],
12972
12974
  returns: "void"
12973
12975
  },
12974
12976
  dumpBuffers: {
12975
- args: ["ptr", "i64"],
12977
+ args: ["u32", "i64"],
12976
12978
  returns: "void"
12977
12979
  },
12978
12980
  dumpOutputBuffer: {
12979
- args: ["ptr", "i64"],
12981
+ args: ["u32", "i64"],
12980
12982
  returns: "void"
12981
12983
  },
12982
12984
  restoreTerminalModes: {
12983
- args: ["ptr"],
12985
+ args: ["u32"],
12984
12986
  returns: "void"
12985
12987
  },
12986
12988
  enableMouse: {
12987
- args: ["ptr", "bool"],
12989
+ args: ["u32", "bool"],
12988
12990
  returns: "void"
12989
12991
  },
12990
12992
  disableMouse: {
12991
- args: ["ptr"],
12993
+ args: ["u32"],
12992
12994
  returns: "void"
12993
12995
  },
12994
12996
  enableKittyKeyboard: {
12995
- args: ["ptr", "u8"],
12997
+ args: ["u32", "u8"],
12996
12998
  returns: "void"
12997
12999
  },
12998
13000
  disableKittyKeyboard: {
12999
- args: ["ptr"],
13001
+ args: ["u32"],
13000
13002
  returns: "void"
13001
13003
  },
13002
13004
  setKittyKeyboardFlags: {
13003
- args: ["ptr", "u8"],
13005
+ args: ["u32", "u8"],
13004
13006
  returns: "void"
13005
13007
  },
13006
13008
  getKittyKeyboardFlags: {
13007
- args: ["ptr"],
13009
+ args: ["u32"],
13008
13010
  returns: "u8"
13009
13011
  },
13010
13012
  setupTerminal: {
13011
- args: ["ptr", "bool"],
13013
+ args: ["u32", "bool"],
13012
13014
  returns: "void"
13013
13015
  },
13014
13016
  suspendRenderer: {
13015
- args: ["ptr"],
13017
+ args: ["u32"],
13016
13018
  returns: "void"
13017
13019
  },
13018
13020
  resumeRenderer: {
13019
- args: ["ptr"],
13021
+ args: ["u32"],
13020
13022
  returns: "void"
13021
13023
  },
13022
13024
  writeOut: {
13023
- args: ["ptr", "ptr", "u64"],
13025
+ args: ["u32", "ptr", "u64"],
13024
13026
  returns: "void"
13025
13027
  },
13026
13028
  createTextBuffer: {
13027
13029
  args: ["u8"],
13028
- returns: "ptr"
13030
+ returns: "u32"
13029
13031
  },
13030
13032
  destroyTextBuffer: {
13031
- args: ["ptr"],
13033
+ args: ["u32"],
13032
13034
  returns: "void"
13033
13035
  },
13034
13036
  textBufferGetLength: {
13035
- args: ["ptr"],
13037
+ args: ["u32"],
13036
13038
  returns: "u32"
13037
13039
  },
13038
13040
  textBufferGetByteSize: {
13039
- args: ["ptr"],
13041
+ args: ["u32"],
13040
13042
  returns: "u32"
13041
13043
  },
13042
13044
  textBufferReset: {
13043
- args: ["ptr"],
13045
+ args: ["u32"],
13044
13046
  returns: "void"
13045
13047
  },
13046
13048
  textBufferClear: {
13047
- args: ["ptr"],
13049
+ args: ["u32"],
13048
13050
  returns: "void"
13049
13051
  },
13050
13052
  textBufferSetDefaultFg: {
13051
- args: ["ptr", "ptr"],
13053
+ args: ["u32", "ptr"],
13052
13054
  returns: "void"
13053
13055
  },
13054
13056
  textBufferSetDefaultBg: {
13055
- args: ["ptr", "ptr"],
13057
+ args: ["u32", "ptr"],
13056
13058
  returns: "void"
13057
13059
  },
13058
13060
  textBufferSetDefaultAttributes: {
13059
- args: ["ptr", "ptr"],
13061
+ args: ["u32", "ptr"],
13060
13062
  returns: "void"
13061
13063
  },
13062
13064
  textBufferResetDefaults: {
13063
- args: ["ptr"],
13065
+ args: ["u32"],
13064
13066
  returns: "void"
13065
13067
  },
13066
13068
  textBufferGetTabWidth: {
13067
- args: ["ptr"],
13069
+ args: ["u32"],
13068
13070
  returns: "u8"
13069
13071
  },
13070
13072
  textBufferSetTabWidth: {
13071
- args: ["ptr", "u8"],
13073
+ args: ["u32", "u8"],
13072
13074
  returns: "void"
13073
13075
  },
13074
13076
  textBufferRegisterMemBuffer: {
13075
- args: ["ptr", "ptr", "usize", "bool"],
13077
+ args: ["u32", "ptr", "usize", "bool"],
13076
13078
  returns: "u16"
13077
13079
  },
13078
13080
  textBufferReplaceMemBuffer: {
13079
- args: ["ptr", "u8", "ptr", "usize", "bool"],
13081
+ args: ["u32", "u8", "ptr", "usize", "bool"],
13080
13082
  returns: "bool"
13081
13083
  },
13082
13084
  textBufferClearMemRegistry: {
13083
- args: ["ptr"],
13085
+ args: ["u32"],
13084
13086
  returns: "void"
13085
13087
  },
13086
13088
  textBufferSetTextFromMem: {
13087
- args: ["ptr", "u8"],
13089
+ args: ["u32", "u8"],
13088
13090
  returns: "void"
13089
13091
  },
13090
13092
  textBufferAppend: {
13091
- args: ["ptr", "ptr", "usize"],
13093
+ args: ["u32", "ptr", "usize"],
13092
13094
  returns: "void"
13093
13095
  },
13094
13096
  textBufferAppendFromMemId: {
13095
- args: ["ptr", "u8"],
13097
+ args: ["u32", "u8"],
13096
13098
  returns: "void"
13097
13099
  },
13098
13100
  textBufferLoadFile: {
13099
- args: ["ptr", "ptr", "usize"],
13101
+ args: ["u32", "ptr", "usize"],
13100
13102
  returns: "bool"
13101
13103
  },
13102
13104
  textBufferSetStyledText: {
13103
- args: ["ptr", "ptr", "usize"],
13105
+ args: ["u32", "ptr", "usize"],
13104
13106
  returns: "void"
13105
13107
  },
13106
13108
  textBufferGetLineCount: {
13107
- args: ["ptr"],
13109
+ args: ["u32"],
13108
13110
  returns: "u32"
13109
13111
  },
13110
13112
  textBufferGetPlainText: {
13111
- args: ["ptr", "ptr", "usize"],
13113
+ args: ["u32", "ptr", "usize"],
13112
13114
  returns: "usize"
13113
13115
  },
13114
13116
  textBufferAddHighlightByCharRange: {
13115
- args: ["ptr", "ptr"],
13117
+ args: ["u32", "ptr"],
13116
13118
  returns: "void"
13117
13119
  },
13118
13120
  textBufferAddHighlight: {
13119
- args: ["ptr", "u32", "ptr"],
13121
+ args: ["u32", "u32", "ptr"],
13120
13122
  returns: "void"
13121
13123
  },
13122
13124
  textBufferRemoveHighlightsByRef: {
13123
- args: ["ptr", "u16"],
13125
+ args: ["u32", "u16"],
13124
13126
  returns: "void"
13125
13127
  },
13126
13128
  textBufferClearLineHighlights: {
13127
- args: ["ptr", "u32"],
13129
+ args: ["u32", "u32"],
13128
13130
  returns: "void"
13129
13131
  },
13130
13132
  textBufferClearAllHighlights: {
13131
- args: ["ptr"],
13133
+ args: ["u32"],
13132
13134
  returns: "void"
13133
13135
  },
13134
13136
  textBufferSetSyntaxStyle: {
13135
- args: ["ptr", "ptr"],
13137
+ args: ["u32", "u32"],
13136
13138
  returns: "void"
13137
13139
  },
13138
13140
  textBufferGetLineHighlightsPtr: {
13139
- args: ["ptr", "u32", "ptr"],
13141
+ args: ["u32", "u32", "ptr"],
13140
13142
  returns: "ptr"
13141
13143
  },
13142
13144
  textBufferFreeLineHighlights: {
@@ -13144,415 +13146,415 @@ function getOpenTUILib(libPath) {
13144
13146
  returns: "void"
13145
13147
  },
13146
13148
  textBufferGetHighlightCount: {
13147
- args: ["ptr"],
13149
+ args: ["u32"],
13148
13150
  returns: "u32"
13149
13151
  },
13150
13152
  textBufferGetTextRange: {
13151
- args: ["ptr", "u32", "u32", "ptr", "usize"],
13153
+ args: ["u32", "u32", "u32", "ptr", "usize"],
13152
13154
  returns: "usize"
13153
13155
  },
13154
13156
  textBufferGetTextRangeByCoords: {
13155
- args: ["ptr", "u32", "u32", "u32", "u32", "ptr", "usize"],
13157
+ args: ["u32", "u32", "u32", "u32", "u32", "ptr", "usize"],
13156
13158
  returns: "usize"
13157
13159
  },
13158
13160
  createTextBufferView: {
13159
- args: ["ptr"],
13160
- returns: "ptr"
13161
+ args: ["u32"],
13162
+ returns: "u32"
13161
13163
  },
13162
13164
  destroyTextBufferView: {
13163
- args: ["ptr"],
13165
+ args: ["u32"],
13164
13166
  returns: "void"
13165
13167
  },
13166
13168
  textBufferViewSetSelection: {
13167
- args: ["ptr", "u32", "u32", "ptr", "ptr"],
13169
+ args: ["u32", "u32", "u32", "ptr", "ptr"],
13168
13170
  returns: "void"
13169
13171
  },
13170
13172
  textBufferViewResetSelection: {
13171
- args: ["ptr"],
13173
+ args: ["u32"],
13172
13174
  returns: "void"
13173
13175
  },
13174
13176
  textBufferViewGetSelectionInfo: {
13175
- args: ["ptr"],
13177
+ args: ["u32"],
13176
13178
  returns: "u64"
13177
13179
  },
13178
13180
  textBufferViewSetLocalSelection: {
13179
- args: ["ptr", "i32", "i32", "i32", "i32", "ptr", "ptr"],
13181
+ args: ["u32", "i32", "i32", "i32", "i32", "ptr", "ptr"],
13180
13182
  returns: "bool"
13181
13183
  },
13182
13184
  textBufferViewUpdateSelection: {
13183
- args: ["ptr", "u32", "ptr", "ptr"],
13185
+ args: ["u32", "u32", "ptr", "ptr"],
13184
13186
  returns: "void"
13185
13187
  },
13186
13188
  textBufferViewUpdateLocalSelection: {
13187
- args: ["ptr", "i32", "i32", "i32", "i32", "ptr", "ptr"],
13189
+ args: ["u32", "i32", "i32", "i32", "i32", "ptr", "ptr"],
13188
13190
  returns: "bool"
13189
13191
  },
13190
13192
  textBufferViewResetLocalSelection: {
13191
- args: ["ptr"],
13193
+ args: ["u32"],
13192
13194
  returns: "void"
13193
13195
  },
13194
13196
  textBufferViewSetWrapWidth: {
13195
- args: ["ptr", "u32"],
13197
+ args: ["u32", "u32"],
13196
13198
  returns: "void"
13197
13199
  },
13198
13200
  textBufferViewSetWrapMode: {
13199
- args: ["ptr", "u8"],
13201
+ args: ["u32", "u8"],
13200
13202
  returns: "void"
13201
13203
  },
13202
13204
  textBufferViewSetFirstLineOffset: {
13203
- args: ["ptr", "u32"],
13205
+ args: ["u32", "u32"],
13204
13206
  returns: "void"
13205
13207
  },
13206
13208
  textBufferViewSetViewportSize: {
13207
- args: ["ptr", "u32", "u32"],
13209
+ args: ["u32", "u32", "u32"],
13208
13210
  returns: "void"
13209
13211
  },
13210
13212
  textBufferViewSetViewport: {
13211
- args: ["ptr", "u32", "u32", "u32", "u32"],
13213
+ args: ["u32", "u32", "u32", "u32", "u32"],
13212
13214
  returns: "void"
13213
13215
  },
13214
13216
  textBufferViewGetVirtualLineCount: {
13215
- args: ["ptr"],
13217
+ args: ["u32"],
13216
13218
  returns: "u32"
13217
13219
  },
13218
13220
  textBufferViewGetLineInfoDirect: {
13219
- args: ["ptr", "ptr"],
13221
+ args: ["u32", "ptr"],
13220
13222
  returns: "void"
13221
13223
  },
13222
13224
  textBufferViewGetLogicalLineInfoDirect: {
13223
- args: ["ptr", "ptr"],
13225
+ args: ["u32", "ptr"],
13224
13226
  returns: "void"
13225
13227
  },
13226
13228
  textBufferViewGetSelectedText: {
13227
- args: ["ptr", "ptr", "usize"],
13229
+ args: ["u32", "ptr", "usize"],
13228
13230
  returns: "usize"
13229
13231
  },
13230
13232
  textBufferViewGetPlainText: {
13231
- args: ["ptr", "ptr", "usize"],
13233
+ args: ["u32", "ptr", "usize"],
13232
13234
  returns: "usize"
13233
13235
  },
13234
13236
  textBufferViewSetTabIndicator: {
13235
- args: ["ptr", "u32"],
13237
+ args: ["u32", "u32"],
13236
13238
  returns: "void"
13237
13239
  },
13238
13240
  textBufferViewSetTabIndicatorColor: {
13239
- args: ["ptr", "ptr"],
13241
+ args: ["u32", "ptr"],
13240
13242
  returns: "void"
13241
13243
  },
13242
13244
  textBufferViewSetTruncate: {
13243
- args: ["ptr", "bool"],
13245
+ args: ["u32", "bool"],
13244
13246
  returns: "void"
13245
13247
  },
13246
13248
  textBufferViewMeasureForDimensions: {
13247
- args: ["ptr", "u32", "u32", "ptr"],
13249
+ args: ["u32", "u32", "u32", "ptr"],
13248
13250
  returns: "bool"
13249
13251
  },
13250
13252
  bufferDrawTextBufferView: {
13251
- args: ["ptr", "ptr", "i32", "i32"],
13253
+ args: ["u32", "u32", "i32", "i32"],
13252
13254
  returns: "void"
13253
13255
  },
13254
13256
  bufferDrawEditorView: {
13255
- args: ["ptr", "ptr", "i32", "i32"],
13257
+ args: ["u32", "u32", "i32", "i32"],
13256
13258
  returns: "void"
13257
13259
  },
13258
13260
  createEditorView: {
13259
- args: ["ptr", "u32", "u32"],
13260
- returns: "ptr"
13261
+ args: ["u32", "u32", "u32"],
13262
+ returns: "u32"
13261
13263
  },
13262
13264
  destroyEditorView: {
13263
- args: ["ptr"],
13265
+ args: ["u32"],
13264
13266
  returns: "void"
13265
13267
  },
13266
13268
  editorViewSetViewportSize: {
13267
- args: ["ptr", "u32", "u32"],
13269
+ args: ["u32", "u32", "u32"],
13268
13270
  returns: "void"
13269
13271
  },
13270
13272
  editorViewSetViewport: {
13271
- args: ["ptr", "u32", "u32", "u32", "u32", "bool"],
13273
+ args: ["u32", "u32", "u32", "u32", "u32", "bool"],
13272
13274
  returns: "void"
13273
13275
  },
13274
13276
  editorViewGetViewport: {
13275
- args: ["ptr", "ptr", "ptr", "ptr", "ptr"],
13277
+ args: ["u32", "ptr", "ptr", "ptr", "ptr"],
13276
13278
  returns: "void"
13277
13279
  },
13278
13280
  editorViewSetScrollMargin: {
13279
- args: ["ptr", "f32"],
13281
+ args: ["u32", "f32"],
13280
13282
  returns: "void"
13281
13283
  },
13282
13284
  editorViewSetWrapMode: {
13283
- args: ["ptr", "u8"],
13285
+ args: ["u32", "u8"],
13284
13286
  returns: "void"
13285
13287
  },
13286
13288
  editorViewGetVirtualLineCount: {
13287
- args: ["ptr"],
13289
+ args: ["u32"],
13288
13290
  returns: "u32"
13289
13291
  },
13290
13292
  editorViewGetTotalVirtualLineCount: {
13291
- args: ["ptr"],
13293
+ args: ["u32"],
13292
13294
  returns: "u32"
13293
13295
  },
13294
13296
  editorViewGetTextBufferView: {
13295
- args: ["ptr"],
13296
- returns: "ptr"
13297
+ args: ["u32"],
13298
+ returns: "u32"
13297
13299
  },
13298
13300
  editorViewGetLineInfoDirect: {
13299
- args: ["ptr", "ptr"],
13301
+ args: ["u32", "ptr"],
13300
13302
  returns: "void"
13301
13303
  },
13302
13304
  editorViewGetLogicalLineInfoDirect: {
13303
- args: ["ptr", "ptr"],
13305
+ args: ["u32", "ptr"],
13304
13306
  returns: "void"
13305
13307
  },
13306
13308
  createEditBuffer: {
13307
- args: ["u8", "ptr"],
13308
- returns: "ptr"
13309
+ args: ["u8", "u32"],
13310
+ returns: "u32"
13309
13311
  },
13310
13312
  destroyEditBuffer: {
13311
- args: ["ptr"],
13313
+ args: ["u32"],
13312
13314
  returns: "void"
13313
13315
  },
13314
13316
  editBufferSetText: {
13315
- args: ["ptr", "ptr", "usize"],
13317
+ args: ["u32", "ptr", "usize"],
13316
13318
  returns: "void"
13317
13319
  },
13318
13320
  editBufferSetTextFromMem: {
13319
- args: ["ptr", "u8"],
13321
+ args: ["u32", "u8"],
13320
13322
  returns: "void"
13321
13323
  },
13322
13324
  editBufferReplaceText: {
13323
- args: ["ptr", "ptr", "usize"],
13325
+ args: ["u32", "ptr", "usize"],
13324
13326
  returns: "void"
13325
13327
  },
13326
13328
  editBufferReplaceTextFromMem: {
13327
- args: ["ptr", "u8"],
13329
+ args: ["u32", "u8"],
13328
13330
  returns: "void"
13329
13331
  },
13330
13332
  editBufferGetText: {
13331
- args: ["ptr", "ptr", "usize"],
13333
+ args: ["u32", "ptr", "usize"],
13332
13334
  returns: "usize"
13333
13335
  },
13334
13336
  editBufferInsertChar: {
13335
- args: ["ptr", "ptr", "usize"],
13337
+ args: ["u32", "ptr", "usize"],
13336
13338
  returns: "void"
13337
13339
  },
13338
13340
  editBufferInsertText: {
13339
- args: ["ptr", "ptr", "usize"],
13341
+ args: ["u32", "ptr", "usize"],
13340
13342
  returns: "void"
13341
13343
  },
13342
13344
  editBufferDeleteChar: {
13343
- args: ["ptr"],
13345
+ args: ["u32"],
13344
13346
  returns: "void"
13345
13347
  },
13346
13348
  editBufferDeleteCharBackward: {
13347
- args: ["ptr"],
13349
+ args: ["u32"],
13348
13350
  returns: "void"
13349
13351
  },
13350
13352
  editBufferDeleteRange: {
13351
- args: ["ptr", "u32", "u32", "u32", "u32"],
13353
+ args: ["u32", "u32", "u32", "u32", "u32"],
13352
13354
  returns: "void"
13353
13355
  },
13354
13356
  editBufferNewLine: {
13355
- args: ["ptr"],
13357
+ args: ["u32"],
13356
13358
  returns: "void"
13357
13359
  },
13358
13360
  editBufferDeleteLine: {
13359
- args: ["ptr"],
13361
+ args: ["u32"],
13360
13362
  returns: "void"
13361
13363
  },
13362
13364
  editBufferMoveCursorLeft: {
13363
- args: ["ptr"],
13365
+ args: ["u32"],
13364
13366
  returns: "void"
13365
13367
  },
13366
13368
  editBufferMoveCursorRight: {
13367
- args: ["ptr"],
13369
+ args: ["u32"],
13368
13370
  returns: "void"
13369
13371
  },
13370
13372
  editBufferMoveCursorUp: {
13371
- args: ["ptr"],
13373
+ args: ["u32"],
13372
13374
  returns: "void"
13373
13375
  },
13374
13376
  editBufferMoveCursorDown: {
13375
- args: ["ptr"],
13377
+ args: ["u32"],
13376
13378
  returns: "void"
13377
13379
  },
13378
13380
  editBufferGotoLine: {
13379
- args: ["ptr", "u32"],
13381
+ args: ["u32", "u32"],
13380
13382
  returns: "void"
13381
13383
  },
13382
13384
  editBufferSetCursor: {
13383
- args: ["ptr", "u32", "u32"],
13385
+ args: ["u32", "u32", "u32"],
13384
13386
  returns: "void"
13385
13387
  },
13386
13388
  editBufferSetCursorToLineCol: {
13387
- args: ["ptr", "u32", "u32"],
13389
+ args: ["u32", "u32", "u32"],
13388
13390
  returns: "void"
13389
13391
  },
13390
13392
  editBufferSetCursorByOffset: {
13391
- args: ["ptr", "u32"],
13393
+ args: ["u32", "u32"],
13392
13394
  returns: "void"
13393
13395
  },
13394
13396
  editBufferGetCursorPosition: {
13395
- args: ["ptr", "ptr"],
13397
+ args: ["u32", "ptr"],
13396
13398
  returns: "void"
13397
13399
  },
13398
13400
  editBufferGetId: {
13399
- args: ["ptr"],
13401
+ args: ["u32"],
13400
13402
  returns: "u16"
13401
13403
  },
13402
13404
  editBufferGetTextBuffer: {
13403
- args: ["ptr"],
13404
- returns: "ptr"
13405
+ args: ["u32"],
13406
+ returns: "u32"
13405
13407
  },
13406
13408
  editBufferDebugLogRope: {
13407
- args: ["ptr"],
13409
+ args: ["u32"],
13408
13410
  returns: "void"
13409
13411
  },
13410
13412
  editBufferUndo: {
13411
- args: ["ptr", "ptr", "usize"],
13413
+ args: ["u32", "ptr", "usize"],
13412
13414
  returns: "usize"
13413
13415
  },
13414
13416
  editBufferRedo: {
13415
- args: ["ptr", "ptr", "usize"],
13417
+ args: ["u32", "ptr", "usize"],
13416
13418
  returns: "usize"
13417
13419
  },
13418
13420
  editBufferCanUndo: {
13419
- args: ["ptr"],
13421
+ args: ["u32"],
13420
13422
  returns: "bool"
13421
13423
  },
13422
13424
  editBufferCanRedo: {
13423
- args: ["ptr"],
13425
+ args: ["u32"],
13424
13426
  returns: "bool"
13425
13427
  },
13426
13428
  editBufferClearHistory: {
13427
- args: ["ptr"],
13429
+ args: ["u32"],
13428
13430
  returns: "void"
13429
13431
  },
13430
13432
  editBufferClear: {
13431
- args: ["ptr"],
13433
+ args: ["u32"],
13432
13434
  returns: "void"
13433
13435
  },
13434
13436
  editBufferGetNextWordBoundary: {
13435
- args: ["ptr", "ptr"],
13437
+ args: ["u32", "ptr"],
13436
13438
  returns: "void"
13437
13439
  },
13438
13440
  editBufferGetPrevWordBoundary: {
13439
- args: ["ptr", "ptr"],
13441
+ args: ["u32", "ptr"],
13440
13442
  returns: "void"
13441
13443
  },
13442
13444
  editBufferGetEOL: {
13443
- args: ["ptr", "ptr"],
13445
+ args: ["u32", "ptr"],
13444
13446
  returns: "void"
13445
13447
  },
13446
13448
  editBufferOffsetToPosition: {
13447
- args: ["ptr", "u32", "ptr"],
13449
+ args: ["u32", "u32", "ptr"],
13448
13450
  returns: "bool"
13449
13451
  },
13450
13452
  editBufferPositionToOffset: {
13451
- args: ["ptr", "u32", "u32"],
13453
+ args: ["u32", "u32", "u32"],
13452
13454
  returns: "u32"
13453
13455
  },
13454
13456
  editBufferGetLineStartOffset: {
13455
- args: ["ptr", "u32"],
13457
+ args: ["u32", "u32"],
13456
13458
  returns: "u32"
13457
13459
  },
13458
13460
  editBufferGetTextRange: {
13459
- args: ["ptr", "u32", "u32", "ptr", "usize"],
13461
+ args: ["u32", "u32", "u32", "ptr", "usize"],
13460
13462
  returns: "usize"
13461
13463
  },
13462
13464
  editBufferGetTextRangeByCoords: {
13463
- args: ["ptr", "u32", "u32", "u32", "u32", "ptr", "usize"],
13465
+ args: ["u32", "u32", "u32", "u32", "u32", "ptr", "usize"],
13464
13466
  returns: "usize"
13465
13467
  },
13466
13468
  editorViewSetSelection: {
13467
- args: ["ptr", "u32", "u32", "ptr", "ptr"],
13469
+ args: ["u32", "u32", "u32", "ptr", "ptr"],
13468
13470
  returns: "void"
13469
13471
  },
13470
13472
  editorViewResetSelection: {
13471
- args: ["ptr"],
13473
+ args: ["u32"],
13472
13474
  returns: "void"
13473
13475
  },
13474
13476
  editorViewGetSelection: {
13475
- args: ["ptr"],
13477
+ args: ["u32"],
13476
13478
  returns: "u64"
13477
13479
  },
13478
13480
  editorViewSetLocalSelection: {
13479
- args: ["ptr", "i32", "i32", "i32", "i32", "ptr", "ptr", "bool", "bool"],
13481
+ args: ["u32", "i32", "i32", "i32", "i32", "ptr", "ptr", "bool", "bool"],
13480
13482
  returns: "bool"
13481
13483
  },
13482
13484
  editorViewUpdateSelection: {
13483
- args: ["ptr", "u32", "ptr", "ptr"],
13485
+ args: ["u32", "u32", "ptr", "ptr"],
13484
13486
  returns: "void"
13485
13487
  },
13486
13488
  editorViewUpdateLocalSelection: {
13487
- args: ["ptr", "i32", "i32", "i32", "i32", "ptr", "ptr", "bool", "bool"],
13489
+ args: ["u32", "i32", "i32", "i32", "i32", "ptr", "ptr", "bool", "bool"],
13488
13490
  returns: "bool"
13489
13491
  },
13490
13492
  editorViewResetLocalSelection: {
13491
- args: ["ptr"],
13493
+ args: ["u32"],
13492
13494
  returns: "void"
13493
13495
  },
13494
13496
  editorViewGetSelectedTextBytes: {
13495
- args: ["ptr", "ptr", "usize"],
13497
+ args: ["u32", "ptr", "usize"],
13496
13498
  returns: "usize"
13497
13499
  },
13498
13500
  editorViewGetCursor: {
13499
- args: ["ptr", "ptr", "ptr"],
13501
+ args: ["u32", "ptr", "ptr"],
13500
13502
  returns: "void"
13501
13503
  },
13502
13504
  editorViewGetText: {
13503
- args: ["ptr", "ptr", "usize"],
13505
+ args: ["u32", "ptr", "usize"],
13504
13506
  returns: "usize"
13505
13507
  },
13506
13508
  editorViewGetVisualCursor: {
13507
- args: ["ptr", "ptr"],
13509
+ args: ["u32", "ptr"],
13508
13510
  returns: "void"
13509
13511
  },
13510
13512
  editorViewMoveUpVisual: {
13511
- args: ["ptr"],
13513
+ args: ["u32"],
13512
13514
  returns: "void"
13513
13515
  },
13514
13516
  editorViewMoveDownVisual: {
13515
- args: ["ptr"],
13517
+ args: ["u32"],
13516
13518
  returns: "void"
13517
13519
  },
13518
13520
  editorViewDeleteSelectedText: {
13519
- args: ["ptr"],
13521
+ args: ["u32"],
13520
13522
  returns: "void"
13521
13523
  },
13522
13524
  editorViewSetCursorByOffset: {
13523
- args: ["ptr", "u32"],
13525
+ args: ["u32", "u32"],
13524
13526
  returns: "void"
13525
13527
  },
13526
13528
  editorViewGetNextWordBoundary: {
13527
- args: ["ptr", "ptr"],
13529
+ args: ["u32", "ptr"],
13528
13530
  returns: "void"
13529
13531
  },
13530
13532
  editorViewGetPrevWordBoundary: {
13531
- args: ["ptr", "ptr"],
13533
+ args: ["u32", "ptr"],
13532
13534
  returns: "void"
13533
13535
  },
13534
13536
  editorViewGetEOL: {
13535
- args: ["ptr", "ptr"],
13537
+ args: ["u32", "ptr"],
13536
13538
  returns: "void"
13537
13539
  },
13538
13540
  editorViewGetVisualSOL: {
13539
- args: ["ptr", "ptr"],
13541
+ args: ["u32", "ptr"],
13540
13542
  returns: "void"
13541
13543
  },
13542
13544
  editorViewGetVisualEOL: {
13543
- args: ["ptr", "ptr"],
13545
+ args: ["u32", "ptr"],
13544
13546
  returns: "void"
13545
13547
  },
13546
13548
  editorViewSetPlaceholderStyledText: {
13547
- args: ["ptr", "ptr", "usize"],
13549
+ args: ["u32", "ptr", "usize"],
13548
13550
  returns: "void"
13549
13551
  },
13550
13552
  editorViewSetTabIndicator: {
13551
- args: ["ptr", "u32"],
13553
+ args: ["u32", "u32"],
13552
13554
  returns: "void"
13553
13555
  },
13554
13556
  editorViewSetTabIndicatorColor: {
13555
- args: ["ptr", "ptr"],
13557
+ args: ["u32", "ptr"],
13556
13558
  returns: "void"
13557
13559
  },
13558
13560
  getArenaAllocatedBytes: {
@@ -13569,30 +13571,30 @@ function getOpenTUILib(libPath) {
13569
13571
  },
13570
13572
  createSyntaxStyle: {
13571
13573
  args: [],
13572
- returns: "ptr"
13574
+ returns: "u32"
13573
13575
  },
13574
13576
  destroySyntaxStyle: {
13575
- args: ["ptr"],
13577
+ args: ["u32"],
13576
13578
  returns: "void"
13577
13579
  },
13578
13580
  syntaxStyleRegister: {
13579
- args: ["ptr", "ptr", "usize", "ptr", "ptr", "u32"],
13581
+ args: ["u32", "ptr", "usize", "ptr", "ptr", "u32"],
13580
13582
  returns: "u32"
13581
13583
  },
13582
13584
  syntaxStyleResolveByName: {
13583
- args: ["ptr", "ptr", "usize"],
13585
+ args: ["u32", "ptr", "usize"],
13584
13586
  returns: "u32"
13585
13587
  },
13586
13588
  syntaxStyleGetStyleCount: {
13587
- args: ["ptr"],
13589
+ args: ["u32"],
13588
13590
  returns: "usize"
13589
13591
  },
13590
13592
  getTerminalCapabilities: {
13591
- args: ["ptr", "ptr"],
13593
+ args: ["u32", "ptr"],
13592
13594
  returns: "void"
13593
13595
  },
13594
13596
  processCapabilityResponse: {
13595
- args: ["ptr", "ptr", "usize"],
13597
+ args: ["u32", "ptr", "usize"],
13596
13598
  returns: "void"
13597
13599
  },
13598
13600
  encodeUnicode: {
@@ -13604,99 +13606,99 @@ function getOpenTUILib(libPath) {
13604
13606
  returns: "void"
13605
13607
  },
13606
13608
  bufferDrawChar: {
13607
- args: ["ptr", "u32", "u32", "u32", "ptr", "ptr", "u32"],
13609
+ args: ["u32", "u32", "u32", "u32", "ptr", "ptr", "u32"],
13608
13610
  returns: "void"
13609
13611
  },
13610
13612
  createAudioEngine: {
13611
13613
  args: ["ptr"],
13612
- returns: "ptr"
13614
+ returns: "u32"
13613
13615
  },
13614
13616
  destroyAudioEngine: {
13615
- args: ["ptr"],
13617
+ args: ["u32"],
13616
13618
  returns: "void"
13617
13619
  },
13618
13620
  audioRefreshPlaybackDevices: {
13619
- args: ["ptr"],
13621
+ args: ["u32"],
13620
13622
  returns: "i32"
13621
13623
  },
13622
13624
  audioGetPlaybackDeviceCount: {
13623
- args: ["ptr"],
13625
+ args: ["u32"],
13624
13626
  returns: "u32"
13625
13627
  },
13626
13628
  audioGetPlaybackDeviceName: {
13627
- args: ["ptr", "u32", "ptr", "usize"],
13629
+ args: ["u32", "u32", "ptr", "usize"],
13628
13630
  returns: "usize"
13629
13631
  },
13630
13632
  audioIsPlaybackDeviceDefault: {
13631
- args: ["ptr", "u32"],
13633
+ args: ["u32", "u32"],
13632
13634
  returns: "bool"
13633
13635
  },
13634
13636
  audioSelectPlaybackDevice: {
13635
- args: ["ptr", "u32"],
13637
+ args: ["u32", "u32"],
13636
13638
  returns: "i32"
13637
13639
  },
13638
13640
  audioClearPlaybackDeviceSelection: {
13639
- args: ["ptr"],
13641
+ args: ["u32"],
13640
13642
  returns: "void"
13641
13643
  },
13642
13644
  audioStart: {
13643
- args: ["ptr", "ptr"],
13645
+ args: ["u32", "ptr"],
13644
13646
  returns: "i32"
13645
13647
  },
13646
13648
  audioStartMixer: {
13647
- args: ["ptr"],
13649
+ args: ["u32"],
13648
13650
  returns: "i32"
13649
13651
  },
13650
13652
  audioStop: {
13651
- args: ["ptr"],
13653
+ args: ["u32"],
13652
13654
  returns: "i32"
13653
13655
  },
13654
13656
  audioLoad: {
13655
- args: ["ptr", "ptr", "u64", "ptr"],
13657
+ args: ["u32", "ptr", "u64", "ptr"],
13656
13658
  returns: "i32"
13657
13659
  },
13658
13660
  audioUnload: {
13659
- args: ["ptr", "u32"],
13661
+ args: ["u32", "u32"],
13660
13662
  returns: "i32"
13661
13663
  },
13662
13664
  audioPlay: {
13663
- args: ["ptr", "u32", "ptr", "ptr"],
13665
+ args: ["u32", "u32", "ptr", "ptr"],
13664
13666
  returns: "i32"
13665
13667
  },
13666
13668
  audioStopVoice: {
13667
- args: ["ptr", "u32"],
13669
+ args: ["u32", "u32"],
13668
13670
  returns: "i32"
13669
13671
  },
13670
13672
  audioSetVoiceGroup: {
13671
- args: ["ptr", "u32", "u32"],
13673
+ args: ["u32", "u32", "u32"],
13672
13674
  returns: "i32"
13673
13675
  },
13674
13676
  audioCreateGroup: {
13675
- args: ["ptr", "ptr", "u64", "ptr"],
13677
+ args: ["u32", "ptr", "u64", "ptr"],
13676
13678
  returns: "i32"
13677
13679
  },
13678
13680
  audioSetGroupVolume: {
13679
- args: ["ptr", "u32", "f32"],
13681
+ args: ["u32", "u32", "f32"],
13680
13682
  returns: "i32"
13681
13683
  },
13682
13684
  audioSetMasterVolume: {
13683
- args: ["ptr", "f32"],
13685
+ args: ["u32", "f32"],
13684
13686
  returns: "i32"
13685
13687
  },
13686
13688
  audioMixToBuffer: {
13687
- args: ["ptr", "ptr", "u32", "u8"],
13689
+ args: ["u32", "ptr", "u32", "u8"],
13688
13690
  returns: "i32"
13689
13691
  },
13690
13692
  audioEnableTap: {
13691
- args: ["ptr", "bool", "u32"],
13693
+ args: ["u32", "bool", "u32"],
13692
13694
  returns: "i32"
13693
13695
  },
13694
13696
  audioReadTap: {
13695
- args: ["ptr", "ptr", "u32", "u8", "ptr"],
13697
+ args: ["u32", "ptr", "u32", "u8", "ptr"],
13696
13698
  returns: "i32"
13697
13699
  },
13698
13700
  audioGetStats: {
13699
- args: ["ptr", "ptr"],
13701
+ args: ["u32", "ptr"],
13700
13702
  returns: "i32"
13701
13703
  },
13702
13704
  createNativeSpanFeed: {
@@ -13911,8 +13913,13 @@ class FFIRenderLib {
13911
13913
  nativeSpanFeedHandlers = new Map;
13912
13914
  constructor(libPath) {
13913
13915
  this.opentui = getOpenTUILib(libPath);
13914
- this.setupLogging();
13915
- this.setupEventBus();
13916
+ try {
13917
+ this.setupLogging();
13918
+ this.setupEventBus();
13919
+ } catch (error) {
13920
+ this.dispose();
13921
+ throw error;
13922
+ }
13916
13923
  }
13917
13924
  setupLogging() {
13918
13925
  if (this.logCallbackWrapper) {
@@ -13959,6 +13966,24 @@ class FFIRenderLib {
13959
13966
  setLogCallback(callbackPtr) {
13960
13967
  this.opentui.symbols.setLogCallback(callbackPtr);
13961
13968
  }
13969
+ dispose() {
13970
+ try {
13971
+ if (this.eventSinkPtr) {
13972
+ this.opentui.symbols.destroyEventSink(this.eventSinkPtr);
13973
+ this.eventSinkPtr = null;
13974
+ }
13975
+ this.setLogCallback(null);
13976
+ } finally {
13977
+ try {
13978
+ this.opentui.close();
13979
+ } finally {
13980
+ this.eventCallbackWrapper = null;
13981
+ this.logCallbackWrapper = null;
13982
+ this.nativeSpanFeedCallbackWrapper = null;
13983
+ this.nativeSpanFeedHandlers.clear();
13984
+ }
13985
+ }
13986
+ }
13962
13987
  setupEventBus() {
13963
13988
  if (this.eventCallbackWrapper) {
13964
13989
  return;
@@ -14019,7 +14044,8 @@ class FFIRenderLib {
14019
14044
  const bufferedOutputKind = options.bufferedOutput === "memory" ? 1 : 0;
14020
14045
  const remoteMode = options.remote === undefined ? 0 : options.remote ? 2 : 1;
14021
14046
  const feedPtr = options.feedPtr ?? null;
14022
- return this.opentui.symbols.createRenderer(width, height, bufferedOutputKind, remoteMode, feedPtr);
14047
+ const renderer = this.opentui.symbols.createRenderer(width, height, bufferedOutputKind, remoteMode, feedPtr);
14048
+ return renderer ? renderer : null;
14023
14049
  }
14024
14050
  setTerminalEnvVar(renderer, key, value) {
14025
14051
  const keyBytes = this.encoder.encode(key);
@@ -14207,14 +14233,14 @@ class FFIRenderLib {
14207
14233
  });
14208
14234
  this.opentui.symbols.bufferDrawGrid(buffer, borderChars, rgbaPtr(borderFg), rgbaPtr(borderBg), columnOffsets, columnCount, rowOffsets, rowCount, ptr(optionsBuffer));
14209
14235
  }
14210
- bufferDrawBox(buffer, x, y, width, height, borderChars, packedOptions, borderColor, backgroundColor, title, bottomTitle) {
14236
+ bufferDrawBox(buffer, x, y, width, height, borderChars, packedOptions, borderColor, backgroundColor, titleColor, title, bottomTitle) {
14211
14237
  const titleBytes = title ? this.encoder.encode(title) : null;
14212
14238
  const titleLen = title ? titleBytes.length : 0;
14213
14239
  const titlePtr = title ? titleBytes : null;
14214
14240
  const bottomTitleBytes = bottomTitle ? this.encoder.encode(bottomTitle) : null;
14215
14241
  const bottomTitleLen = bottomTitle ? bottomTitleBytes.length : 0;
14216
14242
  const bottomTitlePtr = bottomTitle ? bottomTitleBytes : null;
14217
- this.opentui.symbols.bufferDrawBox(buffer, x, y, width, height, borderChars, packedOptions, rgbaPtr(borderColor), rgbaPtr(backgroundColor), titlePtr, titleLen, bottomTitlePtr, bottomTitleLen);
14243
+ this.opentui.symbols.bufferDrawBox(buffer, x, y, width, height, borderChars, packedOptions, rgbaPtr(borderColor), rgbaPtr(backgroundColor), rgbaPtr(titleColor), titlePtr, titleLen, bottomTitlePtr, bottomTitleLen);
14218
14244
  }
14219
14245
  bufferResize(buffer, width, height) {
14220
14246
  this.opentui.symbols.bufferResize(buffer, width, height);
@@ -14804,7 +14830,7 @@ class FFIRenderLib {
14804
14830
  }
14805
14831
  createEditBuffer(widthMethod) {
14806
14832
  const widthMethodCode = widthMethod === "wcwidth" ? 0 : 1;
14807
- const bufferPtr = this.opentui.symbols.createEditBuffer(widthMethodCode, this.eventSinkPtr);
14833
+ const bufferPtr = this.opentui.symbols.createEditBuffer(widthMethodCode, this.eventSinkPtr ?? 0);
14808
14834
  if (!bufferPtr) {
14809
14835
  throw new Error("Failed to create EditBuffer");
14810
14836
  }
@@ -15154,8 +15180,8 @@ class FFIRenderLib {
15154
15180
  }
15155
15181
  createAudioEngine(options) {
15156
15182
  const optionsBuffer = options == null ? null : AudioCreateOptionsStruct.pack(options);
15157
- const enginePtr = this.opentui.symbols.createAudioEngine(optionsBuffer ? ptr(optionsBuffer) : null);
15158
- return enginePtr ? toPointer(enginePtr) : null;
15183
+ const engineHandle = this.opentui.symbols.createAudioEngine(optionsBuffer ? ptr(optionsBuffer) : null);
15184
+ return engineHandle ? engineHandle : null;
15159
15185
  }
15160
15186
  destroyAudioEngine(engine) {
15161
15187
  this.opentui.symbols.destroyAudioEngine(engine);
@@ -15334,11 +15360,11 @@ class FFIRenderLib {
15334
15360
  return this.opentui.symbols.streamCommitReserved(stream, length);
15335
15361
  }
15336
15362
  createSyntaxStyle() {
15337
- const stylePtr = this.opentui.symbols.createSyntaxStyle();
15338
- if (!stylePtr) {
15363
+ const styleHandle = this.opentui.symbols.createSyntaxStyle();
15364
+ if (!styleHandle) {
15339
15365
  throw new Error("Failed to create SyntaxStyle");
15340
15366
  }
15341
- return stylePtr;
15367
+ return styleHandle;
15342
15368
  }
15343
15369
  destroySyntaxStyle(style) {
15344
15370
  this.opentui.symbols.destroySyntaxStyle(style);
@@ -15388,8 +15414,15 @@ class FFIRenderLib {
15388
15414
  }
15389
15415
  var opentuiLibPath;
15390
15416
  var opentuiLib;
15417
+ var renderLibResolved = false;
15391
15418
  function setRenderLibPath(libPath) {
15392
15419
  if (opentuiLibPath !== libPath) {
15420
+ if (renderLibResolved) {
15421
+ throw new Error("setRenderLibPath() must be called before resolveRenderLib()");
15422
+ }
15423
+ if (opentuiLib instanceof FFIRenderLib) {
15424
+ opentuiLib.dispose();
15425
+ }
15393
15426
  opentuiLibPath = libPath;
15394
15427
  opentuiLib = undefined;
15395
15428
  }
@@ -15402,6 +15435,7 @@ function resolveRenderLib() {
15402
15435
  throw new Error(`Failed to initialize OpenTUI render library: ${error instanceof Error ? error.message : "Unknown error"}`);
15403
15436
  }
15404
15437
  }
15438
+ renderLibResolved = true;
15405
15439
  return opentuiLib;
15406
15440
  }
15407
15441
  try {
@@ -18004,6 +18038,7 @@ class BoxRenderable extends Renderable {
18004
18038
  borderSides;
18005
18039
  shouldFill;
18006
18040
  _title;
18041
+ _titleColor;
18007
18042
  _titleAlignment;
18008
18043
  _bottomTitle;
18009
18044
  _bottomTitleAlignment;
@@ -18035,6 +18070,7 @@ class BoxRenderable extends Renderable {
18035
18070
  this.borderSides = getBorderSides(this._border);
18036
18071
  this.shouldFill = options.shouldFill ?? this._defaultOptions.shouldFill;
18037
18072
  this._title = options.title;
18073
+ this._titleColor = options.titleColor ? parseColor(options.titleColor) : undefined;
18038
18074
  this._titleAlignment = options.titleAlignment || this._defaultOptions.titleAlignment;
18039
18075
  this._bottomTitle = options.bottomTitle;
18040
18076
  this._bottomTitleAlignment = options.bottomTitleAlignment || this._defaultOptions.bottomTitleAlignment;
@@ -18125,6 +18161,16 @@ class BoxRenderable extends Renderable {
18125
18161
  this.requestRender();
18126
18162
  }
18127
18163
  }
18164
+ get titleColor() {
18165
+ return this._titleColor;
18166
+ }
18167
+ set titleColor(value) {
18168
+ const newColor = value ? parseColor(value) : undefined;
18169
+ if (this._titleColor !== newColor) {
18170
+ this._titleColor = newColor;
18171
+ this.requestRender();
18172
+ }
18173
+ }
18128
18174
  get titleAlignment() {
18129
18175
  return this._titleAlignment;
18130
18176
  }
@@ -18174,6 +18220,7 @@ class BoxRenderable extends Renderable {
18174
18220
  backgroundColor: this._backgroundColor,
18175
18221
  shouldFill: this.shouldFill,
18176
18222
  title: this._title,
18223
+ titleColor: this._titleColor ?? currentBorderColor,
18177
18224
  titleAlignment: this._titleAlignment,
18178
18225
  bottomTitle: this._bottomTitle,
18179
18226
  bottomTitleAlignment: this._bottomTitleAlignment
@@ -24098,7 +24145,9 @@ Captured external output:
24098
24145
  if (this.shouldSyncNativePaletteState()) {
24099
24146
  this.refreshPalette();
24100
24147
  }
24101
- await this._feed?.idle();
24148
+ if (this._feed?.isBackpressured()) {
24149
+ await this._feed.idle();
24150
+ }
24102
24151
  }
24103
24152
  stdinListener = ((chunk) => {
24104
24153
  const data = Buffer.isBuffer(chunk) ? chunk : Buffer.from(chunk);
@@ -25426,5 +25475,5 @@ Captured external output:
25426
25475
 
25427
25476
  export { __export, __require, MeasureMode, exports_src, isValidBorderStyle, parseBorderStyle, BorderChars, getBorderFromSides, getBorderSides, borderCharsToArray, BorderCharArrays, KeyEvent, PasteEvent, KeyHandler, InternalKeyHandler, DEFAULT_FOREGROUND_RGB, DEFAULT_BACKGROUND_RGB, normalizeIndexedColorIndex, ansi256IndexToRgb, RGBA, normalizeColorValue, hexToRgb, rgbToHex, hsvToRgb, parseColor, fonts, measureText, getCharacterPositions, coordinateToCharacterIndex, renderFontToFrameBuffer, TextAttributes, ATTRIBUTE_BASE_BITS, ATTRIBUTE_BASE_MASK, getBaseAttributes, DebugOverlayCorner, TargetChannel, createTextAttributes, attributesWithLink, getLinkId, visualizeRenderableTree, isStyledText, StyledText, stringToStyledText, black, red, green, yellow, blue, magenta, cyan, white, brightBlack, brightRed, brightGreen, brightYellow, brightBlue, brightMagenta, brightCyan, brightWhite, bgBlack, bgRed, bgGreen, bgYellow, bgBlue, bgMagenta, bgCyan, bgWhite, bold, italic, underline, strikethrough, dim, reverse, blink, fg, bg, link, t, hastToStyledText, SystemClock, nonAlphanumericKeys, terminalNamedSingleStrokeKeys, parseKeypress, LinearScrollAccel, MacOSScrollAccel, parseAlign, parseAlignItems, parseBoxSizing, parseDimension, parseDirection, parseDisplay, parseEdge, parseFlexDirection, parseGutter, parseJustify, parseLogLevel, parseMeasureMode, parseOverflow, parsePositionType, parseUnit, parseWrap, MouseParser, Selection, convertGlobalToLocalSelection, ASCIIFontSelectionHelper, envRegistry, registerEnvVar, clearEnvCache, generateEnvMarkdown, generateEnvColored, env, StdinParser, treeSitterToTextChunks, treeSitterToStyledText, stringWidth2 as stringWidth, addDefaultParsers, TreeSitterClient, DataPathsManager, getDataPaths, extensionToFiletype, basenameToFiletype, extToFiletype, pathToFiletype, infoStringToFiletype, getTreeSitterClient, ExtmarksController, createExtmarksController, TerminalPalette, createTerminalPalette, normalizeTerminalPalette, buildTerminalPaletteSignature, decodePasteBytes, stripAnsiSequences, detectLinks, TextBuffer, LogLevel2 as LogLevel, setRenderLibPath, resolveRenderLib, OptimizedBuffer, h, isVNode, maybeMakeRenderable, wrapWithDelegates, instantiate, delegate, LayoutEvents, RenderableEvents, isRenderable, BaseRenderable, Renderable, RootRenderable, TextBufferView, EditBuffer, EditorView, convertThemeToStyles, SyntaxStyle, ANSI, BoxRenderable, TextBufferRenderable, CodeRenderable, isTextNodeRenderable, TextNodeRenderable, RootTextNodeRenderable, TextRenderable, NativeSpanFeed, defaultKeyAliases, mergeKeyAliases, mergeKeyBindings, getKeyBindingAction, buildKeyBindingsMap, capture, ConsolePosition, TerminalConsole, getObjectsInViewport, EditBufferRenderableEvents, isEditBufferRenderable, EditBufferRenderable, buildKittyKeyboardFlags, MouseEvent, MouseButton, createCliRenderer, CliRenderEvents, RendererControlState, CliRenderer };
25428
25477
 
25429
- //# debugId=E9E2E0C5F621879764756E2164756E21
25430
- //# sourceMappingURL=index-218h9p3f.js.map
25478
+ //# debugId=A8E972EE9C6B673C64756E2164756E21
25479
+ //# sourceMappingURL=index-mn090kzf.js.map