From 299b3b7314315bd1cb415985bdad3a092854687c Mon Sep 17 00:00:00 2001 From: Lorenzo Gabriele Date: Wed, 17 Jul 2024 16:02:25 +0200 Subject: [PATCH] Update Scala, Scala Native etc. --- .mill-version | 2 +- build.sc | 11 ++--- .../src/examples/WriteOnScreenExample.scala | 6 ++- libui-ng | 1 + scalaui/src/scalaui/AbstractTextArea.scala | 2 +- scalaui/src/scalaui/AttributedString.scala | 16 ++++---- scalaui/src/scalaui/Brush.scala | 2 +- scalaui/src/scalaui/Button.scala | 2 +- scalaui/src/scalaui/Checkbox.scala | 2 +- scalaui/src/scalaui/ComboBox.scala | 2 +- scalaui/src/scalaui/EditableComboBox.scala | 4 +- scalaui/src/scalaui/FontButton.scala | 2 +- scalaui/src/scalaui/Group.scala | 4 +- scalaui/src/scalaui/Label.scala | 2 +- scalaui/src/scalaui/Menu.scala | 2 +- scalaui/src/scalaui/RadioButtons.scala | 2 +- scalaui/src/scalaui/Tabs.scala | 2 +- scalaui/src/scalaui/TextField.scala | 2 +- scalaui/src/scalaui/TextLayout.scala | 2 +- scalaui/src/scalaui/Window.scala | 8 ++-- scalaui/src/scalaui/package.scala | 8 ++-- scalaui/src/scalaui/ui.scala | 40 +++++++++---------- 22 files changed, 64 insertions(+), 60 deletions(-) create mode 160000 libui-ng diff --git a/.mill-version b/.mill-version index a3f5a8e..1ee43fc 100644 --- a/.mill-version +++ b/.mill-version @@ -1 +1 @@ -0.10.3 +0.11.8 diff --git a/build.sc b/build.sc index 1600272..fb86e60 100644 --- a/build.sc +++ b/build.sc @@ -2,14 +2,14 @@ import mill._ import mill.scalalib._ import mill.scalanativelib._ import mill.scalalib.publish._ -import $ivy.`com.goyeau::mill-scalafix::0.2.8` +import $ivy.`com.goyeau::mill-scalafix::0.4.0` import com.goyeau.mill.scalafix.ScalafixModule -import $ivy.`de.tototec::de.tobiasroeser.mill.vcs.version::0.1.4` +import $ivy.`de.tototec::de.tobiasroeser.mill.vcs.version::0.4.0` import de.tobiasroeser.mill.vcs.version.VcsVersion trait Common extends ScalaNativeModule { - def scalaVersion = "2.13.8" - def scalaNativeVersion = "0.4.4" + def scalaVersion = "3.3.3" + def scalaNativeVersion = "0.5.4" } trait Publish extends PublishModule { @@ -19,7 +19,8 @@ trait Publish extends PublishModule { organization = "com.github.lolgab", url = "https://github.com/lolgab/scalaui", licenses = Seq(License.MIT), - versionControl = VersionControl.github(owner = "lolgab", repo = "scalaui"), + versionControl = + VersionControl.github(owner = "lolgab", repo = "scalaui"), developers = Seq( Developer("lolgab", "Lorenzo Gabriele", "https://github.com/lolgab") ) diff --git a/integration/tests/write-on-screen/src/examples/WriteOnScreenExample.scala b/integration/tests/write-on-screen/src/examples/WriteOnScreenExample.scala index 8504544..5395693 100644 --- a/integration/tests/write-on-screen/src/examples/WriteOnScreenExample.scala +++ b/integration/tests/write-on-screen/src/examples/WriteOnScreenExample.scala @@ -52,8 +52,10 @@ object WriteOnScreenExample { val s = texts.head._1 if (s != "") texts = texts.head.copy(_1 = s.init) :: texts.tail case Key.Down(Key.Coded(key)) => - val k = if (key >= 'a' && key <= 'z' && e.shiftDown) key - 32 else key - texts = texts.head.copy(_1 = texts.head._1 + k.toChar) :: texts.tail + val k: Char = + if (key >= 'a' && key <= 'z' && e.shiftDown) (key - 32).toChar + else key + texts = texts.head.copy(_1 = texts.head._1 + k) :: texts.tail case _ => } a.queueRedraw() diff --git a/libui-ng b/libui-ng new file mode 160000 index 0000000..49b04c4 --- /dev/null +++ b/libui-ng @@ -0,0 +1 @@ +Subproject commit 49b04c4cf8ae4d3e38e389f446ef75170eb62762 diff --git a/scalaui/src/scalaui/AbstractTextArea.scala b/scalaui/src/scalaui/AbstractTextArea.scala index 8368fd8..9b5bd22 100644 --- a/scalaui/src/scalaui/AbstractTextArea.scala +++ b/scalaui/src/scalaui/AbstractTextArea.scala @@ -9,7 +9,7 @@ trait AbstractTextArea extends Component { fromCString(uiMultilineEntryText(control)) } - def text_=(s: String): Unit = Zone { implicit z => + def text_=(s: String): Unit = Zone { require(initialized) uiMultilineEntrySetText(control, toCString(s)) } diff --git a/scalaui/src/scalaui/AttributedString.scala b/scalaui/src/scalaui/AttributedString.scala index e1caf66..5336355 100644 --- a/scalaui/src/scalaui/AttributedString.scala +++ b/scalaui/src/scalaui/AttributedString.scala @@ -10,7 +10,7 @@ class AttributedString private () extends Freeable { def this(s: String) = { this() - Zone { implicit z => control = uiNewAttributedString(toCString(s)) } + Zone { control = uiNewAttributedString(toCString(s)) } } def text: String = fromCString(uiAttributedStringString(control)) @@ -21,9 +21,9 @@ class AttributedString private () extends Freeable { family: String, start: Int = 0, end: Int = length - ): AttributedString = Zone { implicit z => + ): AttributedString = Zone { val attr = uiNewFamilyAttribute(toCString(family)) - uiAttributedStringSetAttribute(control, attr, start.toULong, end.toULong) + uiAttributedStringSetAttribute(control, attr, start.toCSize, `end`.toCSize) this } def withSize( @@ -32,7 +32,7 @@ class AttributedString private () extends Freeable { end: Int = length ): AttributedString = { val attr = uiNewSizeAttribute(size) - uiAttributedStringSetAttribute(control, attr, start.toULong, end.toULong) + uiAttributedStringSetAttribute(control, attr, start.toCSize, end.toCSize) this } def withBackground( @@ -42,7 +42,7 @@ class AttributedString private () extends Freeable { ): AttributedString = { val attr = uiNewBackgroundAttribute(color.red, color.green, color.blue, color.alpha) - uiAttributedStringSetAttribute(control, attr, start.toULong, end.toULong) + uiAttributedStringSetAttribute(control, attr, start.toCSize, end.toCSize) this } def withColor( @@ -52,7 +52,7 @@ class AttributedString private () extends Freeable { ): AttributedString = { val attr = uiNewColorAttribute(color.red, color.green, color.blue, color.alpha) - uiAttributedStringSetAttribute(control, attr, start.toULong, end.toULong) + uiAttributedStringSetAttribute(control, attr, start.toCSize, end.toCSize) this } def withWeight( @@ -61,7 +61,7 @@ class AttributedString private () extends Freeable { end: Int = length ): AttributedString = { val attr = uiNewWeightAttribute(weight.toUInt) - uiAttributedStringSetAttribute(control, attr, start.toULong, end.toULong) + uiAttributedStringSetAttribute(control, attr, start.toCSize, end.toCSize) this } def withItalic( @@ -70,7 +70,7 @@ class AttributedString private () extends Freeable { end: Int = length ): AttributedString = { val attr = uiNewItalicAttribute(italic.id.toUInt) - uiAttributedStringSetAttribute(control, attr, start.toULong, end.toULong) + uiAttributedStringSetAttribute(control, attr, start.toCSize, end.toCSize) this } diff --git a/scalaui/src/scalaui/Brush.scala b/scalaui/src/scalaui/Brush.scala index 816cc55..245d01b 100644 --- a/scalaui/src/scalaui/Brush.scala +++ b/scalaui/src/scalaui/Brush.scala @@ -37,7 +37,7 @@ class GradientBrush( control.Y1 = end.y private val stopsArrayArray = ByteArray.alloc( - (colors.length.toULong * sizeof[uiDrawBrushGradientStop]).toInt + (colors.length.toCSize * sizeof[uiDrawBrushGradientStop]).toInt ) private[scalaui] val stopsArray: Ptr[uiDrawBrushGradientStop] = stopsArrayArray.at(0).asInstanceOf[Ptr[uiDrawBrushGradientStop]] diff --git a/scalaui/src/scalaui/Button.scala b/scalaui/src/scalaui/Button.scala index 9a49f0a..677854d 100644 --- a/scalaui/src/scalaui/Button.scala +++ b/scalaui/src/scalaui/Button.scala @@ -7,7 +7,7 @@ import ui._ class Button(text: String, onClick: CFuncPtr0[Unit]) extends Component { //private val cCallback = CFuncPtr.fromFunction0(onClick) - private[scalaui] def build(): Unit = Zone { implicit z => + private[scalaui] def build(): Unit = Zone { control = uiNewButton(toCString(text)) uiButtonOnClicked(control, onClick, null) } diff --git a/scalaui/src/scalaui/Checkbox.scala b/scalaui/src/scalaui/Checkbox.scala index 76ab434..375971b 100644 --- a/scalaui/src/scalaui/Checkbox.scala +++ b/scalaui/src/scalaui/Checkbox.scala @@ -15,6 +15,6 @@ class Checkbox(text: String, onToggled: CFuncPtr0[Unit] = doNothing _) } private[scalaui] override def build(): Unit = { - Zone { implicit z => control = uiNewCheckbox(toCString(text)) } + Zone { control = uiNewCheckbox(toCString(text)) } } } diff --git a/scalaui/src/scalaui/ComboBox.scala b/scalaui/src/scalaui/ComboBox.scala index 49b8483..cc12393 100644 --- a/scalaui/src/scalaui/ComboBox.scala +++ b/scalaui/src/scalaui/ComboBox.scala @@ -19,7 +19,7 @@ class ComboBox( } def selectedName: String = names(selected) - private[scalaui] override def build(): Unit = Zone { implicit z => + private[scalaui] override def build(): Unit = Zone { control = uiNewCombobox() for (name <- names) { uiComboboxAppend(control, toCString(name)) diff --git a/scalaui/src/scalaui/EditableComboBox.scala b/scalaui/src/scalaui/EditableComboBox.scala index 8e81992..691c406 100644 --- a/scalaui/src/scalaui/EditableComboBox.scala +++ b/scalaui/src/scalaui/EditableComboBox.scala @@ -11,12 +11,12 @@ class EditableComboBox( require(initialized) fromCString(uiEditableComboboxText(control)) } - def currentText_=(v: String): Unit = Zone { implicit z => + def currentText_=(v: String): Unit = Zone { require(initialized) uiEditableComboboxSetText(control, toCString(v)) } - private[scalaui] override def build(): Unit = Zone { implicit z => + private[scalaui] override def build(): Unit = Zone { control = uiNewEditableCombobox() for (name <- names) { uiEditableComboboxAppend(control, toCString(name)) diff --git a/scalaui/src/scalaui/FontButton.scala b/scalaui/src/scalaui/FontButton.scala index 281a092..06f6253 100644 --- a/scalaui/src/scalaui/FontButton.scala +++ b/scalaui/src/scalaui/FontButton.scala @@ -36,7 +36,7 @@ class FontButton private ( } object FontButton { - private def changeFont(b: Ptr[uiFontButton], data: Ptr[Byte]): Unit = { + private def changeFont(b: Ptr[uiFontButton], data: CVoidPtr): Unit = { val onChange = CFuncPtr.fromPtr[CFuncPtr0[Unit]](data) onChange() } diff --git a/scalaui/src/scalaui/Group.scala b/scalaui/src/scalaui/Group.scala index 59233db..8253fad 100644 --- a/scalaui/src/scalaui/Group.scala +++ b/scalaui/src/scalaui/Group.scala @@ -4,7 +4,7 @@ import scala.scalanative.unsafe._ import ui._ class Group(t: String, content: Component, margin: Int = 0) extends Component { - private[scalaui] override def build(): Unit = Zone { implicit z => + private[scalaui] override def build(): Unit = Zone { control = uiNewGroup(toCString(t)) content.build() uiGroupSetChild(control, content.control) @@ -16,7 +16,7 @@ class Group(t: String, content: Component, margin: Int = 0) extends Component { fromCString(uiGroupTitle(control)) } - def title_=(title: String): Unit = Zone { implicit z => + def title_=(title: String): Unit = Zone { require(initialized) uiGroupSetTitle(control, toCString(title)) } diff --git a/scalaui/src/scalaui/Label.scala b/scalaui/src/scalaui/Label.scala index 6c1f989..7fe4ba3 100644 --- a/scalaui/src/scalaui/Label.scala +++ b/scalaui/src/scalaui/Label.scala @@ -4,7 +4,7 @@ import scala.scalanative.unsafe._ import ui._ class Label(text: String) extends Component { - private[scalaui] def build(): Unit = Zone { implicit z => + private[scalaui] def build(): Unit = Zone { control = uiNewLabel(toCString(text)) } } diff --git a/scalaui/src/scalaui/Menu.scala b/scalaui/src/scalaui/Menu.scala index 5ad9fdb..0e35153 100644 --- a/scalaui/src/scalaui/Menu.scala +++ b/scalaui/src/scalaui/Menu.scala @@ -4,7 +4,7 @@ import scala.scalanative.unsafe._ import ui._ class Menu(name: String, items: AppendableToMenu*) extends GraphicObject { - private[scalaui] def build(): Unit = Zone { implicit z => + private[scalaui] def build(): Unit = Zone { control = uiNewMenu(toCString(name)) for (item <- items) { item match { diff --git a/scalaui/src/scalaui/RadioButtons.scala b/scalaui/src/scalaui/RadioButtons.scala index c99f218..00d71fa 100644 --- a/scalaui/src/scalaui/RadioButtons.scala +++ b/scalaui/src/scalaui/RadioButtons.scala @@ -21,7 +21,7 @@ class RadioButtons( names(selected) } - private[scalaui] override def build(): Unit = Zone { implicit z => + private[scalaui] override def build(): Unit = Zone { control = uiNewRadioButtons() for (name <- names) { uiRadioButtonsAppend(control, toCString(name)) diff --git a/scalaui/src/scalaui/Tabs.scala b/scalaui/src/scalaui/Tabs.scala index 143a8bd..be7bab6 100644 --- a/scalaui/src/scalaui/Tabs.scala +++ b/scalaui/src/scalaui/Tabs.scala @@ -4,7 +4,7 @@ import scala.scalanative.unsafe._ import ui._ class Tabs(tabs: Seq[(String, Component)]) extends Component { - private[scalaui] override def build(): Unit = Zone { implicit z => + private[scalaui] override def build(): Unit = Zone { control = uiNewTab() for ((name, component) <- tabs) { component.build() diff --git a/scalaui/src/scalaui/TextField.scala b/scalaui/src/scalaui/TextField.scala index 7dce79d..1adbb93 100644 --- a/scalaui/src/scalaui/TextField.scala +++ b/scalaui/src/scalaui/TextField.scala @@ -4,7 +4,7 @@ import scala.scalanative.unsafe._ import ui._ class TextField(initialText: String) extends Field { - private[scalaui] override def build(): Unit = Zone { implicit z => + private[scalaui] override def build(): Unit = Zone { control = uiNewEntry() uiEntrySetText(control, toCString(initialText)) } diff --git a/scalaui/src/scalaui/TextLayout.scala b/scalaui/src/scalaui/TextLayout.scala index 99f6d38..d991531 100644 --- a/scalaui/src/scalaui/TextLayout.scala +++ b/scalaui/src/scalaui/TextLayout.scala @@ -13,7 +13,7 @@ private[scalaui] class TextLayout( ) { //TODO waiting for issue (returning Ptr from Zone) being solved private[scalaui] var control: Ptr[uiDrawTextLayout] = null - def build(): Unit = Zone { implicit z => + def build(): Unit = Zone { val params = alloc[uiDrawTextLayoutParams]() params.String = text.control params.DefaultFont = defaultFont.control diff --git a/scalaui/src/scalaui/Window.scala b/scalaui/src/scalaui/Window.scala index 17f8433..476752d 100644 --- a/scalaui/src/scalaui/Window.scala +++ b/scalaui/src/scalaui/Window.scala @@ -17,7 +17,7 @@ class Window( ) extends GraphicObject with Freeable { - private[scalaui] def build(): Unit = Zone { implicit z => + private[scalaui] def build(): Unit = Zone { for (menu <- menus) menu.build() control = uiNewWindow(toCString(_title), width, height, menus.nonEmpty) content.build() @@ -39,12 +39,12 @@ class Window( } def messageBox(title: String, description: String): Unit = Zone { - implicit z => + implicit z: Zone => require(initialized) uiMsgBox(control, toCString(title), toCString(description)) } - def errorBox(title: String, description: String): Unit = Zone { implicit z => + def errorBox(title: String, description: String): Unit = Zone { require(initialized) uiMsgBoxError(control, toCString(title), toCString(description)) } @@ -55,7 +55,7 @@ class Window( else _title } - def title_=(v: String): Unit = Zone { implicit z => + def title_=(v: String): Unit = Zone { require(initialized) uiWindowSetTitle(control, toCString(v)) } diff --git a/scalaui/src/scalaui/package.scala b/scalaui/src/scalaui/package.scala index 34211ba..98ee8f9 100644 --- a/scalaui/src/scalaui/package.scala +++ b/scalaui/src/scalaui/package.scala @@ -12,12 +12,12 @@ package object scalaui { private var _initialized = false private[scalaui] def initialized: Boolean = _initialized - private def onShouldQuit(data: Ptr[Byte]): CInt = { + private def onShouldQuit(data: CVoidPtr): CInt = { uiControlDestroy(data.asInstanceOf[Ptr[uiWindow]]) 1 } - private def onClosing(w: Ptr[uiWindow], data: Ptr[Byte]): CInt = { + private def onClosing(w: Ptr[uiWindow], data: CVoidPtr): CInt = { if (CFuncPtr.fromPtr[CFuncPtr0[Boolean]](data).apply()) { for (window <- windows; if window.control == w) { windows = windows.filter(_ != window) @@ -186,8 +186,8 @@ package object scalaui { } def held(b: MouseButton.Value): Boolean = { - if (b == MouseButton.NoButton) e.Held1To64 == 0.toULong - else (e.Held1To64 & (1.toULong << b.id - 1)) == 1.toULong + if (b == MouseButton.NoButton) e.Held1To64 == 0.toCSize + else (e.Held1To64 & (1.toCSize << b.id - 1)) == 1.toCSize } } diff --git a/scalaui/src/scalaui/ui.scala b/scalaui/src/scalaui/ui.scala index 0d254e7..a26e472 100644 --- a/scalaui/src/scalaui/ui.scala +++ b/scalaui/src/scalaui/ui.scala @@ -18,10 +18,10 @@ object ui { def uiMainStep(wait: CInt): CInt = extern def uiQuit(): Unit = extern - def uiQueueMain(f: CFuncPtr1[Ptr[Byte], Unit], data: Ptr[Byte]): Unit = + def uiQueueMain(f: CFuncPtr1[Ptr[Byte], Unit], data: CVoidPtr): Unit = extern - def uiOnShouldQuit(f: CFuncPtr1[Ptr[Byte], CInt], data: Ptr[Byte]): Unit = + def uiOnShouldQuit(f: CFuncPtr1[Ptr[Byte], CInt], data: CVoidPtr): Unit = extern def uiFreeText(text: CString): Unit = extern @@ -94,12 +94,12 @@ object ui { w: Ptr[uiWindow], f: CFuncPtr0[Unit], // f: CFuncPtr2[Ptr[uiWindow], Ptr[Byte], Unit], - data: Ptr[Byte] + data: CVoidPtr ): Unit = extern def uiWindowOnClosing( w: Ptr[uiWindow], f: CFuncPtr2[Ptr[uiWindow], Ptr[Byte], CInt], - data: Ptr[Byte] + data: CVoidPtr ): Unit = extern def uiWindowBorderless(w: Ptr[uiWindow]): CInt = extern @@ -121,9 +121,9 @@ object ui { def uiButtonOnClicked( b: Ptr[uiButton], f: CFuncPtr0[Unit], - data: Ptr[Byte] + data: CVoidPtr ): Unit = extern -//def uiButtonOnClicked(b: Ptr[uiButton], f: CFuncPtr2[Ptr[uiButton], Ptr[Byte], Unit], data: Ptr[Byte]): Unit = extern +//def uiButtonOnClicked(b: Ptr[uiButton], f: CFuncPtr2[Ptr[uiButton], Ptr[Byte], Unit], data: CVoidPtr): Unit = extern def uiNewButton(text: CString): Ptr[uiButton] = extern @@ -142,10 +142,10 @@ object ui { def uiCheckboxOnToggled( c: Ptr[uiCheckbox], f: CFuncPtr2[uiCheckbox, Ptr[Byte], Unit], - data: Ptr[Byte] + data: CVoidPtr ): Unit = extern -//def uiCheckboxOnToggled(c: Ptr[uiCheckbox], f: CFuncPtr2[uiCheckbox,Ptr[Byte], Unit], data: Ptr[Byte]): Unit = extern +//def uiCheckboxOnToggled(c: Ptr[uiCheckbox], f: CFuncPtr2[uiCheckbox,Ptr[Byte], Unit], data: CVoidPtr): Unit = extern def uiCheckboxChecked(c: Ptr[uiCheckbox]): CInt = extern def uiCheckboxSetChecked(c: Ptr[uiCheckbox], checked: CInt): Unit = extern @@ -157,7 +157,7 @@ object ui { def uiEntryOnChanged( e: Ptr[uiEntry], f: CFuncPtr2[Ptr[uiEntry], Ptr[Byte], Unit], - data: Ptr[Byte] + data: CVoidPtr ): Unit = extern def uiEntryReadOnly(e: Ptr[uiEntry]): CInt = extern def uiEntrySetReadOnly(e: Ptr[uiEntry], readonly: CInt): Unit = extern @@ -200,7 +200,7 @@ object ui { s: Ptr[uiSpinbox], // f: CFuncPtr2[Ptr[uiSpinbox], Ptr[Byte], Unit], f: CFuncPtr0[Unit], - data: Ptr[Byte] + data: CVoidPtr ): Unit = extern def uiNewSpinbox(min: CInt, max: CInt): Ptr[uiSpinbox] = extern @@ -211,7 +211,7 @@ object ui { s: Ptr[uiSlider], //f: CFuncPtr2[Ptr[uiSlider], Ptr[Byte], Unit], f: CFuncPtr0[Unit], - data: Ptr[Byte] + data: CVoidPtr ): Unit = extern def uiNewSlider(min: CInt, max: CInt): Ptr[uiSlider] = extern @@ -231,7 +231,7 @@ object ui { def uiComboboxOnSelected( c: Ptr[uiCombobox], f: CFuncPtr2[Ptr[uiCombobox], Ptr[Byte], Unit], - data: Ptr[Byte] + data: CVoidPtr ): Unit = extern def uiNewCombobox(): Ptr[uiCombobox] = extern @@ -248,7 +248,7 @@ object ui { def uiEditableComboboxOnChanged( c: Ptr[uiEditableCombobox], f: CFuncPtr2[Ptr[uiEditableCombobox], Ptr[Byte], Unit], - data: Ptr[Byte] + data: CVoidPtr ): Unit = extern def uiNewEditableCombobox(): Ptr[uiEditableCombobox] = extern @@ -260,7 +260,7 @@ object ui { r: Ptr[uiRadioButtons], f: CFuncPtr0[Unit], //f: CFuncPtr2[Ptr[uiRadioButtons], Ptr[Byte], Unit], - data: Ptr[Byte] + data: CVoidPtr ): Unit = extern def uiNewRadioButtons(): Ptr[uiRadioButtons] = extern @@ -279,7 +279,7 @@ object ui { e: Ptr[uiMultilineEntry], f: CFuncPtr0[Unit], //f: CFuncPtr2[Ptr[uiMultilineEntry], Ptr[Byte], Unit], - data: Ptr[Byte] + data: CVoidPtr ): Unit = extern def uiMultilineEntryReadOnly(e: Ptr[uiMultilineEntry]): CInt = extern def uiMultilineEntrySetReadOnly( @@ -296,7 +296,7 @@ object ui { m: Ptr[uiMenuItem], // f: CFuncPtr3[Ptr[uiMenuItem], Ptr[uiWindow], Ptr[Byte], Unit], f: CFuncPtr0[Unit], - data: Ptr[Byte] + data: CVoidPtr ): Unit = extern def uiMenuItemChecked(m: Ptr[uiMenuItem]): CInt = extern def uiMenuItemSetChecked(m: Ptr[uiMenuItem], checked: CInt): Unit = extern @@ -636,7 +636,7 @@ object ui { def uiOpenTypeFeaturesForEach( otf: Ptr[uiOpenTypeFeatures], f: uiOpenTypeFeaturesForEachFunc, - data: Ptr[Byte] + data: CVoidPtr ): Unit = extern def uiNewFeaturesAttribute(otf: Ptr[uiOpenTypeFeatures]): Ptr[uiAttribute] = extern @@ -674,7 +674,7 @@ object ui { def uiAttributedStringForEachAttribute( s: Ptr[uiAttributedString], f: uiAttributedStringForEachAttributeFunc, - data: Ptr[Byte] + data: CVoidPtr ): Unit = extern def uiAttributedStringNumGraphemes(s: Ptr[uiAttributedString]): CSize = extern def uiAttributedStringByteIndexToGrapheme( @@ -752,7 +752,7 @@ object ui { def uiFontButtonOnChanged( b: Ptr[uiFontButton], f: CFuncPtr2[Ptr[uiFontButton], Ptr[Byte], Unit], - data: Ptr[Byte] + data: CVoidPtr ): Unit = extern def uiNewFontButton(): Ptr[uiFontButton] = extern @@ -776,7 +776,7 @@ object ui { def uiColorButtonOnChanged( b: Ptr[uiColorButton], f: CFuncPtr1[Ptr[uiColorButton], Unit], - data: Ptr[Byte] + data: CVoidPtr ): Unit = extern def uiNewColorButton(): Ptr[uiColorButton] = extern